You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/01/29 20:07:52 UTC
[17/37] js commit: [all] modulemapper refactor for capture.
[all] modulemapper refactor for capture.
https://issues.apache.org/jira/browse/CB-2227
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/44e30a63
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/44e30a63
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/44e30a63
Branch: refs/heads/symbolmapping
Commit: 44e30a63909073a99c618e6176ee9526f19277e4
Parents: 8ca4009
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Jan 24 16:26:03 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Jan 25 15:32:36 2013 -0500
----------------------------------------------------------------------
lib/bada/platform.js | 3 --
lib/bada/plugin/capture/symbols.js | 31 +++++++++++++++++++++++++++
lib/common/common.js | 28 ------------------------
lib/common/plugin/capture/symbols.js | 30 ++++++++++++++++++++++++++
lib/windows8/platform.js | 14 +-----------
lib/windows8/plugin/capture/symbols.js | 31 +++++++++++++++++++++++++++
lib/windowsphone/platform.js | 7 ------
7 files changed, 93 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/44e30a63/lib/bada/platform.js
----------------------------------------------------------------------
diff --git a/lib/bada/platform.js b/lib/bada/platform.js
index 8316c7b..b980fe4 100644
--- a/lib/bada/platform.js
+++ b/lib/bada/platform.js
@@ -44,9 +44,6 @@ module.exports = {
children: {
device: {
path: "cordova/plugin/bada/device"
- },
- capture: {
- path: "cordova/plugin/bada/Capture"
}
}
}
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/44e30a63/lib/bada/plugin/capture/symbols.js
----------------------------------------------------------------------
diff --git a/lib/bada/plugin/capture/symbols.js b/lib/bada/plugin/capture/symbols.js
new file mode 100644
index 0000000..e90fcec
--- /dev/null
+++ b/lib/bada/plugin/capture/symbols.js
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/CaptureError', 'CaptureError');
+modulemapper.clobbers('cordova/plugin/CaptureAudioOptions', 'CaptureAudioOptions');
+modulemapper.clobbers('cordova/plugin/CaptureImageOptions', 'CaptureImageOptions');
+modulemapper.clobbers('cordova/plugin/CaptureVideoOptions', 'CaptureVideoOptions');
+modulemapper.clobbers('cordova/plugin/MediaFile', 'MediaFile');
+modulemapper.clobbers('cordova/plugin/MediaFileData', 'MediaFileData');
+modulemapper.clobbers('cordova/plugin/capture', 'navigator.device.capture');
+
+modulemapper.merges('cordova/plugin/bada/Capture', 'navigator.capture');
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/44e30a63/lib/common/common.js
----------------------------------------------------------------------
diff --git a/lib/common/common.js b/lib/common/common.js
index 37dda9d..3a5c11b 100644
--- a/lib/common/common.js
+++ b/lib/common/common.js
@@ -53,13 +53,6 @@ module.exports = {
contacts: {
path: 'cordova/plugin/contacts'
},
- device:{
- children:{
- capture: {
- path: 'cordova/plugin/capture'
- }
- }
- },
geolocation: {
path: 'cordova/plugin/geolocation'
},
@@ -79,27 +72,12 @@ module.exports = {
}
}
},
- CaptureError: {
- path: 'cordova/plugin/CaptureError'
- },
- CaptureAudioOptions:{
- path: 'cordova/plugin/CaptureAudioOptions'
- },
- CaptureImageOptions: {
- path: 'cordova/plugin/CaptureImageOptions'
- },
- CaptureVideoOptions: {
- path: 'cordova/plugin/CaptureVideoOptions'
- },
CompassHeading:{
path: 'cordova/plugin/CompassHeading'
},
CompassError:{
path: 'cordova/plugin/CompassError'
},
- ConfigurationData: {
- path: 'cordova/plugin/ConfigurationData'
- },
Connection: {
path: 'cordova/plugin/Connection'
},
@@ -139,12 +117,6 @@ module.exports = {
MediaError: {
path: 'cordova/plugin/MediaError'
},
- MediaFile: {
- path: 'cordova/plugin/MediaFile'
- },
- MediaFileData:{
- path: 'cordova/plugin/MediaFileData'
- },
Position: {
path: 'cordova/plugin/Position'
},
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/44e30a63/lib/common/plugin/capture/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/capture/symbols.js b/lib/common/plugin/capture/symbols.js
new file mode 100644
index 0000000..868216a
--- /dev/null
+++ b/lib/common/plugin/capture/symbols.js
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/CaptureError', 'CaptureError');
+modulemapper.clobbers('cordova/plugin/CaptureAudioOptions', 'CaptureAudioOptions');
+modulemapper.clobbers('cordova/plugin/CaptureImageOptions', 'CaptureImageOptions');
+modulemapper.clobbers('cordova/plugin/CaptureVideoOptions', 'CaptureVideoOptions');
+modulemapper.clobbers('cordova/plugin/ConfigurationData', 'ConfigurationData');
+modulemapper.clobbers('cordova/plugin/MediaFile', 'MediaFile');
+modulemapper.clobbers('cordova/plugin/MediaFileData', 'MediaFileData');
+modulemapper.clobbers('cordova/plugin/capture', 'navigator.device.capture');
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/44e30a63/lib/windows8/platform.js
----------------------------------------------------------------------
diff --git a/lib/windows8/platform.js b/lib/windows8/platform.js
index 7646fea..d07016a 100755
--- a/lib/windows8/platform.js
+++ b/lib/windows8/platform.js
@@ -51,7 +51,7 @@ module.exports = {
modulemapper.mapModules(window);
window.alert = window.alert || require("cordova/plugin/notification").alert;
- window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
+ window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
var onWinJSReady = function () {
var app = WinJS.Application;
@@ -99,13 +99,6 @@ module.exports = {
},
navigator: {
children: {
- device: {
- children: {
- capture: {
- path: "cordova/plugin/capture"
- }
- }
- },
console: {
path: "cordova/plugin/windows8/console"
}
@@ -114,10 +107,5 @@ module.exports = {
MediaError: {
path: 'cordova/plugin/MediaError'
}
- },
- merges: {
- MediaFile: {
- path: "cordova/plugin/windows8/MediaFile"
- }
}
};
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/44e30a63/lib/windows8/plugin/capture/symbols.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/capture/symbols.js b/lib/windows8/plugin/capture/symbols.js
new file mode 100644
index 0000000..d47db46
--- /dev/null
+++ b/lib/windows8/plugin/capture/symbols.js
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/CaptureError', 'CaptureError');
+modulemapper.clobbers('cordova/plugin/CaptureAudioOptions', 'CaptureAudioOptions');
+modulemapper.clobbers('cordova/plugin/CaptureImageOptions', 'CaptureImageOptions');
+modulemapper.clobbers('cordova/plugin/CaptureVideoOptions', 'CaptureVideoOptions');
+modulemapper.clobbers('cordova/plugin/MediaFile', 'MediaFile');
+modulemapper.clobbers('cordova/plugin/MediaFileData', 'MediaFileData');
+modulemapper.clobbers('cordova/plugin/capture', 'navigator.device.capture');
+
+modulemapper.merges('cordova/plugin/windows8/MediaFile', 'MediaFile');
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/44e30a63/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index aff1eec..6d23324 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -57,13 +57,6 @@ module.exports = {
},
navigator: {
children: {
- device: {
- children:{
- capture:{
- path:"cordova/plugin/capture"
- }
- }
- },
console: {
path: "cordova/plugin/windowsphone/console"