Version Notes
Onestepcheckout compatibility 4.5.5 and pickup points fix
Download this release
Release Info
Developer | PHPro |
Extension | bpost |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.3.0
- app/code/community/Bpost/ShM/Helper/Data.php +13 -0
- app/code/community/Bpost/ShM/Model/Api/Abstract.php +2 -1
- app/code/community/Bpost/ShM/etc/config.xml +1 -1
- app/design/frontend/base/default/layout/bpost/shm.xml +2 -0
- app/design/frontend/base/default/template/bpost/shm/oscwindowjs.phtml +4 -0
- js/bpost/shm/window.js +1145 -0
- package.xml +6 -6
- skin/frontend/base/default/css/bpost/checkout.css +2 -1
- skin/frontend/base/default/images/bpost/.DS_Store +0 -0
app/code/community/Bpost/ShM/Helper/Data.php
CHANGED
@@ -784,6 +784,19 @@ class Bpost_ShM_Helper_Data extends Mage_Core_Helper_Abstract
|
|
784 |
return false;
|
785 |
}
|
786 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
787 |
/**
|
788 |
* Calculates total weight of a shipment.
|
789 |
*
|
784 |
return false;
|
785 |
}
|
786 |
|
787 |
+
/**
|
788 |
+
* Get Onestepcheckout version
|
789 |
+
*
|
790 |
+
* @return string
|
791 |
+
*/
|
792 |
+
public function getOnestepCheckoutVersion()
|
793 |
+
{
|
794 |
+
$version = Mage::getConfig()->getNode()->modules->Idev_OneStepCheckout->version;
|
795 |
+
list($major, $minor) = explode('.', $version);
|
796 |
+
|
797 |
+
return (string) $major . '.' . $minor;
|
798 |
+
}
|
799 |
+
|
800 |
/**
|
801 |
* Calculates total weight of a shipment.
|
802 |
*
|
app/code/community/Bpost/ShM/Model/Api/Abstract.php
CHANGED
@@ -12,6 +12,7 @@ class Bpost_ShM_Model_Api_Abstract extends Mage_Core_Model_Abstract
|
|
12 |
const API_PATH_PREFIX = '/services/shm';
|
13 |
const API_URI_TAXIPOST_BASE = "http://taxipost.geo6.be";
|
14 |
const API_TAXIPOST_APPID = "A001";
|
|
|
15 |
|
16 |
protected $_apiUriBase;
|
17 |
protected $_accountId;
|
@@ -191,7 +192,7 @@ class Bpost_ShM_Model_Api_Abstract extends Mage_Core_Model_Abstract
|
|
191 |
*/
|
192 |
protected function _callTaxipostApi($params){
|
193 |
$urlExtension = "Locator";
|
194 |
-
$params["Partner"] =
|
195 |
$params["AppId"] = self::API_TAXIPOST_APPID;
|
196 |
|
197 |
$httpClient = $this->_getTaxipostHttpClient($urlExtension);
|
12 |
const API_PATH_PREFIX = '/services/shm';
|
13 |
const API_URI_TAXIPOST_BASE = "http://taxipost.geo6.be";
|
14 |
const API_TAXIPOST_APPID = "A001";
|
15 |
+
const API_TAXIPOST_PARTNER = '107444';
|
16 |
|
17 |
protected $_apiUriBase;
|
18 |
protected $_accountId;
|
192 |
*/
|
193 |
protected function _callTaxipostApi($params){
|
194 |
$urlExtension = "Locator";
|
195 |
+
$params["Partner"] = self::API_TAXIPOST_PARTNER;
|
196 |
$params["AppId"] = self::API_TAXIPOST_APPID;
|
197 |
|
198 |
$httpClient = $this->_getTaxipostHttpClient($urlExtension);
|
app/code/community/Bpost/ShM/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bpost_ShM>
|
5 |
-
<version>1.
|
6 |
</Bpost_ShM>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bpost_ShM>
|
5 |
+
<version>1.3.0</version>
|
6 |
</Bpost_ShM>
|
7 |
</modules>
|
8 |
<global>
|
app/design/frontend/base/default/layout/bpost/shm.xml
CHANGED
@@ -22,6 +22,8 @@
|
|
22 |
<update handle="checkout_header"/>
|
23 |
|
24 |
<reference name="head">
|
|
|
|
|
25 |
<action method="addJs">
|
26 |
<script>bpost/shm/onestepcheckout_shipping.js</script>
|
27 |
</action>
|
22 |
<update handle="checkout_header"/>
|
23 |
|
24 |
<reference name="head">
|
25 |
+
<block type="core/template" name="oscwindowjs" template="bpost/shm/oscwindowjs.phtml"/>
|
26 |
+
|
27 |
<action method="addJs">
|
28 |
<script>bpost/shm/onestepcheckout_shipping.js</script>
|
29 |
</action>
|
app/design/frontend/base/default/template/bpost/shm/oscwindowjs.phtml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php $_helper = Mage::helper('bpost_shm') ?>
|
2 |
+
<?php if($_helper->getOnestepCheckoutVersion() == '4.5'): ?>
|
3 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);?>bpost/shm/window.js"></script>
|
4 |
+
<?php endif; ?>
|
js/bpost/shm/window.js
ADDED
@@ -0,0 +1,1145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @author Ryan Johnson <http://syntacticx.com/>
|
3 |
+
* @copyright 2008 PersonalGrid Corporation <http://personalgrid.com/>
|
4 |
+
* @package LivePipe UI
|
5 |
+
* @license MIT
|
6 |
+
* @url http://livepipe.net/core
|
7 |
+
* @require prototype.js
|
8 |
+
*/
|
9 |
+
|
10 |
+
if(typeof(Control) == 'undefined')
|
11 |
+
Control = {};
|
12 |
+
|
13 |
+
var $proc = function(proc){
|
14 |
+
return typeof(proc) == 'function' ? proc : function(){return proc};
|
15 |
+
};
|
16 |
+
|
17 |
+
var $value = function(value){
|
18 |
+
return typeof(value) == 'function' ? value() : value;
|
19 |
+
};
|
20 |
+
|
21 |
+
Object.Event = {
|
22 |
+
extend: function(object){
|
23 |
+
object._objectEventSetup = function(event_name){
|
24 |
+
this._observers = this._observers || {};
|
25 |
+
this._observers[event_name] = this._observers[event_name] || [];
|
26 |
+
};
|
27 |
+
object.observe = function(event_name,observer){
|
28 |
+
if(typeof(event_name) == 'string' && typeof(observer) != 'undefined'){
|
29 |
+
this._objectEventSetup(event_name);
|
30 |
+
if(!this._observers[event_name].include(observer))
|
31 |
+
this._observers[event_name].push(observer);
|
32 |
+
}else
|
33 |
+
for(var e in event_name)
|
34 |
+
this.observe(e,event_name[e]);
|
35 |
+
};
|
36 |
+
object.stopObserving = function(event_name,observer){
|
37 |
+
this._objectEventSetup(event_name);
|
38 |
+
if(event_name && observer)
|
39 |
+
this._observers[event_name] = this._observers[event_name].without(observer);
|
40 |
+
else if(event_name)
|
41 |
+
this._observers[event_name] = [];
|
42 |
+
else
|
43 |
+
this._observers = {};
|
44 |
+
};
|
45 |
+
object.observeOnce = function(event_name,outer_observer){
|
46 |
+
var inner_observer = function(){
|
47 |
+
outer_observer.apply(this,arguments);
|
48 |
+
this.stopObserving(event_name,inner_observer);
|
49 |
+
}.bind(this);
|
50 |
+
this._objectEventSetup(event_name);
|
51 |
+
this._observers[event_name].push(inner_observer);
|
52 |
+
};
|
53 |
+
object.notify = function(event_name){
|
54 |
+
this._objectEventSetup(event_name);
|
55 |
+
var collected_return_values = [];
|
56 |
+
var args = $A(arguments).slice(1);
|
57 |
+
try{
|
58 |
+
for(var i = 0; i < this._observers[event_name].length; ++i)
|
59 |
+
collected_return_values.push(this._observers[event_name][i].apply(this,args) || null);
|
60 |
+
}catch(e){
|
61 |
+
if(e == $break)
|
62 |
+
return false;
|
63 |
+
else
|
64 |
+
throw e;
|
65 |
+
}
|
66 |
+
return collected_return_values;
|
67 |
+
};
|
68 |
+
if(object.prototype){
|
69 |
+
object.prototype._objectEventSetup = object._objectEventSetup;
|
70 |
+
object.prototype.observe = object.observe;
|
71 |
+
object.prototype.stopObserving = object.stopObserving;
|
72 |
+
object.prototype.observeOnce = object.observeOnce;
|
73 |
+
object.prototype.notify = function(event_name){
|
74 |
+
if(object.notify){
|
75 |
+
var args = $A(arguments).slice(1);
|
76 |
+
args.unshift(this);
|
77 |
+
args.unshift(event_name);
|
78 |
+
object.notify.apply(object,args);
|
79 |
+
}
|
80 |
+
this._objectEventSetup(event_name);
|
81 |
+
var args = $A(arguments).slice(1);
|
82 |
+
var collected_return_values = [];
|
83 |
+
try{
|
84 |
+
if(this.options && this.options[event_name] && typeof(this.options[event_name]) == 'function')
|
85 |
+
collected_return_values.push(this.options[event_name].apply(this,args) || null);
|
86 |
+
var callbacks_copy = this._observers[event_name]; // since original array will be modified after observeOnce calls
|
87 |
+
for(var i = 0; i < callbacks_copy.length; ++i)
|
88 |
+
collected_return_values.push(callbacks_copy[i].apply(this,args) || null);
|
89 |
+
}catch(e){
|
90 |
+
if(e == $break)
|
91 |
+
return false;
|
92 |
+
else
|
93 |
+
throw e;
|
94 |
+
}
|
95 |
+
return collected_return_values;
|
96 |
+
};
|
97 |
+
}
|
98 |
+
}
|
99 |
+
};
|
100 |
+
|
101 |
+
/* Begin Core Extensions */
|
102 |
+
|
103 |
+
//Element.observeOnce
|
104 |
+
Element.addMethods({
|
105 |
+
observeOnce: function(element,event_name,outer_callback){
|
106 |
+
var inner_callback = function(){
|
107 |
+
outer_callback.apply(this,arguments);
|
108 |
+
Element.stopObserving(element,event_name,inner_callback);
|
109 |
+
};
|
110 |
+
Element.observe(element,event_name,inner_callback);
|
111 |
+
}
|
112 |
+
});
|
113 |
+
|
114 |
+
//mouse:wheel
|
115 |
+
(function(){
|
116 |
+
function wheel(event){
|
117 |
+
var delta, element, custom_event;
|
118 |
+
// normalize the delta
|
119 |
+
if (event.wheelDelta) { // IE & Opera
|
120 |
+
delta = event.wheelDelta / 120;
|
121 |
+
} else if (event.detail) { // W3C
|
122 |
+
delta =- event.detail / 3;
|
123 |
+
}
|
124 |
+
if (!delta) { return; }
|
125 |
+
element = Event.extend(event).target;
|
126 |
+
element = Element.extend(element.nodeType === Node.TEXT_NODE ? element.parentNode : element);
|
127 |
+
custom_event = element.fire('mouse:wheel',{ delta: delta });
|
128 |
+
if (custom_event.stopped) {
|
129 |
+
Event.stop(event);
|
130 |
+
return false;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
document.observe('mousewheel',wheel);
|
134 |
+
document.observe('DOMMouseScroll',wheel);
|
135 |
+
})();
|
136 |
+
|
137 |
+
/* End Core Extensions */
|
138 |
+
|
139 |
+
//from PrototypeUI
|
140 |
+
var IframeShim = Class.create({
|
141 |
+
initialize: function() {
|
142 |
+
if(navigator.appVersion.match(/MSIE\s+(?:6|7|8)\./)){
|
143 |
+
this.element = new Element('iframe',{
|
144 |
+
style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); display:none',
|
145 |
+
src: 'about:blank',
|
146 |
+
frameborder: 0,
|
147 |
+
});
|
148 |
+
} else {
|
149 |
+
this.element = new Element('iframe',{
|
150 |
+
//style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); display:none',
|
151 |
+
src: 'about:blank',
|
152 |
+
frameborder: 0,
|
153 |
+
});
|
154 |
+
}
|
155 |
+
|
156 |
+
$(document.body).insert(this.element);
|
157 |
+
},
|
158 |
+
hide: function() {
|
159 |
+
this.element.hide();
|
160 |
+
return this;
|
161 |
+
},
|
162 |
+
show: function() {
|
163 |
+
this.element.show();
|
164 |
+
return this;
|
165 |
+
},
|
166 |
+
positionUnder: function(element) {
|
167 |
+
var element = $(element);
|
168 |
+
var offset = element.cumulativeOffset();
|
169 |
+
var dimensions = element.getDimensions();
|
170 |
+
this.element.setStyle({
|
171 |
+
left: offset[0] + 'px',
|
172 |
+
top: offset[1] + 'px',
|
173 |
+
width: dimensions.width + 'px',
|
174 |
+
height: dimensions.height + 'px',
|
175 |
+
zIndex: element.getStyle('zIndex') - 1
|
176 |
+
});
|
177 |
+
if(navigator.appVersion.match(/MSIE\s+(?:6|7|8)\./)){
|
178 |
+
this.element.setStyle({
|
179 |
+
position: 'absolute'
|
180 |
+
});
|
181 |
+
}
|
182 |
+
this.element.show();
|
183 |
+
|
184 |
+
|
185 |
+
return this;
|
186 |
+
},
|
187 |
+
setBounds: function(bounds) {
|
188 |
+
for(prop in bounds)
|
189 |
+
bounds[prop] += 'px';
|
190 |
+
this.element.setStyle(bounds);
|
191 |
+
return this;
|
192 |
+
},
|
193 |
+
destroy: function() {
|
194 |
+
if(this.element)
|
195 |
+
this.element.remove();
|
196 |
+
return this;
|
197 |
+
}
|
198 |
+
});
|
199 |
+
/**
|
200 |
+
* @author Ryan Johnson <http://syntacticx.com/>
|
201 |
+
* @copyright 2008 PersonalGrid Corporation <http://personalgrid.com/>
|
202 |
+
* @package LivePipe UI
|
203 |
+
* @license MIT
|
204 |
+
* @url http://livepipe.net/control/window
|
205 |
+
* @require prototype.js, effects.js, draggable.js, resizable.js, livepipe.js
|
206 |
+
*/
|
207 |
+
|
208 |
+
//adds onDraw and constrainToViewport option to draggable
|
209 |
+
if(typeof(Draggable) != 'undefined'){
|
210 |
+
//allows the point to be modified with an onDraw callback
|
211 |
+
Draggable.prototype.draw = function(point) {
|
212 |
+
var pos = Position.cumulativeOffset(this.element);
|
213 |
+
if(this.options.ghosting) {
|
214 |
+
var r = Position.realOffset(this.element);
|
215 |
+
pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
|
216 |
+
}
|
217 |
+
|
218 |
+
var d = this.currentDelta();
|
219 |
+
pos[0] -= d[0]; pos[1] -= d[1];
|
220 |
+
|
221 |
+
if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
|
222 |
+
pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
|
223 |
+
pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
|
224 |
+
}
|
225 |
+
|
226 |
+
var p = [0,1].map(function(i){
|
227 |
+
return (point[i]-pos[i]-this.offset[i])
|
228 |
+
}.bind(this));
|
229 |
+
|
230 |
+
if(this.options.snap) {
|
231 |
+
if(typeof this.options.snap == 'function') {
|
232 |
+
p = this.options.snap(p[0],p[1],this);
|
233 |
+
} else {
|
234 |
+
if(this.options.snap instanceof Array) {
|
235 |
+
p = p.map( function(v, i) {return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))
|
236 |
+
} else {
|
237 |
+
p = p.map( function(v) {return Math.round(v/this.options.snap)*this.options.snap }.bind(this))
|
238 |
+
}
|
239 |
+
}
|
240 |
+
}
|
241 |
+
|
242 |
+
if(this.options.onDraw)
|
243 |
+
this.options.onDraw.bind(this)(p);
|
244 |
+
else{
|
245 |
+
var style = this.element.style;
|
246 |
+
if(this.options.constrainToViewport){
|
247 |
+
var viewport_dimensions = document.viewport.getDimensions();
|
248 |
+
var container_dimensions = this.element.getDimensions();
|
249 |
+
var margin_top = parseInt(this.element.getStyle('margin-top'));
|
250 |
+
var margin_left = parseInt(this.element.getStyle('margin-left'));
|
251 |
+
var boundary = [[
|
252 |
+
0 - margin_left,
|
253 |
+
0 - margin_top
|
254 |
+
],[
|
255 |
+
(viewport_dimensions.width - container_dimensions.width) - margin_left,
|
256 |
+
(viewport_dimensions.height - container_dimensions.height) - margin_top
|
257 |
+
]];
|
258 |
+
if((!this.options.constraint) || (this.options.constraint=='horizontal')){
|
259 |
+
if((p[0] >= boundary[0][0]) && (p[0] <= boundary[1][0]))
|
260 |
+
this.element.style.left = p[0] + "px";
|
261 |
+
else
|
262 |
+
this.element.style.left = ((p[0] < boundary[0][0]) ? boundary[0][0] : boundary[1][0]) + "px";
|
263 |
+
}
|
264 |
+
if((!this.options.constraint) || (this.options.constraint=='vertical')){
|
265 |
+
if((p[1] >= boundary[0][1] ) && (p[1] <= boundary[1][1]))
|
266 |
+
this.element.style.top = p[1] + "px";
|
267 |
+
else
|
268 |
+
this.element.style.top = ((p[1] <= boundary[0][1]) ? boundary[0][1] : boundary[1][1]) + "px";
|
269 |
+
}
|
270 |
+
}else{
|
271 |
+
if((!this.options.constraint) || (this.options.constraint=='horizontal'))
|
272 |
+
style.left = p[0] + "px";
|
273 |
+
if((!this.options.constraint) || (this.options.constraint=='vertical'))
|
274 |
+
style.top = p[1] + "px";
|
275 |
+
}
|
276 |
+
if(style.visibility=="hidden")
|
277 |
+
style.visibility = ""; // fix gecko rendering
|
278 |
+
}
|
279 |
+
};
|
280 |
+
}
|
281 |
+
|
282 |
+
if(typeof(Prototype) == "undefined")
|
283 |
+
throw "Control.Window requires Prototype to be loaded.";
|
284 |
+
if(typeof(IframeShim) == "undefined")
|
285 |
+
throw "Control.Window requires IframeShim to be loaded.";
|
286 |
+
if(typeof(Object.Event) == "undefined")
|
287 |
+
throw "Control.Window requires Object.Event to be loaded.";
|
288 |
+
/*
|
289 |
+
known issues:
|
290 |
+
- when iframe is clicked is does not gain focus
|
291 |
+
- safari can't open multiple iframes properly
|
292 |
+
- constrainToViewport: body must have no margin or padding for this to work properly
|
293 |
+
- iframe will be mis positioned during fade in
|
294 |
+
- document.viewport does not account for scrollbars (this will eventually be fixed in the prototype core)
|
295 |
+
notes
|
296 |
+
- setting constrainToViewport only works when the page is not scrollable
|
297 |
+
- setting draggable: true will negate the effects of position: center
|
298 |
+
*/
|
299 |
+
Control.Window = Class.create({
|
300 |
+
initialize: function(container,options){
|
301 |
+
Control.Window.windows.push(this);
|
302 |
+
|
303 |
+
//attribute initialization
|
304 |
+
this.container = false;
|
305 |
+
this.isOpen = false;
|
306 |
+
this.href = false;
|
307 |
+
this.sourceContainer = false; //this is optionally the container that will open the window
|
308 |
+
this.ajaxRequest = false;
|
309 |
+
this.remoteContentLoaded = false; //this is set when the code to load the remote content is run, onRemoteContentLoaded is fired when the connection is closed
|
310 |
+
this.numberInSequence = Control.Window.windows.length + 1; //only useful for the effect scoping
|
311 |
+
this.indicator = false;
|
312 |
+
this.effects = {
|
313 |
+
fade: false,
|
314 |
+
appear: false
|
315 |
+
};
|
316 |
+
this.indicatorEffects = {
|
317 |
+
fade: false,
|
318 |
+
appear: false
|
319 |
+
};
|
320 |
+
|
321 |
+
//options
|
322 |
+
this.options = Object.extend({
|
323 |
+
//lifecycle
|
324 |
+
beforeOpen: Prototype.emptyFunction,
|
325 |
+
afterOpen: Prototype.emptyFunction,
|
326 |
+
beforeClose: Prototype.emptyFunction,
|
327 |
+
afterClose: Prototype.emptyFunction,
|
328 |
+
//dimensions and modes
|
329 |
+
height: null,
|
330 |
+
width: null,
|
331 |
+
className: false,
|
332 |
+
position: 'center', //'center', 'center_once', 'relative', [x,y], [function(){return x;},function(){return y;}]
|
333 |
+
offsetLeft: 0, //available only for anchors opening the window, or windows set to position: hover
|
334 |
+
offsetTop: 0, //""
|
335 |
+
iframe: false, //if the window has an href, this will display the href as an iframe instead of requesting the url as an an Ajax.Request
|
336 |
+
hover: false, //element object to hover over, or if "true" only available for windows with sourceContainer (an anchor or any element already on the page with an href attribute)
|
337 |
+
indicator: false, //element to show or hide when ajax requests, images and iframes are loading
|
338 |
+
closeOnClick: false, //does not work with hover,can be: true (click anywhere), 'container' (will refer to this.container), or element (a specific element)
|
339 |
+
iframeshim: true, //whether or not to position an iFrameShim underneath the window
|
340 |
+
//effects
|
341 |
+
fade: false,
|
342 |
+
fadeDuration: 0.75,
|
343 |
+
//draggable
|
344 |
+
draggable: false,
|
345 |
+
onDrag: Prototype.emptyFunction,
|
346 |
+
//resizable
|
347 |
+
resizable: false,
|
348 |
+
minHeight: false,
|
349 |
+
minWidth: false,
|
350 |
+
maxHeight: false,
|
351 |
+
maxWidth: false,
|
352 |
+
onResize: Prototype.emptyFunction,
|
353 |
+
//draggable and resizable
|
354 |
+
constrainToViewport: false,
|
355 |
+
//ajax
|
356 |
+
method: 'post',
|
357 |
+
parameters: {},
|
358 |
+
onComplete: Prototype.emptyFunction,
|
359 |
+
onSuccess: Prototype.emptyFunction,
|
360 |
+
onFailure: Prototype.emptyFunction,
|
361 |
+
onException: Prototype.emptyFunction,
|
362 |
+
//any element with an href (image,iframe,ajax) will call this after it is done loading
|
363 |
+
onRemoteContentLoaded: Prototype.emptyFunction,
|
364 |
+
insertRemoteContentAt: false //false will set this to this.container, can be string selector (first returned will be selected), or an Element that must be a child of this.container
|
365 |
+
},options || {});
|
366 |
+
|
367 |
+
//container setup
|
368 |
+
this.indicator = this.options.indicator ? $(this.options.indicator) : false;
|
369 |
+
if(container){
|
370 |
+
if(typeof(container) == "string" && container.match(Control.Window.uriRegex))
|
371 |
+
this.href = container;
|
372 |
+
else{
|
373 |
+
this.container = $(container);
|
374 |
+
//need to create the container now for tooltips (or hover: element with no container already on the page)
|
375 |
+
//second call made below will not create the container since the check is done inside createDefaultContainer()
|
376 |
+
this.createDefaultContainer(container);
|
377 |
+
//if an element with an href was passed in we use it to activate the window
|
378 |
+
if(this.container && ((this.container.readAttribute('href') && this.container.readAttribute('href') != '') || (this.options.hover && this.options.hover !== true))){
|
379 |
+
if(this.options.hover && this.options.hover !== true)
|
380 |
+
this.sourceContainer = $(this.options.hover);
|
381 |
+
else{
|
382 |
+
this.sourceContainer = this.container;
|
383 |
+
this.href = this.container.readAttribute('href');
|
384 |
+
var rel = this.href.match(/^#(.+)$/);
|
385 |
+
if(rel && rel[1]){
|
386 |
+
this.container = $(rel[1]);
|
387 |
+
this.href = false;
|
388 |
+
}else
|
389 |
+
this.container = false;
|
390 |
+
}
|
391 |
+
//hover or click handling
|
392 |
+
this.sourceContainerOpenHandler = function(event){
|
393 |
+
this.open(event);
|
394 |
+
event.stop();
|
395 |
+
return false;
|
396 |
+
}.bindAsEventListener(this);
|
397 |
+
this.sourceContainerCloseHandler = function(event){
|
398 |
+
this.close(event);
|
399 |
+
}.bindAsEventListener(this);
|
400 |
+
this.sourceContainerMouseMoveHandler = function(event){
|
401 |
+
this.position(event);
|
402 |
+
}.bindAsEventListener(this);
|
403 |
+
if(this.options.hover){
|
404 |
+
this.sourceContainer.observe('mouseenter',this.sourceContainerOpenHandler);
|
405 |
+
this.sourceContainer.observe('mouseleave',this.sourceContainerCloseHandler);
|
406 |
+
if(this.options.position == 'mouse')
|
407 |
+
this.sourceContainer.observe('mousemove',this.sourceContainerMouseMoveHandler);
|
408 |
+
}else
|
409 |
+
this.sourceContainer.observe('click',this.sourceContainerOpenHandler);
|
410 |
+
}
|
411 |
+
}
|
412 |
+
}
|
413 |
+
this.createDefaultContainer(container);
|
414 |
+
if(this.options.insertRemoteContentAt === false)
|
415 |
+
this.options.insertRemoteContentAt = this.container;
|
416 |
+
var styles = {
|
417 |
+
margin: 0,
|
418 |
+
position: 'absolute',
|
419 |
+
zIndex: Control.Window.initialZIndexForWindow()
|
420 |
+
};
|
421 |
+
if(this.options.width)
|
422 |
+
styles.width = $value(this.options.width) + 'px';
|
423 |
+
if(this.options.height)
|
424 |
+
styles.height = $value(this.options.height) + 'px';
|
425 |
+
this.container.setStyle(styles);
|
426 |
+
if(this.options.className)
|
427 |
+
this.container.addClassName(this.options.className);
|
428 |
+
this.positionHandler = this.position.bindAsEventListener(this);
|
429 |
+
this.outOfBoundsPositionHandler = this.ensureInBounds.bindAsEventListener(this);
|
430 |
+
this.bringToFrontHandler = this.bringToFront.bindAsEventListener(this);
|
431 |
+
this.container.observe('mousedown',this.bringToFrontHandler);
|
432 |
+
this.container.hide();
|
433 |
+
this.closeHandler = this.close.bindAsEventListener(this);
|
434 |
+
//iframeshim setup
|
435 |
+
if(this.options.iframeshim){
|
436 |
+
this.iFrameShim = new IframeShim();
|
437 |
+
this.iFrameShim.hide();
|
438 |
+
}
|
439 |
+
//resizable support
|
440 |
+
this.applyResizable();
|
441 |
+
//draggable support
|
442 |
+
this.applyDraggable();
|
443 |
+
|
444 |
+
//makes sure the window can't go out of bounds
|
445 |
+
Event.observe(window,'resize',this.outOfBoundsPositionHandler);
|
446 |
+
|
447 |
+
this.notify('afterInitialize');
|
448 |
+
},
|
449 |
+
open: function(event){
|
450 |
+
if(this.isOpen){
|
451 |
+
this.bringToFront();
|
452 |
+
return false;
|
453 |
+
}
|
454 |
+
if(this.notify('beforeOpen') === false)
|
455 |
+
return false;
|
456 |
+
//closeOnClick
|
457 |
+
if(this.options.closeOnClick){
|
458 |
+
if(this.options.closeOnClick === true)
|
459 |
+
this.closeOnClickContainer = $(document.body);
|
460 |
+
else if(this.options.closeOnClick == 'container')
|
461 |
+
this.closeOnClickContainer = this.container;
|
462 |
+
else if (this.options.closeOnClick == 'overlay'){
|
463 |
+
Control.Overlay.load();
|
464 |
+
this.closeOnClickContainer = Control.Overlay.container;
|
465 |
+
}else
|
466 |
+
this.closeOnClickContainer = $(this.options.closeOnClick);
|
467 |
+
this.closeOnClickContainer.observe('click',this.closeHandler);
|
468 |
+
}
|
469 |
+
if(this.href && !this.options.iframe && !this.remoteContentLoaded){
|
470 |
+
//link to image
|
471 |
+
this.remoteContentLoaded = true;
|
472 |
+
if(this.href.match(/\.(jpe?g|gif|png|tiff?)$/i)){
|
473 |
+
var img = new Element('img');
|
474 |
+
img.observe('load',function(img){
|
475 |
+
this.getRemoteContentInsertionTarget().insert(img);
|
476 |
+
this.position();
|
477 |
+
if(this.notify('onRemoteContentLoaded') !== false){
|
478 |
+
if(this.options.indicator)
|
479 |
+
this.hideIndicator();
|
480 |
+
this.finishOpen();
|
481 |
+
}
|
482 |
+
}.bind(this,img));
|
483 |
+
img.writeAttribute('src',this.href);
|
484 |
+
}else{
|
485 |
+
//if this is an ajax window it will only open if the request is successful
|
486 |
+
if(!this.ajaxRequest){
|
487 |
+
if(this.options.indicator)
|
488 |
+
this.showIndicator();
|
489 |
+
this.ajaxRequest = new Ajax.Request(this.href,{
|
490 |
+
method: this.options.method,
|
491 |
+
parameters: this.options.parameters,
|
492 |
+
onComplete: function(request){
|
493 |
+
this.notify('onComplete',request);
|
494 |
+
this.ajaxRequest = false;
|
495 |
+
}.bind(this),
|
496 |
+
onSuccess: function(request){
|
497 |
+
this.getRemoteContentInsertionTarget().insert(request.responseText);
|
498 |
+
this.notify('onSuccess',request);
|
499 |
+
if(this.notify('onRemoteContentLoaded') !== false){
|
500 |
+
if(this.options.indicator)
|
501 |
+
this.hideIndicator();
|
502 |
+
this.finishOpen();
|
503 |
+
}
|
504 |
+
}.bind(this),
|
505 |
+
onFailure: function(request){
|
506 |
+
this.notify('onFailure',request);
|
507 |
+
if(this.options.indicator)
|
508 |
+
this.hideIndicator();
|
509 |
+
}.bind(this),
|
510 |
+
onException: function(request,e){
|
511 |
+
this.notify('onException',request,e);
|
512 |
+
if(this.options.indicator)
|
513 |
+
this.hideIndicator();
|
514 |
+
}.bind(this)
|
515 |
+
});
|
516 |
+
}
|
517 |
+
}
|
518 |
+
return true;
|
519 |
+
}else if(this.options.iframe && !this.remoteContentLoaded){
|
520 |
+
//iframe
|
521 |
+
this.remoteContentLoaded = true;
|
522 |
+
if(this.options.indicator)
|
523 |
+
this.showIndicator();
|
524 |
+
this.getRemoteContentInsertionTarget().insert(Control.Window.iframeTemplate.evaluate({
|
525 |
+
href: this.href
|
526 |
+
}));
|
527 |
+
var iframe = this.container.down('iframe');
|
528 |
+
iframe.onload = function(){
|
529 |
+
this.notify('onRemoteContentLoaded');
|
530 |
+
if(this.options.indicator)
|
531 |
+
this.hideIndicator();
|
532 |
+
iframe.onload = null;
|
533 |
+
}.bind(this);
|
534 |
+
}
|
535 |
+
this.finishOpen(event);
|
536 |
+
return true
|
537 |
+
},
|
538 |
+
close: function(event){ //event may or may not be present
|
539 |
+
if(!this.isOpen || this.notify('beforeClose',event) === false)
|
540 |
+
return false;
|
541 |
+
if(this.options.closeOnClick)
|
542 |
+
this.closeOnClickContainer.stopObserving('click',this.closeHandler);
|
543 |
+
if(this.options.fade){
|
544 |
+
this.effects.fade = new Effect.Fade(this.container,{
|
545 |
+
queue: {
|
546 |
+
position: 'front',
|
547 |
+
scope: 'Control.Window' + this.numberInSequence
|
548 |
+
},
|
549 |
+
from: 1,
|
550 |
+
to: 0,
|
551 |
+
duration: this.options.fadeDuration / 2,
|
552 |
+
afterFinish: function(){
|
553 |
+
if(this.iFrameShim)
|
554 |
+
this.iFrameShim.hide();
|
555 |
+
this.isOpen = false;
|
556 |
+
this.notify('afterClose');
|
557 |
+
}.bind(this)
|
558 |
+
});
|
559 |
+
}else{
|
560 |
+
this.container.hide();
|
561 |
+
if(this.iFrameShim)
|
562 |
+
this.iFrameShim.hide();
|
563 |
+
}
|
564 |
+
if(this.ajaxRequest)
|
565 |
+
this.ajaxRequest.transport.abort();
|
566 |
+
if(!(this.options.draggable || this.options.resizable) && this.options.position == 'center')
|
567 |
+
Event.stopObserving(window,'resize',this.positionHandler);
|
568 |
+
if(!this.options.draggable && this.options.position == 'center')
|
569 |
+
Event.stopObserving(window,'scroll',this.positionHandler);
|
570 |
+
if(this.options.indicator)
|
571 |
+
this.hideIndicator();
|
572 |
+
if(!this.options.fade){
|
573 |
+
this.isOpen = false;
|
574 |
+
this.notify('afterClose');
|
575 |
+
}
|
576 |
+
return true;
|
577 |
+
},
|
578 |
+
position: function(event){
|
579 |
+
//this is up top for performance reasons
|
580 |
+
if(this.options.position == 'mouse'){
|
581 |
+
var xy = [Event.pointerX(event),Event.pointerY(event)];
|
582 |
+
this.container.setStyle({
|
583 |
+
top: xy[1] + $value(this.options.offsetTop) + 'px',
|
584 |
+
left: xy[0] + $value(this.options.offsetLeft) + 'px'
|
585 |
+
});
|
586 |
+
return;
|
587 |
+
}
|
588 |
+
var container_dimensions = this.container.getDimensions();
|
589 |
+
var viewport_dimensions = document.viewport.getDimensions();
|
590 |
+
Position.prepare();
|
591 |
+
var offset_left = (Position.deltaX + Math.floor((viewport_dimensions.width - container_dimensions.width) / 2));
|
592 |
+
var offset_top = (Position.deltaY + ((viewport_dimensions.height > container_dimensions.height) ? Math.floor((viewport_dimensions.height - container_dimensions.height) / 2) : 0));
|
593 |
+
if(this.options.position == 'center' || this.options.position == 'center_once'){
|
594 |
+
this.container.setStyle({
|
595 |
+
top: (container_dimensions.height <= viewport_dimensions.height) ? ((offset_top != null && offset_top > 0) ? offset_top : 0) + 'px' : 0,
|
596 |
+
left: (container_dimensions.width <= viewport_dimensions.width) ? ((offset_left != null && offset_left > 0) ? offset_left : 0) + 'px' : 0
|
597 |
+
});
|
598 |
+
}else if(this.options.position == 'relative'){
|
599 |
+
var xy = this.sourceContainer.cumulativeOffset();
|
600 |
+
var top = xy[1] + $value(this.options.offsetTop);
|
601 |
+
var left = xy[0] + $value(this.options.offsetLeft);
|
602 |
+
this.container.setStyle({
|
603 |
+
top: (container_dimensions.height <= viewport_dimensions.height) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.height - (container_dimensions.height),top)) : top) + 'px' : 0,
|
604 |
+
left: (container_dimensions.width <= viewport_dimensions.width) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.width - (container_dimensions.width),left)) : left) + 'px' : 0
|
605 |
+
});
|
606 |
+
}else if(this.options.position.length){
|
607 |
+
var top = $value(this.options.position[1]) + $value(this.options.offsetTop);
|
608 |
+
var left = $value(this.options.position[0]) + $value(this.options.offsetLeft);
|
609 |
+
this.container.setStyle({
|
610 |
+
top: (container_dimensions.height <= viewport_dimensions.height) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.height - (container_dimensions.height),top)) : top) + 'px' : 0,
|
611 |
+
left: (container_dimensions.width <= viewport_dimensions.width) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.width - (container_dimensions.width),left)) : left) + 'px' : 0
|
612 |
+
});
|
613 |
+
}
|
614 |
+
if(this.iFrameShim)
|
615 |
+
this.updateIFrameShimZIndex();
|
616 |
+
},
|
617 |
+
ensureInBounds: function(){
|
618 |
+
if(!this.isOpen)
|
619 |
+
return;
|
620 |
+
var viewport_dimensions = document.viewport.getDimensions();
|
621 |
+
var container_offset = this.container.cumulativeOffset();
|
622 |
+
var container_dimensions = this.container.getDimensions();
|
623 |
+
if(container_offset.left + container_dimensions.width > viewport_dimensions.width){
|
624 |
+
this.container.setStyle({
|
625 |
+
left: (Math.max(0,viewport_dimensions.width - container_dimensions.width)) + 'px'
|
626 |
+
});
|
627 |
+
}
|
628 |
+
if(container_offset.top + container_dimensions.height > viewport_dimensions.height){
|
629 |
+
this.container.setStyle({
|
630 |
+
top: (Math.max(0,viewport_dimensions.height - container_dimensions.height)) + 'px'
|
631 |
+
});
|
632 |
+
}
|
633 |
+
},
|
634 |
+
bringToFront: function(){
|
635 |
+
Control.Window.bringToFront(this);
|
636 |
+
this.notify('bringToFront');
|
637 |
+
},
|
638 |
+
destroy: function(){
|
639 |
+
this.container.stopObserving('mousedown',this.bringToFrontHandler);
|
640 |
+
if(this.draggable){
|
641 |
+
Draggables.removeObserver(this.container);
|
642 |
+
this.draggable.handle.stopObserving('mousedown',this.bringToFrontHandler);
|
643 |
+
this.draggable.destroy();
|
644 |
+
}
|
645 |
+
if(this.resizable){
|
646 |
+
Resizables.removeObserver(this.container);
|
647 |
+
this.resizable.handle.stopObserving('mousedown',this.bringToFrontHandler);
|
648 |
+
this.resizable.destroy();
|
649 |
+
}
|
650 |
+
if(this.container && !this.sourceContainer)
|
651 |
+
this.container.remove();
|
652 |
+
if(this.sourceContainer){
|
653 |
+
if(this.options.hover){
|
654 |
+
this.sourceContainer.stopObserving('mouseenter',this.sourceContainerOpenHandler);
|
655 |
+
this.sourceContainer.stopObserving('mouseleave',this.sourceContainerCloseHandler);
|
656 |
+
if(this.options.position == 'mouse')
|
657 |
+
this.sourceContainer.stopObserving('mousemove',this.sourceContainerMouseMoveHandler);
|
658 |
+
}else
|
659 |
+
this.sourceContainer.stopObserving('click',this.sourceContainerOpenHandler);
|
660 |
+
}
|
661 |
+
if(this.iFrameShim)
|
662 |
+
this.iFrameShim.destroy();
|
663 |
+
Event.stopObserving(window,'resize',this.outOfBoundsPositionHandler);
|
664 |
+
Control.Window.windows = Control.Window.windows.without(this);
|
665 |
+
this.notify('afterDestroy');
|
666 |
+
},
|
667 |
+
//private
|
668 |
+
applyResizable: function(){
|
669 |
+
if(this.options.resizable){
|
670 |
+
if(typeof(Resizable) == "undefined")
|
671 |
+
throw "Control.Window requires resizable.js to be loaded.";
|
672 |
+
var resizable_handle = null;
|
673 |
+
if(this.options.resizable === true){
|
674 |
+
resizable_handle = new Element('div',{
|
675 |
+
className: 'resizable_handle'
|
676 |
+
});
|
677 |
+
this.container.insert(resizable_handle);
|
678 |
+
}else
|
679 |
+
resizable_handle = $(this.options.resziable);
|
680 |
+
this.resizable = new Resizable(this.container,{
|
681 |
+
handle: resizable_handle,
|
682 |
+
minHeight: this.options.minHeight,
|
683 |
+
minWidth: this.options.minWidth,
|
684 |
+
maxHeight: this.options.constrainToViewport ? function(element){
|
685 |
+
//viewport height - top - total border height
|
686 |
+
return (document.viewport.getDimensions().height - parseInt(element.style.top || 0)) - (element.getHeight() - parseInt(element.style.height || 0));
|
687 |
+
} : this.options.maxHeight,
|
688 |
+
maxWidth: this.options.constrainToViewport ? function(element){
|
689 |
+
//viewport width - left - total border width
|
690 |
+
return (document.viewport.getDimensions().width - parseInt(element.style.left || 0)) - (element.getWidth() - parseInt(element.style.width || 0));
|
691 |
+
} : this.options.maxWidth
|
692 |
+
});
|
693 |
+
this.resizable.handle.observe('mousedown',this.bringToFrontHandler);
|
694 |
+
Resizables.addObserver(new Control.Window.LayoutUpdateObserver(this,function(){
|
695 |
+
if(this.iFrameShim)
|
696 |
+
this.updateIFrameShimZIndex();
|
697 |
+
this.notify('onResize');
|
698 |
+
}.bind(this)));
|
699 |
+
}
|
700 |
+
},
|
701 |
+
applyDraggable: function(){
|
702 |
+
if(this.options.draggable){
|
703 |
+
if(typeof(Draggables) == "undefined")
|
704 |
+
throw "Control.Window requires dragdrop.js to be loaded.";
|
705 |
+
var draggable_handle = null;
|
706 |
+
if(this.options.draggable === true){
|
707 |
+
draggable_handle = new Element('div',{
|
708 |
+
className: 'draggable_handle'
|
709 |
+
});
|
710 |
+
this.container.insert(draggable_handle);
|
711 |
+
}else
|
712 |
+
draggable_handle = $(this.options.draggable);
|
713 |
+
this.draggable = new Draggable(this.container,{
|
714 |
+
handle: draggable_handle,
|
715 |
+
constrainToViewport: this.options.constrainToViewport,
|
716 |
+
zindex: this.container.getStyle('z-index'),
|
717 |
+
starteffect: function(){
|
718 |
+
if(Prototype.Browser.IE){
|
719 |
+
this.old_onselectstart = document.onselectstart;
|
720 |
+
document.onselectstart = function(){
|
721 |
+
return false;
|
722 |
+
};
|
723 |
+
}
|
724 |
+
}.bind(this),
|
725 |
+
endeffect: function(){
|
726 |
+
document.onselectstart = this.old_onselectstart;
|
727 |
+
}.bind(this)
|
728 |
+
});
|
729 |
+
this.draggable.handle.observe('mousedown',this.bringToFrontHandler);
|
730 |
+
Draggables.addObserver(new Control.Window.LayoutUpdateObserver(this,function(){
|
731 |
+
if(this.iFrameShim)
|
732 |
+
this.updateIFrameShimZIndex();
|
733 |
+
this.notify('onDrag');
|
734 |
+
}.bind(this)));
|
735 |
+
}
|
736 |
+
},
|
737 |
+
createDefaultContainer: function(container){
|
738 |
+
if(!this.container){
|
739 |
+
//no container passed or found, create it
|
740 |
+
this.container = new Element('div',{
|
741 |
+
id: 'control_window_' + this.numberInSequence
|
742 |
+
});
|
743 |
+
$(document.body).insert(this.container);
|
744 |
+
if(typeof(container) == "string" && $(container) == null && !container.match(/^#(.+)$/) && !container.match(Control.Window.uriRegex))
|
745 |
+
this.container.update(container);
|
746 |
+
}
|
747 |
+
},
|
748 |
+
finishOpen: function(event){
|
749 |
+
this.bringToFront();
|
750 |
+
if(this.options.fade){
|
751 |
+
if(typeof(Effect) == "undefined")
|
752 |
+
throw "Control.Window requires effects.js to be loaded."
|
753 |
+
if(this.effects.fade)
|
754 |
+
this.effects.fade.cancel();
|
755 |
+
this.effects.appear = new Effect.Appear(this.container,{
|
756 |
+
queue: {
|
757 |
+
position: 'end',
|
758 |
+
scope: 'Control.Window.' + this.numberInSequence
|
759 |
+
},
|
760 |
+
from: 0,
|
761 |
+
to: 1,
|
762 |
+
duration: this.options.fadeDuration / 2,
|
763 |
+
afterFinish: function(){
|
764 |
+
if(this.iFrameShim)
|
765 |
+
this.updateIFrameShimZIndex();
|
766 |
+
this.isOpen = true;
|
767 |
+
this.notify('afterOpen');
|
768 |
+
}.bind(this)
|
769 |
+
});
|
770 |
+
}else
|
771 |
+
this.container.show();
|
772 |
+
this.position(event);
|
773 |
+
if(!(this.options.draggable || this.options.resizable) && this.options.position == 'center')
|
774 |
+
Event.observe(window,'resize',this.positionHandler,false);
|
775 |
+
if(!this.options.draggable && this.options.position == 'center')
|
776 |
+
Event.observe(window,'scroll',this.positionHandler,false);
|
777 |
+
if(!this.options.fade){
|
778 |
+
this.isOpen = true;
|
779 |
+
this.notify('afterOpen');
|
780 |
+
}
|
781 |
+
return true;
|
782 |
+
},
|
783 |
+
showIndicator: function(){
|
784 |
+
this.showIndicatorTimeout = window.setTimeout(function(){
|
785 |
+
if(this.options.fade){
|
786 |
+
this.indicatorEffects.appear = new Effect.Appear(this.indicator,{
|
787 |
+
queue: {
|
788 |
+
position: 'front',
|
789 |
+
scope: 'Control.Window.indicator.' + this.numberInSequence
|
790 |
+
},
|
791 |
+
from: 0,
|
792 |
+
to: 1,
|
793 |
+
duration: this.options.fadeDuration / 2
|
794 |
+
});
|
795 |
+
}else
|
796 |
+
this.indicator.show();
|
797 |
+
}.bind(this),Control.Window.indicatorTimeout);
|
798 |
+
},
|
799 |
+
hideIndicator: function(){
|
800 |
+
if(this.showIndicatorTimeout)
|
801 |
+
window.clearTimeout(this.showIndicatorTimeout);
|
802 |
+
this.indicator.hide();
|
803 |
+
},
|
804 |
+
getRemoteContentInsertionTarget: function(){
|
805 |
+
return typeof(this.options.insertRemoteContentAt) == "string" ? this.container.down(this.options.insertRemoteContentAt) : $(this.options.insertRemoteContentAt);
|
806 |
+
},
|
807 |
+
updateIFrameShimZIndex: function(){
|
808 |
+
if(this.iFrameShim)
|
809 |
+
this.iFrameShim.positionUnder(this.container);
|
810 |
+
}
|
811 |
+
});
|
812 |
+
//class methods
|
813 |
+
Object.extend(Control.Window,{
|
814 |
+
windows: [],
|
815 |
+
baseZIndex: 9999,
|
816 |
+
indicatorTimeout: 250,
|
817 |
+
iframeTemplate: new Template('<iframe src="#{href}" width="100%" height="100%" frameborder="0" allowtransparency="true"></iframe>'),
|
818 |
+
uriRegex: /^(\/|\#|https?\:\/\/|[\w]+\/)/,
|
819 |
+
bringToFront: function(w){
|
820 |
+
Control.Window.windows = Control.Window.windows.without(w);
|
821 |
+
Control.Window.windows.push(w);
|
822 |
+
Control.Window.windows.each(function(w,i){
|
823 |
+
var z_index = Control.Window.baseZIndex + i;
|
824 |
+
w.container.setStyle({
|
825 |
+
zIndex: z_index
|
826 |
+
});
|
827 |
+
if(w.isOpen){
|
828 |
+
if(w.iFrameShim)
|
829 |
+
w.updateIFrameShimZIndex();
|
830 |
+
}
|
831 |
+
if(w.options.draggable)
|
832 |
+
w.draggable.options.zindex = z_index;
|
833 |
+
});
|
834 |
+
},
|
835 |
+
open: function(container,options){
|
836 |
+
var w = new Control.Window(container,options);
|
837 |
+
w.open();
|
838 |
+
return w;
|
839 |
+
},
|
840 |
+
//protected
|
841 |
+
initialZIndexForWindow: function(w){
|
842 |
+
return Control.Window.baseZIndex + (Control.Window.windows.length - 1);
|
843 |
+
}
|
844 |
+
});
|
845 |
+
Object.Event.extend(Control.Window);
|
846 |
+
|
847 |
+
//this is the observer for both Resizables and Draggables
|
848 |
+
Control.Window.LayoutUpdateObserver = Class.create({
|
849 |
+
initialize: function(w,observer){
|
850 |
+
this.w = w;
|
851 |
+
this.element = $(w.container);
|
852 |
+
this.observer = observer;
|
853 |
+
},
|
854 |
+
onStart: Prototype.emptyFunction,
|
855 |
+
onEnd: function(event_name,instance){
|
856 |
+
if(instance.element == this.element && this.iFrameShim)
|
857 |
+
this.w.updateIFrameShimZIndex();
|
858 |
+
},
|
859 |
+
onResize: function(event_name,instance){
|
860 |
+
if(instance.element == this.element)
|
861 |
+
this.observer(this.element);
|
862 |
+
},
|
863 |
+
onDrag: function(event_name,instance){
|
864 |
+
if(instance.element == this.element)
|
865 |
+
this.observer(this.element);
|
866 |
+
}
|
867 |
+
});
|
868 |
+
|
869 |
+
//overlay for Control.Modal
|
870 |
+
Control.Overlay = {
|
871 |
+
id: 'control_overlay',
|
872 |
+
loaded: false,
|
873 |
+
container: false,
|
874 |
+
lastOpacity: 0,
|
875 |
+
getStyles: function() {
|
876 |
+
return {
|
877 |
+
position: 'fixed',
|
878 |
+
top: 0,
|
879 |
+
left: 0,
|
880 |
+
width: '100%',
|
881 |
+
height: '100%',
|
882 |
+
zIndex: Control.Window.baseZIndex - 1
|
883 |
+
};
|
884 |
+
},
|
885 |
+
getIeStyles: function() {
|
886 |
+
return {
|
887 |
+
position: 'absolute',
|
888 |
+
top: 0,
|
889 |
+
left: 0,
|
890 |
+
zIndex: Control.Window.baseZIndex - 1
|
891 |
+
};
|
892 |
+
},
|
893 |
+
effects: {
|
894 |
+
fade: false,
|
895 |
+
appear: false
|
896 |
+
},
|
897 |
+
load: function(){
|
898 |
+
if(Control.Overlay.loaded)
|
899 |
+
return false;
|
900 |
+
Control.Overlay.loaded = true;
|
901 |
+
Control.Overlay.container = new Element('div',{
|
902 |
+
id: Control.Overlay.id
|
903 |
+
});
|
904 |
+
$(document.body).insert(Control.Overlay.container);
|
905 |
+
if(Prototype.Browser.IE){
|
906 |
+
Control.Overlay.container.setStyle(Control.Overlay.getIeStyles());
|
907 |
+
Event.observe(window,'scroll',Control.Overlay.positionOverlay);
|
908 |
+
Event.observe(window,'resize',Control.Overlay.positionOverlay);
|
909 |
+
Control.Overlay.observe('beforeShow',Control.Overlay.positionOverlay);
|
910 |
+
}else
|
911 |
+
Control.Overlay.container.setStyle(Control.Overlay.getStyles());
|
912 |
+
Control.Overlay.iFrameShim = new IframeShim();
|
913 |
+
Control.Overlay.iFrameShim.hide();
|
914 |
+
Event.observe(window,'resize',Control.Overlay.positionIFrameShim);
|
915 |
+
Control.Overlay.container.hide();
|
916 |
+
return true;
|
917 |
+
},
|
918 |
+
unload: function(){
|
919 |
+
if(!Control.Overlay.loaded)
|
920 |
+
return false;
|
921 |
+
Event.stopObserving(window,'resize',Control.Overlay.positionOverlay);
|
922 |
+
Control.Overlay.stopObserving('beforeShow',Control.Overlay.positionOverlay);
|
923 |
+
Event.stopObserving(window,'resize',Control.Overlay.positionIFrameShim);
|
924 |
+
Control.Overlay.iFrameShim.destroy();
|
925 |
+
Control.Overlay.container.remove();
|
926 |
+
Control.Overlay.loaded = false;
|
927 |
+
return true;
|
928 |
+
},
|
929 |
+
show: function(opacity,fade){
|
930 |
+
if(Control.Overlay.notify('beforeShow') === false)
|
931 |
+
return false;
|
932 |
+
Control.Overlay.lastOpacity = opacity;
|
933 |
+
Control.Overlay.positionIFrameShim();
|
934 |
+
Control.Overlay.iFrameShim.show();
|
935 |
+
if(fade){
|
936 |
+
if(typeof(Effect) == "undefined")
|
937 |
+
throw "Control.Window requires effects.js to be loaded."
|
938 |
+
if(Control.Overlay.effects.fade)
|
939 |
+
Control.Overlay.effects.fade.cancel();
|
940 |
+
Control.Overlay.effects.appear = new Effect.Appear(Control.Overlay.container,{
|
941 |
+
queue: {
|
942 |
+
position: 'end',
|
943 |
+
scope: 'Control.Overlay'
|
944 |
+
},
|
945 |
+
afterFinish: function(){
|
946 |
+
Control.Overlay.notify('afterShow');
|
947 |
+
},
|
948 |
+
from: 0,
|
949 |
+
to: Control.Overlay.lastOpacity,
|
950 |
+
duration: (fade === true ? 0.75 : fade) / 2
|
951 |
+
});
|
952 |
+
}else{
|
953 |
+
Control.Overlay.container.setStyle({
|
954 |
+
opacity: opacity || 1
|
955 |
+
});
|
956 |
+
Control.Overlay.container.show();
|
957 |
+
Control.Overlay.notify('afterShow');
|
958 |
+
}
|
959 |
+
return true;
|
960 |
+
},
|
961 |
+
hide: function(fade){
|
962 |
+
if(Control.Overlay.notify('beforeHide') === false)
|
963 |
+
return false;
|
964 |
+
if(Control.Overlay.effects.appear)
|
965 |
+
Control.Overlay.effects.appear.cancel();
|
966 |
+
Control.Overlay.iFrameShim.hide();
|
967 |
+
if(fade){
|
968 |
+
Control.Overlay.effects.fade = new Effect.Fade(Control.Overlay.container,{
|
969 |
+
queue: {
|
970 |
+
position: 'front',
|
971 |
+
scope: 'Control.Overlay'
|
972 |
+
},
|
973 |
+
afterFinish: function(){
|
974 |
+
Control.Overlay.notify('afterHide');
|
975 |
+
},
|
976 |
+
from: Control.Overlay.lastOpacity,
|
977 |
+
to: 0,
|
978 |
+
duration: (fade === true ? 0.75 : fade) / 2
|
979 |
+
});
|
980 |
+
}else{
|
981 |
+
Control.Overlay.container.hide();
|
982 |
+
Control.Overlay.notify('afterHide');
|
983 |
+
}
|
984 |
+
return true;
|
985 |
+
},
|
986 |
+
positionIFrameShim: function(){
|
987 |
+
if(Control.Overlay.container.visible())
|
988 |
+
Control.Overlay.iFrameShim.positionUnder(Control.Overlay.container);
|
989 |
+
},
|
990 |
+
//IE only
|
991 |
+
positionOverlay: function(){
|
992 |
+
Control.Overlay.container.setStyle({
|
993 |
+
width: document.body.clientWidth + 'px',
|
994 |
+
height: document.body.clientHeight + 'px'
|
995 |
+
});
|
996 |
+
}
|
997 |
+
};
|
998 |
+
Object.Event.extend(Control.Overlay);
|
999 |
+
|
1000 |
+
Control.ToolTip = Class.create(Control.Window,{
|
1001 |
+
initialize: function($super,container,tooltip,options){
|
1002 |
+
$super(tooltip,Object.extend(Object.extend(Object.clone(Control.ToolTip.defaultOptions),options || {}),{
|
1003 |
+
position: 'mouse',
|
1004 |
+
hover: container
|
1005 |
+
}));
|
1006 |
+
}
|
1007 |
+
});
|
1008 |
+
Object.extend(Control.ToolTip,{
|
1009 |
+
defaultOptions: {
|
1010 |
+
offsetLeft: 10
|
1011 |
+
}
|
1012 |
+
});
|
1013 |
+
|
1014 |
+
Control.Modal = Class.create(Control.Window,{
|
1015 |
+
initialize: function($super,container,options){
|
1016 |
+
Control.Modal.InstanceMethods.beforeInitialize.bind(this)();
|
1017 |
+
$super(container,Object.extend(Object.clone(Control.Modal.defaultOptions),options || {}));
|
1018 |
+
},
|
1019 |
+
closeWithoutOverlay: function(){
|
1020 |
+
this.keepOverlay = true;
|
1021 |
+
this.close();
|
1022 |
+
}
|
1023 |
+
});
|
1024 |
+
Object.extend(Control.Modal,{
|
1025 |
+
defaultOptions: {
|
1026 |
+
overlayOpacity: 0.5,
|
1027 |
+
closeOnClick: 'overlay'
|
1028 |
+
},
|
1029 |
+
current: false,
|
1030 |
+
open: function(container,options){
|
1031 |
+
var modal = new Control.Modal(container,options);
|
1032 |
+
modal.open();
|
1033 |
+
return modal;
|
1034 |
+
},
|
1035 |
+
close: function(){
|
1036 |
+
if(Control.Modal.current)
|
1037 |
+
Control.Modal.current.close();
|
1038 |
+
},
|
1039 |
+
InstanceMethods: {
|
1040 |
+
beforeInitialize: function(){
|
1041 |
+
Control.Overlay.load();
|
1042 |
+
this.observe('beforeOpen',Control.Modal.Observers.beforeOpen.bind(this));
|
1043 |
+
this.observe('afterOpen',Control.Modal.Observers.afterOpen.bind(this));
|
1044 |
+
this.observe('afterClose',Control.Modal.Observers.afterClose.bind(this));
|
1045 |
+
}
|
1046 |
+
},
|
1047 |
+
Observers: {
|
1048 |
+
beforeOpen: function(){
|
1049 |
+
Control.Window.windows.without(this).each(function(w){
|
1050 |
+
if(w.closeWithoutOverlay && w.isOpen){
|
1051 |
+
w.closeWithoutOverlay();
|
1052 |
+
}else{
|
1053 |
+
w.close();
|
1054 |
+
}
|
1055 |
+
});
|
1056 |
+
if(!Control.Overlay.overlayFinishedOpening){
|
1057 |
+
Control.Overlay.observeOnce('afterShow',function(){
|
1058 |
+
Control.Overlay.overlayFinishedOpening = true;
|
1059 |
+
this.open();
|
1060 |
+
}.bind(this));
|
1061 |
+
Control.Overlay.show(this.options.overlayOpacity,this.options.fade ? this.options.fadeDuration : false);
|
1062 |
+
throw $break;
|
1063 |
+
}
|
1064 |
+
},
|
1065 |
+
afterOpen: function(){
|
1066 |
+
Control.Overlay.show(this.options.overlayOpacity);
|
1067 |
+
Control.Overlay.overlayFinishedOpening = true;
|
1068 |
+
Control.Modal.current = this;
|
1069 |
+
},
|
1070 |
+
afterClose: function(){
|
1071 |
+
if(!this.keepOverlay){
|
1072 |
+
Control.Overlay.hide(this.options.fade ? this.options.fadeDuration : false);
|
1073 |
+
Control.Overlay.overlayFinishedOpening = false;
|
1074 |
+
}
|
1075 |
+
this.keepOverlay = false;
|
1076 |
+
Control.Modal.current = false;
|
1077 |
+
}
|
1078 |
+
}
|
1079 |
+
});
|
1080 |
+
|
1081 |
+
Control.LightBox = Class.create(Control.Window,{
|
1082 |
+
initialize: function($super,container,options){
|
1083 |
+
this.allImagesLoaded = false;
|
1084 |
+
if(options.modal){
|
1085 |
+
var options = Object.extend(Object.clone(Control.LightBox.defaultOptions),options || {});
|
1086 |
+
options = Object.extend(Object.clone(Control.Modal.defaultOptions),options);
|
1087 |
+
options = Control.Modal.InstanceMethods.beforeInitialize.bind(this)(options);
|
1088 |
+
$super(container,options);
|
1089 |
+
}else
|
1090 |
+
$super(container,Object.extend(Object.clone(Control.LightBox.defaultOptions),options || {}));
|
1091 |
+
this.hasRemoteContent = this.href && !this.options.iframe;
|
1092 |
+
if(this.hasRemoteContent)
|
1093 |
+
this.observe('onRemoteContentLoaded',Control.LightBox.Observers.onRemoteContentLoaded.bind(this));
|
1094 |
+
else
|
1095 |
+
this.applyImageObservers();
|
1096 |
+
this.observe('beforeOpen',Control.LightBox.Observers.beforeOpen.bind(this));
|
1097 |
+
},
|
1098 |
+
applyImageObservers:function(){
|
1099 |
+
var images = this.getImages();
|
1100 |
+
this.numberImagesToLoad = images.length;
|
1101 |
+
this.numberofImagesLoaded = 0;
|
1102 |
+
images.each(function(image){
|
1103 |
+
image.observe('load',function(image){
|
1104 |
+
++this.numberofImagesLoaded;
|
1105 |
+
if(this.numberImagesToLoad == this.numberofImagesLoaded){
|
1106 |
+
this.allImagesLoaded = true;
|
1107 |
+
this.onAllImagesLoaded();
|
1108 |
+
}
|
1109 |
+
}.bind(this,image));
|
1110 |
+
image.hide();
|
1111 |
+
}.bind(this));
|
1112 |
+
},
|
1113 |
+
onAllImagesLoaded: function(){
|
1114 |
+
this.getImages().each(function(image){
|
1115 |
+
this.showImage(image);
|
1116 |
+
}.bind(this));
|
1117 |
+
if(this.hasRemoteContent){
|
1118 |
+
if(this.options.indicator)
|
1119 |
+
this.hideIndicator();
|
1120 |
+
this.finishOpen();
|
1121 |
+
}else
|
1122 |
+
this.open();
|
1123 |
+
},
|
1124 |
+
getImages: function(){
|
1125 |
+
return this.container.select(Control.LightBox.imageSelector);
|
1126 |
+
},
|
1127 |
+
showImage: function(image){
|
1128 |
+
image.show();
|
1129 |
+
}
|
1130 |
+
});
|
1131 |
+
Object.extend(Control.LightBox,{
|
1132 |
+
imageSelector: 'img',
|
1133 |
+
defaultOptions: {},
|
1134 |
+
Observers: {
|
1135 |
+
beforeOpen: function(){
|
1136 |
+
if(!this.hasRemoteContent && !this.allImagesLoaded)
|
1137 |
+
throw $break;
|
1138 |
+
},
|
1139 |
+
onRemoteContentLoaded: function(){
|
1140 |
+
this.applyImageObservers();
|
1141 |
+
if(!this.allImagesLoaded)
|
1142 |
+
throw $break;
|
1143 |
+
}
|
1144 |
+
}
|
1145 |
+
});
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>bpost</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>bpost shipping manager 2015</summary>
|
10 |
<description>bpost shipping manager By PHPro</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>PHPro</name><user>heremke</user><email>info@phpro.be</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Bpost"><dir name="ShM"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="AllOrders"><file name="Grid.php" hash="042d1860e8cbed473f36344cc9219bf7"/></dir><file name="AllOrders.php" hash="c9bed128109004f6007a2c51c0b13687"/><dir name="Grid"><dir name="Renderer"><dir name="Dropdate"><file name="Dateformat.php" hash="dc59c761bbc587cf9d9c3b46881cd5a2"/></dir><dir name="Label"><file name="Download.php" hash="6848a41d5eb1bad1e9da43937e279468"/></dir></dir></dir><file name="Grid.php" hash="ae7c83f9baabda1db4627833d1f4f942"/><dir name="Order"><dir name="View"><dir name="Tab"><file name="Returnbarcode.php" hash="d271b69bca3b77dc0a5a624d56628a1d"/><file name="Returnlabels.php" hash="3a281c4942cf722ab58523e9869113eb"/></dir></dir></dir><dir name="PendingOrders"><file name="Grid.php" hash="bcdc263143e9d4c104b6014da45373f6"/></dir><file name="PendingOrders.php" hash="584198acc69c0fad60ac793238ca6c8f"/></dir><dir name="Shipping"><dir name="Carrier"><dir name="Bpost"><dir name="Tablerate"><dir name="Clickcollect"><file name="Grid.php" hash="8f4a7990122ab6ccdb079f7fe06e75bb"/></dir><dir name="Homedelivery"><file name="Grid.php" hash="edc472d70d53b81685e0f861a50cd4fd"/></dir><dir name="International"><file name="Grid.php" hash="c76e5042c0f6ff9ed96d978f45336c2c"/></dir><dir name="Parcellocker"><file name="Grid.php" hash="f5de661468fc82c0b0a51baad560ebb4"/></dir><dir name="Pickuppoint"><file name="Grid.php" hash="23151dff9b96415cd8648429260481c9"/></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Api"><dir name="Import"><file name="Countries.php" hash="1f2d94c2ffb8f43d81050b7b9da42a42"/></dir></dir><dir name="Field"><file name="Cacheinfo.php" hash="5de9cf047e274154839d2f658c48f9e2"/><file name="Choose.php" hash="ef813927a3ba26302cd8e4c7c5fb62a8"/><file name="Clickcollect.php" hash="b4667cb7e4fe0abcfbc7113f65c859ee"/><file name="Hour.php" hash="763b955bff596cddf2ceabd4ce85816d"/><file name="Info.php" hash="421631d66f10176e4cca80d30df625eb"/><file name="Logo.php" hash="83cc7232c4a0a05b6857aa5e7cd00beb"/><file name="Subheader.php" hash="1b52d6781e07b134c341eae891ac9979"/></dir><dir name="Tablerates"><dir name="Export"><file name="Clickcollect.php" hash="294325998821cba4d98d113c5832d981"/><file name="Homedelivery.php" hash="beb4c5c59ef77d06a425a31d90893255"/><file name="International.php" hash="7806c48c000e996b707e87e58ac1f166"/><file name="Parcellocker.php" hash="e32815fa7846b08318a87c02a7374990"/><file name="Pickuppoint.php" hash="8cb4911d631d257332ce542db49c3672"/></dir></dir></dir></dir></dir></dir><dir name="Carrier"><file name="Bpost.php" hash="31a57fac5a8b4d329c99d25b5b3e0d49"/></dir></dir><dir name="Controller"><dir name="ShM"><file name="Order.php" hash="7ab38959baaf721d9e7fe16bd34e9dab"/></dir></dir><dir name="Helper"><file name="Data.php" hash="bef7d5b51eadc3fd6e91350c8206b073"/><file name="Returnlabel.php" hash="e3fb05a9f08577dfe90866669d3f7613"/><dir name="System"><file name="Config.php" hash="393353ca26ef2b398769ecbb59fdcbf9"/></dir></dir><dir name="Model"><dir name="Adminhtml"><file name="Bpostgrid.php" hash="a8728ed9efdb88b5e67be037153c9304"/><file name="Observer.php" hash="9dc75e175bddf0a49b65e0580ade53a4"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><dir name="Tablerates"><file name="Clickcollect.php" hash="8247e2d2a93a438f79ea71d91b8c01f2"/><file name="Homedelivery.php" hash="26758346e7e09d2b3075cb0613a00b79"/><file name="International.php" hash="c6ba9e8b7e42893a7faf31392e0d647f"/><file name="Parcellocker.php" hash="2fa265b0623de5740b15ea27284a3b47"/><file name="Pickuppoint.php" hash="84ccd80c14f33de89b8164e396ef3241"/></dir></dir></dir><dir name="Source"><file name="Datecomment.php" hash="a67ca74e2f81cbfaec6b7ed0ce8aa9f2"/><file name="Shipping.php" hash="a19f622f5f64ee64c8f8e6667d6d9323"/></dir></dir></dir></dir><dir name="Api"><file name="Abstract.php" hash="0182e46e81d5de01a567254e311cc174"/><file name="Domcreator.php" hash="2c51ab00bd06265d49cb9cbf62605575"/></dir><file name="Api.php" hash="0661d5bd1cc72642faf6e7ec1b4857c6"/><file name="Country.php" hash="7ca2d7fee06b4672ee8679dcc0d437cf"/><file name="Holidays.php" hash="85d3ad2c06516d3bd42d6cf25b6c1c1b"/><file name="Observer.php" hash="429734398830f14aa1a8a79f6d3acd7e"/><dir name="Resource"><dir name="Country"><file name="Collection.php" hash="173cb7acd05ead3fa4bb29f1a2200188"/></dir><file name="Country.php" hash="3ed62dc4bae568879a781400724e2b31"/><dir name="Holidays"><file name="Collection.php" hash="b39c602b1b6c7802a8e298ccabd3b88d"/></dir><file name="Holidays.php" hash="8410fabf516cce95e6e6a69e52abb6ec"/><dir name="Returnlabel"><file name="Collection.php" hash="d34adb537d24116270238ae1fa377a05"/></dir><file name="Returnlabel.php" hash="419fda598a2630ccc773ce0b0eacbd79"/><dir name="Tablerates"><dir name="Clickcollect"><file name="Collection.php" hash="a076e1266785fc9342fc134ac9268280"/></dir><file name="Clickcollect.php" hash="56ab4e22b459339db3190bfbd102d94f"/><dir name="Homedelivery"><file name="Collection.php" hash="7a34c249b5015ecda8ad26cbf42c6280"/></dir><file name="Homedelivery.php" hash="a94baf3909962e162813d8003583cc77"/><dir name="International"><file name="Collection.php" hash="6ba99077f1625a8c81990ea3afcb14b8"/></dir><file name="International.php" hash="ca3e45f29f9ef44f00ff41b509e0f0a1"/><dir name="Parcellocker"><file name="Collection.php" hash="9aa78e0bc7d389e93e958472a0fc40b6"/></dir><file name="Parcellocker.php" hash="66bb509267844a48ff5b054c82a47254"/><dir name="Pickuppoint"><file name="Collection.php" hash="1f9db3d5ff7f1a9e9d2eccddf6860513"/></dir><file name="Pickuppoint.php" hash="33e26bc93dcea5aabbee59343043413d"/></dir></dir><file name="Returnlabel.php" hash="169bca5baa7726cd51e2a76e1b9a35a8"/><dir name="Shipping"><dir name="Carrier"><file name="BpostShM.php" hash="64515e312b7575e6480e44e7e3c12a0d"/></dir><file name="Geocode.php" hash="d613ba4d1e5d14f8698fcfe9dfd03a66"/><dir name="Rate"><file name="Result.php" hash="77e9fc98f15441edfdc478fd589e41a8"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Country.php" hash="f49cbe30d05cffb6f516a3df6ddc1b7b"/><file name="Product.php" hash="cb74b0fc8d3f661d0be4ac9f9c5b840d"/><file name="Ratetypes.php" hash="42f1f3f8dc000ea5e5336ca1ad7ab85c"/><file name="Weightunit.php" hash="e0c0a9975395245c4d16d975c0334c31"/></dir></dir></dir><dir name="Tablerates"><file name="Clickcollect.php" hash="9d589684df3b1b7e11441dc808a9627c"/><file name="Homedelivery.php" hash="d60385de528eb957a2874af6306d4aae"/><file name="International.php" hash="d02e02a7cddbda576530d6acbd6d02e8"/><file name="Parcellocker.php" hash="805a9669f9d024a4c018d611e5c71afd"/><file name="Pickuppoint.php" hash="49dff9f40e26163b8d0c6b8be9f6ee51"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Bpost"><dir name="ShM"><file name="AllOrdersController.php" hash="08df25d3e3718e183c40f68d8722782a"/><file name="ConfigController.php" hash="2537dbc05936e758c6353e46016180f9"/><file name="DownloadController.php" hash="87a534445edd2ff9ae3601fbe99637a5"/><file name="PendingOrdersController.php" hash="300f5472999194f90658737311b94df4"/></dir></dir></dir><file name="AjaxController.php" hash="ba6df7ff9999259273b7414e6bd51f1c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cba525a2c3c394cb15c144f887e081cc"/><file name="config.xml" hash="7d87b7193ad4be6a6736577403ed84c9"/><file name="system.xml" hash="89a58cb287d88eab93df6294b789a9b5"/></dir><dir name="sql"><dir name="bpost_shm_setup"><file name="install-0.0.1.php" hash="441ce29ddd9b04c052f03699e8ecc704"/><file name="upgrade-0.0.1-0.0.2.php" hash="7c5bb7a9609d6bec38a927e07eaad066"/><file name="upgrade-0.0.10-0.1.0.php" hash="c1523f2fd829372143c4686376512b37"/><file name="upgrade-0.0.2-0.0.3.php" hash="7e441f96e071efaa42d629815be8379c"/><file name="upgrade-0.0.3-0.0.4.php" hash="e2009ca70b9b268024433be7ac74ba19"/><file name="upgrade-0.0.4-0.0.5.php" hash="a51391f3bf810a5c6ae5c0bdbc5d9603"/><file name="upgrade-0.0.5-0.0.6.php" hash="2d8d624be7f829029b3e9fceb6d6c3b8"/><file name="upgrade-0.0.6-0.0.7.php" hash="82a7a64e3234c8b6e20367fcc80e1049"/><file name="upgrade-0.0.7-0.0.8.php" hash="a3b337a855d92202b5d625269edf4cb8"/><file name="upgrade-0.0.8-0.0.9.php" hash="20a344294274390515a891a89facfcb3"/><file name="upgrade-0.0.9-0.0.10.php" hash="74d06a2bbf41c5c8d9cb7870898a3eb3"/><file name="upgrade-0.1.0-0.1.1.php" hash="ed824736e9cd0f8e98a4dc62c41ecf96"/><file name="upgrade-0.1.1-0.1.2.php" hash="bb7cf544bc07ef2209b82753ac2b950d"/><file name="upgrade-0.1.2-0.1.3.php" hash="04f9ab295e48b018e80da482bdf23132"/><file name="upgrade-0.1.3-0.1.4.php" hash="9e8f6f1e2522917b8efeb379d21cd953"/><file name="upgrade-0.1.4-0.1.5.php" hash="16333b0f3faa92e98d6bb6f75b4273cd"/><file name="upgrade-0.1.5-0.1.6.php" hash="f2f1f169a5ad2fbd0650ffbef3217b08"/><file name="upgrade-0.1.6-0.1.7.php" hash="95eebc7f870fa36c0a0997a06cb47076"/><file name="upgrade-0.1.7-0.1.8.php" hash="56a4bc5320b56309c943a90df00464e8"/><file name="upgrade-0.1.8-1.1.3.php" hash="d2058a8a86a501111fca4053a1f49ba2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="bpost"><file name="shm.xml" hash="8a5ceb93674efcbd6e8063437877d9d5"/></dir></dir><dir name="template"><dir name="bpost"><file name="empty.phtml" hash="45a92398f5adc3dd6dda9527f95ef4d5"/><file name="informationpopup.phtml" hash="42432ed861bb8b5b34a39d879c164979"/><file name="screenshotpopup.phtml" hash="5ad6a05c55ea41e550262ceed28626ae"/><dir name="widget"><dir name="grid"><file name="massaction.phtml" hash="f9b9aa54fe683d66fd535f95afb07dfe"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="bpost"><file name="shm.xml" hash="7950f7c44cc1b2a10846611251a37501"/></dir></dir><dir name="template"><dir name="bpost"><dir name="shm"><file name="append_bpost_shippingmethod.phtml" hash="36beca46e5a8e2246161fbb807886883"/><file name="gmapsapi.phtml" hash="ac4dea1786701a6968a1c771a54e06fd"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="zBpost_ShM.xml" hash="791aeaa9ddf185a0b053728b20b06ea0"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Bpost_ShM.csv" hash="ed46d79674f4af306343332fca1dd1d2"/><dir name="template"><dir name="email"><dir name="bpost"><file name="returnlabel.html" hash="fa9b1779caf12fe6e8c85e44899e7e66"/><file name="errorhandling_create_order.html" hash="5458114b6bfee6f66841f4fe19e13675"/></dir></dir></dir></dir><dir name="fr_FR"><file name="Bpost_ShM.csv" hash="2c28271ca71add5c1eb748d388c4672e"/></dir><dir name="nl_NL"><file name="Bpost_ShM.csv" hash="bef78c98957327ef45635ab13469c9c1"/></dir></target><target name="mageweb"><dir name="js"><dir name="bpost"><dir name="shm"><dir name="adminhtml"><file name="informationpopup.js" hash="dd25216084d43f70b7de4beaf1ef23c5"/></dir><file name="checkout.js" hash="d0d9d11bb87513f5cf72bfc4a260b432"/><file name="infobox.js" hash="4b42bb1b029f60ecda0ceeabb4726e5d"/><file name="onestepcheckout_shipping.js" hash="5543fb8c7b6b9a4fa03eb11fad70960d"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="bpost"><file name="checkout.css" hash="b085e5c58f8068bbb491eb9b929db40d"/></dir></dir><dir name="images"><dir name="bpost"><file name="ajax-loader-button.gif" hash="cbdad94ec5d22b17d7aae4c6d245069a"/><file name="ajax-loader-wheel.gif" hash="faa74e8c61fc64d5edb11613c7eead2c"/><file name="bpost_logo_RGB72_L.png" hash="ca8a5de3a37cfbbdac7c0fec6e4f9f28"/><file name="bpost_logo_RGB72_M.png" hash="feb4bb3bb7c9c4100612b62cde7037e5"/><file name="bpost_sym_RGB72_S.png" hash="18e774a968be600664d11a9e0691a424"/><file name="btn_close.png" hash="d6ecac0a01a600ef15efc9004ccc9fb7"/><file name="icon-close.png" hash="54d0827f50c1d294c61e88e316e61059"/><file name="icon-info.png" hash="e4de51e3c12327403a9b966aac98a9d6"/><file name="location_clickcollect_default.png" hash="dba619d29c0013538003f3fec98da652"/><file name="location_parcellocker_default.png" hash="8906b0e09067eab6f31b712d54ecf547"/><file name="location_postoffice_default.png" hash="ea147b38b01449e8a1cff3ebff6b2741"/><file name="location_postpoint_default.png" hash="c53f598daafbec4d042b165d21116719"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir><dir name="js"><dir name="bpost"><file name="onestepcheckout.js" hash="a0e4b3df8643ffaa798e679fe20f116c"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="bpost"><file name="informationpopup.css" hash="bffce6ef1182a763f626a0b3288b3887"/></dir></dir><dir name="images"><dir name="bpost"><file name="ajax-loader-red.gif" hash="7bf0fa0e5a55c6a7cd122a9bb461006d"/><file name="bpost_logo_RGB72_L.png" hash="ca8a5de3a37cfbbdac7c0fec6e4f9f28"/><file name="bpost_logo_RGB72_M.png" hash="feb4bb3bb7c9c4100612b62cde7037e5"/><file name="btn_close.png" hash="d6ecac0a01a600ef15efc9004ccc9fb7"/><file name="ce-screenshot.png" hash="ff6f4a630cd17efc1abbe8eca6e015a5"/><file name="ee-screenshot.png" hash="ff6f4a630cd17efc1abbe8eca6e015a5"/><file name="pdf_icon.png" hash="95b561422892384337eb2eabb968a558"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.2.0</min><max>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>bpost</name>
|
4 |
+
<version>1.3.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>bpost shipping manager 2015</summary>
|
10 |
<description>bpost shipping manager By PHPro</description>
|
11 |
+
<notes>Onestepcheckout compatibility 4.5.5 and pickup points fix</notes>
|
12 |
<authors><author><name>PHPro</name><user>heremke</user><email>info@phpro.be</email></author></authors>
|
13 |
+
<date>2016-06-03</date>
|
14 |
+
<time>12:04:10</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Bpost"><dir name="ShM"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="AllOrders"><file name="Grid.php" hash="042d1860e8cbed473f36344cc9219bf7"/></dir><file name="AllOrders.php" hash="c9bed128109004f6007a2c51c0b13687"/><dir name="Grid"><dir name="Renderer"><dir name="Dropdate"><file name="Dateformat.php" hash="dc59c761bbc587cf9d9c3b46881cd5a2"/></dir><dir name="Label"><file name="Download.php" hash="6848a41d5eb1bad1e9da43937e279468"/></dir></dir></dir><file name="Grid.php" hash="ae7c83f9baabda1db4627833d1f4f942"/><dir name="Order"><dir name="View"><dir name="Tab"><file name="Returnbarcode.php" hash="d271b69bca3b77dc0a5a624d56628a1d"/><file name="Returnlabels.php" hash="3a281c4942cf722ab58523e9869113eb"/></dir></dir></dir><dir name="PendingOrders"><file name="Grid.php" hash="bcdc263143e9d4c104b6014da45373f6"/></dir><file name="PendingOrders.php" hash="584198acc69c0fad60ac793238ca6c8f"/></dir><dir name="Shipping"><dir name="Carrier"><dir name="Bpost"><dir name="Tablerate"><dir name="Clickcollect"><file name="Grid.php" hash="8f4a7990122ab6ccdb079f7fe06e75bb"/></dir><dir name="Homedelivery"><file name="Grid.php" hash="edc472d70d53b81685e0f861a50cd4fd"/></dir><dir name="International"><file name="Grid.php" hash="c76e5042c0f6ff9ed96d978f45336c2c"/></dir><dir name="Parcellocker"><file name="Grid.php" hash="f5de661468fc82c0b0a51baad560ebb4"/></dir><dir name="Pickuppoint"><file name="Grid.php" hash="23151dff9b96415cd8648429260481c9"/></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Api"><dir name="Import"><file name="Countries.php" hash="1f2d94c2ffb8f43d81050b7b9da42a42"/></dir></dir><dir name="Field"><file name="Cacheinfo.php" hash="5de9cf047e274154839d2f658c48f9e2"/><file name="Choose.php" hash="ef813927a3ba26302cd8e4c7c5fb62a8"/><file name="Clickcollect.php" hash="b4667cb7e4fe0abcfbc7113f65c859ee"/><file name="Hour.php" hash="763b955bff596cddf2ceabd4ce85816d"/><file name="Info.php" hash="421631d66f10176e4cca80d30df625eb"/><file name="Logo.php" hash="83cc7232c4a0a05b6857aa5e7cd00beb"/><file name="Subheader.php" hash="1b52d6781e07b134c341eae891ac9979"/></dir><dir name="Tablerates"><dir name="Export"><file name="Clickcollect.php" hash="294325998821cba4d98d113c5832d981"/><file name="Homedelivery.php" hash="beb4c5c59ef77d06a425a31d90893255"/><file name="International.php" hash="7806c48c000e996b707e87e58ac1f166"/><file name="Parcellocker.php" hash="e32815fa7846b08318a87c02a7374990"/><file name="Pickuppoint.php" hash="8cb4911d631d257332ce542db49c3672"/></dir></dir></dir></dir></dir></dir><dir name="Carrier"><file name="Bpost.php" hash="31a57fac5a8b4d329c99d25b5b3e0d49"/></dir></dir><dir name="Controller"><dir name="ShM"><file name="Order.php" hash="7ab38959baaf721d9e7fe16bd34e9dab"/></dir></dir><dir name="Helper"><file name="Data.php" hash="6374ae7aaaa80431742869d34b653256"/><file name="Returnlabel.php" hash="e3fb05a9f08577dfe90866669d3f7613"/><dir name="System"><file name="Config.php" hash="393353ca26ef2b398769ecbb59fdcbf9"/></dir></dir><dir name="Model"><dir name="Adminhtml"><file name="Bpostgrid.php" hash="a8728ed9efdb88b5e67be037153c9304"/><file name="Observer.php" hash="9dc75e175bddf0a49b65e0580ade53a4"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><dir name="Tablerates"><file name="Clickcollect.php" hash="8247e2d2a93a438f79ea71d91b8c01f2"/><file name="Homedelivery.php" hash="26758346e7e09d2b3075cb0613a00b79"/><file name="International.php" hash="c6ba9e8b7e42893a7faf31392e0d647f"/><file name="Parcellocker.php" hash="2fa265b0623de5740b15ea27284a3b47"/><file name="Pickuppoint.php" hash="84ccd80c14f33de89b8164e396ef3241"/></dir></dir></dir><dir name="Source"><file name="Datecomment.php" hash="a67ca74e2f81cbfaec6b7ed0ce8aa9f2"/><file name="Shipping.php" hash="a19f622f5f64ee64c8f8e6667d6d9323"/></dir></dir></dir></dir><dir name="Api"><file name="Abstract.php" hash="6096aebaabe58c044b8f5724661336c1"/><file name="Domcreator.php" hash="2c51ab00bd06265d49cb9cbf62605575"/></dir><file name="Api.php" hash="0661d5bd1cc72642faf6e7ec1b4857c6"/><file name="Country.php" hash="7ca2d7fee06b4672ee8679dcc0d437cf"/><file name="Holidays.php" hash="85d3ad2c06516d3bd42d6cf25b6c1c1b"/><file name="Observer.php" hash="429734398830f14aa1a8a79f6d3acd7e"/><dir name="Resource"><dir name="Country"><file name="Collection.php" hash="173cb7acd05ead3fa4bb29f1a2200188"/></dir><file name="Country.php" hash="3ed62dc4bae568879a781400724e2b31"/><dir name="Holidays"><file name="Collection.php" hash="b39c602b1b6c7802a8e298ccabd3b88d"/></dir><file name="Holidays.php" hash="8410fabf516cce95e6e6a69e52abb6ec"/><dir name="Returnlabel"><file name="Collection.php" hash="d34adb537d24116270238ae1fa377a05"/></dir><file name="Returnlabel.php" hash="419fda598a2630ccc773ce0b0eacbd79"/><dir name="Tablerates"><dir name="Clickcollect"><file name="Collection.php" hash="a076e1266785fc9342fc134ac9268280"/></dir><file name="Clickcollect.php" hash="56ab4e22b459339db3190bfbd102d94f"/><dir name="Homedelivery"><file name="Collection.php" hash="7a34c249b5015ecda8ad26cbf42c6280"/></dir><file name="Homedelivery.php" hash="a94baf3909962e162813d8003583cc77"/><dir name="International"><file name="Collection.php" hash="6ba99077f1625a8c81990ea3afcb14b8"/></dir><file name="International.php" hash="ca3e45f29f9ef44f00ff41b509e0f0a1"/><dir name="Parcellocker"><file name="Collection.php" hash="9aa78e0bc7d389e93e958472a0fc40b6"/></dir><file name="Parcellocker.php" hash="66bb509267844a48ff5b054c82a47254"/><dir name="Pickuppoint"><file name="Collection.php" hash="1f9db3d5ff7f1a9e9d2eccddf6860513"/></dir><file name="Pickuppoint.php" hash="33e26bc93dcea5aabbee59343043413d"/></dir></dir><file name="Returnlabel.php" hash="169bca5baa7726cd51e2a76e1b9a35a8"/><dir name="Shipping"><dir name="Carrier"><file name="BpostShM.php" hash="64515e312b7575e6480e44e7e3c12a0d"/></dir><file name="Geocode.php" hash="d613ba4d1e5d14f8698fcfe9dfd03a66"/><dir name="Rate"><file name="Result.php" hash="77e9fc98f15441edfdc478fd589e41a8"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Country.php" hash="f49cbe30d05cffb6f516a3df6ddc1b7b"/><file name="Product.php" hash="cb74b0fc8d3f661d0be4ac9f9c5b840d"/><file name="Ratetypes.php" hash="42f1f3f8dc000ea5e5336ca1ad7ab85c"/><file name="Weightunit.php" hash="e0c0a9975395245c4d16d975c0334c31"/></dir></dir></dir><dir name="Tablerates"><file name="Clickcollect.php" hash="9d589684df3b1b7e11441dc808a9627c"/><file name="Homedelivery.php" hash="d60385de528eb957a2874af6306d4aae"/><file name="International.php" hash="d02e02a7cddbda576530d6acbd6d02e8"/><file name="Parcellocker.php" hash="805a9669f9d024a4c018d611e5c71afd"/><file name="Pickuppoint.php" hash="49dff9f40e26163b8d0c6b8be9f6ee51"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Bpost"><dir name="ShM"><file name="AllOrdersController.php" hash="08df25d3e3718e183c40f68d8722782a"/><file name="ConfigController.php" hash="2537dbc05936e758c6353e46016180f9"/><file name="DownloadController.php" hash="87a534445edd2ff9ae3601fbe99637a5"/><file name="PendingOrdersController.php" hash="300f5472999194f90658737311b94df4"/></dir></dir></dir><file name="AjaxController.php" hash="ba6df7ff9999259273b7414e6bd51f1c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cba525a2c3c394cb15c144f887e081cc"/><file name="config.xml" hash="43d63aabfb1f644bbf5495376eb32c97"/><file name="system.xml" hash="89a58cb287d88eab93df6294b789a9b5"/></dir><dir name="sql"><dir name="bpost_shm_setup"><file name="install-0.0.1.php" hash="441ce29ddd9b04c052f03699e8ecc704"/><file name="upgrade-0.0.1-0.0.2.php" hash="7c5bb7a9609d6bec38a927e07eaad066"/><file name="upgrade-0.0.10-0.1.0.php" hash="c1523f2fd829372143c4686376512b37"/><file name="upgrade-0.0.2-0.0.3.php" hash="7e441f96e071efaa42d629815be8379c"/><file name="upgrade-0.0.3-0.0.4.php" hash="e2009ca70b9b268024433be7ac74ba19"/><file name="upgrade-0.0.4-0.0.5.php" hash="a51391f3bf810a5c6ae5c0bdbc5d9603"/><file name="upgrade-0.0.5-0.0.6.php" hash="2d8d624be7f829029b3e9fceb6d6c3b8"/><file name="upgrade-0.0.6-0.0.7.php" hash="82a7a64e3234c8b6e20367fcc80e1049"/><file name="upgrade-0.0.7-0.0.8.php" hash="a3b337a855d92202b5d625269edf4cb8"/><file name="upgrade-0.0.8-0.0.9.php" hash="20a344294274390515a891a89facfcb3"/><file name="upgrade-0.0.9-0.0.10.php" hash="74d06a2bbf41c5c8d9cb7870898a3eb3"/><file name="upgrade-0.1.0-0.1.1.php" hash="ed824736e9cd0f8e98a4dc62c41ecf96"/><file name="upgrade-0.1.1-0.1.2.php" hash="bb7cf544bc07ef2209b82753ac2b950d"/><file name="upgrade-0.1.2-0.1.3.php" hash="04f9ab295e48b018e80da482bdf23132"/><file name="upgrade-0.1.3-0.1.4.php" hash="9e8f6f1e2522917b8efeb379d21cd953"/><file name="upgrade-0.1.4-0.1.5.php" hash="16333b0f3faa92e98d6bb6f75b4273cd"/><file name="upgrade-0.1.5-0.1.6.php" hash="f2f1f169a5ad2fbd0650ffbef3217b08"/><file name="upgrade-0.1.6-0.1.7.php" hash="95eebc7f870fa36c0a0997a06cb47076"/><file name="upgrade-0.1.7-0.1.8.php" hash="56a4bc5320b56309c943a90df00464e8"/><file name="upgrade-0.1.8-1.1.3.php" hash="d2058a8a86a501111fca4053a1f49ba2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="bpost"><file name="shm.xml" hash="8a5ceb93674efcbd6e8063437877d9d5"/></dir></dir><dir name="template"><dir name="bpost"><file name="empty.phtml" hash="45a92398f5adc3dd6dda9527f95ef4d5"/><file name="informationpopup.phtml" hash="42432ed861bb8b5b34a39d879c164979"/><file name="screenshotpopup.phtml" hash="5ad6a05c55ea41e550262ceed28626ae"/><dir name="widget"><dir name="grid"><file name="massaction.phtml" hash="f9b9aa54fe683d66fd535f95afb07dfe"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="bpost"><file name="shm.xml" hash="fdf8ce174a2af269f7c5831311474c87"/></dir></dir><dir name="template"><dir name="bpost"><dir name="shm"><file name="append_bpost_shippingmethod.phtml" hash="36beca46e5a8e2246161fbb807886883"/><file name="gmapsapi.phtml" hash="ac4dea1786701a6968a1c771a54e06fd"/><file name="oscwindowjs.phtml" hash="253fbb8eb44a41bf76495d26ab74b1ef"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="zBpost_ShM.xml" hash="791aeaa9ddf185a0b053728b20b06ea0"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Bpost_ShM.csv" hash="ed46d79674f4af306343332fca1dd1d2"/><dir name="template"><dir name="email"><dir name="bpost"><file name="returnlabel.html" hash="fa9b1779caf12fe6e8c85e44899e7e66"/><file name="errorhandling_create_order.html" hash="5458114b6bfee6f66841f4fe19e13675"/></dir></dir></dir></dir><dir name="fr_FR"><file name="Bpost_ShM.csv" hash="2c28271ca71add5c1eb748d388c4672e"/></dir><dir name="nl_NL"><file name="Bpost_ShM.csv" hash="bef78c98957327ef45635ab13469c9c1"/></dir></target><target name="mageweb"><dir name="js"><dir name="bpost"><dir name="shm"><dir name="adminhtml"><file name="informationpopup.js" hash="dd25216084d43f70b7de4beaf1ef23c5"/></dir><file name="checkout.js" hash="d0d9d11bb87513f5cf72bfc4a260b432"/><file name="infobox.js" hash="4b42bb1b029f60ecda0ceeabb4726e5d"/><file name="onestepcheckout_shipping.js" hash="5543fb8c7b6b9a4fa03eb11fad70960d"/><file name="window.js" hash="6595b93b8c84328f26071fee485b797e"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="bpost"><file name="checkout.css" hash="1def6c20f733f736de8fc16b4cb40b79"/></dir></dir><dir name="images"><dir name="bpost"><file name="ajax-loader-button.gif" hash="cbdad94ec5d22b17d7aae4c6d245069a"/><file name="ajax-loader-wheel.gif" hash="faa74e8c61fc64d5edb11613c7eead2c"/><file name="bpost_logo_RGB72_L.png" hash="ca8a5de3a37cfbbdac7c0fec6e4f9f28"/><file name="bpost_logo_RGB72_M.png" hash="feb4bb3bb7c9c4100612b62cde7037e5"/><file name="bpost_sym_RGB72_S.png" hash="18e774a968be600664d11a9e0691a424"/><file name="btn_close.png" hash="d6ecac0a01a600ef15efc9004ccc9fb7"/><file name="icon-close.png" hash="54d0827f50c1d294c61e88e316e61059"/><file name="icon-info.png" hash="e4de51e3c12327403a9b966aac98a9d6"/><file name="location_clickcollect_default.png" hash="dba619d29c0013538003f3fec98da652"/><file name="location_parcellocker_default.png" hash="8906b0e09067eab6f31b712d54ecf547"/><file name="location_postoffice_default.png" hash="ea147b38b01449e8a1cff3ebff6b2741"/><file name="location_postpoint_default.png" hash="c53f598daafbec4d042b165d21116719"/></dir></dir><dir name="js"><dir name="bpost"><file name="onestepcheckout.js" hash="a0e4b3df8643ffaa798e679fe20f116c"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="bpost"><file name="informationpopup.css" hash="bffce6ef1182a763f626a0b3288b3887"/></dir></dir><dir name="images"><dir name="bpost"><file name="ajax-loader-red.gif" hash="7bf0fa0e5a55c6a7cd122a9bb461006d"/><file name="bpost_logo_RGB72_L.png" hash="ca8a5de3a37cfbbdac7c0fec6e4f9f28"/><file name="bpost_logo_RGB72_M.png" hash="feb4bb3bb7c9c4100612b62cde7037e5"/><file name="btn_close.png" hash="d6ecac0a01a600ef15efc9004ccc9fb7"/><file name="ce-screenshot.png" hash="ff6f4a630cd17efc1abbe8eca6e015a5"/><file name="ee-screenshot.png" hash="ff6f4a630cd17efc1abbe8eca6e015a5"/><file name="pdf_icon.png" hash="95b561422892384337eb2eabb968a558"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>7.0.2</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/css/bpost/checkout.css
CHANGED
@@ -252,6 +252,7 @@ ul#bpostlist li .title {
|
|
252 |
display: block;
|
253 |
clear: both;
|
254 |
color: #DC002E;
|
|
|
255 |
}
|
256 |
|
257 |
ul#bpostlist li .address {
|
@@ -435,7 +436,7 @@ ul#bpostlist li .city {
|
|
435 |
#bpostDelivery .bpost-choose-deliverydate ul li {
|
436 |
display: inline-block;
|
437 |
margin-right: 5px;
|
438 |
-
margin-bottom:
|
439 |
}
|
440 |
|
441 |
#bpostDelivery .bpost-choose-deliverydate ul li:last-child {
|
252 |
display: block;
|
253 |
clear: both;
|
254 |
color: #DC002E;
|
255 |
+
font-size: 15px;
|
256 |
}
|
257 |
|
258 |
ul#bpostlist li .address {
|
436 |
#bpostDelivery .bpost-choose-deliverydate ul li {
|
437 |
display: inline-block;
|
438 |
margin-right: 5px;
|
439 |
+
margin-bottom: 5px;
|
440 |
}
|
441 |
|
442 |
#bpostDelivery .bpost-choose-deliverydate ul li:last-child {
|
skin/frontend/base/default/images/bpost/.DS_Store
DELETED
Binary file
|