cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [03/10] git commit: Update code from remote apache repository
Date Thu, 18 Sep 2014 23:53:14 GMT
Update code from remote apache repository


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/e5d07f14
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/e5d07f14
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/e5d07f14

Branch: refs/heads/master
Commit: e5d07f14e8419dea67ec6c13d9f18a096f20a939
Parents: 8633863 f866e0e
Author: SomaticIT <contact@somatic.fr>
Authored: Fri Jul 11 17:05:24 2014 +0200
Committer: SomaticIT <contact@somatic.fr>
Committed: Fri Jul 11 17:05:24 2014 +0200

----------------------------------------------------------------------
 CONTRIBUTING.md                                 |  37 +
 NOTICE                                          |   5 +
 README.md                                       |  25 +-
 RELEASENOTES.md                                 |  78 +-
 doc/de/index.md                                 | 320 ++++++++
 doc/es/index.md                                 | 320 ++++++++
 doc/fr/index.md                                 | 320 ++++++++
 doc/index.md                                    | 310 ++++++++
 doc/it/index.md                                 | 320 ++++++++
 doc/ja/index.md                                 | 320 ++++++++
 doc/ko/index.md                                 | 320 ++++++++
 doc/pl/index.md                                 | 299 +++++++
 doc/ru/index.md                                 | 320 ++++++++
 doc/zh/index.md                                 | 320 ++++++++
 docs/inappbrowser.md                            | 427 ----------
 docs/window.open.md                             | 100 ---
 plugin.xml                                      | 138 +++-
 src/amazon/InAppBrowser.java                    | 769 +++++++++++++++++++
 src/amazon/InAppChromeClient.java               | 146 ++++
 src/android/InAppBrowser.java                   | 403 +++++-----
 src/android/InAppBrowserDialog.java             |  54 ++
 src/android/InAppChromeClient.java              |  33 +-
 .../res/drawable-hdpi/ic_action_next_item.png   | Bin 0 -> 593 bytes
 .../drawable-hdpi/ic_action_previous_item.png   | Bin 0 -> 599 bytes
 .../res/drawable-hdpi/ic_action_remove.png      | Bin 0 -> 438 bytes
 .../res/drawable-mdpi/ic_action_next_item.png   | Bin 0 -> 427 bytes
 .../drawable-mdpi/ic_action_previous_item.png   | Bin 0 -> 438 bytes
 .../res/drawable-mdpi/ic_action_remove.png      | Bin 0 -> 328 bytes
 .../res/drawable-xhdpi/ic_action_next_item.png  | Bin 0 -> 727 bytes
 .../drawable-xhdpi/ic_action_previous_item.png  | Bin 0 -> 744 bytes
 .../res/drawable-xhdpi/ic_action_remove.png     | Bin 0 -> 536 bytes
 .../res/drawable-xxhdpi/ic_action_next_item.png | Bin 0 -> 1021 bytes
 .../drawable-xxhdpi/ic_action_previous_item.png | Bin 0 -> 1038 bytes
 .../res/drawable-xxhdpi/ic_action_remove.png    | Bin 0 -> 681 bytes
 src/blackberry10/README.md                      |  18 +
 src/firefoxos/InAppBrowserProxy.js              | 171 +++++
 src/ios/CDVInAppBrowser.h                       |  51 +-
 src/ios/CDVInAppBrowser.m                       | 314 ++++++--
 src/ubuntu/InAppBrowser.qml                     |  69 ++
 src/ubuntu/close.png                            | Bin 0 -> 461 bytes
 src/ubuntu/inappbrowser.cpp                     | 106 +++
 src/ubuntu/inappbrowser.h                       |  61 ++
 src/wp/InAppBrowser.cs                          | 288 ++++++-
 test/.DS_Store                                  | Bin 6148 -> 0 bytes
 test/cordova-incl.js                            |  70 --
 test/inappbrowser/index.html                    | 258 -------
 test/inappbrowser/inject.css                    |  21 -
 test/inappbrowser/inject.html                   |  43 --
 test/inappbrowser/inject.js                     |  20 -
 test/inappbrowser/local.html                    |  51 --
 test/inappbrowser/local.pdf                     | Bin 8568 -> 0 bytes
 test/index.html                                 |  65 --
 test/main.js                                    | 163 ----
 test/master.css                                 | 164 ----
 www/InAppBrowser.js                             |  14 +-
 www/windows8/InAppBrowserProxy.js               |   2 +-
 56 files changed, 5617 insertions(+), 1716 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/e5d07f14/plugin.xml
