├── .DS_Store ├── README.md ├── bower.json ├── config.xml ├── gulpfile.js ├── hooks ├── README.md └── after_prepare │ └── 010_add_platform_class.js ├── ionic.project ├── npm-debug.log ├── package.json ├── plugins ├── .DS_Store ├── android.json ├── 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 ├── com.synconset.imagepicker │ ├── .fetch.json │ ├── APACHE_LICENSE │ ├── BSD_LICENSE │ ├── LICENSE │ ├── README.md │ ├── plugin.xml │ ├── src │ │ ├── android │ │ │ ├── Library │ │ │ │ ├── res │ │ │ │ │ ├── anim │ │ │ │ │ │ └── image_pop_in.xml │ │ │ │ │ ├── drawable-hdpi │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ ├── image_bg.9.png │ │ │ │ │ │ └── loading_icon.png │ │ │ │ │ ├── drawable-ldpi │ │ │ │ │ │ └── icon.png │ │ │ │ │ ├── drawable-mdpi │ │ │ │ │ │ ├── ic_action_discard_dark.png │ │ │ │ │ │ ├── ic_action_discard_light.png │ │ │ │ │ │ ├── ic_action_done_dark.png │ │ │ │ │ │ ├── ic_action_done_light.png │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── icon.png │ │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ │ ├── ic_action_discard_dark.png │ │ │ │ │ │ ├── ic_action_discard_light.png │ │ │ │ │ │ ├── ic_action_done_dark.png │ │ │ │ │ │ ├── ic_action_done_light.png │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── grid_background.xml │ │ │ │ │ ├── layout │ │ │ │ │ │ ├── actionbar_custom_view_done_discard.xml │ │ │ │ │ │ ├── actionbar_discard_button.xml │ │ │ │ │ │ ├── actionbar_done_button.xml │ │ │ │ │ │ └── multiselectorgrid.xml │ │ │ │ │ ├── values-de │ │ │ │ │ │ └── multiimagechooser_strings_de.xml │ │ │ │ │ ├── values-es │ │ │ │ │ │ └── multiimagechooser_strings_es.xml │ │ │ │ │ ├── values-fr │ │ │ │ │ │ └── multiimagechooser_strings_fr.xml │ │ │ │ │ ├── values-hu │ │ │ │ │ │ └── multiimagechooser_strings_hu.xml │ │ │ │ │ ├── values-ja │ │ │ │ │ │ └── multiimagechooser_strings_ja.xml │ │ │ │ │ ├── values-ko │ │ │ │ │ │ └── multiimagechooser_strings_ko.xml │ │ │ │ │ └── values │ │ │ │ │ │ ├── multiimagechooser_strings_en.xml │ │ │ │ │ │ └── themes.xml │ │ │ │ └── src │ │ │ │ │ ├── ImageFetcher.java │ │ │ │ │ └── MultiImageChooserActivity.java │ │ │ └── com │ │ │ │ └── synconset │ │ │ │ └── ImagePicker │ │ │ │ ├── FakeR.java │ │ │ │ └── ImagePicker.java │ │ └── ios │ │ │ ├── ELCImagePicker │ │ │ ├── ELCAlbumPickerController.h │ │ │ ├── ELCAlbumPickerController.m │ │ │ ├── ELCAsset.h │ │ │ ├── ELCAsset.m │ │ │ ├── ELCAssetCell.h │ │ │ ├── ELCAssetCell.m │ │ │ ├── ELCAssetPickerFilterDelegate.h │ │ │ ├── ELCAssetSelectionDelegate.h │ │ │ ├── ELCAssetTablePicker.h │ │ │ ├── ELCAssetTablePicker.m │ │ │ ├── ELCImagePickerController.h │ │ │ ├── ELCImagePickerController.m │ │ │ └── Resources │ │ │ │ ├── ELCAlbumPickerController.xib │ │ │ │ ├── ELCAssetPicker.xib │ │ │ │ ├── ELCAssetTablePicker.xib │ │ │ │ ├── Overlay.png │ │ │ │ └── Overlay@2x.png │ │ │ ├── SOSPicker.h │ │ │ └── SOSPicker.m │ └── www │ │ └── imagepicker.js ├── ios.json ├── 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 │ │ ├── browser │ │ │ └── DeviceProxy.js │ │ ├── firefoxos │ │ │ └── DeviceProxy.js │ │ ├── ios │ │ │ ├── CDVDevice.h │ │ │ └── CDVDevice.m │ │ ├── tizen │ │ │ └── DeviceProxy.js │ │ ├── ubuntu │ │ │ ├── device.cpp │ │ │ ├── device.h │ │ │ └── device.js │ │ ├── windows │ │ │ └── DeviceProxy.js │ │ ├── windows8 │ │ │ └── DeviceProxy.js │ │ └── wp │ │ │ └── Device.cs │ ├── tests │ │ ├── plugin.xml │ │ └── tests.js │ └── www │ │ └── device.js ├── org.apache.cordova.file-transfer │ ├── .DS_Store │ ├── .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 │ │ ├── amazon │ │ │ └── FileTransfer.java │ │ ├── android │ │ │ ├── FileProgressResult.java │ │ │ ├── FileTransfer.java │ │ │ └── FileUploadResult.java │ │ ├── ios │ │ │ ├── CDVFileTransfer.h │ │ │ └── CDVFileTransfer.m │ │ ├── ubuntu │ │ │ ├── file-transfer.cpp │ │ │ └── file-transfer.h │ │ ├── windows │ │ │ └── FileTransferProxy.js │ │ └── wp │ │ │ └── FileTransfer.cs │ ├── tests │ │ ├── plugin.xml │ │ └── tests.js │ └── www │ │ ├── .DS_Store │ │ ├── FileTransfer.js │ │ ├── FileTransferError.js │ │ ├── blackberry10 │ │ ├── FileTransfer.js │ │ ├── FileTransferProxy.js │ │ └── xhrFileTransfer.js │ │ ├── firefoxos │ │ └── FileTransferProxy.js │ │ └── wp7 │ │ └── base64.js └── org.apache.cordova.file │ ├── .fetch.json │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── RELEASENOTES.md │ ├── doc │ ├── de │ │ ├── index.md │ │ └── plugins.md │ ├── es │ │ ├── index.md │ │ └── plugins.md │ ├── fr │ │ ├── index.md │ │ └── plugins.md │ ├── index.md │ ├── it │ │ ├── index.md │ │ └── plugins.md │ ├── ja │ │ ├── index.md │ │ └── plugins.md │ ├── ko │ │ ├── index.md │ │ └── plugins.md │ ├── pl │ │ ├── index.md │ │ └── plugins.md │ ├── plugins.md │ ├── ru │ │ ├── index.md │ │ └── plugins.md │ └── zh │ │ ├── index.md │ │ └── plugins.md │ ├── package.json │ ├── plugin.xml │ ├── src │ ├── android │ │ ├── ContentFilesystem.java │ │ ├── DirectoryManager.java │ │ ├── EncodingException.java │ │ ├── FileExistsException.java │ │ ├── FileHelper.java │ │ ├── FileUtils.java │ │ ├── Filesystem.java │ │ ├── InvalidModificationException.java │ │ ├── LocalFilesystem.java │ │ ├── LocalFilesystemURL.java │ │ ├── NoModificationAllowedException.java │ │ └── TypeMismatchException.java │ ├── blackberry10 │ │ └── index.js │ ├── firefoxos │ │ └── FileProxy.js │ ├── ios │ │ ├── CDVAssetLibraryFilesystem.h │ │ ├── CDVAssetLibraryFilesystem.m │ │ ├── CDVFile.h │ │ ├── CDVFile.m │ │ ├── CDVLocalFilesystem.h │ │ └── CDVLocalFilesystem.m │ ├── ubuntu │ │ ├── file.cpp │ │ └── file.h │ ├── windows │ │ └── FileProxy.js │ └── wp │ │ └── File.cs │ ├── tests │ ├── plugin.xml │ └── tests.js │ └── www │ ├── DirectoryEntry.js │ ├── DirectoryReader.js │ ├── Entry.js │ ├── File.js │ ├── FileEntry.js │ ├── FileError.js │ ├── FileReader.js │ ├── FileSystem.js │ ├── FileUploadOptions.js │ ├── FileUploadResult.js │ ├── FileWriter.js │ ├── Flags.js │ ├── LocalFileSystem.js │ ├── Metadata.js │ ├── ProgressEvent.js │ ├── android │ └── FileSystem.js │ ├── blackberry10 │ ├── FileProxy.js │ ├── FileSystem.js │ ├── copyTo.js │ ├── createEntryFromNative.js │ ├── getDirectory.js │ ├── getFile.js │ ├── getFileMetadata.js │ ├── getMetadata.js │ ├── getParent.js │ ├── info.js │ ├── moveTo.js │ ├── readAsArrayBuffer.js │ ├── readAsBinaryString.js │ ├── readAsDataURL.js │ ├── readAsText.js │ ├── readEntries.js │ ├── remove.js │ ├── removeRecursively.js │ ├── requestAllFileSystems.js │ ├── requestAnimationFrame.js │ ├── requestFileSystem.js │ ├── resolveLocalFileSystemURI.js │ ├── setMetadata.js │ ├── truncate.js │ └── write.js │ ├── fileSystemPaths.js │ ├── fileSystems-roots.js │ ├── fileSystems.js │ ├── firefoxos │ └── FileSystem.js │ ├── ios │ └── FileSystem.js │ ├── requestFileSystem.js │ ├── resolveLocalFileSystemURI.js │ ├── ubuntu │ ├── FileSystem.js │ ├── FileWriter.js │ └── fileSystems-roots.js │ └── wp │ └── FileUploadOptions.js ├── scss └── ionic.app.scss └── www ├── css └── style.css ├── img └── ionic.png ├── index.html ├── js ├── app.js └── controllers.js ├── lib ├── angular-animate │ ├── .bower.json │ ├── README.md │ ├── angular-animate.js │ ├── angular-animate.min.js │ ├── angular-animate.min.js.map │ ├── bower.json │ └── package.json ├── angular-sanitize │ ├── .bower.json │ ├── README.md │ ├── angular-sanitize.js │ ├── angular-sanitize.min.js │ ├── angular-sanitize.min.js.map │ ├── bower.json │ └── package.json ├── angular-ui-router │ ├── .bower.json │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── api │ │ └── angular-ui-router.d.ts │ ├── bower.json │ ├── release │ │ ├── angular-ui-router.js │ │ └── angular-ui-router.min.js │ └── src │ │ ├── common.js │ │ ├── resolve.js │ │ ├── state.js │ │ ├── stateDirectives.js │ │ ├── stateFilters.js │ │ ├── templateFactory.js │ │ ├── urlMatcherFactory.js │ │ ├── urlRouter.js │ │ ├── view.js │ │ ├── viewDirective.js │ │ └── viewScroll.js ├── angular │ ├── .bower.json │ ├── README.md │ ├── angular-csp.css │ ├── angular.js │ ├── angular.min.js │ ├── angular.min.js.gzip │ ├── angular.min.js.map │ ├── bower.json │ └── package.json ├── ionic │ ├── .bower.json │ ├── README.md │ ├── bower.json │ ├── css │ │ ├── ionic.css │ │ └── ionic.min.css │ ├── fonts │ │ ├── ionicons.eot │ │ ├── ionicons.svg │ │ ├── ionicons.ttf │ │ └── ionicons.woff │ ├── 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 │ │ ├── _transitions.scss │ │ ├── _type.scss │ │ ├── _util.scss │ │ ├── _variables.scss │ │ ├── ionic.scss │ │ └── ionicons │ │ ├── _ionicons-animation.scss │ │ ├── _ionicons-font.scss │ │ ├── _ionicons-icons.scss │ │ ├── _ionicons-variables.scss │ │ └── ionicons.scss └── ngCordova │ ├── .bower.json │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── dist │ ├── ng-cordova-mocks.js │ ├── ng-cordova-mocks.min.js │ ├── ng-cordova.js │ └── ng-cordova.min.js │ └── package.json └── templates ├── browse.html ├── login.html ├── menu.html ├── playlist.html ├── playlists.html └── search.html /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### 简介intro 2 | 这个项目是使用ionic和ngCordova创建的文件选择上传的实例项目,已经在Android 4.4 和 ios 8.1 测试通过。 3 | 详细介绍参考我的博客:[4.1 ionic文件选择与上传](http://www.haomou.net/2015/01/07/2015_ionic_fileOP/ ) 4 | http://www.haomou.net/2015/01/07/2015_ionic_fileOP/ 5 | 6 | ### 皓眸IT 7 | 8 | 使用ionic开发Hybrid 混合应用,请关注我的博客:http://www.haomou.net -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myApp", 3 | "private": "true", 4 | "devDependencies": { 5 | "ionic": "driftyco/ionic-bower#1.0.0-beta.14" 6 | } 7 | } -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | myApp 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 | -------------------------------------------------------------------------------- /ionic.project: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myApp", 3 | "app_id": "" 4 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myapp", 3 | "version": "1.0.0", 4 | "description": "myApp: 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 | } -------------------------------------------------------------------------------- /plugins/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/.DS_Store -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"registry","id":"com.ionic.keyboard"}} -------------------------------------------------------------------------------- /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 | "license": "Apache 2.0", 7 | "repo": "https://github.com/driftyco/ionic-plugins-keyboard.git", 8 | "issue": "https://github.com/driftyco/ionic-plugins-keyboard/issues", 9 | "keywords": [ 10 | "Ionic", 11 | "keyboard" 12 | ], 13 | "platforms": [ 14 | "android", 15 | "ios" 16 | ], 17 | "engines": [] 18 | } -------------------------------------------------------------------------------- /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/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/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/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/com.synconset.imagepicker/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"git","url":"https://github.com/wymsee/cordova-imagePicker.git","subdir":"."}} -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/BSD_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, David Erosa 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 CSullivan102 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/anim/image_pop_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-hdpi/image_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-hdpi/image_bg.9.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-hdpi/loading_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-hdpi/loading_icon.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_action_discard_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_action_discard_dark.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_action_discard_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_action_discard_light.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_action_done_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_action_done_dark.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_action_done_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_action_done_light.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_action_discard_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_action_discard_dark.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_action_discard_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_action_discard_light.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_action_done_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_action_done_dark.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_action_done_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_action_done_light.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/android/Library/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/drawable/grid_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/layout/actionbar_custom_view_done_discard.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/layout/actionbar_discard_button.xml: -------------------------------------------------------------------------------- 1 | 16 | 22 | 33 | 34 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/layout/actionbar_done_button.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 23 | 24 | 34 | 35 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/layout/multiselectorgrid.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 22 | 23 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/values-de/multiimagechooser_strings_de.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MultiImageChooser 4 | Free version - Images left: %d 5 | There was an error opening the images database. Please report the problem. 6 | Requesting thumbnails, please be patient 7 | 8 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/values-es/multiimagechooser_strings_es.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MultiImageChooser 4 | Solicitando miniaturas. Por favor, espere… 5 | Versión gratuita - Imágenes restantes: %d 6 | Error al abrir la base de datos de imágenes. 7 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/values-fr/multiimagechooser_strings_fr.xml: -------------------------------------------------------------------------------- 1 | 2 | "MultiImageChooser" 3 | "La version gratuite - gauche Images:%d" 4 | "Il y avait une erreur d'ouvrir la base de données images. S'il vous plaît signaler le problème." 5 | "Demande de vignettes, s'il vous plaît soyez patient" 6 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MultiImageChooser 4 | 5 | Ingyenes verzió - hátralévő képek: %d 6 | Képadatbázis megnyitási hiba történt. Kérjük, jelentse a problémát. 7 | Miniatűrök lekérése, kérjük legyen türelemmel 8 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/values-ja/multiimagechooser_strings_ja.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MultiImageChooser 4 | 無料版 - 残りの画像: %d 5 | 画像データベースを開く際にエラーがありました。問題を報告してください。 6 | サムネイルをリクエスト中です。お待ちください。 7 | 8 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/values-ko/multiimagechooser_strings_ko.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MultiImageChooser 4 | 무료 버전 - 남은 이미지: %d 5 | 이미지 데이터베이스를 여는 데 오류가 발생했습니다. 문제를 보고하세요. 6 | 썸네일 요청 중. 기다려주세요 7 | 8 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/values/multiimagechooser_strings_en.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MultiImageChooser 4 | Free version - Images left: %d 5 | There was an error opening the images database. Please report the problem. 6 | Requesting thumbnails, please be patient 7 | Cancel 8 | OK 9 | 10 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/Library/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/android/com/synconset/ImagePicker/FakeR.java: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License 3 | 4 | Copyright (c) 2010 Matt Kane 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | Code taken from: https://github.com/wildabeast/BarcodeScanner 13 | */ 14 | package com.synconset; 15 | 16 | import android.app.Activity; 17 | import android.content.Context; 18 | 19 | /** 20 | * R replacement for PhoneGap Build. 21 | * 22 | * ([^.\w])R\.(\w+)\.(\w+) 23 | * $1fakeR("$2", "$3") 24 | * 25 | * @author Maciej Nux Jaros 26 | */ 27 | public class FakeR { 28 | private Context context; 29 | private String packageName; 30 | 31 | public FakeR(Activity activity) { 32 | context = activity.getApplicationContext(); 33 | packageName = context.getPackageName(); 34 | } 35 | 36 | public FakeR(Context context) { 37 | this.context = context; 38 | packageName = context.getPackageName(); 39 | } 40 | 41 | public int getId(String group, String key) { 42 | return context.getResources().getIdentifier(key, group, packageName); 43 | } 44 | 45 | public static int getId(Context context, String group, String key) { 46 | return context.getResources().getIdentifier(key, group, context.getPackageName()); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/ELCAlbumPickerController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlbumPickerController.h 3 | // 4 | // Created by ELC on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | #import "ELCAssetSelectionDelegate.h" 11 | #import "ELCAssetPickerFilterDelegate.h" 12 | 13 | @interface ELCAlbumPickerController : UITableViewController 14 | 15 | @property (nonatomic, weak) id parent; 16 | @property (nonatomic, strong) NSMutableArray *assetGroups; 17 | @property (nonatomic, assign) BOOL singleSelection; 18 | @property (nonatomic, assign) BOOL immediateReturn; 19 | 20 | // optional, can be used to filter the assets displayed 21 | @property (nonatomic, weak) id assetPickerFilterDelegate; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/ELCAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // Asset.h 3 | // 4 | // Created by ELC on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @class ELCAsset; 12 | 13 | @protocol ELCAssetDelegate 14 | 15 | @optional 16 | - (void)assetSelected:(ELCAsset *)asset; 17 | - (BOOL)shouldSelectAsset:(ELCAsset *)asset; 18 | @end 19 | 20 | 21 | @interface ELCAsset : NSObject 22 | 23 | @property (nonatomic, strong) ALAsset *asset; 24 | @property (nonatomic, weak) id parent; 25 | @property (nonatomic, assign) BOOL selected; 26 | 27 | - (id)initWithAsset:(ALAsset *)asset; 28 | 29 | @end -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/ELCAsset.m: -------------------------------------------------------------------------------- 1 | // 2 | // Asset.m 3 | // 4 | // Created by ELC on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import "ELCAsset.h" 9 | #import "ELCAssetTablePicker.h" 10 | 11 | @implementation ELCAsset 12 | 13 | //Using auto synthesizers 14 | 15 | - (id)initWithAsset:(ALAsset*)asset 16 | { 17 | self = [super init]; 18 | if (self) { 19 | self.asset = asset; 20 | _selected = NO; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)toggleSelection 26 | { 27 | self.selected = !self.selected; 28 | } 29 | 30 | - (void)setSelected:(BOOL)selected 31 | { 32 | if (selected) { 33 | if ([_parent respondsToSelector:@selector(shouldSelectAsset:)]) { 34 | if (![_parent shouldSelectAsset:self]) { 35 | return; 36 | } 37 | } 38 | } 39 | _selected = selected; 40 | if (selected) { 41 | if (_parent != nil && [_parent respondsToSelector:@selector(assetSelected:)]) { 42 | [_parent assetSelected:self]; 43 | } 44 | } 45 | } 46 | 47 | 48 | @end 49 | 50 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/ELCAssetCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // AssetCell.h 3 | // 4 | // Created by ELC on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface ELCAssetCell : UITableViewCell 12 | 13 | - (void)setAssets:(NSArray *)assets; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/ELCAssetPickerFilterDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ELCAssetPickerFilterDelegate.h 3 | 4 | @class ELCAsset; 5 | @class ELCAssetTablePicker; 6 | 7 | @protocol ELCAssetPickerFilterDelegate 8 | 9 | // respond YES/NO to filter out (not show the asset) 10 | -(BOOL)assetTablePicker:(ELCAssetTablePicker *)picker isAssetFilteredOut:(ELCAsset *)elcAsset; 11 | 12 | @end -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/ELCAssetSelectionDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ELCAssetSelectionDelegate.h 3 | // ELCImagePickerDemo 4 | // 5 | // Created by JN on 9/6/12. 6 | // Copyright (c) 2012 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ELCAsset; 12 | 13 | @protocol ELCAssetSelectionDelegate 14 | 15 | - (void)selectedAssets:(NSArray *)assets; 16 | - (BOOL)shouldSelectAsset:(ELCAsset *)asset previousCount:(NSUInteger)previousCount; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/ELCAssetTablePicker.h: -------------------------------------------------------------------------------- 1 | // 2 | // ELCAssetTablePicker.h 3 | // 4 | // Created by ELC on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | #import "ELCAsset.h" 11 | #import "ELCAssetSelectionDelegate.h" 12 | #import "ELCAssetPickerFilterDelegate.h" 13 | 14 | @interface ELCAssetTablePicker : UITableViewController 15 | 16 | @property (nonatomic, weak) id parent; 17 | @property (nonatomic, strong) ALAssetsGroup *assetGroup; 18 | @property (nonatomic, strong) NSMutableArray *elcAssets; 19 | @property (nonatomic, strong) IBOutlet UILabel *selectedAssetsLabel; 20 | @property (nonatomic, assign) BOOL singleSelection; 21 | @property (nonatomic, assign) BOOL immediateReturn; 22 | 23 | // optional, can be used to filter the assets displayed 24 | @property(nonatomic, weak) id assetPickerFilterDelegate; 25 | 26 | - (int)totalSelectedAssets; 27 | - (void)preparePhotos; 28 | 29 | - (void)doneAction:(id)sender; 30 | 31 | @end -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/ELCImagePickerController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ELCImagePickerController.h 3 | // ELCImagePickerDemo 4 | // 5 | // Created by ELC on 9/9/10. 6 | // Copyright 2010 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ELCAssetSelectionDelegate.h" 11 | 12 | @class ELCImagePickerController; 13 | @class ELCAlbumPickerController; 14 | 15 | @protocol ELCImagePickerControllerDelegate 16 | 17 | /** 18 | * Called with the picker the images were selected from, as well as an array of dictionary's 19 | * containing keys for ALAssetPropertyLocation, ALAssetPropertyType, 20 | * UIImagePickerControllerOriginalImage, and UIImagePickerControllerReferenceURL. 21 | * @param picker 22 | * @param info An NSArray containing dictionary's with the key UIImagePickerControllerOriginalImage, which is a rotated, and sized for the screen 'default representation' of the image selected. If you want to get the original image, use the UIImagePickerControllerReferenceURL key. 23 | */ 24 | - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info; 25 | 26 | /** 27 | * Called when image selection was cancelled, by tapping the 'Cancel' BarButtonItem. 28 | */ 29 | - (void)elcImagePickerControllerDidCancel:(ELCImagePickerController *)picker; 30 | 31 | @end 32 | 33 | @interface ELCImagePickerController : UINavigationController 34 | 35 | @property (nonatomic, weak) id imagePickerDelegate; 36 | @property (nonatomic, assign) NSInteger maximumImagesCount; 37 | 38 | /** 39 | * YES if the picker should return the original image, 40 | * or NO for an image suitable for displaying full screen on the device. 41 | */ 42 | @property (nonatomic, assign) BOOL returnsOriginalImage; 43 | 44 | - (id)initImagePicker; 45 | - (void)cancelImagePicker; 46 | 47 | @end 48 | 49 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/Resources/Overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/Resources/Overlay.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/Resources/Overlay@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/com.synconset.imagepicker/src/ios/ELCImagePicker/Resources/Overlay@2x.png -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/src/ios/SOSPicker.h: -------------------------------------------------------------------------------- 1 | // 2 | // SOSPicker.h 3 | // SyncOnSet 4 | // 5 | // Created by Christopher Sullivan on 10/25/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "ELCAlbumPickerController.h" 11 | #import "ELCImagePickerController.h" 12 | 13 | @interface SOSPicker : CDVPlugin 14 | 15 | @property (copy) NSString* callbackId; 16 | 17 | - (void) getPictures:(CDVInvokedUrlCommand *)command; 18 | - (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage toSize:(CGSize)frameSize; 19 | 20 | @property (nonatomic, assign) NSInteger width; 21 | @property (nonatomic, assign) NSInteger height; 22 | @property (nonatomic, assign) NSInteger quality; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /plugins/com.synconset.imagepicker/www/imagepicker.js: -------------------------------------------------------------------------------- 1 | /*global cordova,window,console*/ 2 | /** 3 | * An Image Picker plugin for Cordova 4 | * 5 | * Developed by Wymsee for Sync OnSet 6 | */ 7 | 8 | var ImagePicker = function() { 9 | 10 | }; 11 | 12 | /* 13 | * success - success callback 14 | * fail - error callback 15 | * options 16 | * .maximumImagesCount - max images to be selected, defaults to 15. If this is set to 1, 17 | * upon selection of a single image, the plugin will return it. 18 | * .width - width to resize image to (if one of height/width is 0, will resize to fit the 19 | * other while keeping aspect ratio, if both height and width are 0, the full size 20 | * image will be returned) 21 | * .height - height to resize image to 22 | * .quality - quality of resized image, defaults to 100 23 | */ 24 | ImagePicker.prototype.getPictures = function(success, fail, options) { 25 | if (!options) { 26 | options = {}; 27 | } 28 | 29 | var params = { 30 | maximumImagesCount: options.maximumImagesCount ? options.maximumImagesCount : 15, 31 | width: options.width ? options.width : 0, 32 | height: options.height ? options.height : 0, 33 | quality: options.quality ? options.quality : 100 34 | }; 35 | 36 | return cordova.exec(success, fail, "ImagePicker", "getPictures", [params]); 37 | }; 38 | 39 | window.imagePicker = new ImagePicker(); 40 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"registry","id":"org.apache.cordova.console"}} -------------------------------------------------------------------------------- /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 | 56 | ### 0.2.11 (Sep 17, 2014) 57 | * CB-7249 cordova-plugin-console documentation translation 58 | 59 | ### 0.2.12 (Dec 02, 2014) 60 | * CB-7977 Mention `deviceready` in plugin docs 61 | * CB-7700 cordova-plugin-console documentation translation: cordova-plugin-console 62 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/de/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Dieses Plugin stellt sicher, dass der Befehl console.log() so hilfreich ist, wie er sein kann. Es fügt zusätzliche Funktion für iOS, Ubuntu, Windows Phone 8 und Windows 8 hinzu. Teilweise kann es vorkommen, dass der Befehl console.log() nicht korrekt erkannt wird, und es zu Fehlern bzw. zu nicht angezeigten Logs in der Console kommt. Wenn Sie mit der derzeitigen Funktionsweise zufrieden sind, kann es sein, dass Sie dieses Plugin nicht benötigen. 23 | 24 | ## Installation 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android Eigenarten 30 | 31 | Auf einigen anderen Plattformen als Android reagiert der Befehl console.log ("1", "2", "3") auf mehrere Befehle. In diesem Fall 1, 2 und 3. Android wird jedoch nur auf das erste Argument (1) reagieren. Nachfolgende Argumente zu console.log() (2 und 3) werden ignoriert. Dafür ist aber nicht dieses Plugin verantwortlich! Es ist eine Limitierung die von Android kommt und nicht von diesem Plugin beeinflusst werden kann. -------------------------------------------------------------------------------- /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 | This plugin defines a global `console` object. 28 | 29 | Although the object is in the global scope, features provided by this plugin 30 | are not available until after the `deviceready` event. 31 | 32 | document.addEventListener("deviceready", onDeviceReady, false); 33 | function onDeviceReady() { 34 | console.log("console.log works well"); 35 | } 36 | 37 | ## Installation 38 | 39 | cordova plugin add org.apache.cordova.console 40 | 41 | ### Android Quirks 42 | 43 | On some platforms other than Android, console.log() will act on multiple 44 | arguments, such as console.log("1", "2", "3"). However, Android will act only 45 | on the first argument. Subsequent arguments to console.log() will be ignored. 46 | This plugin is not the cause of that, it is a limitation of Android itself. 47 | -------------------------------------------------------------------------------- /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 | ## Instalacja 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Dziwactwa Androida 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/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":"registry","id":"org.apache.cordova.device"}} -------------------------------------------------------------------------------- /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/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/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/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.file-transfer/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/org.apache.cordova.file-transfer/.DS_Store -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file-transfer/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"registry","id":"org.apache.cordova.file-transfer"}} -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file-transfer/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.file-transfer/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 | 7 | This product includes a copy of OkHttp from: 8 | https://github.com/square/okhttp 9 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file-transfer/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.file-transfer 21 | 22 | Plugin documentation: [doc/index.md](doc/index.md) 23 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file-transfer/src/android/FileProgressResult.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.filetransfer; 20 | 21 | import org.json.JSONException; 22 | import org.json.JSONObject; 23 | 24 | /** 25 | * Encapsulates in-progress status of uploading or downloading a file to a remote server. 26 | */ 27 | public class FileProgressResult { 28 | 29 | private boolean lengthComputable = false; // declares whether total is known 30 | private long loaded = 0; // bytes sent so far 31 | private long total = 0; // bytes total, if known 32 | 33 | public boolean getLengthComputable() { 34 | return lengthComputable; 35 | } 36 | 37 | public void setLengthComputable(boolean computable) { 38 | this.lengthComputable = computable; 39 | } 40 | 41 | public long getLoaded() { 42 | return loaded; 43 | } 44 | 45 | public void setLoaded(long bytes) { 46 | this.loaded = bytes; 47 | } 48 | 49 | public long getTotal() { 50 | return total; 51 | } 52 | 53 | public void setTotal(long bytes) { 54 | this.total = bytes; 55 | } 56 | 57 | public JSONObject toJSONObject() throws JSONException { 58 | return new JSONObject( 59 | "{loaded:" + loaded + 60 | ",total:" + total + 61 | ",lengthComputable:" + (lengthComputable ? "true" : "false") + "}"); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file-transfer/tests/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 25 | Cordova File Transfer Plugin Tests 26 | Apache 2.0 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file-transfer/www/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/plugins/org.apache.cordova.file-transfer/www/.DS_Store -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file-transfer/www/FileTransferError.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 | * FileTransferError 24 | * @constructor 25 | */ 26 | var FileTransferError = function(code, source, target, status, body, exception) { 27 | this.code = code || null; 28 | this.source = source || null; 29 | this.target = target || null; 30 | this.http_status = status || null; 31 | this.body = body || null; 32 | this.exception = exception || null; 33 | }; 34 | 35 | FileTransferError.FILE_NOT_FOUND_ERR = 1; 36 | FileTransferError.INVALID_URL_ERR = 2; 37 | FileTransferError.CONNECTION_ERR = 3; 38 | FileTransferError.ABORT_ERR = 4; 39 | FileTransferError.NOT_MODIFIED_ERR = 5; 40 | 41 | module.exports = FileTransferError; 42 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file-transfer/www/blackberry10/FileTransferProxy.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 | * FileTransferProxy 24 | * 25 | * Register all FileTransfer exec calls to be handled by proxy 26 | */ 27 | 28 | var xhrFileTransfer = require('org.apache.cordova.file-transfer.xhrFileTransfer'); 29 | 30 | module.exports = { 31 | abort: xhrFileTransfer.abort, 32 | download: xhrFileTransfer.download, 33 | upload: xhrFileTransfer.upload 34 | }; 35 | 36 | require('cordova/exec/proxy').add('FileTransfer', module.exports); 37 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"registry","id":"org.apache.cordova.file"}} -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/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.file/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.file/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.file 21 | 22 | Plugin documentation: [doc/index.md](doc/index.md) -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/src/android/EncodingException.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 | 20 | package org.apache.cordova.file; 21 | 22 | @SuppressWarnings("serial") 23 | public class EncodingException extends Exception { 24 | 25 | public EncodingException(String message) { 26 | super(message); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/src/android/FileExistsException.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 | 20 | package org.apache.cordova.file; 21 | 22 | @SuppressWarnings("serial") 23 | public class FileExistsException extends Exception { 24 | 25 | public FileExistsException(String msg) { 26 | super(msg); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/src/android/InvalidModificationException.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 | 20 | 21 | package org.apache.cordova.file; 22 | 23 | @SuppressWarnings("serial") 24 | public class InvalidModificationException extends Exception { 25 | 26 | public InvalidModificationException(String message) { 27 | super(message); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/src/android/NoModificationAllowedException.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 | 20 | package org.apache.cordova.file; 21 | 22 | @SuppressWarnings("serial") 23 | public class NoModificationAllowedException extends Exception { 24 | 25 | public NoModificationAllowedException(String message) { 26 | super(message); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/src/android/TypeMismatchException.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 | 20 | 21 | package org.apache.cordova.file; 22 | 23 | @SuppressWarnings("serial") 24 | public class TypeMismatchException extends Exception { 25 | 26 | public TypeMismatchException(String message) { 27 | super(message); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/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 | module.exports = { 22 | setSandbox : function (success, fail, args, env) { 23 | require("lib/webview").setSandbox(JSON.parse(decodeURIComponent(args[0]))); 24 | new PluginResult(args, env).ok(); 25 | }, 26 | 27 | getHomePath: function (success, fail, args, env) { 28 | var homeDir = window.qnx.webplatform.getApplication().getEnv("HOME"); 29 | new PluginResult(args, env).ok(homeDir); 30 | }, 31 | 32 | requestAllPaths: function (success, fail, args, env) { 33 | var homeDir = 'file://' + window.qnx.webplatform.getApplication().getEnv("HOME").replace('/data', ''), 34 | paths = { 35 | applicationDirectory: homeDir + '/app/native/', 36 | applicationStorageDirectory: homeDir + '/', 37 | dataDirectory: homeDir + '/data/webviews/webfs/persistent/local__0/', 38 | cacheDirectory: homeDir + '/data/webviews/webfs/temporary/local__0/', 39 | externalRootDirectory: 'file:///accounts/1000/removable/sdcard/', 40 | sharedDirectory: homeDir + '/shared/' 41 | }; 42 | success(paths); 43 | } 44 | }; 45 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/src/ios/CDVAssetLibraryFilesystem.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 "CDVFile.h" 21 | 22 | extern NSString* const kCDVAssetsLibraryPrefix; 23 | extern NSString* const kCDVAssetsLibraryScheme; 24 | 25 | @interface CDVAssetLibraryFilesystem : NSObject { 26 | } 27 | 28 | - (id) initWithName:(NSString *)name; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/src/ios/CDVLocalFilesystem.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 "CDVFile.h" 21 | 22 | @interface CDVLocalFilesystem : NSObject { 23 | NSString *_name; 24 | NSString *_fsRoot; 25 | } 26 | 27 | - (id) initWithName:(NSString *)name root:(NSString *)fsRoot; 28 | + (NSString*)getMimeTypeFromPath:(NSString*)fullPath; 29 | 30 | @property (nonatomic,strong) NSString *fsRoot; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/tests/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 26 | 27 | Cordova File Plugin Tests 28 | Apache 2.0 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/FileError.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 | * FileError 24 | */ 25 | function FileError(error) { 26 | this.code = error || null; 27 | } 28 | 29 | // File error codes 30 | // Found in DOMException 31 | FileError.NOT_FOUND_ERR = 1; 32 | FileError.SECURITY_ERR = 2; 33 | FileError.ABORT_ERR = 3; 34 | 35 | // Added by File API specification 36 | FileError.NOT_READABLE_ERR = 4; 37 | FileError.ENCODING_ERR = 5; 38 | FileError.NO_MODIFICATION_ALLOWED_ERR = 6; 39 | FileError.INVALID_STATE_ERR = 7; 40 | FileError.SYNTAX_ERR = 8; 41 | FileError.INVALID_MODIFICATION_ERR = 9; 42 | FileError.QUOTA_EXCEEDED_ERR = 10; 43 | FileError.TYPE_MISMATCH_ERR = 11; 44 | FileError.PATH_EXISTS_ERR = 12; 45 | 46 | module.exports = FileError; 47 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/FileSystem.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 DirectoryEntry = require('./DirectoryEntry'); 23 | 24 | /** 25 | * An interface representing a file system 26 | * 27 | * @constructor 28 | * {DOMString} name the unique name of the file system (readonly) 29 | * {DirectoryEntry} root directory of the file system (readonly) 30 | */ 31 | var FileSystem = function(name, root) { 32 | this.name = name; 33 | if (root) { 34 | this.root = new DirectoryEntry(root.name, root.fullPath, this, root.nativeURL); 35 | } else { 36 | this.root = new DirectoryEntry(this.name, '/', this); 37 | } 38 | }; 39 | 40 | FileSystem.prototype.__format__ = function(fullPath) { 41 | return fullPath; 42 | }; 43 | 44 | FileSystem.prototype.toJSON = function() { 45 | return ""; 46 | }; 47 | 48 | module.exports = FileSystem; 49 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/FileUploadOptions.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 | * Options to customize the HTTP request used to upload files. 24 | * @constructor 25 | * @param fileKey {String} Name of file request parameter. 26 | * @param fileName {String} Filename to be used by the server. Defaults to image.jpg. 27 | * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg. 28 | * @param params {Object} Object with key: value params to send to the server. 29 | * @param headers {Object} Keys are header names, values are header values. Multiple 30 | * headers of the same name are not supported. 31 | */ 32 | var FileUploadOptions = function(fileKey, fileName, mimeType, params, headers, httpMethod) { 33 | this.fileKey = fileKey || null; 34 | this.fileName = fileName || null; 35 | this.mimeType = mimeType || null; 36 | this.params = params || null; 37 | this.headers = headers || null; 38 | this.httpMethod = httpMethod || null; 39 | }; 40 | 41 | module.exports = FileUploadOptions; 42 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/FileUploadResult.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 | * FileUploadResult 24 | * @constructor 25 | */ 26 | module.exports = function FileUploadResult(size, code, content) { 27 | this.bytesSent = size; 28 | this.responseCode = code; 29 | this.response = content; 30 | }; -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/Flags.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 | * Supplies arguments to methods that lookup or create files and directories. 24 | * 25 | * @param create 26 | * {boolean} file or directory if it doesn't exist 27 | * @param exclusive 28 | * {boolean} used with create; if true the command will fail if 29 | * target path exists 30 | */ 31 | function Flags(create, exclusive) { 32 | this.create = create || false; 33 | this.exclusive = exclusive || false; 34 | } 35 | 36 | module.exports = Flags; 37 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/LocalFileSystem.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.TEMPORARY = 0; 23 | exports.PERSISTENT = 1; 24 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/Metadata.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 | * Information about the state of the file or directory 24 | * 25 | * {Date} modificationTime (readonly) 26 | */ 27 | var Metadata = function(metadata) { 28 | if (typeof metadata == "object") { 29 | this.modificationTime = new Date(metadata.modificationTime); 30 | this.size = metadata.size || 0; 31 | } else if (typeof metadata == "undefined") { 32 | this.modificationTime = null; 33 | this.size = 0; 34 | } else { 35 | /* Backwards compatiblity with platforms that only return a timestamp */ 36 | this.modificationTime = new Date(metadata); 37 | } 38 | }; 39 | 40 | module.exports = Metadata; 41 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/android/FileSystem.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 | FILESYSTEM_PROTOCOL = "cdvfile"; 23 | 24 | module.exports = { 25 | __format__: function(fullPath) { 26 | if (this.name === 'content') { 27 | return 'content:/' + fullPath; 28 | } 29 | var path = ('/'+this.name+(fullPath[0]==='/'?'':'/')+encodeURI(fullPath)).replace('//','/'); 30 | return FILESYSTEM_PROTOCOL + '://localhost' + path; 31 | } 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/FileSystem.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 | * FileSystem 24 | * 25 | * Translate temporary / persistent / root file paths 26 | */ 27 | 28 | var info = require("org.apache.cordova.file.bb10FileSystemInfo"); 29 | 30 | module.exports = { 31 | __format__: function(fullPath) { 32 | switch (this.name) { 33 | case 'temporary': 34 | path = info.temporaryPath + fullPath; 35 | break; 36 | case 'persistent': 37 | path = info.persistentPath + fullPath; 38 | break; 39 | case 'root': 40 | path = 'file://' + fullPath; 41 | break; 42 | } 43 | return window.encodeURI(path); 44 | } 45 | }; 46 | 47 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/getFile.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 | * getFile 24 | * 25 | * IN: 26 | * args 27 | * 0 - local filesytem URI for the base directory to search 28 | * 1 - file to be created/returned; may be absolute path or relative path 29 | * 2 - options object 30 | * OUT: 31 | * success - FileEntry 32 | * fail - FileError code 33 | */ 34 | 35 | var resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'); 36 | 37 | module.exports = function (success, fail, args) { 38 | var uri = args[0] === "/" ? "" : args[0] + "/" + args[1], 39 | options = args[2], 40 | onSuccess = function (entry) { 41 | if (typeof(success) === 'function') { 42 | success(entry); 43 | } 44 | }, 45 | onFail = function (code) { 46 | if (typeof(fail) === 'function') { 47 | fail(code); 48 | } 49 | }; 50 | resolve(function (entry) { 51 | if (!entry.isFile) { 52 | onFail(FileError.TYPE_MISMATCH_ERR); 53 | } else { 54 | onSuccess(entry); 55 | } 56 | }, onFail, [uri, options]); 57 | }; 58 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/getFileMetadata.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 | * getFileMetadata 24 | * 25 | * IN: 26 | * args 27 | * 0 - local filesytem URI 28 | * OUT: 29 | * success - file 30 | * - name 31 | * - type 32 | * - lastModifiedDate 33 | * - size 34 | * fail - FileError code 35 | */ 36 | 37 | var resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'), 38 | requestAnimationFrame = cordova.require('org.apache.cordova.file.bb10RequestAnimationFrame'); 39 | 40 | module.exports = function (success, fail, args) { 41 | var uri = args[0], 42 | onSuccess = function (entry) { 43 | if (typeof(success) === 'function') { 44 | success(entry); 45 | } 46 | }, 47 | onFail = function (error) { 48 | if (typeof(fail) === 'function') { 49 | if (error.code) { 50 | fail(error.code); 51 | } else { 52 | fail(error); 53 | } 54 | } 55 | }; 56 | resolve(function (entry) { 57 | requestAnimationFrame(function () { 58 | if (entry.nativeEntry.file) { 59 | entry.nativeEntry.file(onSuccess, onFail); 60 | } else { 61 | entry.nativeEntry.getMetadata(onSuccess, onFail); 62 | } 63 | }); 64 | }, onFail, [uri]); 65 | }; 66 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/getMetadata.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 | * getMetadata 24 | * 25 | * IN: 26 | * args 27 | * 0 - local filesytem URI 28 | * OUT: 29 | * success - metadata 30 | * fail - FileError code 31 | */ 32 | 33 | var resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'); 34 | 35 | module.exports = function (success, fail, args) { 36 | var uri = args[0], 37 | onSuccess = function (entry) { 38 | if (typeof(success) === 'function') { 39 | success(entry); 40 | } 41 | }, 42 | onFail = function (error) { 43 | if (typeof(fail) === 'function') { 44 | if (error.code) { 45 | fail(error.code); 46 | } else { 47 | fail(error); 48 | } 49 | } 50 | }; 51 | resolve(function (entry) { 52 | entry.nativeEntry.getMetadata(onSuccess, onFail); 53 | }, onFail, [uri]); 54 | }; 55 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/getParent.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 | * getParent 24 | * 25 | * IN: 26 | * args 27 | * 0 - local filesytem URI 28 | * OUT: 29 | * success - DirectoryEntry of parent 30 | * fail - FileError code 31 | */ 32 | 33 | var resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'), 34 | requestAnimationFrame = cordova.require('org.apache.cordova.file.bb10RequestAnimationFrame'); 35 | 36 | module.exports = function (success, fail, args) { 37 | var uri = args[0], 38 | onSuccess = function (entry) { 39 | if (typeof(success) === 'function') { 40 | success(entry); 41 | } 42 | }, 43 | onFail = function (error) { 44 | if (typeof(fail) === 'function') { 45 | if (error && error.code) { 46 | fail(error.code); 47 | } else { 48 | fail(error); 49 | } 50 | } 51 | }; 52 | resolve(function (entry) { 53 | requestAnimationFrame(function () { 54 | entry.nativeEntry.getParent(onSuccess, onFail); 55 | }); 56 | }, onFail, [uri]); 57 | }; 58 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/info.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 | * info 24 | * 25 | * persistentPath - full path to app sandboxed persistent storage 26 | * temporaryPath - full path to app sandboxed temporary storage 27 | * localPath - full path to app source (www dir) 28 | * MAX_SIZE - maximum size for filesystem request 29 | */ 30 | 31 | var info = { 32 | persistentPath: "", 33 | temporaryPath: "", 34 | localPath: "", 35 | MAX_SIZE: 64 * 1024 * 1024 * 1024 36 | }; 37 | 38 | cordova.exec( 39 | function (path) { 40 | info.persistentPath = 'file://' + path + '/webviews/webfs/persistent/local__0'; 41 | info.temporaryPath = 'file://' + path + '/webviews/webfs/temporary/local__0'; 42 | info.localPath = path.replace('/data', '/app/native'); 43 | }, 44 | function () { 45 | console.error('Unable to determine local storage file path'); 46 | }, 47 | 'File', 48 | 'getHomePath', 49 | false 50 | ); 51 | 52 | module.exports = info; 53 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/moveTo.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 | * moveTo 24 | * 25 | * IN: 26 | * args 27 | * 0 - URL of entry to move 28 | * 1 - URL of the directory into which to move the entry 29 | * 2 - the new name of the entry, defaults to the current name 30 | * OUT: 31 | * success - entry for the copied file or directory 32 | * fail - FileError 33 | */ 34 | 35 | var copy = cordova.require('org.apache.cordova.file.copyToProxy'); 36 | 37 | module.exports = function (success, fail, args) { 38 | copy(success, fail, args, true); 39 | }; 40 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/readAsDataURL.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 | * readAsDataURL 24 | * 25 | * IN: 26 | * args 27 | * 0 - URL of file to read 28 | * OUT: 29 | * success - DataURL representation of file contents 30 | * fail - FileError 31 | */ 32 | 33 | 34 | var resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'), 35 | requestAnimationFrame = cordova.require('org.apache.cordova.file.bb10RequestAnimationFrame'); 36 | 37 | module.exports = function (success, fail, args) { 38 | var uri = args[0], 39 | onSuccess = function (data) { 40 | if (typeof success === 'function') { 41 | success(data); 42 | } 43 | }, 44 | onFail = function (error) { 45 | if (typeof fail === 'function') { 46 | if (error && error.code) { 47 | fail(error.code); 48 | } else { 49 | fail(error); 50 | } 51 | } 52 | }; 53 | resolve(function (fs) { 54 | requestAnimationFrame(function () { 55 | fs.nativeEntry.file(function (file) { 56 | var reader = new FileReader()._realReader; 57 | reader.onloadend = function () { 58 | onSuccess(this.result); 59 | }; 60 | reader.onerror = onFail; 61 | reader.readAsDataURL(file); 62 | }, onFail); 63 | }); 64 | }, fail, [uri]); 65 | }; 66 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/remove.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 | * remove 24 | * 25 | * IN: 26 | * args 27 | * 0 - URL of Entry to remove 28 | * OUT: 29 | * success - (no args) 30 | * fail - FileError 31 | */ 32 | 33 | var resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'), 34 | requestAnimationFrame = cordova.require('org.apache.cordova.file.bb10RequestAnimationFrame'); 35 | 36 | module.exports = function (success, fail, args) { 37 | var uri = args[0], 38 | onSuccess = function (data) { 39 | if (typeof success === 'function') { 40 | success(data); 41 | } 42 | }, 43 | onFail = function (error) { 44 | if (typeof fail === 'function') { 45 | if (error && error.code) { 46 | fail(error.code); 47 | } else { 48 | fail(error); 49 | } 50 | } 51 | }; 52 | resolve(function (fs) { 53 | requestAnimationFrame(function () { 54 | if (fs.fullPath === '/') { 55 | onFail(FileError.NO_MODIFICATION_ALLOWED_ERR); 56 | } else { 57 | fs.nativeEntry.remove(onSuccess, onFail); 58 | } 59 | }); 60 | }, fail, [uri]); 61 | }; 62 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/removeRecursively.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 | * removeRecursively 24 | * 25 | * IN: 26 | * args 27 | * 0 - URL of DirectoryEntry to remove recursively 28 | * OUT: 29 | * success - (no args) 30 | * fail - FileError 31 | */ 32 | 33 | var resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'), 34 | requestAnimationFrame = cordova.require('org.apache.cordova.file.bb10RequestAnimationFrame'); 35 | 36 | module.exports = function (success, fail, args) { 37 | var uri = args[0], 38 | onSuccess = function (data) { 39 | if (typeof success === 'function') { 40 | success(data); 41 | } 42 | }, 43 | onFail = function (error) { 44 | if (typeof fail === 'function') { 45 | if (error.code) { 46 | if (error.code === FileError.INVALID_MODIFICATION_ERR) { 47 | //mobile-spec expects this error code 48 | fail(FileError.NO_MODIFICATION_ALLOWED_ERR); 49 | } else { 50 | fail(error.code); 51 | } 52 | } else { 53 | fail(error); 54 | } 55 | } 56 | }; 57 | resolve(function (fs) { 58 | requestAnimationFrame(function () { 59 | fs.nativeEntry.removeRecursively(onSuccess, onFail); 60 | }); 61 | }, fail, [uri]); 62 | }; 63 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/requestAllFileSystems.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 | * requestAllFileSystems 24 | * 25 | * IN - no arguments 26 | * OUT 27 | * success - Array of FileSystems 28 | * - filesystemName 29 | * - fullPath 30 | * - name 31 | * - nativeURL 32 | */ 33 | 34 | var info = require('org.apache.cordova.file.bb10FileSystemInfo'); 35 | 36 | module.exports = function (success, fail, args) { 37 | success([ 38 | { filesystemName: 'persistent', name: 'persistent', fullPath: '/', nativeURL: info.persistentPath + '/' }, 39 | { filesystemName: 'temporary', name: 'temporary', fullPath: '/', nativeURL: info.temporaryPath + '/' }, 40 | { filesystemName: 'root', name: 'root', fullPath: '/', nativeURL: 'file:///' } 41 | ]); 42 | } 43 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/requestAnimationFrame.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 | * requestAnimationFrame 24 | * 25 | * This is used throughout the BB10 File implementation to wrap 26 | * native webkit calls. There is a bug in the webkit implementation 27 | * which causes callbacks to never return when multiple file system 28 | * APIs are called in sequence. This should also make the UI more 29 | * responsive during file operations. 30 | * 31 | * Supported on BB10 OS > 10.1 32 | */ 33 | 34 | var requestAnimationFrame = window.requestAnimationFrame; 35 | if (typeof(requestAnimationFrame) !== 'function') { 36 | requestAnimationFrame = function (cb) { cb(); }; 37 | } 38 | module.exports = requestAnimationFrame; 39 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/requestFileSystem.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 | * requestFileSystem 24 | * 25 | * IN: 26 | * args 27 | * 0 - type (TEMPORARY = 0, PERSISTENT = 1) 28 | * 1 - size 29 | * OUT: 30 | * success - FileSystem object 31 | * - name - the human readable directory name 32 | * - root - DirectoryEntry object 33 | * - isDirectory 34 | * - isFile 35 | * - name 36 | * - fullPath 37 | * fail - FileError code 38 | */ 39 | 40 | var resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'); 41 | 42 | module.exports = function (success, fail, args) { 43 | var fsType = args[0] === 0 ? 'temporary' : 'persistent', 44 | size = args[1], 45 | onSuccess = function (fs) { 46 | var directory = { 47 | name: fsType, 48 | root: fs 49 | }; 50 | success(directory); 51 | }; 52 | resolve(onSuccess, fail, ['cdvfile://localhost/' + fsType + '/', undefined, size]); 53 | }; 54 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/blackberry10/setMetadata.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 | * setMetadata 24 | * 25 | * BB10 OS does not support setting file metadata via HTML5 File System 26 | */ 27 | 28 | module.exports = function (success, fail, args) { 29 | console.error("setMetadata not supported on BB10", arguments); 30 | if (typeof(fail) === 'function') { 31 | fail(); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/fileSystems-roots.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 | // Map of fsName -> FileSystem. 23 | var fsMap = null; 24 | var FileSystem = require('./FileSystem'); 25 | var exec = require('cordova/exec'); 26 | 27 | // Overridden by Android, BlackBerry 10 and iOS to populate fsMap. 28 | require('./fileSystems').getFs = function(name, callback) { 29 | if (fsMap) { 30 | callback(fsMap[name]); 31 | } else { 32 | exec(success, null, "File", "requestAllFileSystems", []); 33 | function success(response) { 34 | fsMap = {}; 35 | for (var i = 0; i < response.length; ++i) { 36 | var fsRoot = response[i]; 37 | var fs = new FileSystem(fsRoot.filesystemName, fsRoot); 38 | fsMap[fs.name] = fs; 39 | } 40 | callback(fsMap[name]); 41 | } 42 | } 43 | }; 44 | 45 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/fileSystems.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 | // Overridden by Android, BlackBerry 10 and iOS to populate fsMap. 23 | module.exports.getFs = function(name, callback) { 24 | callback(null); 25 | }; 26 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/firefoxos/FileSystem.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 | FILESYSTEM_PREFIX = "file:///"; 23 | 24 | module.exports = { 25 | __format__: function(fullPath) { 26 | return (FILESYSTEM_PREFIX + this.name + (fullPath[0] === '/' ? '' : '/') + encodeURI(fullPath)); 27 | } 28 | }; 29 | 30 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/ios/FileSystem.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 | FILESYSTEM_PROTOCOL = "cdvfile"; 23 | 24 | module.exports = { 25 | __format__: function(fullPath) { 26 | var path = ('/'+this.name+(fullPath[0]==='/'?'':'/')+encodeURI(fullPath)).replace('//','/'); 27 | return FILESYSTEM_PROTOCOL + '://localhost' + path; 28 | } 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/ubuntu/FileSystem.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 | FILESYSTEM_PROTOCOL = "cdvfile"; 23 | 24 | module.exports = { 25 | __format__: function(fullPath) { 26 | if (this.name === 'content') { 27 | return 'content:/' + fullPath; 28 | } 29 | var path = ('/' + this.name + (fullPath[0] === '/' ? '' : '/') + encodeURI(fullPath)).replace('//','/'); 30 | 31 | return FILESYSTEM_PROTOCOL + '://localhost' + path; 32 | } 33 | }; 34 | 35 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/ubuntu/fileSystems-roots.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 fsMap = null; 23 | var FileSystem = require('./FileSystem'); 24 | var LocalFileSystem = require('./LocalFileSystem'); 25 | var exec = require('cordova/exec'); 26 | 27 | var requestFileSystem = function(type, size, successCallback) { 28 | var success = function(file_system) { 29 | if (file_system) { 30 | if (successCallback) { 31 | fs = new FileSystem(file_system.name, file_system.root); 32 | successCallback(fs); 33 | } 34 | } 35 | }; 36 | exec(success, null, "File", "requestFileSystem", [type, size]); 37 | }; 38 | 39 | require('./fileSystems').getFs = function(name, callback) { 40 | if (fsMap) { 41 | callback(fsMap[name]); 42 | } else { 43 | requestFileSystem(LocalFileSystem.PERSISTENT, 1, function(fs) { 44 | requestFileSystem(LocalFileSystem.TEMPORARY, 1, function(tmp) { 45 | fsMap = {}; 46 | fsMap[tmp.name] = tmp; 47 | fsMap[fs.name] = fs; 48 | callback(fsMap[name]); 49 | }); 50 | }); 51 | } 52 | }; 53 | 54 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.file/www/wp/FileUploadOptions.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 | * Options to customize the HTTP request used to upload files. 24 | * @constructor 25 | * @param fileKey {String} Name of file request parameter. 26 | * @param fileName {String} Filename to be used by the server. Defaults to image.jpg. 27 | * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg. 28 | * @param params {Object} Object with key: value params to send to the server. 29 | */ 30 | var FileUploadOptions = function(fileKey, fileName, mimeType, params, headers, httpMethod) { 31 | this.fileKey = fileKey || null; 32 | this.fileName = fileName || null; 33 | this.mimeType = mimeType || null; 34 | this.headers = headers || null; 35 | this.httpMethod = httpMethod || null; 36 | 37 | if(params && typeof params != typeof "") { 38 | var arrParams = []; 39 | for(var v in params) { 40 | arrParams.push(v + "=" + params[v]); 41 | } 42 | this.params = encodeURIComponent(arrParams.join("&")); 43 | } 44 | else { 45 | this.params = params || null; 46 | } 47 | }; 48 | 49 | module.exports = FileUploadOptions; 50 | -------------------------------------------------------------------------------- /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: #387ef5 !default; 10 | $calm: #11c1f3 !default; 11 | $balanced: #33cd5f !default; 12 | $energized: #ffc900 !default; 13 | $assertive: #ef473a !default; 14 | $royal: #886aea !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/css/style.css: -------------------------------------------------------------------------------- 1 | /* Empty. Add your own CSS if you like */ 2 | -------------------------------------------------------------------------------- /www/img/ionic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/www/img/ionic.png -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /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 | // 'starter.controllers' is found in controllers.js 7 | angular.module('starter', ['ionic', 'starter.controllers','ngCordova']) 8 | 9 | .run(function($ionicPlatform) { 10 | $ionicPlatform.ready(function() { 11 | // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard 12 | // for form inputs) 13 | if (window.cordova && window.cordova.plugins.Keyboard) { 14 | cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); 15 | } 16 | if (window.StatusBar) { 17 | // org.apache.cordova.statusbar required 18 | StatusBar.styleDefault(); 19 | } 20 | }); 21 | }) 22 | 23 | .config(function($stateProvider, $urlRouterProvider) { 24 | $stateProvider 25 | 26 | .state('app', { 27 | url: "/app", 28 | abstract: true, 29 | templateUrl: "templates/menu.html", 30 | controller: 'AppCtrl' 31 | }) 32 | 33 | .state('app.search', { 34 | url: "/search", 35 | views: { 36 | 'menuContent': { 37 | templateUrl: "templates/search.html" 38 | } 39 | } 40 | }) 41 | 42 | .state('app.browse', { 43 | url: "/browse", 44 | views: { 45 | 'menuContent': { 46 | templateUrl: "templates/browse.html" 47 | } 48 | } 49 | }) 50 | .state('app.playlists', { 51 | url: "/playlists", 52 | views: { 53 | 'menuContent': { 54 | templateUrl: "templates/playlists.html", 55 | controller: 'PlaylistsCtrl' 56 | } 57 | } 58 | }) 59 | 60 | .state('app.single', { 61 | url: "/playlists/:playlistId", 62 | views: { 63 | 'menuContent': { 64 | templateUrl: "templates/playlist.html", 65 | controller: 'PlaylistCtrl' 66 | } 67 | } 68 | }); 69 | // if none of the above states are matched, use this as the fallback 70 | $urlRouterProvider.otherwise('/app/browse'); 71 | }); 72 | -------------------------------------------------------------------------------- /www/js/controllers.js: -------------------------------------------------------------------------------- 1 | angular.module('starter.controllers', []) 2 | .controller('AppCtrl', function ($scope, $ionicModal, $timeout, $cordovaImagePicker) { 3 | // Form data for the login modal 4 | $scope.loginData = {}; 5 | $scope.imgSrc = ""; 6 | // Create the login modal that we will use later 7 | $ionicModal.fromTemplateUrl('templates/login.html', { 8 | scope: $scope 9 | }).then(function (modal) { 10 | $scope.modal = modal; 11 | }); 12 | 13 | // Triggered in the login modal to close it 14 | $scope.closeLogin = function () { 15 | $scope.modal.hide(); 16 | }; 17 | 18 | // Open the login modal 19 | $scope.login = function () { 20 | $scope.modal.show(); 21 | }; 22 | 23 | //image picker 24 | $scope.pickImage = function () { 25 | 26 | console.log("haha"); 27 | 28 | var options = { 29 | maximumImagesCount: 1, 30 | width: 800, 31 | height: 800, 32 | quality: 80 33 | }; 34 | 35 | $cordovaImagePicker.getPictures(options) 36 | .then(function (results) { 37 | console.log(results); 38 | $scope.imgSrc = results[0]; 39 | }, function (error) { 40 | // error getting photos 41 | }); 42 | 43 | } 44 | 45 | // Perform the login action when the user submits the login form 46 | $scope.doLogin = function () { 47 | console.log('Doing login', $scope.loginData); 48 | 49 | // Simulate a login delay. Remove this and replace with your login 50 | // code if using a login system 51 | $timeout(function () { 52 | $scope.closeLogin(); 53 | }, 1000); 54 | }; 55 | }) 56 | 57 | .controller('PlaylistsCtrl', function ($scope) { 58 | $scope.playlists = [ 59 | { title: 'Reggae', id: 1 }, 60 | { title: 'Chill', id: 2 }, 61 | { title: 'Dubstep', id: 3 }, 62 | { title: 'Indie', id: 4 }, 63 | { title: 'Rap', id: 5 }, 64 | { title: 'Cowbell', id: 6 } 65 | ]; 66 | }) 67 | 68 | .controller('PlaylistCtrl', function ($scope, $stateParams) { 69 | }); 70 | -------------------------------------------------------------------------------- /www/lib/angular-animate/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-animate", 3 | "version": "1.3.6", 4 | "main": "./angular-animate.js", 5 | "ignore": [], 6 | "dependencies": { 7 | "angular": "1.3.6" 8 | }, 9 | "homepage": "https://github.com/angular/bower-angular-animate", 10 | "_release": "1.3.6", 11 | "_resolution": { 12 | "type": "version", 13 | "tag": "v1.3.6", 14 | "commit": "d38c9593911d231cce076c1b64f823e572813214" 15 | }, 16 | "_source": "git://github.com/angular/bower-angular-animate.git", 17 | "_target": "1.3.6", 18 | "_originalSource": "angular-animate" 19 | } -------------------------------------------------------------------------------- /www/lib/angular-animate/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-animate", 3 | "version": "1.3.6", 4 | "main": "./angular-animate.js", 5 | "ignore": [], 6 | "dependencies": { 7 | "angular": "1.3.6" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /www/lib/angular-animate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-animate", 3 | "version": "1.3.6", 4 | "description": "AngularJS module for animations", 5 | "main": "angular-animate.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/angular/angular.js.git" 12 | }, 13 | "keywords": [ 14 | "angular", 15 | "framework", 16 | "browser", 17 | "animation", 18 | "client-side" 19 | ], 20 | "author": "Angular Core Team ", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/angular/angular.js/issues" 24 | }, 25 | "homepage": "http://angularjs.org" 26 | } 27 | -------------------------------------------------------------------------------- /www/lib/angular-sanitize/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-sanitize", 3 | "version": "1.3.6", 4 | "main": "./angular-sanitize.js", 5 | "ignore": [], 6 | "dependencies": { 7 | "angular": "1.3.6" 8 | }, 9 | "homepage": "https://github.com/angular/bower-angular-sanitize", 10 | "_release": "1.3.6", 11 | "_resolution": { 12 | "type": "version", 13 | "tag": "v1.3.6", 14 | "commit": "ccd773f961fa1fadc8d728c45a2635c73d34fb2d" 15 | }, 16 | "_source": "git://github.com/angular/bower-angular-sanitize.git", 17 | "_target": "1.3.6", 18 | "_originalSource": "angular-sanitize" 19 | } -------------------------------------------------------------------------------- /www/lib/angular-sanitize/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-sanitize", 3 | "version": "1.3.6", 4 | "main": "./angular-sanitize.js", 5 | "ignore": [], 6 | "dependencies": { 7 | "angular": "1.3.6" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /www/lib/angular-sanitize/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-sanitize", 3 | "version": "1.3.6", 4 | "description": "AngularJS module for sanitizing HTML", 5 | "main": "angular-sanitize.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/angular/angular.js.git" 12 | }, 13 | "keywords": [ 14 | "angular", 15 | "framework", 16 | "browser", 17 | "html", 18 | "client-side" 19 | ], 20 | "author": "Angular Core Team ", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/angular/angular.js/issues" 24 | }, 25 | "homepage": "http://angularjs.org" 26 | } 27 | -------------------------------------------------------------------------------- /www/lib/angular-ui-router/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-ui-router", 3 | "version": "0.2.13", 4 | "main": "./release/angular-ui-router.js", 5 | "dependencies": { 6 | "angular": ">= 1.0.8" 7 | }, 8 | "ignore": [ 9 | "**/.*", 10 | "node_modules", 11 | "bower_components", 12 | "component.json", 13 | "package.json", 14 | "lib", 15 | "config", 16 | "sample", 17 | "test", 18 | "tests", 19 | "ngdoc_assets", 20 | "Gruntfile.js", 21 | "files.js" 22 | ], 23 | "homepage": "https://github.com/angular-ui/ui-router", 24 | "_release": "0.2.13", 25 | "_resolution": { 26 | "type": "version", 27 | "tag": "0.2.13", 28 | "commit": "c3d543aae43d4600512520a0d70723ac31f2cb62" 29 | }, 30 | "_source": "git://github.com/angular-ui/ui-router.git", 31 | "_target": "0.2.13", 32 | "_originalSource": "angular-ui-router" 33 | } -------------------------------------------------------------------------------- /www/lib/angular-ui-router/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2014 The AngularUI Team, Karsten Sperling 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /www/lib/angular-ui-router/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-ui-router", 3 | "version": "0.2.13", 4 | "main": "./release/angular-ui-router.js", 5 | "dependencies": { 6 | "angular": ">= 1.0.8" 7 | }, 8 | "ignore": [ 9 | "**/.*", 10 | "node_modules", 11 | "bower_components", 12 | "component.json", 13 | "package.json", 14 | "lib", 15 | "config", 16 | "sample", 17 | "test", 18 | "tests", 19 | "ngdoc_assets", 20 | "Gruntfile.js", 21 | "files.js" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /www/lib/angular-ui-router/src/stateFilters.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc filter 3 | * @name ui.router.state.filter:isState 4 | * 5 | * @requires ui.router.state.$state 6 | * 7 | * @description 8 | * Translates to {@link ui.router.state.$state#methods_is $state.is("stateName")}. 9 | */ 10 | $IsStateFilter.$inject = ['$state']; 11 | function $IsStateFilter($state) { 12 | var isFilter = function (state) { 13 | return $state.is(state); 14 | }; 15 | isFilter.$stateful = true; 16 | return isFilter; 17 | } 18 | 19 | /** 20 | * @ngdoc filter 21 | * @name ui.router.state.filter:includedByState 22 | * 23 | * @requires ui.router.state.$state 24 | * 25 | * @description 26 | * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}. 27 | */ 28 | $IncludedByStateFilter.$inject = ['$state']; 29 | function $IncludedByStateFilter($state) { 30 | var includesFilter = function (state) { 31 | return $state.includes(state); 32 | }; 33 | includesFilter.$stateful = true; 34 | return includesFilter; 35 | } 36 | 37 | angular.module('ui.router.state') 38 | .filter('isState', $IsStateFilter) 39 | .filter('includedByState', $IncludedByStateFilter); 40 | -------------------------------------------------------------------------------- /www/lib/angular-ui-router/src/view.js: -------------------------------------------------------------------------------- 1 | 2 | $ViewProvider.$inject = []; 3 | function $ViewProvider() { 4 | 5 | this.$get = $get; 6 | /** 7 | * @ngdoc object 8 | * @name ui.router.state.$view 9 | * 10 | * @requires ui.router.util.$templateFactory 11 | * @requires $rootScope 12 | * 13 | * @description 14 | * 15 | */ 16 | $get.$inject = ['$rootScope', '$templateFactory']; 17 | function $get( $rootScope, $templateFactory) { 18 | return { 19 | // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... }) 20 | /** 21 | * @ngdoc function 22 | * @name ui.router.state.$view#load 23 | * @methodOf ui.router.state.$view 24 | * 25 | * @description 26 | * 27 | * @param {string} name name 28 | * @param {object} options option object. 29 | */ 30 | load: function load(name, options) { 31 | var result, defaults = { 32 | template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {} 33 | }; 34 | options = extend(defaults, options); 35 | 36 | if (options.view) { 37 | result = $templateFactory.fromConfig(options.view, options.params, options.locals); 38 | } 39 | if (result && options.notify) { 40 | /** 41 | * @ngdoc event 42 | * @name ui.router.state.$state#$viewContentLoading 43 | * @eventOf ui.router.state.$view 44 | * @eventType broadcast on root scope 45 | * @description 46 | * 47 | * Fired once the view **begins loading**, *before* the DOM is rendered. 48 | * 49 | * @param {Object} event Event object. 50 | * @param {Object} viewConfig The view config properties (template, controller, etc). 51 | * 52 | * @example 53 | * 54 | *
55 |          * $scope.$on('$viewContentLoading',
56 |          * function(event, viewConfig){
57 |          *     // Access to all the view config properties.
58 |          *     // and one special property 'targetView'
59 |          *     // viewConfig.targetView
60 |          * });
61 |          * 
62 | */ 63 | $rootScope.$broadcast('$viewContentLoading', options); 64 | } 65 | return result; 66 | } 67 | }; 68 | } 69 | } 70 | 71 | angular.module('ui.router.state').provider('$view', $ViewProvider); 72 | -------------------------------------------------------------------------------- /www/lib/angular-ui-router/src/viewScroll.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc object 3 | * @name ui.router.state.$uiViewScrollProvider 4 | * 5 | * @description 6 | * Provider that returns the {@link ui.router.state.$uiViewScroll} service function. 7 | */ 8 | function $ViewScrollProvider() { 9 | 10 | var useAnchorScroll = false; 11 | 12 | /** 13 | * @ngdoc function 14 | * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll 15 | * @methodOf ui.router.state.$uiViewScrollProvider 16 | * 17 | * @description 18 | * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for 19 | * scrolling based on the url anchor. 20 | */ 21 | this.useAnchorScroll = function () { 22 | useAnchorScroll = true; 23 | }; 24 | 25 | /** 26 | * @ngdoc object 27 | * @name ui.router.state.$uiViewScroll 28 | * 29 | * @requires $anchorScroll 30 | * @requires $timeout 31 | * 32 | * @description 33 | * When called with a jqLite element, it scrolls the element into view (after a 34 | * `$timeout` so the DOM has time to refresh). 35 | * 36 | * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor, 37 | * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}. 38 | */ 39 | this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) { 40 | if (useAnchorScroll) { 41 | return $anchorScroll; 42 | } 43 | 44 | return function ($element) { 45 | $timeout(function () { 46 | $element[0].scrollIntoView(); 47 | }, 0, false); 48 | }; 49 | }]; 50 | } 51 | 52 | angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); 53 | -------------------------------------------------------------------------------- /www/lib/angular/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.3.6", 4 | "main": "./angular.js", 5 | "ignore": [], 6 | "dependencies": {}, 7 | "homepage": "https://github.com/angular/bower-angular", 8 | "_release": "1.3.6", 9 | "_resolution": { 10 | "type": "version", 11 | "tag": "v1.3.6", 12 | "commit": "a525f1199d44c2aa6d69b1900d4a2e950adc5752" 13 | }, 14 | "_source": "git://github.com/angular/bower-angular.git", 15 | "_target": "1.3.6", 16 | "_originalSource": "angular" 17 | } -------------------------------------------------------------------------------- /www/lib/angular/README.md: -------------------------------------------------------------------------------- 1 | # packaged angular 2 | 3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the 4 | [main AngularJS repo](https://github.com/angular/angular.js). 5 | Please file issues and pull requests against that repo. 6 | 7 | ## Install 8 | 9 | You can install this package either with `npm` or with `bower`. 10 | 11 | ### npm 12 | 13 | ```shell 14 | npm install angular 15 | ``` 16 | 17 | Then add a ` 21 | ``` 22 | 23 | Note that this package is not in CommonJS format, so doing `require('angular')` will return `undefined`. 24 | If you're using [Browserify](https://github.com/substack/node-browserify), you can use 25 | [exposify](https://github.com/thlorenz/exposify) to have `require('angular')` return the `angular` 26 | global. 27 | 28 | ### bower 29 | 30 | ```shell 31 | bower install angular 32 | ``` 33 | 34 | Then add a ` 38 | ``` 39 | 40 | ## Documentation 41 | 42 | Documentation is available on the 43 | [AngularJS docs site](http://docs.angularjs.org/). 44 | 45 | ## License 46 | 47 | The MIT License 48 | 49 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org 50 | 51 | Permission is hereby granted, free of charge, to any person obtaining a copy 52 | of this software and associated documentation files (the "Software"), to deal 53 | in the Software without restriction, including without limitation the rights 54 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 55 | copies of the Software, and to permit persons to whom the Software is 56 | furnished to do so, subject to the following conditions: 57 | 58 | The above copyright notice and this permission notice shall be included in 59 | all copies or substantial portions of the Software. 60 | 61 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 62 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 63 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 64 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 65 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 66 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 67 | THE SOFTWARE. 68 | -------------------------------------------------------------------------------- /www/lib/angular/angular-csp.css: -------------------------------------------------------------------------------- 1 | /* Include this file in your html if you are using the CSP mode. */ 2 | 3 | @charset "UTF-8"; 4 | 5 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], 6 | .ng-cloak, .x-ng-cloak, 7 | .ng-hide:not(.ng-hide-animate) { 8 | display: none !important; 9 | } 10 | 11 | ng\:form { 12 | display: block; 13 | } 14 | -------------------------------------------------------------------------------- /www/lib/angular/angular.min.js.gzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/www/lib/angular/angular.min.js.gzip -------------------------------------------------------------------------------- /www/lib/angular/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.3.6", 4 | "main": "./angular.js", 5 | "ignore": [], 6 | "dependencies": { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /www/lib/angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.3.6", 4 | "description": "HTML enhanced for web apps", 5 | "main": "angular.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/angular/angular.js.git" 12 | }, 13 | "keywords": [ 14 | "angular", 15 | "framework", 16 | "browser", 17 | "client-side" 18 | ], 19 | "author": "Angular Core Team ", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/angular/angular.js/issues" 23 | }, 24 | "homepage": "http://angularjs.org" 25 | } 26 | -------------------------------------------------------------------------------- /www/lib/ionic/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic", 3 | "version": "1.0.0-beta.14", 4 | "codename": "magnesium-mongoose", 5 | "homepage": "https://github.com/driftyco/ionic", 6 | "authors": [ 7 | "Max Lynch ", 8 | "Adam Bradley ", 9 | "Ben Sperry " 10 | ], 11 | "description": "Advanced HTML5 hybrid mobile app development framework.", 12 | "main": [ 13 | "css/ionic.css", 14 | "fonts/*", 15 | "js/ionic.js", 16 | "js/ionic-angular.js" 17 | ], 18 | "keywords": [ 19 | "mobile", 20 | "html5", 21 | "ionic", 22 | "cordova", 23 | "phonegap", 24 | "trigger", 25 | "triggerio", 26 | "angularjs", 27 | "angular" 28 | ], 29 | "license": "MIT", 30 | "private": false, 31 | "dependencies": { 32 | "angular": "1.3.6", 33 | "angular-animate": "1.3.6", 34 | "angular-sanitize": "1.3.6", 35 | "angular-ui-router": "0.2.13" 36 | }, 37 | "_release": "1.0.0-beta.14", 38 | "_resolution": { 39 | "type": "version", 40 | "tag": "v1.0.0-beta.14", 41 | "commit": "a6aa20bf5361b24bdbaeb34295a5f1c0e6aa609c" 42 | }, 43 | "_source": "git://github.com/driftyco/ionic-bower.git", 44 | "_target": "1.0.0-beta.14", 45 | "_originalSource": "driftyco/ionic-bower" 46 | } -------------------------------------------------------------------------------- /www/lib/ionic/README.md: -------------------------------------------------------------------------------- 1 | # ionic-bower 2 | 3 | Bower repository for [Ionic Framework](http://github.com/driftyco/ionic) 4 | 5 | ### Usage 6 | 7 | Include `js/ionic.bundle.js` to get ionic and all of its dependencies. 8 | 9 | Alternatively, include the individual ionic files with the dependencies separately. 10 | 11 | ### Versions 12 | 13 | To install the latest stable version, `bower install driftyco/ionic-bower#v1.0.0-beta.13` 14 | 15 | To install the latest nightly release, `bower install driftyco/ionic-bower#master` 16 | -------------------------------------------------------------------------------- /www/lib/ionic/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic", 3 | "version": "1.0.0-beta.14", 4 | "codename": "magnesium-mongoose", 5 | "homepage": "https://github.com/driftyco/ionic", 6 | "authors": [ 7 | "Max Lynch ", 8 | "Adam Bradley ", 9 | "Ben Sperry " 10 | ], 11 | "description": "Advanced HTML5 hybrid mobile app development framework.", 12 | "main": [ 13 | "css/ionic.css", 14 | "fonts/*", 15 | "js/ionic.js", 16 | "js/ionic-angular.js" 17 | ], 18 | "keywords": [ 19 | "mobile", 20 | "html5", 21 | "ionic", 22 | "cordova", 23 | "phonegap", 24 | "trigger", 25 | "triggerio", 26 | "angularjs", 27 | "angular" 28 | ], 29 | "license": "MIT", 30 | "private": false, 31 | "dependencies": { 32 | "angular": "1.3.6", 33 | "angular-animate": "1.3.6", 34 | "angular-sanitize": "1.3.6", 35 | "angular-ui-router": "0.2.13" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /www/lib/ionic/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/www/lib/ionic/fonts/ionicons.eot -------------------------------------------------------------------------------- /www/lib/ionic/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/www/lib/ionic/fonts/ionicons.ttf -------------------------------------------------------------------------------- /www/lib/ionic/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chalecao/ionic_fileOP_demo/7a9f8e4f775bbc32f3a1e72ad32d089a250752f8/www/lib/ionic/fonts/ionicons.woff -------------------------------------------------------------------------------- /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/_animations.scss: -------------------------------------------------------------------------------- 1 | 2 | // Slide up from the bottom, used for modals 3 | // ------------------------------- 4 | 5 | .slide-in-up { 6 | @include translate3d(0, 100%, 0); 7 | } 8 | .slide-in-up.ng-enter, 9 | .slide-in-up > .ng-enter { 10 | @include transition(all cubic-bezier(.1, .7, .1, 1) 400ms); 11 | } 12 | .slide-in-up.ng-enter-active, 13 | .slide-in-up > .ng-enter-active { 14 | @include translate3d(0, 0, 0); 15 | } 16 | 17 | .slide-in-up.ng-leave, 18 | .slide-in-up > .ng-leave { 19 | @include transition(all ease-in-out 250ms); 20 | } 21 | 22 | 23 | // Scale Out 24 | // Scale from hero (1 in this case) to zero 25 | // ------------------------------- 26 | 27 | @-webkit-keyframes scaleOut { 28 | from { -webkit-transform: scale(1); opacity: 1; } 29 | to { -webkit-transform: scale(0.8); opacity: 0; } 30 | } 31 | @keyframes scaleOut { 32 | from { transform: scale(1); opacity: 1; } 33 | to { transform: scale(0.8); opacity: 0; } 34 | } 35 | 36 | 37 | // Super Scale In 38 | // Scale from super (1.x) to duper (1 in this case) 39 | // ------------------------------- 40 | 41 | @-webkit-keyframes superScaleIn { 42 | from { -webkit-transform: scale(1.2); opacity: 0; } 43 | to { -webkit-transform: scale(1); opacity: 1 } 44 | } 45 | @keyframes superScaleIn { 46 | from { transform: scale(1.2); opacity: 0; } 47 | to { transform: scale(1); opacity: 1; } 48 | } 49 | -------------------------------------------------------------------------------- /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: $loading-backdrop-bg-color; 12 | 13 | visibility: hidden; 14 | opacity: 0; 15 | 16 | &.visible { 17 | visibility: visible; 18 | } 19 | &.active { 20 | opacity: 1; 21 | } 22 | 23 | @include transition($loading-backdrop-fadein-duration 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: $button-border-radius 0px 0px $button-border-radius; 49 | } 50 | &:last-child { 51 | border-right-width: 1px; 52 | border-radius: 0px $button-border-radius $button-border-radius 0px; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /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 | &:not(.visible) .icon { 25 | display: none; 26 | } 27 | &.visible { 28 | visibility: visible; 29 | } 30 | &.active { 31 | opacity: 1; 32 | } 33 | 34 | .loading { 35 | padding: $loading-padding; 36 | 37 | border-radius: $loading-border-radius; 38 | background-color: $loading-bg-color; 39 | 40 | color: $loading-text-color; 41 | 42 | text-align: center; 43 | text-overflow: ellipsis; 44 | font-size: $loading-font-size; 45 | 46 | h1, h2, h3, h4, h5, h6 { 47 | color: $loading-text-color; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /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 | .aside-open.aside-resizing .menu-right { 59 | display: none; 60 | } 61 | 62 | .menu-animated { 63 | @include transition-transform($menu-animation-speed ease); 64 | } 65 | -------------------------------------------------------------------------------- /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: $bar-height + $bar-subheader-height; 69 | } 70 | .has-tabs-top { 71 | top: $bar-height + $tabs-height; 72 | } 73 | .has-header.has-subheader.has-tabs-top { 74 | top: $bar-height + $bar-subheader-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 | .platform-ios.platform-cordova { 9 | // iOS7/8 has a status bar which sits on top of the header. 10 | // Bump down everything to make room for it. However, if 11 | // if its in Cordova, and set to fullscreen, then disregard the bump. 12 | &:not(.fullscreen) { 13 | .bar-header:not(.bar-subheader) { 14 | height: $bar-height + $ios-statusbar-height; 15 | 16 | &.item-input-inset .item-input-wrapper { 17 | margin-top: 19px !important; 18 | } 19 | 20 | > * { 21 | margin-top: $ios-statusbar-height; 22 | } 23 | } 24 | .tabs-top > .tabs, 25 | .tabs.tabs-top { 26 | top: $bar-height + $ios-statusbar-height; 27 | } 28 | 29 | .has-header, 30 | .bar-subheader { 31 | top: $bar-height + $ios-statusbar-height; 32 | } 33 | .has-subheader { 34 | top: $bar-height + $bar-subheader-height + $ios-statusbar-height; 35 | } 36 | .has-tabs-top { 37 | top: $bar-height + $tabs-height + $ios-statusbar-height; 38 | } 39 | .has-header.has-subheader.has-tabs-top { 40 | top: $bar-height + $bar-subheader-height + $tabs-height + $ios-statusbar-height; 41 | } 42 | } 43 | &.status-bar-hide { 44 | // Cordova doesn't adjust the body height correctly, this makes up for it 45 | margin-bottom: 20px; 46 | } 47 | } 48 | 49 | @media (orientation:landscape) { 50 | .platform-ios.platform-browser.platform-ipad { 51 | position: fixed; // required for iPad 7 Safari 52 | } 53 | } 54 | 55 | .platform-c:not(.enable-transitions) * { 56 | // disable transitions on grade-c devices (Android 2) 57 | -webkit-transition: none !important; 58 | transition: none !important; 59 | } 60 | -------------------------------------------------------------------------------- /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/_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/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 | 31 | // Forms 32 | "form", 33 | "checkbox", 34 | "toggle", 35 | "radio", 36 | "range", 37 | "select", 38 | "progress", 39 | 40 | // Buttons 41 | "button", 42 | "button-bar", 43 | 44 | // Util 45 | "grid", 46 | "util", 47 | "platform", 48 | 49 | // Animations 50 | "animations", 51 | "transitions"; 52 | -------------------------------------------------------------------------------- /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 | // must spin entire element for android 4.3 and below 42 | @extend .#{$ionicons-prefix}spin; 43 | } 44 | 45 | .#{$ionicons-prefix}loading-a { 46 | -webkit-animation-timing-function: steps(8, start); 47 | -moz-animation-timing-function: steps(8, start); 48 | animation-timing-function: steps(8, start); 49 | } 50 | 51 | .#{$ionicons-prefix}loading-a:before { 52 | @extend .#{$ionicons-prefix}load-a:before; 53 | } 54 | 55 | .#{$ionicons-prefix}loading-b:before { 56 | @extend .#{$ionicons-prefix}load-b:before; 57 | } 58 | 59 | .#{$ionicons-prefix}loading-c:before { 60 | @extend .#{$ionicons-prefix}load-c:before; 61 | } 62 | 63 | .#{$ionicons-prefix}loading-d:before { 64 | @extend .#{$ionicons-prefix}load-d:before; 65 | } 66 | 67 | .#{$ionicons-prefix}looping:before { 68 | @extend .#{$ionicons-prefix}loop:before; 69 | } 70 | 71 | .#{$ionicons-prefix}refreshing:before { 72 | @extend .#{$ionicons-prefix}refresh:before; 73 | } 74 | 75 | .#{$ionicons-prefix}ios7-reloading:before { 76 | @extend .#{$ionicons-prefix}ios7-reload:before; 77 | } 78 | -------------------------------------------------------------------------------- /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/ngCordova/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngCordova", 3 | "version": "0.1.10-alpha", 4 | "homepage": "http://ngCordova.com/", 5 | "authors": [ 6 | "Max Lynch ", 7 | "Paolo Bernasconi ", 8 | "Chad Campbell " 9 | ], 10 | "description": "AngularJS Cordova wrappers for common Cordova plugins.", 11 | "main": [ 12 | "./dist/ng-cordova.js" 13 | ], 14 | "ignore": [ 15 | "**/.*", 16 | "gulpfile.js", 17 | "test", 18 | "src", 19 | "config", 20 | "demo", 21 | "CONTRIBUTING.md" 22 | ], 23 | "dependencies": { 24 | "angular": ">= 1.2.23" 25 | }, 26 | "keywords": [ 27 | "ngCordova", 28 | "ng-cordova", 29 | "ngcordova", 30 | "ng cordova", 31 | "cordova", 32 | "phonegap", 33 | "angular", 34 | "angularjs", 35 | "ionic", 36 | "cordova plugin" 37 | ], 38 | "license": "MIT", 39 | "private": false, 40 | "devDependencies": { 41 | "angular": ">= 1.2.23", 42 | "angular-mocks": ">= 1.2.23", 43 | "jquery": "~2.1.1" 44 | }, 45 | "_release": "0.1.10-alpha", 46 | "_resolution": { 47 | "type": "version", 48 | "tag": "v0.1.10-alpha", 49 | "commit": "9e48914e6c2bb37161d58d40b243c50aea33e500" 50 | }, 51 | "_source": "git://github.com/driftyco/ng-cordova.git", 52 | "_target": "~0.1.10-alpha", 53 | "_originalSource": "ngCordova", 54 | "_direct": true 55 | } -------------------------------------------------------------------------------- /www/lib/ngCordova/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Drifty 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /www/lib/ngCordova/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngCordova", 3 | "version": "0.1.10-alpha", 4 | "homepage": "http://ngCordova.com/", 5 | "authors": [ 6 | "Max Lynch ", 7 | "Paolo Bernasconi ", 8 | "Chad Campbell " 9 | ], 10 | "description": "AngularJS Cordova wrappers for common Cordova plugins.", 11 | "main": [ 12 | "./dist/ng-cordova.js" 13 | ], 14 | "ignore": [ 15 | "**/.*", 16 | "gulpfile.js", 17 | "test", 18 | "src", 19 | "config", 20 | "demo", 21 | "CONTRIBUTING.md" 22 | ], 23 | "dependencies": { 24 | "angular": ">= 1.2.23" 25 | }, 26 | "keywords": [ 27 | "ngCordova", 28 | "ng-cordova", 29 | "ngcordova", 30 | "ng cordova", 31 | "cordova", 32 | "phonegap", 33 | "angular", 34 | "angularjs", 35 | "ionic", 36 | "cordova plugin" 37 | ], 38 | "license": "MIT", 39 | "private": false, 40 | "devDependencies": { 41 | "angular": ">= 1.2.23", 42 | "angular-mocks": ">= 1.2.23", 43 | "jquery": "~2.1.1" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /www/lib/ngCordova/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ng-cordova", 3 | "private": false, 4 | "main": "dist/ng-cordova", 5 | "version": "0.1.10-alpha", 6 | "repository": { 7 | "url": "git://github.com/driftyco/ng-cordova.git" 8 | }, 9 | "devDependencies": { 10 | "gulp": "^3.7.0", 11 | "gulp-concat": "^2.2.0", 12 | "gulp-footer": "^1.0.4", 13 | "gulp-header": "^1.0.2", 14 | "gulp-jshint": "^1.6.1", 15 | "gulp-prettify": "^0.3.0", 16 | "gulp-rename": "^1.2.0", 17 | "gulp-shell": "^0.2.10", 18 | "gulp-uglify": "^0.2.1", 19 | "jshint-stylish": "^0.4.0", 20 | "karma": "^0.12.16", 21 | "karma-chrome-launcher": "~0.1.2", 22 | "karma-coverage": "~0.2.6", 23 | "karma-jasmine": "~0.1.5", 24 | "karma-phantomjs-launcher": "~0.1.2", 25 | "minimist": "^0.1.0" 26 | }, 27 | "licenses": [ 28 | { 29 | "type": "MIT" 30 | } 31 | ], 32 | "scripts": { 33 | "test": "gulp karma --browsers=PhantomJS --reporters=progress" 34 | }, 35 | "dependencies": { 36 | "conventional-changelog": "0.0.11", 37 | "fs": "0.0.2", 38 | "q": "^1.1.2" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /www/templates/browse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | 6 | 7 |

皓眸IT

8 | 9 |

www.haomou.net

10 |
11 |
12 | 13 | 14 |

15 | click select button below(点击下面选择图片的按钮,选择你要展示的图片) 16 |

17 | 18 |

19 | 1 Like 20 | 5 Comments 21 |

22 |
23 | 37 |
38 | 41 |
42 |
43 | -------------------------------------------------------------------------------- /www/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Login

4 |
5 | 6 |
7 |
8 | 9 |
10 |
11 | 15 | 19 | 22 |
23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /www/templates/menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

Left

18 |
19 | 20 | 21 | 22 | Login 23 | 24 | 25 | Search 26 | 27 | 28 | Browse 29 | 30 | 31 | Playlists 32 | 33 | 34 | 35 |
36 |
37 | -------------------------------------------------------------------------------- /www/templates/playlist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Playlist

4 |
5 |
6 | -------------------------------------------------------------------------------- /www/templates/playlists.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{playlist.title}} 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /www/templates/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Search

4 |
5 |
6 | --------------------------------------------------------------------------------