----------------------------------------------------------------------
diff --cc plugin.xml
index 0bb6616,9c47e0b..4f146dd
--- a/plugin.xml
+++ b/plugin.xml
@@@ -7,14 -26,18 +26,18 @@@
      <description>Cordova InAppBrowser Plugin</description>
      <license>Apache 2.0</license>
      <keywords>cordova,in,app,browser,inappbrowser</keywords>
+     <repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git</repo>
+     <issue>https://issues.apache.org/jira/browse/CB/component/12320641</issue>
  
+     <engines>
+       <engine name="cordova" version=">=3.1.0" /><!-- Needs cordova/urlutil
-->
+     </engines>
 -    
 +
-     <js-module src="www/InAppBrowser.js" name="InAppBrowser">
-         <clobbers target="window.open" />
-     </js-module>
-     
      <!-- android -->
      <platform name="android">
+         <js-module src="www/inappbrowser.js" name="inappbrowser">
 -            <clobbers target="window.open" />
 -        </js-module>
++        <clobbers target="window.open" />
++    </js-module>
          <config-file target="res/xml/config.xml" parent="/*">
              <feature name="InAppBrowser"> 
                  <param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser"/>
@@@ -22,11 -45,58 +45,58 @@@
          </config-file>
  
          <source-file src="src/android/InAppBrowser.java" target-dir="src/org/apache/cordova/inappbrowser"
/>
+         <source-file src="src/android/InAppBrowserDialog.java" target-dir="src/org/apache/cordova/inappbrowser"
/>
          <source-file src="src/android/InAppChromeClient.java" target-dir="src/org/apache/cordova/inappbrowser"
/>
+ 
+         <!--  drawable src/android/resources -->
+         <resource-file src="src/android/res/drawable-hdpi/ic_action_next_item.png" target="res/drawable-hdpi/ic_action_next_item.png"
/>
+         <resource-file src="src/android/res/drawable-mdpi/ic_action_next_item.png" target="res/drawable-mdpi/ic_action_next_item.png"
/>
+         <resource-file src="src/android/res/drawable-xhdpi/ic_action_next_item.png" target="res/drawable-xhdpi/ic_action_next_item.png"
/>
+         <resource-file src="src/android/res/drawable-xxhdpi/ic_action_next_item.png"
target="res/drawable-xxhdpi/ic_action_next_item.png" />
+ 
+         <resource-file src="src/android/res/drawable-hdpi/ic_action_previous_item.png"
target="res/drawable-hdpi/ic_action_previous_item.png" />
+         <resource-file src="src/android/res/drawable-mdpi/ic_action_previous_item.png"
target="res/drawable-mdpi/ic_action_previous_item.png" />
+         <resource-file src="src/android/res/drawable-xhdpi/ic_action_previous_item.png"
target="res/drawable-xhdpi/ic_action_previous_item.png" />
+         <resource-file src="src/android/res/drawable-xxhdpi/ic_action_previous_item.png"
target="res/drawable-xxhdpi/ic_action_previous_item.png" />
+ 
+         <resource-file src="src/android/res/drawable-hdpi/ic_action_remove.png" target="res/drawable-hdpi/ic_action_remove.png"
/>
+         <resource-file src="src/android/res/drawable-mdpi/ic_action_remove.png" target="res/drawable-mdpi/ic_action_remove.png"
/>
+         <resource-file src="src/android/res/drawable-xhdpi/ic_action_remove.png" target="res/drawable-xhdpi/ic_action_remove.png"
/>
+         <resource-file src="src/android/res/drawable-xxhdpi/ic_action_remove.png" target="res/drawable-xxhdpi/ic_action_remove.png"
/>
+ 
+     </platform>
+     
+     <!-- amazon-fireos -->
+     <platform name="amazon-fireos">
+         <js-module src="www/inappbrowser.js" name="inappbrowser">
+             <clobbers target="window.open" />
+         </js-module>
+         <config-file target="res/xml/config.xml" parent="/*">
+             <feature name="InAppBrowser"> 
+                 <param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser"/>
+             </feature>
+         </config-file>
+ 
+         <source-file src="src/amazon/InAppBrowser.java" target-dir="src/org/apache/cordova/inappbrowser"
/>
+         <source-file src="src/amazon/InAppChromeClient.java" target-dir="src/org/apache/cordova/inappbrowser"
/>
      </platform>
 -
 +    
+     <!-- ubuntu -->
+     <platform name="ubuntu">
+         <js-module src="www/inappbrowser.js" name="inappbrowser">
+             <clobbers target="window.open" />
+         </js-module>
+         <header-file src="src/ubuntu/inappbrowser.h" />
+         <source-file src="src/ubuntu/inappbrowser.cpp" />
+         <resource-file src="src/ubuntu/InAppBrowser.qml" />
+         <resource-file src="src/ubuntu/close.png" />
+     </platform>
+ 
      <!-- ios -->
 -    <platform name="ios">
 +    <platform name="ios">    
+         <js-module src="www/inappbrowser.js" name="inappbrowser">
+             <clobbers target="window.open" />
+         </js-module>  
          <config-file target="config.xml" parent="/*">
              <feature name="InAppBrowser">
                  <param name="ios-package" value="CDVInAppBrowser" /> 
@@@ -74,13 -162,18 +162,29 @@@
              <merges target="" />
          </js-module>
      </platform>
 -        
 +
-     <!-- windows81 -->
-     <platform name="windows81">
-       <js-module src="src/windows81/InAppBrowserProxy.js" name="InAppBrowserProxy">
-         <merges target="" />
-       </js-module>
++    <!-- windows universal apps (Windows 8.1, Windows Phone 8.1, Windows 8.0) -->
++    <platform name="windows">
++        <js-module src="www/inappbrowser.js" name="inappbrowser">
++            <clobbers target="window.open" />
++        </js-module>
++        <js-module src="src/windows/InAppBrowserProxy.js" name="InAppBrowserProxy">
++            <merges target="" />
++        </js-module>
++    </platform>
++  
+     <!-- firefoxos -->
+     <platform name="firefoxos">
+         <config-file target="config.xml" parent="/*">
+             <permission name="browser" description="Enables the app to implement a browser
in an iframe." />
+         </config-file>
+         <js-module src="www/inappbrowser.js" name="inappbrowser">
+             <clobbers target="window.open" />
+         </js-module>
+         <js-module src="src/firefoxos/InAppBrowserProxy.js" name="InAppBrowserProxy">
+             <merges target="" />
+         </js-module>
 -    </platform>    
 +    </platform>
 +
  
  </plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/e5d07f14/www/InAppBrowser.js
----------------------------------------------------------------------
diff --cc www/InAppBrowser.js
index 5da53fd,0000000..3535b6f
mode 100644,000000..100644
--- a/www/InAppBrowser.js
+++ b/www/InAppBrowser.js
@@@ -1,94 -1,0 +1,98 @@@
 +/*
 + *
 + * 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 exec = require('cordova/exec');
 +var channel = require('cordova/channel');
 +var modulemapper = require('cordova/modulemapper');
++var urlutil = require('cordova/urlutil');
 +
 +function InAppBrowser() {
 +   this.channels = {
 +        'loadstart': channel.create('loadstart'),
 +        'loadstop' : channel.create('loadstop'),
 +        'loaderror' : channel.create('loaderror'),
 +        'exit' : channel.create('exit')
 +   };
 +}
 +
 +InAppBrowser.prototype = {
 +    _eventHandler: function (event) {
 +        if (event.type in this.channels) {
 +            this.channels[event.type].fire(event);
 +        }
 +    },
 +    close: function (eventname) {
 +        exec(null, null, "InAppBrowser", "close", []);
 +    },
 +    show: function (eventname) {
 +      exec(null, null, "InAppBrowser", "show", []);
 +    },
 +    addEventListener: function (eventname,f) {
 +        if (eventname in this.channels) {
 +            this.channels[eventname].subscribe(f);
 +        }
 +    },
 +    removeEventListener: function(eventname, f) {
 +        if (eventname in this.channels) {
 +            this.channels[eventname].unsubscribe(f);
 +        }
 +    },
 +
 +    executeScript: function(injectDetails, cb) {
 +        if (injectDetails.code) {
 +            exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]);
 +        } else if (injectDetails.file) {
 +            exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]);
 +        } else {
 +            throw new Error('executeScript requires exactly one of code or file to be specified');
 +        }
 +    },
 +
 +    insertCSS: function(injectDetails, cb) {
 +        if (injectDetails.code) {
 +            exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]);
 +        } else if (injectDetails.file) {
 +            exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]);
 +        } else {
 +            throw new Error('insertCSS requires exactly one of code or file to be specified');
 +        }
 +    }
 +};
 +
 +module.exports = function(strUrl, strWindowName, strWindowFeatures) {
-     var iab = new InAppBrowser();
-     var cb = function(eventname) {
-        iab._eventHandler(eventname);
-     };
- 
 +    // Don't catch calls that write to existing frames (e.g. named iframes).
 +    if (window.frames && window.frames[strWindowName]) {
 +        var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open');
 +        return origOpenFunc.apply(window, arguments);
 +    }
 +
++    strUrl = urlutil.makeAbsolute(strUrl);
++    var iab = new InAppBrowser();
++    var cb = function(eventname) {
++       iab._eventHandler(eventname);
++    };
++
++    strWindowFeatures = strWindowFeatures || "";
++
 +    exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
 +    return iab;
 +};
 +


Mime
View raw message