Version Notes
Magento Classic Free Theme
Download this release
Release Info
Developer | TemplatesMaster |
Extension | magento_classic_theme_free |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.0.2
- app/code/community/TM/CatalogConfigurableSwatches/Helper/Data.php +0 -10
- app/code/community/TM/CatalogConfigurableSwatches/etc/config.xml +0 -36
- app/code/community/TM/Core/Block/Adminhtml/Module.php +0 -13
- app/code/community/TM/Core/Block/Adminhtml/Module/Grid.php +0 -77
- app/code/community/TM/Core/Block/Adminhtml/Module/Grid/Renderer/Actions.php +0 -45
- app/code/community/TM/Core/Block/Adminhtml/Module/Grid/Renderer/VersionStatus.php +0 -42
- app/code/community/TM/Core/Block/Adminhtml/Module/Manage.php +0 -46
- app/code/community/TM/Core/Block/Adminhtml/Module/Manage/Form.php +0 -12
- app/code/community/TM/Core/Block/Adminhtml/Module/Manage/Tab/Main.php +0 -152
- app/code/community/TM/Core/Block/Adminhtml/Module/Manage/Tabs.php +0 -12
- app/code/community/TM/Core/Block/Adminhtml/Support/Edit.php +0 -35
- app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Form.php +0 -16
- app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Form/Element/Theard.php +0 -39
- app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Form/Element/Theard/Content.php +0 -182
- app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Tab/Main.php +0 -207
- app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Tabs.php +0 -12
- app/code/community/TM/Core/Block/Adminhtml/Support/List.php +0 -12
- app/code/community/TM/Core/Block/Adminhtml/Support/List/Grid.php +0 -203
- app/code/community/TM/Core/Block/Adminhtml/System/Config/Form/Field/Notification.php +0 -11
- app/code/community/TM/Core/Block/Adminhtml/System/Config/Form/Field/Size.php +0 -23
- app/code/community/TM/Core/Block/Adminhtml/System/Config/Form/Fieldset/Modules/List.php +0 -46
- app/code/community/TM/Core/Block/Adminhtml/System/Config/Form/Fieldset/Troubleshooting.php +0 -13
- app/code/community/TM/Core/Block/Adminhtml/Widget/Form/Element/Wysiwyg.php +0 -47
- app/code/community/TM/Core/Block/Adminhtml/Widget/Form/Element/Wysiwyg/Content.php +0 -35
- app/code/community/TM/Core/Block/Adminhtml/Widget/Form/Renderer/Wysiwyg.php +0 -13
- app/code/community/TM/Core/Block/Cms/Block.php +0 -19
- app/code/community/TM/Core/Helper/Data.php +0 -10
- app/code/community/TM/Core/Helper/Debug.php +0 -29
- app/code/community/TM/Core/Model/Adminhtml/System/Config/Source/Notification/Channel.php +0 -33
- app/code/community/TM/Core/Model/Module.php +0 -461
- app/code/community/TM/Core/Model/Module/MessageLogger.php +0 -56
- app/code/community/TM/Core/Model/Module/Upgrade.php +0 -942
- app/code/community/TM/Core/Model/Notification/Feed.php +0 -155
- app/code/community/TM/Core/Model/Oauth/Client.php +0 -257
- app/code/community/TM/Core/Model/Observer.php +0 -66
- app/code/community/TM/Core/Model/Resource/Module.php +0 -16
- app/code/community/TM/Core/Model/Resource/Module/AdminGridCollection.php +0 -17
- app/code/community/TM/Core/Model/Resource/Module/Collection.php +0 -9
- app/code/community/TM/Core/Model/Resource/Module/MergedCollection.php +0 -502
- app/code/community/TM/Core/Model/Resource/Module/RemoteCollection.php +0 -165
- app/code/community/TM/Core/Model/Resource/Support/Collection.php +0 -416
- app/code/community/TM/Core/Model/Timer.php +0 -65
- app/code/community/TM/Core/controllers/Adminhtml/Tmcore/ModuleController.php +0 -123
- app/code/community/TM/Core/controllers/Adminhtml/Tmcore/SupportController.php +0 -282
- app/code/community/TM/Core/etc/adminhtml.xml +0 -55
- app/code/community/TM/Core/etc/config.xml +0 -153
- app/code/community/TM/Core/etc/system.xml +0 -113
- app/code/community/TM/Core/sql/tm_core_setup/mysql4-install-1.0.0.php +0 -26
- app/code/community/TM/Core/sql/tm_core_setup/mysql4-upgrade-1.0.0-1.0.1.php +0 -12
- app/design/adminhtml/default/default/layout/tmcore.xml +0 -62
- app/design/adminhtml/default/default/template/tmcore/popup.phtml +0 -13
- app/design/adminhtml/default/default/template/tmcore/ticket/edit/form/element/theard/content.phtml +0 -98
- app/design/frontend/base/default/layout/tm/configurableswatches.xml +0 -109
- app/design/frontend/base/default/template/tm/configurableswatches/catalog/media/js.phtml +0 -20
- app/design/frontend/base/default/template/tm/configurableswatches/catalog/product/view/type/configurable/swatch-js.phtml +0 -10
- app/etc/modules/TM_CatalogConfigurableSwatches.xml +0 -9
- app/etc/modules/TM_Core.xml +0 -9
- app/locale/en_US/TM_Core.csv +0 -48
- app/locale/es_ES/TM_Core.csv +0 -48
- app/locale/fr_FR/TM_Core.csv +0 -48
- app/locale/it_IT/TM_Core.csv +0 -48
- app/locale/nl_NL/TM_Core.csv +0 -48
- app/locale/pt_PT/TM_Core.csv +0 -48
- js/lib/jquery/jquery-1.10.2.min.js +0 -6
- js/lib/jquery/noconflict.js +0 -27
- js/tm/adminhtml/core/window.js +0 -52
- package.xml +5 -5
- skin/frontend/base/default/tm/addressautocomplete/js/address-autocomplete.js +0 -178
- skin/frontend/base/default/tm/configurableswatches/css/swatches.css +0 -182
- skin/frontend/base/default/tm/configurableswatches/images/bg_x.png +0 -0
- skin/frontend/base/default/tm/configurableswatches/js/app.js +0 -291
- skin/frontend/base/default/tm/downloadable/css/main.css +0 -48
- skin/frontend/base/default/tm/downloadable/images/add.png +0 -0
- skin/frontend/base/default/tm/downloadable/images/subtract.png +0 -0
- skin/frontend/base/default/tm/easybanner/css/easybanner.css +0 -76
- skin/frontend/base/default/tm/easybanner/js/easybanner.js +0 -457
- skin/frontend/base/default/tm/easyflags/css/easyflags.css +0 -4
- skin/frontend/base/default/tm/easyslide/css/easyslide.css +0 -64
- skin/frontend/base/default/tm/easyslide/images/control.png +0 -0
- skin/frontend/base/default/tm/easyslide/images/dark.png +0 -0
- skin/frontend/base/default/tm/easyslide/images/light.png +0 -0
- skin/frontend/base/default/tm/easyslide/js/easyslide.js +0 -529
- skin/frontend/base/default/tm/easyslide/js/jquery-1.8.2.min.js +0 -2
- skin/frontend/base/default/tm/easyslide/nivo/jquery.nivo.slider.js +0 -662
- skin/frontend/base/default/tm/easyslide/nivo/nivo-slider.css +0 -113
- skin/frontend/base/default/tm/easyslide/nivo/themes/bar/arrows.png +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/bar/bar.css +0 -132
- skin/frontend/base/default/tm/easyslide/nivo/themes/bar/bullets.png +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/bar/loading.gif +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/dark/arrows.png +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/dark/bullets.png +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/dark/dark.css +0 -102
- skin/frontend/base/default/tm/easyslide/nivo/themes/dark/loading.gif +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/default/arrows.png +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/default/bullets.png +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/default/default.css +0 -93
- skin/frontend/base/default/tm/easyslide/nivo/themes/default/loading.gif +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/light/arrows.png +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/light/bullets.png +0 -0
- skin/frontend/base/default/tm/easyslide/nivo/themes/light/light.css +0 -102
- skin/frontend/base/default/tm/easyslide/nivo/themes/light/loading.gif +0 -0
- skin/frontend/base/default/tm/firecheckout/css/firecheckout.css +0 -793
- skin/frontend/base/default/tm/firecheckout/css/onecolumn.css +0 -313
- skin/frontend/base/default/tm/firecheckout/images/ajax-loader.gif +0 -0
- skin/frontend/base/default/tm/firecheckout/images/ajax-loader@2x.gif +0 -0
- skin/frontend/base/default/tm/firecheckout/images/sprite.png +0 -0
- skin/frontend/base/default/tm/firecheckout/js/components/address-verification.js +0 -186
- skin/frontend/base/default/tm/firecheckout/js/components/ajax.js +0 -57
- skin/frontend/base/default/tm/firecheckout/js/components/cart.js +0 -270
- skin/frontend/base/default/tm/firecheckout/js/components/delivery-date.js +0 -184
- skin/frontend/base/default/tm/firecheckout/js/components/dependent-fields.js +0 -195
- skin/frontend/base/default/tm/firecheckout/js/components/housenumber.js +0 -98
- skin/frontend/base/default/tm/firecheckout/js/components/messenger.js +0 -37
- skin/frontend/base/default/tm/firecheckout/js/components/order-review.js +0 -185
- skin/frontend/base/default/tm/firecheckout/js/components/taxvat.js +0 -48
- skin/frontend/base/default/tm/firecheckout/js/components/window.js +0 -303
- skin/frontend/base/default/tm/firecheckout/js/firecheckout-compatibility.js +0 -887
- skin/frontend/base/default/tm/firecheckout/js/firecheckout.js +0 -1601
- skin/frontend/base/default/tm/firecheckout/js/integration/checkoutapi_chargepayment.js +0 -12
- skin/frontend/base/default/tm/firecheckout/js/integration/cryozonic_stripe.js +0 -17
- skin/frontend/base/default/tm/firecheckout/js/integration/dhl_account.js +0 -6
- skin/frontend/base/default/tm/firecheckout/js/integration/ebizmarts_sagepaysuite.js +0 -160
- skin/frontend/base/default/tm/firecheckout/js/integration/mage_molpayseamless.js +0 -6
- skin/frontend/base/default/tm/firecheckout/js/integration/mymonki_ship2pay.js +0 -20
- skin/frontend/base/default/tm/firecheckout/js/integration/sfc_autoship.js +0 -55
- skin/frontend/base/default/tm/firecheckout/js/integration/webshopapps_calendarbase.js +0 -34
- skin/frontend/base/default/tm/firecheckout/js/integration/ydral_correos.js +0 -8
- skin/frontend/base/default/tm/firecheckout/js/onecolumn.js +0 -649
- skin/frontend/base/default/tm/firecheckout/js/prototype.sticky-kit.js +0 -273
- skin/frontend/base/default/tm/orderattachment/css/orderattachment.css +0 -12
- skin/frontend/base/default/tm/quickshopping/css/quickshopping.css +0 -287
- skin/frontend/base/default/tm/quickshopping/images/ajax-loading.gif +0 -0
- skin/frontend/base/default/tm/quickshopping/images/black-70.png +0 -0
- skin/frontend/base/default/tm/quickshopping/images/black.png +0 -0
- skin/frontend/base/default/tm/quickshopping/images/controls.gif +0 -0
- skin/frontend/base/default/tm/quickshopping/js/configurableswatches.js +0 -60
- skin/frontend/base/default/tm/quickshopping/js/quickshopping.button.js +0 -35
- skin/frontend/base/default/tm/quickshopping/js/quickshopping.window.js +0 -1038
app/code/community/TM/CatalogConfigurableSwatches/Helper/Data.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_CatalogConfigurableSwatches_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
-
{
|
5 |
-
public function isEnabled()
|
6 |
-
{
|
7 |
-
return Mage::helper('core')->isModuleOutputEnabled('Mage_ConfigurableSwatches')
|
8 |
-
&& Mage::getStoreConfigFlag('configswatches/general/enabled');
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/CatalogConfigurableSwatches/etc/config.xml
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
|
4 |
-
<default>
|
5 |
-
<tmcore>
|
6 |
-
<jslibs>
|
7 |
-
<jquery>1</jquery>
|
8 |
-
</jslibs>
|
9 |
-
</tmcore>
|
10 |
-
</default>
|
11 |
-
|
12 |
-
<modules>
|
13 |
-
<TM_CatalogConfigurableSwatches>
|
14 |
-
<version>1.0.1</version>
|
15 |
-
</TM_CatalogConfigurableSwatches>
|
16 |
-
</modules>
|
17 |
-
<global>
|
18 |
-
<helpers>
|
19 |
-
<catalogconfigurableswatches>
|
20 |
-
<class>TM_CatalogConfigurableSwatches_Helper</class>
|
21 |
-
</catalogconfigurableswatches>
|
22 |
-
</helpers>
|
23 |
-
</global>
|
24 |
-
<frontend>
|
25 |
-
<tm_layout>
|
26 |
-
<updates>
|
27 |
-
<catalogconfigurableswatches
|
28 |
-
module="TM_CatalogConfigurableSwatches"
|
29 |
-
condition="catalogconfigurableswatches/isEnabled"
|
30 |
-
>
|
31 |
-
<file>tm/configurableswatches.xml</file>
|
32 |
-
</catalogconfigurableswatches>
|
33 |
-
</updates>
|
34 |
-
</tm_layout>
|
35 |
-
</frontend>
|
36 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Module.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Module extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
$this->_controller = 'adminhtml_module';
|
8 |
-
$this->_blockGroup = 'tmcore';
|
9 |
-
$this->_headerText = Mage::helper('tmcore')->__('Modules');
|
10 |
-
parent::__construct();
|
11 |
-
$this->_removeButton('add');
|
12 |
-
}
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Module/Grid.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Module_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
parent::__construct();
|
8 |
-
$this->setId('moduleGrid');
|
9 |
-
$this->setDefaultSort('code');
|
10 |
-
$this->setDefaultDir('ASC');
|
11 |
-
$this->setSaveParametersInSession(true);
|
12 |
-
$this->setUseAjax(true);
|
13 |
-
$this->setVarNameFilter('module_filter');
|
14 |
-
}
|
15 |
-
|
16 |
-
protected function _prepareCollection()
|
17 |
-
{
|
18 |
-
$collection = Mage::getResourceModel('tmcore/module_AdminGridCollection');
|
19 |
-
$this->setCollection($collection);
|
20 |
-
return parent::_prepareCollection();
|
21 |
-
}
|
22 |
-
|
23 |
-
protected function _prepareColumns()
|
24 |
-
{
|
25 |
-
$this->addColumn('code', array(
|
26 |
-
'header' => Mage::helper('tmcore')->__('Code'),
|
27 |
-
'align' => 'left',
|
28 |
-
'index' => 'code'
|
29 |
-
));
|
30 |
-
|
31 |
-
$this->addColumn('version', array(
|
32 |
-
'header' => Mage::helper('tmcore')->__('Local Version'),
|
33 |
-
'align' => 'right',
|
34 |
-
'index' => 'version',
|
35 |
-
'width' => '80px'
|
36 |
-
));
|
37 |
-
|
38 |
-
$this->addColumn('latest_version', array(
|
39 |
-
'header' => Mage::helper('tmcore')->__('Latest Version'),
|
40 |
-
'align' => 'right',
|
41 |
-
'index' => 'latest_version',
|
42 |
-
'width' => '80px'
|
43 |
-
));
|
44 |
-
|
45 |
-
$this->addColumn('version_status', array(
|
46 |
-
'header' => Mage::helper('tmcore')->__('Version Status'),
|
47 |
-
'width' => '60px',
|
48 |
-
'index' => 'version_status',
|
49 |
-
'renderer' => 'tmcore/adminhtml_module_grid_renderer_versionStatus',
|
50 |
-
'type' => 'options',
|
51 |
-
'options' => Mage::getModel('tmcore/module')->getVersionStatuses()
|
52 |
-
));
|
53 |
-
|
54 |
-
$this->addColumn('actions', array(
|
55 |
-
'header' => Mage::helper('tmcore')->__('Actions'),
|
56 |
-
'width' => '200px',
|
57 |
-
'filter' => false,
|
58 |
-
'sortable' => false,
|
59 |
-
'renderer' => 'tmcore/adminhtml_module_grid_renderer_actions'
|
60 |
-
));
|
61 |
-
|
62 |
-
return parent::_prepareColumns();
|
63 |
-
}
|
64 |
-
|
65 |
-
public function getGridUrl()
|
66 |
-
{
|
67 |
-
return $this->getUrl('*/*/grid', array('_current'=>true));
|
68 |
-
}
|
69 |
-
|
70 |
-
public function getRowUrl($row)
|
71 |
-
{
|
72 |
-
if ($row->hasUpgradesDir() || $row->getIdentityKeyLink()) {
|
73 |
-
return $this->getUrl('*/*/manage', array('id' => $row->getId()));
|
74 |
-
}
|
75 |
-
return false;
|
76 |
-
}
|
77 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Module/Grid/Renderer/Actions.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Module_Grid_Renderer_Actions
|
4 |
-
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
5 |
-
{
|
6 |
-
/**
|
7 |
-
* Renders grid column
|
8 |
-
*
|
9 |
-
* @param Varien_Object $row
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function render(Varien_Object $row)
|
13 |
-
{
|
14 |
-
$links = array();
|
15 |
-
|
16 |
-
if ($row->getChangelog()) {
|
17 |
-
$links[] = sprintf(
|
18 |
-
'<a href="javascript:void(0)" onclick="%s">%s</a><div style="display:none" class="changelog"><div class="title">%s</div><div class="content">%s</div></div>',
|
19 |
-
"tmcoreWindow.update(this.next('.changelog').down('.content').innerHTML, this.next('.changelog').down('.title').innerHTML).show()",
|
20 |
-
Mage::helper('tmcore')->__('Changelog'),
|
21 |
-
strip_tags($row->getCode()),
|
22 |
-
nl2br(htmlspecialchars($row->getChangelog()))
|
23 |
-
);
|
24 |
-
}
|
25 |
-
|
26 |
-
if ($row->getDownloadLink()) {
|
27 |
-
$links[] = sprintf(
|
28 |
-
'<a href="%s" title="%s" onclick="window.open(this.href); return false;">%s</a>',
|
29 |
-
$row->getDownloadLink(),
|
30 |
-
Mage::helper('tmcore')->__('Download Latest Version'),
|
31 |
-
Mage::helper('tmcore')->__('Download')
|
32 |
-
);
|
33 |
-
}
|
34 |
-
|
35 |
-
if ($row->hasUpgradesDir() || $row->getIdentityKeyLink()) {
|
36 |
-
$links[] = sprintf(
|
37 |
-
'<a href="%s">%s</a>',
|
38 |
-
$this->getUrl('*/*/manage/', array('_current' => true, 'id' => $row->getId())),
|
39 |
-
Mage::helper('tmcore')->__('Manage')
|
40 |
-
);
|
41 |
-
}
|
42 |
-
|
43 |
-
return implode(' | ', $links);
|
44 |
-
}
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Module/Grid/Renderer/VersionStatus.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Module_Grid_Renderer_VersionStatus
|
4 |
-
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
5 |
-
{
|
6 |
-
/**
|
7 |
-
* Renders grid column
|
8 |
-
*
|
9 |
-
* @param Varien_Object $row
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function render(Varien_Object $row)
|
13 |
-
{
|
14 |
-
/**
|
15 |
-
* @var TM_Core_Model_Module
|
16 |
-
*/
|
17 |
-
$module = Mage::getSingleton('tmcore/module');
|
18 |
-
$status = $row->getData($this->getColumn()->getIndex());
|
19 |
-
|
20 |
-
if (null === $status) {
|
21 |
-
return '';
|
22 |
-
}
|
23 |
-
|
24 |
-
$title = '';
|
25 |
-
switch ($status) {
|
26 |
-
case TM_Core_Model_Module::VERSION_UPDATED:
|
27 |
-
$class = 'notice';
|
28 |
-
break;
|
29 |
-
case TM_Core_Model_Module::VERSION_OUTDATED:
|
30 |
-
$class = 'minor';
|
31 |
-
$title = Mage::helper('tmcore')->__('Upgrades are not installed');
|
32 |
-
break;
|
33 |
-
case TM_Core_Model_Module::VERSION_DEPRECATED:
|
34 |
-
$class = 'major';
|
35 |
-
$title = Mage::helper('tmcore')->__('New version is available');
|
36 |
-
break;
|
37 |
-
}
|
38 |
-
$value = $module->getVersionStatuses($status);
|
39 |
-
|
40 |
-
return '<span class="grid-severity-' . $class . '" title="' . $title . '"><span>' . $value . '</span></span>';
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Module/Manage.php
DELETED
@@ -1,46 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Module_Manage extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'tmcore';
|
9 |
-
$this->_controller = 'adminhtml_module';
|
10 |
-
$this->_mode = 'manage';
|
11 |
-
|
12 |
-
parent::__construct();
|
13 |
-
|
14 |
-
$this->setData('form_action_url', $this->getUrl('*/*/run'));
|
15 |
-
$this->_updateButton('save', 'label', Mage::helper('tmcore')->__('Run'));
|
16 |
-
$this->_removeButton('delete');
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Get edit form container header text
|
21 |
-
*
|
22 |
-
* @return string
|
23 |
-
*/
|
24 |
-
public function getHeaderText()
|
25 |
-
{
|
26 |
-
$model = Mage::registry('tmcore_module');
|
27 |
-
if ($model->getDataVersion()) { // module is installed already
|
28 |
-
if ($model->getUpgradesToRun()) {
|
29 |
-
$label = 'Upgrade and Install/Reinstall %s %s (Data version %s)';
|
30 |
-
} else {
|
31 |
-
$label = 'Install or Reinstall %s %s (Data version %s)';
|
32 |
-
}
|
33 |
-
return Mage::helper('tmcore')->__(
|
34 |
-
$label,
|
35 |
-
$model->getCode(),
|
36 |
-
$model->getVersion(),
|
37 |
-
$model->getDataVersion()
|
38 |
-
);
|
39 |
-
}
|
40 |
-
return Mage::helper('tmcore')->__(
|
41 |
-
'Install %s %s',
|
42 |
-
$model->getCode(),
|
43 |
-
$model->getVersion()
|
44 |
-
);
|
45 |
-
}
|
46 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Module/Manage/Form.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Module_Manage_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
-
{
|
5 |
-
protected function _prepareForm()
|
6 |
-
{
|
7 |
-
$form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'));
|
8 |
-
$form->setUseContainer(true);
|
9 |
-
$this->setForm($form);
|
10 |
-
return parent::_prepareForm();
|
11 |
-
}
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Module/Manage/Tab/Main.php
DELETED
@@ -1,152 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Module_Manage_Tab_Main
|
4 |
-
extends Mage_Adminhtml_Block_Widget_Form
|
5 |
-
implements Mage_Adminhtml_Block_Widget_Tab_Interface
|
6 |
-
{
|
7 |
-
protected function _prepareForm()
|
8 |
-
{
|
9 |
-
$model = Mage::registry('tmcore_module');
|
10 |
-
|
11 |
-
$form = new Varien_Data_Form(
|
12 |
-
array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')
|
13 |
-
);
|
14 |
-
|
15 |
-
$form->setHtmlIdPrefix('module_');
|
16 |
-
|
17 |
-
$stores = Mage::getSingleton('adminhtml/system_store')->getStoreOptionHash(true);
|
18 |
-
if (isset($stores[0])) {
|
19 |
-
$stores[0] = Mage::helper('adminhtml')->__('All Store Views');
|
20 |
-
}
|
21 |
-
|
22 |
-
if ($model->getDataVersion() && ($upgrades = $model->getUpgradesToRun())) {
|
23 |
-
$fieldset = $form->addFieldset('upgrade_fieldset', array(
|
24 |
-
'legend' => Mage::helper('tmcore')->__('Upgrade Information'),
|
25 |
-
'class' => 'fieldset-wide'
|
26 |
-
));
|
27 |
-
$fieldset->addField('skip_upgrade', 'checkbox', array(
|
28 |
-
'name' => 'skip_upgrade',
|
29 |
-
'label' => Mage::helper('tmcore')->__('Activate this checkbox, if you want to skip the upgrade operations'),
|
30 |
-
'title' => Mage::helper('tmcore')->__('Activate this checkbox, if you want to skip the upgrade operations'),
|
31 |
-
'value' => 1
|
32 |
-
));
|
33 |
-
|
34 |
-
$label = Mage::helper('tmcore')->__(
|
35 |
-
'Module data will be upgraded from %s to %s at the following stores',
|
36 |
-
$model->getDataVersion(),
|
37 |
-
$upgrades[count($upgrades) - 1]
|
38 |
-
);
|
39 |
-
$fieldset->addField('installed_stores', 'textarea', array(
|
40 |
-
'label' => $label,
|
41 |
-
'title' => $label,
|
42 |
-
'value' => implode("\n", array_intersect_key($stores, array_flip($model->getStores()))),
|
43 |
-
'readonly' => 1
|
44 |
-
));
|
45 |
-
}
|
46 |
-
|
47 |
-
$fieldset = $form->addFieldset('base_fieldset', array(
|
48 |
-
'legend' => Mage::helper('tmcore')->__('Install and Reinstall Information'),
|
49 |
-
'class' => 'fieldset-wide'
|
50 |
-
));
|
51 |
-
|
52 |
-
$fieldset->addField('code', 'hidden', array(
|
53 |
-
'name' => 'id'
|
54 |
-
));
|
55 |
-
|
56 |
-
if ($model->isValidationRequired()) {
|
57 |
-
$note = '';
|
58 |
-
if ($model->getRemote()) {
|
59 |
-
$link = $model->getRemote()->getIdentityKeyLink();
|
60 |
-
$note = Mage::helper('tmcore')->__(
|
61 |
-
'Get your identity key at <a href="%s" title="%s" target="_blank">%s</a>',
|
62 |
-
$link,
|
63 |
-
$link,
|
64 |
-
$link
|
65 |
-
);
|
66 |
-
}
|
67 |
-
$fieldset->addField('identity_key', 'textarea', array(
|
68 |
-
'name' => 'identity_key',
|
69 |
-
'required' => true,
|
70 |
-
'label' => Mage::helper('tmcore')->__('Identity Key'),
|
71 |
-
'title' => Mage::helper('tmcore')->__('Identity Key'),
|
72 |
-
'note' => $note
|
73 |
-
));
|
74 |
-
}
|
75 |
-
|
76 |
-
$field = $fieldset->addField('new_stores', 'multiselect', array(
|
77 |
-
'name' => 'new_stores[]',
|
78 |
-
'label' => Mage::helper('tmcore')->__('Select stores to install or reinstall module'),
|
79 |
-
'title' => Mage::helper('tmcore')->__('Select stores to install or reinstall module'),
|
80 |
-
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true)
|
81 |
-
));
|
82 |
-
$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
|
83 |
-
if ($renderer) {
|
84 |
-
$field->setRenderer($renderer);
|
85 |
-
}
|
86 |
-
|
87 |
-
if ($installedStores = $model->getStores()) {
|
88 |
-
$fieldset->addField('installed_stores_info', 'label', array(
|
89 |
-
'label' => Mage::helper('tmcore')->__('Module is already installed at following stores'),
|
90 |
-
'title' => Mage::helper('tmcore')->__('Module is already installed at following stores'),
|
91 |
-
'value' => implode(", ", array_intersect_key($stores, array_flip($installedStores))),
|
92 |
-
'readonly' => 1
|
93 |
-
));
|
94 |
-
}
|
95 |
-
|
96 |
-
$form->addValues($model->getData());
|
97 |
-
$this->setForm($form);
|
98 |
-
|
99 |
-
return parent::_prepareForm();
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Prepare label for tab
|
104 |
-
*
|
105 |
-
* @return string
|
106 |
-
*/
|
107 |
-
public function getTabLabel()
|
108 |
-
{
|
109 |
-
return Mage::helper('cms')->__('Main');
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Prepare title for tab
|
114 |
-
*
|
115 |
-
* @return string
|
116 |
-
*/
|
117 |
-
public function getTabTitle()
|
118 |
-
{
|
119 |
-
return Mage::helper('cms')->__('Main');
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Returns status flag about this tab can be shown or not
|
124 |
-
*
|
125 |
-
* @return true
|
126 |
-
*/
|
127 |
-
public function canShowTab()
|
128 |
-
{
|
129 |
-
return true;
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Returns status flag about this tab hidden or not
|
134 |
-
*
|
135 |
-
* @return true
|
136 |
-
*/
|
137 |
-
public function isHidden()
|
138 |
-
{
|
139 |
-
return false;
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* Check permission for passed action
|
144 |
-
*
|
145 |
-
* @param string $action
|
146 |
-
* @return bool
|
147 |
-
*/
|
148 |
-
protected function _isAllowedAction($action)
|
149 |
-
{
|
150 |
-
return Mage::getSingleton('admin/session')->isAllowed('tmcore/module/' . $action);
|
151 |
-
}
|
152 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Module/Manage/Tabs.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Module_Manage_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
parent::__construct();
|
8 |
-
$this->setId('module_tabs');
|
9 |
-
$this->setDestElementId('edit_form');
|
10 |
-
$this->setTitle(Mage::helper('tmcore')->__('Manage Module'));
|
11 |
-
}
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Support/Edit.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Support_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'tmcore';
|
9 |
-
$this->_controller = 'adminhtml_support';
|
10 |
-
|
11 |
-
parent::__construct();
|
12 |
-
|
13 |
-
$this->setData('form_action_url', $this->getUrl('*/*/save'));
|
14 |
-
// $this->_updateButton('save', 'label', Mage::helper('tmcore')->__('Save'));
|
15 |
-
$this->_removeButton('delete');
|
16 |
-
}
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Get edit form container header text
|
20 |
-
*
|
21 |
-
* @return string
|
22 |
-
*/
|
23 |
-
public function getHeaderText()
|
24 |
-
{
|
25 |
-
$model = Mage::registry('tmcore_support');
|
26 |
-
if (!$model->getId()) {
|
27 |
-
return Mage::helper('tmcore')->__(
|
28 |
-
'Add New Ticket'
|
29 |
-
);
|
30 |
-
}
|
31 |
-
return Mage::helper('tmcore')->__(
|
32 |
-
'Ticket "%s" (#%s)', $model->getTitle(), $model->getNumber()
|
33 |
-
);
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Form.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Support_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
-
{
|
5 |
-
protected function _prepareForm()
|
6 |
-
{
|
7 |
-
$form = new Varien_Data_Form(array(
|
8 |
-
'id' => 'edit_form',
|
9 |
-
'action' => $this->getData('action'),
|
10 |
-
'method' => 'post'
|
11 |
-
));
|
12 |
-
$form->setUseContainer(true);
|
13 |
-
$this->setForm($form);
|
14 |
-
return parent::_prepareForm();
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Form/Element/Theard.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class TM_Core_Block_Adminhtml_Support_Edit_Form_Element_Theard extends Varien_Data_Form_Element_Abstract
|
3 |
-
{
|
4 |
-
public function getElementHtml()
|
5 |
-
{
|
6 |
-
return $this->getContentHtml();
|
7 |
-
}
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Prepares content block
|
11 |
-
*
|
12 |
-
* @return string
|
13 |
-
*/
|
14 |
-
public function getContentHtml()
|
15 |
-
{
|
16 |
-
// return '--- THEARD --';
|
17 |
-
// /* @var $content TM_Helpmate_Block_Adminhtml_Ticket_Edit_Form_Element_Theard_Content */
|
18 |
-
// Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content
|
19 |
-
$content = Mage::getSingleton('core/layout')
|
20 |
-
->createBlock('tmcore/adminhtml_support_edit_form_element_theard_content');
|
21 |
-
//
|
22 |
-
$content->setId($this->getHtmlId() . '_content')
|
23 |
-
->setElement($this);
|
24 |
-
|
25 |
-
return $content->toHtml();
|
26 |
-
}
|
27 |
-
|
28 |
-
public function getLabel()
|
29 |
-
{
|
30 |
-
return '';
|
31 |
-
}
|
32 |
-
|
33 |
-
public function toHtml()
|
34 |
-
{
|
35 |
-
return '<tr><td class="value" style="width:200%" colspan="3">' .
|
36 |
-
$this->getElementHtml() .
|
37 |
-
'</td></tr>';
|
38 |
-
}
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Form/Element/Theard/Content.php
DELETED
@@ -1,182 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class TM_Core_Block_Adminhtml_Support_Edit_Form_Element_Theard_Content extends Mage_Adminhtml_Block_Widget
|
3 |
-
{
|
4 |
-
/**
|
5 |
-
*
|
6 |
-
* @var TM_Helpmate_Model_Ticket
|
7 |
-
*/
|
8 |
-
protected $_ticket;
|
9 |
-
|
10 |
-
public function __construct()
|
11 |
-
{
|
12 |
-
parent::__construct();
|
13 |
-
$this->setTemplate('tmcore/ticket/edit/form/element/theard/content.phtml');
|
14 |
-
|
15 |
-
$this->_ticket = Mage::registry('tmcore_support');
|
16 |
-
}
|
17 |
-
|
18 |
-
/**
|
19 |
-
*
|
20 |
-
* @return TM_Helpmate_Model_Ticket
|
21 |
-
*/
|
22 |
-
public function getTicket()
|
23 |
-
{
|
24 |
-
return $this->_ticket;
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
*
|
29 |
-
* @return array()
|
30 |
-
*/
|
31 |
-
public function getTheards()
|
32 |
-
{
|
33 |
-
return $this->getTicket()->getTheards();
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
*
|
38 |
-
* @param array $theard
|
39 |
-
* @return string
|
40 |
-
*/
|
41 |
-
public function getTheardOwnerTitle(array $theard)
|
42 |
-
{
|
43 |
-
// Zend_Debug::dump($theard);
|
44 |
-
if (empty($theard['user_name'])) {
|
45 |
-
return 'Your said';
|
46 |
-
}
|
47 |
-
|
48 |
-
return $this->helper('helpmate')->__('%s said (admin)', $theard['user_name']);
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
*
|
53 |
-
* @param array $theard
|
54 |
-
* @return string
|
55 |
-
*/
|
56 |
-
public function getTheardCreatedAt(array $theard, $dateType = 'date', $format = 'medium')
|
57 |
-
{
|
58 |
-
if (!isset($theard['created_at'])) {
|
59 |
-
return '';
|
60 |
-
}
|
61 |
-
if ('date' === $dateType) {
|
62 |
-
return $this->helper('core')->formatDate($theard['created_at'], $format);
|
63 |
-
}
|
64 |
-
return $this->helper('core')->formatTime($theard['created_at'], $format);
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
*
|
69 |
-
* @param array $theard
|
70 |
-
* @return string
|
71 |
-
*/
|
72 |
-
public function getTheardModifiedAt(array $theard, $dateType = 'date', $format = 'medium')
|
73 |
-
{
|
74 |
-
if (!isset($theard['created_at'])) {
|
75 |
-
return '';
|
76 |
-
}
|
77 |
-
if ('date' === $dateType) {
|
78 |
-
return $this->helper('core')->formatDate($theard['modified_at'], $format);
|
79 |
-
}
|
80 |
-
return $this->helper('core')->formatTime($theard['modified_at'], $format);
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
*
|
85 |
-
* @param array $theard
|
86 |
-
* @return string
|
87 |
-
*/
|
88 |
-
public function getTheardStatus(array $theard)
|
89 |
-
{
|
90 |
-
$collection = $this->getTicket()->getStatuses();
|
91 |
-
$item = $collection->getItemById($theard['status']);
|
92 |
-
return $item ? $item->getName() : '';
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
*
|
97 |
-
* @param array $theard
|
98 |
-
* @return string
|
99 |
-
*/
|
100 |
-
public function getTheardDepartment(array $theard)
|
101 |
-
{
|
102 |
-
$collection = $this->getTicket()->getDepartmets();
|
103 |
-
$item = $collection->getItemById($theard['department_id']);
|
104 |
-
return $item ? $item->getName() : '';
|
105 |
-
}
|
106 |
-
|
107 |
-
public function getTheardPriority(array $theard)
|
108 |
-
{
|
109 |
-
$collection = $this->getTicket()->getPriorities();
|
110 |
-
$item = $collection->getItemById($theard['priority']);
|
111 |
-
return $item ? $item->getName() : '';
|
112 |
-
}
|
113 |
-
|
114 |
-
public function getTheardText(array $theard)
|
115 |
-
{
|
116 |
-
if (empty($theard['text'])) {
|
117 |
-
return '';
|
118 |
-
}
|
119 |
-
|
120 |
-
// if ($isSecure) {
|
121 |
-
// return Mage::helper('purify')->purify(nl2br($theard['text']));
|
122 |
-
// }
|
123 |
-
|
124 |
-
$content = $theard['text'];
|
125 |
-
|
126 |
-
// text/html convert pseudo text/palin
|
127 |
-
$tags = array (
|
128 |
-
0 => '~<h[123][^>]+>~si',
|
129 |
-
1 => '~<h[456][^>]+>~si',
|
130 |
-
2 => '~<table[^>]+>~si',
|
131 |
-
3 => '~<tr[^>]+>~si',
|
132 |
-
4 => '~<li[^>]+>~si',
|
133 |
-
5 => '~<br[^>]+>~si',
|
134 |
-
6 => '~<p[^>]+>~si',
|
135 |
-
7 => '~<div[^>]+>~si',
|
136 |
-
);
|
137 |
-
$content = preg_replace($tags, "\n", $content);
|
138 |
-
$content = preg_replace('~</t(d|h)>\s*<t(d|h)[^>]+>~si', ' - ', $content);
|
139 |
-
$content = preg_replace('~<[^>]+>~s', '', $content);
|
140 |
-
// reducing spaces
|
141 |
-
$content = preg_replace('~ +~s', ' ', $content);
|
142 |
-
$content = preg_replace('~^\s+~m', '', $content);
|
143 |
-
$content = preg_replace('~\s+$~m', '', $content);
|
144 |
-
// reducing newlines
|
145 |
-
$content = preg_replace('~\n+~s', "\n", $content);
|
146 |
-
|
147 |
-
$_content = '';
|
148 |
-
$isOld = false;
|
149 |
-
$content = wordwrap($content, 170, "\n");
|
150 |
-
foreach (explode("\n", $content) as $_line) {
|
151 |
-
$_isOld = ('>' === $_line[0]) ? true : false;
|
152 |
-
if ($_isOld && !$isOld) {
|
153 |
-
$isOld = true;
|
154 |
-
$_content .= '<span>' . $this->escapeHtml($_line) . "</span><div>";
|
155 |
-
continue;
|
156 |
-
}
|
157 |
-
if (!$_isOld && $isOld) {
|
158 |
-
$isOld = false;
|
159 |
-
$_content .= "</div>\n";
|
160 |
-
}
|
161 |
-
$_content .= $this->escapeHtml($_line) . "\n";
|
162 |
-
}
|
163 |
-
// $content = $this->escapeHtml($content, array('div', 'span', 'hr'));
|
164 |
-
return "<pre class=\"theard_content\" style=\"white-space:pre-wrap\">" .
|
165 |
-
"<code>" .
|
166 |
-
$_content .
|
167 |
-
'</code>' .
|
168 |
-
'</pre>';
|
169 |
-
}
|
170 |
-
|
171 |
-
public function getTheardFileUrl(array $theard)
|
172 |
-
{
|
173 |
-
$path = Mage::getBaseUrl('media') . 'helpmate' . DS;
|
174 |
-
$files = array_filter(explode(';', $theard['file']));
|
175 |
-
|
176 |
-
foreach ($files as &$file) {
|
177 |
-
$file = $path . $file;
|
178 |
-
}
|
179 |
-
|
180 |
-
return $files;
|
181 |
-
}
|
182 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Tab/Main.php
DELETED
@@ -1,207 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Support_Edit_Tab_Main
|
4 |
-
extends Mage_Adminhtml_Block_Widget_Form
|
5 |
-
implements Mage_Adminhtml_Block_Widget_Tab_Interface
|
6 |
-
{
|
7 |
-
protected function _prepareForm()
|
8 |
-
{
|
9 |
-
$model = Mage::registry('tmcore_support');
|
10 |
-
// Zend_Debug::dump($model->getData());
|
11 |
-
|
12 |
-
$isNew = !$model->getId();
|
13 |
-
// Zend_Debug::dump(__METHOD__);
|
14 |
-
$form = new Varien_Data_Form(
|
15 |
-
array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')
|
16 |
-
);
|
17 |
-
|
18 |
-
$form->setHtmlIdPrefix('module_');
|
19 |
-
|
20 |
-
$fieldset = $form->addFieldset(
|
21 |
-
'ticket_form',
|
22 |
-
array('legend' => Mage::helper('tmcore')->__('Current state'))
|
23 |
-
);
|
24 |
-
|
25 |
-
$fieldset->addField('title', $isNew ? 'text' : 'label', array(
|
26 |
-
'label' => Mage::helper('tmcore')->__('Title'),
|
27 |
-
'required' => $isNew,
|
28 |
-
'name' => 'title'
|
29 |
-
));
|
30 |
-
|
31 |
-
if (!$isNew) {
|
32 |
-
$fieldset->addField('email', 'label', array(
|
33 |
-
'label' => Mage::helper('tmcore')->__('From'),
|
34 |
-
'name' => 'email'
|
35 |
-
));
|
36 |
-
|
37 |
-
|
38 |
-
$fieldset->addField('id', 'hidden', array(
|
39 |
-
// 'label' => Mage::helper('tmcore')->__('Id'),
|
40 |
-
'name' => 'id'
|
41 |
-
));
|
42 |
-
//
|
43 |
-
// $fieldset->addField('number', 'label', array(
|
44 |
-
// 'label' => Mage::helper('tmcore')->__('Number'),
|
45 |
-
// 'name' => 'number'
|
46 |
-
// ));
|
47 |
-
}
|
48 |
-
$dapertments = array();
|
49 |
-
if ($model->getDepartmets() instanceof Varien_Data_Collection) {
|
50 |
-
$dapertments = $model->getDepartmets()->toOptionArray();
|
51 |
-
}
|
52 |
-
$fieldset->addField('department_id', 'select', array(
|
53 |
-
'label' => Mage::helper('tmcore')->__('Department'),
|
54 |
-
'name' => 'department_id',
|
55 |
-
'disabled' => !$isNew,
|
56 |
-
'required' => $isNew,
|
57 |
-
'values' => $dapertments
|
58 |
-
));
|
59 |
-
if (!$isNew) {
|
60 |
-
$statuses = array();
|
61 |
-
if ($model->getStatuses() instanceof Varien_Data_Collection) {
|
62 |
-
$statuses = $model->getStatuses()->toOptionArray();
|
63 |
-
}
|
64 |
-
$fieldset->addField('status', 'select', array(
|
65 |
-
'label' => Mage::helper('tmcore')->__('Status'),
|
66 |
-
'name' => 'status',
|
67 |
-
'disabled' => true,
|
68 |
-
// 'disabled' => !$isNew,
|
69 |
-
// 'required' => $isNew,
|
70 |
-
'values' => $statuses
|
71 |
-
));
|
72 |
-
}
|
73 |
-
$priorities = array();
|
74 |
-
if ($model->getPriorities() instanceof Varien_Data_Collection) {
|
75 |
-
$priorities = $model->getPriorities()->toOptionArray();
|
76 |
-
}
|
77 |
-
$fieldset->addField('priority', 'select', array(
|
78 |
-
'label' => Mage::helper('tmcore')->__('Priority'),
|
79 |
-
'name' => 'priority',
|
80 |
-
'disabled' => !$isNew,
|
81 |
-
'required' => $isNew,
|
82 |
-
'values' => $priorities
|
83 |
-
));
|
84 |
-
|
85 |
-
if (!$isNew) {
|
86 |
-
$fieldset->addField('created_at', 'date', array(
|
87 |
-
'label' => Mage::helper('tmcore')->__('Create date'),
|
88 |
-
// 'required' => true,
|
89 |
-
'disabled' => true,
|
90 |
-
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
91 |
-
'format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
|
92 |
-
//Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)
|
93 |
-
'name' => 'created_at',
|
94 |
-
));
|
95 |
-
|
96 |
-
$fieldset->addField('modified_at', 'date', array(
|
97 |
-
'label' => Mage::helper('tmcore')->__('Modified date'),
|
98 |
-
// 'required' => true,
|
99 |
-
'disabled' => true,
|
100 |
-
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
101 |
-
'format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
|
102 |
-
//Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)
|
103 |
-
'name' => 'modified_at',
|
104 |
-
));
|
105 |
-
}
|
106 |
-
if ($model->getTheards()) {
|
107 |
-
$fieldsetTheards = $form->addFieldset(
|
108 |
-
'ticket_theards_form',
|
109 |
-
array('legend' => Mage::helper('tmcore')->__('Theards'))
|
110 |
-
);
|
111 |
-
$fieldsetTheards->addType('support_theard', 'TM_Core_Block_Adminhtml_Support_Edit_Form_Element_Theard');
|
112 |
-
$fieldsetTheards->addField('theard', 'support_theard', array(
|
113 |
-
'name' => 'theard'
|
114 |
-
));
|
115 |
-
}
|
116 |
-
|
117 |
-
|
118 |
-
if (!$isNew) {
|
119 |
-
$fieldsetAddComment = $form->addFieldset(
|
120 |
-
'ticket_add_comment_form',
|
121 |
-
array(
|
122 |
-
'legend' => Mage::helper('tmcore')->__('Add Comment')
|
123 |
-
)
|
124 |
-
);
|
125 |
-
} else {
|
126 |
-
$fieldsetAddComment = $fieldset;
|
127 |
-
}
|
128 |
-
|
129 |
-
$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array(
|
130 |
-
'tab_id' => $this->getTabId(),
|
131 |
-
'add_variables' => false,
|
132 |
-
'add_widgets' => false,
|
133 |
-
'width' => '100%',
|
134 |
-
));
|
135 |
-
|
136 |
-
$fieldsetAddComment->addField('text', 'editor', array(
|
137 |
-
'label' => Mage::helper('tmcore')->__('Comment'),
|
138 |
-
'name' => 'text',
|
139 |
-
'config' => $wysiwygConfig,
|
140 |
-
'wysiwyg' => true,
|
141 |
-
'required' => true,
|
142 |
-
'style' => "width: 640px"
|
143 |
-
));
|
144 |
-
$fieldsetAddComment->addField('add', 'button', array(
|
145 |
-
'value' => Mage::helper('helpmate')->__($isNew ? 'Save' : 'Add Comment'),
|
146 |
-
'class' => 'form-button',
|
147 |
-
'name' => 'add_comment_button',
|
148 |
-
'onclick' => 'editForm.submit();return false;'
|
149 |
-
));
|
150 |
-
|
151 |
-
$form->addValues($model->getData());
|
152 |
-
$this->setForm($form);
|
153 |
-
|
154 |
-
return parent::_prepareForm();
|
155 |
-
}
|
156 |
-
|
157 |
-
/**
|
158 |
-
* Prepare label for tab
|
159 |
-
*
|
160 |
-
* @return string
|
161 |
-
*/
|
162 |
-
public function getTabLabel()
|
163 |
-
{
|
164 |
-
return Mage::helper('cms')->__('Main');
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Prepare title for tab
|
169 |
-
*
|
170 |
-
* @return string
|
171 |
-
*/
|
172 |
-
public function getTabTitle()
|
173 |
-
{
|
174 |
-
return Mage::helper('cms')->__('Main');
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Returns status flag about this tab can be shown or not
|
179 |
-
*
|
180 |
-
* @return true
|
181 |
-
*/
|
182 |
-
public function canShowTab()
|
183 |
-
{
|
184 |
-
return true;
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Returns status flag about this tab hidden or not
|
189 |
-
*
|
190 |
-
* @return true
|
191 |
-
*/
|
192 |
-
public function isHidden()
|
193 |
-
{
|
194 |
-
return false;
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Check permission for passed action
|
199 |
-
*
|
200 |
-
* @param string $action
|
201 |
-
* @return bool
|
202 |
-
*/
|
203 |
-
/*protected function _isAllowedAction($action)
|
204 |
-
{
|
205 |
-
return Mage::getSingleton('admin/session')->isAllowed('tmcore/module/' . $action);
|
206 |
-
}*/
|
207 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Support/Edit/Tabs.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Support_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
parent::__construct();
|
8 |
-
$this->setId('support_tabs');
|
9 |
-
$this->setDestElementId('edit_form');
|
10 |
-
$this->setTitle(Mage::helper('tmcore')->__('Support Ticket'));
|
11 |
-
}
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Support/List.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Support_List extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
$this->_controller = 'adminhtml_support_list';
|
8 |
-
$this->_blockGroup = 'tmcore';
|
9 |
-
$this->_headerText = Mage::helper('tmcore')->__('Reports');
|
10 |
-
parent::__construct();
|
11 |
-
}
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Support/List/Grid.php
DELETED
@@ -1,203 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Support_List_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
parent::__construct();
|
8 |
-
$this->setId('supportGrid');
|
9 |
-
$this->setDefaultSort('modified_at');
|
10 |
-
$this->setDefaultDir('ASC');
|
11 |
-
$this->setSaveParametersInSession(true);
|
12 |
-
}
|
13 |
-
|
14 |
-
protected function _prepareCollection()
|
15 |
-
{
|
16 |
-
$collection = Mage::registry('tmcore_support_collection');
|
17 |
-
// Zend_Debug::dump($collection->getFirstItem());
|
18 |
-
if ($collection instanceof Varien_Data_Collection) {
|
19 |
-
$this->setCollection($collection);
|
20 |
-
}
|
21 |
-
|
22 |
-
return parent::_prepareCollection();
|
23 |
-
}
|
24 |
-
|
25 |
-
protected function _prepareColumns()
|
26 |
-
{
|
27 |
-
|
28 |
-
$model = Mage::registry('tmcore_support');
|
29 |
-
|
30 |
-
$this->addColumn('id', array(
|
31 |
-
'header' => Mage::helper('helpmate')->__('ID'),
|
32 |
-
'align' => 'right',
|
33 |
-
'width' => '50px',
|
34 |
-
'index' => 'id',
|
35 |
-
'type' => 'number',
|
36 |
-
// 'filter_condition_callback' => array($this, '_filterId'),
|
37 |
-
));
|
38 |
-
|
39 |
-
$this->addColumn('text', array(
|
40 |
-
'header' => Mage::helper('helpmate')->__('Title'),
|
41 |
-
'align' => 'left',
|
42 |
-
'index' => 'title',
|
43 |
-
// 'filter_condition_callback' => array($this, '_filterTitle'),
|
44 |
-
));
|
45 |
-
|
46 |
-
$this->addColumn('user_name', array(
|
47 |
-
'header' => Mage::helper('helpmate')->__('Assigned'),
|
48 |
-
'align' => 'left',
|
49 |
-
'index' => 'user_name',
|
50 |
-
// 'filter_condition_callback' => array($this, '_filterUserName'),
|
51 |
-
));
|
52 |
-
|
53 |
-
$dapertments = array();
|
54 |
-
if ($model->getDepartmets() instanceof Varien_Data_Collection) {
|
55 |
-
$dapertments = $model->getDepartmets()->toOptionHash();
|
56 |
-
}
|
57 |
-
$this->addColumn('department', array(
|
58 |
-
'header' => Mage::helper('helpmate')->__('Department'),
|
59 |
-
'align' => 'left',
|
60 |
-
'index' => 'department_id',
|
61 |
-
'type' => 'options',
|
62 |
-
'options' => $dapertments,
|
63 |
-
// 'filter_condition_callback' => array($this, '_filterDepartamentId'),
|
64 |
-
));
|
65 |
-
|
66 |
-
$priorities = array();
|
67 |
-
if ($model->getPriorities() instanceof Varien_Data_Collection) {
|
68 |
-
$priorities = $model->getPriorities()->toOptionHash();
|
69 |
-
}
|
70 |
-
$this->addColumn('priority', array(
|
71 |
-
'header' => Mage::helper('helpmate')->__('Priority'),
|
72 |
-
'align' => 'left',
|
73 |
-
'width' => '80px',
|
74 |
-
'index' => 'priority',
|
75 |
-
'type' => 'options',
|
76 |
-
'options' => $priorities,
|
77 |
-
'frame_callback' => array($this, 'decorateStatus'),
|
78 |
-
// 'filter_condition_callback' => array($this, '_filterPriority'),
|
79 |
-
));
|
80 |
-
|
81 |
-
$statuses = array();
|
82 |
-
if ($model->getStatuses() instanceof Varien_Data_Collection) {
|
83 |
-
$statuses = $model->getStatuses()->toOptionHash();
|
84 |
-
}
|
85 |
-
$this->addColumn('status', array(
|
86 |
-
'header' => Mage::helper('helpmate')->__('Status'),
|
87 |
-
'align' => 'left',
|
88 |
-
'width' => '80px',
|
89 |
-
'index' => 'status',
|
90 |
-
'type' => 'options',
|
91 |
-
'options' => $statuses,
|
92 |
-
// 'filter_condition_callback' => array($this, '_filterStatus'),
|
93 |
-
));
|
94 |
-
|
95 |
-
$this->addColumn('created_at', array(
|
96 |
-
'header' => Mage::helper('helpmate')->__('Created date'),
|
97 |
-
'align' => 'left',
|
98 |
-
'type' => 'datetime',
|
99 |
-
'width' => '100px',
|
100 |
-
// 'filter_index' => 'rt.created_at',
|
101 |
-
'index' => 'created_at',
|
102 |
-
// 'filter' => false
|
103 |
-
));
|
104 |
-
|
105 |
-
$this->addColumn('modified_at', array(
|
106 |
-
'header' => Mage::helper('helpmate')->__('Modified date'),
|
107 |
-
'align' => 'left',
|
108 |
-
'type' => 'datetime',
|
109 |
-
'width' => '100px',
|
110 |
-
'index' => 'modified_at',
|
111 |
-
// 'filter' => false
|
112 |
-
));
|
113 |
-
|
114 |
-
$this->addExportType('*/*/exportCsv', Mage::helper('helpmate')->__('CSV'));
|
115 |
-
$this->addExportType('*/*/exportXml', Mage::helper('helpmate')->__('XML'));
|
116 |
-
|
117 |
-
return parent::_prepareColumns();
|
118 |
-
}
|
119 |
-
|
120 |
-
public function getRowUrl($row)
|
121 |
-
{
|
122 |
-
return $this->getUrl('*/*/edit', array('ticket_id' => $row->getId()));
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Decorate status column values
|
127 |
-
*
|
128 |
-
* @return string
|
129 |
-
*/
|
130 |
-
public function decorateStatus($value, $row, $column, $isExport)
|
131 |
-
{
|
132 |
-
$_classes = array('unknown', 'notice', 'minor', 'major', 'critical' , 'critical');
|
133 |
-
$_class = isset($_classes[$row->priority]) ? $_classes[$row->priority] : 'unknown';
|
134 |
-
|
135 |
-
return "<span class=\"grid-severity-{$_class}\"><span>{$value}</span></span>";
|
136 |
-
}
|
137 |
-
|
138 |
-
protected function _filterId($collection, $column)
|
139 |
-
{
|
140 |
-
$value = $column->getFilter()->getValue();
|
141 |
-
// $collection->addFilter('department_id', $value);
|
142 |
-
foreach ($collection as $item) {
|
143 |
-
if ($item->id < $value['from'] || $item->id > $value['to']) {
|
144 |
-
$collection->removeItemByKey($item->id);
|
145 |
-
}
|
146 |
-
}
|
147 |
-
}
|
148 |
-
|
149 |
-
protected function _filterTitle($collection, $column)
|
150 |
-
{
|
151 |
-
$value = $column->getFilter()->getValue();
|
152 |
-
// $collection->addFilter('department_id', $value);
|
153 |
-
foreach ($collection as $item) {
|
154 |
-
if (false === strpos($item->title, $value)) {
|
155 |
-
$collection->removeItemByKey($item->id);
|
156 |
-
}
|
157 |
-
}
|
158 |
-
}
|
159 |
-
|
160 |
-
protected function _filterUserName($collection, $column)
|
161 |
-
{
|
162 |
-
$value = $column->getFilter()->getValue();
|
163 |
-
// $collection->addFilter('department_id', $value);
|
164 |
-
foreach ($collection as $item) {
|
165 |
-
if (false === strpos($item->user_name, $value)) {
|
166 |
-
$collection->removeItemByKey($item->id);
|
167 |
-
}
|
168 |
-
}
|
169 |
-
}
|
170 |
-
|
171 |
-
protected function _filterDepartamentId($collection, $column)
|
172 |
-
{
|
173 |
-
$value = $column->getFilter()->getValue();
|
174 |
-
// $collection->addFilter('department_id', $value);
|
175 |
-
foreach ($collection as $item) {
|
176 |
-
if ($item->department_id != $value) {
|
177 |
-
$collection->removeItemByKey($item->id);
|
178 |
-
}
|
179 |
-
}
|
180 |
-
}
|
181 |
-
|
182 |
-
protected function _filterPriority($collection, $column)
|
183 |
-
{
|
184 |
-
$value = $column->getFilter()->getValue();
|
185 |
-
// $collection->addFilter('department_id', $value);
|
186 |
-
foreach ($collection as $item) {
|
187 |
-
if ($item->priority != $value) {
|
188 |
-
$collection->removeItemByKey($item->id);
|
189 |
-
}
|
190 |
-
}
|
191 |
-
}
|
192 |
-
|
193 |
-
protected function _filterStatus($collection, $column)
|
194 |
-
{
|
195 |
-
$value = $column->getFilter()->getValue();
|
196 |
-
// $collection->addFilter('department_id', $value);
|
197 |
-
foreach ($collection as $item) {
|
198 |
-
if ($item->status != $value) {
|
199 |
-
$collection->removeItemByKey($item->id);
|
200 |
-
}
|
201 |
-
}
|
202 |
-
}
|
203 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/System/Config/Form/Field/Notification.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_System_Config_Form_Field_Notification extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
-
{
|
5 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
6 |
-
{
|
7 |
-
$element->setValue(Mage::app()->loadCache('tmcore_notifications_lastcheck'));
|
8 |
-
$format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
|
9 |
-
return Mage::app()->getLocale()->date(intval($element->getValue()))->toString($format);
|
10 |
-
}
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/System/Config/Form/Field/Size.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_System_Config_Form_Field_Size
|
4 |
-
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
5 |
-
{
|
6 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
7 |
-
{
|
8 |
-
$element->setStyle('width:70px;')
|
9 |
-
->setName($element->getName() . '[]');
|
10 |
-
|
11 |
-
if ($element->getValue()) {
|
12 |
-
$values = explode(',', $element->getValue());
|
13 |
-
} else {
|
14 |
-
$values = array();
|
15 |
-
}
|
16 |
-
|
17 |
-
$width = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
|
18 |
-
$height = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
|
19 |
-
return Mage::helper('sales')->__('Width') . ' ' . $width
|
20 |
-
. ' '
|
21 |
-
. Mage::helper('sales')->__('Height') . ' ' . $height;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/System/Config/Form/Fieldset/Modules/List.php
DELETED
@@ -1,46 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_System_Config_Form_Fieldset_Modules_List
|
4 |
-
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
5 |
-
{
|
6 |
-
public function render(Varien_Data_Form_Element_Abstract $element)
|
7 |
-
{
|
8 |
-
$html = $this->_getHeaderHtml($element);
|
9 |
-
$modules = Mage::getConfig()->getNode('modules')->children();
|
10 |
-
$linkTitle = Mage::helper('tmcore')->__('Open Extension Page');
|
11 |
-
foreach ($modules as $moduleName => $values) {
|
12 |
-
if (0 !== strpos($moduleName, 'TM_')) {
|
13 |
-
continue;
|
14 |
-
}
|
15 |
-
|
16 |
-
if ($values->tm_link) {
|
17 |
-
if (@is_readable(MAGENTO_ROOT . '/lib/Varien/Data/Form/Element/Link.php')) {
|
18 |
-
$field = $element->addField($moduleName, 'link', array(
|
19 |
-
'label' => $moduleName,
|
20 |
-
'value' => (string) $values->version,
|
21 |
-
'href' => (string) $values->tm_link,
|
22 |
-
'onclick' => 'window.open(this.href); return false;',
|
23 |
-
'title' => $linkTitle
|
24 |
-
));
|
25 |
-
} else {
|
26 |
-
$link = (string) $values->tm_link;
|
27 |
-
$moduleName = "<a href='{$link}' onclick='window.open(this.href); return false;' title='{$linkTitle}'>{$moduleName}</a>";
|
28 |
-
|
29 |
-
$field = $element->addField($moduleName, 'label', array(
|
30 |
-
'label' => $moduleName,
|
31 |
-
'value' => (string) $values->version
|
32 |
-
));
|
33 |
-
}
|
34 |
-
} else {
|
35 |
-
$field = $element->addField($moduleName, 'label', array(
|
36 |
-
'label' => $moduleName,
|
37 |
-
'value' => (string) $values->version
|
38 |
-
));
|
39 |
-
}
|
40 |
-
$html .= $field->toHtml();
|
41 |
-
}
|
42 |
-
$html .= $this->_getFooterHtml($element);
|
43 |
-
|
44 |
-
return $html;
|
45 |
-
}
|
46 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/System/Config/Form/Fieldset/Troubleshooting.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_System_Config_Form_Fieldset_Troubleshooting
|
4 |
-
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
5 |
-
{
|
6 |
-
public function render(Varien_Data_Form_Element_Abstract $element)
|
7 |
-
{
|
8 |
-
$html = $this->_getHeaderHtml($element);
|
9 |
-
$html .= Mage::helper('tmcore')->__(Mage::getStoreConfig('tmcore/troubleshooting/text'));
|
10 |
-
$html .= $this->_getFooterHtml($element);
|
11 |
-
return $html;
|
12 |
-
}
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Widget/Form/Element/Wysiwyg.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Widget_Form_Element_Wysiwyg extends Varien_Data_Form_Element_Textarea
|
4 |
-
{
|
5 |
-
/**
|
6 |
-
* Retrieve additional html and put it at the end of element html
|
7 |
-
*
|
8 |
-
* @return string
|
9 |
-
*/
|
10 |
-
public function getAfterElementHtml()
|
11 |
-
{
|
12 |
-
$html = parent::getAfterElementHtml();
|
13 |
-
if ($this->getIsWysiwygEnabled()) {
|
14 |
-
$disabled = ($this->getDisabled() || $this->getReadonly());
|
15 |
-
$html .= Mage::getSingleton('core/layout')
|
16 |
-
->createBlock('adminhtml/widget_button', '', array(
|
17 |
-
'label' => Mage::helper('catalog')->__('WYSIWYG Editor'),
|
18 |
-
'type' => 'button',
|
19 |
-
'disabled' => $disabled,
|
20 |
-
'class' => /*($disabled) ? 'disabled btn-wysiwyg' : */'btn-wysiwyg',
|
21 |
-
'onclick' => 'catalogWysiwygEditor.open(\''.Mage::helper('adminhtml')->getUrl('*/*/wysiwyg').'\', \''.$this->getHtmlId().'\')'
|
22 |
-
))->toHtml();
|
23 |
-
}
|
24 |
-
return $html;
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Check whether wysiwyg enabled or not
|
29 |
-
*
|
30 |
-
* @return boolean
|
31 |
-
*/
|
32 |
-
public function getIsWysiwygEnabled()
|
33 |
-
{
|
34 |
-
$helper = Mage::helper('catalog');
|
35 |
-
|
36 |
-
if (method_exists($helper, 'isModuleEnabled')) {
|
37 |
-
if (Mage::helper('catalog')->isModuleEnabled('Mage_Cms')) {
|
38 |
-
return (bool)(Mage::getSingleton('cms/wysiwyg_config')->isEnabled());
|
39 |
-
}
|
40 |
-
} else {
|
41 |
-
return (bool)(Mage::getSingleton('cms/wysiwyg_config')->isEnabled()); // Magento 1401-1420
|
42 |
-
}
|
43 |
-
|
44 |
-
return false;
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Widget/Form/Element/Wysiwyg/Content.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Widget_Form_Element_Wysiwyg_Content
|
4 |
-
extends Mage_Adminhtml_Block_Widget_Form
|
5 |
-
{
|
6 |
-
/**
|
7 |
-
* Modified Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg_Content to allow to use widgets
|
8 |
-
*
|
9 |
-
* @return Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg_Content
|
10 |
-
*/
|
11 |
-
protected function _prepareForm()
|
12 |
-
{
|
13 |
-
$form = new Varien_Data_Form(array('id' => 'wysiwyg_edit_form', 'action' => $this->getData('action'), 'method' => 'post'));
|
14 |
-
|
15 |
-
$config['document_base_url'] = $this->getData('store_media_url');
|
16 |
-
$config['store_id'] = $this->getData('store_id');
|
17 |
-
$config['add_variables'] = true;
|
18 |
-
$config['add_widgets'] = true;
|
19 |
-
$config['add_directives'] = true;
|
20 |
-
$config['use_container'] = true;
|
21 |
-
$config['container_class'] = 'hor-scroll';
|
22 |
-
// $config['enabled'] = true;
|
23 |
-
// $config['hidden'] = true; // widget popup doesn't works if wysiwyg is visible by default
|
24 |
-
|
25 |
-
$form->addField($this->getData('editor_element_id'), 'editor', array(
|
26 |
-
'name' => 'content',
|
27 |
-
'style' => 'width:725px;height:460px',
|
28 |
-
'required' => true,
|
29 |
-
'force_load' => true,
|
30 |
-
'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig($config)
|
31 |
-
));
|
32 |
-
$this->setForm($form);
|
33 |
-
return parent::_prepareForm();
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Adminhtml/Widget/Form/Renderer/Wysiwyg.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Block_Adminhtml_Widget_Form_Renderer_Wysiwyg
|
4 |
-
extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
|
5 |
-
{
|
6 |
-
public function render(Varien_Data_Form_Element_Abstract $element)
|
7 |
-
{
|
8 |
-
$editor = new TM_Core_Block_Adminhtml_Widget_Form_Element_Wysiwyg($element->getData());
|
9 |
-
$editor->setId($element->getId());
|
10 |
-
$editor->setForm($element->getForm());
|
11 |
-
return parent::render($editor);
|
12 |
-
}
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Block/Cms/Block.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Rewrite Mage_Cms_Block_Block class to prevent CMS Static blocks from caching.
|
4 |
-
* TM Themes and Extensions use static blocks to output dynamic data.
|
5 |
-
*/
|
6 |
-
class TM_Core_Block_Cms_Block extends Mage_Cms_Block_Block
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* No cache for CMS blocks
|
10 |
-
*
|
11 |
-
* @return null
|
12 |
-
*/
|
13 |
-
protected function _construct()
|
14 |
-
{
|
15 |
-
parent::_construct();
|
16 |
-
$this->unsCacheTags();
|
17 |
-
$this->unsCacheLifetime();
|
18 |
-
}
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Helper/Data.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
-
{
|
5 |
-
public function isDesignPackageEquals($packageName)
|
6 |
-
{
|
7 |
-
$package = Mage::getSingleton('core/design_package');
|
8 |
-
return $package->getPackageName() === $packageName;
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Helper/Debug.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Helper_Debug extends Mage_Core_Helper_Abstract
|
4 |
-
{
|
5 |
-
const POPUP_NAME = 'tmcore_debug_popup';
|
6 |
-
|
7 |
-
public function preparePopup($text, $title = 'Debug Information')
|
8 |
-
{
|
9 |
-
$helper = Mage::helper('core');
|
10 |
-
|
11 |
-
Mage::app()->getLayout()
|
12 |
-
->createBlock('core/text')
|
13 |
-
->setNameInLayout(self::POPUP_NAME)
|
14 |
-
->setText(
|
15 |
-
'<div id="'.self::POPUP_NAME.'" style="display:none">'
|
16 |
-
. '<pre>'
|
17 |
-
. $helper->escapeHtml($text)
|
18 |
-
. '</pre>'
|
19 |
-
. '</div>'
|
20 |
-
);
|
21 |
-
|
22 |
-
$title = $helper->escapeHtml($title);
|
23 |
-
return sprintf(
|
24 |
-
"<a href='#' onclick=\"%s\">%s</a>",
|
25 |
-
"tmcoreWindow.update($('".self::POPUP_NAME."').innerHTML, '{$title}').show()",
|
26 |
-
Mage::helper('tmcore')->__('Show response')
|
27 |
-
);
|
28 |
-
}
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Adminhtml/System/Config/Source/Notification/Channel.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Adminhtml_System_Config_Source_Notification_Channel
|
4 |
-
{
|
5 |
-
const CHANNEL_INSTALLED = 'installed';
|
6 |
-
const CHANNEL_PROMO = 'promo';
|
7 |
-
const CHANNEL_RELEASE = 'release';
|
8 |
-
const CHANNEL_UPDATE = 'update';
|
9 |
-
const CHANNEL_OTHER = 'other';
|
10 |
-
|
11 |
-
protected $_labels = array(
|
12 |
-
self::CHANNEL_INSTALLED => 'Installed products', // must be first item
|
13 |
-
// @see TM_Notifier_Block_Adminhtml_Message_Edit_Form~45
|
14 |
-
// unset($channels[0]);
|
15 |
-
self::CHANNEL_PROMO => 'Product promotions and discounts',
|
16 |
-
self::CHANNEL_RELEASE => 'New Products',
|
17 |
-
self::CHANNEL_UPDATE => 'Product updates',
|
18 |
-
self::CHANNEL_OTHER => 'Other'
|
19 |
-
);
|
20 |
-
|
21 |
-
public function toOptionArray()
|
22 |
-
{
|
23 |
-
$filters = array();
|
24 |
-
$helper = Mage::helper('core');
|
25 |
-
foreach ($this->_labels as $value => $label) {
|
26 |
-
$filters[] = array(
|
27 |
-
'value' => $value,
|
28 |
-
'label' => $helper->__($label)
|
29 |
-
);
|
30 |
-
}
|
31 |
-
return $filters;
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Module.php
DELETED
@@ -1,461 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Module extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
const VERSION_UPDATED = 1;
|
6 |
-
const VERSION_OUTDATED = 2; // new upgrades are avaialble
|
7 |
-
const VERSION_DEPRECATED = 3; // new version is avaialble but now uploaded
|
8 |
-
|
9 |
-
const XML_USE_HTTPS_PATH = 'tmcore/license/use_https';
|
10 |
-
const XML_VALIDATE_URL_PATH = 'tmcore/license/url';
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @var TM_Core_Model_Module_ErrorLogger
|
14 |
-
*/
|
15 |
-
protected static $_messageLogger = null;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Retrieve Severity collection array
|
19 |
-
*
|
20 |
-
* @return array|string
|
21 |
-
*/
|
22 |
-
public function getVersionStatuses($status = null)
|
23 |
-
{
|
24 |
-
$versionStatuses = array(
|
25 |
-
self::VERSION_UPDATED => Mage::helper('tmcore')->__('updated'),
|
26 |
-
self::VERSION_OUTDATED => Mage::helper('tmcore')->__('outdated'),
|
27 |
-
self::VERSION_DEPRECATED => Mage::helper('tmcore')->__('deprecated')
|
28 |
-
);
|
29 |
-
|
30 |
-
if (!is_null($status)) {
|
31 |
-
if (isset($versionStatuses[$status])) {
|
32 |
-
return $versionStatuses[$status];
|
33 |
-
}
|
34 |
-
return null;
|
35 |
-
}
|
36 |
-
|
37 |
-
return $versionStatuses;
|
38 |
-
}
|
39 |
-
|
40 |
-
protected function _construct()
|
41 |
-
{
|
42 |
-
$this->_init('tmcore/module');
|
43 |
-
}
|
44 |
-
|
45 |
-
public function load($id, $field=null)
|
46 |
-
{
|
47 |
-
parent::load($id, $field);
|
48 |
-
|
49 |
-
$xml = Mage::getConfig()->getNode('modules/' . $id);
|
50 |
-
$this->setId($id);
|
51 |
-
$this->setDepends(array());
|
52 |
-
if ($xml) {
|
53 |
-
$data = $xml->asCanonicalArray();
|
54 |
-
if (isset($data['depends']) && is_array($data['depends'])) {
|
55 |
-
$data['depends'] = array_keys($data['depends']);
|
56 |
-
} else {
|
57 |
-
$data['depends'] = array();
|
58 |
-
}
|
59 |
-
$this->addData($data);
|
60 |
-
}
|
61 |
-
|
62 |
-
return $this;
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Merge new_store_ids and store_ids arrays
|
67 |
-
*
|
68 |
-
* @return Mage_Core_Model_Abstract
|
69 |
-
*/
|
70 |
-
protected function _beforeSave()
|
71 |
-
{
|
72 |
-
$oldStores = $this->getOldStores();
|
73 |
-
$newStores = $this->getNewStoreIds();
|
74 |
-
if (is_array($newStores)) {
|
75 |
-
$stores = array_merge($oldStores, $newStores);
|
76 |
-
$this->setStoreIds(implode(',', array_unique($stores)));
|
77 |
-
}
|
78 |
-
return parent::_beforeSave();
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Retrieve module remote information
|
83 |
-
*
|
84 |
-
* @return Varien_Object
|
85 |
-
*/
|
86 |
-
public function getRemote()
|
87 |
-
{
|
88 |
-
if (null === $this->getData('remote')) {
|
89 |
-
$remote = Mage::getResourceModel('tmcore/module_remoteCollection')
|
90 |
-
->getItemById($this->getId());
|
91 |
-
|
92 |
-
$this->setData('remote', $remote);
|
93 |
-
}
|
94 |
-
return $this->getData('remote');
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Retreive is validation required flag.
|
99 |
-
* True, if remote has identity_key_link
|
100 |
-
*
|
101 |
-
* @return boolean
|
102 |
-
*/
|
103 |
-
public function isValidationRequired()
|
104 |
-
{
|
105 |
-
return $this->getRemote() && $this->getRemote()->getIdentityKeyLink();
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Validates module license
|
110 |
-
*
|
111 |
-
* @return true|array Response
|
112 |
-
* <pre>
|
113 |
-
* error : error_message[optional]
|
114 |
-
* success: true|false
|
115 |
-
* </pre>
|
116 |
-
*/
|
117 |
-
public function validateLicense()
|
118 |
-
{
|
119 |
-
if (!$this->isValidationRequired()) {
|
120 |
-
return true;
|
121 |
-
}
|
122 |
-
|
123 |
-
$key = trim($this->getIdentityKey());
|
124 |
-
if (empty($key)) {
|
125 |
-
return array('error' => array('Identity key is required'));
|
126 |
-
}
|
127 |
-
|
128 |
-
// key format is: encoded_site:secret_key:optional_suffix
|
129 |
-
$parts = explode(':', $key);
|
130 |
-
if (count($parts) < 3) {
|
131 |
-
return array('error' => array('Identity key is not valid'));
|
132 |
-
}
|
133 |
-
list($site, $secret, $suffix) = explode(':', $key);
|
134 |
-
|
135 |
-
// @todo implement cached response storage
|
136 |
-
try {
|
137 |
-
$client = new Zend_Http_Client();
|
138 |
-
$adapter = new Zend_Http_Client_Adapter_Curl();
|
139 |
-
$client->setAdapter($adapter);
|
140 |
-
$client->setUri($this->_getValidateUri($site));
|
141 |
-
$client->setConfig(array('maxredirects'=>5, 'timeout'=>30));
|
142 |
-
$client->setParameterGet('key', $secret);
|
143 |
-
$client->setParameterGet('suffix', $suffix);
|
144 |
-
$module = $this->getTmPurchaseCode() ? $this->getTmPurchaseCode() : $this->getCode();
|
145 |
-
$client->setParameterGet('module', $module);
|
146 |
-
$client->setParameterGet('module_code', $this->getCode());
|
147 |
-
if ($this->getConfigSection()) {
|
148 |
-
$client->setParameterGet('config_section', $this->getConfigSection());
|
149 |
-
}
|
150 |
-
$client->setParameterGet('domain', Mage::app()->getRequest()->getHttpHost());
|
151 |
-
$response = $client->request();
|
152 |
-
$responseBody = $response->getBody();
|
153 |
-
} catch (Exception $e) {
|
154 |
-
return array('error' => array(
|
155 |
-
'Response error: %s',
|
156 |
-
$e->getMessage()
|
157 |
-
));
|
158 |
-
}
|
159 |
-
|
160 |
-
return $this->_parseResponse($responseBody);
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Parse server response
|
165 |
-
*
|
166 |
-
* @param string $response
|
167 |
-
* <pre>
|
168 |
-
* "{success: true}" or "{error: error_message}"
|
169 |
-
* </pre>
|
170 |
-
*/
|
171 |
-
protected function _parseResponse($response)
|
172 |
-
{
|
173 |
-
try {
|
174 |
-
$result = Mage::helper('core')->jsonDecode($response);
|
175 |
-
if (!is_array($result)) {
|
176 |
-
throw new Exception('Decoding failed');
|
177 |
-
}
|
178 |
-
} catch (Exception $e) {
|
179 |
-
$result = array(
|
180 |
-
'error' => array(
|
181 |
-
'Sorry, try again in five minutes. Validation response parsing error: %s',
|
182 |
-
$e->getMessage()
|
183 |
-
),
|
184 |
-
'response' => $response
|
185 |
-
);
|
186 |
-
}
|
187 |
-
return $result;
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Retrieve validation url according to the encoded $site
|
192 |
-
*
|
193 |
-
* @param string $site Base64 encoded site url [example.com]
|
194 |
-
*/
|
195 |
-
protected function _getValidateUri($site)
|
196 |
-
{
|
197 |
-
$site = base64_decode($site);
|
198 |
-
return (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')
|
199 |
-
. rtrim($site, '/ ')
|
200 |
-
. Mage::getStoreConfig(self::XML_VALIDATE_URL_PATH);
|
201 |
-
}
|
202 |
-
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Set the stores, where the module should be installed or reinstalled
|
206 |
-
*
|
207 |
-
* @param array $ids
|
208 |
-
* @return TM_Core_Model_Module
|
209 |
-
*/
|
210 |
-
public function setNewStores(array $ids)
|
211 |
-
{
|
212 |
-
$this->setData('new_store_ids', array_unique($ids));
|
213 |
-
return $this;
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Retieve store ids, where the module is already installed
|
218 |
-
*
|
219 |
-
* @return array
|
220 |
-
*/
|
221 |
-
public function getOldStores()
|
222 |
-
{
|
223 |
-
$ids = $this->getStoreIds();
|
224 |
-
if (null === $ids || '' === $ids) {
|
225 |
-
return array();
|
226 |
-
}
|
227 |
-
if (!is_array($ids)) {
|
228 |
-
$ids = explode(',', $ids);
|
229 |
-
}
|
230 |
-
return $ids;
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* Retieve store ids, where the module is already installed
|
235 |
-
*
|
236 |
-
* @return array
|
237 |
-
*/
|
238 |
-
public function getStores()
|
239 |
-
{
|
240 |
-
return $this->getOldStores();
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* Retrieve store ids to install module on
|
245 |
-
*
|
246 |
-
* @return array
|
247 |
-
*/
|
248 |
-
public function getNewStores()
|
249 |
-
{
|
250 |
-
return $this->getNewStoreIds();
|
251 |
-
}
|
252 |
-
|
253 |
-
public function isInstalled()
|
254 |
-
{
|
255 |
-
return false;// we always can install the extension to the new stores
|
256 |
-
}
|
257 |
-
|
258 |
-
/**
|
259 |
-
* Checks is the upgrades directory is exists in the module
|
260 |
-
*
|
261 |
-
* @return boolean
|
262 |
-
*/
|
263 |
-
public function hasUpgradesDir()
|
264 |
-
{
|
265 |
-
return is_readable($this->getUpgradesPath());
|
266 |
-
}
|
267 |
-
|
268 |
-
/**
|
269 |
-
* Retrieve the list of not installed upgrade filenames
|
270 |
-
* sorted by version_compare.
|
271 |
-
* The list could be filtered with optional from and to parameters.
|
272 |
-
* These parameters are usefull, when the module is installed and new upgrades
|
273 |
-
* are available
|
274 |
-
*
|
275 |
-
* @param string $from
|
276 |
-
* @return array
|
277 |
-
*/
|
278 |
-
public function getUpgradesToRun($from = null)
|
279 |
-
{
|
280 |
-
if (null === $from) {
|
281 |
-
$from = $this->getDataVersion();
|
282 |
-
}
|
283 |
-
|
284 |
-
$upgrades = array();
|
285 |
-
foreach ($this->getUpgrades() as $upgradeVersion) {
|
286 |
-
if (version_compare($from, $upgradeVersion) >= 0) {
|
287 |
-
continue;
|
288 |
-
}
|
289 |
-
$upgrades[] = $upgradeVersion;
|
290 |
-
}
|
291 |
-
|
292 |
-
return $upgrades;
|
293 |
-
}
|
294 |
-
|
295 |
-
/**
|
296 |
-
* Retrive the list of all module upgrade filenames
|
297 |
-
* sorted by version_compare
|
298 |
-
*
|
299 |
-
* @return array
|
300 |
-
*/
|
301 |
-
public function getUpgrades()
|
302 |
-
{
|
303 |
-
$upgrades = $this->getData('upgrades');
|
304 |
-
if (is_array($upgrades)) {
|
305 |
-
return $upgrades;
|
306 |
-
}
|
307 |
-
|
308 |
-
try {
|
309 |
-
$dir = $this->getUpgradesPath();
|
310 |
-
if (!is_readable($dir)) {
|
311 |
-
return array();
|
312 |
-
}
|
313 |
-
$dir = new DirectoryIterator($dir);
|
314 |
-
} catch (Exception $e) {
|
315 |
-
// module doesn't has upgrades
|
316 |
-
return array();
|
317 |
-
}
|
318 |
-
|
319 |
-
$upgrades = array();
|
320 |
-
foreach ($dir as $file) {
|
321 |
-
$file = $file->getFilename();
|
322 |
-
if (false === strstr($file, '.php')) {
|
323 |
-
continue;
|
324 |
-
}
|
325 |
-
$upgrades[] = substr($file, 0, -4);
|
326 |
-
}
|
327 |
-
usort($upgrades, 'version_compare');
|
328 |
-
$this->setData('upgrades', $upgrades);
|
329 |
-
return $upgrades;
|
330 |
-
}
|
331 |
-
|
332 |
-
/**
|
333 |
-
* Run the module upgrades. Depends run first.
|
334 |
-
*
|
335 |
-
* @return void
|
336 |
-
*/
|
337 |
-
public function up()
|
338 |
-
{
|
339 |
-
$oldStores = $this->getOldStores(); // update to newest data_version
|
340 |
-
$newStores = $this->getNewStores(); // run all upgrade files
|
341 |
-
if (!count($oldStores) && !count($newStores)) {
|
342 |
-
return;
|
343 |
-
}
|
344 |
-
|
345 |
-
foreach ($this->getDepends() as $moduleCode) {
|
346 |
-
if (0 !== strpos($moduleCode, 'TM_')) {
|
347 |
-
continue;
|
348 |
-
}
|
349 |
-
$this->_getModuleObject($moduleCode)->up();
|
350 |
-
}
|
351 |
-
$saved = false;
|
352 |
-
|
353 |
-
// upgrade currently installed version to the latest data_version
|
354 |
-
if (count($oldStores)) {
|
355 |
-
foreach ($this->getUpgradesToRun() as $version) {
|
356 |
-
// customer able to skip upgrading data of installed modules
|
357 |
-
if (!$this->getSkipUpgrade()) {
|
358 |
-
$this->getUpgradeObject($version)
|
359 |
-
->setStoreIds($oldStores)
|
360 |
-
->upgrade();
|
361 |
-
}
|
362 |
-
$this->setDataVersion($version)->save();
|
363 |
-
$saved = true;
|
364 |
-
}
|
365 |
-
}
|
366 |
-
|
367 |
-
// install module to the new stores
|
368 |
-
if (count($newStores)) {
|
369 |
-
foreach ($this->getUpgradesToRun(0) as $version) {
|
370 |
-
$this->getUpgradeObject($version)
|
371 |
-
->setStoreIds($newStores)
|
372 |
-
->upgrade();
|
373 |
-
$this->setDataVersion($version)->save();
|
374 |
-
$saved = true;
|
375 |
-
}
|
376 |
-
}
|
377 |
-
|
378 |
-
if (!$saved) {
|
379 |
-
$this->save(); // identity key could be updated without running the upgrades
|
380 |
-
}
|
381 |
-
}
|
382 |
-
|
383 |
-
/**
|
384 |
-
* Retrieve singleton instance of error logger, used in upgrade file
|
385 |
-
* to write errors and module controller to read them.
|
386 |
-
*
|
387 |
-
* @return TM_Core_Model_Module_MessageLogger
|
388 |
-
*/
|
389 |
-
public function getMessageLogger()
|
390 |
-
{
|
391 |
-
if (null === self::$_messageLogger) {
|
392 |
-
self::$_messageLogger = Mage::getSingleton('tmcore/module_messageLogger');
|
393 |
-
}
|
394 |
-
return self::$_messageLogger;
|
395 |
-
}
|
396 |
-
|
397 |
-
/**
|
398 |
-
* Retrieve upgrade class name from version string:
|
399 |
-
* 1.0.0 => ModuleCode_Upgrade_1_0_0
|
400 |
-
*
|
401 |
-
* @param string $version
|
402 |
-
* @return string Class name
|
403 |
-
*/
|
404 |
-
protected function _getUpgradeClassName($version)
|
405 |
-
{
|
406 |
-
$version = ucwords(preg_replace("/\W+/", " ", $version));
|
407 |
-
$version = str_replace(' ', '_', $version);
|
408 |
-
return $this->getId() . '_Upgrade_' . $version;
|
409 |
-
}
|
410 |
-
|
411 |
-
/**
|
412 |
-
* Returns upgrade class instance by given version
|
413 |
-
*
|
414 |
-
* @param string $version
|
415 |
-
* @return TM_Core_Model_Module_Upgrade
|
416 |
-
*/
|
417 |
-
public function getUpgradeObject($version)
|
418 |
-
{
|
419 |
-
require_once $this->getUpgradesPath() . "/{$version}.php";
|
420 |
-
$className = $this->_getUpgradeClassName($version);
|
421 |
-
$upgrade = new $className();
|
422 |
-
$upgrade->setModule($this);
|
423 |
-
return $upgrade;
|
424 |
-
}
|
425 |
-
|
426 |
-
/**
|
427 |
-
* Retrieve module upgrade directory
|
428 |
-
*
|
429 |
-
* @return string
|
430 |
-
*/
|
431 |
-
public function getUpgradesPath()
|
432 |
-
{
|
433 |
-
return Mage::getBaseDir('code')
|
434 |
-
. DS
|
435 |
-
. $this->_getData('codePool')
|
436 |
-
. DS
|
437 |
-
. uc_words($this->getId(), DS)
|
438 |
-
. DS
|
439 |
-
. 'upgrades';
|
440 |
-
}
|
441 |
-
|
442 |
-
/**
|
443 |
-
* Returns loded module object with copied new_store_ids and skip_upgrade
|
444 |
-
* instructions into it
|
445 |
-
*
|
446 |
-
* @return TM_Core_Model_Module
|
447 |
-
*/
|
448 |
-
protected function _getModuleObject($code)
|
449 |
-
{
|
450 |
-
$module = Mage::getModel('tmcore/module')->load($code)
|
451 |
-
->setNewStores($this->getNewStores())
|
452 |
-
->setSkipUpgrade($this->getSkipUpgrade());
|
453 |
-
|
454 |
-
if (!$module->getIdentityKey()) {
|
455 |
-
// dependent modules will have the same license if not exists
|
456 |
-
$module->setIdentityKey($this->getIdentityKey());
|
457 |
-
}
|
458 |
-
|
459 |
-
return $module;
|
460 |
-
}
|
461 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Module/MessageLogger.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Module_MessageLogger
|
4 |
-
{
|
5 |
-
protected $_messages = array(
|
6 |
-
'errors' => array(),
|
7 |
-
'notices' => array(),
|
8 |
-
'success' => array()
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* @param string $type
|
13 |
-
* @param mixed $error array or string with error message
|
14 |
-
* <pre>
|
15 |
-
* message required
|
16 |
-
* trace optional
|
17 |
-
* </pre>
|
18 |
-
*/
|
19 |
-
public function addError($type, $error)
|
20 |
-
{
|
21 |
-
$this->_messages['errors'][$type][] = $error;
|
22 |
-
}
|
23 |
-
|
24 |
-
public function getErrors()
|
25 |
-
{
|
26 |
-
return $this->_messages['errors'];
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @param string $type
|
31 |
-
* @param string $notice
|
32 |
-
*/
|
33 |
-
public function addNotice($type, $notice)
|
34 |
-
{
|
35 |
-
$this->_messages['notices'][$type][] = $notice;
|
36 |
-
}
|
37 |
-
|
38 |
-
public function getNotices()
|
39 |
-
{
|
40 |
-
return $this->_messages['notices'];
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @param string $type
|
45 |
-
* @param string $notice
|
46 |
-
*/
|
47 |
-
public function addSuccess($type, $success)
|
48 |
-
{
|
49 |
-
$this->_messages['success'][$type][] = $notice;
|
50 |
-
}
|
51 |
-
|
52 |
-
public function getSuccess()
|
53 |
-
{
|
54 |
-
return $this->_messages['success'];
|
55 |
-
}
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Module/Upgrade.php
DELETED
@@ -1,942 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
abstract class TM_Core_Model_Module_Upgrade extends Varien_Object
|
4 |
-
{
|
5 |
-
/**
|
6 |
-
* @var array Store ids, where the module will be installed
|
7 |
-
*/
|
8 |
-
protected $_storeIds = array();
|
9 |
-
|
10 |
-
/**
|
11 |
-
* @var array Store instances
|
12 |
-
*/
|
13 |
-
protected static $_stores = array();
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Used to guarantee unique backup names in case of duplicate name and date
|
17 |
-
*
|
18 |
-
* @var int
|
19 |
-
*/
|
20 |
-
protected static $_backupIterator = 0;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Additional operations could be done from this method
|
24 |
-
*/
|
25 |
-
public function up(){}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Retrieve the list of operation to be done,
|
29 |
-
* including module depends.
|
30 |
-
*
|
31 |
-
* Supported operations:
|
32 |
-
* configuration @see runConfiguration
|
33 |
-
* cmsblock @see runCmsblock
|
34 |
-
* cmspage @see runCmspage
|
35 |
-
* easyslide @see runEasyslide
|
36 |
-
* easybanner @see runEasybanner
|
37 |
-
* prolabels @see runProlabels
|
38 |
-
* productAttribute @see runProductAttribute
|
39 |
-
*
|
40 |
-
* @return array
|
41 |
-
*/
|
42 |
-
public function getOperations()
|
43 |
-
{
|
44 |
-
return array();
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Set store ids to run the upgrade on
|
49 |
-
*
|
50 |
-
* @return TM_Core_Model_Module_Upgrade
|
51 |
-
*/
|
52 |
-
public function setStoreIds(array $ids)
|
53 |
-
{
|
54 |
-
if (Mage::app()->isSingleStoreMode()) {
|
55 |
-
$this->_storeIds = array(Mage::app()->getStore(true)->getId());
|
56 |
-
} else {
|
57 |
-
$this->_storeIds = $ids;
|
58 |
-
}
|
59 |
-
return $this;
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Retrieve store ids
|
64 |
-
*
|
65 |
-
* @return array
|
66 |
-
*/
|
67 |
-
public function getStoreIds()
|
68 |
-
{
|
69 |
-
return $this->_storeIds;
|
70 |
-
}
|
71 |
-
|
72 |
-
public function upgrade()
|
73 |
-
{
|
74 |
-
foreach ($this->getOperations() as $operation => $instructions) {
|
75 |
-
$method = 'run' . ucfirst($operation);
|
76 |
-
if (method_exists($this, $method)) {
|
77 |
-
$this->$method($instructions);
|
78 |
-
}
|
79 |
-
}
|
80 |
-
$this->up();
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* @param array $mapping key=>value pairs of old and new path
|
85 |
-
* @return void
|
86 |
-
*/
|
87 |
-
public function renameConfigPath($mapping)
|
88 |
-
{
|
89 |
-
$table = Mage::getResourceModel('core/config_data')->getMainTable();
|
90 |
-
$adapter = Mage::getModel('core/resource')
|
91 |
-
->getConnection(Mage_Core_Model_Resource::DEFAULT_WRITE_RESOURCE);
|
92 |
-
|
93 |
-
$newPaths = array_values($mapping);
|
94 |
-
$collection = Mage::getResourceModel('core/config_data_collection');
|
95 |
-
$collection->addFieldToFilter('path', array('in' => $newPaths))
|
96 |
-
->load();
|
97 |
-
|
98 |
-
$adapter->beginTransaction();
|
99 |
-
try {
|
100 |
-
foreach ($mapping as $oldPath => $newPath) {
|
101 |
-
if ($collection->getItemByColumnValue('path', $newPath)) {
|
102 |
-
continue;
|
103 |
-
}
|
104 |
-
$adapter->exec(
|
105 |
-
"UPDATE `$table` SET path='{$newPath}' WHERE path='{$oldPath}'"
|
106 |
-
);
|
107 |
-
}
|
108 |
-
$adapter->commit();
|
109 |
-
} catch (Exception $e) {
|
110 |
-
$adapter->rollBack();
|
111 |
-
throw $e;
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* @param array $data
|
117 |
-
* <pre>
|
118 |
-
* section/group/field => value,
|
119 |
-
* section/group => array(
|
120 |
-
* field => value,
|
121 |
-
* field => value
|
122 |
-
* )
|
123 |
-
* section => array(
|
124 |
-
* group/field => value,
|
125 |
-
* group => array(
|
126 |
-
* field => value
|
127 |
-
* )
|
128 |
-
* )
|
129 |
-
* </pre>
|
130 |
-
*/
|
131 |
-
public function runConfiguration($data)
|
132 |
-
{
|
133 |
-
$fieldsToAppendValue = array(
|
134 |
-
'design/head/includes'
|
135 |
-
);
|
136 |
-
|
137 |
-
// transform data format to splitted into sections, groups and fields:
|
138 |
-
// section => array(
|
139 |
-
// group => array(
|
140 |
-
// field => value
|
141 |
-
// field => value
|
142 |
-
// )
|
143 |
-
// group => ...
|
144 |
-
// )
|
145 |
-
$sections = array();
|
146 |
-
foreach ($data as $path => $values) {
|
147 |
-
$pathParts = explode('/', $path);
|
148 |
-
$pathCount = count($pathParts);
|
149 |
-
switch ($pathCount) {
|
150 |
-
case 3:
|
151 |
-
$sections[$pathParts[0]][$pathParts[1]][$pathParts[2]] = $values;
|
152 |
-
break;
|
153 |
-
case 2:
|
154 |
-
foreach ($values as $field => $value) {
|
155 |
-
$sections[$pathParts[0]][$pathParts[1]][$field] = $value;
|
156 |
-
}
|
157 |
-
break;
|
158 |
-
case 1:
|
159 |
-
foreach ($values as $group => $fields) {
|
160 |
-
$groupParts = explode('/', $group);
|
161 |
-
$groupCount = count($groupParts);
|
162 |
-
if (2 === $groupCount) {
|
163 |
-
$sections[$pathParts[0]][$groupParts[0]][$groupParts[1]] = $fields;
|
164 |
-
} else {
|
165 |
-
foreach ($fields as $field => $value) {
|
166 |
-
$sections[$pathParts[0]][$groupParts[0]][$field] = $value;
|
167 |
-
}
|
168 |
-
}
|
169 |
-
}
|
170 |
-
break;
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
foreach ($sections as $section => $values) {
|
175 |
-
// transform fields array to magento config format:
|
176 |
-
// general => array
|
177 |
-
// fields => array
|
178 |
-
// enabled => array
|
179 |
-
// value => 1
|
180 |
-
// load => array
|
181 |
-
// value => 1
|
182 |
-
$groups = array();
|
183 |
-
foreach ($values as $key => $fields) {
|
184 |
-
foreach ($fields as $field => $value) {
|
185 |
-
$groups[$key]['fields'][$field]['value'] = $value;
|
186 |
-
}
|
187 |
-
}
|
188 |
-
|
189 |
-
foreach ($this->getStoreIds() as $storeId) {
|
190 |
-
if (!$storeId) { // all stores selected
|
191 |
-
$website = null;
|
192 |
-
$store = null;
|
193 |
-
} else {
|
194 |
-
if (!$this->_getStore($storeId)->getId()) {
|
195 |
-
continue;
|
196 |
-
}
|
197 |
-
$website = $this->_getStore($storeId)->getWebsite()->getCode();
|
198 |
-
$store = $this->_getStore($storeId)->getCode();
|
199 |
-
}
|
200 |
-
|
201 |
-
// get old values of required fields and combine old and new value
|
202 |
-
// foreach ($values as $key => $fields) {
|
203 |
-
// foreach ($fields as $field => $value) {
|
204 |
-
// $path = implode('/', array($section, $key, $field));
|
205 |
-
// if (in_array($path, $fieldsToAppendValue)) {
|
206 |
-
// $oldValue = Mage::getStoreConfig($path, $store);
|
207 |
-
// $groups[$key]['fields'][$field]['value'] .= "\n" . $oldValue;
|
208 |
-
// }
|
209 |
-
// }
|
210 |
-
// }
|
211 |
-
|
212 |
-
try {
|
213 |
-
Mage::getModel('adminhtml/config_data')
|
214 |
-
->setSection($section)
|
215 |
-
->setWebsite($website)
|
216 |
-
->setStore($store)
|
217 |
-
->setGroups($groups)
|
218 |
-
->save();
|
219 |
-
} catch (Exception $e) {
|
220 |
-
$this->_fault('configuration_save', $e);
|
221 |
-
}
|
222 |
-
}
|
223 |
-
}
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Backup existing blocks if needed and create the required blocks.
|
228 |
-
*
|
229 |
-
* @param array $data
|
230 |
-
* <pre>
|
231 |
-
* header_links => array
|
232 |
-
* title => title,
|
233 |
-
* identifier => identifier,
|
234 |
-
* status => 1,
|
235 |
-
* content => content
|
236 |
-
* </pre>
|
237 |
-
*/
|
238 |
-
public function runCmsblock($data)
|
239 |
-
{
|
240 |
-
$isSingleStore = Mage::app()->isSingleStoreMode();
|
241 |
-
foreach ($data as $blockData) {
|
242 |
-
// backup existing similar blocks
|
243 |
-
$collection = Mage::getModel('cms/block')->getCollection()
|
244 |
-
->addFilter('identifier', $blockData['identifier']);
|
245 |
-
|
246 |
-
if (!$isSingleStore) {
|
247 |
-
$collection->addStoreFilter($this->getStoreIds());
|
248 |
-
}
|
249 |
-
|
250 |
-
foreach ($collection as $block) {
|
251 |
-
$block->load($block->getId()); // load stores
|
252 |
-
$storesToLeave = array_diff($block->getStores(), $this->getStoreIds());
|
253 |
-
if (count($storesToLeave) && !$isSingleStore) {
|
254 |
-
$block->setStores($storesToLeave);
|
255 |
-
} else {
|
256 |
-
$block->setIsActive(0)
|
257 |
-
->setIdentifier($this->_getUniqueString($block->getIdentifier()));
|
258 |
-
}
|
259 |
-
|
260 |
-
try {
|
261 |
-
$block->save();
|
262 |
-
} catch (Exception $e) {
|
263 |
-
$this->_fault('cmsblock_backup', $e);
|
264 |
-
}
|
265 |
-
|
266 |
-
}
|
267 |
-
|
268 |
-
try {
|
269 |
-
// create required block
|
270 |
-
Mage::getModel('cms/block')
|
271 |
-
->setData($blockData)
|
272 |
-
->setStores($this->getStoreIds())
|
273 |
-
->save();
|
274 |
-
} catch (Exception $e) {
|
275 |
-
$this->_fault('cmsblock_save', $e);
|
276 |
-
}
|
277 |
-
}
|
278 |
-
}
|
279 |
-
|
280 |
-
/**
|
281 |
-
* Backup existing pages if needed and create the required pages.
|
282 |
-
*
|
283 |
-
* @param array $data
|
284 |
-
* <pre>
|
285 |
-
* homepage => array
|
286 |
-
* title
|
287 |
-
* root_template
|
288 |
-
* meta_keywords
|
289 |
-
* meta_description
|
290 |
-
* identifier
|
291 |
-
* content_heading
|
292 |
-
* content
|
293 |
-
* is_active
|
294 |
-
* sort_order
|
295 |
-
* layout_update_xml
|
296 |
-
* </pre>
|
297 |
-
*/
|
298 |
-
public function runCmspage($data)
|
299 |
-
{
|
300 |
-
$isSingleStore = Mage::app()->isSingleStoreMode();
|
301 |
-
foreach ($data as $pageData) {
|
302 |
-
// backup existing similar blocks
|
303 |
-
$collection = Mage::getModel('cms/page')->getCollection()
|
304 |
-
->addFilter('identifier', $pageData['identifier']);
|
305 |
-
|
306 |
-
if (!$isSingleStore) {
|
307 |
-
$collection->addStoreFilter($this->getStoreIds());
|
308 |
-
}
|
309 |
-
|
310 |
-
foreach ($collection as $page) {
|
311 |
-
$page->load($page->getId()); // load stores
|
312 |
-
$storesToLeave = array_diff($page->getStoreId(), $this->getStoreIds());
|
313 |
-
if (count($storesToLeave) && !$isSingleStore) {
|
314 |
-
$page->setStores($storesToLeave);
|
315 |
-
} else {
|
316 |
-
$page->setIsActive(0)
|
317 |
-
->setIdentifier($this->_getUniqueString($page->getIdentifier()));
|
318 |
-
}
|
319 |
-
|
320 |
-
try {
|
321 |
-
$page->save();
|
322 |
-
} catch (Exception $e) {
|
323 |
-
$this->_fault('cmspage_backup', $e);
|
324 |
-
}
|
325 |
-
}
|
326 |
-
|
327 |
-
try {
|
328 |
-
// create required page
|
329 |
-
Mage::getModel('cms/page')
|
330 |
-
->setData($pageData)
|
331 |
-
->setStores($this->getStoreIds())
|
332 |
-
->save();
|
333 |
-
} catch (Exception $e) {
|
334 |
-
$this->_fault('cmspage_save', $e);
|
335 |
-
}
|
336 |
-
}
|
337 |
-
}
|
338 |
-
|
339 |
-
/**
|
340 |
-
* If placeholder with the same name already exists - skip and
|
341 |
-
* add banners to existing placeholder
|
342 |
-
* If banner already exists - backup before inserting new one.
|
343 |
-
*
|
344 |
-
* @param array $data
|
345 |
-
* <pre>
|
346 |
-
* name
|
347 |
-
* parent_block
|
348 |
-
* position
|
349 |
-
* status
|
350 |
-
* limit
|
351 |
-
* mode
|
352 |
-
* banner_offset
|
353 |
-
* sort_mode
|
354 |
-
* banners => array(
|
355 |
-
* array(
|
356 |
-
* identifier
|
357 |
-
* sort_order
|
358 |
-
* title
|
359 |
-
* url
|
360 |
-
* image
|
361 |
-
* html
|
362 |
-
* status
|
363 |
-
* mode
|
364 |
-
* target
|
365 |
-
* hide_url
|
366 |
-
* conditions_serialized
|
367 |
-
* )
|
368 |
-
* )
|
369 |
-
* </pre>
|
370 |
-
*/
|
371 |
-
public function runEasybanner($data)
|
372 |
-
{
|
373 |
-
$placeholderDefaults = array(
|
374 |
-
'position' => '',
|
375 |
-
'status' => 1,
|
376 |
-
'limit' => 1,
|
377 |
-
'mode' => 'rotator',
|
378 |
-
'banner_offset' => 1,
|
379 |
-
'sort_mode' => 'sort_order'
|
380 |
-
);
|
381 |
-
$bannerDefaults = array(
|
382 |
-
'sort_order' => 10,
|
383 |
-
'html' => '',
|
384 |
-
'status' => 1,
|
385 |
-
'mode' => 'image',
|
386 |
-
'target' => 'popup',
|
387 |
-
'hide_url' => 0
|
388 |
-
);
|
389 |
-
$isSingleStore = Mage::app()->isSingleStoreMode();
|
390 |
-
foreach ($data as $placeholderData) {
|
391 |
-
$placeholder = Mage::getModel('easybanner/placeholder');
|
392 |
-
if (!empty($placeholderData['name'])) {
|
393 |
-
$placeholder->load($placeholderData['name'], 'name');
|
394 |
-
if (!$placeholder->getId()) {
|
395 |
-
try {
|
396 |
-
$placeholder
|
397 |
-
->setData(array_merge($placeholderDefaults, $placeholderData))
|
398 |
-
->save();
|
399 |
-
} catch (Exception $e) {
|
400 |
-
$this->_fault('easybanner_placeholder_save', $e);
|
401 |
-
}
|
402 |
-
}
|
403 |
-
}
|
404 |
-
|
405 |
-
$bannerDefaults['sort_order'] = 10;
|
406 |
-
foreach ($placeholderData['banners'] as $bannerData) {
|
407 |
-
if (!empty($bannerData['sort_order'])) {
|
408 |
-
$bannerDefaults['sort_order'] = $bannerData['sort_order'];
|
409 |
-
}
|
410 |
-
|
411 |
-
// backup existing similar banners
|
412 |
-
$collection = Mage::getModel('easybanner/banner')->getCollection()
|
413 |
-
->addFilter('identifier', $bannerData['identifier']);
|
414 |
-
|
415 |
-
foreach ($collection as $banner) {
|
416 |
-
$storesToLeave = array_diff($banner->getStoreIds(), $this->getStoreIds());
|
417 |
-
$banner->getPlaceholderIds(); // we should load placeholders, because they will cleared in _AfterSave method
|
418 |
-
if (count($storesToLeave) && !$isSingleStore) {
|
419 |
-
$banner->setStoreIds($storesToLeave);
|
420 |
-
} else {
|
421 |
-
$banner->setStatus(0)
|
422 |
-
->setIdentifier($this->_getUniqueString($banner->getIdentifier()));
|
423 |
-
}
|
424 |
-
|
425 |
-
try {
|
426 |
-
$banner->save();
|
427 |
-
} catch (Exception $e) {
|
428 |
-
$this->_fault('easybanner_banner_backup', $e);
|
429 |
-
}
|
430 |
-
}
|
431 |
-
|
432 |
-
// create required banner
|
433 |
-
$banner = Mage::getModel('easybanner/banner')
|
434 |
-
->setData(array_merge($bannerDefaults, $bannerData))
|
435 |
-
->setStoreIds($this->getStoreIds());
|
436 |
-
|
437 |
-
if ($placeholder->getId()) {
|
438 |
-
$banner->setPlaceholderIds(array($placeholder->getId()));
|
439 |
-
}
|
440 |
-
|
441 |
-
try {
|
442 |
-
$banner->save();
|
443 |
-
} catch (Exception $e) {
|
444 |
-
$this->_fault('easybanner_banner_save', $e);
|
445 |
-
}
|
446 |
-
|
447 |
-
$bannerDefaults['sort_order'] += 5;
|
448 |
-
}
|
449 |
-
}
|
450 |
-
}
|
451 |
-
|
452 |
-
/**
|
453 |
-
* If slider already exists - skip adding.
|
454 |
-
*
|
455 |
-
* @param $data
|
456 |
-
* <pre>
|
457 |
-
* array(
|
458 |
-
* array(
|
459 |
-
* identifier
|
460 |
-
* title
|
461 |
-
* width
|
462 |
-
* height
|
463 |
-
* duration
|
464 |
-
* frequency
|
465 |
-
* autoglide
|
466 |
-
* controls_type
|
467 |
-
* status
|
468 |
-
* slides => array(
|
469 |
-
* array(
|
470 |
-
* url
|
471 |
-
* image
|
472 |
-
* description
|
473 |
-
* ),
|
474 |
-
* ...
|
475 |
-
* )
|
476 |
-
* ),
|
477 |
-
* ...
|
478 |
-
* )
|
479 |
-
* </pre>
|
480 |
-
*/
|
481 |
-
public function runEasyslide($data)
|
482 |
-
{
|
483 |
-
$now = Mage::getSingleton('core/date')->gmtDate();
|
484 |
-
foreach ($data as $sliderData) {
|
485 |
-
$slider = Mage::getModel('easyslide/easyslide')
|
486 |
-
->load($sliderData['identifier']);
|
487 |
-
if ($slider->getId()) {
|
488 |
-
continue;
|
489 |
-
}
|
490 |
-
|
491 |
-
$slider = Mage::getModel('easyslide/easyslide');
|
492 |
-
$sliderData['created_time'] = $now;
|
493 |
-
$sliderData['modified_time'] = $now;
|
494 |
-
|
495 |
-
$slideDefaults = array(
|
496 |
-
'is_enabled' => 1,
|
497 |
-
'target' => '/',
|
498 |
-
'description' => '',
|
499 |
-
'sort_order' => 10
|
500 |
-
);
|
501 |
-
foreach ($sliderData['slides'] as &$slide) {
|
502 |
-
if (!empty($slide['sort_order'])) {
|
503 |
-
$slideDefaults['sort_order'] = $slide['sort_order'];
|
504 |
-
}
|
505 |
-
|
506 |
-
$slide = array_merge($slideDefaults, $slide);
|
507 |
-
$slideDefaults['sort_order'] += 10;
|
508 |
-
}
|
509 |
-
|
510 |
-
try {
|
511 |
-
$slider->setData($sliderData)->save();
|
512 |
-
} catch (Exception $e) {
|
513 |
-
$this->_fault('easyslide_save', $e);
|
514 |
-
}
|
515 |
-
}
|
516 |
-
}
|
517 |
-
|
518 |
-
/**
|
519 |
-
* Unset easytabs from storeIds
|
520 |
-
*
|
521 |
-
* @param string $type
|
522 |
-
* @param array $storeIdsToRemove
|
523 |
-
* @return void
|
524 |
-
*/
|
525 |
-
public function unsetEasytab($type, $storeIdsToRemove)
|
526 |
-
{
|
527 |
-
$isSingleStore = Mage::app()->isSingleStoreMode();
|
528 |
-
|
529 |
-
$storeIdsToRemove[] = 0;
|
530 |
-
$storesToKeep = Mage::getResourceModel('core/store_collection')->getAllIds();
|
531 |
-
$storesToKeep = array_diff($storesToKeep, $storeIdsToRemove);
|
532 |
-
|
533 |
-
$relatedTabs = Mage::getModel('easytabs/config_collection');
|
534 |
-
$relatedTabs->addFieldToFilter('block', $type);
|
535 |
-
foreach ($relatedTabs as $relatedTab) {
|
536 |
-
if ($isSingleStore) {
|
537 |
-
$relatedTab->setStatus(0);
|
538 |
-
} else {
|
539 |
-
$stores = $relatedTab->getStoreId();
|
540 |
-
$stores = array_diff($stores, array(0));
|
541 |
-
if (!$stores) { // tab was assigned to all stores
|
542 |
-
$relatedTab->setStoreId($storesToKeep);
|
543 |
-
} else {
|
544 |
-
if (!array_diff($stores, $storesToKeep)) {
|
545 |
-
// tab is not assigned to storesToRemove
|
546 |
-
continue;
|
547 |
-
}
|
548 |
-
$keep = array_intersect($stores, $storesToKeep);
|
549 |
-
if ($keep) {
|
550 |
-
$relatedTab->setStoreId($keep);
|
551 |
-
} else {
|
552 |
-
$relatedTab->setStatus(0);
|
553 |
-
}
|
554 |
-
}
|
555 |
-
}
|
556 |
-
$relatedTab->save();
|
557 |
-
}
|
558 |
-
}
|
559 |
-
|
560 |
-
/**
|
561 |
-
* Backup and create new tabs
|
562 |
-
* Alias is used as idendifier
|
563 |
-
*
|
564 |
-
* @param array $data
|
565 |
-
* <pre>
|
566 |
-
* title
|
567 |
-
* alias
|
568 |
-
* block
|
569 |
-
* template
|
570 |
-
* custom_option
|
571 |
-
* unset
|
572 |
-
* sort_order
|
573 |
-
* status
|
574 |
-
* store_id
|
575 |
-
* </pre>
|
576 |
-
* @return void
|
577 |
-
*/
|
578 |
-
public function runEasytabs($data)
|
579 |
-
{
|
580 |
-
$existing = Mage::getModel('easytabs/config')->getCollection();
|
581 |
-
$isSingleStore = Mage::app()->isSingleStoreMode();
|
582 |
-
|
583 |
-
foreach ($data as $tabData) {
|
584 |
-
$tab = Mage::getModel('easytabs/config');
|
585 |
-
$tab->setStoreId($this->getStoreIds());
|
586 |
-
|
587 |
-
// backup existing tab with the same alias
|
588 |
-
if (!empty($tabData['alias'])) {
|
589 |
-
$tmp = $existing->getItemsByColumnValue('alias', $tabData['alias']);
|
590 |
-
foreach ($tmp as $tmbTab) {
|
591 |
-
if (!$tmbTab->getStatus()) {
|
592 |
-
continue;
|
593 |
-
}
|
594 |
-
$storesToLeave = array_diff($tmbTab->getStoreId(), $this->getStoreIds());
|
595 |
-
if (count($storesToLeave) && !$isSingleStore) {
|
596 |
-
$tmbTab->setStoreId($storesToLeave);
|
597 |
-
} else {
|
598 |
-
$tmbTab->setStatus(0)
|
599 |
-
->setAlias($this->_getUniqueString($tmbTab->getAlias()));
|
600 |
-
}
|
601 |
-
|
602 |
-
try {
|
603 |
-
$tmbTab->save();
|
604 |
-
} catch (Exception $e) {
|
605 |
-
$this->_fault('easytabs_backup', $e);
|
606 |
-
continue;
|
607 |
-
}
|
608 |
-
}
|
609 |
-
}
|
610 |
-
|
611 |
-
if ('easytabs/tab_cms' === $tabData['block']
|
612 |
-
&& !is_numeric($tabData['custom_option'])) {
|
613 |
-
|
614 |
-
// get cms block identifier
|
615 |
-
$collection = Mage::getModel('cms/block')
|
616 |
-
->getCollection()
|
617 |
-
->addStoreFilter($this->getStoreIds())
|
618 |
-
->addFieldToFilter('identifier', $tabData['custom_option']);
|
619 |
-
|
620 |
-
if (!$isSingleStore) {
|
621 |
-
$collection->addStoreFilter($this->getStoreIds());
|
622 |
-
}
|
623 |
-
$cmsBlock = $collection->getFirstItem();
|
624 |
-
|
625 |
-
if (!$cmsBlock->getId()) {
|
626 |
-
continue;
|
627 |
-
}
|
628 |
-
$tabData['custom_option'] = $cmsBlock->getId();
|
629 |
-
}
|
630 |
-
|
631 |
-
$tab->addData($tabData)->save();
|
632 |
-
}
|
633 |
-
}
|
634 |
-
|
635 |
-
/**
|
636 |
-
* Backup and create new labels
|
637 |
-
*
|
638 |
-
* @param array $data
|
639 |
-
* <pre>
|
640 |
-
* type [optional][manual|new|sale|stock]
|
641 |
-
* label_status
|
642 |
-
* system_label_name
|
643 |
-
* l_status
|
644 |
-
* product_position
|
645 |
-
* product_image
|
646 |
-
* product_round_method
|
647 |
-
* category_position
|
648 |
-
* category_image
|
649 |
-
* category_round_method
|
650 |
-
* </pre>
|
651 |
-
*/
|
652 |
-
public function runProlabels($data)
|
653 |
-
{
|
654 |
-
$typeMapping = array(
|
655 |
-
'sale' => 1,
|
656 |
-
'stock' => 2,
|
657 |
-
'new' => 3
|
658 |
-
);
|
659 |
-
$isSingleStore = Mage::app()->isSingleStoreMode();
|
660 |
-
foreach ($data as $labelData) {
|
661 |
-
if (!empty($labelData['type']) && isset($typeMapping[$labelData['type']])) {
|
662 |
-
Mage::getModel('prolabels/label')->load($typeMapping[$labelData['type']])
|
663 |
-
->addData(array(
|
664 |
-
'label_status' => isset($labelData['label_status']) ?
|
665 |
-
$labelData['label_status'] : 1
|
666 |
-
))
|
667 |
-
->save();
|
668 |
-
|
669 |
-
$system = true;
|
670 |
-
$modelType = 'prolabels/system';
|
671 |
-
$collection = Mage::getModel($modelType)->getCollection()
|
672 |
-
->addFilter('main_table.rules_id', $typeMapping[$labelData['type']])
|
673 |
-
->addStoreFilter($this->getStoreIds());
|
674 |
-
} else {
|
675 |
-
$system = false;
|
676 |
-
$modelType = 'prolabels/label';
|
677 |
-
$collection = Mage::getModel($modelType)->getCollection()
|
678 |
-
->addFilter('main_table.label_name', $labelData['label_name'])
|
679 |
-
->addFilter('main_table.system_label <> 1')
|
680 |
-
->addStoreFilter($this->getStoreIds());
|
681 |
-
}
|
682 |
-
|
683 |
-
foreach ($collection as $label) {
|
684 |
-
$label->load($label->getId()); // load stores
|
685 |
-
$storesToLeave = array_diff($label->getStoreId(), $this->getStoreIds());
|
686 |
-
if (count($storesToLeave) && !$isSingleStore) {
|
687 |
-
$label->setStores($storesToLeave) // @todo _afterSave for system label
|
688 |
-
->setStoreIds($storesToLeave);
|
689 |
-
} else {
|
690 |
-
$label->setLabelStatus(0)
|
691 |
-
->setLabelName($this->_getUniqueString($label->getLabelName()))
|
692 |
-
->setLStatus(0)
|
693 |
-
->setSystemLabelName($this->_getUniqueString($label->getSystemLabelName()));
|
694 |
-
}
|
695 |
-
|
696 |
-
try {
|
697 |
-
$label->save();
|
698 |
-
} catch (Exception $e) {
|
699 |
-
$this->_fault('prolabels_label_backup', $e);
|
700 |
-
continue;
|
701 |
-
}
|
702 |
-
|
703 |
-
if ($system) {
|
704 |
-
Mage::getModel('prolabels/sysstore')->deleteSystemStore($label->getId());
|
705 |
-
foreach ($storesToLeave as $store) {
|
706 |
-
$storeM = Mage::getModel('prolabels/sysstore');
|
707 |
-
$storeM->addData(array('store_id' => $store));
|
708 |
-
$storeM->addData(array('system_id' => $label->getId()));
|
709 |
-
$storeM->addData(array('rules_id' => $label->getRulesId()));
|
710 |
-
try {
|
711 |
-
$storeM->save();
|
712 |
-
} catch (Exception $e) {
|
713 |
-
$this->_fault('prolabels_sysstore_backup', $e);
|
714 |
-
}
|
715 |
-
}
|
716 |
-
}
|
717 |
-
}
|
718 |
-
|
719 |
-
// create required label
|
720 |
-
$label = Mage::getModel($modelType)
|
721 |
-
->setData($labelData);
|
722 |
-
|
723 |
-
if (!empty($labelData['type']) && isset($typeMapping[$labelData['type']])) {
|
724 |
-
$label->setRulesId($typeMapping[$labelData['type']]);
|
725 |
-
}
|
726 |
-
$label->setStores($this->getStoreIds()) // @todo _afterSave for system label
|
727 |
-
->setStoreIds($this->getStoreIds());
|
728 |
-
|
729 |
-
try {
|
730 |
-
$label->save();
|
731 |
-
} catch (Exception $e) {
|
732 |
-
$this->_fault('prolabels_label_save', $e);
|
733 |
-
continue;
|
734 |
-
}
|
735 |
-
|
736 |
-
if ($system) {
|
737 |
-
foreach ($this->getStoreIds() as $store) {
|
738 |
-
$storeM = Mage::getModel('prolabels/sysstore');
|
739 |
-
$storeM->addData(array('store_id' => $store));
|
740 |
-
$storeM->addData(array('system_id' => $label->getId()));
|
741 |
-
$storeM->addData(array('rules_id' => $label->getRulesId()));
|
742 |
-
try {
|
743 |
-
$storeM->save();
|
744 |
-
} catch (Exception $e) {
|
745 |
-
$this->_fault('prolabels_sysstore_save', $e);
|
746 |
-
}
|
747 |
-
}
|
748 |
-
}
|
749 |
-
}
|
750 |
-
}
|
751 |
-
|
752 |
-
/**
|
753 |
-
* Add new product attrubute to all of attribute sets.
|
754 |
-
* If attribute is already exists - skip.
|
755 |
-
*
|
756 |
-
* @param array $data
|
757 |
-
* <pre>
|
758 |
-
* attribute_code
|
759 |
-
* is_global 0
|
760 |
-
* frontend_input[text|boolean|textarea|select|price|media_image|etc]
|
761 |
-
* default_value_text
|
762 |
-
* is_searchable
|
763 |
-
* is_visible_in_advanced_search
|
764 |
-
* is_comparable
|
765 |
-
* frontend_label array
|
766 |
-
* sort_order Set 0 to use MaxSortOrder
|
767 |
-
* </pre>
|
768 |
-
*/
|
769 |
-
public function runProductAttribute($data)
|
770 |
-
{
|
771 |
-
$defaults = array(
|
772 |
-
'is_global' => 0,
|
773 |
-
'frontend_input' => 'boolean',
|
774 |
-
'is_configurable' => 0,
|
775 |
-
'is_filterable' => 0,
|
776 |
-
'is_filterable_in_search' => 0,
|
777 |
-
'sort_order' => 1
|
778 |
-
);
|
779 |
-
$entityTypeId = Mage::getModel('eav/entity')
|
780 |
-
->setType(Mage_Catalog_Model_Product::ENTITY)
|
781 |
-
->getTypeId();
|
782 |
-
$setCollection = Mage::getResourceModel('eav/entity_attribute_set_collection')
|
783 |
-
->setEntityTypeFilter($entityTypeId);
|
784 |
-
|
785 |
-
foreach ($data as $attributeData) {
|
786 |
-
/**
|
787 |
-
* @var $model Mage_Catalog_Model_Entity_Attribute
|
788 |
-
*/
|
789 |
-
$attribute = Mage::getModel('catalog/resource_eav_attribute')
|
790 |
-
->load($attributeData['attribute_code'], 'attribute_code');
|
791 |
-
if ($attribute->getId()) {
|
792 |
-
continue;
|
793 |
-
}
|
794 |
-
|
795 |
-
/* @var $helper Mage_Catalog_Helper_Product */
|
796 |
-
$helper = Mage::helper('catalog/product');
|
797 |
-
|
798 |
-
/**
|
799 |
-
* @todo add to helper and specify all relations for properties
|
800 |
-
*/
|
801 |
-
$attributeData = array_merge($defaults, $attributeData);
|
802 |
-
if (!isset($attributeData['source_model'])) {
|
803 |
-
$attributeData['source_model'] = $helper
|
804 |
-
->getAttributeSourceModelByInputType($attributeData['frontend_input']);
|
805 |
-
}
|
806 |
-
if (!isset($attributeData['backend_model'])) {
|
807 |
-
$attributeData['backend_model'] = $helper
|
808 |
-
->getAttributeBackendModelByInputType($attributeData['frontend_input']);
|
809 |
-
}
|
810 |
-
if (!isset($attributeData['backend_type'])) {
|
811 |
-
$attributeData['backend_type'] = $attribute
|
812 |
-
->getBackendTypeByInput($attributeData['frontend_input']);
|
813 |
-
}
|
814 |
-
$attribute->addData($attributeData);
|
815 |
-
$attribute->setEntityTypeId($entityTypeId);
|
816 |
-
$attribute->setIsUserDefined(1);
|
817 |
-
|
818 |
-
foreach ($setCollection as $set) {
|
819 |
-
$attribute->setAttributeSetId($set->getId());
|
820 |
-
$attribute->setAttributeGroupId($set->getDefaultGroupId());
|
821 |
-
try {
|
822 |
-
$attribute->save();
|
823 |
-
} catch (Exception $e) {
|
824 |
-
$this->_fault('product_attribute_save', $e);
|
825 |
-
}
|
826 |
-
}
|
827 |
-
|
828 |
-
if (!$setCollection->count()) {
|
829 |
-
try {
|
830 |
-
$attribute->save();
|
831 |
-
} catch (Exception $e) {
|
832 |
-
$this->_fault('product_attribute_save', $e);
|
833 |
-
}
|
834 |
-
}
|
835 |
-
}
|
836 |
-
}
|
837 |
-
|
838 |
-
/**
|
839 |
-
* @param array $data
|
840 |
-
* <pre>
|
841 |
-
* array(
|
842 |
-
* 'left' => array(
|
843 |
-
* 'name' => 'left',
|
844 |
-
* 'levels_per_dropdown' => 2,
|
845 |
-
* 'columns' => array(
|
846 |
-
* array(
|
847 |
-
* 'width' => 185
|
848 |
-
* )
|
849 |
-
* )
|
850 |
-
* )
|
851 |
-
* )
|
852 |
-
* </pre>
|
853 |
-
*/
|
854 |
-
public function runNavigationpro($data)
|
855 |
-
{
|
856 |
-
$menuDefaults = array(
|
857 |
-
'is_active' => 1,
|
858 |
-
'columns_mode' => 'menu',
|
859 |
-
'display_in_navigation' => 0,
|
860 |
-
'levels_per_dropdown' => 1,
|
861 |
-
'style' => 'dropdown'
|
862 |
-
);
|
863 |
-
$columnDefaults = array(
|
864 |
-
'is_active' => 1,
|
865 |
-
'sort_order' => '50',
|
866 |
-
'type' => TM_NavigationPro_Model_Column::TYPE_SUBCATEGORY,
|
867 |
-
'style' => 'dropdown',
|
868 |
-
'levels_per_dropdown' => 1,
|
869 |
-
'direction' => 'horizontal',
|
870 |
-
'columns_count' => 1,
|
871 |
-
'width' => 160
|
872 |
-
);
|
873 |
-
|
874 |
-
foreach ($data as $menuData) {
|
875 |
-
$menu = Mage::getModel('navigationpro/menu')
|
876 |
-
->load($menuData['name'], 'name');
|
877 |
-
if ($menu->getId()) {
|
878 |
-
continue;
|
879 |
-
}
|
880 |
-
|
881 |
-
foreach ($menuData['columns'] as $i => $columnData) {
|
882 |
-
$menuData['columns'][$i] = array_merge($columnDefaults, $columnData);
|
883 |
-
}
|
884 |
-
|
885 |
-
$menu = Mage::getModel('navigationpro/menu')
|
886 |
-
->setData(array_merge($menuDefaults, $menuData))
|
887 |
-
->setStoreId(Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID)
|
888 |
-
->setSiblings(array())
|
889 |
-
->setContent(array())
|
890 |
-
->save();
|
891 |
-
}
|
892 |
-
}
|
893 |
-
|
894 |
-
/**
|
895 |
-
* Log installation errors
|
896 |
-
*
|
897 |
-
* @param string $type
|
898 |
-
* @param Exception $e
|
899 |
-
*/
|
900 |
-
protected function _fault($type, Exception $e)
|
901 |
-
{
|
902 |
-
$this->_getMessageLogger()->addError($type, array(
|
903 |
-
'message' => $e->getMessage(),
|
904 |
-
'trace' => $e->getTraceAsString()
|
905 |
-
));
|
906 |
-
}
|
907 |
-
|
908 |
-
/**
|
909 |
-
* @return TM_Core_Model_Module_ErrorLogger
|
910 |
-
*/
|
911 |
-
protected function _getMessageLogger()
|
912 |
-
{
|
913 |
-
return $this->getModule()->getMessageLogger();
|
914 |
-
}
|
915 |
-
|
916 |
-
/**
|
917 |
-
* Returns unique string. Used to backup existing pages, blocks, etc
|
918 |
-
* Theoretically it's possible to get existing identifier intentionally.
|
919 |
-
* But there is very low chance to do that accidently.
|
920 |
-
*
|
921 |
-
* @param string $prefix
|
922 |
-
* @return string
|
923 |
-
*/
|
924 |
-
protected function _getUniqueString($prefix)
|
925 |
-
{
|
926 |
-
$today = Mage::app()->getLocale()->date()
|
927 |
-
->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
|
928 |
-
$filteredToday = str_replace(array(' ', ':'), '-', $today);
|
929 |
-
return $prefix . '_backup_' . self::$_backupIterator++ . '_' . $filteredToday;
|
930 |
-
}
|
931 |
-
|
932 |
-
/**
|
933 |
-
* @return Mage_Core_Model_Store
|
934 |
-
*/
|
935 |
-
protected function _getStore($id)
|
936 |
-
{
|
937 |
-
if (!isset(self::$_stores[$id])) {
|
938 |
-
self::$_stores[$id] = Mage::getModel('core/store')->load($id);
|
939 |
-
}
|
940 |
-
return self::$_stores[$id];
|
941 |
-
}
|
942 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Notification/Feed.php
DELETED
@@ -1,155 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Notification_Feed extends Mage_AdminNotification_Model_Feed
|
4 |
-
{
|
5 |
-
const XML_USE_HTTPS_PATH = 'tmcore/notification/use_https';
|
6 |
-
const XML_FEED_URL_PATH = 'tmcore/notification/feed_url';
|
7 |
-
const XML_FREQUENCY_PATH = 'tmcore/notification/frequency';
|
8 |
-
const XML_LAST_UPDATE_PATH = 'tmcore/notification/last_update';
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Retrieve feed url
|
12 |
-
*
|
13 |
-
* @return string
|
14 |
-
*/
|
15 |
-
public function getFeedUrl()
|
16 |
-
{
|
17 |
-
if (is_null($this->_feedUrl)) {
|
18 |
-
$this->_feedUrl = (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')
|
19 |
-
. Mage::getStoreConfig(self::XML_FEED_URL_PATH);
|
20 |
-
}
|
21 |
-
return $this->_feedUrl;
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Check feed for modification.
|
26 |
-
* Copy of parent method, but isRead logic added to hide filteted news.
|
27 |
-
*
|
28 |
-
* @return TM_Core_Model_Notification_Feed
|
29 |
-
*/
|
30 |
-
public function checkUpdate()
|
31 |
-
{
|
32 |
-
if (!Mage::helper('core')->isModuleEnabled('Mage_AdminNotification')) {
|
33 |
-
return $this;
|
34 |
-
}
|
35 |
-
|
36 |
-
if (($this->getFrequency() + $this->getLastUpdate()) > time()) {
|
37 |
-
return $this;
|
38 |
-
}
|
39 |
-
|
40 |
-
$feedData = array();
|
41 |
-
|
42 |
-
$feedXml = $this->getFeedData();
|
43 |
-
|
44 |
-
if ($feedXml && $feedXml->channel && $feedXml->channel->item) {
|
45 |
-
foreach ($feedXml->channel->item as $item) {
|
46 |
-
$feedData[] = array(
|
47 |
-
'severity' => (int)$item->severity,
|
48 |
-
'date_added' => $this->getDate((string)$item->pubDate),
|
49 |
-
'title' => (string)$item->title,
|
50 |
-
'description' => (string)$item->description,
|
51 |
-
'url' => (string)$item->link,
|
52 |
-
'is_read' => $this->_getIsReadStatus($item)
|
53 |
-
);
|
54 |
-
}
|
55 |
-
|
56 |
-
if ($feedData) {
|
57 |
-
Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));
|
58 |
-
}
|
59 |
-
|
60 |
-
}
|
61 |
-
$this->setLastUpdate();
|
62 |
-
|
63 |
-
return $this;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* If the item channel matches notification filter,
|
68 |
-
* or item channel is not exists in TM_Core_Model_Adminhtml_System_Config_Source_Notification_Filter, then
|
69 |
-
* the item will be marken as not readed
|
70 |
-
*
|
71 |
-
* @param object $item
|
72 |
-
* @return boolean
|
73 |
-
*/
|
74 |
-
protected function _getIsReadStatus($item)
|
75 |
-
{
|
76 |
-
if (!$item->channel) {
|
77 |
-
return false;
|
78 |
-
}
|
79 |
-
|
80 |
-
$channels = (string)$item->channel;
|
81 |
-
if (!$channels) {
|
82 |
-
return false;
|
83 |
-
}
|
84 |
-
|
85 |
-
$filters = Mage::getStoreConfig('tmcore/notification/filter');
|
86 |
-
if (empty($filters)) {
|
87 |
-
return true; // disable notifications
|
88 |
-
}
|
89 |
-
|
90 |
-
$filters = explode(',', $filters);
|
91 |
-
$channels = explode(',', $channels);
|
92 |
-
$matches = array_intersect($filters, $channels);
|
93 |
-
if (count($matches)) {
|
94 |
-
return false;
|
95 |
-
}
|
96 |
-
|
97 |
-
$installedFilter = TM_Core_Model_Adminhtml_System_Config_Source_Notification_Channel::CHANNEL_INSTALLED;
|
98 |
-
if ($item->product && false !== array_search($installedFilter, $filters)) {
|
99 |
-
$products = explode(',', (string)$item->product);
|
100 |
-
$installedProducts = $this->_getInstalledModules('TM_', false);
|
101 |
-
$matches = array_intersect($installedProducts, $products);
|
102 |
-
return !(bool)count($matches);
|
103 |
-
}
|
104 |
-
|
105 |
-
return true; // installed mode only and item does not have product entry
|
106 |
-
}
|
107 |
-
|
108 |
-
protected function _getInstalledModules($namespace = 'TM_', $returnWithNamespace = true)
|
109 |
-
{
|
110 |
-
$modules = Mage::getConfig()->getNode('modules')->children();
|
111 |
-
$result = array();
|
112 |
-
foreach ($modules as $code => $values) {
|
113 |
-
if (0 !== strpos($code, $namespace)) {
|
114 |
-
continue;
|
115 |
-
}
|
116 |
-
if ($returnWithNamespace) {
|
117 |
-
$result[] = $code;
|
118 |
-
} else {
|
119 |
-
$result[] = str_replace($namespace, '', $code);
|
120 |
-
}
|
121 |
-
}
|
122 |
-
return $result;
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Retrieve Update Frequency
|
127 |
-
*
|
128 |
-
* @return int
|
129 |
-
*/
|
130 |
-
public function getFrequency()
|
131 |
-
{
|
132 |
-
return Mage::getStoreConfig(self::XML_FREQUENCY_PATH) * 3600;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Retrieve Last update time
|
137 |
-
*
|
138 |
-
* @return int
|
139 |
-
*/
|
140 |
-
public function getLastUpdate()
|
141 |
-
{
|
142 |
-
return Mage::app()->loadCache('tmcore_notifications_lastcheck');
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Set last update time (now)
|
147 |
-
*
|
148 |
-
* @return TM_Core_Model_Notification_Feed
|
149 |
-
*/
|
150 |
-
public function setLastUpdate()
|
151 |
-
{
|
152 |
-
Mage::app()->saveCache(time(), 'tmcore_notifications_lastcheck');
|
153 |
-
return $this;
|
154 |
-
}
|
155 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Oauth/Client.php
DELETED
@@ -1,257 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* http://inchoo.net/ecommerce/magento/consuming-magento-rest-zend_oauth_consumer/
|
4 |
-
* http://www.magentocommerce.com/knowledge-base/entry/how-to-use-extend-the-magento-rest-api-to-use-coupon-auto-generation
|
5 |
-
*
|
6 |
-
* @author Darko Goleš <darko.goles@inchoo.net>
|
7 |
-
* @author Alexander Krasko <0m3r.mail@gmail.com>
|
8 |
-
* @package Inchoo
|
9 |
-
* @subpackage RestConnect
|
10 |
-
*/
|
11 |
-
class TM_Core_Model_Oauth_Client extends Mage_Core_Model_Abstract
|
12 |
-
{
|
13 |
-
private $_callbackUrl;
|
14 |
-
private $_siteUrl;
|
15 |
-
private $_consumerKey;
|
16 |
-
private $_consumerSecret;
|
17 |
-
private $_requestTokenUrl;
|
18 |
-
private $_accessTokenUrl;
|
19 |
-
private $_consumer;
|
20 |
-
private $_authorizeUrl;
|
21 |
-
private $_userAuthorizationUrl;
|
22 |
-
private $_authorized_token;
|
23 |
-
|
24 |
-
const OAUTH_STATE_NO_TOKEN = 0;
|
25 |
-
const OAUTH_STATE_REQUEST_TOKEN = 1;
|
26 |
-
const OAUTH_STATE_ACCESS_TOKEN = 2;
|
27 |
-
const OAUTH_STATE_ERROR = 3;
|
28 |
-
|
29 |
-
public function init($config)
|
30 |
-
{
|
31 |
-
$this->setOAuthConfig($config);
|
32 |
-
return $this;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function setAuthorizedToken($token)
|
36 |
-
{
|
37 |
-
$this->_authorized_token = $token;
|
38 |
-
}
|
39 |
-
|
40 |
-
public function getAuthorizedToken()
|
41 |
-
{
|
42 |
-
if ($this->_authorized_token) {
|
43 |
-
return $this->_authorized_token;
|
44 |
-
}
|
45 |
-
return false;
|
46 |
-
}
|
47 |
-
|
48 |
-
public function reset()
|
49 |
-
{
|
50 |
-
return $this->resetSessionParams();
|
51 |
-
}
|
52 |
-
|
53 |
-
public function authenticate()
|
54 |
-
{
|
55 |
-
$state = $this->getOAuthState();
|
56 |
-
$consumer = $this->_getOAuthConsumer();
|
57 |
-
try {
|
58 |
-
switch ($state) {
|
59 |
-
case self::OAUTH_STATE_NO_TOKEN:
|
60 |
-
$requestToken = $this->getRequestToken();
|
61 |
-
$this->setOAuthState(self::OAUTH_STATE_REQUEST_TOKEN);
|
62 |
-
$consumer->redirect();
|
63 |
-
return self::OAUTH_STATE_REQUEST_TOKEN;
|
64 |
-
break;
|
65 |
-
case self::OAUTH_STATE_REQUEST_TOKEN:
|
66 |
-
$accessToken = $this->getAccessToken($this->getRequestToken());
|
67 |
-
$this->setAuthorizedToken($accessToken);
|
68 |
-
$this->setOAuthState(self::OAUTH_STATE_ACCESS_TOKEN);
|
69 |
-
return self::OAUTH_STATE_ACCESS_TOKEN;
|
70 |
-
break;
|
71 |
-
case self::OAUTH_STATE_ACCESS_TOKEN:
|
72 |
-
$accessToken = $this->_getAccessTokenFromSession();
|
73 |
-
if ($accessToken && $accessToken instanceof Zend_Oauth_Token_Access) {
|
74 |
-
$this->setAuthorizedToken($accessToken);
|
75 |
-
}
|
76 |
-
return self::OAUTH_STATE_ACCESS_TOKEN;
|
77 |
-
default:
|
78 |
-
$this->resetSessionParams();
|
79 |
-
return self::OAUTH_STATE_NO_TOKEN;
|
80 |
-
return;
|
81 |
-
break;
|
82 |
-
}
|
83 |
-
} catch (Zend_Oauth_Exception $e) {
|
84 |
-
$this->resetSessionParams();
|
85 |
-
Mage::logException($e);
|
86 |
-
} catch (Exception $e) {
|
87 |
-
Mage::logException($e);
|
88 |
-
}
|
89 |
-
return self::OAUTH_STATE_NO_TOKEN;
|
90 |
-
}
|
91 |
-
|
92 |
-
private function resetSessionParams()
|
93 |
-
{
|
94 |
-
$this->getSession()->unsetData('o_auth_state');
|
95 |
-
$this->getSession()->unsetData('request_token');
|
96 |
-
$this->getSession()->unsetData('o_auth_config');
|
97 |
-
$this->getSession()->unsetData('access_token');
|
98 |
-
return $this;
|
99 |
-
}
|
100 |
-
|
101 |
-
public function getRequestToken()
|
102 |
-
{
|
103 |
-
$token = $this->_getRequestTokenFromSession();
|
104 |
-
if ($token && $token instanceof Zend_Oauth_Token_Request) {
|
105 |
-
return $token;
|
106 |
-
}
|
107 |
-
$token = $this->_getRequestTokenFromServer();
|
108 |
-
if ($token && $token instanceof Zend_Oauth_Token_Request) {
|
109 |
-
$this->_saveRequestTokenInSession($token);
|
110 |
-
return $token;
|
111 |
-
}
|
112 |
-
return false;
|
113 |
-
}
|
114 |
-
|
115 |
-
public function getAccessToken($requestToken)
|
116 |
-
{
|
117 |
-
$token = $this->_getAccessTokenFromSession();
|
118 |
-
if ($token && $token instanceof Zend_Oauth_Token_Access) {
|
119 |
-
return $token;
|
120 |
-
}
|
121 |
-
$token = $this->_getAcessTokenFromServer($requestToken);
|
122 |
-
if ($token && $token instanceof Zend_Oauth_Token_Access) {
|
123 |
-
$this->_saveAccessTokenInSesion($token);
|
124 |
-
return $token;
|
125 |
-
}
|
126 |
-
}
|
127 |
-
|
128 |
-
private function _getAcessTokenFromServer($requestToken)
|
129 |
-
{
|
130 |
-
if ($requestToken && $requestToken instanceof Zend_Oauth_Token_Request) {
|
131 |
-
$accToken = $this->_getOAuthConsumer()->getAccessToken(
|
132 |
-
$_GET,
|
133 |
-
$requestToken
|
134 |
-
);
|
135 |
-
}
|
136 |
-
if ($accToken && $accToken instanceof Zend_Oauth_Token_Access) {
|
137 |
-
return $accToken;
|
138 |
-
}
|
139 |
-
return false;
|
140 |
-
}
|
141 |
-
|
142 |
-
private function _saveAccessTokenInSesion($accessToken)
|
143 |
-
{
|
144 |
-
$this->getSession()->setAccessToken(serialize($accessToken));
|
145 |
-
}
|
146 |
-
|
147 |
-
private function _getAccessTokenFromSession()
|
148 |
-
{
|
149 |
-
$accessToken = unserialize($this->getSession()->getData('access_token'));
|
150 |
-
if ($accessToken && $accessToken instanceof Zend_Oauth_Token_Access) {
|
151 |
-
return $accessToken;
|
152 |
-
}
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
|
156 |
-
private function _getRequestTokenFromServer()
|
157 |
-
{
|
158 |
-
$token = $this->_getOAuthConsumer()->getRequestToken();
|
159 |
-
return $token;
|
160 |
-
}
|
161 |
-
|
162 |
-
private function _saveRequestTokenInSession(Zend_Oauth_Token_Request $requestToken)
|
163 |
-
{
|
164 |
-
$this->getSession()->setRequestToken(serialize($requestToken));
|
165 |
-
}
|
166 |
-
|
167 |
-
private function _getRequestTokenFromSession()
|
168 |
-
{
|
169 |
-
$requestToken = unserialize($this->getSession()->getRequestToken());
|
170 |
-
if ($requestToken && $requestToken instanceof Zend_Oauth_Token_Request) {
|
171 |
-
return $requestToken;
|
172 |
-
}
|
173 |
-
return false;
|
174 |
-
}
|
175 |
-
|
176 |
-
public function getSession()
|
177 |
-
{
|
178 |
-
return Mage::getSingleton('core/session');
|
179 |
-
}
|
180 |
-
|
181 |
-
public function getOAuthToken()
|
182 |
-
{
|
183 |
-
return $this->getRequest()->getParam('oauth_token', false);
|
184 |
-
}
|
185 |
-
|
186 |
-
public function getRequest()
|
187 |
-
{
|
188 |
-
return Mage::app()->getRequest();
|
189 |
-
}
|
190 |
-
|
191 |
-
private function _getOAuthConsumer()
|
192 |
-
{
|
193 |
-
if ($consumer = $this->_consumer) {
|
194 |
-
if ($consumer instanceof Zend_Oauth_Consumer) {
|
195 |
-
return $this->_consumer;
|
196 |
-
}
|
197 |
-
}
|
198 |
-
$this->_consumer = new Zend_Oauth_Consumer($this->getOAuthConfig());
|
199 |
-
return $this->_consumer;
|
200 |
-
}
|
201 |
-
|
202 |
-
private function getOAuthConfig()
|
203 |
-
{
|
204 |
-
$config = array(
|
205 |
-
'callbackUrl' => $this->_callbackUrl,
|
206 |
-
'siteUrl' => $this->_siteUrl,
|
207 |
-
'consumerKey' => $this->_consumerKey,
|
208 |
-
'consumerSecret' => $this->_consumerSecret,
|
209 |
-
'requestTokenUrl' => $this->_requestTokenUrl,
|
210 |
-
'accessTokenUrl' => $this->_accessTokenUrl,
|
211 |
-
);
|
212 |
-
if ($this->_authorizeUrl && $this->_authorizeUrl != '') {
|
213 |
-
$config['authorizeUrl'] = $this->_authorizeUrl;
|
214 |
-
}
|
215 |
-
if ($this->_userAuthorizationUrl && $this->_userAuthorizationUrl != '') {
|
216 |
-
$config['userAuthorizationUrl'] = $this->_userAuthorizationUrl;
|
217 |
-
}
|
218 |
-
return $config;
|
219 |
-
}
|
220 |
-
|
221 |
-
private function setOAuthConfig($config)
|
222 |
-
{
|
223 |
-
$this->getSession()->setOAuthConfig(serialize($config));
|
224 |
-
foreach ($config as $key => $val) {
|
225 |
-
$_key = '_' . $key;
|
226 |
-
$this->$_key = $val;
|
227 |
-
}
|
228 |
-
}
|
229 |
-
|
230 |
-
public function getConfigFromSession()
|
231 |
-
{
|
232 |
-
$config = unserialize($this->getSession()->getOAuthConfig());
|
233 |
-
if ($config && is_array($config)) {
|
234 |
-
return $config;
|
235 |
-
}
|
236 |
-
return false;
|
237 |
-
}
|
238 |
-
|
239 |
-
private function setOAuthState($state)
|
240 |
-
{
|
241 |
-
$this->getSession()->setOAuthState($state);
|
242 |
-
}
|
243 |
-
|
244 |
-
public function getOAuthState()
|
245 |
-
{
|
246 |
-
$state = $this->getSession()->getOAuthState();
|
247 |
-
if ($state == null) {
|
248 |
-
return self::OAUTH_STATE_NO_TOKEN;
|
249 |
-
}
|
250 |
-
$paramOAuthToken = $this->getOAuthToken();
|
251 |
-
if ($paramOAuthToken == false && $state == self::OAUTH_STATE_REQUEST_TOKEN) {
|
252 |
-
$this->resetSessionParams();
|
253 |
-
return self::OAUTH_STATE_NO_TOKEN;
|
254 |
-
}
|
255 |
-
return $state;
|
256 |
-
}
|
257 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Observer.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Observer
|
4 |
-
{
|
5 |
-
/**
|
6 |
-
* Predispath admin action controller
|
7 |
-
*
|
8 |
-
* @param Varien_Event_Observer $observer
|
9 |
-
*/
|
10 |
-
public function preDispatch(Varien_Event_Observer $observer)
|
11 |
-
{
|
12 |
-
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
13 |
-
if (!Mage::getStoreConfig('tmcore/notification/enabled')) {
|
14 |
-
return;
|
15 |
-
}
|
16 |
-
|
17 |
-
$feedModel = Mage::getModel('tmcore/notification_feed');
|
18 |
-
$feedModel->checkUpdate();
|
19 |
-
}
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Add layout update files just before local.xml
|
24 |
-
* Conditions are supported too
|
25 |
-
*/
|
26 |
-
public function addLayoutUpdate($observer)
|
27 |
-
{
|
28 |
-
// $area = Mage::getSingleton('core/design_package')->getArea();
|
29 |
-
$area = Mage_Core_Model_App_Area::AREA_FRONTEND;
|
30 |
-
$updates = $observer->getUpdates();
|
31 |
-
$extraNodes = Mage::app()->getConfig()->getNode($area.'/tm_layout/updates');
|
32 |
-
if (!$extraNodes) {
|
33 |
-
return;
|
34 |
-
}
|
35 |
-
foreach ($extraNodes->children() as $node) {
|
36 |
-
if ($node->getAttribute('condition')) {
|
37 |
-
$parts = explode('/', $node->getAttribute('condition'));
|
38 |
-
$helper = array_shift($parts);
|
39 |
-
$method = array_shift($parts);
|
40 |
-
if (count($parts)) {
|
41 |
-
$helper .= '/' . $method;
|
42 |
-
$method = array_shift($parts);
|
43 |
-
}
|
44 |
-
$helper = Mage::helper($helper);
|
45 |
-
if ($args = $node->getAttribute('args')) {
|
46 |
-
$args = explode(',', $args);
|
47 |
-
$enabled = call_user_func_array(array($helper, $method), $args);
|
48 |
-
} else {
|
49 |
-
$enabled = $helper->{$method}();
|
50 |
-
}
|
51 |
-
if (!$enabled) {
|
52 |
-
continue;
|
53 |
-
}
|
54 |
-
}
|
55 |
-
$updates->appendChild($node);
|
56 |
-
}
|
57 |
-
}
|
58 |
-
|
59 |
-
public function onBeforeRenderLayout()
|
60 |
-
{
|
61 |
-
$layout = Mage::app()->getLayout();
|
62 |
-
if ($debug = $layout->getBlock(TM_Core_Helper_Debug::POPUP_NAME)) {
|
63 |
-
$layout->getBlock('content')->append($debug);
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Resource/Module.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Resource_Module extends Mage_Core_Model_Mysql4_Abstract
|
4 |
-
{
|
5 |
-
/**
|
6 |
-
* Primery key auto increment flag
|
7 |
-
*
|
8 |
-
* @var bool
|
9 |
-
*/
|
10 |
-
protected $_isPkAutoIncrement = false;
|
11 |
-
|
12 |
-
protected function _construct()
|
13 |
-
{
|
14 |
-
$this->_init('tmcore/module', 'code');
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Resource/Module/AdminGridCollection.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Resource_Module_AdminGridCollection extends TM_Core_Model_Resource_Module_MergedCollection
|
4 |
-
{
|
5 |
-
public function getModulesFromConfigNodes()
|
6 |
-
{
|
7 |
-
$modules = Mage::getConfig()->getNode('modules')->children();
|
8 |
-
$result = array();
|
9 |
-
foreach ($modules as $code => $values) {
|
10 |
-
if ($values->tm_hidden) {
|
11 |
-
continue;
|
12 |
-
}
|
13 |
-
$result[$code] = $values;
|
14 |
-
}
|
15 |
-
return $result;
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Resource/Module/Collection.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Resource_Module_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
$this->_init('tmcore/module');
|
8 |
-
}
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Resource/Module/MergedCollection.php
DELETED
@@ -1,502 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Resource_Module_MergedCollection extends Varien_Data_Collection
|
4 |
-
{
|
5 |
-
/**
|
6 |
-
* Item object class name
|
7 |
-
*
|
8 |
-
* @var string
|
9 |
-
*/
|
10 |
-
protected $_itemObjectClass = 'TM_Core_Model_Module';
|
11 |
-
|
12 |
-
protected $_collectedModules = array();
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Filter rendering helper variables
|
16 |
-
*
|
17 |
-
* @see Varien_Data_Collection::$_filter
|
18 |
-
* @see Varien_Data_Collection::$_isFiltersRendered
|
19 |
-
*/
|
20 |
-
private $_filterIncrement = 0;
|
21 |
-
private $_filterBrackets = array();
|
22 |
-
private $_filterEvalRendered = '';
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Lauch data collecting
|
26 |
-
*
|
27 |
-
* @param bool $printQuery
|
28 |
-
* @param bool $logQuery
|
29 |
-
* @return Varien_Data_Collection_Filesystem
|
30 |
-
*/
|
31 |
-
public function loadData($printQuery = false, $logQuery = false)
|
32 |
-
{
|
33 |
-
if ($this->isLoaded()) {
|
34 |
-
return $this;
|
35 |
-
}
|
36 |
-
|
37 |
-
$modules = $this->getModulesFromConfigNodes();
|
38 |
-
$remoteCollection = Mage::getResourceModel('tmcore/module_remoteCollection');
|
39 |
-
$localCollection = Mage::getResourceModel('tmcore/module_collection');
|
40 |
-
foreach ($modules as $code => $values) {
|
41 |
-
if (0 !== strpos($code, 'TM_')) {
|
42 |
-
continue;
|
43 |
-
}
|
44 |
-
|
45 |
-
$module = $localCollection->getItemById($code);
|
46 |
-
if (!$module) {
|
47 |
-
$module = new $this->_itemObjectClass();
|
48 |
-
} else {
|
49 |
-
$module->load($module->getId());
|
50 |
-
}
|
51 |
-
|
52 |
-
$localData = array_merge(
|
53 |
-
array(
|
54 |
-
'id' => $code,
|
55 |
-
'data_version' => $module->getDataVersion(),
|
56 |
-
'code' => $code,
|
57 |
-
'available_upgrades' => $module->getUpgradesToRun()
|
58 |
-
),
|
59 |
-
$values->asCanonicalArray()
|
60 |
-
);
|
61 |
-
|
62 |
-
$this->_collectedModules[$code] =
|
63 |
-
$this->_syncLocalAndRemoteData(
|
64 |
-
$localData,
|
65 |
-
$remoteCollection->getItemById($code)
|
66 |
-
);
|
67 |
-
}
|
68 |
-
|
69 |
-
$this->_filterAndSort();
|
70 |
-
|
71 |
-
// calculate totals
|
72 |
-
$this->_totalRecords = count($this->_collectedModules);
|
73 |
-
$this->_setIsLoaded();
|
74 |
-
|
75 |
-
// paginate and add items
|
76 |
-
$from = ($this->getCurPage() - 1) * $this->getPageSize();
|
77 |
-
$to = $from + $this->getPageSize() - 1;
|
78 |
-
$isPaginated = $this->getPageSize() > 0;
|
79 |
-
|
80 |
-
$cnt = 0;
|
81 |
-
foreach ($this->_collectedModules as $row) {
|
82 |
-
$cnt++;
|
83 |
-
if ($isPaginated && ($cnt < $from || $cnt > $to)) {
|
84 |
-
continue;
|
85 |
-
}
|
86 |
-
$item = new $this->_itemObjectClass();
|
87 |
-
$this->addItem($item->addData($row));
|
88 |
-
if (!$item->hasId()) {
|
89 |
-
$item->setId($cnt);
|
90 |
-
}
|
91 |
-
}
|
92 |
-
|
93 |
-
return $this;
|
94 |
-
}
|
95 |
-
|
96 |
-
public function getModulesFromConfigNodes()
|
97 |
-
{
|
98 |
-
return Mage::getConfig()->getNode('modules')->children();
|
99 |
-
}
|
100 |
-
|
101 |
-
private function _syncLocalAndRemoteData(array $local, $remote)
|
102 |
-
{
|
103 |
-
$result = array();
|
104 |
-
if ($remote) {
|
105 |
-
$remote = $remote->toArray();
|
106 |
-
$result = $remote;
|
107 |
-
$version = $remote['version'];
|
108 |
-
$dataVersion = '';
|
109 |
-
if (isset($remote['data_version'])) {
|
110 |
-
$dataVersion = $remote['data_version'];
|
111 |
-
}
|
112 |
-
|
113 |
-
unset($result['version']);
|
114 |
-
unset($result['data_version']);
|
115 |
-
|
116 |
-
$result['latest_version'] = $version;
|
117 |
-
$result['latest_data_version'] = $dataVersion;
|
118 |
-
$result['version_status'] = $this->_getVersionStatusLabel($local, $remote);
|
119 |
-
}
|
120 |
-
return array_merge($local, $result);
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Retrieve version status label
|
125 |
-
*
|
126 |
-
* @param array $localData Local module data
|
127 |
-
* @param array $remoteData Latest module data
|
128 |
-
* @return string
|
129 |
-
*/
|
130 |
-
private function _getVersionStatusLabel(array $local, array $remote = array())
|
131 |
-
{
|
132 |
-
$versionCompare = version_compare($local['version'], $remote['version']);
|
133 |
-
$dataCompare = 0;
|
134 |
-
if (isset($remote['data_version'])) {
|
135 |
-
$dataCompare = version_compare($local['data_version'], $remote['data_version']);
|
136 |
-
}
|
137 |
-
if ($local['available_upgrades']) {
|
138 |
-
$dataCompare = -1;
|
139 |
-
}
|
140 |
-
|
141 |
-
if ($versionCompare > -1 && $dataCompare > -1) {
|
142 |
-
$status = TM_Core_Model_Module::VERSION_UPDATED;
|
143 |
-
} else if ($versionCompare === -1) {
|
144 |
-
$status = TM_Core_Model_Module::VERSION_DEPRECATED;
|
145 |
-
} else {
|
146 |
-
$status = TM_Core_Model_Module::VERSION_OUTDATED;
|
147 |
-
}
|
148 |
-
return $status;
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* With specified collected items:
|
153 |
-
* - generate data
|
154 |
-
* - apply filters
|
155 |
-
* - sort
|
156 |
-
*
|
157 |
-
* @param string $attributeName '_collectedFiles' | '_collectedDirs'
|
158 |
-
*/
|
159 |
-
private function _filterAndSort()
|
160 |
-
{
|
161 |
-
// apply filters on generated data
|
162 |
-
if (!empty($this->_filters)) {
|
163 |
-
foreach ($this->_collectedModules as $key => $row) {
|
164 |
-
if (!$this->_filterRow($row)) {
|
165 |
-
unset($this->_collectedModules[$key]);
|
166 |
-
}
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
// sort (keys are lost!)
|
171 |
-
if (!empty($this->_orders)) {
|
172 |
-
usort($this->_collectedModules, array($this, '_usort'));
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
protected function _usort($a, $b)
|
177 |
-
{
|
178 |
-
foreach ($this->_orders as $key => $direction) {
|
179 |
-
$result = $a[$key] > $b[$key] ? 1 : ($a[$key] < $b[$key] ? -1 : 0);
|
180 |
-
return (self::SORT_ORDER_ASC === strtoupper($direction) ? $result : -$result);
|
181 |
-
break;
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
185 |
-
/**
|
186 |
-
* Set select order
|
187 |
-
* Currently supports only sorting by one column
|
188 |
-
*
|
189 |
-
* @param string $field
|
190 |
-
* @param string $direction
|
191 |
-
* @return Varien_Data_Collection
|
192 |
-
*/
|
193 |
-
public function setOrder($field, $direction = self::SORT_ORDER_DESC)
|
194 |
-
{
|
195 |
-
$this->_orders = array($field => $direction);
|
196 |
-
return $this;
|
197 |
-
}
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Set a custom filter with callback
|
201 |
-
* The callback must take 3 params:
|
202 |
-
* string $field - field key,
|
203 |
-
* mixed $filterValue - value to filter by,
|
204 |
-
* array $row - a generated row (before generaring varien objects)
|
205 |
-
*
|
206 |
-
* @param string $field
|
207 |
-
* @param mixed $value
|
208 |
-
* @param string $type 'and'|'or'
|
209 |
-
* @param callback $callback
|
210 |
-
* @param bool $isInverted
|
211 |
-
* @return Varien_Data_Collection_Filesystem
|
212 |
-
*/
|
213 |
-
public function addCallbackFilter($field, $value, $type, $callback, $isInverted = false)
|
214 |
-
{
|
215 |
-
$this->_filters[$this->_filterIncrement] = array(
|
216 |
-
'field' => $field,
|
217 |
-
'value' => $value,
|
218 |
-
'is_and' => 'and' === $type,
|
219 |
-
'callback' => $callback,
|
220 |
-
'is_inverted' => $isInverted
|
221 |
-
);
|
222 |
-
$this->_filterIncrement++;
|
223 |
-
return $this;
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* The filters renderer and caller
|
228 |
-
* Aplies to each row, renders once.
|
229 |
-
*
|
230 |
-
* @param array $row
|
231 |
-
* @return bool
|
232 |
-
*/
|
233 |
-
protected function _filterRow($row)
|
234 |
-
{
|
235 |
-
// render filters once
|
236 |
-
if (!$this->_isFiltersRendered) {
|
237 |
-
$eval = '';
|
238 |
-
for ($i = 0; $i < $this->_filterIncrement; $i++) {
|
239 |
-
if (isset($this->_filterBrackets[$i])) {
|
240 |
-
$eval .= $this->_renderConditionBeforeFilterElement($i, $this->_filterBrackets[$i]['is_and'])
|
241 |
-
. $this->_filterBrackets[$i]['value'];
|
242 |
-
}
|
243 |
-
else {
|
244 |
-
$f = '$this->_filters[' . $i . ']';
|
245 |
-
$eval .= $this->_renderConditionBeforeFilterElement($i, $this->_filters[$i]['is_and'])
|
246 |
-
. ($this->_filters[$i]['is_inverted'] ? '!' : '')
|
247 |
-
. '$this->_invokeFilter(' . "{$f}['callback'], array({$f}['field'], {$f}['value'], " . '$row))';
|
248 |
-
}
|
249 |
-
}
|
250 |
-
$this->_filterEvalRendered = $eval;
|
251 |
-
$this->_isFiltersRendered = true;
|
252 |
-
}
|
253 |
-
$result = false;
|
254 |
-
if ($this->_filterEvalRendered) {
|
255 |
-
eval('$result = ' . $this->_filterEvalRendered . ';');
|
256 |
-
}
|
257 |
-
return $result;
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* Invokes specified callback
|
262 |
-
* Skips, if there is no filtered key in the row
|
263 |
-
*
|
264 |
-
* @param callback $callback
|
265 |
-
* @param array $callbackParams
|
266 |
-
* @return bool
|
267 |
-
*/
|
268 |
-
protected function _invokeFilter($callback, $callbackParams)
|
269 |
-
{
|
270 |
-
list($field, $value, $row) = $callbackParams;
|
271 |
-
if (!array_key_exists($field, $row)) {
|
272 |
-
return false;
|
273 |
-
}
|
274 |
-
return call_user_func_array($callback, $callbackParams);
|
275 |
-
}
|
276 |
-
|
277 |
-
/**
|
278 |
-
* Fancy field filter
|
279 |
-
*
|
280 |
-
* @param string $field
|
281 |
-
* @param mixed $cond
|
282 |
-
* @param string $type 'and' | 'or'
|
283 |
-
* @see Varien_Data_Collection_Db::addFieldToFilter()
|
284 |
-
* @return Varien_Data_Collection_Filesystem
|
285 |
-
*/
|
286 |
-
public function addFieldToFilter($field, $cond, $type = 'and')
|
287 |
-
{
|
288 |
-
$inverted = true;
|
289 |
-
|
290 |
-
// simply check whether equals
|
291 |
-
if (!is_array($cond)) {
|
292 |
-
return $this->addCallbackFilter($field, $cond, $type, array($this, 'filterCallbackEq'));
|
293 |
-
}
|
294 |
-
|
295 |
-
// versatile filters
|
296 |
-
if (isset($cond['from']) || isset($cond['to'])) {
|
297 |
-
$this->_addFilterBracket('(', 'and' === $type);
|
298 |
-
if (isset($cond['from'])) {
|
299 |
-
$this->addCallbackFilter($field, $cond['from'], 'and', array($this, 'filterCallbackIsLessThan'), $inverted);
|
300 |
-
}
|
301 |
-
if (isset($cond['to'])) {
|
302 |
-
$this->addCallbackFilter($field, $cond['to'], 'and', array($this, 'filterCallbackIsMoreThan'), $inverted);
|
303 |
-
}
|
304 |
-
return $this->_addFilterBracket(')');
|
305 |
-
}
|
306 |
-
if (isset($cond['eq'])) {
|
307 |
-
return $this->addCallbackFilter($field, $cond['eq'], $type, array($this, 'filterCallbackEq'));
|
308 |
-
}
|
309 |
-
if (isset($cond['neq'])) {
|
310 |
-
return $this->addCallbackFilter($field, $cond['neq'], $type, array($this, 'filterCallbackEq'), $inverted);
|
311 |
-
}
|
312 |
-
if (isset($cond['like'])) {
|
313 |
-
return $this->addCallbackFilter($field, $cond['like'], $type, array($this, 'filterCallbackLike'));
|
314 |
-
}
|
315 |
-
if (isset($cond['nlike'])) {
|
316 |
-
return $this->addCallbackFilter($field, $cond['nlike'], $type, array($this, 'filterCallbackLike'), $inverted);
|
317 |
-
}
|
318 |
-
if (isset($cond['in'])) {
|
319 |
-
return $this->addCallbackFilter($field, $cond['in'], $type, array($this, 'filterCallbackInArray'));
|
320 |
-
}
|
321 |
-
if (isset($cond['nin'])) {
|
322 |
-
return $this->addCallbackFilter($field, $cond['nin'], $type, array($this, 'filterCallbackInArray'), $inverted);
|
323 |
-
}
|
324 |
-
if (isset($cond['notnull'])) {
|
325 |
-
return $this->addCallbackFilter($field, $cond['notnull'], $type, array($this, 'filterCallbackIsNull'), $inverted);
|
326 |
-
}
|
327 |
-
if (isset($cond['null'])) {
|
328 |
-
return $this->addCallbackFilter($field, $cond['null'], $type, array($this, 'filterCallbackIsNull'));
|
329 |
-
}
|
330 |
-
if (isset($cond['moreq'])) {
|
331 |
-
return $this->addCallbackFilter($field, $cond['moreq'], $type, array($this, 'filterCallbackIsLessThan'), $inverted);
|
332 |
-
}
|
333 |
-
if (isset($cond['gt'])) {
|
334 |
-
return $this->addCallbackFilter($field, $cond['gt'], $type, array($this, 'filterCallbackIsMoreThan'));
|
335 |
-
}
|
336 |
-
if (isset($cond['lt'])) {
|
337 |
-
return $this->addCallbackFilter($field, $cond['lt'], $type, array($this, 'filterCallbackIsLessThan'));
|
338 |
-
}
|
339 |
-
if (isset($cond['gteq'])) {
|
340 |
-
return $this->addCallbackFilter($field, $cond['gteq'], $type, array($this, 'filterCallbackIsLessThan'), $inverted);
|
341 |
-
}
|
342 |
-
if (isset($cond['lteq'])) {
|
343 |
-
return $this->addCallbackFilter($field, $cond['lteq'], $type, array($this, 'filterCallbackIsMoreThan'), $inverted);
|
344 |
-
}
|
345 |
-
if (isset($cond['finset'])) {
|
346 |
-
$filterValue = ($cond['finset'] ? explode(',', $cond['finset']) : array());
|
347 |
-
return $this->addCallbackFilter($field, $filterValue, $type, array($this, 'filterCallbackInArray'));
|
348 |
-
}
|
349 |
-
|
350 |
-
// add OR recursively
|
351 |
-
foreach ($cond as $orCond) {
|
352 |
-
$this->_addFilterBracket('(', 'and' === $type);
|
353 |
-
$this->addFieldToFilter($field, $orCond, 'or');
|
354 |
-
$this->_addFilterBracket(')');
|
355 |
-
}
|
356 |
-
return $this;
|
357 |
-
}
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Prepare a bracket into filters
|
361 |
-
*
|
362 |
-
* @param string $bracket
|
363 |
-
* @param bool $isAnd
|
364 |
-
* @return Varien_Data_Collection_Filesystem
|
365 |
-
*/
|
366 |
-
protected function _addFilterBracket($bracket = '(', $isAnd = true)
|
367 |
-
{
|
368 |
-
$this->_filterBrackets[$this->_filterIncrement] = array(
|
369 |
-
'value' => $bracket === ')' ? ')' : '(',
|
370 |
-
'is_and' => $isAnd,
|
371 |
-
);
|
372 |
-
$this->_filterIncrement++;
|
373 |
-
return $this;
|
374 |
-
}
|
375 |
-
|
376 |
-
/**
|
377 |
-
* Render condition sign before element, if required
|
378 |
-
*
|
379 |
-
* @param int $increment
|
380 |
-
* @param bool $isAnd
|
381 |
-
* @return string
|
382 |
-
*/
|
383 |
-
protected function _renderConditionBeforeFilterElement($increment, $isAnd)
|
384 |
-
{
|
385 |
-
if (isset($this->_filterBrackets[$increment]) && ')' === $this->_filterBrackets[$increment]['value']) {
|
386 |
-
return '';
|
387 |
-
}
|
388 |
-
$prevIncrement = $increment - 1;
|
389 |
-
$prevBracket = false;
|
390 |
-
if (isset($this->_filterBrackets[$prevIncrement])) {
|
391 |
-
$prevBracket = $this->_filterBrackets[$prevIncrement]['value'];
|
392 |
-
}
|
393 |
-
if ($prevIncrement < 0 || $prevBracket === '(') {
|
394 |
-
return '';
|
395 |
-
}
|
396 |
-
return ($isAnd ? ' && ' : ' || ');
|
397 |
-
}
|
398 |
-
|
399 |
-
/**
|
400 |
-
* Does nothing. Intentionally disabled parent method
|
401 |
-
*
|
402 |
-
* @return Varien_Data_Collection_Filesystem
|
403 |
-
*/
|
404 |
-
public function addFilter($field, $value, $type = 'and')
|
405 |
-
{
|
406 |
-
return $this;
|
407 |
-
}
|
408 |
-
|
409 |
-
/**
|
410 |
-
* Callback method for 'like' fancy filter
|
411 |
-
*
|
412 |
-
* @param string $field
|
413 |
-
* @param mixed $filterValue
|
414 |
-
* @param array $row
|
415 |
-
* @return bool
|
416 |
-
* @see addFieldToFilter()
|
417 |
-
* @see addCallbackFilter()
|
418 |
-
*/
|
419 |
-
public function filterCallbackLike($field, $filterValue, $row)
|
420 |
-
{
|
421 |
-
// removing single quotes, added by filter for mysql query: "'%FILTER_TEXT%'"
|
422 |
-
$filterValue = preg_replace("/(^')(.*)('$)/", "$2", $filterValue);
|
423 |
-
|
424 |
-
$filterValueRegex = str_replace('%', '(.*?)', preg_quote($filterValue, '/'));
|
425 |
-
return (bool)preg_match("/^{$filterValueRegex}$/i", $row[$field]);
|
426 |
-
}
|
427 |
-
|
428 |
-
/**
|
429 |
-
* Callback method for 'eq' fancy filter
|
430 |
-
*
|
431 |
-
* @param string $field
|
432 |
-
* @param mixed $filterValue
|
433 |
-
* @param array $row
|
434 |
-
* @return bool
|
435 |
-
* @see addFieldToFilter()
|
436 |
-
* @see addCallbackFilter()
|
437 |
-
*/
|
438 |
-
public function filterCallbackEq($field, $filterValue, $row)
|
439 |
-
{
|
440 |
-
return $filterValue == $row[$field];
|
441 |
-
}
|
442 |
-
|
443 |
-
/**
|
444 |
-
* Callback method for 'in' fancy filter
|
445 |
-
*
|
446 |
-
* @param string $field
|
447 |
-
* @param mixed $filterValue
|
448 |
-
* @param array $row
|
449 |
-
* @return bool
|
450 |
-
* @see addFieldToFilter()
|
451 |
-
* @see addCallbackFilter()
|
452 |
-
*/
|
453 |
-
public function filterCallbackInArray($field, $filterValue, $row)
|
454 |
-
{
|
455 |
-
return in_array($row[$field], $filterValue);
|
456 |
-
}
|
457 |
-
|
458 |
-
/**
|
459 |
-
* Callback method for 'isnull' fancy filter
|
460 |
-
*
|
461 |
-
* @param string $field
|
462 |
-
* @param mixed $filterValue
|
463 |
-
* @param array $row
|
464 |
-
* @return bool
|
465 |
-
* @see addFieldToFilter()
|
466 |
-
* @see addCallbackFilter()
|
467 |
-
*/
|
468 |
-
public function filterCallbackIsNull($field, $filterValue, $row)
|
469 |
-
{
|
470 |
-
return null === $row[$field];
|
471 |
-
}
|
472 |
-
|
473 |
-
/**
|
474 |
-
* Callback method for 'moreq' fancy filter
|
475 |
-
*
|
476 |
-
* @param string $field
|
477 |
-
* @param mixed $filterValue
|
478 |
-
* @param array $row
|
479 |
-
* @return bool
|
480 |
-
* @see addFieldToFilter()
|
481 |
-
* @see addCallbackFilter()
|
482 |
-
*/
|
483 |
-
public function filterCallbackIsMoreThan($field, $filterValue, $row)
|
484 |
-
{
|
485 |
-
return $row[$field] > $filterValue;
|
486 |
-
}
|
487 |
-
|
488 |
-
/**
|
489 |
-
* Callback method for 'lteq' fancy filter
|
490 |
-
*
|
491 |
-
* @param string $field
|
492 |
-
* @param mixed $filterValue
|
493 |
-
* @param array $row
|
494 |
-
* @return bool
|
495 |
-
* @see addFieldToFilter()
|
496 |
-
* @see addCallbackFilter()
|
497 |
-
*/
|
498 |
-
public function filterCallbackIsLessThan($field, $filterValue, $row)
|
499 |
-
{
|
500 |
-
return $row[$field] < $filterValue;
|
501 |
-
}
|
502 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Resource/Module/RemoteCollection.php
DELETED
@@ -1,165 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Resource_Module_RemoteCollection extends Varien_Data_Collection
|
4 |
-
{
|
5 |
-
const XML_FEED_URL_PATH = 'tmcore/modules/feed_url';
|
6 |
-
|
7 |
-
protected $_collectedModules = array();
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Lauch data collecting
|
11 |
-
*
|
12 |
-
* @param bool $printQuery
|
13 |
-
* @param bool $logQuery
|
14 |
-
* @return Varien_Data_Collection_Filesystem
|
15 |
-
*/
|
16 |
-
public function loadData($printQuery = false, $logQuery = false)
|
17 |
-
{
|
18 |
-
if ($this->isLoaded()) {
|
19 |
-
return $this;
|
20 |
-
}
|
21 |
-
|
22 |
-
try {
|
23 |
-
$client = new Zend_Http_Client();
|
24 |
-
$adapter = new Zend_Http_Client_Adapter_Curl();
|
25 |
-
$client->setAdapter($adapter);
|
26 |
-
$client->setUri($this->_getFeedUri());
|
27 |
-
$client->setConfig(array('maxredirects'=>0, 'timeout'=>30));
|
28 |
-
$client->setParameterGet('domain', Mage::app()->getRequest()->getHttpHost());
|
29 |
-
$responseBody = $client->request()->getBody();
|
30 |
-
$modules = Mage::helper('core')->jsonDecode($responseBody);
|
31 |
-
if (!is_array($modules)) {
|
32 |
-
throw new Exception('Decoding failed');
|
33 |
-
}
|
34 |
-
} catch (Exception $e) {
|
35 |
-
// @todo remove this fix and add error message
|
36 |
-
$modules = array(
|
37 |
-
'TM_Core' => array(
|
38 |
-
'code' => 'TM_Core',
|
39 |
-
'version' => '',
|
40 |
-
'changelog' => '',
|
41 |
-
'link' => '',
|
42 |
-
'download_link' => '',
|
43 |
-
'identity_key_link' => ''
|
44 |
-
),
|
45 |
-
'TM_License' => array(
|
46 |
-
'code' => 'TM_License',
|
47 |
-
'version' => '',
|
48 |
-
'changelog' => '',
|
49 |
-
'link' => '',
|
50 |
-
'download_link' => '',
|
51 |
-
'identity_key_link' => ''
|
52 |
-
),
|
53 |
-
'TM_Argento' => array(
|
54 |
-
'code' => 'TM_Argento',
|
55 |
-
'version' => '',
|
56 |
-
'changelog' => '',
|
57 |
-
'link' => '',
|
58 |
-
'download_link' => '',
|
59 |
-
'identity_key_link' => '',
|
60 |
-
'changelog' => ""
|
61 |
-
),
|
62 |
-
'TM_ArgentoArgento' => array(
|
63 |
-
'code' => 'TM_ArgentoArgento',
|
64 |
-
'version' => '',
|
65 |
-
'changelog' => "",
|
66 |
-
'link' => 'http://argentotheme.com',
|
67 |
-
'download_link' => 'https://argentotheme.com/downloadable/customer/products/',
|
68 |
-
'identity_key_link' => 'https://argentotheme.com/license/customer/identity/'
|
69 |
-
),
|
70 |
-
'TM_ArgentoFlat' => array(
|
71 |
-
'code' => 'TM_ArgentoFlat',
|
72 |
-
'version' => '',
|
73 |
-
'changelog' => "",
|
74 |
-
'link' => 'http://argentotheme.com',
|
75 |
-
'download_link' => 'https://argentotheme.com/downloadable/customer/products/',
|
76 |
-
'identity_key_link' => 'https://argentotheme.com/license/customer/identity/'
|
77 |
-
),
|
78 |
-
'TM_ArgentoMage2Cloud' => array(
|
79 |
-
'code' => 'TM_ArgentoMage2Cloud',
|
80 |
-
'version' => '',
|
81 |
-
'changelog' => "",
|
82 |
-
'link' => 'http://argentotheme.com',
|
83 |
-
'download_link' => '',
|
84 |
-
'identity_key_link' => ''
|
85 |
-
),
|
86 |
-
'TM_ArgentoMall' => array(
|
87 |
-
'code' => 'TM_ArgentoMall',
|
88 |
-
'version' => '',
|
89 |
-
'changelog' => "",
|
90 |
-
'link' => 'http://argentotheme.com',
|
91 |
-
'download_link' => 'https://argentotheme.com/downloadable/customer/products/',
|
92 |
-
'identity_key_link' => 'https://argentotheme.com/license/customer/identity/'
|
93 |
-
),
|
94 |
-
'TM_ArgentoPure' => array(
|
95 |
-
'code' => 'TM_ArgentoPure',
|
96 |
-
'version' => '',
|
97 |
-
'changelog' => "",
|
98 |
-
'link' => 'http://argentotheme.com',
|
99 |
-
'download_link' => 'https://argentotheme.com/downloadable/customer/products/',
|
100 |
-
'identity_key_link' => 'https://argentotheme.com/license/customer/identity/'
|
101 |
-
),
|
102 |
-
'TM_ArgentoPure2' => array(
|
103 |
-
'code' => 'TM_ArgentoPure2',
|
104 |
-
'version' => '',
|
105 |
-
'changelog' => "",
|
106 |
-
'link' => 'http://argentotheme.com',
|
107 |
-
'download_link' => 'https://argentotheme.com/downloadable/customer/products/',
|
108 |
-
'identity_key_link' => 'https://argentotheme.com/license/customer/identity/'
|
109 |
-
),
|
110 |
-
'TM_ArgentoTM' => array(
|
111 |
-
'code' => 'TM_ArgentoTM',
|
112 |
-
'version' => '',
|
113 |
-
'changelog' => "",
|
114 |
-
'link' => 'http://argentotheme.com',
|
115 |
-
'download_link' => '',
|
116 |
-
'identity_key_link' => ''
|
117 |
-
),
|
118 |
-
'Swissup_Subscription' => array(
|
119 |
-
'code' => 'Swissup_Subscription',
|
120 |
-
'version' => '',
|
121 |
-
'changelog' => "",
|
122 |
-
'link' => 'http://swissuplabs.com',
|
123 |
-
'download_link' => 'https://swissuplabs.com/subscription/customer/products/',
|
124 |
-
'identity_key_link' => 'https://swissuplabs.com/license/customer/identity/'
|
125 |
-
)
|
126 |
-
);
|
127 |
-
}
|
128 |
-
|
129 |
-
foreach ($modules as $moduleName => $values) {
|
130 |
-
$values['id'] = $values['code'];
|
131 |
-
$this->_collectedModules[$values['code']] = $values;
|
132 |
-
}
|
133 |
-
|
134 |
-
// calculate totals
|
135 |
-
$this->_totalRecords = count($this->_collectedModules);
|
136 |
-
$this->_setIsLoaded();
|
137 |
-
|
138 |
-
// paginate and add items
|
139 |
-
$from = ($this->getCurPage() - 1) * $this->getPageSize();
|
140 |
-
$to = $from + $this->getPageSize() - 1;
|
141 |
-
$isPaginated = $this->getPageSize() > 0;
|
142 |
-
|
143 |
-
$cnt = 0;
|
144 |
-
foreach ($this->_collectedModules as $row) {
|
145 |
-
$cnt++;
|
146 |
-
if ($isPaginated && ($cnt < $from || $cnt > $to)) {
|
147 |
-
continue;
|
148 |
-
}
|
149 |
-
$item = new $this->_itemObjectClass();
|
150 |
-
$this->addItem($item->addData($row));
|
151 |
-
if (!$item->hasId()) {
|
152 |
-
$item->setId($cnt);
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
-
return $this;
|
157 |
-
}
|
158 |
-
|
159 |
-
protected function _getFeedUri()
|
160 |
-
{
|
161 |
-
$useHttps = Mage::getStoreConfigFlag(TM_Core_Model_Module::XML_USE_HTTPS_PATH);
|
162 |
-
return ($useHttps ? 'https://' : 'http://')
|
163 |
-
. Mage::getStoreConfig(self::XML_FEED_URL_PATH);
|
164 |
-
}
|
165 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Resource/Support/Collection.php
DELETED
@@ -1,416 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Model_Resource_Support_Collection extends Varien_Data_Collection
|
4 |
-
{
|
5 |
-
|
6 |
-
protected $_rawItems = array();
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Filter rendering helper variables
|
10 |
-
*
|
11 |
-
* @see Varien_Data_Collection::$_filter
|
12 |
-
* @see Varien_Data_Collection::$_isFiltersRendered
|
13 |
-
*/
|
14 |
-
private $_filterIncrement = 0;
|
15 |
-
private $_filterBrackets = array();
|
16 |
-
private $_filterEvalRendered = '';
|
17 |
-
|
18 |
-
|
19 |
-
public function setFromArray(array $_items)
|
20 |
-
{
|
21 |
-
$this->_rawItems = $_items;
|
22 |
-
return $this;
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Lauch data collecting
|
27 |
-
*
|
28 |
-
* @param bool $printQuery
|
29 |
-
* @param bool $logQuery
|
30 |
-
* @return Varien_Data_Collection_Filesystem
|
31 |
-
*/
|
32 |
-
public function loadData($printQuery = false, $logQuery = false)
|
33 |
-
{
|
34 |
-
if ($this->isLoaded()) {
|
35 |
-
return $this;
|
36 |
-
}
|
37 |
-
|
38 |
-
$this->_filterAndSort();
|
39 |
-
|
40 |
-
// calculate totals
|
41 |
-
$this->_totalRecords = count($this->_rawItems);
|
42 |
-
$this->_setIsLoaded();
|
43 |
-
|
44 |
-
// paginate and add items
|
45 |
-
$from = ($this->getCurPage() - 1) * $this->getPageSize();
|
46 |
-
$to = $from + $this->getPageSize() - 1;
|
47 |
-
$isPaginated = $this->getPageSize() > 0;
|
48 |
-
|
49 |
-
$cnt = 0;
|
50 |
-
foreach ($this->_rawItems as $row) {
|
51 |
-
$cnt++;
|
52 |
-
if ($isPaginated && ($cnt < $from || $cnt > $to)) {
|
53 |
-
continue;
|
54 |
-
}
|
55 |
-
$item = new $this->_itemObjectClass();
|
56 |
-
$this->addItem($item->addData($row));
|
57 |
-
if (!$item->hasId()) {
|
58 |
-
$item->setId($cnt);
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
-
return $this;
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* With specified collected items:
|
67 |
-
* - generate data
|
68 |
-
* - apply filters
|
69 |
-
* - sort
|
70 |
-
*
|
71 |
-
* @param string $attributeName '_collectedFiles' | '_collectedDirs'
|
72 |
-
*/
|
73 |
-
private function _filterAndSort()
|
74 |
-
{
|
75 |
-
// apply filters on generated data
|
76 |
-
if (!empty($this->_filters)) {
|
77 |
-
foreach ($this->_rawItems as $key => $row) {
|
78 |
-
if (!$this->_filterRow($row)) {
|
79 |
-
unset($this->_rawItems[$key]);
|
80 |
-
}
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
// sort (keys are lost!)
|
85 |
-
if (!empty($this->_orders)) {
|
86 |
-
usort($this->_rawItems, array($this, '_usort'));
|
87 |
-
}
|
88 |
-
}
|
89 |
-
|
90 |
-
protected function _usort($a, $b)
|
91 |
-
{
|
92 |
-
foreach ($this->_orders as $key => $direction) {
|
93 |
-
$result = $a[$key] > $b[$key] ? 1 : ($a[$key] < $b[$key] ? -1 : 0);
|
94 |
-
return (self::SORT_ORDER_ASC === strtoupper($direction) ? $result : -$result);
|
95 |
-
break;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Set select order
|
101 |
-
* Currently supports only sorting by one column
|
102 |
-
*
|
103 |
-
* @param string $field
|
104 |
-
* @param string $direction
|
105 |
-
* @return Varien_Data_Collection
|
106 |
-
*/
|
107 |
-
public function setOrder($field, $direction = self::SORT_ORDER_DESC)
|
108 |
-
{
|
109 |
-
$this->_orders = array($field => $direction);
|
110 |
-
return $this;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Set a custom filter with callback
|
115 |
-
* The callback must take 3 params:
|
116 |
-
* string $field - field key,
|
117 |
-
* mixed $filterValue - value to filter by,
|
118 |
-
* array $row - a generated row (before generaring varien objects)
|
119 |
-
*
|
120 |
-
* @param string $field
|
121 |
-
* @param mixed $value
|
122 |
-
* @param string $type 'and'|'or'
|
123 |
-
* @param callback $callback
|
124 |
-
* @param bool $isInverted
|
125 |
-
* @return Varien_Data_Collection_Filesystem
|
126 |
-
*/
|
127 |
-
public function addCallbackFilter($field, $value, $type, $callback, $isInverted = false)
|
128 |
-
{
|
129 |
-
$this->_filters[$this->_filterIncrement] = array(
|
130 |
-
'field' => $field,
|
131 |
-
'value' => $value,
|
132 |
-
'is_and' => 'and' === $type,
|
133 |
-
'callback' => $callback,
|
134 |
-
'is_inverted' => $isInverted
|
135 |
-
);
|
136 |
-
$this->_filterIncrement++;
|
137 |
-
return $this;
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* The filters renderer and caller
|
142 |
-
* Aplies to each row, renders once.
|
143 |
-
*
|
144 |
-
* @param array $row
|
145 |
-
* @return bool
|
146 |
-
*/
|
147 |
-
protected function _filterRow($row)
|
148 |
-
{
|
149 |
-
// render filters once
|
150 |
-
if (!$this->_isFiltersRendered) {
|
151 |
-
$eval = '';
|
152 |
-
for ($i = 0; $i < $this->_filterIncrement; $i++) {
|
153 |
-
if (isset($this->_filterBrackets[$i])) {
|
154 |
-
$eval .= $this->_renderConditionBeforeFilterElement($i, $this->_filterBrackets[$i]['is_and'])
|
155 |
-
. $this->_filterBrackets[$i]['value'];
|
156 |
-
}
|
157 |
-
else {
|
158 |
-
$f = '$this->_filters[' . $i . ']';
|
159 |
-
$eval .= $this->_renderConditionBeforeFilterElement($i, $this->_filters[$i]['is_and'])
|
160 |
-
. ($this->_filters[$i]['is_inverted'] ? '!' : '')
|
161 |
-
. '$this->_invokeFilter(' . "{$f}['callback'], array({$f}['field'], {$f}['value'], " . '$row))';
|
162 |
-
}
|
163 |
-
}
|
164 |
-
$this->_filterEvalRendered = $eval;
|
165 |
-
$this->_isFiltersRendered = true;
|
166 |
-
}
|
167 |
-
$result = false;
|
168 |
-
if ($this->_filterEvalRendered) {
|
169 |
-
eval('$result = ' . $this->_filterEvalRendered . ';');
|
170 |
-
}
|
171 |
-
return $result;
|
172 |
-
}
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Invokes specified callback
|
176 |
-
* Skips, if there is no filtered key in the row
|
177 |
-
*
|
178 |
-
* @param callback $callback
|
179 |
-
* @param array $callbackParams
|
180 |
-
* @return bool
|
181 |
-
*/
|
182 |
-
protected function _invokeFilter($callback, $callbackParams)
|
183 |
-
{
|
184 |
-
list($field, $value, $row) = $callbackParams;
|
185 |
-
if (!array_key_exists($field, $row)) {
|
186 |
-
return false;
|
187 |
-
}
|
188 |
-
return call_user_func_array($callback, $callbackParams);
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Fancy field filter
|
193 |
-
*
|
194 |
-
* @param string $field
|
195 |
-
* @param mixed $cond
|
196 |
-
* @param string $type 'and' | 'or'
|
197 |
-
* @see Varien_Data_Collection_Db::addFieldToFilter()
|
198 |
-
* @return Varien_Data_Collection_Filesystem
|
199 |
-
*/
|
200 |
-
public function addFieldToFilter($field, $cond, $type = 'and')
|
201 |
-
{
|
202 |
-
$inverted = true;
|
203 |
-
|
204 |
-
// simply check whether equals
|
205 |
-
if (!is_array($cond)) {
|
206 |
-
return $this->addCallbackFilter($field, $cond, $type, array($this, 'filterCallbackEq'));
|
207 |
-
}
|
208 |
-
|
209 |
-
// versatile filters
|
210 |
-
if (isset($cond['from']) || isset($cond['to'])) {
|
211 |
-
$this->_addFilterBracket('(', 'and' === $type);
|
212 |
-
if (isset($cond['from'])) {
|
213 |
-
$this->addCallbackFilter($field, $cond['from'], 'and', array($this, 'filterCallbackIsLessThan'), $inverted);
|
214 |
-
}
|
215 |
-
if (isset($cond['to'])) {
|
216 |
-
$this->addCallbackFilter($field, $cond['to'], 'and', array($this, 'filterCallbackIsMoreThan'), $inverted);
|
217 |
-
}
|
218 |
-
return $this->_addFilterBracket(')');
|
219 |
-
}
|
220 |
-
if (isset($cond['eq'])) {
|
221 |
-
return $this->addCallbackFilter($field, $cond['eq'], $type, array($this, 'filterCallbackEq'));
|
222 |
-
}
|
223 |
-
if (isset($cond['neq'])) {
|
224 |
-
return $this->addCallbackFilter($field, $cond['neq'], $type, array($this, 'filterCallbackEq'), $inverted);
|
225 |
-
}
|
226 |
-
if (isset($cond['like'])) {
|
227 |
-
return $this->addCallbackFilter($field, $cond['like'], $type, array($this, 'filterCallbackLike'));
|
228 |
-
}
|
229 |
-
if (isset($cond['nlike'])) {
|
230 |
-
return $this->addCallbackFilter($field, $cond['nlike'], $type, array($this, 'filterCallbackLike'), $inverted);
|
231 |
-
}
|
232 |
-
if (isset($cond['in'])) {
|
233 |
-
return $this->addCallbackFilter($field, $cond['in'], $type, array($this, 'filterCallbackInArray'));
|
234 |
-
}
|
235 |
-
if (isset($cond['nin'])) {
|
236 |
-
return $this->addCallbackFilter($field, $cond['nin'], $type, array($this, 'filterCallbackInArray'), $inverted);
|
237 |
-
}
|
238 |
-
if (isset($cond['notnull'])) {
|
239 |
-
return $this->addCallbackFilter($field, $cond['notnull'], $type, array($this, 'filterCallbackIsNull'), $inverted);
|
240 |
-
}
|
241 |
-
if (isset($cond['null'])) {
|
242 |
-
return $this->addCallbackFilter($field, $cond['null'], $type, array($this, 'filterCallbackIsNull'));
|
243 |
-
}
|
244 |
-
if (isset($cond['moreq'])) {
|
245 |
-
return $this->addCallbackFilter($field, $cond['moreq'], $type, array($this, 'filterCallbackIsLessThan'), $inverted);
|
246 |
-
}
|
247 |
-
if (isset($cond['gt'])) {
|
248 |
-
return $this->addCallbackFilter($field, $cond['gt'], $type, array($this, 'filterCallbackIsMoreThan'));
|
249 |
-
}
|
250 |
-
if (isset($cond['lt'])) {
|
251 |
-
return $this->addCallbackFilter($field, $cond['lt'], $type, array($this, 'filterCallbackIsLessThan'));
|
252 |
-
}
|
253 |
-
if (isset($cond['gteq'])) {
|
254 |
-
return $this->addCallbackFilter($field, $cond['gteq'], $type, array($this, 'filterCallbackIsLessThan'), $inverted);
|
255 |
-
}
|
256 |
-
if (isset($cond['lteq'])) {
|
257 |
-
return $this->addCallbackFilter($field, $cond['lteq'], $type, array($this, 'filterCallbackIsMoreThan'), $inverted);
|
258 |
-
}
|
259 |
-
if (isset($cond['finset'])) {
|
260 |
-
$filterValue = ($cond['finset'] ? explode(',', $cond['finset']) : array());
|
261 |
-
return $this->addCallbackFilter($field, $filterValue, $type, array($this, 'filterCallbackInArray'));
|
262 |
-
}
|
263 |
-
|
264 |
-
// add OR recursively
|
265 |
-
foreach ($cond as $orCond) {
|
266 |
-
$this->_addFilterBracket('(', 'and' === $type);
|
267 |
-
$this->addFieldToFilter($field, $orCond, 'or');
|
268 |
-
$this->_addFilterBracket(')');
|
269 |
-
}
|
270 |
-
return $this;
|
271 |
-
}
|
272 |
-
|
273 |
-
/**
|
274 |
-
* Prepare a bracket into filters
|
275 |
-
*
|
276 |
-
* @param string $bracket
|
277 |
-
* @param bool $isAnd
|
278 |
-
* @return Varien_Data_Collection_Filesystem
|
279 |
-
*/
|
280 |
-
protected function _addFilterBracket($bracket = '(', $isAnd = true)
|
281 |
-
{
|
282 |
-
$this->_filterBrackets[$this->_filterIncrement] = array(
|
283 |
-
'value' => $bracket === ')' ? ')' : '(',
|
284 |
-
'is_and' => $isAnd,
|
285 |
-
);
|
286 |
-
$this->_filterIncrement++;
|
287 |
-
return $this;
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Render condition sign before element, if required
|
292 |
-
*
|
293 |
-
* @param int $increment
|
294 |
-
* @param bool $isAnd
|
295 |
-
* @return string
|
296 |
-
*/
|
297 |
-
protected function _renderConditionBeforeFilterElement($increment, $isAnd)
|
298 |
-
{
|
299 |
-
if (isset($this->_filterBrackets[$increment]) && ')' === $this->_filterBrackets[$increment]['value']) {
|
300 |
-
return '';
|
301 |
-
}
|
302 |
-
$prevIncrement = $increment - 1;
|
303 |
-
$prevBracket = false;
|
304 |
-
if (isset($this->_filterBrackets[$prevIncrement])) {
|
305 |
-
$prevBracket = $this->_filterBrackets[$prevIncrement]['value'];
|
306 |
-
}
|
307 |
-
if ($prevIncrement < 0 || $prevBracket === '(') {
|
308 |
-
return '';
|
309 |
-
}
|
310 |
-
return ($isAnd ? ' && ' : ' || ');
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Does nothing. Intentionally disabled parent method
|
315 |
-
*
|
316 |
-
* @return Varien_Data_Collection_Filesystem
|
317 |
-
*/
|
318 |
-
public function addFilter($field, $value, $type = 'and')
|
319 |
-
{
|
320 |
-
return $this;
|
321 |
-
}
|
322 |
-
|
323 |
-
/**
|
324 |
-
* Callback method for 'like' fancy filter
|
325 |
-
*
|
326 |
-
* @param string $field
|
327 |
-
* @param mixed $filterValue
|
328 |
-
* @param array $row
|
329 |
-
* @return bool
|
330 |
-
* @see addFieldToFilter()
|
331 |
-
* @see addCallbackFilter()
|
332 |
-
*/
|
333 |
-
public function filterCallbackLike($field, $filterValue, $row)
|
334 |
-
{
|
335 |
-
// removing single quotes, added by filter for mysql query: "'%FILTER_TEXT%'"
|
336 |
-
$filterValue = preg_replace("/(^')(.*)('$)/", "$2", $filterValue);
|
337 |
-
|
338 |
-
$filterValueRegex = str_replace('%', '(.*?)', preg_quote($filterValue, '/'));
|
339 |
-
return (bool)preg_match("/^{$filterValueRegex}$/i", $row[$field]);
|
340 |
-
}
|
341 |
-
|
342 |
-
/**
|
343 |
-
* Callback method for 'eq' fancy filter
|
344 |
-
*
|
345 |
-
* @param string $field
|
346 |
-
* @param mixed $filterValue
|
347 |
-
* @param array $row
|
348 |
-
* @return bool
|
349 |
-
* @see addFieldToFilter()
|
350 |
-
* @see addCallbackFilter()
|
351 |
-
*/
|
352 |
-
public function filterCallbackEq($field, $filterValue, $row)
|
353 |
-
{
|
354 |
-
return $filterValue == $row[$field];
|
355 |
-
}
|
356 |
-
|
357 |
-
/**
|
358 |
-
* Callback method for 'in' fancy filter
|
359 |
-
*
|
360 |
-
* @param string $field
|
361 |
-
* @param mixed $filterValue
|
362 |
-
* @param array $row
|
363 |
-
* @return bool
|
364 |
-
* @see addFieldToFilter()
|
365 |
-
* @see addCallbackFilter()
|
366 |
-
*/
|
367 |
-
public function filterCallbackInArray($field, $filterValue, $row)
|
368 |
-
{
|
369 |
-
return in_array($row[$field], $filterValue);
|
370 |
-
}
|
371 |
-
|
372 |
-
/**
|
373 |
-
* Callback method for 'isnull' fancy filter
|
374 |
-
*
|
375 |
-
* @param string $field
|
376 |
-
* @param mixed $filterValue
|
377 |
-
* @param array $row
|
378 |
-
* @return bool
|
379 |
-
* @see addFieldToFilter()
|
380 |
-
* @see addCallbackFilter()
|
381 |
-
*/
|
382 |
-
public function filterCallbackIsNull($field, $filterValue, $row)
|
383 |
-
{
|
384 |
-
return null === $row[$field];
|
385 |
-
}
|
386 |
-
|
387 |
-
/**
|
388 |
-
* Callback method for 'moreq' fancy filter
|
389 |
-
*
|
390 |
-
* @param string $field
|
391 |
-
* @param mixed $filterValue
|
392 |
-
* @param array $row
|
393 |
-
* @return bool
|
394 |
-
* @see addFieldToFilter()
|
395 |
-
* @see addCallbackFilter()
|
396 |
-
*/
|
397 |
-
public function filterCallbackIsMoreThan($field, $filterValue, $row)
|
398 |
-
{
|
399 |
-
return $row[$field] > $filterValue;
|
400 |
-
}
|
401 |
-
|
402 |
-
/**
|
403 |
-
* Callback method for 'lteq' fancy filter
|
404 |
-
*
|
405 |
-
* @param string $field
|
406 |
-
* @param mixed $filterValue
|
407 |
-
* @param array $row
|
408 |
-
* @return bool
|
409 |
-
* @see addFieldToFilter()
|
410 |
-
* @see addCallbackFilter()
|
411 |
-
*/
|
412 |
-
public function filterCallbackIsLessThan($field, $filterValue, $row)
|
413 |
-
{
|
414 |
-
return $row[$field] < $filterValue;
|
415 |
-
}
|
416 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/Model/Timer.php
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Usage example:
|
5 |
-
*
|
6 |
-
* 1. $this->_timer = Mage::getModel('tmcore/timer', array('name' => 'tm_crawler'));
|
7 |
-
*
|
8 |
-
* 2. $this->_timer->startOrResume();
|
9 |
-
*
|
10 |
-
* 3. $limit = $this->_timer->getTimeLimit() / 3;
|
11 |
-
* if ($this->_timer->getElapsedSecs() >= $limit) {
|
12 |
-
* return;
|
13 |
-
* }
|
14 |
-
*/
|
15 |
-
class TM_Core_Model_Timer extends Varien_Object
|
16 |
-
{
|
17 |
-
protected $_timers = array();
|
18 |
-
|
19 |
-
public function start($reset = false)
|
20 |
-
{
|
21 |
-
if ($reset) {
|
22 |
-
$this->_timers[$name]['start'] = microtime(true);
|
23 |
-
} else {
|
24 |
-
$this->startOrResume();
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
public function stop()
|
29 |
-
{
|
30 |
-
$this->_timers[$this->getName()]['stop'] = microtime(true);
|
31 |
-
}
|
32 |
-
|
33 |
-
public function startOrResume()
|
34 |
-
{
|
35 |
-
$name = $this->getName();
|
36 |
-
if (isset($this->_timers[$name])) {
|
37 |
-
return;
|
38 |
-
}
|
39 |
-
$this->_timers[$name]['start'] = microtime(true);
|
40 |
-
}
|
41 |
-
|
42 |
-
public function getElapsedSecs()
|
43 |
-
{
|
44 |
-
$now = microtime(true);
|
45 |
-
if (isset($this->_timers[$this->getName()]['stop'])) {
|
46 |
-
return $this->_timers[$this->getName()]['stop']
|
47 |
-
- $this->_timers[$this->getName()]['start'];
|
48 |
-
}
|
49 |
-
return $now - $this->_timers[$this->getName()]['start'];
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Get max execution time
|
54 |
-
*
|
55 |
-
* @return int
|
56 |
-
*/
|
57 |
-
public function getTimeLimit()
|
58 |
-
{
|
59 |
-
$time = @ini_get('max_execution_time');
|
60 |
-
if (empty($time)) {
|
61 |
-
$time = 30;
|
62 |
-
}
|
63 |
-
return $time;
|
64 |
-
}
|
65 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/controllers/Adminhtml/Tmcore/ModuleController.php
DELETED
@@ -1,123 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Adminhtml_Tmcore_ModuleController extends Mage_Adminhtml_Controller_Action
|
4 |
-
{
|
5 |
-
protected function _initAction()
|
6 |
-
{
|
7 |
-
$this->loadLayout()
|
8 |
-
->_setActiveMenu('templates_master/tmcore_module')
|
9 |
-
->_addBreadcrumb('Templates Master', 'Templates Master')
|
10 |
-
->_addBreadcrumb(Mage::helper('tmcore')->__('Modules'), Mage::helper('tmcore')->__('Modules'));
|
11 |
-
return $this;
|
12 |
-
}
|
13 |
-
|
14 |
-
public function indexAction()
|
15 |
-
{
|
16 |
-
$this->_initAction();
|
17 |
-
$this->renderLayout();
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Placeholder grid for AJAX request
|
22 |
-
*/
|
23 |
-
public function gridAction()
|
24 |
-
{
|
25 |
-
$this->loadLayout();
|
26 |
-
$this->renderLayout();
|
27 |
-
}
|
28 |
-
|
29 |
-
public function manageAction()
|
30 |
-
{
|
31 |
-
if (!$this->getRequest()->getParam('id')) {
|
32 |
-
return $this->_redirect('*/*/index');
|
33 |
-
}
|
34 |
-
|
35 |
-
$module = Mage::getModel('tmcore/module');
|
36 |
-
$module->load($this->getRequest()->getParam('id'));
|
37 |
-
|
38 |
-
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
39 |
-
if (!empty($data)) {
|
40 |
-
$module->addData($data);
|
41 |
-
}
|
42 |
-
|
43 |
-
if ($info = Mage::getSingleton('adminhtml/session')->getTmValidationInfo(true)) {
|
44 |
-
$link = Mage::helper('tmcore/debug')->preparePopup(
|
45 |
-
$info['response'],
|
46 |
-
'SwissUpLabs subscription validation response'
|
47 |
-
);
|
48 |
-
Mage::getSingleton('adminhtml/session')->addError(
|
49 |
-
$info['error'] . ' | ' . $link
|
50 |
-
);
|
51 |
-
}
|
52 |
-
|
53 |
-
Mage::register('tmcore_module', $module);
|
54 |
-
|
55 |
-
$this->_initAction()
|
56 |
-
->_addBreadcrumb(Mage::helper('tmcore')->__('Manage'), Mage::helper('tmcore')->__('Manage'));
|
57 |
-
$this->renderLayout();
|
58 |
-
}
|
59 |
-
|
60 |
-
public function runAction()
|
61 |
-
{
|
62 |
-
if (!$this->getRequest()->isPost()) {
|
63 |
-
return $this->_redirect('*/*/index');
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @var TM_Core_Model_Module
|
68 |
-
*/
|
69 |
-
$module = Mage::getModel('tmcore/module');
|
70 |
-
$module->load($this->getRequest()->getParam('id'))
|
71 |
-
->setSkipUpgrade($this->getRequest()->getPost('skip_upgrade', false))
|
72 |
-
->setNewStores($this->getRequest()->getPost('new_stores', array()))
|
73 |
-
->setIdentityKey($this->getRequest()->getParam('identity_key'));
|
74 |
-
|
75 |
-
$result = $module->validateLicense();
|
76 |
-
if (is_array($result) && isset($result['error'])) {
|
77 |
-
Mage::getSingleton('adminhtml/session')->setFormData($this->getRequest()->getPost());
|
78 |
-
|
79 |
-
$error = call_user_func_array(array(Mage::helper('tmcore'), '__'), $result['error']);
|
80 |
-
if (isset($result['response'])) {
|
81 |
-
Mage::getSingleton('adminhtml/session')->setTmValidationInfo(
|
82 |
-
array(
|
83 |
-
'error' => $error,
|
84 |
-
'response' => $result['response']
|
85 |
-
)
|
86 |
-
);
|
87 |
-
} else {
|
88 |
-
Mage::getSingleton('adminhtml/session')->addError($error);
|
89 |
-
}
|
90 |
-
return $this->_redirect('*/*/manage', array('id' => $module->getId()));
|
91 |
-
}
|
92 |
-
|
93 |
-
$module->up();
|
94 |
-
|
95 |
-
Mage::app()->cleanCache();
|
96 |
-
Mage::dispatchEvent('adminhtml_cache_flush_system');
|
97 |
-
|
98 |
-
$groupedErrors = $module->getMessageLogger()->getErrors();
|
99 |
-
if (count($groupedErrors)) {
|
100 |
-
foreach ($groupedErrors as $type => $errors) {
|
101 |
-
foreach ($errors as $error) {
|
102 |
-
if (is_array($error)) {
|
103 |
-
$message = $error['message'];
|
104 |
-
} else {
|
105 |
-
$message = $error;
|
106 |
-
}
|
107 |
-
Mage::getSingleton('adminhtml/session')->addError($message);
|
108 |
-
}
|
109 |
-
}
|
110 |
-
Mage::getSingleton('adminhtml/session')->setFormData($this->getRequest()->getPost());
|
111 |
-
return $this->_redirect('*/*/manage', array('id' => $module->getId()));
|
112 |
-
}
|
113 |
-
|
114 |
-
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
115 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('tmcore')->__("The module has been saved"));
|
116 |
-
$this->_redirect('*/*/');
|
117 |
-
}
|
118 |
-
|
119 |
-
protected function _isAllowed()
|
120 |
-
{
|
121 |
-
return Mage::getSingleton('admin/session')->isAllowed('templates_master/tmcore_module');
|
122 |
-
}
|
123 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/controllers/Adminhtml/Tmcore/SupportController.php
DELETED
@@ -1,282 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TM_Core_Adminhtml_Tmcore_SupportController extends Mage_Adminhtml_Controller_Action
|
4 |
-
{
|
5 |
-
protected function _initAction()
|
6 |
-
{
|
7 |
-
$this->loadLayout()
|
8 |
-
->_setActiveMenu('templates_master/tmcore_module')
|
9 |
-
->_addBreadcrumb('Templates Master', 'Templates Master')
|
10 |
-
->_addBreadcrumb(Mage::helper('tmcore')->__('Support'), Mage::helper('tmcore')->__('Support'));
|
11 |
-
return $this;
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
*
|
16 |
-
* @return string (uri)
|
17 |
-
*/
|
18 |
-
protected function _getApiHost()
|
19 |
-
{
|
20 |
-
// return 'http://mage.local';
|
21 |
-
return Mage::getStoreConfig('tmcore/troubleshooting/url');
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
*
|
26 |
-
* @return Zend_Oauth_Client
|
27 |
-
*/
|
28 |
-
protected function _getRestApiClient()
|
29 |
-
{
|
30 |
-
$oAuthClient = Mage::getModel('tmcore/oauth_client');
|
31 |
-
$params = $oAuthClient->getConfigFromSession();
|
32 |
-
if (!$params) {
|
33 |
-
return false;
|
34 |
-
}
|
35 |
-
$oAuthClient->init($params);
|
36 |
-
$state = $oAuthClient->authenticate();
|
37 |
-
if ($state == TM_Core_Model_Oauth_Client::OAUTH_STATE_ACCESS_TOKEN) {
|
38 |
-
$accessToken = $oAuthClient->getAuthorizedToken();
|
39 |
-
}
|
40 |
-
$restClient = $accessToken->getHttpClient($params);
|
41 |
-
|
42 |
-
return $restClient;
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
*
|
47 |
-
* @param type $response
|
48 |
-
* @return boolean
|
49 |
-
*/
|
50 |
-
protected function _prepareApiRestResponseErrorMessages($response)
|
51 |
-
{
|
52 |
-
if (!is_object($response) || !property_exists($response, 'messages')) {
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
$messages = $response->messages;
|
56 |
-
if ($messages) {
|
57 |
-
$errors = $messages->error;
|
58 |
-
if ($errors) {
|
59 |
-
foreach ($errors as $error) {
|
60 |
-
Mage::getSingleton('adminhtml/session')->addError(
|
61 |
-
$error->message
|
62 |
-
);
|
63 |
-
}
|
64 |
-
// $this->_redirectReferer();
|
65 |
-
// die;
|
66 |
-
return true;
|
67 |
-
}
|
68 |
-
}
|
69 |
-
return false;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
*
|
74 |
-
* @param string $uri
|
75 |
-
* @return \Varien_Object|\TM_Core_Model_Resource_Support_Collection
|
76 |
-
*/
|
77 |
-
protected function _getRestApiData($uri)
|
78 |
-
{
|
79 |
-
$restClient = $this->_getRestApiClient();
|
80 |
-
|
81 |
-
if (!$restClient) {
|
82 |
-
return false;
|
83 |
-
}
|
84 |
-
|
85 |
-
$restClient->setHeaders('Accept', 'application/json');
|
86 |
-
$restClient->setMethod(Zend_Http_Client::GET);
|
87 |
-
|
88 |
-
$host = $this->_getApiHost();
|
89 |
-
$restClient->setUri($host . '/api/rest' . $uri);
|
90 |
-
|
91 |
-
$response = $restClient->request();
|
92 |
-
$_items = json_decode($response->getBody());
|
93 |
-
|
94 |
-
$this->_prepareApiRestResponseErrorMessages($_items);
|
95 |
-
|
96 |
-
if (is_array($_items)) {
|
97 |
-
$collection = new TM_Core_Model_Resource_Support_Collection();
|
98 |
-
foreach ($_items as &$_item) {
|
99 |
-
$_item = (array)$_item;
|
100 |
-
}
|
101 |
-
$collection->setFromArray($_items);
|
102 |
-
return $collection;
|
103 |
-
}
|
104 |
-
$object = new Varien_Object();
|
105 |
-
$object->setData((array)$_items);
|
106 |
-
return $object;
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
*
|
111 |
-
* @param type $uri
|
112 |
-
* @param type $params
|
113 |
-
* @return type
|
114 |
-
*/
|
115 |
-
protected function _setRestApiData($uri, $params)
|
116 |
-
{
|
117 |
-
$restClient = $this->_getRestApiClient();
|
118 |
-
|
119 |
-
if (!$restClient) {
|
120 |
-
return false;
|
121 |
-
}
|
122 |
-
|
123 |
-
$restClient->setHeaders('Accept', 'application/json');
|
124 |
-
$restClient->setHeaders('Content-Type','application/json');
|
125 |
-
$restClient->setEncType('application/json');
|
126 |
-
$restClient->setMethod(Zend_Http_Client::POST);
|
127 |
-
|
128 |
-
$host = $this->_getApiHost();
|
129 |
-
$restClient->setUri($host . '/api/rest' . $uri);
|
130 |
-
|
131 |
-
$restClient->setRawData(json_encode($params));
|
132 |
-
|
133 |
-
$response = $restClient->request();
|
134 |
-
$object = json_decode($response->getBody());
|
135 |
-
|
136 |
-
$this->_prepareApiRestResponseErrorMessages($object);
|
137 |
-
|
138 |
-
return $object;
|
139 |
-
}
|
140 |
-
|
141 |
-
public function oauthAction()
|
142 |
-
{
|
143 |
-
$host = $this->_getApiHost();
|
144 |
-
$consumerKey = Mage::getStoreConfig('tmcore/troubleshooting/consumer_key');
|
145 |
-
$consumerSecret = Mage::getStoreConfig('tmcore/troubleshooting/consumer_secret');
|
146 |
-
//Basic parameters that need to be provided for oAuth authentication
|
147 |
-
//on Magento
|
148 |
-
$params = array(
|
149 |
-
'siteUrl' => "{$host}/oauth",
|
150 |
-
'requestTokenUrl' => "{$host}/oauth/initiate",
|
151 |
-
'accessTokenUrl' => "{$host}/oauth/token",
|
152 |
-
'authorizeUrl' => "{$host}/oauth/authorize",
|
153 |
-
// 'authorizeUrl' => "{$magentohost}/admin/oauth_authorize", //This URL is used only if we authenticate as Admin user type
|
154 |
-
'consumerKey' => $consumerKey, //Consumer key registered in server administration
|
155 |
-
'consumerSecret' => $consumerSecret, //Consumer secret registered in server administration
|
156 |
-
'callbackUrl' => $this->getUrl('*/*/index')//Url of callback action below
|
157 |
-
);
|
158 |
-
$oAuthClient = Mage::getModel('tmcore/oauth_client');
|
159 |
-
$oAuthClient->reset();
|
160 |
-
$oAuthClient->init($params);
|
161 |
-
$oAuthClient->authenticate();
|
162 |
-
}
|
163 |
-
|
164 |
-
public function indexAction()
|
165 |
-
{
|
166 |
-
$collection = $this->_getRestApiData('/helpdesk/tickets');
|
167 |
-
|
168 |
-
if (empty($collection)) {
|
169 |
-
return $this->_redirect('*/*/oauth');
|
170 |
-
}
|
171 |
-
Mage::register('tmcore_support_collection', $collection);
|
172 |
-
|
173 |
-
$model = new Varien_Object();
|
174 |
-
|
175 |
-
$model->setDepartmets(
|
176 |
-
$this->_getRestApiData("/helpdesk/departments")
|
177 |
-
);
|
178 |
-
|
179 |
-
$model->setStatuses(
|
180 |
-
$this->_getRestApiData("/helpdesk/statuses")
|
181 |
-
);
|
182 |
-
|
183 |
-
$model->setPriorities(
|
184 |
-
$this->_getRestApiData("/helpdesk/priorities")
|
185 |
-
);
|
186 |
-
|
187 |
-
Mage::register('tmcore_support', $model);
|
188 |
-
|
189 |
-
$this->_initAction();
|
190 |
-
$this->renderLayout();
|
191 |
-
}
|
192 |
-
|
193 |
-
public function editAction()
|
194 |
-
{
|
195 |
-
$ticketId = $this->getRequest()->getParam('ticket_id');
|
196 |
-
|
197 |
-
$model = $this->_getRestApiData("/helpdesk/tickets/{$ticketId}");
|
198 |
-
|
199 |
-
if (empty($model)) {
|
200 |
-
return $this->_redirect('*/*/oauth');
|
201 |
-
}
|
202 |
-
|
203 |
-
$model->setTheards(
|
204 |
-
$this->_getRestApiData("/helpdesk/tickets/{$ticketId}/theards")
|
205 |
-
);
|
206 |
-
|
207 |
-
$model->setDepartmets(
|
208 |
-
$this->_getRestApiData("/helpdesk/departments")
|
209 |
-
);
|
210 |
-
|
211 |
-
$model->setStatuses(
|
212 |
-
$this->_getRestApiData("/helpdesk/statuses")
|
213 |
-
);
|
214 |
-
|
215 |
-
$model->setPriorities(
|
216 |
-
$this->_getRestApiData("/helpdesk/priorities")
|
217 |
-
);
|
218 |
-
|
219 |
-
Mage::register('tmcore_support', $model);
|
220 |
-
|
221 |
-
$this->_initAction();
|
222 |
-
$this->renderLayout();
|
223 |
-
}
|
224 |
-
|
225 |
-
public function newAction()
|
226 |
-
{
|
227 |
-
$model = new Varien_Object();
|
228 |
-
$model->setDepartmets(
|
229 |
-
$this->_getRestApiData("/helpdesk/departments")
|
230 |
-
);
|
231 |
-
|
232 |
-
$model->setStatuses(
|
233 |
-
$this->_getRestApiData("/helpdesk/statuses")
|
234 |
-
);
|
235 |
-
|
236 |
-
$model->setPriorities(
|
237 |
-
$this->_getRestApiData("/helpdesk/priorities")
|
238 |
-
);
|
239 |
-
|
240 |
-
Mage::register('tmcore_support', $model);
|
241 |
-
|
242 |
-
$this->_initAction();
|
243 |
-
$this->renderLayout();
|
244 |
-
}
|
245 |
-
|
246 |
-
public function saveAction()
|
247 |
-
{
|
248 |
-
$params = $this->getRequest()->getParams();
|
249 |
-
$ticketId = $this->getRequest()->getParam('id');
|
250 |
-
// $text = $this->getRequest()->getParam('text');
|
251 |
-
if (empty($params['text'])) {
|
252 |
-
throw new Exception('text is null');
|
253 |
-
}
|
254 |
-
//save ticket
|
255 |
-
if (empty($ticketId)) {
|
256 |
-
$response = $this->_setRestApiData("/helpdesk/tickets", array(
|
257 |
-
'title' => $params['title'],
|
258 |
-
'department_id' => $params['department_id'],
|
259 |
-
'priority' => $params['priority'],
|
260 |
-
'text' => $params['text'],
|
261 |
-
));
|
262 |
-
} else { //save theard
|
263 |
-
$response = $this->_setRestApiData(
|
264 |
-
"/helpdesk/tickets/{$ticketId}/theards",
|
265 |
-
array('text' => $params['text'])
|
266 |
-
);
|
267 |
-
}
|
268 |
-
// $messages = $response->messages;
|
269 |
-
// if ($messages) {
|
270 |
-
// $errors = $messages->error;
|
271 |
-
// if ($errors) {
|
272 |
-
// foreach ($errors as $error) {
|
273 |
-
// Mage::getSingleton('adminhtml/session')->addError($error->message);
|
274 |
-
// }
|
275 |
-
// }
|
276 |
-
// }
|
277 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(
|
278 |
-
Mage::helper('tmcore')->__('Item was successfully saved')
|
279 |
-
);
|
280 |
-
$this->_redirectReferer();
|
281 |
-
}
|
282 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/etc/adminhtml.xml
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<menu>
|
4 |
-
<templates_master>
|
5 |
-
<title>Templates Master</title>
|
6 |
-
<sort_order>71</sort_order>
|
7 |
-
<children>
|
8 |
-
<!-- <tmcore_support translate="title" module="tmcore">
|
9 |
-
<title>Support</title>
|
10 |
-
<sort_order>1339</sort_order>
|
11 |
-
<action>adminhtml/tmcore_support/index</action>
|
12 |
-
</tmcore_support>-->
|
13 |
-
|
14 |
-
<tmcore_module translate="title" module="tmcore">
|
15 |
-
<title>Modules</title>
|
16 |
-
<sort_order>1340</sort_order>
|
17 |
-
<action>adminhtml/tmcore_module/index</action>
|
18 |
-
</tmcore_module>
|
19 |
-
</children>
|
20 |
-
</templates_master>
|
21 |
-
</menu>
|
22 |
-
<acl>
|
23 |
-
<resources>
|
24 |
-
<admin>
|
25 |
-
<children>
|
26 |
-
<system>
|
27 |
-
<children>
|
28 |
-
<config>
|
29 |
-
<children>
|
30 |
-
<tmcore>
|
31 |
-
<title>Core</title>
|
32 |
-
</tmcore>
|
33 |
-
</children>
|
34 |
-
</config>
|
35 |
-
</children>
|
36 |
-
</system>
|
37 |
-
<templates_master>
|
38 |
-
<title>Templates Master</title>
|
39 |
-
<sort_order>71</sort_order>
|
40 |
-
<children>
|
41 |
-
<!-- <tmcore_support translate="title" module="tmcore">
|
42 |
-
<title>Support</title>
|
43 |
-
<sort_order>11</sort_order>
|
44 |
-
</tmcore_support> -->
|
45 |
-
<tmcore_module translate="title" module="tmcore">
|
46 |
-
<title>Modules</title>
|
47 |
-
<sort_order>1340</sort_order>
|
48 |
-
</tmcore_module>
|
49 |
-
</children>
|
50 |
-
</templates_master>
|
51 |
-
</children>
|
52 |
-
</admin>
|
53 |
-
</resources>
|
54 |
-
</acl>
|
55 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/etc/config.xml
DELETED
@@ -1,153 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<TM_Core>
|
5 |
-
<version>1.3.5</version>
|
6 |
-
</TM_Core>
|
7 |
-
</modules>
|
8 |
-
|
9 |
-
<global>
|
10 |
-
<models>
|
11 |
-
<tmcore>
|
12 |
-
<class>TM_Core_Model</class>
|
13 |
-
<resourceModel>tmcore_resource</resourceModel>
|
14 |
-
</tmcore>
|
15 |
-
<tmcore_resource>
|
16 |
-
<class>TM_Core_Model_Resource</class>
|
17 |
-
<entities>
|
18 |
-
<module>
|
19 |
-
<table>tm_core_module</table>
|
20 |
-
</module>
|
21 |
-
</entities>
|
22 |
-
</tmcore_resource>
|
23 |
-
</models>
|
24 |
-
<blocks>
|
25 |
-
<tmcore>
|
26 |
-
<class>TM_Core_Block</class>
|
27 |
-
</tmcore>
|
28 |
-
<cms>
|
29 |
-
<rewrite>
|
30 |
-
<block>TM_Core_Block_Cms_Block</block>
|
31 |
-
</rewrite>
|
32 |
-
</cms>
|
33 |
-
</blocks>
|
34 |
-
<helpers>
|
35 |
-
<tmcore>
|
36 |
-
<class>TM_Core_Helper</class>
|
37 |
-
</tmcore>
|
38 |
-
</helpers>
|
39 |
-
<resources>
|
40 |
-
<tm_core_setup>
|
41 |
-
<setup>
|
42 |
-
<module>TM_Core</module>
|
43 |
-
</setup>
|
44 |
-
<connection>
|
45 |
-
<use>core_setup</use>
|
46 |
-
</connection>
|
47 |
-
</tm_core_setup>
|
48 |
-
</resources>
|
49 |
-
<events>
|
50 |
-
<core_layout_update_updates_get_after>
|
51 |
-
<observers>
|
52 |
-
<tm_layout>
|
53 |
-
<type>model</type>
|
54 |
-
<class>tmcore/observer</class>
|
55 |
-
<method>addLayoutUpdate</method>
|
56 |
-
</tm_layout>
|
57 |
-
</observers>
|
58 |
-
</core_layout_update_updates_get_after>
|
59 |
-
</events>
|
60 |
-
</global>
|
61 |
-
|
62 |
-
<adminhtml>
|
63 |
-
<layout>
|
64 |
-
<updates>
|
65 |
-
<tmcore>
|
66 |
-
<file>tmcore.xml</file>
|
67 |
-
</tmcore>
|
68 |
-
</updates>
|
69 |
-
</layout>
|
70 |
-
<events>
|
71 |
-
<controller_action_predispatch>
|
72 |
-
<observers>
|
73 |
-
<tmcore>
|
74 |
-
<class>tmcore/observer</class>
|
75 |
-
<method>preDispatch</method>
|
76 |
-
</tmcore>
|
77 |
-
</observers>
|
78 |
-
</controller_action_predispatch>
|
79 |
-
</events>
|
80 |
-
<translate>
|
81 |
-
<modules>
|
82 |
-
<TM_Core>
|
83 |
-
<files>
|
84 |
-
<default>TM_Core.csv</default>
|
85 |
-
</files>
|
86 |
-
</TM_Core>
|
87 |
-
</modules>
|
88 |
-
</translate>
|
89 |
-
<events>
|
90 |
-
<controller_action_layout_render_before>
|
91 |
-
<observers>
|
92 |
-
<tmcore>
|
93 |
-
<class>tmcore/observer</class>
|
94 |
-
<method>onBeforeRenderLayout</method>
|
95 |
-
</tmcore>
|
96 |
-
</observers>
|
97 |
-
</controller_action_layout_render_before>
|
98 |
-
</events>
|
99 |
-
</adminhtml>
|
100 |
-
|
101 |
-
<frontend>
|
102 |
-
<layout>
|
103 |
-
<updates>
|
104 |
-
<tm_core>
|
105 |
-
<file>tm/core.xml</file>
|
106 |
-
</tm_core>
|
107 |
-
</updates>
|
108 |
-
</layout>
|
109 |
-
</frontend>
|
110 |
-
|
111 |
-
<admin>
|
112 |
-
<routers>
|
113 |
-
<adminhtml>
|
114 |
-
<args>
|
115 |
-
<modules>
|
116 |
-
<tmcore before="Mage_Adminhtml">TM_Core_Adminhtml</tmcore>
|
117 |
-
</modules>
|
118 |
-
</args>
|
119 |
-
</adminhtml>
|
120 |
-
</routers>
|
121 |
-
</admin>
|
122 |
-
|
123 |
-
<default>
|
124 |
-
<subscriptionchecker>
|
125 |
-
<ignored_sections>
|
126 |
-
<tmcore/>
|
127 |
-
</ignored_sections>
|
128 |
-
</subscriptionchecker>
|
129 |
-
<tmcore>
|
130 |
-
<modules>
|
131 |
-
<feed_url>templates-master.com/modules.json</feed_url>
|
132 |
-
</modules>
|
133 |
-
<license>
|
134 |
-
<use_https>0</use_https>
|
135 |
-
<url>/license/validate</url>
|
136 |
-
</license>
|
137 |
-
<notification>
|
138 |
-
<enabled>1</enabled>
|
139 |
-
<feed_url>templates-master.com/notifier</feed_url>
|
140 |
-
<use_https>0</use_https>
|
141 |
-
<frequency>24</frequency>
|
142 |
-
<filter>installed,promo,release,update,other</filter>
|
143 |
-
<last_update>0</last_update>
|
144 |
-
</notification>
|
145 |
-
<troubleshooting>
|
146 |
-
<text><![CDATA[Please <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contact us</a>, if you have some issues with one of our modules.]]></text>
|
147 |
-
<url>http://templates-master.com/</url>
|
148 |
-
<consumer_key>b96f1fdbcc5df5608bab036f23caead2</consumer_key>
|
149 |
-
<consumer_secret>b17bb7641ffcdb267264b39460eee8ae</consumer_secret>
|
150 |
-
</troubleshooting>
|
151 |
-
</tmcore>
|
152 |
-
</default>
|
153 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/etc/system.xml
DELETED
@@ -1,113 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<tabs>
|
4 |
-
<templates_master>
|
5 |
-
<label>Templates-master</label>
|
6 |
-
<sort_order>195</sort_order>
|
7 |
-
</templates_master>
|
8 |
-
</tabs>
|
9 |
-
<sections>
|
10 |
-
<tmcore>
|
11 |
-
<label>Core</label>
|
12 |
-
<tab>templates_master</tab>
|
13 |
-
<frontend_type>text</frontend_type>
|
14 |
-
<sort_order>340</sort_order>
|
15 |
-
<show_in_default>1</show_in_default>
|
16 |
-
<show_in_website>1</show_in_website>
|
17 |
-
<show_in_store>1</show_in_store>
|
18 |
-
<groups>
|
19 |
-
<jslibs translate="label comment" module="tmcore">
|
20 |
-
<label>JavaScript libraries</label>
|
21 |
-
<show_in_default>1</show_in_default>
|
22 |
-
<show_in_website>1</show_in_website>
|
23 |
-
<show_in_store>1</show_in_store>
|
24 |
-
<fields>
|
25 |
-
<jquery translate="label">
|
26 |
-
<label>Enable jQuery</label>
|
27 |
-
<comment>version 1.10.2</comment>
|
28 |
-
<frontend_type>select</frontend_type>
|
29 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
30 |
-
<sort_order>10</sort_order>
|
31 |
-
<show_in_default>1</show_in_default>
|
32 |
-
<show_in_website>1</show_in_website>
|
33 |
-
<show_in_store>1</show_in_store>
|
34 |
-
</jquery>
|
35 |
-
</fields>
|
36 |
-
</jslibs>
|
37 |
-
<troubleshooting translate="label comment" module="tmcore">
|
38 |
-
<label>Troubleshooting</label>
|
39 |
-
<frontend_type>text</frontend_type>
|
40 |
-
<frontend_model>tmcore/adminhtml_system_config_form_fieldset_troubleshooting</frontend_model>
|
41 |
-
<sort_order>10</sort_order>
|
42 |
-
<show_in_default>1</show_in_default>
|
43 |
-
<show_in_website>0</show_in_website>
|
44 |
-
<show_in_store>0</show_in_store>
|
45 |
-
</troubleshooting>
|
46 |
-
<modules translate="label" module="tmcore">
|
47 |
-
<label>Modules Information</label>
|
48 |
-
<frontend_type>text</frontend_type>
|
49 |
-
<frontend_model>tmcore/adminhtml_system_config_form_fieldset_modules_list</frontend_model>
|
50 |
-
<sort_order>20</sort_order>
|
51 |
-
<show_in_default>1</show_in_default>
|
52 |
-
<show_in_website>0</show_in_website>
|
53 |
-
<show_in_store>0</show_in_store>
|
54 |
-
</modules>
|
55 |
-
<notification translate="label" module="tmcore">
|
56 |
-
<label>Notifications</label>
|
57 |
-
<frontend_type>text</frontend_type>
|
58 |
-
<sort_order>30</sort_order>
|
59 |
-
<show_in_default>1</show_in_default>
|
60 |
-
<show_in_website>0</show_in_website>
|
61 |
-
<show_in_store>0</show_in_store>
|
62 |
-
<fields>
|
63 |
-
<!-- <use_https translate="label">
|
64 |
-
<label>Use HTTPS to Get Feed</label>
|
65 |
-
<frontend_type>select</frontend_type>
|
66 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
67 |
-
<sort_order>10</sort_order>
|
68 |
-
<show_in_default>1</show_in_default>
|
69 |
-
<show_in_website>0</show_in_website>
|
70 |
-
<show_in_store>0</show_in_store>
|
71 |
-
</use_https> -->
|
72 |
-
<enabled translate="label">
|
73 |
-
<label>Enabled</label>
|
74 |
-
<frontend_type>select</frontend_type>
|
75 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
76 |
-
<sort_order>10</sort_order>
|
77 |
-
<show_in_default>1</show_in_default>
|
78 |
-
<show_in_website>0</show_in_website>
|
79 |
-
<show_in_store>0</show_in_store>
|
80 |
-
</enabled>
|
81 |
-
<frequency translate="label">
|
82 |
-
<label>Update Frequency</label>
|
83 |
-
<frontend_type>select</frontend_type>
|
84 |
-
<source_model>adminhtml/system_config_source_notification_frequency</source_model>
|
85 |
-
<sort_order>20</sort_order>
|
86 |
-
<show_in_default>1</show_in_default>
|
87 |
-
<show_in_website>0</show_in_website>
|
88 |
-
<show_in_store>0</show_in_store>
|
89 |
-
</frequency>
|
90 |
-
<filter translate="label" module="tmcore">
|
91 |
-
<label>News to show in notification bar</label>
|
92 |
-
<frontend_type>multiselect</frontend_type>
|
93 |
-
<source_model>tmcore/adminhtml_system_config_source_notification_channel</source_model>
|
94 |
-
<sort_order>25</sort_order>
|
95 |
-
<show_in_default>1</show_in_default>
|
96 |
-
<show_in_website>0</show_in_website>
|
97 |
-
<show_in_store>0</show_in_store>
|
98 |
-
</filter>
|
99 |
-
<last_update translate="label">
|
100 |
-
<label>Last Update</label>
|
101 |
-
<frontend_type>label</frontend_type>
|
102 |
-
<frontend_model>tmcore/adminhtml_system_config_form_field_notification</frontend_model>
|
103 |
-
<sort_order>30</sort_order>
|
104 |
-
<show_in_default>1</show_in_default>
|
105 |
-
<show_in_website>0</show_in_website>
|
106 |
-
<show_in_store>0</show_in_store>
|
107 |
-
</last_update>
|
108 |
-
</fields>
|
109 |
-
</notification>
|
110 |
-
</groups>
|
111 |
-
</tmcore>
|
112 |
-
</sections>
|
113 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/sql/tm_core_setup/mysql4-install-1.0.0.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* @var $installer Mage_Core_Model_Resource_Setup */
|
4 |
-
$installer = $this;
|
5 |
-
|
6 |
-
$installer->startSetup();
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Create table 'tmcore/module'
|
10 |
-
*/
|
11 |
-
$typeText = defined('Varien_Db_Ddl_Table::TYPE_TEXT')
|
12 |
-
? Varien_Db_Ddl_Table::TYPE_TEXT : Varien_Db_Ddl_Table::TYPE_VARCHAR;
|
13 |
-
|
14 |
-
$table = $installer->getConnection()
|
15 |
-
->newTable($installer->getTable('tmcore/module'))
|
16 |
-
->addColumn('code', $typeText, 50, array(
|
17 |
-
'nullable' => false,
|
18 |
-
'primary' => true,
|
19 |
-
)
|
20 |
-
)
|
21 |
-
// ->addColumn('version', Varien_Db_Ddl_Table::TYPE_TEXT, 50)
|
22 |
-
->addColumn('data_version', $typeText, 50)
|
23 |
-
->addColumn('license_key', $typeText, 32);
|
24 |
-
$installer->getConnection()->createTable($table);
|
25 |
-
|
26 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/TM/Core/sql/tm_core_setup/mysql4-upgrade-1.0.0-1.0.1.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* @var $installer Mage_Core_Model_Resource_Setup */
|
4 |
-
$installer = $this;
|
5 |
-
|
6 |
-
$installer->startSetup();
|
7 |
-
|
8 |
-
$tableName = $installer->getTable('tmcore/module');
|
9 |
-
$installer->getConnection()->changeColumn($tableName, 'license_key', 'identity_key', 'TEXT', true);
|
10 |
-
$installer->getConnection()->addColumn($tableName, 'store_ids', 'VARCHAR(64) NOT NULL');
|
11 |
-
|
12 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/layout/tmcore.xml
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout>
|
3 |
-
<adminhtml_tmcore_module_index>
|
4 |
-
<update handle="tmcore_popup"/>
|
5 |
-
<reference name="content">
|
6 |
-
<block type="tmcore/adminhtml_module" name="module.list"/>
|
7 |
-
</reference>
|
8 |
-
</adminhtml_tmcore_module_index>
|
9 |
-
|
10 |
-
<adminhtml_tmcore_module_grid>
|
11 |
-
<block type="tmcore/adminhtml_module_grid" name="root" output="toHtml"/>
|
12 |
-
</adminhtml_tmcore_module_grid>
|
13 |
-
|
14 |
-
<adminhtml_tmcore_module_manage>
|
15 |
-
<update handle="tmcore_popup"/>
|
16 |
-
<reference name="content">
|
17 |
-
<block type="tmcore/adminhtml_module_manage" name="module.manage"/>
|
18 |
-
</reference>
|
19 |
-
<reference name="left">
|
20 |
-
<block type="tmcore/adminhtml_module_manage_tabs" name="tmcore_module_manage_tabs">
|
21 |
-
<block type="tmcore/adminhtml_module_manage_tab_main" name="tmcore_module_manage_tab_main" />
|
22 |
-
<action method="addTab"><name>main_section</name><block>tmcore_module_manage_tab_main</block></action>
|
23 |
-
</block>
|
24 |
-
</reference>
|
25 |
-
</adminhtml_tmcore_module_manage>
|
26 |
-
|
27 |
-
<tmcore_popup>
|
28 |
-
<reference name="head">
|
29 |
-
<action method="addJs"><script>tm/adminhtml/core/window.js</script></action>
|
30 |
-
</reference>
|
31 |
-
<reference name="content">
|
32 |
-
<block type="core/template" name="tmcore.popup" template="tmcore/popup.phtml"/>
|
33 |
-
</reference>
|
34 |
-
</tmcore_popup>
|
35 |
-
|
36 |
-
<adminhtml_tmcore_support_index>
|
37 |
-
<reference name="content">
|
38 |
-
<block type="tmcore/adminhtml_support_list" name="support.list"/>
|
39 |
-
</reference>
|
40 |
-
</adminhtml_tmcore_support_index>
|
41 |
-
|
42 |
-
<adminhtml_tmcore_support_edit>
|
43 |
-
<reference name="content">
|
44 |
-
<block type="tmcore/adminhtml_support_edit" name="support.edit"/>
|
45 |
-
</reference>
|
46 |
-
<reference name="left">
|
47 |
-
<block type="tmcore/adminhtml_support_edit_tabs" name="tmcore_support_edit_tabs">
|
48 |
-
<block type="tmcore/adminhtml_support_edit_tab_main" name="adminhtml_support_edit_tab_main" />
|
49 |
-
<!-- -->
|
50 |
-
<action method="addTab">
|
51 |
-
<name>main_section</name>
|
52 |
-
<block>adminhtml_support_edit_tab_main</block>
|
53 |
-
</action>
|
54 |
-
<!-- -->
|
55 |
-
</block>
|
56 |
-
</reference>
|
57 |
-
</adminhtml_tmcore_support_edit>
|
58 |
-
|
59 |
-
<adminhtml_tmcore_support_new>
|
60 |
-
<update handle="adminhtml_tmcore_support_edit"/>
|
61 |
-
</adminhtml_tmcore_support_new>
|
62 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/tmcore/popup.phtml
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<div id="popup-window-mask" style="display:none;"></div>
|
2 |
-
<div id="tmcore_popup" class="product-configure-popup" style="display:none;">
|
3 |
-
<div class="entry-edit">
|
4 |
-
<div class="entry-edit-head">
|
5 |
-
<h4 class="icon-head fieldset-legend" id="tmcore_popup_title"><?php echo Mage::helper('catalog')->__('Window') ?></h4>
|
6 |
-
<a href="javascript:void(0)" class="close f-right" onclick="tmcoreWindow.onCloseBtn()"><?php echo Mage::helper('catalog')->__('Close') ?></a>
|
7 |
-
</div>
|
8 |
-
<div id="tmcore_popup_content" class="content"></div>
|
9 |
-
<div class="buttons-set a-right">
|
10 |
-
<button type="button" class="scalable close" onclick="tmcoreWindow.onCloseBtn()"><span><span><span><?php echo Mage::helper('catalog')->__('Close') ?></span></span></span></button>
|
11 |
-
</div>
|
12 |
-
</div>
|
13 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/tmcore/ticket/edit/form/element/theard/content.phtml
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
<!--
|
2 |
-
<link rel="stylesheet" href="http://yandex.st/highlightjs/7.2/styles/github.min.css">
|
3 |
-
<script src="http://yandex.st/highlightjs/7.2/highlight.min.js"></script>
|
4 |
-
|
5 |
-
<script type="text/javascript">
|
6 |
-
//<![CDATA[
|
7 |
-
document.observe("dom:loaded", function() {
|
8 |
-
hljs.initHighlightingOnLoad();
|
9 |
-
});
|
10 |
-
//]]>
|
11 |
-
</script>
|
12 |
-
-->
|
13 |
-
|
14 |
-
<div class="entry-edit">
|
15 |
-
<ul class="-note-list" style="width: 100%">
|
16 |
-
<?php
|
17 |
-
$theards = $this->getTheards();
|
18 |
-
$previosTheard = current($theards);
|
19 |
-
$diff = array();
|
20 |
-
foreach ($theards as $_theard):
|
21 |
-
$_theard = $_theard->getData();
|
22 |
-
?>
|
23 |
-
<li>
|
24 |
-
<strong>
|
25 |
-
<?php echo $this->getTheardOwnerTitle($_theard) ?>
|
26 |
-
</strong>
|
27 |
-
<span class="separator">|</span>
|
28 |
-
<strong><?php echo $this->getTheardCreatedAt($_theard) ?></strong>
|
29 |
-
<?php echo $this->getTheardCreatedAt($_theard, 'time') ?>
|
30 |
-
<span class="separator">|</span>
|
31 |
-
<strong title="<?php echo $this->helper('helpmate')->__('Status')?>">
|
32 |
-
<?php echo $this->getTheardStatus($_theard)?>
|
33 |
-
</strong>
|
34 |
-
<span class="separator">|</span>
|
35 |
-
<strong title="<?php echo $this->helper('helpmate')->__('Priority')?>">
|
36 |
-
<?php echo $this->getTheardPriority($_theard) ?>
|
37 |
-
</strong>
|
38 |
-
<span class="separator">|</span>
|
39 |
-
<strong title="<?php echo $this->helper('helpmate')->__('Departament')?>">
|
40 |
-
<?php echo $this->getTheardDepartment($_theard) ?>
|
41 |
-
</strong>
|
42 |
-
|
43 |
-
<?php if ($_text = $this->getTheardText($_theard)): ?>
|
44 |
-
<div class="box">
|
45 |
-
<?php echo $_text ?>
|
46 |
-
</div>
|
47 |
-
<?php endif; ?>
|
48 |
-
<script type='text/javascript'>
|
49 |
-
|
50 |
-
document.observe('dom:loaded', function() {
|
51 |
-
$$('.theard_content span').each(function(element){
|
52 |
-
element.observe('click', function(event) {
|
53 |
-
Effect.toggle(this.next('div'), 'blind', {duration: 0.8} );
|
54 |
-
});
|
55 |
-
element.setStyle('border: 1px solid #D6D6D6; border-bottom:none;background-color: #FFF9E9;display:block;')
|
56 |
-
});
|
57 |
-
$$('.theard_content div').each(function(element){
|
58 |
-
element.hide();
|
59 |
-
element.setStyle('border: 1px solid #D6D6D6; border-top:none;background-color: #FFF9E9;')
|
60 |
-
});
|
61 |
-
});
|
62 |
-
|
63 |
-
</script>
|
64 |
-
<?php if (isset($_theard['status']) && isset($previosTheard['status']) &&
|
65 |
-
$_theard['status'] !== $previosTheard['status']) :?>
|
66 |
-
<br/><small> <?php echo $this->helper('helpmate')->__(
|
67 |
-
'Status has been changed from %s to %s',
|
68 |
-
$this->getTheardStatus($previosTheard),
|
69 |
-
$this->getTheardStatus($_theard)
|
70 |
-
|
71 |
-
) ?>
|
72 |
-
</small>
|
73 |
-
<?php endif;
|
74 |
-
if (isset($_theard['priority']) && isset($previosTheard['priority']) &&
|
75 |
-
$_theard['priority'] !== $previosTheard['priority']) : ?>
|
76 |
-
<br/><small><?php echo $this->helper('helpmate')->__(
|
77 |
-
'Priority has been changed from %s to %s',
|
78 |
-
$this->getTheardPriority($previosTheard),
|
79 |
-
$this->getTheardPriority($_theard)
|
80 |
-
);?>
|
81 |
-
</small>
|
82 |
-
<?php endif;
|
83 |
-
if (isset($_theard['department_id']) && isset($previosTheard['department_id']) &&
|
84 |
-
$_theard['department_id'] !== $previosTheard['department_id']) : ?>
|
85 |
-
<br/><small><?php echo $this->helper('helpmate')->__(
|
86 |
-
'Department has been changed from %s to %s',
|
87 |
-
$this->getTheardDepartment($previosTheard),
|
88 |
-
$this->getTheardDepartment($_theard)
|
89 |
-
) ?></small>;
|
90 |
-
|
91 |
-
<?php endif;?>
|
92 |
-
|
93 |
-
</li>
|
94 |
-
<?php
|
95 |
-
$previosTheard = $_theard;
|
96 |
-
endforeach; ?>
|
97 |
-
</ul>
|
98 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/layout/tm/configurableswatches.xml
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<default>
|
4 |
-
<reference name="head">
|
5 |
-
<action method="addItem"><type>skin_js</type><name>js/lib/modernizr.custom.min.js</name></action>
|
6 |
-
<action method="addItem"><type>skin_js</type><name>js/lib/imagesloaded.js</name></action>
|
7 |
-
|
8 |
-
<action method="addItem"><type>skin_js</type><name>tm/configurableswatches/js/app.js</name></action>
|
9 |
-
<action method="addItem"><type>skin_css</type><name>tm/configurableswatches/css/swatches.css</name></action>
|
10 |
-
</reference>
|
11 |
-
</default>
|
12 |
-
|
13 |
-
<!-- Create missing containers in layered navigation and product_list blocks -->
|
14 |
-
<catalog_category_default>
|
15 |
-
<reference name="product_list">
|
16 |
-
<block type="core/text_list" name="product_list.name.after" as="name.after" />
|
17 |
-
<block type="core/text_list" name="product_list.after" as="after" />
|
18 |
-
</reference>
|
19 |
-
</catalog_category_default>
|
20 |
-
<catalog_category_layered>
|
21 |
-
<reference name="catalog.leftnav">
|
22 |
-
<block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" />
|
23 |
-
</reference>
|
24 |
-
<reference name="product_list">
|
25 |
-
<block type="core/text_list" name="product_list.name.after" as="name.after" />
|
26 |
-
<block type="core/text_list" name="product_list.after" as="after" />
|
27 |
-
</reference>
|
28 |
-
</catalog_category_layered>
|
29 |
-
<catalogsearch_result_index>
|
30 |
-
<reference name="catalogsearch.leftnav">
|
31 |
-
<block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" />
|
32 |
-
</reference>
|
33 |
-
</catalogsearch_result_index>
|
34 |
-
<catalogsearch_product_list>
|
35 |
-
<reference name="search_result_list">
|
36 |
-
<block type="core/text_list" name="product_list.name.after" as="name.after" />
|
37 |
-
<block type="core/text_list" name="product_list.after" as="after" />
|
38 |
-
</reference>
|
39 |
-
</catalogsearch_product_list>
|
40 |
-
<PRODUCT_TYPE_configurable>
|
41 |
-
<reference name="product.info.media">
|
42 |
-
<block type="core/text_list" name="product.info.media.after" as="after" />
|
43 |
-
</reference>
|
44 |
-
<reference name="product.info.options.configurable">
|
45 |
-
<block type="core/text_list" name="product.info.options.configurable.renderers" as="attr_renderers" />
|
46 |
-
<block type="core/text_list" name="product.info.options.configurable.after" as="after" />
|
47 |
-
</reference>
|
48 |
-
</PRODUCT_TYPE_configurable>
|
49 |
-
<!-- // -->
|
50 |
-
|
51 |
-
<product_list>
|
52 |
-
<reference name="head">
|
53 |
-
<!-- ajaxpro, quickshopping fix -->
|
54 |
-
<action method="addItem"><type>skin_js</type><name>js/configurableswatches/swatches-product.js</name></action>
|
55 |
-
</reference>
|
56 |
-
<reference name="product_list.after">
|
57 |
-
<block type="configurableswatches/catalog_media_js_list" name="configurableswatches.media.js.list.ajax">
|
58 |
-
<action method="setTemplate"><template>tm/configurableswatches/catalog/media/js.phtml</template></action>
|
59 |
-
</block>
|
60 |
-
</reference>
|
61 |
-
</product_list>
|
62 |
-
|
63 |
-
<catalog_category_default>
|
64 |
-
<update handle="catalog_product_list"/>
|
65 |
-
<!-- Hack to apply updates from magento configurableswatches.xml again -->
|
66 |
-
<update handle="product_list"/>
|
67 |
-
<update handle="product_list_dealtimer"/>
|
68 |
-
</catalog_category_default>
|
69 |
-
|
70 |
-
<catalog_category_layered>
|
71 |
-
<update handle="catalog_product_list"/>
|
72 |
-
<update handle="product_list"/>
|
73 |
-
<update handle="product_list_dealtimer"/>
|
74 |
-
</catalog_category_layered>
|
75 |
-
|
76 |
-
<catalogsearch_result_index>
|
77 |
-
<update handle="catalogsearch_product_list"/>
|
78 |
-
<update handle="product_list"/>
|
79 |
-
<update handle="product_list_dealtimer"/>
|
80 |
-
</catalogsearch_result_index>
|
81 |
-
|
82 |
-
<catalogsearch_advanced_result>
|
83 |
-
<update handle="catalogsearch_product_list"/>
|
84 |
-
<update handle="product_list"/>
|
85 |
-
<update handle="product_list_dealtimer"/>
|
86 |
-
</catalogsearch_advanced_result>
|
87 |
-
|
88 |
-
<PRODUCT_TYPE_configurable>
|
89 |
-
<!--
|
90 |
-
Duplicate the code that affects blocks that where added above
|
91 |
-
Can't use the hack, that was used above because of handle name is not specific for swatches
|
92 |
-
-->
|
93 |
-
<reference name="product.info.media.after">
|
94 |
-
<block type="configurableswatches/catalog_media_js_product" name="configurableswatches.media.js.product" />
|
95 |
-
</reference>
|
96 |
-
<reference name="product.info.options.configurable.renderers">
|
97 |
-
<block type="configurableswatches/catalog_product_view_type_configurable_swatches" template="configurableswatches/catalog/product/view/type/options/configurable/swatches.phtml" />
|
98 |
-
</reference>
|
99 |
-
<reference name="product.info.options.configurable.after">
|
100 |
-
<block type="core/template" template="configurableswatches/catalog/product/view/type/configurable/swatch-js.phtml" />
|
101 |
-
</reference>
|
102 |
-
<!-- end of duplicate -->
|
103 |
-
|
104 |
-
<!-- fix for quickshopping and ajaxpro -->
|
105 |
-
<reference name="product.info.options.configurable.after">
|
106 |
-
<block type="core/template" template="tm/configurableswatches/catalog/product/view/type/configurable/swatch-js.phtml" />
|
107 |
-
</reference>
|
108 |
-
</PRODUCT_TYPE_configurable>
|
109 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/tm/configurableswatches/catalog/media/js.phtml
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Duplicate of default magento template to add suport for ajax loaded products
|
4 |
-
*/
|
5 |
-
?>
|
6 |
-
<?php
|
7 |
-
/* @var $this Mage_ConfigurableSwatches_Block_Catalog_Media_Js_Abstract */
|
8 |
-
?>
|
9 |
-
|
10 |
-
<script type="text/javascript">
|
11 |
-
if ('complete' === document.readyState) {
|
12 |
-
ConfigurableMediaImages.init('<?php echo $this->getImageType(); ?>');
|
13 |
-
<?php
|
14 |
-
$keepFrame = ($this->getRequest()->getControllerName() !== 'product'); // enabled for the product page only
|
15 |
-
foreach ($this->getProductImageFallbacks($keepFrame) as $imageFallback): ?>
|
16 |
-
ConfigurableMediaImages.setImageFallback(<?php echo $imageFallback['product']->getId(); ?>, $j.parseJSON('<?php echo $imageFallback['image_fallback']; ?>'));
|
17 |
-
<?php endforeach; ?>
|
18 |
-
$j(document).trigger('configurable-media-images-init', ConfigurableMediaImages);
|
19 |
-
}
|
20 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/tm/configurableswatches/catalog/product/view/type/configurable/swatch-js.phtml
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Dupicate of magento template, but with ajax loaded products support
|
3 |
-
?>
|
4 |
-
|
5 |
-
<script type="text/javascript">
|
6 |
-
if ('complete' === document.readyState) {
|
7 |
-
// ajaxpro, quickshopping on the category view page
|
8 |
-
var swatchesConfig = new Product.ConfigurableSwatches(spConfig);
|
9 |
-
}
|
10 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/TM_CatalogConfigurableSwatches.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<TM_CatalogConfigurableSwatches>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
</TM_CatalogConfigurableSwatches>
|
8 |
-
</modules>
|
9 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/TM_Core.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<TM_Core>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
</TM_Core>
|
8 |
-
</modules>
|
9 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/en_US/TM_Core.csv
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
"Modules Information","Modules Information"
|
2 |
-
"Open Extension Page","Open Extension Page"
|
3 |
-
"Please <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contact us</a>, if you have some issues with one of our modules.","Please <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contact us</a>, if you have some issues with one of our modules."
|
4 |
-
"Troubleshooting","Troubleshooting"
|
5 |
-
"Changelog","Changelog"
|
6 |
-
"Download Latest Version","Download Latest Version"
|
7 |
-
"Download","Download"
|
8 |
-
"Manage","Manage"
|
9 |
-
"Upgrades are not installed","Upgrades are not installed"
|
10 |
-
"New version is available","New version is available"
|
11 |
-
"Upgrade Information","Upgrade Information"
|
12 |
-
"Activate this checkbox, if you want to skip the upgrade operations","Activate this checkbox, if you want to skip the upgrade operations"
|
13 |
-
"Module data will be upgraded from %s to %s at the following stores","Module data will be upgraded from %s to %s at the following stores"
|
14 |
-
"Install and Reinstall Information","Install and Reinstall Information"
|
15 |
-
"Identity Key","Identity Key"
|
16 |
-
"Get your identity key at <a href=""%s"" title=""%s"" target=""_blank"">%s</a>","Get your identity key at <a href=""%s"" title=""%s"" target=""_blank"">%s</a>"
|
17 |
-
"Select stores to install or reinstall module","Select stores to install or reinstall module"
|
18 |
-
"Module is already installed at following stores","Module is already installed at following stores"
|
19 |
-
"Manage Module","Manage Module"
|
20 |
-
"Code","Code"
|
21 |
-
"Local Version","Local Version"
|
22 |
-
"Latest Version","Latest Version"
|
23 |
-
"Version Status","Version Status"
|
24 |
-
"Run","Run"
|
25 |
-
"Upgrade and Install/Reinstall %s %s (Data version %s)","Upgrade and Install/Reinstall %s %s (Data version %s)"
|
26 |
-
"Install or Reinstall %s %s (Data version %s)","Install or Reinstall %s %s (Data version %s)"
|
27 |
-
"Install %s %s","Install %s %s"
|
28 |
-
"Modules","Modules"
|
29 |
-
"The module has been saved","The module has been saved"
|
30 |
-
"updated","updated"
|
31 |
-
"outdated","outdated"
|
32 |
-
"deprecated","deprecated"
|
33 |
-
"Identity key is required","Identity key is required"
|
34 |
-
"Response error: %s","Response error: %s"
|
35 |
-
"Sorry, try again in five minutes. Validation response parsing error: %s","Sorry, try again in five minutes. Validation response parsing error: %s"
|
36 |
-
"Module code is required","Module code is required"
|
37 |
-
"Domain name is required","Domain name is required"
|
38 |
-
"Identity key is not valid","Identity key is not valid"
|
39 |
-
"%s module is not found in purchase history","%s module is not found in purchase history"
|
40 |
-
"%s activations limit reached. Please <a href=""%s"" title=""%s"" target=""_blank"">buy the product</a> to activate more domains","%s activations limit reached. Please <a href=""%s"" title=""%s"" target=""_blank"">buy the product</a> to activate more domains"
|
41 |
-
"Module ""%s"" is not activated for ""%s"" domain. Please, <a href=""%s"" title=""%s"" target=""_blank"">activate</a> it from our site. %s activations left","Module ""%s"" is not activated for ""%s"" domain. Please, <a href=""%s"" title=""%s"" target=""_blank"">activate</a> it from our site. %s activations left"
|
42 |
-
"You are trying to use %s activation(s) for %s module. Only %s activations left. Please <a href=""%s"" title=""%s"">buy the product</a> to activate more domains","You are trying to use %s activation(s) for %s module. Only %s activations left. Please <a href=""%s"" title=""%s"">buy the product</a> to activate more domains"
|
43 |
-
"Installed products","Installed products"
|
44 |
-
"Product promotions and discounts","Product promotions and discounts"
|
45 |
-
"New Products","New Products"
|
46 |
-
"Product updates","Product updates"
|
47 |
-
"Other","Other"
|
48 |
-
"News to show in notification bar","News to show in notification bar"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/es_ES/TM_Core.csv
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
"Modules Information","Módulos de Información"
|
2 |
-
"Open Extension Page","Abrir página de extensión"
|
3 |
-
"Please <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contact us</a>, if you have some issues with one of our modules.","Por favor <a href='http://templates-master.com/contacts' onclick='window.open(this.href); regresa false;'>contact us</a>, si tienes algun problema con uno de nuestros módulos."
|
4 |
-
"Troubleshooting","Solución de problemas"
|
5 |
-
"Changelog","Cambios"
|
6 |
-
"Download Latest Version","Descargar la última versión"
|
7 |
-
"Download","Descargar"
|
8 |
-
"Manage","Gestionar"
|
9 |
-
"Upgrades are not installed","Las actualizaciones no se instalan"
|
10 |
-
"New version is available","La nueva versión está disponible"
|
11 |
-
"Upgrade Information","Actualizar información"
|
12 |
-
"Activate this checkbox, if you want to skip the upgrade operations","Activar esta casilla si deseas omitir las operaciones de actualización"
|
13 |
-
"Module data will be upgraded from %s to %s at the following stores","Los datos de los módulos se actualizarán de % s para % s en las siguientes tiendas"
|
14 |
-
"Install and Reinstall Information","Instalar y reinstalar Información"
|
15 |
-
"Identity Key","Clave de Identidad"
|
16 |
-
"Get your identity key at <a href=""%s"" title=""%s"" target=""_blank"">%s</a>","Obtén tu clave de identidad en <a href=""%s"" title=""%s"" target=""_blank""> % s < / a>"
|
17 |
-
"Select stores to install or reinstall module","Seleccione las tiendas para instalar o reinstalar módulo"
|
18 |
-
"Module is already installed at following stores","El módulo ya está instalado en las siguientes tiendas"
|
19 |
-
"Manage Module","Gestionar Módulo"
|
20 |
-
"Code","Código"
|
21 |
-
"Local Version","Versión local"
|
22 |
-
"Latest Version","La última versión"
|
23 |
-
"Version Status","Estado de la versión "
|
24 |
-
"Run","Ejecutar"
|
25 |
-
"Upgrade and Install/Reinstall %s %s (Data version %s)","Actualizar e instalar / reinstalar % s % s (versión de datos % s) "
|
26 |
-
"Install or Reinstall %s %s (Data version %s)","Instalar o reinstalar % s % s (% s Versión de datos)"
|
27 |
-
"Install %s %s","Instalar % s % s"
|
28 |
-
"Modules","Módulos"
|
29 |
-
"The module has been saved","El módulo se ha guardado"
|
30 |
-
"updated","Actualizado"
|
31 |
-
"outdated","Desactualizado"
|
32 |
-
"deprecated","Desaprobado"
|
33 |
-
"Identity key is required","Se necesita una clave de identidad"
|
34 |
-
"Response error: %s","Respuesta de error: % s"
|
35 |
-
"Sorry, try again in five minutes. Validation response parsing error: %s","Lo sentimos, inténtelo de nuevo en cinco minutos. Error de validación de análisis de respuesta: % s"
|
36 |
-
"Module code is required","Se requiere código de módulo"
|
37 |
-
"Domain name is required","Se requiere un nombre de dominio"
|
38 |
-
"Identity key is not valid","Clave de identidad no es válida"
|
39 |
-
"%s module is not found in purchase history","% s módulo no se encuentra en el historial de compras"
|
40 |
-
"%s activations limit reached. Please <a href=""%s"" title=""%s"" target=""_blank"">buy the product</a> to activate more domains","%s límite de activaciones alcanzadas. Por favor, <a href=""%s"" title=""%s"" target=""_blank"">compre el producto </a> para activar más dominios"
|
41 |
-
"Module ""%s"" is not activated for ""%s"" domain. Please, <a href=""%s"" title=""%s"" target=""_blank"">activate</a> it from our site. %s activations left","Módulo ""%s"" no está activo para el ""%s"" dominio. Por favor, <a href=""%s"" title=""%s"" target=""_blank"">activalo</a> desde nuestro sitio. %s activaciones que quedan"
|
42 |
-
"You are trying to use %s activation(s) for %s module. Only %s activations left. Please <a href=""%s"" title=""%s"">buy the product</a> to activate more domains","Estas tratando de usar %s activaciones para %s módulo. Sólo quedan %s activaciones. Por favor, <a href=""%s"" title=""%s"">compre el producto</a> para activar más dominios"
|
43 |
-
"Installed products","Productos instalados"
|
44 |
-
"Product promotions and discounts","Promociones de productos y descuentos"
|
45 |
-
"New Products","Nuevos Productos"
|
46 |
-
"Product updates","Actualizaciones de productos"
|
47 |
-
"Other","Otros"
|
48 |
-
"News to show in notification bar","Noticias para mostrar en la barra de notificación"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/fr_FR/TM_Core.csv
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
"Modules Information","Information sur les modules"
|
2 |
-
"Open Extension Page","Page d'extension"
|
3 |
-
"Please <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contact us</a>, if you have some issues with one of our modules.","Veuillez <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>nous contacter</a>, si vous rencontrez des problèmes avec nos modules"
|
4 |
-
"Troubleshooting","Dépannage"
|
5 |
-
"Changelog","Changer le login"
|
6 |
-
"Download Latest Version","Télécharger la dernière version"
|
7 |
-
"Download","Télécharger"
|
8 |
-
"Manage","Gérer"
|
9 |
-
"Upgrades are not installed","Les mises à jour ne sont pas installées"
|
10 |
-
"New version is available","Une nouvelle version est disponible"
|
11 |
-
"Upgrade Information","Information de mise à jour"
|
12 |
-
"Activate this checkbox, if you want to skip the upgrade operations","Activer cette boîte si vous ne souhaitez pas effectuer les opérations de mise à jour"
|
13 |
-
"Module data will be upgraded from %s to %s at the following stores","Les données de module vont être mises à jour de %s à %s dans les magasins suivants"
|
14 |
-
"Install and Reinstall Information","Information d'Installation et de Réinstallation"
|
15 |
-
"Identity Key","Clé d'identification"
|
16 |
-
"Get your identity key at <a href=""%s"" title=""%s"" target=""_blank"">%s</a>","Recevez votre clé d'idendification <a href=""%s"" title=""%s"" target=""_blank"">%s</a>"
|
17 |
-
"Select stores to install or reinstall module","Sélectionnez des magasins pour installer ou réinstaller le module"
|
18 |
-
"Module is already installed at following stores","Le module est déjà installé dans les magasins suivants"
|
19 |
-
"Manage Module","Gérer le module"
|
20 |
-
"Code","Code"
|
21 |
-
"Local Version","Version locale"
|
22 |
-
"Latest Version","Dernière version"
|
23 |
-
"Version Status","Statut de la version"
|
24 |
-
"Run","En marche"
|
25 |
-
"Upgrade and Install/Reinstall %s %s (Data version %s)","Mise à jour et Installer/Réinstallr %s %s (Version de données %s)"
|
26 |
-
"Install or Reinstall %s %s (Data version %s)","Installer ou Reinstaller %s %s (Verion de données %s)"
|
27 |
-
"Install %s %s","Installer %s %s"
|
28 |
-
"Modules","Modules"
|
29 |
-
"The module has been saved","Le module a été enregistré"
|
30 |
-
"updated","Mis à jour"
|
31 |
-
"outdated","Pas à jour"
|
32 |
-
"deprecated","Obsolète"
|
33 |
-
"Identity key is required","La clé d'identification est requise"
|
34 |
-
"Response error: %s","Réponse d'erreur: %s"
|
35 |
-
"Sorry, try again in five minutes. Validation response parsing error: %s","Veuillez réessayer dans 5 minutes. Validation du message d'analyse d'erreur: %s"
|
36 |
-
"Module code is required","Le code du module est requis"
|
37 |
-
"Domain name is required","Le nom de domaine est requis"
|
38 |
-
"Identity key is not valid","La clé d'identification n'est pas valide"
|
39 |
-
"%s module is not found in purchase history","%s le module n'a pas été trouvé dans l'historique d'achat"
|
40 |
-
"%s activations limit reached. Please <a href=""%s"" title=""%s"" target=""_blank"">buy the product</a> to activate more domains","%s Limite d'activations atteinte. Aller sur <a href=""%s"" title=""%s"" target=""_blank"">acheter le produit</a> pour activer plus de domaines"
|
41 |
-
"Module ""%s"" is not activated for ""%s"" domain. Please, <a href=""%s"" title=""%s"" target=""_blank"">activate</a> it from our site. %s activations left","Le module ""%s"" n'est pas activé pour le domaine ""%s"". Veuillez l' <a href=""%s"" title=""%s"" target=""_blank"">activer</a> depuis notre site. %s activations restantes."
|
42 |
-
"You are trying to use %s activation(s) for %s module. Only %s activations left. Please <a href=""%s"" title=""%s"">buy the product</a> to activate more domains","Vou essayer d'utiliser la/les activation/s %s pour le module %s . Seulement %s activations restantes. Veuillez <a href=""%s"" title=""%s"">acheter le produit</a> pour activer plus de domaines."
|
43 |
-
"Installed products","Produits installés"
|
44 |
-
"Product promotions and discounts","Promotions et remises sur les produits"
|
45 |
-
"New Products","Nouveaux produits"
|
46 |
-
"Product updates","Mises à jour du produit"
|
47 |
-
"Other","Autre"
|
48 |
-
"News to show in notification bar","Actualités à montrer dans la barre de notification"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/it_IT/TM_Core.csv
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
"Modules Information","Informazioni Modulo"
|
2 |
-
"Open Extension Page","Apri Pagina Estensione"
|
3 |
-
"Please <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contact us</a>, if you have some issues with one of our modules.","Per favore <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contattaci</a>, se hai dei problemi con uno dei nostri moduli."
|
4 |
-
"Troubleshooting","Risoluzione Problemi"
|
5 |
-
"Changelog","Changelog"
|
6 |
-
"Download Latest Version","Scarica Ultima Versione"
|
7 |
-
"Download","Download"
|
8 |
-
"Manage","Gestisci"
|
9 |
-
"Upgrades are not installed","Upgrade non installati"
|
10 |
-
"New version is available","Nuova versione disponibile"
|
11 |
-
"Upgrade Information","Informazioni Upgrade"
|
12 |
-
"Activate this checkbox, if you want to skip the upgrade operations","Attiva questa casella, se vuoi saltare le operazioni di upgrade"
|
13 |
-
"Module data will be upgraded from %s to %s at the following stores","Verrà effettuato l'upgrade dei moduli da %s a %s ai seguenti negozi"
|
14 |
-
"Install and Reinstall Information","Installa e Reinstalla Informazioni"
|
15 |
-
"Identity Key","Chiave Identità"
|
16 |
-
"Get your identity key at <a href=""%s"" title=""%s"" target=""_blank"">%s</a>","Ottieni la tua chiave identità a <a href=""%s"" title=""%s"" target=""_blank"">%s</a>"
|
17 |
-
"Select stores to install or reinstall module","Seleziona negozi per installare o reinstallare il modulo"
|
18 |
-
"Module is already installed at following stores","Modulo già installato nei seguenti negozi"
|
19 |
-
"Manage Module","Gestisci Modulo"
|
20 |
-
"Code","Codice"
|
21 |
-
"Local Version","Versione Locale"
|
22 |
-
"Latest Version","Ultima Versione"
|
23 |
-
"Version Status","Stato Versione"
|
24 |
-
"Run","Esegui"
|
25 |
-
"Upgrade and Install/Reinstall %s %s (Data version %s)","Fai l'Upgrade e Installa/Reinstalla %s %s (Versione Dati %s)"
|
26 |
-
"Install or Reinstall %s %s (Data version %s)","Installa o Reinstalla %s %s (Versione Dati %s)"
|
27 |
-
"Install %s %s","Installa %s %s"
|
28 |
-
"Modules","Moduli"
|
29 |
-
"The module has been saved","Il modulo è stato salvato"
|
30 |
-
"updated","aggiornato"
|
31 |
-
"outdated","obsoleto"
|
32 |
-
"deprecated","deprecato"
|
33 |
-
"Identity key is required","Chiave identità necessaria"
|
34 |
-
"Response error: %s","Errore Risposta: %s"
|
35 |
-
"Sorry, try again in five minutes. Validation response parsing error: %s","Spiacente, riprova tra cinque minuti. Errore parsing risposta validazione: %s"
|
36 |
-
"Module code is required","Codice modulo necessario"
|
37 |
-
"Domain name is required","Nome dominio richiesto"
|
38 |
-
"Identity key is not valid","Chiave identità non valida"
|
39 |
-
"%s module is not found in purchase history","Modulo %s non trovato nello storico acquisti"
|
40 |
-
"%s activations limit reached. Please <a href=""%s"" title=""%s"" target=""_blank"">buy the product</a> to activate more domains","limite attivazioni %s raggiunto. Per favore <a href=""%s"" title=""%s"" target=""_blank"">acquista il prodotto</a> per attivare più domini"
|
41 |
-
"Module ""%s"" is not activated for ""%s"" domain. Please, <a href=""%s"" title=""%s"" target=""_blank"">activate</a> it from our site. %s activations left","Modulo ""%s"" non attivato per il dominio ""%s"". Per favore, <a href=""%s"" title=""%s"" target=""_blank"">attivalo</a> dal nostro sito. %s attivazioni rimaste"
|
42 |
-
"You are trying to use %s activation(s) for %s module. Only %s activations left. Please <a href=""%s"" title=""%s"">buy the product</a> to activate more domains","Stai cercando di utilizzare %s attivazione/i per il modulo %s. Solo %s attivazioni rimaste. Per favore <a href=""%s"" title=""%s"">acquista il prodotto</a> per attivare più domini"
|
43 |
-
"Installed products","Prodotti installati"
|
44 |
-
"Product promotions and discounts","Promozioni prodotto e sconti"
|
45 |
-
"New Products","Nuovi Prodotti"
|
46 |
-
"Product updates","Aggiornamenti prodotto"
|
47 |
-
"Other","Altro"
|
48 |
-
"News to show in notification bar","News da mostrare nella barra notifiche"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/nl_NL/TM_Core.csv
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
"Modules Information","Modules Informatie"
|
2 |
-
"Open Extension Page","Open Extensie Pagina"
|
3 |
-
"Please <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contact us</a>, if you have some issues with one of our modules.","Gelieve <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contacteer ons</a>, indien je problemen hebt met een van onze modules."
|
4 |
-
"Troubleshooting","Probleemoplossing"
|
5 |
-
"Changelog","Changelog"
|
6 |
-
"Download Latest Version","Download de laatste versie"
|
7 |
-
"Download","Download"
|
8 |
-
"Manage","Beheer"
|
9 |
-
"Upgrades are not installed","Upgrades zijn niet geinstalleerd"
|
10 |
-
"New version is available","Nieuwe versie werd geinstalleerd"
|
11 |
-
"Upgrade Information","Upgrade Informatie"
|
12 |
-
"Activate this checkbox, if you want to skip the upgrade operations","Activeer dit vakje indien je deze upgrade handelingen wil overslaan"
|
13 |
-
"Module data will be upgraded from %s to %s at the following stores","data Module zal geupdatet worden %s to %s in de volgende winkels"
|
14 |
-
"Install and Reinstall Information","Installeer en herinstalleer Informatie"
|
15 |
-
"Identity Key","Identificatie Sleutel"
|
16 |
-
"Get your identity key at <a href=""%s"" title=""%s"" target=""_blank"">%s</a>","Krijg je identificatiesleutel bij <a href=""%s"" title=""%s"" target=""_blank"">%s</a>"
|
17 |
-
"Select stores to install or reinstall module","Selecteer winkels om de module te installeren of te herinstalleren"
|
18 |
-
"Module is already installed at following stores","Module is reeds geinstalleerd in de volgende winkels"
|
19 |
-
"Manage Module","Beheer Module"
|
20 |
-
"Code","Code"
|
21 |
-
"Local Version","Locale Versie"
|
22 |
-
"Latest Version","Laatste Versie"
|
23 |
-
"Version Status","Versie Status"
|
24 |
-
"Run","Run"
|
25 |
-
"Upgrade and Install/Reinstall %s %s (Data version %s)","Upgrade en Installeer/Herinstalleer %s %s (Data versie %s)"
|
26 |
-
"Install or Reinstall %s %s (Data version %s)","Installeer or Herinstalleer %s %s (Data versie %s)"
|
27 |
-
"Install %s %s","Installeer %s %s"
|
28 |
-
"Modules","Modules"
|
29 |
-
"The module has been saved","De module werd opgeslagen"
|
30 |
-
"updated","geupdated"
|
31 |
-
"outdated","verouderd"
|
32 |
-
"deprecated","deprecated"
|
33 |
-
"Identity key is required","Identiteits sleutel is vereist"
|
34 |
-
"Response error: %s","Respons fout: %s"
|
35 |
-
"Sorry, try again in five minutes. Validation response parsing error: %s","Sorry, probeer opnieuw binnen vijf minuten. Validatie respons parsing fout: %s"
|
36 |
-
"Module code is required","Module code is vereist"
|
37 |
-
"Domain name is required","Domein naam is vereist"
|
38 |
-
"Identity key is not valid","Identiteits sleutel is niet geldig"
|
39 |
-
"%s module is not found in purchase history","%s module word niet gevonden in de aankoop geschiedenis"
|
40 |
-
"%s activations limit reached. Please <a href=""%s"" title=""%s"" target=""_blank"">buy the product</a> to activate more domains","%s activatie limiet bereikt. Gelieve <a href=""%s"" title=""%s"" target=""_blank"">het product te kopen</a>om meer domeinen te activeren."
|
41 |
-
"Module ""%s"" is not activated for ""%s"" domain. Please, <a href=""%s"" title=""%s"" target=""_blank"">activate</a> it from our site. %s activations left","Module ""%s"" is niet geactiveerd voor domein ""%s"". Gelieve, <a href=""%s"" title=""%s"" target=""_blank"">te activeren</a> van onze site. %s activaties over"
|
42 |
-
"You are trying to use %s activation(s) for %s module. Only %s activations left. Please <a href=""%s"" title=""%s"">buy the product</a> to activate more domains","Je probeert %s activatie(s)te gebruiken voor %s module. Nog %s activaties over. Gelieve <a href=""%s"" title=""%s"">het product te kopen </a> om meer domeinen te activeren"
|
43 |
-
"Installed products","Geinstalleerde producten"
|
44 |
-
"Product promotions and discounts","Product promoties en kortingen"
|
45 |
-
"New Products","Nieuwe Producten"
|
46 |
-
"Product updates","Product updates"
|
47 |
-
"Other","Andere"
|
48 |
-
"News to show in notification bar","Nieuws te laten zien in de notificatiebalk"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/pt_PT/TM_Core.csv
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
"Modules Information","Informações de módulos"
|
2 |
-
"Open Extension Page","Página de extensão aberta"
|
3 |
-
"Please <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contact us</a>, if you have some issues with one of our modules.","Por favor <a href='http://templates-master.com/contacts' onclick='window.open(this.href); return false;'>contate-nos</a>, se você tiver algum problema com algum dos nossos môdulos."
|
4 |
-
"Troubleshooting","Solução de problemas"
|
5 |
-
"Changelog","Changelog"
|
6 |
-
"Download Latest Version","Baixe a versão mais recente"
|
7 |
-
"Download","Download"
|
8 |
-
"Manage","Gerenciar"
|
9 |
-
"Upgrades are not installed","Upgrades não estão instalados."
|
10 |
-
"New version is available","Nova versão está disponível"
|
11 |
-
"Upgrade Information","Atualizar informações"
|
12 |
-
"Activate this checkbox, if you want to skip the upgrade operations","Ativar esta opção, se você deseja ignorar as operações de atualização"
|
13 |
-
"Module data will be upgraded from %s to %s at the following stores","Dados de módulo serão atualizados de %s para %s nas seguintes lojas"
|
14 |
-
"Install and Reinstall Information","Instalar e reinstalar as informações"
|
15 |
-
"Identity Key","Chave de identidade"
|
16 |
-
"Get your identity key at <a href=""%s"" title=""%s"" target=""_blank"">%s</a>","Obter a sua chave de identidade em <a href=""%s"" title=""%s"" target=""_blank""> %s</a>"
|
17 |
-
"Select stores to install or reinstall module","Selecione lojas para instalar ou reinstalar o módulo"
|
18 |
-
"Module is already installed at following stores","Módulo já está instalado nas seguintes lojas"
|
19 |
-
"Manage Module","Gerenciar módulo"
|
20 |
-
"Code","Código"
|
21 |
-
"Local Version","Versão local"
|
22 |
-
"Latest Version","Versão mais recente"
|
23 |
-
"Version Status","Status da versão"
|
24 |
-
"Run","Executar"
|
25 |
-
"Upgrade and Install/Reinstall %s %s (Data version %s)","Atualização e instalação/reinstalação %s %s (dados versão %s)"
|
26 |
-
"Install or Reinstall %s %s (Data version %s)","Instalar ou reinstalar o %s %s (dados versão %s)"
|
27 |
-
"Install %s %s","Instalar o %s %s"
|
28 |
-
"Modules","Módulos"
|
29 |
-
"The module has been saved","O módulo foi salvo"
|
30 |
-
"updated","atualizado"
|
31 |
-
"outdated","desatualizado"
|
32 |
-
"deprecated","preterido"
|
33 |
-
"Identity key is required","Chave de identidade é necessária"
|
34 |
-
"Response error: %s","Erro de resposta: %s"
|
35 |
-
"Sorry, try again in five minutes. Validation response parsing error: %s","Desculpe, tente novamente em cinco minutos. Resposta de validação, análise de erro: %s"
|
36 |
-
"Module code is required","Código do módulo é necessário"
|
37 |
-
"Domain name is required","Nome de domínio é necessária"
|
38 |
-
"Identity key is not valid","Chave de identidade não está válida"
|
39 |
-
"%s module is not found in purchase history","módulo de %s não foi encontrado no histórico de compras"
|
40 |
-
"%s activations limit reached. Please <a href=""%s"" title=""%s"" target=""_blank"">buy the product</a> to activate more domains","atingido o limite de ativações de %s. Por favor, <a href=""%s"" title=""%s"" target=""_blank""> comprar o produto</a> para ativar mais domínios"
|
41 |
-
"Module ""%s"" is not activated for ""%s"" domain. Please, <a href=""%s"" title=""%s"" target=""_blank"">activate</a> it from our site. %s activations left","Módulo ""%s"" não está ativado para o domínio ""%s"". Por favor, <a href=""%s"" title=""%s"" target=""_blank""> ative</a> em nosso site. Ativações de %s restantes"
|
42 |
-
"You are trying to use %s activation(s) for %s module. Only %s activations left. Please <a href=""%s"" title=""%s"">buy the product</a> to activate more domains","Você está tentando usar ativação(ões) de %s para %s módulo. Única ativações de %s restantes. Por favor, <a href=""%s"" title=""%s""> comprar o produto</a> para ativar mais domínios"
|
43 |
-
"Installed products","Produtos instalados"
|
44 |
-
"Product promotions and discounts","Promoções de produto e descontos"
|
45 |
-
"New Products","Novos produtos"
|
46 |
-
"Product updates","Atualizações de produto"
|
47 |
-
"Other","Outros"
|
48 |
-
"News to show in notification bar","Notícias para mostrar na barra de notificação"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/lib/jquery/jquery-1.10.2.min.js
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
|
2 |
-
//@ sourceMappingURL=jquery-1.10.2.min.map
|
3 |
-
*/
|
4 |
-
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
|
5 |
-
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
|
6 |
-
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
|
|
|
|
|
|
|
|
|
|
|
|
js/lib/jquery/noconflict.js
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Magento
|
3 |
-
*
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
*
|
6 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
7 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
8 |
-
* It is also available through the world-wide-web at this URL:
|
9 |
-
* http://opensource.org/licenses/afl-3.0.php
|
10 |
-
* If you did not receive a copy of the license and are unable to
|
11 |
-
* obtain it through the world-wide-web, please send an email
|
12 |
-
* to license@magento.com so we can send you a copy immediately.
|
13 |
-
*
|
14 |
-
* DISCLAIMER
|
15 |
-
*
|
16 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
17 |
-
* versions in the future. If you wish to customize Magento for your
|
18 |
-
* needs please refer to http://www.magento.com for more information.
|
19 |
-
*
|
20 |
-
* @category Mage
|
21 |
-
* @package js
|
22 |
-
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
|
23 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
24 |
-
*/
|
25 |
-
|
26 |
-
// Avoid PrototypeJS conflicts, assign jQuery to $j instead of $
|
27 |
-
var $j = jQuery.noConflict();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/tm/adminhtml/core/window.js
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
TmcoreWindow = Class.create();
|
2 |
-
TmcoreWindow.prototype = {
|
3 |
-
|
4 |
-
current : $H({}),
|
5 |
-
blockWindow : null,
|
6 |
-
blockTitle : null,
|
7 |
-
blockContent : null,
|
8 |
-
blockMask : null,
|
9 |
-
windowHeight : null,
|
10 |
-
confirmedCurrentId: null,
|
11 |
-
|
12 |
-
initialize: function() {
|
13 |
-
this._initWindowElements();
|
14 |
-
},
|
15 |
-
|
16 |
-
_initWindowElements: function() {
|
17 |
-
this.blockWindow = $('tmcore_popup');
|
18 |
-
this.blockTitle = $('tmcore_popup_title');
|
19 |
-
this.blockContent = $('tmcore_popup_content');
|
20 |
-
this.blockMask = $('popup-window-mask');
|
21 |
-
this.windowHeight = $('html-body').getHeight();
|
22 |
-
},
|
23 |
-
|
24 |
-
onCloseBtn: function() {
|
25 |
-
this.hide();
|
26 |
-
return this;
|
27 |
-
},
|
28 |
-
|
29 |
-
update: function(content, title) {
|
30 |
-
this.blockContent.update(content);
|
31 |
-
if (title) {
|
32 |
-
this.blockTitle.update(title);
|
33 |
-
}
|
34 |
-
return this;
|
35 |
-
},
|
36 |
-
|
37 |
-
show: function() {
|
38 |
-
toggleSelectsUnderBlock(this.blockMask, false);
|
39 |
-
this.blockMask.setStyle({'height':this.windowHeight+'px'}).show();
|
40 |
-
this.blockWindow.setStyle({'marginTop':-this.blockWindow.getHeight()/2 + "px", 'display':'block'});
|
41 |
-
},
|
42 |
-
|
43 |
-
hide: function() {
|
44 |
-
toggleSelectsUnderBlock(this.blockMask, true);
|
45 |
-
this.blockMask.style.display = 'none';
|
46 |
-
this.blockWindow.style.display = 'none';
|
47 |
-
},
|
48 |
-
};
|
49 |
-
|
50 |
-
Event.observe(window, 'load', function() {
|
51 |
-
tmcoreWindow = new TmcoreWindow();
|
52 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>magento_classic_theme_free</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by/3.0/">Creative Commons License </license>
|
7 |
<channel>community</channel>
|
@@ -17,9 +17,9 @@
|
|
17 |
* Free updates included</description>
|
18 |
<notes>Magento Classic Free Theme</notes>
|
19 |
<authors><author><name>TemplatesMaster</name><user>TemplatesMaster</user><email>support@templates-master.com</email></author></authors>
|
20 |
-
<date>2016-08-
|
21 |
-
<time>12:
|
22 |
-
<contents><target name="magecommunity"><dir name="TM"><dir name="Core"><dir name="Block"><dir name="Adminhtml"><dir name="Module"><dir name="Grid"><dir name="Renderer"><file name="Actions.php" hash="94e4642076a653933f831d21587f0e0b"/><file name="VersionStatus.php" hash="f437375fa42bd6d5811e9ac357b25b92"/></dir></dir><file name="Grid.php" hash="6ed8add73540c00a9f00cb9519576e3e"/><dir name="Manage"><file name="Form.php" hash="445f9d528e6649634ef998676edca76d"/><dir name="Tab"><file name="Main.php" hash="d04eaf5d68e0a1fcc5c9f81f532f6ea4"/></dir><file name="Tabs.php" hash="b8b94209331a74de8f74b43096957b46"/></dir><file name="Manage.php" hash="de66455cf3b3c137d63600fcfb752c2e"/></dir><file name="Module.php" hash="5fc47720bda5db44a99ee33dc6682088"/><dir name="Support"><dir name="Edit"><dir name="Form"><dir name="Element"><dir name="Theard"><file name="Content.php" hash="a0df79a98bff0cf48b84683b13dcfc9e"/></dir><file name="Theard.php" hash="49aa528200fdfecbd73fa5678f579331"/></dir></dir><file name="Form.php" hash="7711ae3830edf2ac1f38c100f576b038"/><dir name="Tab"><file name="Main.php" hash="f95d31910171ac100ba51749dc9ffa1f"/></dir><file name="Tabs.php" hash="009b12547acf1771dceebc7db473be27"/></dir><file name="Edit.php" hash="0dabfacbf1b7a79e47686be6645ecb7d"/><dir name="List"><file name="Grid.php" hash="a01bb91dfa62d5b1415e7a413ab11339"/></dir><file name="List.php" hash="8d059add18b516d9e3bc634f570437ea"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Notification.php" hash="6c06aec0e04520f2dffe9a8ec580d545"/><file name="Size.php" hash="3516ca14bea4f21ee3805219ff128b8a"/></dir><dir name="Fieldset"><dir name="Modules"><file name="List.php" hash="e4fcb7c10f265a111e754d2776afd9a8"/></dir><file name="Troubleshooting.php" hash="9516baca7da47dffc4c70123260c0ae8"/></dir></dir></dir></dir><dir name="Widget"><dir name="Form"><dir name="Element"><dir name="Wysiwyg"><file name="Content.php" hash="cc2b4fa2903d8eff9fa3833462af2f31"/></dir><file name="Wysiwyg.php" hash="a1dbb1fa4d338f9e5f7d6b3d73064179"/></dir><dir name="Renderer"><file name="Wysiwyg.php" hash="853eaaf1f404379b7f288538e1165db5"/></dir></dir></dir></dir><dir name="Cms"><file name="Block.php" hash="c10f566da9bc88653ce54176819d754d"/></dir></dir><dir name="Helper"><file name="Data.php" hash="77bfd46c4405cbc4907feafce196280c"/><file name="Debug.php" hash="54d8b318e43d182ecb43bb850f2cdbd8"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Notification"><file name="Channel.php" hash="a617b0f2a905bc28d2946a23e68ede5f"/></dir></dir></dir></dir></dir><dir name="Module"><file name="MessageLogger.php" hash="23ae476aa7a9ef6379ffe6953e869e0e"/><file name="Upgrade.php" hash="c9872fe30623ab511577ea4d98724ca5"/></dir><file name="Module.php" hash="c507995abec692b3f38f66a65b4d5c44"/><dir name="Notification"><file name="Feed.php" hash="f148f51380e489e0aee2fc82d780fffa"/></dir><dir name="Oauth"><file name="Client.php" hash="b6ccf069f5b59d74ce09e50c3a83b61d"/></dir><file name="Observer.php" hash="02539a75bbf4762a2d09944f8bbd58d9"/><dir name="Resource"><dir name="Module"><file name="AdminGridCollection.php" hash="fb9642aff21c3c833195aebf4cf65644"/><file name="Collection.php" hash="a6fe79d80f1e7039abd51010e5e1ec4c"/><file name="MergedCollection.php" hash="be79fb45e9d1f463d29118faaa320434"/><file name="RemoteCollection.php" hash="bd380a11d95cc75cdbfb2f5a6d46108f"/></dir><file name="Module.php" hash="3338136f015ec2ef531214c3430fa087"/><dir name="Support"><file name="Collection.php" hash="ed4112064055536e5eea998c5a2aecd9"/></dir></dir><file name="Timer.php" hash="bab5a57d3b5a1d2f67aa1c76d1463392"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Tmcore"><file name="ModuleController.php" hash="0bd870e61b0babbcb1470731856d6952"/><file name="SupportController.php" hash="bf983c1bf8155d455b07b55a9af71046"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="aa149f26dedd303c22173cf80a87bbc9"/><file name="config.xml" hash="75007c1739f03f4ad6b50abae073dd3b"/><file name="system.xml" hash="f7f906b1630acefa1aeb9600277584d6"/></dir><dir name="sql"><dir name="tm_core_setup"><file name="mysql4-install-1.0.0.php" hash="aa545a4cb0dd65a6af6e58f3a3a73e69"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="26da85d76c4ad2469e3723f16154234f"/></dir></dir></dir><dir name="CatalogConfigurableSwatches"><dir name="Helper"><file name="Data.php" hash="c7125d67970907480c323520cc7328cc"/></dir><dir name="etc"><file name="config.xml" hash="5895feef69c3e83c04aad5052322adc7"/></dir></dir></dir></target><target name="magelocal"><dir name="TM"><dir name="Templatef002"><dir name="etc"><file name="config.xml" hash="ec55d6c47c14b4b248e0c3843723ee60"/></dir><dir name="upgrades"><file name="2.0.0.php" hash="f8c88b9794a80ac373f1faa7abe73111"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TM_Core.xml" hash="432801c3e16eb2ffa4d48309024617bb"/><file name="TM_Templatef002.xml" hash="ca791a704bc3439f362b281accd2266e"/><file name="TM_CatalogConfigurableSwatches.xml" hash="60b52393093803df52cde2d71191a129"/></dir></target><target name="magedesign"><dir name="default"><dir name="default"><dir name="layout"><file name="tmcore.xml" hash=""/></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="tmcore.xml" hash="249d8fe0c9ec19ff413eb93ac428739e"/></dir><dir name="template"><dir name="tmcore"><dir name="ticket"><dir name="edit"><dir name="form"><dir name="element"><dir name="theard"><file name="content.phtml" hash="8130a426137cfce127e47278656d9152"/></dir></dir></dir></dir></dir><file name="popup.phtml" hash="2f9c258f2010fabe08f8737781562c78"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="tm"><file name="configurableswatches.xml" hash="c89f7a2b21f4a813a7e6725ba6033328"/></dir></dir><dir name="template"><dir name="tm"><dir name="configurableswatches"><dir name="catalog"><dir name="media"><file name="js.phtml" hash="923f88a865e9686a389420a98808906a"/></dir><dir name="product"><dir name="view"><dir name="type"><dir name="configurable"><file name="swatch-js.phtml" hash="f3aee013428bb8cb51d223fb9b79362a"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="f002"><dir name="default"><dir name="layout"><file name="configurableswatches.xml" hash="e3554c2a0d8d3a935222e3f6a9dd82ee"/><file name="local.xml" hash="9f3e31ea1912b53621c887a91dbb2fba"/></dir><dir name="locale"><dir name="en_US"><file name="translate.csv" hash="0e23b6d3bf659eaaae8504b2935d3925"/></dir></dir><dir name="template"><dir name="callouts"><file name="left_col.phtml" hash="afa7e99b528d9f3a7b4f4f69cd60da05"/><file name="right_col.phtml" hash="afa7e99b528d9f3a7b4f4f69cd60da05"/></dir><dir name="catalog"><dir name="layer"><file name="state.phtml" hash="b75ea5d4ccef37d801ec5eea18aef464"/></dir><dir name="navigation"><file name="sidebar.phtml" hash="9f49ad7f1477ad60103acfc961081319"/><file name="top.phtml" hash="0269ec79d5d8ed1df3e5caaf0436be17"/></dir><dir name="product"><file name="list.phtml" hash="dd303654c1801b454dc5ebc6b384c72b"/><file name="new.phtml" hash="f87123101372eb2abc2e36fc849cc911"/><dir name="view"><file name="media.phtml" hash="eef565709c970085d2b5a57d89ab6479"/><dir name="type"><dir name="options"><file name="configurable.phtml" hash="a7aae1fd87b8c0901e25e0b73a43ba68"/></dir></dir></dir><file name="view.phtml" hash="fb81a09e2abb2dd51191f96f51dad1ed"/></dir></dir><dir name="catalogsearch"><file name="form.mini.phtml" hash="7071376b4a8c5e4fea76176fcc8b7f6b"/></dir><dir name="checkout"><dir name="cart"><file name="header.cart.phtml" hash="d4cd95229a877620518153d818274d04"/></dir></dir><dir name="configurableswatches"><dir name="catalog"><dir name="layer"><dir name="filter"><file name="swatches.phtml" hash="2f96ff1d7eb48fbc260e489c047b4bc7"/></dir><dir name="state"><file name="swatch.phtml" hash="e696b74ae734670552bcc5eb308586ef"/></dir></dir><dir name="media"><file name="js.phtml" hash="8820d9d4fd527c683b40411601f73c72"/></dir><dir name="product"><dir name="list"><file name="swatches.phtml" hash="b5dd16faa22d4c248ce9c237918df1c9"/></dir><dir name="view"><dir name="type"><dir name="configurable"><file name="swatch-js.phtml" hash="ba64818ebe7d00c7cc6aba106f72fe39"/></dir><dir name="options"><dir name="configurable"><file name="swatches.phtml" hash="25b9919bbdbaf300d44b3425f4af5925"/></dir></dir></dir></dir></dir></dir></dir><dir name="page"><file name="1column.phtml" hash="78f62e10194fdcac75c2064fefd5e803"/><file name="2columns-left.phtml" hash="fd954d1cbcd73c0577a94b49a5749ae3"/><file name="2columns-right.phtml" hash="02ec8045f3748eaafca81e6000f3ed84"/><file name="3columns.phtml" hash="2850f875dd92b0dbebdc708ac5014324"/><dir name="html"><file name="footer.phtml" hash="429ebe4960987a54844f4c1048b0b70f"/><file name="header.phtml" hash="94b53a77fc915c7957810358dcfc5965"/><file name="topmenu.phtml" hash="4d913af283035c49b5209194c1e5d57f"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="TM_Core.csv" hash="afd8a7597ed0531c6a84ad05cb5205a5"/></dir><dir name="es_ES"><file name="TM_Core.csv" hash="817aa9cd9985b5ed81c3aadb62a26d7a"/></dir><dir name="fr_FR"><file name="TM_Core.csv" hash="4d85a7e25a16948ea77d459f93894e8d"/></dir><dir name="it_IT"><file name="TM_Core.csv" hash="d033d060e066d41af444e830fdc27504"/></dir><dir name="nl_NL"><file name="TM_Core.csv" hash="9ef1bce86d8a0d95952ba77c5fb1f3ef"/></dir><dir name="pt_PT"><file name="TM_Core.csv" hash="ec345fcb6370864537f721499d63ab56"/></dir></target><target name="mage"><dir name="js"><dir name="tm"><dir name="adminhtml"><dir name="core"><file name="window.js" hash="5cd7bc7e3432c98e95c0ddbe459cd045"/></dir></dir></dir><dir name="lib"><dir name="jquery"><file name="jquery-1.10.2.min.js" hash="841dc30647f93349b7d8ef61deebe411"/><file name="noconflict.js" hash="12f820da0f5ba19abfb4f5fc270bb62c"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="tm"><dir><dir name="addressautocomplete"><dir name="js"><file name="address-autocomplete.js" hash="fb01d46768d056f6a9364b16a36ddb23"/></dir></dir><dir name="configurableswatches"><dir name="css"><file name="swatches.css" hash="6c7a39b6efa9b95fa5e9bbb23b4dfd1b"/></dir><dir name="images"><file name="bg_x.png" hash="c321c67f6929326129426c9e83207ea3"/></dir><dir name="js"><file name="app.js" hash="bc513fafba066a7b259153340f0e66a4"/></dir></dir><dir name="downloadable"><dir name="css"><file name="main.css" hash="ca6d8afd494d75b21025d22b2327a76e"/></dir><dir name="images"><file name="add.png" hash="2876f33adf9b8745ebd960565a9a6a8d"/><file name="subtract.png" hash="baf44fb7ebb7bdf0e2cb1d6726b44a9d"/></dir></dir><dir name="easybanner"><dir name="css"><file name="easybanner.css" hash="23951063feb7668f0215c989f1887e9d"/></dir><dir name="js"><file name="easybanner.js" hash="0bcc9e4756447a87e9d3e0270832f54c"/></dir></dir><dir name="easyflags"><dir name="css"><file name="easyflags.css" hash="e4f858a310ec560053b47a492c55928f"/></dir></dir><dir name="easyslide"><dir name="css"><file name="easyslide.css" hash="28b521f0e7aaeb44e93d5360388e1d60"/></dir><dir name="images"><file name="control.png" hash="c3b76aec5e5fbc837799127d5a0d16ec"/><file name="dark.png" hash="34dd3f1ce491f18a8237ef81b95a9593"/><file name="light.png" hash="90e696d9228d7ffd6758dbe15664e48f"/></dir><dir name="js"><file name="easyslide.js" hash="6ad21d93f1bda930ca846ad3688eef88"/><file name="jquery-1.8.2.min.js" hash="cfa9051cc0b05eb519f1e16b2a6645d7"/></dir><dir name="nivo"><file name="jquery.nivo.slider.js" hash="2376c698bb566fddcb6b680a98d42dc3"/><file name="nivo-slider.css" hash="51b2916fcb7a9f89a21b70e0c7688a59"/><dir name="themes"><dir name="bar"><file name="arrows.png" hash="09b24f1a73b9eeb5cc62db7ec0b60bca"/><file name="bar.css" hash="58f95f303855cd8bea1a1aaab6d730c8"/><file name="bullets.png" hash="acc66fce35a54d815a3aa3fd573cdd90"/><file name="loading.gif" hash="dd6b7b0bf5c3af22499abc0a9ee1e1b2"/></dir><dir name="dark"><file name="arrows.png" hash="4d2ed50facf20fdc9206e65be96097d6"/><file name="bullets.png" hash="208e649ac5a7e0daf2023e30d92f675e"/><file name="dark.css" hash="db452a5ecbe16d40078f5c0f439e6f05"/><file name="loading.gif" hash="dd6b7b0bf5c3af22499abc0a9ee1e1b2"/></dir><dir name="default"><file name="arrows.png" hash="09b24f1a73b9eeb5cc62db7ec0b60bca"/><file name="bullets.png" hash="acc66fce35a54d815a3aa3fd573cdd90"/><file name="default.css" hash="d66e12b55df8510fe05b9d4fb1aaaf07"/><file name="loading.gif" hash="dd6b7b0bf5c3af22499abc0a9ee1e1b2"/></dir><dir name="light"><file name="arrows.png" hash="246c707d1243339b740fefe80a76fd00"/><file name="bullets.png" hash="8be81f8814c2ba9b2ab77264d3132aef"/><file name="light.css" hash="eede2daf7c7aec7a4e444b60a7ce3a89"/><file name="loading.gif" hash="dd6b7b0bf5c3af22499abc0a9ee1e1b2"/></dir></dir></dir></dir><dir name="firecheckout"><dir name="css"><file name="firecheckout.css" hash="2fd05336fc535634b58f121fa070b4f1"/><file name="onecolumn.css" hash="e6f561b403e95bf675725e82e0a85c55"/></dir><dir name="images"><file name="ajax-loader.gif" hash="b256d80f54c1415d7a6a6fdec39769f4"/><file name="ajax-loader@2x.gif" hash="a957f77e3e50d836bc70eec98f4bb6ef"/><file name="sprite.png" hash="f1fdc92f07d242c749088aafac56c93a"/></dir><dir name="js"><dir name="components"><file name="address-verification.js" hash="b2eeb077c94ca5db15340fee0a4d16b0"/><file name="ajax.js" hash="9116b0afaba7dae4a996c4a2b8140eef"/><file name="cart.js" hash="96eef32b31ad334b007d8946ccff777e"/><file name="delivery-date.js" hash="8edcac54c93d0f82939629a37e9926f3"/><file name="dependent-fields.js" hash="9c9a452e3446e7405da29832fa1a440c"/><file name="housenumber.js" hash="f64526b8f2e43adbc8f1ba2507e12a3e"/><file name="messenger.js" hash="76c2fb9d962b81249d1717b74601c8c2"/><file name="order-review.js" hash="d27515ae7e843bff9bdc2fe76581082e"/><file name="taxvat.js" hash="24bd46ed687d8c86fa7d1e997145c4a0"/><file name="window.js" hash="fac6ab6ebdcc32b4b51d38601b58be2c"/></dir><file name="firecheckout-compatibility.js" hash="b2cc00797f7a640acac80bb42f992f1c"/><file name="firecheckout.js" hash="92581b8b3578af7c13f87b9b182ed801"/><dir name="integration"><file name="checkoutapi_chargepayment.js" hash="403a9531c1cf4ede5476cfe20b3e7e91"/><file name="cryozonic_stripe.js" hash="bc1703804559859d6aec421fb8325d91"/><file name="dhl_account.js" hash="c672fbe7dc471feb0ca31a7b9bcc1f02"/><file name="ebizmarts_sagepaysuite.js" hash="35b715932f09fa2e50382ecd0ba17878"/><file name="mage_molpayseamless.js" hash="14d6c2bec631d8ea0bacae4dac187eb1"/><file name="mymonki_ship2pay.js" hash="134b7f29adf754dd0277db3899bb08e4"/><file name="sfc_autoship.js" hash="d3e994c9f94df9c46ff69eb282fc6e85"/><file name="webshopapps_calendarbase.js" hash="013d7167415411d8abcc07bac5723ebd"/><file name="ydral_correos.js" hash="dad82c155695bdd55707defbb2d23cb0"/></dir><file name="onecolumn.js" hash="412df6ed56002e476ce28f954607c005"/><file name="prototype.sticky-kit.js" hash="919dbcbb6d13c9485bd20983c273a65b"/></dir></dir><dir name="orderattachment"><dir name="css"><file name="orderattachment.css" hash="470d7edb201524bef1859b6f81b2bba4"/></dir></dir><dir name="quickshopping"><dir name="css"><file name="quickshopping.css" hash="d8fd01a6019b49619211a7cd3292f182"/></dir><dir name="images"><file name="ajax-loading.gif" hash="73e57937304d89f251e7e540a24b095a"/><file name="black-70.png" hash="703c659e4bf563a05c6338a1727e006c"/><file name="black.png" hash="1cf6a7fbea37bc350912f2d2094c2813"/><file name="controls.gif" hash="403a1c6c817257232a20d046df8c641e"/></dir><dir name="js"><file name="configurableswatches.js" hash="c5afd574ce37a3f2d2d219d1c18b671d"/><file name="quickshopping.button.js" hash="5627309768dcc6da582de3ced29eb924"/><file name="quickshopping.window.js" hash="1131e76a3095442baa41223df5b69b92"/></dir></dir></dir></dir></dir></dir><dir name="f002"><dir name="default"><dir name="css"><file name="custom.css" hash="f11942e968b9872c3068b90c7239d249"/><file name="print.css" hash="4fa35816e1a2854c83b8638fbd3bd313"/><file name="styles-ie.css" hash="6e06a206e166f6c1a0016c3012b2d4f5"/><file name="styles.css" hash="25e5b25a3d4742b05fad1c390d9d58d4"/><file name="theme.css" hash="5900a389a7b6461ad95260ef05db2c58"/></dir><dir name="images"><file name="account_nav_on_bg.gif" hash="ad485137604a18b984df7742e1095f7f"/><file name="anext.gif" hash="74dc5b64ac39457381e5c848890bd610"/><file name="aplay.gif" hash="5885536825fc9d80edf15925b3c0fffe"/><file name="aprev.gif" hash="b93972d5789ae32996d2a5c672d2548b"/><file name="astop.gif" hash="35c9a2cffb7c7de05706caafa0e8b46d"/><file name="bkg_block-actions.gif" hash="da2970eac0a22c850b19ee3680475d51"/><file name="bkg_block-currency.gif" hash="bfaad1b64557c05ad6f4b124ad3d3532"/><file name="bkg_block-layered-dd.gif" hash="6ae6f8184e87de496fb74eeec65737c9"/><file name="bkg_block-layered-dt.gif" hash="ba8229068657b80f2c42111c5a1a307e"/><file name="bkg_block-layered-label.gif" hash="14687dfa3921cfd12d2149c1497d9765"/><file name="bkg_block-layered-li.gif" hash="753ebb76a4fc2b5b6915c536fcf4d487"/><file name="bkg_block-layered-title.gif" hash="c92e29b30af7abf4e0bc3f714a246f55"/><file name="bkg_block-layered1.gif" hash="607167f198572e83a0e728b6b9383a70"/><file name="bkg_block-title-account.gif" hash="a64f1df5a7e3d0f6a58b017f74311cb1"/><file name="bkg_block-title.gif" hash="f8c1f130ad69464fe7aff2f589b2ec75"/><file name="bkg_checkout.gif" hash="11258fe49feff5513c9608f2ea486776"/><file name="bkg_collapse-gm.gif" hash="37418f23e65006dcfde07ce9b249e057"/><file name="bkg_collapse.gif" hash="2333c68e38163ed4656da82b9bcf362b"/><file name="bkg_divider1.gif" hash="260ebae91ffb1b7c663906b29a069925"/><file name="bkg_grid.gif" hash="a6f64fedbac51fb1b86184cd488cc4e6"/><file name="bkg_pipe1.gif" hash="7852290f6a443000ead96b8cec5cd7c7"/><file name="bkg_pipe2.gif" hash="7da64eefaf4da3855ab6ee76dbced0c2"/><file name="bkg_pipe3.gif" hash="11bfac1e590f0c77fb12f37d7f05cd3c"/><file name="bkg_products-grid3.gif" hash="e8fbc47f9fec21d6f5c3422523f3854e"/><file name="bkg_rating.gif" hash="0a8777c815350ddf1e316a537ad0c335"/><file name="bkg_sp-methods.gif" hash="17d68b5449adaa87dafc62ae0afa1b9a"/><file name="box-content-bg.gif" hash="f5344140a3a9ad4267687b8ec40c5751"/><file name="box-header-bg.gif" hash="e1e109e8f6bfc2f2ccef04769553c60c"/><file name="btn_edit.gif" hash="df3565eb4e4d0dc578201df60de54b47"/><file name="btn_gm-close.gif" hash="346e26eece27449a2f224aef76ae372e"/><file name="btn_google_checkout.gif" hash="843d75249ce05b5d87ca5419f37b1c3b"/><file name="btn_paypal_checkout.gif" hash="6edd61270b7b5632eafad10557129114"/><file name="btn_place_order.gif" hash="d35219f86ae2c983ee1a31557e37b612"/><file name="btn_previous.gif" hash="63473a1520a73bb0c9b47b685d17cd21"/><file name="btn_proceed_to_checkout.gif" hash="4daac687b514fecfd1068539500ac3d7"/><file name="btn_proceed_to_checkout.png" hash="a65868bfdf37e6c9bc8651fc402c43b3"/><file name="btn_proceed_to_checkout_bg.gif" hash="d1f61b4cd9db50e0322d23b291f1f4c4"/><file name="btn_proceed_to_checkout_dis.gif" hash="9e152c01d5d88f690dc52cb62428f3b6"/><file name="btn_proceed_to_checkout_rad.gif" hash="ee0f96c5b22aab80149238c210d1bf95"/><file name="btn_remove.gif" hash="6182e723aa2a253dc6cf334a3dfaaa84"/><file name="btn_remove2.gif" hash="234bddc4c5878c5ef16407a944824236"/><file name="btn_search.gif" hash="2d93b43c0a1c1182358677661e26a978"/><file name="btn_trash.gif" hash="bcb22f558a0eb32243a2a36645189e9f"/><file name="btn_window_close.gif" hash="c83f3cbbb2aedfc580dff78d5cfb63ed"/><file name="calendar.gif" hash="b1468e5239504974c689eea5d93f86d4"/><file name="cart-toggle.gif" hash="9298f0e16854c63b4caf8ba1e5918a55"/><file name="content-bg.gif" hash="82305a331b1135c5d19f10753376b849"/><file name="cvv.gif" hash="ed0f392004a405466291071a760b285d"/><file name="cvv.jpg" hash="e27210d810bbab732935d9410936ef87"/><file name="error_msg_icon.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="fam_book_open.png" hash="0ba89b9fbe7e88d4c6896ed0a1f495aa"/><file name="footer-bg.gif" hash="82bf882dcd7f46b6f0835e41a006e9bc"/><file name="gradient-blue.gif" hash="e1e462165458d74b3ee2d3bc9dfc2b3b"/><file name="gradient-gray.gif" hash="7e9e178c812f874ae9204eacc980e132"/><file name="grid.gif" hash="16b43ba34d6665e91b104b084b299f74"/><file name="grid.png" hash="8ac3b1bea5765f490538c9a9b6429294"/><file name="h_separator.gif" hash="517e50e00baf219edd50a7cd5eda7a89"/><file name="header-bg.gif" hash="28cec9ba53792ad75b9959aeaae69c55"/><file name="i_arrow-top.gif" hash="3dbb0584e8eb1d96cc3d3c40c17d7aaf"/><file name="i_asc_arrow.gif" hash="40aa554212d6a1f60593c27d78d85fa3"/><file name="i_availability_only.gif" hash="bca1f00a50864171ad98317b778e869c"/><file name="i_availability_only_arrow.gif" hash="0cf32b72fefc94b89b74e4f3f02c2e93"/><file name="i_block-cart.gif" hash="cc19e21f9c89b70cc10354ff588ca8ab"/><file name="i_block-currency.gif" hash="643024bcae5ece554fdbbc041aeb297c"/><file name="i_block-list.gif" hash="fe8424127ecbe4b0d893bcf6f253dc1a"/><file name="i_block-poll.gif" hash="52d778dddbf48b8d04226bee9370a7ef"/><file name="i_block-related.gif" hash="4e277173b6372b1a90b0f19e0388ad54"/><file name="i_block-subscribe.gif" hash="9e5fee06a543742045118a95f2debcb8"/><file name="i_block-tags.gif" hash="67d1255c2c3e9ed1a5c845f8d4e4a3ba"/><file name="i_block-viewed.gif" hash="67d1255c2c3e9ed1a5c845f8d4e4a3ba"/><file name="i_block-wishlist.gif" hash="8f8cda89ca20ba4a9b2f8c91f73fdff9"/><file name="i_desc_arrow.gif" hash="92fd194bfae4ce5ae3354e1e47d7ac7d"/><file name="i_discount.gif" hash="908d44da90de5e54185764d093bbdb77"/><file name="i_folder-table.gif" hash="bf006ddb591d8ac95d2e895bf2fdbc8d"/><file name="i_ma-info.gif" hash="91259557447ee80eb1110fe0c85cb3b5"/><file name="i_ma-reviews.gif" hash="859c97695ec396c0b284a0c3c7c416ad"/><file name="i_ma-tags.gif" hash="1e83e3b0b677c92b3aa8a252268f7b86"/><file name="i_msg-error.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="i_msg-note.gif" hash="e774ee481a2820789c1a77112377c4e0"/><file name="i_msg-success.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/><file name="i_notice.gif" hash="ebd56dc80b8346e10e93628bc0e6c372"/><file name="i_page1.gif" hash="704f7d4eccbdf9cabbad7770f18856ff"/><file name="i_page2.gif" hash="57a04ca584e05e28dc94c7e68f0af62e"/><file name="i_pager-next.gif" hash="ed4d6640624c2b6edeab4c212314bd6d"/><file name="i_pager-prev.gif" hash="75973b020105dccbaf34e49d7852552d"/><file name="i_print.gif" hash="0aed138181495642e9ab29e55d194d40"/><file name="i_rss-big.png" hash="6cf70e7c52a3f3d7b833ccadb041a555"/><file name="i_rss.gif" hash="e5bbc388d818c142868b4a1df0b48793"/><file name="i_search_criteria.gif" hash="cf67b9cc5c311ae3f99e68cd29ae17be"/><file name="i_shipping.gif" hash="91a0d2cc2eb2391f90ec8a75c04b3183"/><file name="i_tag_add.gif" hash="a736baa992aa55b6fb71e8742a04dc82"/><file name="i_tier.gif" hash="c5189e25afeb7c1a8c4902a42832593e"/><file name="i_type_grid.gif" hash="a1e5d8ac36fb2891ea16e729b95c552c"/><file name="i_type_list.gif" hash="61333d383ec142b8d270abe77324aa5d"/><file name="icon-cart.gif" hash="738eb5bb393ed6842e3f99ab78a3d7f7"/><file name="icon-zoom.gif" hash="6dbe63495b9ce6936e7a589c20d72a34"/><file name="icon_opc_back.gif" hash="3dbb0584e8eb1d96cc3d3c40c17d7aaf"/><file name="icon_page_white.gif" hash="704f7d4eccbdf9cabbad7770f18856ff"/><file name="icon_page_white_text.gif" hash="57a04ca584e05e28dc94c7e68f0af62e"/><file name="list_remove_btn.gif" hash="6182e723aa2a253dc6cf334a3dfaaa84"/><file name="listing_type_grid.gif" hash="a1e5d8ac36fb2891ea16e729b95c552c"/><file name="listing_type_list.gif" hash="61333d383ec142b8d270abe77324aa5d"/><file name="logo.gif" hash="34a45af9f33f00b6564f0675ac3b8276"/><file name="magnifier_handle.gif" hash="238fbdd7959f517db11c6f57ee4daaf4"/><file name="map_popup_arrow.gif" hash="6383b40a9e7bd3c95260bef4fbb1b163"/><dir name="media"><file name="col_left_callout-1.jpg" hash="4e0be0ae83843c4f8abc9f33715e22cf"/><file name="col_left_callout-2.jpg" hash="aa353fb15d34615f28c4da9363b7f196"/></dir><file name="narrow_by_li_by.gif" hash="14687dfa3921cfd12d2149c1497d9765"/><file name="narrow_by_set.gif" hash="ba8229068657b80f2c42111c5a1a307e"/><file name="nav-item-bg.gif" hash="9a42cafa1d4c15c0a731003325b23e6f"/><file name="navigation-bg.gif" hash="efa2bc5607c5db78310586fd1a5ae313"/><file name="navigation-div.gif" hash="3f95ca13f1d1c446434a0a65cbe63369"/><file name="note_msg_icon.gif" hash="e774ee481a2820789c1a77112377c4e0"/><file name="np_cart_thumb.gif" hash="e9fdd943e0947e15f0638506f477e358"/><file name="np_more_img.gif" hash="ace357bfe3e81ffb62137cd5b25ae5e1"/><file name="np_product_main.gif" hash="d0cccda76de50efa025215ce85dacb1c"/><file name="np_thumb.gif" hash="e46270c89358ecc8341d1565c14644b8"/><file name="np_thumb2.gif" hash="8502866cdabc5c74aca7d7bd32a06a03"/><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="pager_arrow_left.gif" hash="75973b020105dccbaf34e49d7852552d"/><file name="pager_arrow_right.gif" hash="ed4d6640624c2b6edeab4c212314bd6d"/><file name="payments.gif" hash="7db8b7d9800fdfbbbe5b9c3f8eeeb79c"/><file name="pipe-gray.gif" hash="0d85757f7ac118d5fd721e4ff6c09085"/><file name="pipe-top_toolbar.gif" hash="ec7d979128f080a8ba9a96c50492101f"/><file name="place_order_bg.gif" hash="0e6bdf6280452a101c1924ce68669a2e"/><file name="place_order_container_bg.gif" hash="8eebd513ac0d9c02cc566cff649799ce"/><file name="product_collateral_bg.gif" hash="1d4d6b22e5108aefae52709d3934f397"/><file name="product_essential_bg.gif" hash="2ab47f5c01447a7998118da5872f14b8"/><file name="product_rating_blank_star.gif" hash="5e20a299c0ff16168be38b6dde580eda"/><file name="product_rating_full_star.gif" hash="dd5aae332178d928a7f49dea7691b5f6"/><file name="product_zoom_overlay_magnif.gif" hash="83834893e162221d6d9257fe67847370"/><file name="search_btn.gif" hash="5872f36846222a3315f5d0f666dd6687"/><file name="search_criteria.gif" hash="cf67b9cc5c311ae3f99e68cd29ae17be"/><file name="search_form_button.gif" hash="5a5b6d2825d7a730904836e9bd4618eb"/><file name="slider1.jpg" hash="55a8ad759d0b0728f5170e7004342715"/><file name="slider2.jpg" hash="b2586ffefa12895e12f47687d8934970"/><file name="slider3.jpg" hash="7eeadfb4345460f010dd3a99ee8ed7b7"/><file name="slider4.jpg" hash="9a74e57abea85318f7c395f58cafbf07"/><file name="slider_bg.gif" hash="87bc1b46d87de4f6252c7216216627c3"/><file name="slider_btn_zoom_in.gif" hash="ef0fc67f77f30827ee67f4e744b60781"/><file name="slider_btn_zoom_out.gif" hash="68b3d1c28dc5aec4f6b64d70a6996b6f"/><file name="sort_asc_arrow.gif" hash="40aa554212d6a1f60593c27d78d85fa3"/><file name="sort_desc_arrow.gif" hash="92fd194bfae4ce5ae3354e1e47d7ac7d"/><file name="spacer.gif" hash="df3e567d6f16d040326c7a0ea29a4f41"/><file name="success_msg_icon.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/><file name="trans.png" hash="ca23069433bf4e4e96eb436ae035800c"/><file name="validation_advice_bg.gif" hash="b85432906de8985a8b14eeb2dc652d3c"/><file name="white_pipe.gif" hash="e60a61a6985774108f370a433b09f175"/></dir><dir name="js"><dir name="configurableswatches"><file name="product-media.js" hash="85c2a93413ab6ccd6399b300034f9944"/><file name="swatches-list.js" hash="ff35f4e497834fa25d9f1124b412f65a"/><file name="swatches-product.js" hash="87ad1b1fbaffecfba810a70c46f137e4"/></dir><file name="dropdown.js" hash="436b1bd77db6fdb1c206b874cf46dc45"/><file name="glider.js" hash="ff0c6d92699db1f3474d96510865a6e3"/><dir name="lib"><file name="imagesloaded.js" hash="82bdcdaa438659d4cb966ab112b162f4"/><file name="modernizr.custom.min.js" hash="6b30635dd7d7297419bce69b3a0808e7"/></dir><file name="slider.js" hash="38f9efc936498664bd09bfaf6dbd8b34"/></dir></dir><dir name="green"><dir name="css"><file name="theme.css" hash="a56b6ab09d0e35f387d78cf2fc66ead8"/></dir><dir name="images"><file name="content-bg.gif" hash="ab06501f3e03ace6b38f538016d749fd"/><file name="header-bg.gif" hash="64acaec65ae60574b58f1ade55baec29"/><file name="icon-zoom.gif" hash="06cc37f1183f2eb0df108732900fc0db"/><file name="logo.gif" hash="d808ba113a2cdcc9de9e816cca4a57e4"/><dir name="media"><file name="col_left_callout-1.jpg" hash="867ac7e087d7a0f342452386079d6718"/><file name="col_left_callout-2.jpg" hash="d4b15d5515ee6e5fbfcb94a8e14631da"/></dir><file name="nav-item-bg.gif" hash="b7e4f30aa305978bee33c54ec21c5952"/><file name="pipe-top_toolbar.gif" hash="e24f957eed646398c2e38ee2a0148ed8"/><file name="search_btn.gif" hash="1f80fa2ac5db05ed6622e5ae40644a6d"/></dir></dir><dir name="grey"><dir name="css"><file name="theme.css" hash="3825d1056db823f52703de21b8bd95ec"/></dir><dir name="images"><file name="content-bg.gif" hash="6a1ee984b0a77d66519b3c53e67e0bbc"/><file name="header-bg.gif" hash="2e6d38a7ca18b1f9031e7f51ce0ddedf"/><file name="icon-zoom.gif" hash="c03975193a4a716adb822988e20bd54b"/><file name="logo.gif" hash="db2362c7c9e95065e490cde2022413a9"/><dir name="media"><file name="col_left_callout-1.jpg" hash="6b421950d2d89fbb16996c113284be4c"/><file name="col_left_callout-2.jpg" hash="9632fd9aefa442bfae0e7ff594c9529f"/></dir><file name="nav-item-bg.gif" hash="61e8c43463991342f31a340dc588ef1b"/><file name="pipe-top_toolbar.gif" hash="f4bad85ef1a74ae1aa8b88525763d814"/><file name="search_btn.gif" hash="485c26d71ba73a1f00cf5d85ba247466"/></dir></dir><dir name="orange"><dir name="css"><file name="theme.css" hash="602b7ca5b4d58b492d2258a6ba1a37d1"/></dir><dir name="images"><file name="content-bg.gif" hash="d21f8f720c29c457be008fdd8d1fbbcf"/><file name="header-bg.gif" hash="40276560c7a351d9225f673f9c11d7f2"/><file name="icon-zoom.gif" hash="3ee8fd6c68a166f332b482d66e641125"/><file name="logo.gif" hash="8991904139705a3cb8c70bfa59183fa5"/><dir name="media"><file name="col_left_callout-1.jpg" hash="197ea03d8b98aa12cdcc820d466bc6af"/><file name="col_left_callout-2.jpg" hash="5f4964c75b1f275ddb03697995611148"/></dir><file name="nav-item-bg.gif" hash="faf197d9e5d1fa6059a9d7ac0c05ca0b"/><file name="pipe-top_toolbar.gif" hash="23520e6f6b361e866c692cb08bfa7b5b"/><file name="search_btn.gif" hash="3541e9ab6f04513e6a405403634d67a7"/></dir></dir><dir name="pink"><dir name="css"><file name="theme.css" hash="db22b4cf69c0865ac5104f04b33b8f6b"/></dir><dir name="images"><file name="content-bg.gif" hash="15537279a7071ba17053a127721c6382"/><file name="header-bg.gif" hash="654b03f24a81894230318c2e5fbe0cf0"/><file name="icon-zoom.gif" hash="0aebb5ef53d8964e81668dd0f61edc3f"/><file name="logo.gif" hash="7420ace7c078f71ceda41c0c1d8c6ebe"/><dir name="media"><file name="col_left_callout-1.jpg" hash="7811c20ee99c3ddac45858b5ead370c0"/><file name="col_left_callout-2.jpg" hash="917bf5c11bc7c193f63c3dae3eddc67f"/></dir><file name="nav-item-bg.gif" hash="08ec13c4296dc23b963c3388fc5697ed"/><file name="pipe-top_toolbar.gif" hash="e9c860def535a27166cc62c866cc3d1e"/><file name="search_btn.gif" hash="f4fa305384bbcc2d5e384ad632c54a53"/></dir></dir><dir name="red"><dir name="css"><file name="theme.css" hash="a53b5dce619412c940eaa716c32cfbfc"/></dir><dir name="images"><file name="content-bg.gif" hash="dffb2b208be12f431cc38f44c000684d"/><file name="header-bg.gif" hash="8fd395c75daf70e0dcbe71aac4bf4a7e"/><file name="icon-zoom.gif" hash="75c6d3bcd6c936b1572ba93972e736e9"/><file name="logo.gif" hash="934c35a01c77d6c392bc1cfd3d8efbbe"/><dir name="media"><file name="col_left_callout-1.jpg" hash="769a91f919f30e1fbc424b4b777bc80a"/><file name="col_left_callout-2.jpg" hash="c8d6b1e2d5b609c6181fc3a4834012eb"/></dir><file name="nav-item-bg.gif" hash="96999ffcc08e11af5bca4aa7f58e23c7"/><file name="pipe-top_toolbar.gif" hash="e0ee80e47b8bb39cec4851f3d1ffad6e"/><file name="search_btn.gif" hash="1f622bf0fdd4f1ce551c43372019683a"/></dir></dir><dir name="sea_green"><dir name="css"><file name="theme.css" hash="9e4ef6d0bc7edbed64af1fae2d9c0be2"/></dir><dir name="images"><file name="content-bg.gif" hash="1838e52b6986f42acb3b44a1aed65c39"/><file name="header-bg.gif" hash="e4cf4a3df40b4b48b7d9c546bd47af83"/><file name="icon-zoom.gif" hash="33e8743e2ecc0f40e14bf30e33bff816"/><file name="logo.gif" hash="52fd8c02fcfe78601e2efd7c4ec5f7d5"/><dir name="media"><file name="col_left_callout-1.jpg" hash="67849dfcc0fbcde92d19456bf9d97749"/><file name="col_left_callout-2.jpg" hash="6027f7a4145af6d4e7ca8a7601c573c4"/></dir><file name="nav-item-bg.gif" hash="fa7feb9f2b99dac2d78fbd21dd27dd77"/><file name="pipe-top_toolbar.gif" hash="d8fc3eac58e7371a5fb213d570fa1931"/><file name="search_btn.gif" hash="786b97e4f853e9e98b55c268a903cb5a"/></dir></dir><dir name="silver"><dir name="css"><file name="theme.css" hash="fb434da761aabf654ad3d7fcd713a70e"/></dir><dir name="images"><file name="content-bg.gif" hash="61e541f4ce85fdad95827f17fd1ac823"/><file name="footer-bg.gif" hash="72082f1de23061c1b100f9a05d48f54c"/><file name="header-bg.gif" hash="2502e6033c91ef0daf8398e5ced52099"/><file name="icon-zoom.gif" hash="6f579a6cfe226defa31a6018f5be9110"/><file name="logo.gif" hash="1df7d51be3761106692fe500fa4d1b7d"/><dir name="media"><file name="col_left_callout-1.jpg" hash="6b421950d2d89fbb16996c113284be4c"/><file name="col_left_callout-2.jpg" hash="9632fd9aefa442bfae0e7ff594c9529f"/></dir><file name="nav-item-bg.gif" hash="d11dfc4090c516dc83b95bd140cde94c"/><file name="pipe-top_toolbar.gif" hash="f4bad85ef1a74ae1aa8b88525763d814"/><file name="search_btn.gif" hash="306df7dff378e81cdff60745a8171fe1"/></dir></dir><dir name="violet"><dir name="css"><file name="theme.css" hash="6d8942e97fdb624ea2fe3044b6c3cbc0"/></dir><dir name="images"><file name="content-bg.gif" hash="546656bc4314c77a6515f9ab0dc263aa"/><file name="footer-bg.gif" hash="82bf882dcd7f46b6f0835e41a006e9bc"/><file name="header-bg.gif" hash="cb911b0ecba9dcf17bcab192866e1413"/><file name="icon-zoom.gif" hash="8a1aa205a96aa94478eb484b83840b72"/><file name="logo.gif" hash="ef893f0e4f9229dfa15ffdc989d05061"/><dir name="media"><file name="col_left_callout-1.jpg" hash="e84ad310d728d1ae9ccd3ac7fb0bc56d"/><file name="col_left_callout-2.jpg" hash="044d19033aaf4a047c3c1ef5b1bbe07b"/></dir><file name="nav-item-bg.gif" hash="4abe827dfcdd1847b5e94eb2983508b4"/><file name="pipe-top_toolbar.gif" hash="c941dfbb96f976780ffc3c27d24a566d"/><file name="search_btn.gif" hash="e7a4924ea87b5c8bfd4dd5cc8eebcb7e"/></dir></dir><dir name="yellow"><dir name="css"><file name="theme.css" hash="eae215b2601f819f92979f276389cfe8"/></dir><dir name="images"><file name="content-bg.gif" hash="e8e713e803cd7926358c2151ce646165"/><file name="footer-bg.gif" hash="82bf882dcd7f46b6f0835e41a006e9bc"/><file name="header-bg.gif" hash="73b2dbaeb86238c9941e69eea947fcd9"/><file name="icon-zoom.gif" hash="9b1c52b4650797586a9f2b768fc33a76"/><file name="logo.gif" hash="8cb7f692c7dc7b7298fd0965e65c401a"/><dir name="media"><file name="col_left_callout-1.jpg" hash="7568d6a28f1bb5112487b27aed74c4bc"/><file name="col_left_callout-2.jpg" hash="c620d9864b6322901d832ef501a8d361"/></dir><file name="nav-item-bg.gif" hash="6824e3ddbed45f2c52925ccfa46c8dc7"/><file name="pipe-top_toolbar.gif" hash="8340611c27fd11044649ae3af9dbba66"/><file name="search_btn.gif" hash="d26292a88c5b653cfd24a1a352218ad7"/></dir></dir></dir></dir></target></contents>
|
23 |
<compatible/>
|
24 |
-
<dependencies><required><php><min>5.2.0</min><max>7.
|
25 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>magento_classic_theme_free</name>
|
4 |
+
<version>2.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by/3.0/">Creative Commons License </license>
|
7 |
<channel>community</channel>
|
17 |
* Free updates included</description>
|
18 |
<notes>Magento Classic Free Theme</notes>
|
19 |
<authors><author><name>TemplatesMaster</name><user>TemplatesMaster</user><email>support@templates-master.com</email></author></authors>
|
20 |
+
<date>2016-08-25</date>
|
21 |
+
<time>12:27:48</time>
|
22 |
+
<contents><target name="magelocal"><dir name="TM"><dir name="Templatef002"><dir name="etc"><file name="config.xml" hash="ec55d6c47c14b4b248e0c3843723ee60"/></dir><dir name="upgrades"><file name="2.0.0.php" hash="f8c88b9794a80ac373f1faa7abe73111"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="f002"><dir name="default"><dir name="layout"><file name="configurableswatches.xml" hash="e3554c2a0d8d3a935222e3f6a9dd82ee"/><file name="local.xml" hash="9f3e31ea1912b53621c887a91dbb2fba"/></dir><dir name="locale"><dir name="en_US"><file name="translate.csv" hash="0e23b6d3bf659eaaae8504b2935d3925"/></dir></dir><dir name="template"><dir name="callouts"><file name="left_col.phtml" hash="afa7e99b528d9f3a7b4f4f69cd60da05"/><file name="right_col.phtml" hash="afa7e99b528d9f3a7b4f4f69cd60da05"/></dir><dir name="catalog"><dir name="layer"><file name="state.phtml" hash="b75ea5d4ccef37d801ec5eea18aef464"/></dir><dir name="navigation"><file name="sidebar.phtml" hash="9f49ad7f1477ad60103acfc961081319"/><file name="top.phtml" hash="0269ec79d5d8ed1df3e5caaf0436be17"/></dir><dir name="product"><file name="list.phtml" hash="dd303654c1801b454dc5ebc6b384c72b"/><file name="new.phtml" hash="f87123101372eb2abc2e36fc849cc911"/><dir name="view"><file name="media.phtml" hash="eef565709c970085d2b5a57d89ab6479"/><dir name="type"><dir name="options"><file name="configurable.phtml" hash="a7aae1fd87b8c0901e25e0b73a43ba68"/></dir></dir></dir><file name="view.phtml" hash="fb81a09e2abb2dd51191f96f51dad1ed"/></dir></dir><dir name="catalogsearch"><file name="form.mini.phtml" hash="7071376b4a8c5e4fea76176fcc8b7f6b"/></dir><dir name="checkout"><dir name="cart"><file name="header.cart.phtml" hash="d4cd95229a877620518153d818274d04"/></dir></dir><dir name="configurableswatches"><dir name="catalog"><dir name="layer"><dir name="filter"><file name="swatches.phtml" hash="2f96ff1d7eb48fbc260e489c047b4bc7"/></dir><dir name="state"><file name="swatch.phtml" hash="e696b74ae734670552bcc5eb308586ef"/></dir></dir><dir name="media"><file name="js.phtml" hash="8820d9d4fd527c683b40411601f73c72"/></dir><dir name="product"><dir name="list"><file name="swatches.phtml" hash="b5dd16faa22d4c248ce9c237918df1c9"/></dir><dir name="view"><dir name="type"><dir name="configurable"><file name="swatch-js.phtml" hash="ba64818ebe7d00c7cc6aba106f72fe39"/></dir><dir name="options"><dir name="configurable"><file name="swatches.phtml" hash="25b9919bbdbaf300d44b3425f4af5925"/></dir></dir></dir></dir></dir></dir></dir><dir name="page"><file name="1column.phtml" hash="78f62e10194fdcac75c2064fefd5e803"/><file name="2columns-left.phtml" hash="fd954d1cbcd73c0577a94b49a5749ae3"/><file name="2columns-right.phtml" hash="02ec8045f3748eaafca81e6000f3ed84"/><file name="3columns.phtml" hash="2850f875dd92b0dbebdc708ac5014324"/><dir name="html"><file name="footer.phtml" hash="429ebe4960987a54844f4c1048b0b70f"/><file name="header.phtml" hash="94b53a77fc915c7957810358dcfc5965"/><file name="topmenu.phtml" hash="4d913af283035c49b5209194c1e5d57f"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TM_Templatef002.xml" hash="ca791a704bc3439f362b281accd2266e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="f002"><dir name="default"><dir name="css"><file name="custom.css" hash="f11942e968b9872c3068b90c7239d249"/><file name="print.css" hash="4fa35816e1a2854c83b8638fbd3bd313"/><file name="styles-ie.css" hash="6e06a206e166f6c1a0016c3012b2d4f5"/><file name="styles.css" hash="25e5b25a3d4742b05fad1c390d9d58d4"/><file name="theme.css" hash="5900a389a7b6461ad95260ef05db2c58"/></dir><dir name="images"><file name="account_nav_on_bg.gif" hash="ad485137604a18b984df7742e1095f7f"/><file name="anext.gif" hash="74dc5b64ac39457381e5c848890bd610"/><file name="aplay.gif" hash="5885536825fc9d80edf15925b3c0fffe"/><file name="aprev.gif" hash="b93972d5789ae32996d2a5c672d2548b"/><file name="astop.gif" hash="35c9a2cffb7c7de05706caafa0e8b46d"/><file name="bkg_block-actions.gif" hash="da2970eac0a22c850b19ee3680475d51"/><file name="bkg_block-currency.gif" hash="bfaad1b64557c05ad6f4b124ad3d3532"/><file name="bkg_block-layered-dd.gif" hash="6ae6f8184e87de496fb74eeec65737c9"/><file name="bkg_block-layered-dt.gif" hash="ba8229068657b80f2c42111c5a1a307e"/><file name="bkg_block-layered-label.gif" hash="14687dfa3921cfd12d2149c1497d9765"/><file name="bkg_block-layered-li.gif" hash="753ebb76a4fc2b5b6915c536fcf4d487"/><file name="bkg_block-layered-title.gif" hash="c92e29b30af7abf4e0bc3f714a246f55"/><file name="bkg_block-layered1.gif" hash="607167f198572e83a0e728b6b9383a70"/><file name="bkg_block-title-account.gif" hash="a64f1df5a7e3d0f6a58b017f74311cb1"/><file name="bkg_block-title.gif" hash="f8c1f130ad69464fe7aff2f589b2ec75"/><file name="bkg_checkout.gif" hash="11258fe49feff5513c9608f2ea486776"/><file name="bkg_collapse-gm.gif" hash="37418f23e65006dcfde07ce9b249e057"/><file name="bkg_collapse.gif" hash="2333c68e38163ed4656da82b9bcf362b"/><file name="bkg_divider1.gif" hash="260ebae91ffb1b7c663906b29a069925"/><file name="bkg_grid.gif" hash="a6f64fedbac51fb1b86184cd488cc4e6"/><file name="bkg_pipe1.gif" hash="7852290f6a443000ead96b8cec5cd7c7"/><file name="bkg_pipe2.gif" hash="7da64eefaf4da3855ab6ee76dbced0c2"/><file name="bkg_pipe3.gif" hash="11bfac1e590f0c77fb12f37d7f05cd3c"/><file name="bkg_products-grid3.gif" hash="e8fbc47f9fec21d6f5c3422523f3854e"/><file name="bkg_rating.gif" hash="0a8777c815350ddf1e316a537ad0c335"/><file name="bkg_sp-methods.gif" hash="17d68b5449adaa87dafc62ae0afa1b9a"/><file name="box-content-bg.gif" hash="f5344140a3a9ad4267687b8ec40c5751"/><file name="box-header-bg.gif" hash="e1e109e8f6bfc2f2ccef04769553c60c"/><file name="btn_edit.gif" hash="df3565eb4e4d0dc578201df60de54b47"/><file name="btn_gm-close.gif" hash="346e26eece27449a2f224aef76ae372e"/><file name="btn_google_checkout.gif" hash="843d75249ce05b5d87ca5419f37b1c3b"/><file name="btn_paypal_checkout.gif" hash="6edd61270b7b5632eafad10557129114"/><file name="btn_place_order.gif" hash="d35219f86ae2c983ee1a31557e37b612"/><file name="btn_previous.gif" hash="63473a1520a73bb0c9b47b685d17cd21"/><file name="btn_proceed_to_checkout.gif" hash="4daac687b514fecfd1068539500ac3d7"/><file name="btn_proceed_to_checkout.png" hash="a65868bfdf37e6c9bc8651fc402c43b3"/><file name="btn_proceed_to_checkout_bg.gif" hash="d1f61b4cd9db50e0322d23b291f1f4c4"/><file name="btn_proceed_to_checkout_dis.gif" hash="9e152c01d5d88f690dc52cb62428f3b6"/><file name="btn_proceed_to_checkout_rad.gif" hash="ee0f96c5b22aab80149238c210d1bf95"/><file name="btn_remove.gif" hash="6182e723aa2a253dc6cf334a3dfaaa84"/><file name="btn_remove2.gif" hash="234bddc4c5878c5ef16407a944824236"/><file name="btn_search.gif" hash="2d93b43c0a1c1182358677661e26a978"/><file name="btn_trash.gif" hash="bcb22f558a0eb32243a2a36645189e9f"/><file name="btn_window_close.gif" hash="c83f3cbbb2aedfc580dff78d5cfb63ed"/><file name="calendar.gif" hash="b1468e5239504974c689eea5d93f86d4"/><file name="cart-toggle.gif" hash="9298f0e16854c63b4caf8ba1e5918a55"/><file name="content-bg.gif" hash="82305a331b1135c5d19f10753376b849"/><file name="cvv.gif" hash="ed0f392004a405466291071a760b285d"/><file name="cvv.jpg" hash="e27210d810bbab732935d9410936ef87"/><file name="error_msg_icon.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="fam_book_open.png" hash="0ba89b9fbe7e88d4c6896ed0a1f495aa"/><file name="footer-bg.gif" hash="82bf882dcd7f46b6f0835e41a006e9bc"/><file name="gradient-blue.gif" hash="e1e462165458d74b3ee2d3bc9dfc2b3b"/><file name="gradient-gray.gif" hash="7e9e178c812f874ae9204eacc980e132"/><file name="grid.gif" hash="16b43ba34d6665e91b104b084b299f74"/><file name="grid.png" hash="8ac3b1bea5765f490538c9a9b6429294"/><file name="h_separator.gif" hash="517e50e00baf219edd50a7cd5eda7a89"/><file name="header-bg.gif" hash="28cec9ba53792ad75b9959aeaae69c55"/><file name="i_arrow-top.gif" hash="3dbb0584e8eb1d96cc3d3c40c17d7aaf"/><file name="i_asc_arrow.gif" hash="40aa554212d6a1f60593c27d78d85fa3"/><file name="i_availability_only.gif" hash="bca1f00a50864171ad98317b778e869c"/><file name="i_availability_only_arrow.gif" hash="0cf32b72fefc94b89b74e4f3f02c2e93"/><file name="i_block-cart.gif" hash="cc19e21f9c89b70cc10354ff588ca8ab"/><file name="i_block-currency.gif" hash="643024bcae5ece554fdbbc041aeb297c"/><file name="i_block-list.gif" hash="fe8424127ecbe4b0d893bcf6f253dc1a"/><file name="i_block-poll.gif" hash="52d778dddbf48b8d04226bee9370a7ef"/><file name="i_block-related.gif" hash="4e277173b6372b1a90b0f19e0388ad54"/><file name="i_block-subscribe.gif" hash="9e5fee06a543742045118a95f2debcb8"/><file name="i_block-tags.gif" hash="67d1255c2c3e9ed1a5c845f8d4e4a3ba"/><file name="i_block-viewed.gif" hash="67d1255c2c3e9ed1a5c845f8d4e4a3ba"/><file name="i_block-wishlist.gif" hash="8f8cda89ca20ba4a9b2f8c91f73fdff9"/><file name="i_desc_arrow.gif" hash="92fd194bfae4ce5ae3354e1e47d7ac7d"/><file name="i_discount.gif" hash="908d44da90de5e54185764d093bbdb77"/><file name="i_folder-table.gif" hash="bf006ddb591d8ac95d2e895bf2fdbc8d"/><file name="i_ma-info.gif" hash="91259557447ee80eb1110fe0c85cb3b5"/><file name="i_ma-reviews.gif" hash="859c97695ec396c0b284a0c3c7c416ad"/><file name="i_ma-tags.gif" hash="1e83e3b0b677c92b3aa8a252268f7b86"/><file name="i_msg-error.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="i_msg-note.gif" hash="e774ee481a2820789c1a77112377c4e0"/><file name="i_msg-success.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/><file name="i_notice.gif" hash="ebd56dc80b8346e10e93628bc0e6c372"/><file name="i_page1.gif" hash="704f7d4eccbdf9cabbad7770f18856ff"/><file name="i_page2.gif" hash="57a04ca584e05e28dc94c7e68f0af62e"/><file name="i_pager-next.gif" hash="ed4d6640624c2b6edeab4c212314bd6d"/><file name="i_pager-prev.gif" hash="75973b020105dccbaf34e49d7852552d"/><file name="i_print.gif" hash="0aed138181495642e9ab29e55d194d40"/><file name="i_rss-big.png" hash="6cf70e7c52a3f3d7b833ccadb041a555"/><file name="i_rss.gif" hash="e5bbc388d818c142868b4a1df0b48793"/><file name="i_search_criteria.gif" hash="cf67b9cc5c311ae3f99e68cd29ae17be"/><file name="i_shipping.gif" hash="91a0d2cc2eb2391f90ec8a75c04b3183"/><file name="i_tag_add.gif" hash="a736baa992aa55b6fb71e8742a04dc82"/><file name="i_tier.gif" hash="c5189e25afeb7c1a8c4902a42832593e"/><file name="i_type_grid.gif" hash="a1e5d8ac36fb2891ea16e729b95c552c"/><file name="i_type_list.gif" hash="61333d383ec142b8d270abe77324aa5d"/><file name="icon-cart.gif" hash="738eb5bb393ed6842e3f99ab78a3d7f7"/><file name="icon-zoom.gif" hash="6dbe63495b9ce6936e7a589c20d72a34"/><file name="icon_opc_back.gif" hash="3dbb0584e8eb1d96cc3d3c40c17d7aaf"/><file name="icon_page_white.gif" hash="704f7d4eccbdf9cabbad7770f18856ff"/><file name="icon_page_white_text.gif" hash="57a04ca584e05e28dc94c7e68f0af62e"/><file name="list_remove_btn.gif" hash="6182e723aa2a253dc6cf334a3dfaaa84"/><file name="listing_type_grid.gif" hash="a1e5d8ac36fb2891ea16e729b95c552c"/><file name="listing_type_list.gif" hash="61333d383ec142b8d270abe77324aa5d"/><file name="logo.gif" hash="34a45af9f33f00b6564f0675ac3b8276"/><file name="magnifier_handle.gif" hash="238fbdd7959f517db11c6f57ee4daaf4"/><file name="map_popup_arrow.gif" hash="6383b40a9e7bd3c95260bef4fbb1b163"/><dir name="media"><file name="col_left_callout-1.jpg" hash="4e0be0ae83843c4f8abc9f33715e22cf"/><file name="col_left_callout-2.jpg" hash="aa353fb15d34615f28c4da9363b7f196"/></dir><file name="narrow_by_li_by.gif" hash="14687dfa3921cfd12d2149c1497d9765"/><file name="narrow_by_set.gif" hash="ba8229068657b80f2c42111c5a1a307e"/><file name="nav-item-bg.gif" hash="9a42cafa1d4c15c0a731003325b23e6f"/><file name="navigation-bg.gif" hash="efa2bc5607c5db78310586fd1a5ae313"/><file name="navigation-div.gif" hash="3f95ca13f1d1c446434a0a65cbe63369"/><file name="note_msg_icon.gif" hash="e774ee481a2820789c1a77112377c4e0"/><file name="np_cart_thumb.gif" hash="e9fdd943e0947e15f0638506f477e358"/><file name="np_more_img.gif" hash="ace357bfe3e81ffb62137cd5b25ae5e1"/><file name="np_product_main.gif" hash="d0cccda76de50efa025215ce85dacb1c"/><file name="np_thumb.gif" hash="e46270c89358ecc8341d1565c14644b8"/><file name="np_thumb2.gif" hash="8502866cdabc5c74aca7d7bd32a06a03"/><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="pager_arrow_left.gif" hash="75973b020105dccbaf34e49d7852552d"/><file name="pager_arrow_right.gif" hash="ed4d6640624c2b6edeab4c212314bd6d"/><file name="payments.gif" hash="7db8b7d9800fdfbbbe5b9c3f8eeeb79c"/><file name="pipe-gray.gif" hash="0d85757f7ac118d5fd721e4ff6c09085"/><file name="pipe-top_toolbar.gif" hash="ec7d979128f080a8ba9a96c50492101f"/><file name="place_order_bg.gif" hash="0e6bdf6280452a101c1924ce68669a2e"/><file name="place_order_container_bg.gif" hash="8eebd513ac0d9c02cc566cff649799ce"/><file name="product_collateral_bg.gif" hash="1d4d6b22e5108aefae52709d3934f397"/><file name="product_essential_bg.gif" hash="2ab47f5c01447a7998118da5872f14b8"/><file name="product_rating_blank_star.gif" hash="5e20a299c0ff16168be38b6dde580eda"/><file name="product_rating_full_star.gif" hash="dd5aae332178d928a7f49dea7691b5f6"/><file name="product_zoom_overlay_magnif.gif" hash="83834893e162221d6d9257fe67847370"/><file name="search_btn.gif" hash="5872f36846222a3315f5d0f666dd6687"/><file name="search_criteria.gif" hash="cf67b9cc5c311ae3f99e68cd29ae17be"/><file name="search_form_button.gif" hash="5a5b6d2825d7a730904836e9bd4618eb"/><file name="slider1.jpg" hash="55a8ad759d0b0728f5170e7004342715"/><file name="slider2.jpg" hash="b2586ffefa12895e12f47687d8934970"/><file name="slider3.jpg" hash="7eeadfb4345460f010dd3a99ee8ed7b7"/><file name="slider4.jpg" hash="9a74e57abea85318f7c395f58cafbf07"/><file name="slider_bg.gif" hash="87bc1b46d87de4f6252c7216216627c3"/><file name="slider_btn_zoom_in.gif" hash="ef0fc67f77f30827ee67f4e744b60781"/><file name="slider_btn_zoom_out.gif" hash="68b3d1c28dc5aec4f6b64d70a6996b6f"/><file name="sort_asc_arrow.gif" hash="40aa554212d6a1f60593c27d78d85fa3"/><file name="sort_desc_arrow.gif" hash="92fd194bfae4ce5ae3354e1e47d7ac7d"/><file name="spacer.gif" hash="df3e567d6f16d040326c7a0ea29a4f41"/><file name="success_msg_icon.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/><file name="trans.png" hash="ca23069433bf4e4e96eb436ae035800c"/><file name="validation_advice_bg.gif" hash="b85432906de8985a8b14eeb2dc652d3c"/><file name="white_pipe.gif" hash="e60a61a6985774108f370a433b09f175"/></dir><dir name="js"><dir name="configurableswatches"><file name="product-media.js" hash="85c2a93413ab6ccd6399b300034f9944"/><file name="swatches-list.js" hash="ff35f4e497834fa25d9f1124b412f65a"/><file name="swatches-product.js" hash="87ad1b1fbaffecfba810a70c46f137e4"/></dir><file name="dropdown.js" hash="436b1bd77db6fdb1c206b874cf46dc45"/><file name="glider.js" hash="ff0c6d92699db1f3474d96510865a6e3"/><dir name="lib"><file name="imagesloaded.js" hash="82bdcdaa438659d4cb966ab112b162f4"/><file name="modernizr.custom.min.js" hash="6b30635dd7d7297419bce69b3a0808e7"/></dir><file name="slider.js" hash="38f9efc936498664bd09bfaf6dbd8b34"/></dir></dir><dir name="green"><dir name="css"><file name="theme.css" hash="a56b6ab09d0e35f387d78cf2fc66ead8"/></dir><dir name="images"><file name="content-bg.gif" hash="ab06501f3e03ace6b38f538016d749fd"/><file name="header-bg.gif" hash="64acaec65ae60574b58f1ade55baec29"/><file name="icon-zoom.gif" hash="06cc37f1183f2eb0df108732900fc0db"/><file name="logo.gif" hash="d808ba113a2cdcc9de9e816cca4a57e4"/><dir name="media"><file name="col_left_callout-1.jpg" hash="867ac7e087d7a0f342452386079d6718"/><file name="col_left_callout-2.jpg" hash="d4b15d5515ee6e5fbfcb94a8e14631da"/></dir><file name="nav-item-bg.gif" hash="b7e4f30aa305978bee33c54ec21c5952"/><file name="pipe-top_toolbar.gif" hash="e24f957eed646398c2e38ee2a0148ed8"/><file name="search_btn.gif" hash="1f80fa2ac5db05ed6622e5ae40644a6d"/></dir></dir><dir name="grey"><dir name="css"><file name="theme.css" hash="3825d1056db823f52703de21b8bd95ec"/></dir><dir name="images"><file name="content-bg.gif" hash="6a1ee984b0a77d66519b3c53e67e0bbc"/><file name="header-bg.gif" hash="2e6d38a7ca18b1f9031e7f51ce0ddedf"/><file name="icon-zoom.gif" hash="c03975193a4a716adb822988e20bd54b"/><file name="logo.gif" hash="db2362c7c9e95065e490cde2022413a9"/><dir name="media"><file name="col_left_callout-1.jpg" hash="6b421950d2d89fbb16996c113284be4c"/><file name="col_left_callout-2.jpg" hash="9632fd9aefa442bfae0e7ff594c9529f"/></dir><file name="nav-item-bg.gif" hash="61e8c43463991342f31a340dc588ef1b"/><file name="pipe-top_toolbar.gif" hash="f4bad85ef1a74ae1aa8b88525763d814"/><file name="search_btn.gif" hash="485c26d71ba73a1f00cf5d85ba247466"/></dir></dir><dir name="orange"><dir name="css"><file name="theme.css" hash="602b7ca5b4d58b492d2258a6ba1a37d1"/></dir><dir name="images"><file name="content-bg.gif" hash="d21f8f720c29c457be008fdd8d1fbbcf"/><file name="header-bg.gif" hash="40276560c7a351d9225f673f9c11d7f2"/><file name="icon-zoom.gif" hash="3ee8fd6c68a166f332b482d66e641125"/><file name="logo.gif" hash="8991904139705a3cb8c70bfa59183fa5"/><dir name="media"><file name="col_left_callout-1.jpg" hash="197ea03d8b98aa12cdcc820d466bc6af"/><file name="col_left_callout-2.jpg" hash="5f4964c75b1f275ddb03697995611148"/></dir><file name="nav-item-bg.gif" hash="faf197d9e5d1fa6059a9d7ac0c05ca0b"/><file name="pipe-top_toolbar.gif" hash="23520e6f6b361e866c692cb08bfa7b5b"/><file name="search_btn.gif" hash="3541e9ab6f04513e6a405403634d67a7"/></dir></dir><dir name="pink"><dir name="css"><file name="theme.css" hash="db22b4cf69c0865ac5104f04b33b8f6b"/></dir><dir name="images"><file name="content-bg.gif" hash="15537279a7071ba17053a127721c6382"/><file name="header-bg.gif" hash="654b03f24a81894230318c2e5fbe0cf0"/><file name="icon-zoom.gif" hash="0aebb5ef53d8964e81668dd0f61edc3f"/><file name="logo.gif" hash="7420ace7c078f71ceda41c0c1d8c6ebe"/><dir name="media"><file name="col_left_callout-1.jpg" hash="7811c20ee99c3ddac45858b5ead370c0"/><file name="col_left_callout-2.jpg" hash="917bf5c11bc7c193f63c3dae3eddc67f"/></dir><file name="nav-item-bg.gif" hash="08ec13c4296dc23b963c3388fc5697ed"/><file name="pipe-top_toolbar.gif" hash="e9c860def535a27166cc62c866cc3d1e"/><file name="search_btn.gif" hash="f4fa305384bbcc2d5e384ad632c54a53"/></dir></dir><dir name="red"><dir name="css"><file name="theme.css" hash="a53b5dce619412c940eaa716c32cfbfc"/></dir><dir name="images"><file name="content-bg.gif" hash="dffb2b208be12f431cc38f44c000684d"/><file name="header-bg.gif" hash="8fd395c75daf70e0dcbe71aac4bf4a7e"/><file name="icon-zoom.gif" hash="75c6d3bcd6c936b1572ba93972e736e9"/><file name="logo.gif" hash="934c35a01c77d6c392bc1cfd3d8efbbe"/><dir name="media"><file name="col_left_callout-1.jpg" hash="769a91f919f30e1fbc424b4b777bc80a"/><file name="col_left_callout-2.jpg" hash="c8d6b1e2d5b609c6181fc3a4834012eb"/></dir><file name="nav-item-bg.gif" hash="96999ffcc08e11af5bca4aa7f58e23c7"/><file name="pipe-top_toolbar.gif" hash="e0ee80e47b8bb39cec4851f3d1ffad6e"/><file name="search_btn.gif" hash="1f622bf0fdd4f1ce551c43372019683a"/></dir></dir><dir name="sea_green"><dir name="css"><file name="theme.css" hash="9e4ef6d0bc7edbed64af1fae2d9c0be2"/></dir><dir name="images"><file name="content-bg.gif" hash="1838e52b6986f42acb3b44a1aed65c39"/><file name="header-bg.gif" hash="e4cf4a3df40b4b48b7d9c546bd47af83"/><file name="icon-zoom.gif" hash="33e8743e2ecc0f40e14bf30e33bff816"/><file name="logo.gif" hash="52fd8c02fcfe78601e2efd7c4ec5f7d5"/><dir name="media"><file name="col_left_callout-1.jpg" hash="67849dfcc0fbcde92d19456bf9d97749"/><file name="col_left_callout-2.jpg" hash="6027f7a4145af6d4e7ca8a7601c573c4"/></dir><file name="nav-item-bg.gif" hash="fa7feb9f2b99dac2d78fbd21dd27dd77"/><file name="pipe-top_toolbar.gif" hash="d8fc3eac58e7371a5fb213d570fa1931"/><file name="search_btn.gif" hash="786b97e4f853e9e98b55c268a903cb5a"/></dir></dir><dir name="silver"><dir name="css"><file name="theme.css" hash="fb434da761aabf654ad3d7fcd713a70e"/></dir><dir name="images"><file name="content-bg.gif" hash="61e541f4ce85fdad95827f17fd1ac823"/><file name="footer-bg.gif" hash="72082f1de23061c1b100f9a05d48f54c"/><file name="header-bg.gif" hash="2502e6033c91ef0daf8398e5ced52099"/><file name="icon-zoom.gif" hash="6f579a6cfe226defa31a6018f5be9110"/><file name="logo.gif" hash="1df7d51be3761106692fe500fa4d1b7d"/><dir name="media"><file name="col_left_callout-1.jpg" hash="6b421950d2d89fbb16996c113284be4c"/><file name="col_left_callout-2.jpg" hash="9632fd9aefa442bfae0e7ff594c9529f"/></dir><file name="nav-item-bg.gif" hash="d11dfc4090c516dc83b95bd140cde94c"/><file name="pipe-top_toolbar.gif" hash="f4bad85ef1a74ae1aa8b88525763d814"/><file name="search_btn.gif" hash="306df7dff378e81cdff60745a8171fe1"/></dir></dir><dir name="violet"><dir name="css"><file name="theme.css" hash="6d8942e97fdb624ea2fe3044b6c3cbc0"/></dir><dir name="images"><file name="content-bg.gif" hash="546656bc4314c77a6515f9ab0dc263aa"/><file name="footer-bg.gif" hash="82bf882dcd7f46b6f0835e41a006e9bc"/><file name="header-bg.gif" hash="cb911b0ecba9dcf17bcab192866e1413"/><file name="icon-zoom.gif" hash="8a1aa205a96aa94478eb484b83840b72"/><file name="logo.gif" hash="ef893f0e4f9229dfa15ffdc989d05061"/><dir name="media"><file name="col_left_callout-1.jpg" hash="e84ad310d728d1ae9ccd3ac7fb0bc56d"/><file name="col_left_callout-2.jpg" hash="044d19033aaf4a047c3c1ef5b1bbe07b"/></dir><file name="nav-item-bg.gif" hash="4abe827dfcdd1847b5e94eb2983508b4"/><file name="pipe-top_toolbar.gif" hash="c941dfbb96f976780ffc3c27d24a566d"/><file name="search_btn.gif" hash="e7a4924ea87b5c8bfd4dd5cc8eebcb7e"/></dir></dir><dir name="yellow"><dir name="css"><file name="theme.css" hash="eae215b2601f819f92979f276389cfe8"/></dir><dir name="images"><file name="content-bg.gif" hash="e8e713e803cd7926358c2151ce646165"/><file name="footer-bg.gif" hash="82bf882dcd7f46b6f0835e41a006e9bc"/><file name="header-bg.gif" hash="73b2dbaeb86238c9941e69eea947fcd9"/><file name="icon-zoom.gif" hash="9b1c52b4650797586a9f2b768fc33a76"/><file name="logo.gif" hash="8cb7f692c7dc7b7298fd0965e65c401a"/><dir name="media"><file name="col_left_callout-1.jpg" hash="7568d6a28f1bb5112487b27aed74c4bc"/><file name="col_left_callout-2.jpg" hash="c620d9864b6322901d832ef501a8d361"/></dir><file name="nav-item-bg.gif" hash="6824e3ddbed45f2c52925ccfa46c8dc7"/><file name="pipe-top_toolbar.gif" hash="8340611c27fd11044649ae3af9dbba66"/><file name="search_btn.gif" hash="d26292a88c5b653cfd24a1a352218ad7"/></dir></dir></dir></dir></target></contents>
|
23 |
<compatible/>
|
24 |
+
<dependencies><required><php><min>5.2.0</min><max>7.1.0</max></php></required></dependencies>
|
25 |
</package>
|
skin/frontend/base/default/tm/addressautocomplete/js/address-autocomplete.js
DELETED
@@ -1,178 +0,0 @@
|
|
1 |
-
var AddressAutocomplete = (function() {
|
2 |
-
|
3 |
-
var config = {};
|
4 |
-
|
5 |
-
function getAutocomplete(el) {
|
6 |
-
return el.addressAutocomplete;
|
7 |
-
}
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Find region_id by it's code, or name
|
11 |
-
*
|
12 |
-
* @param {Object} address
|
13 |
-
* @return {Number}
|
14 |
-
*/
|
15 |
-
function findRegionId(address) {
|
16 |
-
var id,
|
17 |
-
regionCode = address.region_code,
|
18 |
-
regionName = address.region,
|
19 |
-
countryCode = address.country_id,
|
20 |
-
regions = config.regions;
|
21 |
-
|
22 |
-
if (regions[countryCode]) {
|
23 |
-
// 1. search by codes
|
24 |
-
for (id in regions[countryCode]) {
|
25 |
-
if (regions[countryCode][id].code === regionCode) {
|
26 |
-
return id;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
// 2. search by name
|
30 |
-
for (id in regions[countryCode]) {
|
31 |
-
if (regions[countryCode][id].name === regionName) {
|
32 |
-
return id;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
36 |
-
return false;
|
37 |
-
}
|
38 |
-
|
39 |
-
function extractFieldValueFromPlace(name, value, place) {
|
40 |
-
var i = 0;
|
41 |
-
while ((field = place.address_components[i])) {
|
42 |
-
if (field.types[0] === name) {
|
43 |
-
return field[value];
|
44 |
-
}
|
45 |
-
i++;
|
46 |
-
}
|
47 |
-
return '';
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Extract address from google place object
|
52 |
-
* @param {Object} place @see autocomplete.getPlace()
|
53 |
-
* @return {Object}
|
54 |
-
*/
|
55 |
-
function extractAddress(place) {
|
56 |
-
if (!place || !place.address_components) {
|
57 |
-
return false;
|
58 |
-
}
|
59 |
-
|
60 |
-
var mapping = {
|
61 |
-
'country_id' : '{{country.short_name}}',
|
62 |
-
'street1' : '{{street_number.short_name}} {{route.short_name}}',
|
63 |
-
'street2' : '',
|
64 |
-
'city' : '{{locality.long_name}}',
|
65 |
-
'postcode' : '{{postal_code.short_name}}',
|
66 |
-
'region' : '{{administrative_area_level_1.long_name}}',
|
67 |
-
'region_id' : '',
|
68 |
-
'region_code' : '{{administrative_area_level_1.short_name}}'
|
69 |
-
};
|
70 |
-
if (config.street_number_placement === 'line1_end') {
|
71 |
-
mapping.street1 = '{{route.short_name}} {{street_number.short_name}}';
|
72 |
-
} else if (config.street_number_placement === 'line2') {
|
73 |
-
mapping.street1 = '{{route.short_name}}';
|
74 |
-
mapping.street2 = '{{street_number.short_name}}';
|
75 |
-
}
|
76 |
-
|
77 |
-
var address = {};
|
78 |
-
for (var i in mapping) {
|
79 |
-
if (!mapping[i].length) {
|
80 |
-
address[i] = '';
|
81 |
-
continue;
|
82 |
-
}
|
83 |
-
|
84 |
-
address[i] = [];
|
85 |
-
|
86 |
-
var re = /\{\{(.+?)\}\}/g;
|
87 |
-
while ((fields = re.exec(mapping[i]))) {
|
88 |
-
var field = fields[1].split('.')[0],
|
89 |
-
value = fields[1].split('.')[1];
|
90 |
-
|
91 |
-
var fieldValue = extractFieldValueFromPlace(field, value, place);
|
92 |
-
if (fieldValue) {
|
93 |
-
address[i].push(fieldValue);
|
94 |
-
}
|
95 |
-
}
|
96 |
-
address[i] = address[i].join(' ');
|
97 |
-
}
|
98 |
-
|
99 |
-
address.street_1 = address.street1;
|
100 |
-
address.street_2 = address.street2;
|
101 |
-
address.region_id = findRegionId(address);
|
102 |
-
return address;
|
103 |
-
}
|
104 |
-
|
105 |
-
return {
|
106 |
-
fill: function(address, fieldPrefix) {
|
107 |
-
for (var id in address) {
|
108 |
-
var value = address[id];
|
109 |
-
if (false === value) {
|
110 |
-
continue;
|
111 |
-
}
|
112 |
-
|
113 |
-
var el = document.getElementById(fieldPrefix + id);
|
114 |
-
if (!el || el.getValue() == value) {
|
115 |
-
continue;
|
116 |
-
}
|
117 |
-
|
118 |
-
el.setValue(value);
|
119 |
-
if (el.simulate) {
|
120 |
-
el.simulate('change');
|
121 |
-
}
|
122 |
-
}
|
123 |
-
},
|
124 |
-
|
125 |
-
init: function() {
|
126 |
-
var self = this,
|
127 |
-
rules = [{
|
128 |
-
ids: ['billing:street1', 'shipping:street1', 'street_1'],
|
129 |
-
types: ['address'],
|
130 |
-
listeners: {
|
131 |
-
place_changed: function(el) {
|
132 |
-
// 1. Match field prefix (billing:, shipping: or empty string)
|
133 |
-
var fieldPrefix = '';
|
134 |
-
['billing:', 'shipping:'].each(function(prefix) {
|
135 |
-
if (el.id.indexOf(prefix) !== -1) {
|
136 |
-
fieldPrefix = prefix;
|
137 |
-
throw $break;
|
138 |
-
}
|
139 |
-
});
|
140 |
-
|
141 |
-
// 2. Extract address from google place
|
142 |
-
var address = extractAddress(getAutocomplete(el).getPlace());
|
143 |
-
if (!address) {
|
144 |
-
return;
|
145 |
-
}
|
146 |
-
|
147 |
-
// 3. Fill the form
|
148 |
-
this.fill(address, fieldPrefix);
|
149 |
-
}
|
150 |
-
}
|
151 |
-
}];
|
152 |
-
|
153 |
-
rules.each(function(rule) {
|
154 |
-
rule.ids.each(function(id) {
|
155 |
-
var el = document.getElementById(id);
|
156 |
-
if (!el) {
|
157 |
-
return;
|
158 |
-
}
|
159 |
-
|
160 |
-
var autocomplete = new google.maps.places.Autocomplete(el, {
|
161 |
-
types: rule.types
|
162 |
-
});
|
163 |
-
el.addressAutocomplete = autocomplete;
|
164 |
-
|
165 |
-
if (rule.listeners) {
|
166 |
-
for (var i in rule.listeners) {
|
167 |
-
autocomplete.addListener(i, rule.listeners[i].bind(self, el));
|
168 |
-
}
|
169 |
-
}
|
170 |
-
});
|
171 |
-
});
|
172 |
-
},
|
173 |
-
|
174 |
-
setConfig: function(json) {
|
175 |
-
config = json;
|
176 |
-
}
|
177 |
-
};
|
178 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/configurableswatches/css/swatches.css
DELETED
@@ -1,182 +0,0 @@
|
|
1 |
-
/*.clearfix:after,*/
|
2 |
-
.configurable-swatch-list:after,
|
3 |
-
.product-view .product-options .swatch-attr:after {
|
4 |
-
content: '';
|
5 |
-
display: table;
|
6 |
-
clear: both;
|
7 |
-
}
|
8 |
-
|
9 |
-
/* General Swatch Styling */
|
10 |
-
.swatch-link,
|
11 |
-
.swatch-label {
|
12 |
-
display: block;
|
13 |
-
border-radius: 3px;
|
14 |
-
font-size: 14px;
|
15 |
-
text-align: center;
|
16 |
-
color: #636363;
|
17 |
-
text-decoration: none;
|
18 |
-
box-sizing: content-box;
|
19 |
-
}
|
20 |
-
|
21 |
-
.swatch-link {
|
22 |
-
border: 1px solid #cccccc;
|
23 |
-
margin: 0 0 3px;
|
24 |
-
}
|
25 |
-
.swatch-link img {
|
26 |
-
border-radius: 2px;
|
27 |
-
}
|
28 |
-
.swatch-link:hover {
|
29 |
-
cursor: pointer;
|
30 |
-
text-decoration: none;
|
31 |
-
}
|
32 |
-
.swatch-link .x {
|
33 |
-
display: none;
|
34 |
-
text-indent: -999em;
|
35 |
-
position: absolute;
|
36 |
-
left: 0;
|
37 |
-
right: 0;
|
38 |
-
top: 0;
|
39 |
-
bottom: 0;
|
40 |
-
background: url(../images/bg_x.png) center no-repeat transparent;
|
41 |
-
z-index: 10;
|
42 |
-
}
|
43 |
-
.swatch-link.has-image .swatch-label {
|
44 |
-
position: relative;
|
45 |
-
}
|
46 |
-
.swatch-link.has-image img {
|
47 |
-
position: absolute;
|
48 |
-
top: 0;
|
49 |
-
left: 0;
|
50 |
-
}
|
51 |
-
|
52 |
-
.swatch-label {
|
53 |
-
border: 1px solid #fff;
|
54 |
-
margin: 0;
|
55 |
-
white-space: nowrap;
|
56 |
-
background: #f4f4f4;
|
57 |
-
}
|
58 |
-
|
59 |
-
.configurable-swatch-list {
|
60 |
-
margin-left: -3px;
|
61 |
-
zoom: 1;
|
62 |
-
clear: both;
|
63 |
-
-webkit-transform: translateZ(0px);
|
64 |
-
}
|
65 |
-
.configurable-swatch-list li {
|
66 |
-
float: left;
|
67 |
-
zoom: 1;
|
68 |
-
margin: 0 0 0 3px;
|
69 |
-
}
|
70 |
-
.products-grid .configurable-swatch-list li {
|
71 |
-
display: inline-block;
|
72 |
-
float: none;
|
73 |
-
margin: 0;
|
74 |
-
vertical-align: top;
|
75 |
-
}
|
76 |
-
.configurable-swatch-list .not-available .x {
|
77 |
-
display: block;
|
78 |
-
}
|
79 |
-
.configurable-swatch-list .not-available .swatch-link {
|
80 |
-
border-color: #ededed;
|
81 |
-
position: relative;
|
82 |
-
}
|
83 |
-
.configurable-swatch-list .not-available .swatch-link.has-image img {
|
84 |
-
opacity: 0.4;
|
85 |
-
filter: alpha(opacity=40);
|
86 |
-
}
|
87 |
-
.configurable-swatch-list .not-available .swatch-label {
|
88 |
-
color: #aaa;
|
89 |
-
background: #fff;
|
90 |
-
}
|
91 |
-
.configurable-swatch-list .wide-swatch .swatch-label {
|
92 |
-
padding: 0 6px;
|
93 |
-
}
|
94 |
-
.configurable-swatch-list .not-available a:focus {
|
95 |
-
outline: 0;
|
96 |
-
}
|
97 |
-
|
98 |
-
#narrow-by-list dd .configurable-swatch-list li {
|
99 |
-
margin: 0 0 0 3px;
|
100 |
-
width: 47%;
|
101 |
-
padding: 0;
|
102 |
-
background: none;
|
103 |
-
}
|
104 |
-
#narrow-by-list dd .swatch-link {
|
105 |
-
border: none;
|
106 |
-
line-height: 25px;
|
107 |
-
margin-right: 2px;
|
108 |
-
text-align: left;
|
109 |
-
}
|
110 |
-
#narrow-by-list dd .swatch-link.has-image {
|
111 |
-
line-height: inherit;
|
112 |
-
}
|
113 |
-
#narrow-by-list dd .swatch-link:hover {
|
114 |
-
text-decoration: none;
|
115 |
-
}
|
116 |
-
#narrow-by-list dd .swatch-link:hover .swatch-label {
|
117 |
-
border-color: #3399cc;
|
118 |
-
}
|
119 |
-
#narrow-by-list dd .swatch-label {
|
120 |
-
background: #f4f4f4;
|
121 |
-
border: 1px solid #cccccc;
|
122 |
-
border-radius: 3px;
|
123 |
-
display: block;
|
124 |
-
float: left;
|
125 |
-
line-height: 1.5em;
|
126 |
-
margin: 0 5px 0 0;
|
127 |
-
padding: 1px 5px;
|
128 |
-
white-space: nowrap;
|
129 |
-
}
|
130 |
-
#narrow-by-list dd .swatch-label img {
|
131 |
-
border: 1px solid #fff;
|
132 |
-
border-radius: 3px;
|
133 |
-
box-sizing: content-box;
|
134 |
-
}
|
135 |
-
#narrow-by-list dd .has-image .swatch-label {
|
136 |
-
padding: 0;
|
137 |
-
}
|
138 |
-
|
139 |
-
@media only screen and (max-width: 770px) {
|
140 |
-
#narrow-by-list dd .configurable-swatch-list li:nth-child(odd) {
|
141 |
-
clear: left;
|
142 |
-
}
|
143 |
-
}
|
144 |
-
.currently .swatch-current {
|
145 |
-
position: relative;
|
146 |
-
}
|
147 |
-
.currently .swatch-current span {
|
148 |
-
display: block;
|
149 |
-
float: left;
|
150 |
-
}
|
151 |
-
.currently .swatch-link {
|
152 |
-
display: inline-block;
|
153 |
-
margin: 0 0 0 3px;
|
154 |
-
}
|
155 |
-
.currently .swatch-link:hover {
|
156 |
-
border-color: #cccccc;
|
157 |
-
cursor: default;
|
158 |
-
}
|
159 |
-
|
160 |
-
/* Other Swatch States */
|
161 |
-
.configurable-swatch-list .hover .swatch-link,
|
162 |
-
.configurable-swatch-list .selected .swatch-link,
|
163 |
-
.swatch-link:hover {
|
164 |
-
border-color: #3399cc;
|
165 |
-
}
|
166 |
-
|
167 |
-
.configurable-swatch-box {
|
168 |
-
background: none !important;
|
169 |
-
}
|
170 |
-
.configurable-swatch-box select.swatch-select {
|
171 |
-
display: none;
|
172 |
-
}
|
173 |
-
.configurable-swatch-box .validation-advice {
|
174 |
-
margin: 0 0 5px;
|
175 |
-
background: #df280a;
|
176 |
-
padding: 2px 5px !important;
|
177 |
-
font-weight: bold;
|
178 |
-
color: #fff !important;
|
179 |
-
float: left;
|
180 |
-
display: block;
|
181 |
-
border-radius: 3px;
|
182 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/configurableswatches/images/bg_x.png
DELETED
Binary file
|
skin/frontend/base/default/tm/configurableswatches/js/app.js
DELETED
@@ -1,291 +0,0 @@
|
|
1 |
-
// ==============================================
|
2 |
-
// Pointer abstraction
|
3 |
-
// ==============================================
|
4 |
-
|
5 |
-
/**
|
6 |
-
* This class provides an easy and abstracted mechanism to determine the
|
7 |
-
* best pointer behavior to use -- that is, is the user currently interacting
|
8 |
-
* with their device in a touch manner, or using a mouse.
|
9 |
-
*
|
10 |
-
* Since devices may use either touch or mouse or both, there is no way to
|
11 |
-
* know the user's preferred pointer type until they interact with the site.
|
12 |
-
*
|
13 |
-
* To accommodate this, this class provides a method and two events
|
14 |
-
* to determine the user's preferred pointer type.
|
15 |
-
*
|
16 |
-
* - getPointer() returns the last used pointer type, or, if the user has
|
17 |
-
* not yet interacted with the site, falls back to a Modernizr test.
|
18 |
-
*
|
19 |
-
* - The mouse-detected event is triggered on the window object when the user
|
20 |
-
* is using a mouse pointer input, or has switched from touch to mouse input.
|
21 |
-
* It can be observed in this manner: $j(window).on('mouse-detected', function(event) { // custom code });
|
22 |
-
*
|
23 |
-
* - The touch-detected event is triggered on the window object when the user
|
24 |
-
* is using touch pointer input, or has switched from mouse to touch input.
|
25 |
-
* It can be observed in this manner: $j(window).on('touch-detected', function(event) { // custom code });
|
26 |
-
*/
|
27 |
-
var PointerManager = {
|
28 |
-
MOUSE_POINTER_TYPE: 'mouse',
|
29 |
-
TOUCH_POINTER_TYPE: 'touch',
|
30 |
-
POINTER_EVENT_TIMEOUT_MS: 500,
|
31 |
-
standardTouch: false,
|
32 |
-
touchDetectionEvent: null,
|
33 |
-
lastTouchType: null,
|
34 |
-
pointerTimeout: null,
|
35 |
-
pointerEventLock: false,
|
36 |
-
|
37 |
-
getPointerEventsSupported: function() {
|
38 |
-
return this.standardTouch;
|
39 |
-
},
|
40 |
-
|
41 |
-
getPointerEventsInputTypes: function() {
|
42 |
-
if (window.navigator.pointerEnabled) { //IE 11+
|
43 |
-
//return string values from http://msdn.microsoft.com/en-us/library/windows/apps/hh466130.aspx
|
44 |
-
return {
|
45 |
-
MOUSE: 'mouse',
|
46 |
-
TOUCH: 'touch',
|
47 |
-
PEN: 'pen'
|
48 |
-
};
|
49 |
-
} else if (window.navigator.msPointerEnabled) { //IE 10
|
50 |
-
//return numeric values from http://msdn.microsoft.com/en-us/library/windows/apps/hh466130.aspx
|
51 |
-
return {
|
52 |
-
MOUSE: 0x00000004,
|
53 |
-
TOUCH: 0x00000002,
|
54 |
-
PEN: 0x00000003
|
55 |
-
};
|
56 |
-
} else { //other browsers don't support pointer events
|
57 |
-
return {}; //return empty object
|
58 |
-
}
|
59 |
-
},
|
60 |
-
|
61 |
-
/**
|
62 |
-
* If called before init(), get best guess of input pointer type
|
63 |
-
* using Modernizr test.
|
64 |
-
* If called after init(), get current pointer in use.
|
65 |
-
*/
|
66 |
-
getPointer: function() {
|
67 |
-
// On iOS devices, always default to touch, as this.lastTouchType will intermittently return 'mouse' if
|
68 |
-
// multiple touches are triggered in rapid succession in Safari on iOS
|
69 |
-
if(Modernizr.ios) {
|
70 |
-
return this.TOUCH_POINTER_TYPE;
|
71 |
-
}
|
72 |
-
|
73 |
-
if(this.lastTouchType) {
|
74 |
-
return this.lastTouchType;
|
75 |
-
}
|
76 |
-
|
77 |
-
return Modernizr.touch ? this.TOUCH_POINTER_TYPE : this.MOUSE_POINTER_TYPE;
|
78 |
-
},
|
79 |
-
|
80 |
-
setPointerEventLock: function() {
|
81 |
-
this.pointerEventLock = true;
|
82 |
-
},
|
83 |
-
clearPointerEventLock: function() {
|
84 |
-
this.pointerEventLock = false;
|
85 |
-
},
|
86 |
-
setPointerEventLockTimeout: function() {
|
87 |
-
var that = this;
|
88 |
-
|
89 |
-
if(this.pointerTimeout) {
|
90 |
-
clearTimeout(this.pointerTimeout);
|
91 |
-
}
|
92 |
-
|
93 |
-
this.setPointerEventLock();
|
94 |
-
this.pointerTimeout = setTimeout(function() { that.clearPointerEventLock(); }, this.POINTER_EVENT_TIMEOUT_MS);
|
95 |
-
},
|
96 |
-
|
97 |
-
triggerMouseEvent: function(originalEvent) {
|
98 |
-
if(this.lastTouchType == this.MOUSE_POINTER_TYPE) {
|
99 |
-
return; //prevent duplicate events
|
100 |
-
}
|
101 |
-
|
102 |
-
this.lastTouchType = this.MOUSE_POINTER_TYPE;
|
103 |
-
$j(window).trigger('mouse-detected', originalEvent);
|
104 |
-
},
|
105 |
-
triggerTouchEvent: function(originalEvent) {
|
106 |
-
if(this.lastTouchType == this.TOUCH_POINTER_TYPE) {
|
107 |
-
return; //prevent duplicate events
|
108 |
-
}
|
109 |
-
|
110 |
-
this.lastTouchType = this.TOUCH_POINTER_TYPE;
|
111 |
-
$j(window).trigger('touch-detected', originalEvent);
|
112 |
-
},
|
113 |
-
|
114 |
-
initEnv: function() {
|
115 |
-
if (window.navigator.pointerEnabled) {
|
116 |
-
this.standardTouch = true;
|
117 |
-
this.touchDetectionEvent = 'pointermove';
|
118 |
-
} else if (window.navigator.msPointerEnabled) {
|
119 |
-
this.standardTouch = true;
|
120 |
-
this.touchDetectionEvent = 'MSPointerMove';
|
121 |
-
} else {
|
122 |
-
this.touchDetectionEvent = 'touchstart';
|
123 |
-
}
|
124 |
-
},
|
125 |
-
|
126 |
-
wirePointerDetection: function() {
|
127 |
-
var that = this;
|
128 |
-
|
129 |
-
if(this.standardTouch) { //standard-based touch events. Wire only one event.
|
130 |
-
//detect pointer event
|
131 |
-
$j(window).on(this.touchDetectionEvent, function(e) {
|
132 |
-
switch(e.originalEvent.pointerType) {
|
133 |
-
case that.getPointerEventsInputTypes().MOUSE:
|
134 |
-
that.triggerMouseEvent(e);
|
135 |
-
break;
|
136 |
-
case that.getPointerEventsInputTypes().TOUCH:
|
137 |
-
case that.getPointerEventsInputTypes().PEN:
|
138 |
-
// intentionally group pen and touch together
|
139 |
-
that.triggerTouchEvent(e);
|
140 |
-
break;
|
141 |
-
}
|
142 |
-
});
|
143 |
-
} else { //non-standard touch events. Wire touch and mouse competing events.
|
144 |
-
//detect first touch
|
145 |
-
$j(window).on(this.touchDetectionEvent, function(e) {
|
146 |
-
if(that.pointerEventLock) {
|
147 |
-
return;
|
148 |
-
}
|
149 |
-
|
150 |
-
that.setPointerEventLockTimeout();
|
151 |
-
that.triggerTouchEvent(e);
|
152 |
-
});
|
153 |
-
|
154 |
-
//detect mouse usage
|
155 |
-
$j(document).on('mouseover', function(e) {
|
156 |
-
if(that.pointerEventLock) {
|
157 |
-
return;
|
158 |
-
}
|
159 |
-
|
160 |
-
that.setPointerEventLockTimeout();
|
161 |
-
that.triggerMouseEvent(e);
|
162 |
-
});
|
163 |
-
}
|
164 |
-
},
|
165 |
-
|
166 |
-
init: function() {
|
167 |
-
this.initEnv();
|
168 |
-
this.wirePointerDetection();
|
169 |
-
}
|
170 |
-
};
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Default ProductMediaManager for default magento Zoom
|
174 |
-
* @type {Object}
|
175 |
-
*/
|
176 |
-
var ProductMediaManager = {
|
177 |
-
IMAGE_ZOOM_THRESHOLD: 20,
|
178 |
-
imageWrapper: null,
|
179 |
-
|
180 |
-
destroyZoom: function() {},
|
181 |
-
initZoom: function() {},
|
182 |
-
wireThumbnails: function() {},
|
183 |
-
|
184 |
-
createZoom: function(image) {
|
185 |
-
var img = $j('.product-img-box .product-image img');
|
186 |
-
|
187 |
-
var srcset = img.attr('srcset'),
|
188 |
-
newSrc = image.attr('src');
|
189 |
-
img.attr('src', newSrc);
|
190 |
-
|
191 |
-
if (srcset) {
|
192 |
-
if (image.attr('srcset')) {
|
193 |
-
img.attr('srcset', image.attr('srcset'));
|
194 |
-
} else {
|
195 |
-
var newSrcset = '';
|
196 |
-
srcset.split(',').each(function(rule) {
|
197 |
-
rule = rule.split(' ');
|
198 |
-
newSrcset = newSrc + ' ' + rule[1];
|
199 |
-
});
|
200 |
-
img.attr('srcset', newSrcset);
|
201 |
-
}
|
202 |
-
}
|
203 |
-
},
|
204 |
-
|
205 |
-
swapImage: function(targetImage) {
|
206 |
-
targetImage = $j(targetImage);
|
207 |
-
targetImage.addClass('gallery-image');
|
208 |
-
|
209 |
-
var imageGallery = $j('.product-img-box .product-image');
|
210 |
-
|
211 |
-
if (targetImage[0].complete) {
|
212 |
-
ProductMediaManager.createZoom(targetImage);
|
213 |
-
} else {
|
214 |
-
imageGallery.addClass('loading');
|
215 |
-
imagesLoaded(targetImage, function() {
|
216 |
-
imageGallery.removeClass('loading');
|
217 |
-
ProductMediaManager.createZoom(targetImage);
|
218 |
-
});
|
219 |
-
}
|
220 |
-
},
|
221 |
-
|
222 |
-
init: function() {
|
223 |
-
ProductMediaManager.imageWrapper = $j('.product-img-box');
|
224 |
-
$j(document).trigger('product-media-loaded', ProductMediaManager);
|
225 |
-
}
|
226 |
-
};
|
227 |
-
|
228 |
-
$j(document).ready(function() {
|
229 |
-
ProductMediaManager.init();
|
230 |
-
});
|
231 |
-
|
232 |
-
// configurable swatches integration
|
233 |
-
document.observe("dom:loaded", function () {
|
234 |
-
if ('undefined' !== typeof Product && 'undefined' !== typeof Product.ConfigurableSwatches) {
|
235 |
-
Product.ConfigurableSwatches.prototype.initialize =
|
236 |
-
Product.ConfigurableSwatches.prototype.initialize.wrap(function(original, spConfig) {
|
237 |
-
// fix for multiple calls to Product.ConfigurableSwatches
|
238 |
-
this._E.activeConfigurableOptions = [];
|
239 |
-
this._E.allConfigurableOptions = [];
|
240 |
-
|
241 |
-
original(spConfig);
|
242 |
-
});
|
243 |
-
}
|
244 |
-
|
245 |
-
if ('undefined' !== typeof ConfigurableMediaImages) {
|
246 |
-
ConfigurableMediaImages.init = ConfigurableMediaImages.init.wrap(function(original, imageType) {
|
247 |
-
// fit to make the swatches work in listing after the ajax popup with another swatches was closed
|
248 |
-
if (ConfigurableMediaImages.imageType) {
|
249 |
-
imageType = ConfigurableMediaImages.imageType;
|
250 |
-
}
|
251 |
-
original(imageType);
|
252 |
-
});
|
253 |
-
|
254 |
-
/**
|
255 |
-
* Improved method to prevent overriding of previously loaded data.
|
256 |
-
* This happens when AjaxPro popup is called on category listing or More products is clicked -
|
257 |
-
* object with base_image info override the object with small_image info.
|
258 |
-
*
|
259 |
-
* @param {Int} productId
|
260 |
-
* @param {Object} imageFallback
|
261 |
-
*/
|
262 |
-
ConfigurableMediaImages.setImageFallback = function(productId, imageFallback) {
|
263 |
-
for (var i in imageFallback) {
|
264 |
-
var oldData = ConfigurableMediaImages.productImages[productId] ?
|
265 |
-
ConfigurableMediaImages.productImages[productId][i] : undefined;
|
266 |
-
|
267 |
-
if (oldData) {
|
268 |
-
if (undefined === oldData.length || oldData.length) {
|
269 |
-
continue; // data is already loaded
|
270 |
-
}
|
271 |
-
}
|
272 |
-
|
273 |
-
if (!ConfigurableMediaImages.productImages[productId]) {
|
274 |
-
ConfigurableMediaImages.productImages[productId] = imageFallback;
|
275 |
-
} else {
|
276 |
-
ConfigurableMediaImages.productImages[productId][i] = imageFallback[i];
|
277 |
-
}
|
278 |
-
}
|
279 |
-
};
|
280 |
-
|
281 |
-
// Magento ConfigurableMediaImages.arrayIntersect is written to
|
282 |
-
// receive sorted product ids but it's not always true.
|
283 |
-
// The next override will fix this issue
|
284 |
-
ConfigurableMediaImages.arrayIntersect =
|
285 |
-
ConfigurableMediaImages.arrayIntersect.wrap(function(o, a, b) {
|
286 |
-
a.sort();
|
287 |
-
b.sort();
|
288 |
-
return o(a, b);
|
289 |
-
});
|
290 |
-
}
|
291 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/downloadable/css/main.css
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
.list-downloadable-products { margin: 0; padding: 0 0; background: #fafafa; }
|
2 |
-
.list-downloadable-products ul { padding: 0 0 0 20px; }
|
3 |
-
.list-downloadable-products ul ul { padding: 0 0 0 15px; }
|
4 |
-
.list-downloadable-products li { line-height: 20px; clear: both; }
|
5 |
-
|
6 |
-
.list-downloadable-products .item-product { border-bottom: 1px solid #e5e5e5; }
|
7 |
-
.list-downloadable-products .item-product.last { border: none; }
|
8 |
-
.list-downloadable-products .product-line { padding: 7px 7px; line-height: 20px; }
|
9 |
-
.list-downloadable-products .even .product-line,
|
10 |
-
.list-downloadable-products .expanded .product-line { background: #f4f3f3; }
|
11 |
-
.list-downloadable-products .product-line .name { cursor: pointer; opacity: .8; width: 45%; }
|
12 |
-
.list-downloadable-products .expanded .product-line .name,
|
13 |
-
.list-downloadable-products .product-line .name:hover { opacity: 1; }
|
14 |
-
|
15 |
-
.list-downloadable-products .icon-expand-toggle {
|
16 |
-
display: inline-block;
|
17 |
-
vertical-align: middle;
|
18 |
-
width: 12px;
|
19 |
-
height: 12px;
|
20 |
-
background: url(../images/add.png) no-repeat 50% 50%;
|
21 |
-
cursor: pointer;
|
22 |
-
border: 1px solid #cacaca;
|
23 |
-
border-radius: 4px;
|
24 |
-
margin-right: 4px;
|
25 |
-
}
|
26 |
-
.list-downloadable-products .icon-expand-toggle:hover { opacity: 1; }
|
27 |
-
.list-downloadable-products .expanded .icon-expand-toggle { background-image: url(../images/subtract.png); }
|
28 |
-
|
29 |
-
.list-downloadable-products .list-orders { display: none; margin: 0 0 15px; }
|
30 |
-
.list-downloadable-products .expanded .list-orders { display: block; }
|
31 |
-
.list-downloadable-products .item-order { margin: 0 0 5px; }
|
32 |
-
.list-downloadable-products .order-line { margin: 0 0 2px; padding: 1px 5px; background: #eaeaea; }
|
33 |
-
.list-downloadable-products .order-line .column { float: left; }
|
34 |
-
.list-downloadable-products .order-line .order-status { float: right; font-size: .9em; }
|
35 |
-
.list-downloadable-products .order-line .date-expire { color: #888; }
|
36 |
-
.list-downloadable-products .order-line .expired { color: #de3f3f; }
|
37 |
-
.list-downloadable-products .order-line .renew-purchase { text-align: right; margin: 0 0 0 5px; }
|
38 |
-
|
39 |
-
.list-downloadable-products .item-link .column { float: left; width: 15%; }
|
40 |
-
.list-downloadable-products .item-link { }
|
41 |
-
.list-downloadable-products .item-link.no-access { font-weight: bold; }
|
42 |
-
.list-downloadable-products .item-link:first-child { border: none; }
|
43 |
-
.list-downloadable-products .item-link .link-remaining { width: 53%; }
|
44 |
-
|
45 |
-
.cf { *zoom: 1; }
|
46 |
-
.cf:before,
|
47 |
-
.cf:after { content: " "; display: table; }
|
48 |
-
.cf:after { clear: both; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/downloadable/images/add.png
DELETED
Binary file
|
skin/frontend/base/default/tm/downloadable/images/subtract.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easybanner/css/easybanner.css
DELETED
@@ -1,76 +0,0 @@
|
|
1 |
-
.easybanner-lightbox-el {
|
2 |
-
border-radius: 5px;
|
3 |
-
box-sizing: content-box;
|
4 |
-
padding: 25px;
|
5 |
-
position: fixed;
|
6 |
-
z-index: 10000;
|
7 |
-
left: 0;
|
8 |
-
top: 0;
|
9 |
-
background: #fff;
|
10 |
-
box-shadow: 0 0 10px rgba(0,0,0,0.4);
|
11 |
-
max-width: 700px;
|
12 |
-
text-align: left;
|
13 |
-
}
|
14 |
-
.easybanner-lightbox-content {
|
15 |
-
overflow: auto;
|
16 |
-
}
|
17 |
-
.easybanner-lightbox-content .easybanner-image-link {
|
18 |
-
display: inline-block; /*IE overflow fix*/
|
19 |
-
}
|
20 |
-
.easybanner-lightbox-el .close-icon,
|
21 |
-
.easybanner-awesomebar-el .close-icon {
|
22 |
-
direction: ltr;
|
23 |
-
position: absolute;
|
24 |
-
background: #fff;
|
25 |
-
color: #000;
|
26 |
-
font: bold 18px/23px "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
|
27 |
-
text-decoration: none;
|
28 |
-
text-align: center;
|
29 |
-
width: 26px;
|
30 |
-
height: 26px;
|
31 |
-
border-radius: 50%;
|
32 |
-
right: 2px;
|
33 |
-
top: 2px;
|
34 |
-
}
|
35 |
-
.easybanner-lightbox-el .close-icon:hover,
|
36 |
-
.easybanner-awesomebar-el .close-icon:hover {
|
37 |
-
background-color: #eee;
|
38 |
-
}
|
39 |
-
|
40 |
-
.easybanner-overlay-el {
|
41 |
-
position: fixed;
|
42 |
-
top: 0;
|
43 |
-
left: 0;
|
44 |
-
width: 100%;
|
45 |
-
height: 100%;
|
46 |
-
z-index: 9999;
|
47 |
-
background-color: #000;
|
48 |
-
background-color: rgba(0,0,0,0.7);
|
49 |
-
}
|
50 |
-
|
51 |
-
.easybanner-awesomebar-el {
|
52 |
-
left: 0;
|
53 |
-
top: -400px;
|
54 |
-
position: fixed;
|
55 |
-
background: #fff;
|
56 |
-
box-shadow: 0 0 10px rgba(0,0,0,0.4);
|
57 |
-
text-align: left;
|
58 |
-
z-index: 9998;
|
59 |
-
width: 100%;
|
60 |
-
-webkit-transition: top 300ms ease;
|
61 |
-
-moz-transition: top 300ms ease;
|
62 |
-
-o-transition: top 300ms ease;
|
63 |
-
transition: top 300ms ease;
|
64 |
-
}
|
65 |
-
.easybanner-awesomebar-content {
|
66 |
-
width: 960px;
|
67 |
-
margin: 0 auto;
|
68 |
-
padding: 10px 0;
|
69 |
-
}
|
70 |
-
.easybanner-awesomebar-el .close-icon {
|
71 |
-
right: 10px;
|
72 |
-
top: 10px;
|
73 |
-
}
|
74 |
-
@media (max-width: 979px) {
|
75 |
-
.easybanner-awesomebar-content { width: auto; padding: 10px; }
|
76 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easybanner/js/easybanner.js
DELETED
@@ -1,457 +0,0 @@
|
|
1 |
-
var Easybanner = {};
|
2 |
-
|
3 |
-
Easybanner.Cookie = function() {
|
4 |
-
var _cookie = {};
|
5 |
-
|
6 |
-
function write() {
|
7 |
-
Mage.Cookies.set(
|
8 |
-
'easybanner',
|
9 |
-
JSON.stringify(_cookie),
|
10 |
-
new Date('Tue, 19 Jan 2038 03:14:07 GMT')
|
11 |
-
);
|
12 |
-
}
|
13 |
-
(function read() {
|
14 |
-
var jsonString = Mage.Cookies.get('easybanner');
|
15 |
-
if (jsonString && jsonString.length) {
|
16 |
-
try {
|
17 |
-
_cookie = JSON.parse(jsonString);
|
18 |
-
} catch (e) {}
|
19 |
-
}
|
20 |
-
}());
|
21 |
-
|
22 |
-
return {
|
23 |
-
get: function(bannerId, key, defaultValue) {
|
24 |
-
defaultValue = defaultValue || 0;
|
25 |
-
if ('undefined' === typeof _cookie[bannerId]) {
|
26 |
-
_cookie[bannerId] = {};
|
27 |
-
}
|
28 |
-
|
29 |
-
if (key) {
|
30 |
-
if (undefined !== _cookie[bannerId][key]) {
|
31 |
-
return _cookie[bannerId][key];
|
32 |
-
} else {
|
33 |
-
return defaultValue;
|
34 |
-
}
|
35 |
-
} else {
|
36 |
-
return _cookie[bannerId];
|
37 |
-
}
|
38 |
-
},
|
39 |
-
set: function(bannerId, key, value) {
|
40 |
-
_cookie[bannerId][key] = value;
|
41 |
-
write();
|
42 |
-
}
|
43 |
-
};
|
44 |
-
}();
|
45 |
-
|
46 |
-
Easybanner.Timer = function() {
|
47 |
-
var _frequency = 1000,
|
48 |
-
_timers = {
|
49 |
-
inactivity: 0,
|
50 |
-
activity : 0,
|
51 |
-
browsing : localStorage.getItem('easybanner_timer_browsing') || 0
|
52 |
-
};
|
53 |
-
|
54 |
-
function tick() {
|
55 |
-
for (var i in _timers) {
|
56 |
-
_timers[i]++;
|
57 |
-
}
|
58 |
-
if (_timers.inactivity >= 10) {
|
59 |
-
reset('activity');
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
function reset(timer) {
|
64 |
-
_timers[timer] = 0;
|
65 |
-
}
|
66 |
-
|
67 |
-
setInterval(tick.bind(this), _frequency);
|
68 |
-
['mousemove', 'click', 'scroll', 'keyup'].each(function(eventName) {
|
69 |
-
document.observe(eventName, reset.bind(this, 'inactivity'));
|
70 |
-
});
|
71 |
-
document.observe('dom:loaded', function() {
|
72 |
-
// reset browsing time, if last visit was more that two hours ago
|
73 |
-
var lastVisit = localStorage.getItem('easybanner_last_visit'),
|
74 |
-
now = new Date();
|
75 |
-
|
76 |
-
localStorage.setItem('easybanner_last_visit', now.toISOString());
|
77 |
-
|
78 |
-
if (!lastVisit) {
|
79 |
-
return;
|
80 |
-
}
|
81 |
-
|
82 |
-
lastVisit = new Date(lastVisit);
|
83 |
-
if (isNaN(lastVisit.getTime())) {
|
84 |
-
return;
|
85 |
-
}
|
86 |
-
if (((Math.abs(now - lastVisit) / 1000) / 60) > 120) {
|
87 |
-
reset('browsing');
|
88 |
-
}
|
89 |
-
});
|
90 |
-
window.onbeforeunload = function() {
|
91 |
-
localStorage.setItem('easybanner_timer_browsing', _timers.browsing);
|
92 |
-
};
|
93 |
-
|
94 |
-
return {
|
95 |
-
getInactivityTime: function() {
|
96 |
-
return _timers.inactivity;
|
97 |
-
},
|
98 |
-
getActivityTime: function() {
|
99 |
-
return _timers.activity;
|
100 |
-
},
|
101 |
-
getBrowsingTime: function() {
|
102 |
-
return _timers.browsing;
|
103 |
-
}
|
104 |
-
};
|
105 |
-
}();
|
106 |
-
|
107 |
-
Easybanner.Rule = function() {
|
108 |
-
var _conditions = {},
|
109 |
-
_timer = Easybanner.Timer,
|
110 |
-
_cookie = Easybanner.Cookie,
|
111 |
-
_currentId;
|
112 |
-
|
113 |
-
function _compareCondition(v1, v2, op) {
|
114 |
-
var result = false;
|
115 |
-
switch (op) {
|
116 |
-
case '>':
|
117 |
-
result = (parseInt(v2) > parseInt(v1));
|
118 |
-
break;
|
119 |
-
case '<':
|
120 |
-
result = (parseInt(v2) < parseInt(v1));
|
121 |
-
break;
|
122 |
-
}
|
123 |
-
return result;
|
124 |
-
}
|
125 |
-
|
126 |
-
function _validateConditions(filter, aggregator, value) {
|
127 |
-
var result = true;
|
128 |
-
if (filter.aggregator && filter.conditions) {
|
129 |
-
for (var i = 0; i < filter.conditions.length; i++) {
|
130 |
-
var condition = filter.conditions[i];
|
131 |
-
result = _validateConditions(
|
132 |
-
condition, filter.aggregator, filter.value
|
133 |
-
);
|
134 |
-
|
135 |
-
if ((filter.aggregator == 'all' && filter.value == '1' && !result) ||
|
136 |
-
(filter.aggregator == 'any' && filter.value == '1' && result)) {
|
137 |
-
|
138 |
-
break;
|
139 |
-
} else if ((filter.aggregator == 'all' && filter.value == '0' && result) ||
|
140 |
-
(filter.aggregator == 'any' && filter.value == '0' && !result)) {
|
141 |
-
|
142 |
-
result = !result;
|
143 |
-
break;
|
144 |
-
}
|
145 |
-
}
|
146 |
-
} else if (filter.attribute) {
|
147 |
-
var comparator;
|
148 |
-
switch (filter.attribute) {
|
149 |
-
case 'browsing_time':
|
150 |
-
comparator = _timer.getBrowsingTime();
|
151 |
-
break;
|
152 |
-
case 'inactivity_time':
|
153 |
-
comparator = _timer.getInactivityTime();
|
154 |
-
break;
|
155 |
-
case 'activity_time':
|
156 |
-
comparator = _timer.getActivityTime();
|
157 |
-
break;
|
158 |
-
case 'display_count_per_customer':
|
159 |
-
comparator = _cookie.get(_currentId, 'display_count');
|
160 |
-
break;
|
161 |
-
case 'scroll_offset':
|
162 |
-
var offsets = document.viewport.getScrollOffsets();
|
163 |
-
comparator = Math.max(offsets.left, offsets.top);
|
164 |
-
break;
|
165 |
-
default:
|
166 |
-
return true;
|
167 |
-
}
|
168 |
-
result = _compareCondition(filter.value, comparator, filter.operator);
|
169 |
-
}
|
170 |
-
return result;
|
171 |
-
}
|
172 |
-
|
173 |
-
return {
|
174 |
-
validate: function(id) {
|
175 |
-
_currentId = id;
|
176 |
-
return _validateConditions(_conditions[id]);
|
177 |
-
},
|
178 |
-
addConditions: function(conditions) {
|
179 |
-
for (var i in conditions) {
|
180 |
-
_conditions[i] = conditions[i];
|
181 |
-
}
|
182 |
-
}
|
183 |
-
};
|
184 |
-
}();
|
185 |
-
|
186 |
-
Easybanner.Popup = function() {
|
187 |
-
var _cookie = Easybanner.Cookie,
|
188 |
-
_rule = Easybanner.Rule,
|
189 |
-
_bannerIds = [];
|
190 |
-
|
191 |
-
var _lightbox = {
|
192 |
-
overlayId: 'easybanner-overlay-el',
|
193 |
-
id : 'easybanner-lightbox-el',
|
194 |
-
markup : [
|
195 |
-
'<div id="easybanner-overlay-el" class="easybanner-overlay-el" style="display:none;"></div>',
|
196 |
-
'<div id="easybanner-lightbox-el" class="easybanner-lightbox-el" style="display:none;">',
|
197 |
-
'<a href="javascript:void(0)" class="close close-icon">x</a>',
|
198 |
-
'<div class="easybanner-lightbox-content"></div>',
|
199 |
-
'</div>'
|
200 |
-
].join(''),
|
201 |
-
create: function() {
|
202 |
-
document.body.insert(this.markup);
|
203 |
-
this.overlay = $(this.overlayId);
|
204 |
-
this.el = $(this.id);
|
205 |
-
},
|
206 |
-
addObservers: function() {
|
207 |
-
if (!this._onKeyPressBind) {
|
208 |
-
this._onKeyPressBind = this._onKeyPress.bind(this);
|
209 |
-
this._hideBind = this.hide.bind(this);
|
210 |
-
}
|
211 |
-
|
212 |
-
this.el.select('.close').each(function(el) {
|
213 |
-
el.stopObserving('click', this._hideBind);
|
214 |
-
el.observe('click', this._hideBind);
|
215 |
-
}.bind(this));
|
216 |
-
|
217 |
-
this.el.select('img').each(function(img) {
|
218 |
-
img.onload = this.center.bind(this);
|
219 |
-
}.bind(this));
|
220 |
-
|
221 |
-
document.stopObserving('keyup', this._onKeyPressBind);
|
222 |
-
document.observe('keyup', this._onKeyPressBind);
|
223 |
-
|
224 |
-
if ('addEventListener' in window) {
|
225 |
-
window.addEventListener('resize', this.center.bind(this));
|
226 |
-
} else {
|
227 |
-
window.attachEvent('onresize', this.center.bind(this));
|
228 |
-
}
|
229 |
-
},
|
230 |
-
getContentEl: function() {
|
231 |
-
return this.el.down('.easybanner-lightbox-content');
|
232 |
-
},
|
233 |
-
show: function (html) {
|
234 |
-
if (!html) {
|
235 |
-
return;
|
236 |
-
}
|
237 |
-
if (!this.el) {
|
238 |
-
this.create();
|
239 |
-
}
|
240 |
-
|
241 |
-
this.getContentEl().update(html);
|
242 |
-
this.addObservers();
|
243 |
-
|
244 |
-
new Effect.Parallel([
|
245 |
-
new Effect.Appear(this.overlay, { sync: true, from: 0, to: 1 }),
|
246 |
-
new Effect.Appear(this.el, { sync: true, from: 0, to: 1 })
|
247 |
-
], {
|
248 |
-
duration: 0.8
|
249 |
-
});
|
250 |
-
|
251 |
-
this.center();
|
252 |
-
},
|
253 |
-
hide: function() {
|
254 |
-
if (this._onKeyPressBind) {
|
255 |
-
document.stopObserving('keyup', this._onKeyPressBind);
|
256 |
-
}
|
257 |
-
$$('.placeholder-lightbox').first().insert({
|
258 |
-
bottom: this.getContentEl().down()
|
259 |
-
});
|
260 |
-
this.overlay.hide();
|
261 |
-
this.el.hide();
|
262 |
-
},
|
263 |
-
resetLayout: function() {
|
264 |
-
this.getContentEl().setStyle({
|
265 |
-
height: 'auto'
|
266 |
-
});
|
267 |
-
this.el.setStyle({
|
268 |
-
width : 0,
|
269 |
-
height: 0
|
270 |
-
});
|
271 |
-
this.el.setStyle({
|
272 |
-
width : 'auto',
|
273 |
-
height: 'auto',
|
274 |
-
margin: 0,
|
275 |
-
left: 0,
|
276 |
-
top : 0
|
277 |
-
});
|
278 |
-
},
|
279 |
-
center: function() {
|
280 |
-
this.resetLayout();
|
281 |
-
|
282 |
-
var viewportSize = document.viewport.getDimensions(),
|
283 |
-
width = this.el.getWidth(),
|
284 |
-
gap = {
|
285 |
-
horizontal: 50,
|
286 |
-
vertical : 50
|
287 |
-
};
|
288 |
-
|
289 |
-
if (viewportSize.width < (width + gap.horizontal)) {
|
290 |
-
width = viewportSize.width - gap.horizontal;
|
291 |
-
}
|
292 |
-
this.el.setStyle({
|
293 |
-
width: width -
|
294 |
-
parseInt(this.el.getStyle('paddingLeft')) -
|
295 |
-
parseInt(this.el.getStyle('paddingRight')) + 'px',
|
296 |
-
left: '50%',
|
297 |
-
marginLeft: - width / 2 + 'px'
|
298 |
-
});
|
299 |
-
|
300 |
-
var height = this.el.getHeight();
|
301 |
-
if (viewportSize.height < (height + gap.vertical)) {
|
302 |
-
height = viewportSize.height - gap.vertical;
|
303 |
-
}
|
304 |
-
this.getContentEl().setStyle({
|
305 |
-
height: height + 2 - // +2 - is the fix for button in active pressed state
|
306 |
-
parseInt(this.el.getStyle('paddingTop')) -
|
307 |
-
parseInt(this.el.getStyle('paddingBottom')) + 'px'
|
308 |
-
});
|
309 |
-
this.el.setStyle({
|
310 |
-
top: '50%',
|
311 |
-
marginTop: - height / 2 + 'px'
|
312 |
-
});
|
313 |
-
},
|
314 |
-
_onKeyPress: function(e) {
|
315 |
-
if (e.keyCode == 27) {
|
316 |
-
this.hide();
|
317 |
-
}
|
318 |
-
}
|
319 |
-
};
|
320 |
-
|
321 |
-
var _awesomebar = {
|
322 |
-
id : 'easybanner-awesomebar-el',
|
323 |
-
markup: [
|
324 |
-
'<div id="easybanner-awesomebar-el" class="easybanner-awesomebar-el" style="display:none;">',
|
325 |
-
'<a href="javascript:void(0)" class="close close-icon">x</a>',
|
326 |
-
'<div class="easybanner-awesomebar-content"></div>',
|
327 |
-
'</div>'
|
328 |
-
].join(''),
|
329 |
-
create: function() {
|
330 |
-
document.body.insert(this.markup);
|
331 |
-
this.el = $(this.id);
|
332 |
-
},
|
333 |
-
addObservers: function() {
|
334 |
-
if (!this._hideBind) {
|
335 |
-
this._hideBind = this.hide.bind(this);
|
336 |
-
}
|
337 |
-
|
338 |
-
this.el.select('.close').each(function(el) {
|
339 |
-
el.stopObserving('click', this._hideBind);
|
340 |
-
el.observe('click', this._hideBind);
|
341 |
-
}.bind(this));
|
342 |
-
},
|
343 |
-
getContentEl: function() {
|
344 |
-
return this.el.down('.easybanner-awesomebar-content');
|
345 |
-
},
|
346 |
-
getTransitionDuration: function() {
|
347 |
-
var duration = this.el.getStyle('transition-duration');
|
348 |
-
if (duration) {
|
349 |
-
duration = parseFloat(duration) * 1000;
|
350 |
-
} else {
|
351 |
-
return 0;
|
352 |
-
}
|
353 |
-
return duration;
|
354 |
-
},
|
355 |
-
show: function (html) {
|
356 |
-
if (!html) {
|
357 |
-
return;
|
358 |
-
}
|
359 |
-
if (!this.el) {
|
360 |
-
this.create();
|
361 |
-
}
|
362 |
-
|
363 |
-
this.getContentEl().update(html);
|
364 |
-
this.addObservers();
|
365 |
-
|
366 |
-
this.el.show();
|
367 |
-
setTimeout(function() {
|
368 |
-
this.el.setStyle({
|
369 |
-
top: 0
|
370 |
-
});
|
371 |
-
}.bind(this), 10);
|
372 |
-
},
|
373 |
-
hide: function() {
|
374 |
-
this.el.setStyle({
|
375 |
-
top: - this.el.getHeight() - 20 + 'px'
|
376 |
-
});
|
377 |
-
// time to hide the bar before move it
|
378 |
-
setTimeout(function() {
|
379 |
-
$$('.placeholder-awesomebar').first().insert({
|
380 |
-
bottom: this.getContentEl().down()
|
381 |
-
});
|
382 |
-
this.el.hide();
|
383 |
-
}.bind(this), this.getTransitionDuration());
|
384 |
-
}
|
385 |
-
};
|
386 |
-
|
387 |
-
return {
|
388 |
-
init: function() {
|
389 |
-
$$('.placeholder-popup .easybanner-banner').each(function(el) {
|
390 |
-
_bannerIds.push(el.id);
|
391 |
-
}.bind(this));
|
392 |
-
this.initBanners();
|
393 |
-
},
|
394 |
-
initBanners: function() {
|
395 |
-
var shownIds = [],
|
396 |
-
limit = _bannerIds.length;
|
397 |
-
|
398 |
-
for (var i = 0; i < limit; ++i) {
|
399 |
-
if (_rule.validate(_bannerIds[i])) {
|
400 |
-
this.show(_bannerIds[i]);
|
401 |
-
shownIds.push(_bannerIds[i]);
|
402 |
-
}
|
403 |
-
}
|
404 |
-
for (i = 0; i < shownIds.length; ++i) {
|
405 |
-
_bannerIds.splice(_bannerIds.indexOf(shownIds[i]), 1);
|
406 |
-
}
|
407 |
-
|
408 |
-
if (_bannerIds.length) {
|
409 |
-
setTimeout(this.initBanners.bind(this), 1000);
|
410 |
-
}
|
411 |
-
},
|
412 |
-
show: function(id) {
|
413 |
-
var el = $(id);
|
414 |
-
if (!el) {
|
415 |
-
return;
|
416 |
-
}
|
417 |
-
|
418 |
-
if (el.up('.placeholder-lightbox')) {
|
419 |
-
popupObject = _lightbox;
|
420 |
-
} else if (el.up('.placeholder-awesomebar')) {
|
421 |
-
popupObject = _awesomebar;
|
422 |
-
} else {
|
423 |
-
return;
|
424 |
-
}
|
425 |
-
|
426 |
-
// show only one banner at once
|
427 |
-
if (popupObject.el && popupObject.el.visible()) {
|
428 |
-
return;
|
429 |
-
}
|
430 |
-
|
431 |
-
popupObject.show(el);
|
432 |
-
|
433 |
-
var count = _cookie.get(id, 'display_count');
|
434 |
-
if (!count) {
|
435 |
-
count = 0;
|
436 |
-
}
|
437 |
-
_cookie.set(id, 'display_count', ++count);
|
438 |
-
},
|
439 |
-
hide: function(id) {
|
440 |
-
var el = $(id);
|
441 |
-
|
442 |
-
if (el.up('.easybanner-lightbox-el')) {
|
443 |
-
popupObject = _lightbox;
|
444 |
-
} else if (el.up('.easybanner-awesomebar-el')) {
|
445 |
-
popupObject = _awesomebar;
|
446 |
-
} else {
|
447 |
-
return;
|
448 |
-
}
|
449 |
-
|
450 |
-
popupObject.hide();
|
451 |
-
}
|
452 |
-
};
|
453 |
-
}();
|
454 |
-
|
455 |
-
document.observe('dom:loaded', function() {
|
456 |
-
Easybanner.Popup.init();
|
457 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyflags/css/easyflags.css
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
#easyflags a {
|
2 |
-
float: left;
|
3 |
-
margin-right: 5px;
|
4 |
-
}
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/css/easyslide.css
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
.easyslideslider-id { position: relative; z-index: 5; margin-bottom: 10px; }
|
2 |
-
.easyslideslider-id .scroller { overflow: hidden; position: relative; }
|
3 |
-
.easyslideslider-id .content { padding: 0px;position: relative; }
|
4 |
-
.easyslideslider-id .section { overflow:hidden; position: absolute; top: 0; }
|
5 |
-
.easyslideslider-id img { border: none; }
|
6 |
-
|
7 |
-
.easyslide-description {
|
8 |
-
position: absolute;
|
9 |
-
overflow: hidden;
|
10 |
-
padding: 15px 20px;
|
11 |
-
text-align: left;
|
12 |
-
font: 12px Arial, Helvetica, sans-serif !important;
|
13 |
-
box-sizing: border-box;
|
14 |
-
-moz-box-sizing: border-box;
|
15 |
-
}
|
16 |
-
.easyslide-description-top { top: 0; left: 0; width: 100%; }
|
17 |
-
.easyslide-description-bottom { bottom: 0; left: 0; width: 100%; }
|
18 |
-
.easyslide-description-right { right: 0; top: 0; width: 200px; min-height: 1000px; }
|
19 |
-
.easyslide-description-left { left: 0; top: 0; width: 200px; min-height: 1000px; }
|
20 |
-
.easyslide-description-center { left: 50%; top: 0; width: 200px; margin-left: -100px; min-height: 1000px; }
|
21 |
-
.easyslide-background-light { background: url(../images/light.png) repeat 0 0; color: #000; }
|
22 |
-
.easyslide-background-dark { background: url(../images/dark.png) repeat 0 0; color: #fff; }
|
23 |
-
.easyslide-background-tranparent { color: #000; }
|
24 |
-
|
25 |
-
.easyslide-description a { text-decoration: none; color: #5a5a5a; }
|
26 |
-
.easyslide-description a:hover { text-decoration: underline; }
|
27 |
-
.easyslide-description p { line-height: 20px; text-align: center; }
|
28 |
-
|
29 |
-
.easyslide-controls-wrapper { position: absolute; right:13px; bottom:14px; z-index:1000; }
|
30 |
-
.easyslide-controls {}
|
31 |
-
.easyslide-controls a { display: inline-block; width: 15px; height: 17px;
|
32 |
-
margin: 0px 2px; text-decoration: none; font-weight: bold;
|
33 |
-
overflow: hidden; text-align:center; vertical-align: bottom;
|
34 |
-
background: url(../images/control.png) no-repeat -1000px -1000px;
|
35 |
-
}
|
36 |
-
.easyslide-controls a.easyslideprev { background-position: -60px -26px; }
|
37 |
-
.easyslide-controls a.easyslidenext { background-position: -48px -41px; }
|
38 |
-
.easyslide-controls a.easyslidestop { background-position: -75px -11px; }
|
39 |
-
.easyslide-controls a.easyslideplay { background-position: -90px 3px; }
|
40 |
-
.easyslide-controls a:hover, .easyslide-controls a.active {}
|
41 |
-
|
42 |
-
.easyslide-controls .easyslide-num {
|
43 |
-
background-image: none;
|
44 |
-
background-color: #cbcbcb;
|
45 |
-
color: #000;
|
46 |
-
font: bold 12px Arial, Helvetica, sans-serif;
|
47 |
-
text-indent: -9999px;
|
48 |
-
padding: 0;
|
49 |
-
width: 12px;
|
50 |
-
height: 12px;
|
51 |
-
border-radius: 2px;
|
52 |
-
opacity: 0.6;
|
53 |
-
}
|
54 |
-
.easyslide-controls .easyslide-num:hover { background: #f3f3f3; opacity: 0.6; }
|
55 |
-
.easyslide-controls .easyslide-num.active { background-color: #f3f3f3; opacity: 1; }
|
56 |
-
|
57 |
-
@media (max-width: 767px) {
|
58 |
-
.easyslide-controls-wrapper { bottom: 11px; right: 9px; }
|
59 |
-
.easyslide-controls .easyslide-num {
|
60 |
-
width: 20px;
|
61 |
-
height: 20px;
|
62 |
-
margin: 0 10px;
|
63 |
-
}
|
64 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/images/control.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/images/dark.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/images/light.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/js/easyslide.js
DELETED
@@ -1,529 +0,0 @@
|
|
1 |
-
document.observe('dom:loaded', function() {
|
2 |
-
$$('.easyslide-link').each(function(el) {
|
3 |
-
el.observe('click', function(e) {
|
4 |
-
if (this.hasClassName('target-self')) {
|
5 |
-
return true;
|
6 |
-
}
|
7 |
-
|
8 |
-
e.stop();
|
9 |
-
var options = '';
|
10 |
-
if (this.hasClassName('target-popup')) {
|
11 |
-
options = 'width=600,height=400';
|
12 |
-
}
|
13 |
-
window.open(this.href, this.up().id, options);
|
14 |
-
});
|
15 |
-
});
|
16 |
-
});
|
17 |
-
|
18 |
-
/* Make easyslider works good on the mobile devices with various screen width */
|
19 |
-
var EasysliderMobile = Class.create();
|
20 |
-
EasysliderMobile.prototype = {
|
21 |
-
initialize: function(slider) {
|
22 |
-
this.slider = slider;
|
23 |
-
|
24 |
-
var self = this;
|
25 |
-
setTimeout(function() {
|
26 |
-
self.updateSize();
|
27 |
-
}, 500);
|
28 |
-
|
29 |
-
},
|
30 |
-
|
31 |
-
updateSize: function() {
|
32 |
-
var slider = this.slider,
|
33 |
-
ratio = parseInt(slider.scroller.getStyle('width')) / parseInt(slider.scroller.getStyle('height')),
|
34 |
-
width = slider.wrapper.up().getWidth();
|
35 |
-
|
36 |
-
var padding = parseFloat(slider.wrapper.getStyle('padding-left'))
|
37 |
-
+ parseFloat(slider.wrapper.getStyle('padding-right'));
|
38 |
-
|
39 |
-
width -= padding;
|
40 |
-
|
41 |
-
var clone = new Image();
|
42 |
-
clone.src = slider.sections[0].down('img').src;
|
43 |
-
originalWidth = clone.width;
|
44 |
-
if (!originalWidth) {
|
45 |
-
originalWidth = parseInt(slider.sections[0].getStyle('width'));
|
46 |
-
}
|
47 |
-
|
48 |
-
width = (width > originalWidth ? originalWidth : width);
|
49 |
-
height = width / ratio;
|
50 |
-
|
51 |
-
slider.sectionWidth = width;
|
52 |
-
slider.wrapper.setStyle({
|
53 |
-
width: width + 'px',
|
54 |
-
height: height + 'px'
|
55 |
-
});
|
56 |
-
slider.scroller.setStyle({
|
57 |
-
width: width + 'px',
|
58 |
-
height: height + 'px'
|
59 |
-
});
|
60 |
-
slider.sections.each(function(el) {
|
61 |
-
el.setStyle({
|
62 |
-
width: width + 'px',
|
63 |
-
height: height + 'px'
|
64 |
-
});
|
65 |
-
if (el.getStyle('left') && el.getStyle('left') !== '0px') {
|
66 |
-
el.setStyle({
|
67 |
-
left: -width + 'px'
|
68 |
-
});
|
69 |
-
}
|
70 |
-
el.down('img').setStyle({
|
71 |
-
width: width + 'px'
|
72 |
-
});
|
73 |
-
});
|
74 |
-
}
|
75 |
-
};
|
76 |
-
|
77 |
-
/* Don't forget about screen orientation change */
|
78 |
-
var mobileSliders = [];
|
79 |
-
document.observe("easyslide:init", function(event) {
|
80 |
-
mobileSliders.push(new EasysliderMobile(event.memo.slider));
|
81 |
-
});
|
82 |
-
|
83 |
-
if ('addEventListener' in window) {
|
84 |
-
var supportsOrientationChange = "onorientationchange" in window,
|
85 |
-
orientationEvent = supportsOrientationChange ? "orientationchange" : "resize",
|
86 |
-
sliderResizeTimer;
|
87 |
-
window.addEventListener(orientationEvent, function() {
|
88 |
-
clearTimeout(sliderResizeTimer);
|
89 |
-
sliderResizeTimer = setTimeout(function() {
|
90 |
-
mobileSliders.each(function(mobileSlider) {
|
91 |
-
mobileSlider.updateSize();
|
92 |
-
});
|
93 |
-
}, 500);
|
94 |
-
}, false);
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* @author Bruno Bornsztein <bruno@missingmethod.com>
|
99 |
-
* @copyright 2007 Curbly LLC
|
100 |
-
* @package Glider
|
101 |
-
* @license MIT
|
102 |
-
* @url http://www.missingmethod.com/projects/glider/
|
103 |
-
* @version 0.0.3
|
104 |
-
* @dependencies prototype.js 1.5.1+, effects.js
|
105 |
-
*/
|
106 |
-
/* Thanks to Andrew Dupont for refactoring help and code cleanup - http://andrewdupont.net/ */
|
107 |
-
|
108 |
-
Easyslider = Class.create();
|
109 |
-
Object.extend(Object.extend(Easyslider.prototype, Abstract.prototype), {
|
110 |
-
initialize: function(wrapper, options){
|
111 |
-
this.handStopped = false;
|
112 |
-
this.animating = false;
|
113 |
-
this.wrapper = $(wrapper);
|
114 |
-
this.scroller = this.wrapper.down('div.scroller');
|
115 |
-
this.contentDiv = this.scroller.down('div');
|
116 |
-
this.current = $(this.contentDiv.children[0].id);
|
117 |
-
this.sectionWidth = this.contentDiv.children[0].getWidth();
|
118 |
-
this.slideRelations = {};
|
119 |
-
|
120 |
-
this.options = Object.extend({
|
121 |
-
effectType: 'mosaic',
|
122 |
-
duration: 3.0,
|
123 |
-
frequency: 3,
|
124 |
-
eRows: Prototype.Browser.IE ? 3 : 6,
|
125 |
-
eCols: Prototype.Browser.IE ? 6 : 12,
|
126 |
-
eColor: '#FFFFFF'
|
127 |
-
}, options || {});
|
128 |
-
|
129 |
-
this.effects = {
|
130 |
-
'scroll' : this.scroll,
|
131 |
-
'speedscroll' : this.speedscroll,
|
132 |
-
'fade' : this.fade,
|
133 |
-
'blend' : this.blend,
|
134 |
-
'mosaic' : this.mosaic
|
135 |
-
};
|
136 |
-
|
137 |
-
this.sections = this.wrapper.getElementsBySelector('div.section');
|
138 |
-
$$('body').first().fire('easyslide:init', { 'slider': this });
|
139 |
-
|
140 |
-
for (var i = 0; i < this.sections.length; i++) {
|
141 |
-
var nextSibling = this.sections[i].nextSiblings()[0];
|
142 |
-
if (nextSibling){
|
143 |
-
this.slideRelations[this.sections[i].id] = nextSibling.id;
|
144 |
-
} else {
|
145 |
-
this.slideRelations[this.sections[i].id] = this.sections[0].id;
|
146 |
-
}
|
147 |
-
this.effects[this.options.effectType].bind(this)().prepare(this.sections[i], i);
|
148 |
-
}
|
149 |
-
|
150 |
-
this.events = {
|
151 |
-
mouseover: this.pause.bind(this),
|
152 |
-
mouseout: this.resume.bind(this)
|
153 |
-
};
|
154 |
-
|
155 |
-
this.addObservers();
|
156 |
-
|
157 |
-
if (this.options.autoGlide) {
|
158 |
-
this.start();
|
159 |
-
} else {
|
160 |
-
this.handStopped = true;
|
161 |
-
}
|
162 |
-
},
|
163 |
-
|
164 |
-
scroll: function() {
|
165 |
-
var glider = this;
|
166 |
-
return {
|
167 |
-
prepare: function(el, i) {
|
168 |
-
if (i > 0) {
|
169 |
-
$(el).setStyle('left: ' + glider.sectionWidth + 'px;');
|
170 |
-
} else {
|
171 |
-
glider.toggleControl($$('a[href="#' + el.id + '"]')[0]);
|
172 |
-
}
|
173 |
-
},
|
174 |
-
animate: function(elementIdToShow, direction) {
|
175 |
-
$(elementIdToShow).setStyle('left: ' + (direction === 'normal' ? glider.sectionWidth : -glider.sectionWidth) + 'px;');
|
176 |
-
|
177 |
-
new Effect.Parallel([
|
178 |
-
new Effect.Move(elementIdToShow, {
|
179 |
-
sync: true,
|
180 |
-
x: 0,
|
181 |
-
y: 0,
|
182 |
-
mode: 'absolute'
|
183 |
-
}),
|
184 |
-
new Effect.Move(glider.current.id, {
|
185 |
-
sync: true,
|
186 |
-
x: direction === 'normal' ? -glider.sectionWidth : glider.sectionWidth,
|
187 |
-
y: 0,
|
188 |
-
mode: 'absolute'
|
189 |
-
})
|
190 |
-
], {
|
191 |
-
duration: glider.options.duration,
|
192 |
-
afterFinish: function() {
|
193 |
-
glider.setAnimating(false);
|
194 |
-
}.bind(glider)
|
195 |
-
});
|
196 |
-
|
197 |
-
}
|
198 |
-
};
|
199 |
-
},
|
200 |
-
|
201 |
-
speedscroll: function() {
|
202 |
-
var glider = this;
|
203 |
-
return {
|
204 |
-
prepare: function(el, i) {
|
205 |
-
if (i > 0) {
|
206 |
-
$(el).setStyle('left: ' + glider.sectionWidth + 'px;');
|
207 |
-
} else {
|
208 |
-
glider.toggleControl($$('a[href="#' + el.id + '"]')[0]);
|
209 |
-
|
210 |
-
}
|
211 |
-
},
|
212 |
-
animate: function(elementIdToShow, direction) {
|
213 |
-
$(elementIdToShow).setStyle('left: ' + (direction === 'normal' ? glider.sectionWidth : -glider.sectionWidth) + 'px;');
|
214 |
-
$(elementIdToShow).setStyle({zIndex: 5});
|
215 |
-
$(glider.current.id).setStyle({zIndex: 1});
|
216 |
-
var currentId = glider.current.id;
|
217 |
-
|
218 |
-
new Effect.Move(elementIdToShow, {
|
219 |
-
x: 0,
|
220 |
-
y: 0,
|
221 |
-
mode: 'absolute',
|
222 |
-
transition: Effect.Transitions.linear,
|
223 |
-
duration: glider.options.duration / 2,
|
224 |
-
afterFinish: function() {
|
225 |
-
moveCurrent.cancel();
|
226 |
-
$(currentId).setStyle('left: ' + (direction === 'normal' ? -glider.sectionWidth : glider.sectionWidth) + 'px;');
|
227 |
-
glider.setAnimating(false);
|
228 |
-
}
|
229 |
-
});
|
230 |
-
|
231 |
-
var moveCurrent = new Effect.Move(glider.current.id, {
|
232 |
-
x: direction === 'normal' ? -glider.sectionWidth : glider.sectionWidth,
|
233 |
-
y: 0,
|
234 |
-
mode: 'absolute',
|
235 |
-
transition: Effect.Transitions.linear,
|
236 |
-
duration: glider.options.duration
|
237 |
-
});
|
238 |
-
}
|
239 |
-
};
|
240 |
-
},
|
241 |
-
|
242 |
-
fade: function() {
|
243 |
-
var glider = this;
|
244 |
-
return {
|
245 |
-
prepare: function(el, i) {
|
246 |
-
if (i > 0) {
|
247 |
-
el.setOpacity(0);
|
248 |
-
$(el).setStyle({ zIndex : '0' });
|
249 |
-
} else {
|
250 |
-
glider.toggleControl($$('a[href="#' + el.id + '"]')[0]);
|
251 |
-
$(el).setStyle({ zIndex : '998' });
|
252 |
-
$$('.easyslide-controls-wrapper')[0].setStyle({ zIndex : '999' });
|
253 |
-
}
|
254 |
-
},
|
255 |
-
animate: function(elementIdToShow, direction) {
|
256 |
-
$(elementIdToShow).setStyle({ zIndex : '998' });
|
257 |
-
$(glider.current.id).setStyle({ zIndex : '0' });
|
258 |
-
|
259 |
-
new Effect.Opacity(glider.current.id, {
|
260 |
-
duration: glider.options.duration,
|
261 |
-
from: 1.0,
|
262 |
-
to: 0.0,
|
263 |
-
afterFinish: function() {
|
264 |
-
new Effect.Opacity(elementIdToShow, {
|
265 |
-
duration: glider.options.duration,
|
266 |
-
from: 0.0,
|
267 |
-
to: 1.0,
|
268 |
-
afterFinish: function() {
|
269 |
-
glider.setAnimating(false);
|
270 |
-
}.bind(glider)
|
271 |
-
});
|
272 |
-
|
273 |
-
}.bind(glider)
|
274 |
-
});
|
275 |
-
}
|
276 |
-
};
|
277 |
-
},
|
278 |
-
|
279 |
-
blend: function() {
|
280 |
-
var glider = this;
|
281 |
-
return {
|
282 |
-
prepare: function(el, i) {
|
283 |
-
if (i > 0) {
|
284 |
-
el.setOpacity(0);
|
285 |
-
$(el).setStyle({ zIndex : '0' });
|
286 |
-
} else {
|
287 |
-
glider.toggleControl($$('a[href="#' + el.id + '"]')[0]);
|
288 |
-
$(el).setStyle({ zIndex : '998' });
|
289 |
-
$$('.easyslide-controls-wrapper')[0].setStyle({ zIndex : '999' });
|
290 |
-
}
|
291 |
-
},
|
292 |
-
animate: function(elementIdToShow, direction) {
|
293 |
-
$(elementIdToShow).setStyle({ zIndex : '998' });
|
294 |
-
$(glider.current.id).setStyle({ zIndex : '0' });
|
295 |
-
new Effect.Parallel([
|
296 |
-
new Effect.Opacity(glider.current.id, {
|
297 |
-
sync: true,
|
298 |
-
duration: glider.options.duration,
|
299 |
-
from: 1.0,
|
300 |
-
to: 0.0
|
301 |
-
}),
|
302 |
-
new Effect.Opacity(elementIdToShow, {
|
303 |
-
sync: true,
|
304 |
-
duration: glider.options.duration,
|
305 |
-
from: 0.0,
|
306 |
-
to: 1.0
|
307 |
-
})
|
308 |
-
], {
|
309 |
-
duration: glider.options.duration,
|
310 |
-
afterFinish: function() {
|
311 |
-
glider.setAnimating(false);
|
312 |
-
}.bind(glider)
|
313 |
-
});
|
314 |
-
}
|
315 |
-
};
|
316 |
-
},
|
317 |
-
|
318 |
-
mosaic: function() {
|
319 |
-
var glider = this;
|
320 |
-
var delayedAppear = function(eSquare) {
|
321 |
-
var opacity = Math.random();
|
322 |
-
new Effect.Parallel([
|
323 |
-
new Effect.Appear ( eSquare, {from: 0, to: opacity, duration: this.options.duration} ),
|
324 |
-
new Effect.Appear ( eSquare, {from: opacity, to: 0, duration: this.options.duration/1.25} )
|
325 |
-
], {sync: false});
|
326 |
-
};
|
327 |
-
return {
|
328 |
-
prepare: function(el, i) {
|
329 |
-
if (i > 0) {
|
330 |
-
el.setStyle({ zIndex : 0 });
|
331 |
-
el.hide();
|
332 |
-
} else {
|
333 |
-
el.setStyle({ zIndex : 999 });
|
334 |
-
glider.toggleControl($$('a[href="#' + el.id + '"]')[0]);
|
335 |
-
}
|
336 |
-
if (i == (glider.sections.length - 1)) {
|
337 |
-
glider.eSquares = [];
|
338 |
-
var elDimension = el.getDimensions();
|
339 |
-
var elWidth = elDimension.width;
|
340 |
-
var elHeight = elDimension.height;
|
341 |
-
|
342 |
-
var sqWidth = elWidth / glider.options.eCols;
|
343 |
-
var sqHeight = elHeight / glider.options.eRows;
|
344 |
-
|
345 |
-
$R(0, glider.options.eCols-1).each(function(col) {
|
346 |
-
glider.eSquares[col] = [];
|
347 |
-
$R(0, glider.options.eRows-1).each(function(row) {
|
348 |
-
var sqLeft = col * sqWidth;
|
349 |
-
var sqTop = row * sqHeight;
|
350 |
-
glider.eSquares[col][row] = new Element('div').setStyle({
|
351 |
-
opacity : 0,
|
352 |
-
backgroundColor : glider.options.eColor,
|
353 |
-
position : 'absolute',
|
354 |
-
zIndex : 5,
|
355 |
-
left : sqLeft + 'px',
|
356 |
-
top : sqTop + 'px',
|
357 |
-
width : sqWidth + 'px',
|
358 |
-
height : sqHeight + 'px'
|
359 |
-
});
|
360 |
-
|
361 |
-
el.up('div').insert(glider.eSquares[col][row]);
|
362 |
-
}.bind(glider));
|
363 |
-
}.bind(glider));
|
364 |
-
}
|
365 |
-
},
|
366 |
-
|
367 |
-
animate: function(elementIdToShow, direction) {
|
368 |
-
$(elementIdToShow).setStyle({ zIndex : 999 });
|
369 |
-
$(glider.current.id).setStyle({ zIndex : 0 });
|
370 |
-
new Effect.Parallel([
|
371 |
-
new Effect.Fade(glider.current.id, {sync: true}),
|
372 |
-
new Effect.Appear(elementIdToShow, {sync: true})
|
373 |
-
], {
|
374 |
-
duration: glider.options.duration,
|
375 |
-
afterFinish: function() {
|
376 |
-
glider.setAnimating(false);
|
377 |
-
}.bind(glider)
|
378 |
-
});
|
379 |
-
$R(0, glider.options.eCols-1).each(function(col) {
|
380 |
-
$R(0, glider.options.eRows-1).each(function(row) {
|
381 |
-
var eSquare = glider.eSquares[col][row];
|
382 |
-
var delay = Math.random() * (glider.options.duration / 3) * 1000;
|
383 |
-
setTimeout(delayedAppear.bind(glider, eSquare), delay);
|
384 |
-
}.bind(this));
|
385 |
-
}.bind(this));
|
386 |
-
}
|
387 |
-
};
|
388 |
-
},
|
389 |
-
|
390 |
-
setAnimating: function(flag) {
|
391 |
-
this.animating = flag;
|
392 |
-
if (flag) {
|
393 |
-
$$('.easyslide-controls-wrapper')[0].addClassName('disabled');
|
394 |
-
} else {
|
395 |
-
$$('.easyslide-controls-wrapper')[0].removeClassName('disabled');
|
396 |
-
}
|
397 |
-
},
|
398 |
-
|
399 |
-
addObservers: function(){
|
400 |
-
this.wrapper.observe('mouseover', this.events.mouseover);
|
401 |
-
this.wrapper.observe('mouseout', this.events.mouseout);
|
402 |
-
|
403 |
-
var descriptions = this.wrapper.getElementsBySelector('div.sliderdescription');
|
404 |
-
descriptions.invoke('observe', 'mouseover', this.makeActive);
|
405 |
-
descriptions.invoke('observe', 'mouseout', this.makeInactive);
|
406 |
-
|
407 |
-
//Nubmbers
|
408 |
-
var controls = this.wrapper.getElementsBySelector('div.easyslide-controls a.easyslide-num');
|
409 |
-
controls.invoke('observe', 'click', this.numClick.bind(this));
|
410 |
-
|
411 |
-
//Arrows
|
412 |
-
var stop = this.wrapper.getElementsBySelector('div.easyslide-controls a.easyslidestop');
|
413 |
-
stop.invoke('observe', 'click', this.stop.bind(this));
|
414 |
-
|
415 |
-
var play = this.wrapper.getElementsBySelector('div.easyslide-controls a.easyslideplay');
|
416 |
-
play.invoke('observe', 'click', this.start.bind(this));
|
417 |
-
|
418 |
-
var prev = this.wrapper.getElementsBySelector('div.easyslide-controls a.easyslideprev');
|
419 |
-
prev.invoke('observe', 'click', this.previous.bind(this));
|
420 |
-
|
421 |
-
var next = this.wrapper.getElementsBySelector('div.easyslide-controls a.easyslidenext');
|
422 |
-
next.invoke('observe', 'click', this.next.bind(this));
|
423 |
-
},
|
424 |
-
|
425 |
-
numClick: function(event){
|
426 |
-
var element = Event.findElement(event, 'a'); /*clicked link*/
|
427 |
-
var nextElementId = element.href.split('#')[1];
|
428 |
-
var direction = 'normal';
|
429 |
-
for (var i in this.slideRelations) {
|
430 |
-
if (i === this.current.id) {
|
431 |
-
direction = 'normal';
|
432 |
-
break;
|
433 |
-
}
|
434 |
-
if (i === nextElementId) {
|
435 |
-
direction = 'reverse';
|
436 |
-
break;
|
437 |
-
}
|
438 |
-
}
|
439 |
-
this.animate(nextElementId, direction);
|
440 |
-
Event.stop(event);
|
441 |
-
},
|
442 |
-
|
443 |
-
animate: function(elementIdToShow, direction){
|
444 |
-
if (this.animating || this.current.id == elementIdToShow) {
|
445 |
-
return;
|
446 |
-
}
|
447 |
-
this.setAnimating(true);
|
448 |
-
this.toggleControl($$('a[href="#' + elementIdToShow + '"]')[0]);
|
449 |
-
|
450 |
-
this.effects[this.options.effectType].bind(this)().animate(elementIdToShow, direction);
|
451 |
-
|
452 |
-
this.current = $(elementIdToShow);
|
453 |
-
},
|
454 |
-
|
455 |
-
next: function(event){
|
456 |
-
var nextMove = '';
|
457 |
-
nextMove = this.slideRelations[this.current.id];
|
458 |
-
this.animate(nextMove, 'normal');
|
459 |
-
if (event) {
|
460 |
-
Event.stop(event);
|
461 |
-
}
|
462 |
-
},
|
463 |
-
|
464 |
-
previous: function(event){
|
465 |
-
var prevMove = '';
|
466 |
-
for (var i in this.slideRelations) {
|
467 |
-
if (this.slideRelations[i] == this.current.id) {
|
468 |
-
prevMove = i;
|
469 |
-
break;
|
470 |
-
}
|
471 |
-
}
|
472 |
-
this.animate(prevMove, 'reverse');
|
473 |
-
if (event) {
|
474 |
-
Event.stop(event);
|
475 |
-
}
|
476 |
-
},
|
477 |
-
|
478 |
-
makeActive: function(event){
|
479 |
-
var element = Event.findElement(event, 'div');
|
480 |
-
element.addClassName('active');
|
481 |
-
},
|
482 |
-
|
483 |
-
makeInactive: function(event){
|
484 |
-
var element = Event.findElement(event, 'div');
|
485 |
-
element.removeClassName('active');
|
486 |
-
},
|
487 |
-
|
488 |
-
toggleControl: function(el){
|
489 |
-
if (!el) return false;
|
490 |
-
$$('.easyslide-controls a').invoke('removeClassName', 'active');
|
491 |
-
el.addClassName('active');
|
492 |
-
},
|
493 |
-
|
494 |
-
stop: function(event){
|
495 |
-
this.handStopped = true;
|
496 |
-
clearTimeout(this.timer);
|
497 |
-
Event.stop(event);
|
498 |
-
},
|
499 |
-
|
500 |
-
start: function(event){
|
501 |
-
this.handStopped = false;
|
502 |
-
this.periodicallyUpdate();
|
503 |
-
if (event) {
|
504 |
-
Event.stop(event);
|
505 |
-
}
|
506 |
-
},
|
507 |
-
|
508 |
-
pause: function(event){
|
509 |
-
if (!this.handStopped) {
|
510 |
-
clearTimeout(this.timer);
|
511 |
-
this.timer = null;
|
512 |
-
}
|
513 |
-
Event.stop(event);
|
514 |
-
},
|
515 |
-
|
516 |
-
resume: function(event){
|
517 |
-
if (!this.handStopped) {
|
518 |
-
this.periodicallyUpdate();
|
519 |
-
}
|
520 |
-
},
|
521 |
-
|
522 |
-
periodicallyUpdate: function(){
|
523 |
-
if (this.timer != null) {
|
524 |
-
clearTimeout(this.timer);
|
525 |
-
this.next();
|
526 |
-
}
|
527 |
-
this.timer = setTimeout(this.periodicallyUpdate.bind(this), this.options.frequency * 1000);
|
528 |
-
}
|
529 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/js/jquery-1.8.2.min.js
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
/*! jQuery v1.8.2 jquery.com | jquery.org/license */
|
2 |
-
(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cA(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cv;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cA(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cA(a,c,d,e,"*",g)),h}function cB(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cC(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cD(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cL(){try{return new a.XMLHttpRequest}catch(b){}}function cM(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cU(){return setTimeout(function(){cN=b},0),cN=p.now()}function cV(a,b){p.each(b,function(b,c){var d=(cT[b]||[]).concat(cT["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cW(a,b,c){var d,e=0,f=0,g=cS.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cN||cU(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cN||cU(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cX(k,j.opts.specialEasing);for(;e<g;e++){d=cS[e].call(j,a,k,j.opts);if(d)return d}return cV(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cX(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cY(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bZ(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cc(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cP.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cZ(a,b,c,d,e){return new cZ.prototype.init(a,b,c,d,e)}function c$(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b)c=bV[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function da(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o&&!o.call(" ")?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":(a+"").replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete")setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);e==="function"&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&e!=="string"&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")||(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)f.indexOf(" "+b[g]+" ")<0&&(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&p.expr.match.needsContext.test(f),namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=k.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click"))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){h={},j=[];for(d=0;d<q;d++)l=o[d],m=l.selector,h[m]===b&&(h[m]=l.needsContext?p(m,this).index(f)>=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){i=u[d],c.currentTarget=i.elem;for(e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++){l=i.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,g=((p.event.special[l.origType]||{}).handle||l.handler).apply(i.elem,r),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h<i;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),j&&b.push(h);return g}function bl(a,b,c,d,e,f){return d&&!d[o]&&(d=bl(d)),e&&!e[o]&&(e=bl(e,f)),z(function(f,g,h,i){if(f&&e)return;var j,k,l,m=[],n=[],o=g.length,p=f||bo(b||"*",h.nodeType?[h]:h,[],f),q=a&&(f||!b)?bk(p,m,a,h,i):p,r=c?e||(f?a:o||d)?[]:g:q;c&&c(q,r,h,i);if(d){l=bk(r,n),d(l,[],h,i),j=l.length;while(j--)if(k=l[j])r[n[j]]=!(q[n[j]]=k)}if(f){j=a&&r.length;while(j--)if(k=r[j])f[m[j]]=!(g[m[j]]=k)}else r=bk(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):w.apply(g,r)})}function bm(a){var b,c,d,f=a.length,g=e.relative[a[0].type],h=g||e.relative[" "],i=g?1:0,j=bi(function(a){return a===b},h,!0),k=bi(function(a){return y.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i<f;i++)if(c=e.relative[a[i].type])m=[bi(bj(m),c)];else{c=e.filter[a[i].type].apply(null,a[i].matches);if(c[o]){d=++i;for(;d<f;d++)if(e.relative[a[d].type])break;return bl(i>1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i<d&&bm(a.slice(i,d)),d<f&&bm(a=a.slice(d)),d<f&&a.join(""))}m.push(c)}return bj(m)}function bn(a,b){var d=b.length>0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)bc(a,b[e],c,d);return c}function bp(a,b,c,d,f){var g,h,j,k,l,m=bh(a),n=m.length;if(!d&&m.length===1){h=m[0]=m[0].slice(0);if(h.length>2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;b<c;b++)if(this[b]===a)return b;return-1},z=function(a,b){return a[o]=b==null||b,a},A=function(){var a={},b=[];return z(function(c,d){return b.push(c)>e.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d<b;d+=2)a.push(d);return a}),odd:bf(function(a,b,c){for(var d=1;d<b;d+=2)a.push(d);return a}),lt:bf(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},j=s.compareDocumentPosition?function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bg(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bg(e[j],f[j]);return j===c?bg(a,f[j],-1):bg(e[j],b,1)},[0,0].sort(j),m=!k,bc.uniqueSort=function(a){var b,c=1;k=m,a.sort(j);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1);return a},bc.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},i=bc.compile=function(a,b){var c,d=[],e=[],f=D[o][a];if(!f){b||(b=bh(a)),c=b.length;while(c--)f=bm(b[c]),f[o]?d.push(f):e.push(f);f=D(a,bn(e,d))}return f},r.querySelectorAll&&function(){var a,b=bp,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[":focus"],f=[":active",":focus"],h=s.matchesSelector||s.mozMatchesSelector||s.webkitMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;X(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cT[c]=cT[c]||[],cT[c].unshift(b)},prefilter:function(a,b){b?cS.unshift(a):cS.push(a)}}),p.Tween=cZ,cZ.prototype={constructor:cZ,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cZ.propHooks[this.prop];return a&&a.get?a.get(this):cZ.propHooks._default.get(this)},run:function(a){var b,c=cZ.propHooks[this.prop];return this.options.duration?this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cZ.propHooks._default.set(this),this}},cZ.prototype.init.prototype=cZ.prototype,cZ.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cZ.propHooks.scrollTop=cZ.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(c$(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bZ).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cW(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cR.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:c$("show"),slideUp:c$("hide"),slideToggle:c$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cZ.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cO&&(cO=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cO),cO=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c_=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(!l)return;return(d=l.body)===k?p.offset.bodyOffset(k):(c=l.documentElement,p.contains(c,k)?(typeof k.getBoundingClientRect!="undefined"&&(j=k.getBoundingClientRect()),e=da(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
|
|
|
|
skin/frontend/base/default/tm/easyslide/nivo/jquery.nivo.slider.js
DELETED
@@ -1,662 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery Nivo Slider v3.2
|
3 |
-
* http://nivo.dev7studios.com
|
4 |
-
*
|
5 |
-
* Copyright 2012, Dev7studios
|
6 |
-
* Free to use and abuse under the MIT license.
|
7 |
-
* http://www.opensource.org/licenses/mit-license.php
|
8 |
-
*/
|
9 |
-
|
10 |
-
(function($) {
|
11 |
-
var NivoSlider = function(element, options){
|
12 |
-
// Defaults are below
|
13 |
-
var settings = $.extend({}, $.fn.nivoSlider.defaults, options);
|
14 |
-
|
15 |
-
// Useful variables. Play carefully.
|
16 |
-
var vars = {
|
17 |
-
currentSlide: 0,
|
18 |
-
currentImage: '',
|
19 |
-
totalSlides: 0,
|
20 |
-
running: false,
|
21 |
-
paused: false,
|
22 |
-
stop: false,
|
23 |
-
controlNavEl: false
|
24 |
-
};
|
25 |
-
|
26 |
-
// Get this slider
|
27 |
-
var slider = $(element);
|
28 |
-
slider.data('nivo:vars', vars).addClass('nivoSlider');
|
29 |
-
|
30 |
-
// Find our slider children
|
31 |
-
var kids = slider.children();
|
32 |
-
kids.each(function() {
|
33 |
-
var child = $(this);
|
34 |
-
var link = '';
|
35 |
-
if(!child.is('img')){
|
36 |
-
if(child.is('a')){
|
37 |
-
child.addClass('nivo-imageLink');
|
38 |
-
link = child;
|
39 |
-
}
|
40 |
-
child = child.find('img:first');
|
41 |
-
}
|
42 |
-
// Get img width & height
|
43 |
-
var childWidth = (childWidth === 0) ? child.attr('width') : child.width(),
|
44 |
-
childHeight = (childHeight === 0) ? child.attr('height') : child.height();
|
45 |
-
|
46 |
-
if(link !== ''){
|
47 |
-
link.css('display','none');
|
48 |
-
}
|
49 |
-
child.css('display','none');
|
50 |
-
vars.totalSlides++;
|
51 |
-
});
|
52 |
-
|
53 |
-
// If randomStart
|
54 |
-
if(settings.randomStart){
|
55 |
-
settings.startSlide = Math.floor(Math.random() * vars.totalSlides);
|
56 |
-
}
|
57 |
-
|
58 |
-
// Set startSlide
|
59 |
-
if(settings.startSlide > 0){
|
60 |
-
if(settings.startSlide >= vars.totalSlides) { settings.startSlide = vars.totalSlides - 1; }
|
61 |
-
vars.currentSlide = settings.startSlide;
|
62 |
-
}
|
63 |
-
|
64 |
-
// Get initial image
|
65 |
-
if($(kids[vars.currentSlide]).is('img')){
|
66 |
-
vars.currentImage = $(kids[vars.currentSlide]);
|
67 |
-
} else {
|
68 |
-
vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
|
69 |
-
}
|
70 |
-
|
71 |
-
// Show initial link
|
72 |
-
if($(kids[vars.currentSlide]).is('a')){
|
73 |
-
$(kids[vars.currentSlide]).css('display','block');
|
74 |
-
}
|
75 |
-
|
76 |
-
// Set first background
|
77 |
-
var sliderImg = $('<img/>').addClass('nivo-main-image');
|
78 |
-
sliderImg.attr('src', vars.currentImage.attr('src')).show();
|
79 |
-
slider.append(sliderImg);
|
80 |
-
|
81 |
-
// Detect Window Resize
|
82 |
-
$(window).resize(function() {
|
83 |
-
slider.children('img').width(slider.width());
|
84 |
-
sliderImg.attr('src', vars.currentImage.attr('src'));
|
85 |
-
sliderImg.stop().height('auto');
|
86 |
-
$('.nivo-slice').remove();
|
87 |
-
$('.nivo-box').remove();
|
88 |
-
});
|
89 |
-
|
90 |
-
//Create caption
|
91 |
-
slider.append($('<div class="nivo-caption"></div>'));
|
92 |
-
|
93 |
-
// Process caption function
|
94 |
-
var processCaption = function(settings){
|
95 |
-
var nivoCaption = $('.nivo-caption', slider);
|
96 |
-
if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){
|
97 |
-
var title = vars.currentImage.attr('title');
|
98 |
-
if(title.substr(0,1) == '#') title = $(title).html();
|
99 |
-
|
100 |
-
if(nivoCaption.css('display') == 'block'){
|
101 |
-
setTimeout(function(){
|
102 |
-
nivoCaption.html(title);
|
103 |
-
}, settings.animSpeed);
|
104 |
-
} else {
|
105 |
-
nivoCaption.html(title);
|
106 |
-
nivoCaption.stop().fadeIn(settings.animSpeed);
|
107 |
-
}
|
108 |
-
} else {
|
109 |
-
nivoCaption.stop().fadeOut(settings.animSpeed);
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
//Process initial caption
|
114 |
-
processCaption(settings);
|
115 |
-
|
116 |
-
// In the words of Super Mario "let's a go!"
|
117 |
-
var timer = 0;
|
118 |
-
if(!settings.manualAdvance && kids.length > 1){
|
119 |
-
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
120 |
-
}
|
121 |
-
|
122 |
-
// Add Direction nav
|
123 |
-
if(settings.directionNav){
|
124 |
-
slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+ settings.prevText +'</a><a class="nivo-nextNav">'+ settings.nextText +'</a></div>');
|
125 |
-
|
126 |
-
$(slider).on('click', 'a.nivo-prevNav', function(){
|
127 |
-
if(vars.running) { return false; }
|
128 |
-
clearInterval(timer);
|
129 |
-
timer = '';
|
130 |
-
vars.currentSlide -= 2;
|
131 |
-
nivoRun(slider, kids, settings, 'prev');
|
132 |
-
});
|
133 |
-
|
134 |
-
$(slider).on('click', 'a.nivo-nextNav', function(){
|
135 |
-
if(vars.running) { return false; }
|
136 |
-
clearInterval(timer);
|
137 |
-
timer = '';
|
138 |
-
nivoRun(slider, kids, settings, 'next');
|
139 |
-
});
|
140 |
-
}
|
141 |
-
|
142 |
-
// Add Control nav
|
143 |
-
if(settings.controlNav){
|
144 |
-
vars.controlNavEl = $('<div class="nivo-controlNav"></div>');
|
145 |
-
slider.after(vars.controlNavEl);
|
146 |
-
for(var i = 0; i < kids.length; i++){
|
147 |
-
if(settings.controlNavThumbs){
|
148 |
-
vars.controlNavEl.addClass('nivo-thumbs-enabled');
|
149 |
-
var child = kids.eq(i);
|
150 |
-
if(!child.is('img')){
|
151 |
-
child = child.find('img:first');
|
152 |
-
}
|
153 |
-
if(child.attr('data-thumb')) vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'"><img src="'+ child.attr('data-thumb') +'" alt="" /></a>');
|
154 |
-
} else {
|
155 |
-
vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'">'+ (i + 1) +'</a>');
|
156 |
-
}
|
157 |
-
}
|
158 |
-
|
159 |
-
//Set initial active link
|
160 |
-
$('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active');
|
161 |
-
|
162 |
-
$('a', vars.controlNavEl).bind('click', function(){
|
163 |
-
if(vars.running) return false;
|
164 |
-
if($(this).hasClass('active')) return false;
|
165 |
-
clearInterval(timer);
|
166 |
-
timer = '';
|
167 |
-
sliderImg.attr('src', vars.currentImage.attr('src'));
|
168 |
-
vars.currentSlide = $(this).attr('rel') - 1;
|
169 |
-
nivoRun(slider, kids, settings, 'control');
|
170 |
-
});
|
171 |
-
}
|
172 |
-
|
173 |
-
//For pauseOnHover setting
|
174 |
-
if(settings.pauseOnHover){
|
175 |
-
slider.hover(function(){
|
176 |
-
vars.paused = true;
|
177 |
-
clearInterval(timer);
|
178 |
-
timer = '';
|
179 |
-
}, function(){
|
180 |
-
vars.paused = false;
|
181 |
-
// Restart the timer
|
182 |
-
if(timer === '' && !settings.manualAdvance){
|
183 |
-
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
184 |
-
}
|
185 |
-
});
|
186 |
-
}
|
187 |
-
|
188 |
-
// Event when Animation finishes
|
189 |
-
slider.bind('nivo:animFinished', function(){
|
190 |
-
sliderImg.attr('src', vars.currentImage.attr('src'));
|
191 |
-
vars.running = false;
|
192 |
-
// Hide child links
|
193 |
-
$(kids).each(function(){
|
194 |
-
if($(this).is('a')){
|
195 |
-
$(this).css('display','none');
|
196 |
-
}
|
197 |
-
});
|
198 |
-
// Show current link
|
199 |
-
if($(kids[vars.currentSlide]).is('a')){
|
200 |
-
$(kids[vars.currentSlide]).css('display','block');
|
201 |
-
}
|
202 |
-
// Restart the timer
|
203 |
-
if(timer === '' && !vars.paused && !settings.manualAdvance){
|
204 |
-
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
205 |
-
}
|
206 |
-
// Trigger the afterChange callback
|
207 |
-
settings.afterChange.call(this);
|
208 |
-
});
|
209 |
-
|
210 |
-
// Add slices for slice animations
|
211 |
-
var createSlices = function(slider, settings, vars) {
|
212 |
-
if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block');
|
213 |
-
$('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show();
|
214 |
-
var sliceHeight = ($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().is('a')) ? $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().height() : $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height();
|
215 |
-
|
216 |
-
for(var i = 0; i < settings.slices; i++){
|
217 |
-
var sliceWidth = Math.round(slider.width()/settings.slices);
|
218 |
-
|
219 |
-
if(i === settings.slices-1){
|
220 |
-
slider.append(
|
221 |
-
$('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
|
222 |
-
left:(sliceWidth*i)+'px',
|
223 |
-
width:(slider.width()-(sliceWidth*i))+'px',
|
224 |
-
height:sliceHeight+'px',
|
225 |
-
opacity:'0',
|
226 |
-
overflow:'hidden'
|
227 |
-
})
|
228 |
-
);
|
229 |
-
} else {
|
230 |
-
slider.append(
|
231 |
-
$('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
|
232 |
-
left:(sliceWidth*i)+'px',
|
233 |
-
width:sliceWidth+'px',
|
234 |
-
height:sliceHeight+'px',
|
235 |
-
opacity:'0',
|
236 |
-
overflow:'hidden'
|
237 |
-
})
|
238 |
-
);
|
239 |
-
}
|
240 |
-
}
|
241 |
-
|
242 |
-
$('.nivo-slice', slider).height(sliceHeight);
|
243 |
-
sliderImg.stop().animate({
|
244 |
-
height: $(vars.currentImage).height()
|
245 |
-
}, settings.animSpeed);
|
246 |
-
};
|
247 |
-
|
248 |
-
// Add boxes for box animations
|
249 |
-
var createBoxes = function(slider, settings, vars){
|
250 |
-
if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block');
|
251 |
-
$('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show();
|
252 |
-
var boxWidth = Math.round(slider.width()/settings.boxCols),
|
253 |
-
boxHeight = Math.round($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height() / settings.boxRows);
|
254 |
-
|
255 |
-
|
256 |
-
for(var rows = 0; rows < settings.boxRows; rows++){
|
257 |
-
for(var cols = 0; cols < settings.boxCols; cols++){
|
258 |
-
if(cols === settings.boxCols-1){
|
259 |
-
slider.append(
|
260 |
-
$('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({
|
261 |
-
opacity:0,
|
262 |
-
left:(boxWidth*cols)+'px',
|
263 |
-
top:(boxHeight*rows)+'px',
|
264 |
-
width:(slider.width()-(boxWidth*cols))+'px'
|
265 |
-
|
266 |
-
})
|
267 |
-
);
|
268 |
-
$('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px');
|
269 |
-
} else {
|
270 |
-
slider.append(
|
271 |
-
$('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({
|
272 |
-
opacity:0,
|
273 |
-
left:(boxWidth*cols)+'px',
|
274 |
-
top:(boxHeight*rows)+'px',
|
275 |
-
width:boxWidth+'px'
|
276 |
-
})
|
277 |
-
);
|
278 |
-
$('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px');
|
279 |
-
}
|
280 |
-
}
|
281 |
-
}
|
282 |
-
|
283 |
-
sliderImg.stop().animate({
|
284 |
-
height: $(vars.currentImage).height()
|
285 |
-
}, settings.animSpeed);
|
286 |
-
};
|
287 |
-
|
288 |
-
// Private run method
|
289 |
-
var nivoRun = function(slider, kids, settings, nudge){
|
290 |
-
// Get our vars
|
291 |
-
var vars = slider.data('nivo:vars');
|
292 |
-
|
293 |
-
// Trigger the lastSlide callback
|
294 |
-
if(vars && (vars.currentSlide === vars.totalSlides - 1)){
|
295 |
-
settings.lastSlide.call(this);
|
296 |
-
}
|
297 |
-
|
298 |
-
// Stop
|
299 |
-
if((!vars || vars.stop) && !nudge) { return false; }
|
300 |
-
|
301 |
-
// Trigger the beforeChange callback
|
302 |
-
settings.beforeChange.call(this);
|
303 |
-
|
304 |
-
// Set current background before change
|
305 |
-
if(!nudge){
|
306 |
-
sliderImg.attr('src', vars.currentImage.attr('src'));
|
307 |
-
} else {
|
308 |
-
if(nudge === 'prev'){
|
309 |
-
sliderImg.attr('src', vars.currentImage.attr('src'));
|
310 |
-
}
|
311 |
-
if(nudge === 'next'){
|
312 |
-
sliderImg.attr('src', vars.currentImage.attr('src'));
|
313 |
-
}
|
314 |
-
}
|
315 |
-
|
316 |
-
vars.currentSlide++;
|
317 |
-
// Trigger the slideshowEnd callback
|
318 |
-
if(vars.currentSlide === vars.totalSlides){
|
319 |
-
vars.currentSlide = 0;
|
320 |
-
settings.slideshowEnd.call(this);
|
321 |
-
}
|
322 |
-
if(vars.currentSlide < 0) { vars.currentSlide = (vars.totalSlides - 1); }
|
323 |
-
// Set vars.currentImage
|
324 |
-
if($(kids[vars.currentSlide]).is('img')){
|
325 |
-
vars.currentImage = $(kids[vars.currentSlide]);
|
326 |
-
} else {
|
327 |
-
vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
|
328 |
-
}
|
329 |
-
|
330 |
-
// Set active links
|
331 |
-
if(settings.controlNav){
|
332 |
-
$('a', vars.controlNavEl).removeClass('active');
|
333 |
-
$('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active');
|
334 |
-
}
|
335 |
-
|
336 |
-
// Process caption
|
337 |
-
processCaption(settings);
|
338 |
-
|
339 |
-
// Remove any slices from last transition
|
340 |
-
$('.nivo-slice', slider).remove();
|
341 |
-
|
342 |
-
// Remove any boxes from last transition
|
343 |
-
$('.nivo-box', slider).remove();
|
344 |
-
|
345 |
-
var currentEffect = settings.effect,
|
346 |
-
anims = '';
|
347 |
-
|
348 |
-
// Generate random effect
|
349 |
-
if(settings.effect === 'random'){
|
350 |
-
anims = new Array('sliceDownRight','sliceDownLeft','sliceUpRight','sliceUpLeft','sliceUpDown','sliceUpDownLeft','fold','fade',
|
351 |
-
'boxRandom','boxRain','boxRainReverse','boxRainGrow','boxRainGrowReverse');
|
352 |
-
currentEffect = anims[Math.floor(Math.random()*(anims.length + 1))];
|
353 |
-
if(currentEffect === undefined) { currentEffect = 'fade'; }
|
354 |
-
}
|
355 |
-
|
356 |
-
// Run random effect from specified set (eg: effect:'fold,fade')
|
357 |
-
if(settings.effect.indexOf(',') !== -1){
|
358 |
-
anims = settings.effect.split(',');
|
359 |
-
currentEffect = anims[Math.floor(Math.random()*(anims.length))];
|
360 |
-
if(currentEffect === undefined) { currentEffect = 'fade'; }
|
361 |
-
}
|
362 |
-
|
363 |
-
// Custom transition as defined by "data-transition" attribute
|
364 |
-
if(vars.currentImage.attr('data-transition')){
|
365 |
-
currentEffect = vars.currentImage.attr('data-transition');
|
366 |
-
}
|
367 |
-
|
368 |
-
// Run effects
|
369 |
-
vars.running = true;
|
370 |
-
var timeBuff = 0,
|
371 |
-
i = 0,
|
372 |
-
slices = '',
|
373 |
-
firstSlice = '',
|
374 |
-
totalBoxes = '',
|
375 |
-
boxes = '';
|
376 |
-
|
377 |
-
if(currentEffect === 'sliceDown' || currentEffect === 'sliceDownRight' || currentEffect === 'sliceDownLeft'){
|
378 |
-
createSlices(slider, settings, vars);
|
379 |
-
timeBuff = 0;
|
380 |
-
i = 0;
|
381 |
-
slices = $('.nivo-slice', slider);
|
382 |
-
if(currentEffect === 'sliceDownLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
383 |
-
|
384 |
-
slices.each(function(){
|
385 |
-
var slice = $(this);
|
386 |
-
slice.css({ 'top': '0px' });
|
387 |
-
if(i === settings.slices-1){
|
388 |
-
setTimeout(function(){
|
389 |
-
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
390 |
-
}, (100 + timeBuff));
|
391 |
-
} else {
|
392 |
-
setTimeout(function(){
|
393 |
-
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
394 |
-
}, (100 + timeBuff));
|
395 |
-
}
|
396 |
-
timeBuff += 50;
|
397 |
-
i++;
|
398 |
-
});
|
399 |
-
} else if(currentEffect === 'sliceUp' || currentEffect === 'sliceUpRight' || currentEffect === 'sliceUpLeft'){
|
400 |
-
createSlices(slider, settings, vars);
|
401 |
-
timeBuff = 0;
|
402 |
-
i = 0;
|
403 |
-
slices = $('.nivo-slice', slider);
|
404 |
-
if(currentEffect === 'sliceUpLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
405 |
-
|
406 |
-
slices.each(function(){
|
407 |
-
var slice = $(this);
|
408 |
-
slice.css({ 'bottom': '0px' });
|
409 |
-
if(i === settings.slices-1){
|
410 |
-
setTimeout(function(){
|
411 |
-
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
412 |
-
}, (100 + timeBuff));
|
413 |
-
} else {
|
414 |
-
setTimeout(function(){
|
415 |
-
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
416 |
-
}, (100 + timeBuff));
|
417 |
-
}
|
418 |
-
timeBuff += 50;
|
419 |
-
i++;
|
420 |
-
});
|
421 |
-
} else if(currentEffect === 'sliceUpDown' || currentEffect === 'sliceUpDownRight' || currentEffect === 'sliceUpDownLeft'){
|
422 |
-
createSlices(slider, settings, vars);
|
423 |
-
timeBuff = 0;
|
424 |
-
i = 0;
|
425 |
-
var v = 0;
|
426 |
-
slices = $('.nivo-slice', slider);
|
427 |
-
if(currentEffect === 'sliceUpDownLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
428 |
-
|
429 |
-
slices.each(function(){
|
430 |
-
var slice = $(this);
|
431 |
-
if(i === 0){
|
432 |
-
slice.css('top','0px');
|
433 |
-
i++;
|
434 |
-
} else {
|
435 |
-
slice.css('bottom','0px');
|
436 |
-
i = 0;
|
437 |
-
}
|
438 |
-
|
439 |
-
if(v === settings.slices-1){
|
440 |
-
setTimeout(function(){
|
441 |
-
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
442 |
-
}, (100 + timeBuff));
|
443 |
-
} else {
|
444 |
-
setTimeout(function(){
|
445 |
-
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
446 |
-
}, (100 + timeBuff));
|
447 |
-
}
|
448 |
-
timeBuff += 50;
|
449 |
-
v++;
|
450 |
-
});
|
451 |
-
} else if(currentEffect === 'fold'){
|
452 |
-
createSlices(slider, settings, vars);
|
453 |
-
timeBuff = 0;
|
454 |
-
i = 0;
|
455 |
-
|
456 |
-
$('.nivo-slice', slider).each(function(){
|
457 |
-
var slice = $(this);
|
458 |
-
var origWidth = slice.width();
|
459 |
-
slice.css({ top:'0px', width:'0px' });
|
460 |
-
if(i === settings.slices-1){
|
461 |
-
setTimeout(function(){
|
462 |
-
slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
463 |
-
}, (100 + timeBuff));
|
464 |
-
} else {
|
465 |
-
setTimeout(function(){
|
466 |
-
slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed);
|
467 |
-
}, (100 + timeBuff));
|
468 |
-
}
|
469 |
-
timeBuff += 50;
|
470 |
-
i++;
|
471 |
-
});
|
472 |
-
} else if(currentEffect === 'fade'){
|
473 |
-
createSlices(slider, settings, vars);
|
474 |
-
|
475 |
-
firstSlice = $('.nivo-slice:first', slider);
|
476 |
-
firstSlice.css({
|
477 |
-
'width': slider.width() + 'px'
|
478 |
-
});
|
479 |
-
|
480 |
-
firstSlice.animate({ opacity:'1.0' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); });
|
481 |
-
} else if(currentEffect === 'slideInRight'){
|
482 |
-
createSlices(slider, settings, vars);
|
483 |
-
|
484 |
-
firstSlice = $('.nivo-slice:first', slider);
|
485 |
-
firstSlice.css({
|
486 |
-
'width': '0px',
|
487 |
-
'opacity': '1'
|
488 |
-
});
|
489 |
-
|
490 |
-
firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); });
|
491 |
-
} else if(currentEffect === 'slideInLeft'){
|
492 |
-
createSlices(slider, settings, vars);
|
493 |
-
|
494 |
-
firstSlice = $('.nivo-slice:first', slider);
|
495 |
-
firstSlice.css({
|
496 |
-
'width': '0px',
|
497 |
-
'opacity': '1',
|
498 |
-
'left': '',
|
499 |
-
'right': '0px'
|
500 |
-
});
|
501 |
-
|
502 |
-
firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){
|
503 |
-
// Reset positioning
|
504 |
-
firstSlice.css({
|
505 |
-
'left': '0px',
|
506 |
-
'right': ''
|
507 |
-
});
|
508 |
-
slider.trigger('nivo:animFinished');
|
509 |
-
});
|
510 |
-
} else if(currentEffect === 'boxRandom'){
|
511 |
-
createBoxes(slider, settings, vars);
|
512 |
-
|
513 |
-
totalBoxes = settings.boxCols * settings.boxRows;
|
514 |
-
i = 0;
|
515 |
-
timeBuff = 0;
|
516 |
-
|
517 |
-
boxes = shuffle($('.nivo-box', slider));
|
518 |
-
boxes.each(function(){
|
519 |
-
var box = $(this);
|
520 |
-
if(i === totalBoxes-1){
|
521 |
-
setTimeout(function(){
|
522 |
-
box.animate({ opacity:'1' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
523 |
-
}, (100 + timeBuff));
|
524 |
-
} else {
|
525 |
-
setTimeout(function(){
|
526 |
-
box.animate({ opacity:'1' }, settings.animSpeed);
|
527 |
-
}, (100 + timeBuff));
|
528 |
-
}
|
529 |
-
timeBuff += 20;
|
530 |
-
i++;
|
531 |
-
});
|
532 |
-
} else if(currentEffect === 'boxRain' || currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){
|
533 |
-
createBoxes(slider, settings, vars);
|
534 |
-
|
535 |
-
totalBoxes = settings.boxCols * settings.boxRows;
|
536 |
-
i = 0;
|
537 |
-
timeBuff = 0;
|
538 |
-
|
539 |
-
// Split boxes into 2D array
|
540 |
-
var rowIndex = 0;
|
541 |
-
var colIndex = 0;
|
542 |
-
var box2Darr = [];
|
543 |
-
box2Darr[rowIndex] = [];
|
544 |
-
boxes = $('.nivo-box', slider);
|
545 |
-
if(currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrowReverse'){
|
546 |
-
boxes = $('.nivo-box', slider)._reverse();
|
547 |
-
}
|
548 |
-
boxes.each(function(){
|
549 |
-
box2Darr[rowIndex][colIndex] = $(this);
|
550 |
-
colIndex++;
|
551 |
-
if(colIndex === settings.boxCols){
|
552 |
-
rowIndex++;
|
553 |
-
colIndex = 0;
|
554 |
-
box2Darr[rowIndex] = [];
|
555 |
-
}
|
556 |
-
});
|
557 |
-
|
558 |
-
// Run animation
|
559 |
-
for(var cols = 0; cols < (settings.boxCols * 2); cols++){
|
560 |
-
var prevCol = cols;
|
561 |
-
for(var rows = 0; rows < settings.boxRows; rows++){
|
562 |
-
if(prevCol >= 0 && prevCol < settings.boxCols){
|
563 |
-
/* Due to some weird JS bug with loop vars
|
564 |
-
being used in setTimeout, this is wrapped
|
565 |
-
with an anonymous function call */
|
566 |
-
(function(row, col, time, i, totalBoxes) {
|
567 |
-
var box = $(box2Darr[row][col]);
|
568 |
-
var w = box.width();
|
569 |
-
var h = box.height();
|
570 |
-
if(currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){
|
571 |
-
box.width(0).height(0);
|
572 |
-
}
|
573 |
-
if(i === totalBoxes-1){
|
574 |
-
setTimeout(function(){
|
575 |
-
box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3, '', function(){ slider.trigger('nivo:animFinished'); });
|
576 |
-
}, (100 + time));
|
577 |
-
} else {
|
578 |
-
setTimeout(function(){
|
579 |
-
box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3);
|
580 |
-
}, (100 + time));
|
581 |
-
}
|
582 |
-
})(rows, prevCol, timeBuff, i, totalBoxes);
|
583 |
-
i++;
|
584 |
-
}
|
585 |
-
prevCol--;
|
586 |
-
}
|
587 |
-
timeBuff += 100;
|
588 |
-
}
|
589 |
-
}
|
590 |
-
};
|
591 |
-
|
592 |
-
// Shuffle an array
|
593 |
-
var shuffle = function(arr){
|
594 |
-
for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x);
|
595 |
-
return arr;
|
596 |
-
};
|
597 |
-
|
598 |
-
// For debugging
|
599 |
-
var trace = function(msg){
|
600 |
-
if(this.console && typeof console.log !== 'undefined') { console.log(msg); }
|
601 |
-
};
|
602 |
-
|
603 |
-
// Start / Stop
|
604 |
-
this.stop = function(){
|
605 |
-
if(!$(element).data('nivo:vars').stop){
|
606 |
-
$(element).data('nivo:vars').stop = true;
|
607 |
-
trace('Stop Slider');
|
608 |
-
}
|
609 |
-
};
|
610 |
-
|
611 |
-
this.start = function(){
|
612 |
-
if($(element).data('nivo:vars').stop){
|
613 |
-
$(element).data('nivo:vars').stop = false;
|
614 |
-
trace('Start Slider');
|
615 |
-
}
|
616 |
-
};
|
617 |
-
|
618 |
-
// Trigger the afterLoad callback
|
619 |
-
settings.afterLoad.call(this);
|
620 |
-
|
621 |
-
return this;
|
622 |
-
};
|
623 |
-
|
624 |
-
$.fn.nivoSlider = function(options) {
|
625 |
-
return this.each(function(key, value){
|
626 |
-
var element = $(this);
|
627 |
-
// Return early if this element already has a plugin instance
|
628 |
-
if (element.data('nivoslider')) { return element.data('nivoslider'); }
|
629 |
-
// Pass options to plugin constructor
|
630 |
-
var nivoslider = new NivoSlider(this, options);
|
631 |
-
// Store plugin object in this element's data
|
632 |
-
element.data('nivoslider', nivoslider);
|
633 |
-
});
|
634 |
-
};
|
635 |
-
|
636 |
-
//Default settings
|
637 |
-
$.fn.nivoSlider.defaults = {
|
638 |
-
effect: 'random',
|
639 |
-
slices: 15,
|
640 |
-
boxCols: 8,
|
641 |
-
boxRows: 4,
|
642 |
-
animSpeed: 500,
|
643 |
-
pauseTime: 3000,
|
644 |
-
startSlide: 0,
|
645 |
-
directionNav: true,
|
646 |
-
controlNav: true,
|
647 |
-
controlNavThumbs: false,
|
648 |
-
pauseOnHover: true,
|
649 |
-
manualAdvance: false,
|
650 |
-
prevText: 'Prev',
|
651 |
-
nextText: 'Next',
|
652 |
-
randomStart: false,
|
653 |
-
beforeChange: function(){},
|
654 |
-
afterChange: function(){},
|
655 |
-
slideshowEnd: function(){},
|
656 |
-
lastSlide: function(){},
|
657 |
-
afterLoad: function(){}
|
658 |
-
};
|
659 |
-
|
660 |
-
$.fn._reverse = []._reverse;
|
661 |
-
|
662 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/nivo/nivo-slider.css
DELETED
@@ -1,113 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery Nivo Slider v3.2
|
3 |
-
* http://nivo.dev7studios.com
|
4 |
-
*
|
5 |
-
* Copyright 2012, Dev7studios
|
6 |
-
* Free to use and abuse under the MIT license.
|
7 |
-
* http://www.opensource.org/licenses/mit-license.php
|
8 |
-
*/
|
9 |
-
|
10 |
-
/* The Nivo Slider styles */
|
11 |
-
.nivoSlider {
|
12 |
-
position:relative;
|
13 |
-
width:100%;
|
14 |
-
height:auto;
|
15 |
-
overflow: hidden;
|
16 |
-
}
|
17 |
-
.nivoSlider img {
|
18 |
-
position:absolute;
|
19 |
-
top:0px;
|
20 |
-
left:0px;
|
21 |
-
max-width: none;
|
22 |
-
}
|
23 |
-
.nivo-main-image {
|
24 |
-
display: block !important;
|
25 |
-
position: relative !important;
|
26 |
-
width: 100% !important;
|
27 |
-
}
|
28 |
-
|
29 |
-
/* If an image is wrapped in a link */
|
30 |
-
.nivoSlider a.nivo-imageLink {
|
31 |
-
position:absolute;
|
32 |
-
top:0px;
|
33 |
-
left:0px;
|
34 |
-
width:100%;
|
35 |
-
height:100%;
|
36 |
-
border:0;
|
37 |
-
padding:0;
|
38 |
-
margin:0;
|
39 |
-
z-index:6;
|
40 |
-
display:none;
|
41 |
-
background:white;
|
42 |
-
filter:alpha(opacity=0);
|
43 |
-
opacity:0;
|
44 |
-
}
|
45 |
-
/* The slices and boxes in the Slider */
|
46 |
-
.nivo-slice {
|
47 |
-
display:block;
|
48 |
-
position:absolute;
|
49 |
-
z-index:5;
|
50 |
-
height:100%;
|
51 |
-
top:0;
|
52 |
-
}
|
53 |
-
.nivo-box {
|
54 |
-
display:block;
|
55 |
-
position:absolute;
|
56 |
-
z-index:5;
|
57 |
-
overflow:hidden;
|
58 |
-
}
|
59 |
-
.nivo-box img { display:block; }
|
60 |
-
|
61 |
-
/* Caption styles */
|
62 |
-
.nivo-caption {
|
63 |
-
position:absolute;
|
64 |
-
left:0px;
|
65 |
-
bottom:0px;
|
66 |
-
background:#000;
|
67 |
-
color:#fff;
|
68 |
-
width:100%;
|
69 |
-
z-index:8;
|
70 |
-
padding: 5px 10px;
|
71 |
-
opacity: 0.8;
|
72 |
-
overflow: hidden;
|
73 |
-
display: none;
|
74 |
-
-moz-opacity: 0.8;
|
75 |
-
filter:alpha(opacity=8);
|
76 |
-
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
77 |
-
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
78 |
-
box-sizing: border-box; /* Opera/IE 8+ */
|
79 |
-
}
|
80 |
-
.nivo-caption p {
|
81 |
-
padding:5px;
|
82 |
-
margin:0;
|
83 |
-
}
|
84 |
-
.nivo-caption a {
|
85 |
-
display:inline !important;
|
86 |
-
}
|
87 |
-
.nivo-html-caption {
|
88 |
-
display:none;
|
89 |
-
}
|
90 |
-
/* Direction nav styles (e.g. Next & Prev) */
|
91 |
-
.nivo-directionNav a {
|
92 |
-
position:absolute;
|
93 |
-
top:45%;
|
94 |
-
z-index:9;
|
95 |
-
cursor:pointer;
|
96 |
-
}
|
97 |
-
.nivo-prevNav {
|
98 |
-
left:0px;
|
99 |
-
}
|
100 |
-
.nivo-nextNav {
|
101 |
-
right:0px;
|
102 |
-
}
|
103 |
-
/* Control nav styles (e.g. 1,2,3...) */
|
104 |
-
.nivo-controlNav {
|
105 |
-
text-align:center;
|
106 |
-
padding: 15px 0;
|
107 |
-
}
|
108 |
-
.nivo-controlNav a {
|
109 |
-
cursor:pointer;
|
110 |
-
}
|
111 |
-
.nivo-controlNav a.active {
|
112 |
-
font-weight:bold;
|
113 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/nivo/themes/bar/arrows.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/bar/bar.css
DELETED
@@ -1,132 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Skin Name: Nivo Slider Bar Theme
|
3 |
-
Skin URI: http://nivo.dev7studios.com
|
4 |
-
Description: The bottom bar skin for the Nivo Slider.
|
5 |
-
Version: 1.0
|
6 |
-
Author: Gilbert Pellegrom
|
7 |
-
Author URI: http://dev7studios.com
|
8 |
-
Supports Thumbs: false
|
9 |
-
*/
|
10 |
-
|
11 |
-
.theme-bar.slider-wrapper {
|
12 |
-
position: relative;
|
13 |
-
border: 1px solid #333;
|
14 |
-
overflow: hidden;
|
15 |
-
}
|
16 |
-
.theme-bar .nivoSlider {
|
17 |
-
position:relative;
|
18 |
-
background:#fff url(loading.gif) no-repeat 50% 50%;
|
19 |
-
}
|
20 |
-
.theme-bar .nivoSlider img {
|
21 |
-
position:absolute;
|
22 |
-
top:0px;
|
23 |
-
left:0px;
|
24 |
-
display:none;
|
25 |
-
}
|
26 |
-
.theme-bar .nivoSlider a {
|
27 |
-
border:0;
|
28 |
-
display:block;
|
29 |
-
}
|
30 |
-
|
31 |
-
.theme-bar .nivo-controlNav {
|
32 |
-
position: absolute;
|
33 |
-
left: 0;
|
34 |
-
bottom: -41px;
|
35 |
-
z-index: 10;
|
36 |
-
width: 100%;
|
37 |
-
height: 30px;
|
38 |
-
text-align: center;
|
39 |
-
padding: 5px 0;
|
40 |
-
border-top: 1px solid #333;
|
41 |
-
background: #333;
|
42 |
-
background: -moz-linear-gradient(top, #565656 0%, #333333 100%); /* FF3.6+ */
|
43 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#565656), color-stop(100%,#333333)); /* Chrome,Safari4+ */
|
44 |
-
background: -webkit-linear-gradient(top, #565656 0%,#333333 100%); /* Chrome10+,Safari5.1+ */
|
45 |
-
background: -o-linear-gradient(top, #565656 0%,#333333 100%); /* Opera 11.10+ */
|
46 |
-
background: -ms-linear-gradient(top, #565656 0%,#333333 100%); /* IE10+ */
|
47 |
-
background: linear-gradient(to bottom, #565656 0%,#333333 100%); /* W3C */
|
48 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#565656', endColorstr='#333333',GradientType=0 ); /* IE6-9 */
|
49 |
-
opacity: 0.5;
|
50 |
-
-webkit-transition: all 200ms ease-in-out;
|
51 |
-
-moz-transition: all 200ms ease-in-out;
|
52 |
-
-o-transition: all 200ms ease-in-out;
|
53 |
-
transition: all 200ms ease-in-out;
|
54 |
-
}
|
55 |
-
.theme-bar:hover .nivo-controlNav {
|
56 |
-
bottom: 0;
|
57 |
-
opacity: 1;
|
58 |
-
}
|
59 |
-
.theme-bar .nivo-controlNav a {
|
60 |
-
display:inline-block;
|
61 |
-
width:22px;
|
62 |
-
height:22px;
|
63 |
-
background:url(bullets.png) no-repeat;
|
64 |
-
text-indent:-9999px;
|
65 |
-
border:0;
|
66 |
-
margin: 5px 2px 0 2px;
|
67 |
-
}
|
68 |
-
.theme-bar .nivo-controlNav a.active {
|
69 |
-
background-position:0 -22px;
|
70 |
-
}
|
71 |
-
|
72 |
-
.theme-bar .nivo-directionNav a {
|
73 |
-
display:block;
|
74 |
-
border:0;
|
75 |
-
color: #fff;
|
76 |
-
text-transform: uppercase;
|
77 |
-
top: auto;
|
78 |
-
bottom: 10px;
|
79 |
-
z-index: 11;
|
80 |
-
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
81 |
-
font-size: 13px;
|
82 |
-
line-height: 20px;
|
83 |
-
opacity: 0.5;
|
84 |
-
-webkit-transition: all 200ms ease-in-out;
|
85 |
-
-moz-transition: all 200ms ease-in-out;
|
86 |
-
-o-transition: all 200ms ease-in-out;
|
87 |
-
transition: all 200ms ease-in-out;
|
88 |
-
}
|
89 |
-
.theme-bar a.nivo-nextNav { right: -50px; }
|
90 |
-
.theme-bar a.nivo-prevNav { left: -50px; }
|
91 |
-
.theme-bar:hover a.nivo-nextNav {
|
92 |
-
right: 15px;
|
93 |
-
opacity: 1;
|
94 |
-
}
|
95 |
-
.theme-bar:hover a.nivo-prevNav {
|
96 |
-
left: 15px;
|
97 |
-
opacity: 1;
|
98 |
-
}
|
99 |
-
.theme-bar .nivo-directionNav a:hover { color: #ddd; }
|
100 |
-
|
101 |
-
.theme-bar .nivo-caption {
|
102 |
-
font-family: Helvetica, Arial, sans-serif;
|
103 |
-
-webkit-transition: all 200ms ease-in-out;
|
104 |
-
-moz-transition: all 200ms ease-in-out;
|
105 |
-
-o-transition: all 200ms ease-in-out;
|
106 |
-
transition: all 200ms ease-in-out;
|
107 |
-
}
|
108 |
-
.theme-bar:hover .nivo-caption {
|
109 |
-
bottom: 41px;
|
110 |
-
}
|
111 |
-
.theme-bar .nivo-caption a {
|
112 |
-
color:#fff;
|
113 |
-
border-bottom:1px dotted #fff;
|
114 |
-
}
|
115 |
-
.theme-bar .nivo-caption a:hover {
|
116 |
-
color:#fff;
|
117 |
-
}
|
118 |
-
|
119 |
-
.theme-bar .nivo-controlNav.nivo-thumbs-enabled {
|
120 |
-
width: 100%;
|
121 |
-
}
|
122 |
-
.theme-bar .nivo-controlNav.nivo-thumbs-enabled a {
|
123 |
-
width: auto;
|
124 |
-
height: auto;
|
125 |
-
background: none;
|
126 |
-
margin-bottom: 5px;
|
127 |
-
}
|
128 |
-
.theme-bar .nivo-controlNav.nivo-thumbs-enabled img {
|
129 |
-
display: block;
|
130 |
-
width: 120px;
|
131 |
-
height: auto;
|
132 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/nivo/themes/bar/bullets.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/bar/loading.gif
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/dark/arrows.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/dark/bullets.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/dark/dark.css
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Skin Name: Nivo Slider Dark Theme
|
3 |
-
Skin URI: http://nivo.dev7studios.com
|
4 |
-
Description: A dark skin for the Nivo Slider.
|
5 |
-
Version: 1.0
|
6 |
-
Author: Gilbert Pellegrom
|
7 |
-
Author URI: http://dev7studios.com
|
8 |
-
Supports Thumbs: true
|
9 |
-
*/
|
10 |
-
|
11 |
-
.theme-dark.slider-wrapper {
|
12 |
-
background: #222;
|
13 |
-
padding: 10px;
|
14 |
-
}
|
15 |
-
.theme-dark .nivoSlider {
|
16 |
-
position:relative;
|
17 |
-
background:#fff url(loading.gif) no-repeat 50% 50%;
|
18 |
-
margin-bottom:10px;
|
19 |
-
overflow: visible;
|
20 |
-
}
|
21 |
-
.theme-dark .nivoSlider img {
|
22 |
-
position:absolute;
|
23 |
-
top:0px;
|
24 |
-
left:0px;
|
25 |
-
display:none;
|
26 |
-
}
|
27 |
-
.theme-dark .nivoSlider a {
|
28 |
-
border:0;
|
29 |
-
display:block;
|
30 |
-
}
|
31 |
-
|
32 |
-
.theme-dark .nivo-controlNav {
|
33 |
-
text-align: left;
|
34 |
-
padding: 0;
|
35 |
-
position: relative;
|
36 |
-
z-index: 10;
|
37 |
-
}
|
38 |
-
.theme-dark .nivo-controlNav a {
|
39 |
-
display:inline-block;
|
40 |
-
width:10px;
|
41 |
-
height:10px;
|
42 |
-
background:url(bullets.png) no-repeat 0 2px;
|
43 |
-
text-indent:-9999px;
|
44 |
-
border:0;
|
45 |
-
margin: 0 2px;
|
46 |
-
}
|
47 |
-
.theme-dark .nivo-controlNav a.active {
|
48 |
-
background-position:0 100%;
|
49 |
-
}
|
50 |
-
|
51 |
-
.theme-dark .nivo-directionNav a {
|
52 |
-
display:block;
|
53 |
-
width:30px;
|
54 |
-
height:30px;
|
55 |
-
background: url(arrows.png) no-repeat;
|
56 |
-
text-indent:-9999px;
|
57 |
-
border:0;
|
58 |
-
top: auto;
|
59 |
-
bottom: -36px;
|
60 |
-
z-index: 11;
|
61 |
-
}
|
62 |
-
.theme-dark .nivo-directionNav a:hover {
|
63 |
-
background-color: #333;
|
64 |
-
-webkit-border-radius: 2px;
|
65 |
-
-moz-border-radius: 2px;
|
66 |
-
border-radius: 2px;
|
67 |
-
}
|
68 |
-
.theme-dark a.nivo-nextNav {
|
69 |
-
background-position:-16px 50%;
|
70 |
-
right:0px;
|
71 |
-
}
|
72 |
-
.theme-dark a.nivo-prevNav {
|
73 |
-
background-position:11px 50%;
|
74 |
-
left: auto;
|
75 |
-
right: 35px;
|
76 |
-
}
|
77 |
-
|
78 |
-
.theme-dark .nivo-caption {
|
79 |
-
font-family: Helvetica, Arial, sans-serif;
|
80 |
-
}
|
81 |
-
.theme-dark .nivo-caption a {
|
82 |
-
color:#fff;
|
83 |
-
border-bottom:1px dotted #fff;
|
84 |
-
}
|
85 |
-
.theme-dark .nivo-caption a:hover {
|
86 |
-
color:#fff;
|
87 |
-
}
|
88 |
-
|
89 |
-
.theme-dark .nivo-controlNav.nivo-thumbs-enabled {
|
90 |
-
width: 80%;
|
91 |
-
}
|
92 |
-
.theme-dark .nivo-controlNav.nivo-thumbs-enabled a {
|
93 |
-
width: auto;
|
94 |
-
height: auto;
|
95 |
-
background: none;
|
96 |
-
margin-bottom: 5px;
|
97 |
-
}
|
98 |
-
.theme-dark .nivo-controlNav.nivo-thumbs-enabled img {
|
99 |
-
display: block;
|
100 |
-
width: 120px;
|
101 |
-
height: auto;
|
102 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/nivo/themes/dark/loading.gif
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/default/arrows.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/default/bullets.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/default/default.css
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Skin Name: Nivo Slider Default Theme
|
3 |
-
Skin URI: http://nivo.dev7studios.com
|
4 |
-
Description: The default skin for the Nivo Slider.
|
5 |
-
Version: 1.3
|
6 |
-
Author: Gilbert Pellegrom
|
7 |
-
Author URI: http://dev7studios.com
|
8 |
-
Supports Thumbs: true
|
9 |
-
*/
|
10 |
-
|
11 |
-
.theme-default .nivoSlider {
|
12 |
-
position:relative;
|
13 |
-
background:#fff url(loading.gif) no-repeat 50% 50%;
|
14 |
-
margin-bottom:10px;
|
15 |
-
-webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
|
16 |
-
-moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
|
17 |
-
box-shadow: 0px 1px 5px 0px #4a4a4a;
|
18 |
-
}
|
19 |
-
.theme-default .nivoSlider img {
|
20 |
-
position:absolute;
|
21 |
-
top:0px;
|
22 |
-
left:0px;
|
23 |
-
display:none;
|
24 |
-
}
|
25 |
-
.theme-default .nivoSlider a {
|
26 |
-
border:0;
|
27 |
-
display:block;
|
28 |
-
}
|
29 |
-
|
30 |
-
.theme-default .nivo-controlNav {
|
31 |
-
text-align: center;
|
32 |
-
padding: 20px 0;
|
33 |
-
}
|
34 |
-
.theme-default .nivo-controlNav a {
|
35 |
-
display:inline-block;
|
36 |
-
width:22px;
|
37 |
-
height:22px;
|
38 |
-
background:url(bullets.png) no-repeat;
|
39 |
-
text-indent:-9999px;
|
40 |
-
border:0;
|
41 |
-
margin: 0 2px;
|
42 |
-
}
|
43 |
-
.theme-default .nivo-controlNav a.active {
|
44 |
-
background-position:0 -22px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.theme-default .nivo-directionNav a {
|
48 |
-
display:block;
|
49 |
-
width:30px;
|
50 |
-
height:30px;
|
51 |
-
background:url(arrows.png) no-repeat;
|
52 |
-
text-indent:-9999px;
|
53 |
-
border:0;
|
54 |
-
opacity: 0;
|
55 |
-
-webkit-transition: all 200ms ease-in-out;
|
56 |
-
-moz-transition: all 200ms ease-in-out;
|
57 |
-
-o-transition: all 200ms ease-in-out;
|
58 |
-
transition: all 200ms ease-in-out;
|
59 |
-
}
|
60 |
-
.theme-default:hover .nivo-directionNav a { opacity: 1; }
|
61 |
-
.theme-default a.nivo-nextNav {
|
62 |
-
background-position:-30px 0;
|
63 |
-
right:15px;
|
64 |
-
}
|
65 |
-
.theme-default a.nivo-prevNav {
|
66 |
-
left:15px;
|
67 |
-
}
|
68 |
-
|
69 |
-
.theme-default .nivo-caption {
|
70 |
-
font-family: Helvetica, Arial, sans-serif;
|
71 |
-
}
|
72 |
-
.theme-default .nivo-caption a {
|
73 |
-
color:#fff;
|
74 |
-
border-bottom:1px dotted #fff;
|
75 |
-
}
|
76 |
-
.theme-default .nivo-caption a:hover {
|
77 |
-
color:#fff;
|
78 |
-
}
|
79 |
-
|
80 |
-
.theme-default .nivo-controlNav.nivo-thumbs-enabled {
|
81 |
-
width: 100%;
|
82 |
-
}
|
83 |
-
.theme-default .nivo-controlNav.nivo-thumbs-enabled a {
|
84 |
-
width: auto;
|
85 |
-
height: auto;
|
86 |
-
background: none;
|
87 |
-
margin-bottom: 5px;
|
88 |
-
}
|
89 |
-
.theme-default .nivo-controlNav.nivo-thumbs-enabled img {
|
90 |
-
display: block;
|
91 |
-
width: 120px;
|
92 |
-
height: auto;
|
93 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/nivo/themes/default/loading.gif
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/light/arrows.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/light/bullets.png
DELETED
Binary file
|
skin/frontend/base/default/tm/easyslide/nivo/themes/light/light.css
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Skin Name: Nivo Slider Light Theme
|
3 |
-
Skin URI: http://nivo.dev7studios.com
|
4 |
-
Description: A light skin for the Nivo Slider.
|
5 |
-
Version: 1.0
|
6 |
-
Author: Gilbert Pellegrom
|
7 |
-
Author URI: http://dev7studios.com
|
8 |
-
Supports Thumbs: true
|
9 |
-
*/
|
10 |
-
|
11 |
-
.theme-light.slider-wrapper {
|
12 |
-
background: #fff;
|
13 |
-
padding: 10px;
|
14 |
-
}
|
15 |
-
.theme-light .nivoSlider {
|
16 |
-
position:relative;
|
17 |
-
background:#fff url(loading.gif) no-repeat 50% 50%;
|
18 |
-
margin-bottom:10px;
|
19 |
-
overflow: visible;
|
20 |
-
}
|
21 |
-
.theme-light .nivoSlider img {
|
22 |
-
position:absolute;
|
23 |
-
top:0px;
|
24 |
-
left:0px;
|
25 |
-
display:none;
|
26 |
-
}
|
27 |
-
.theme-light .nivoSlider a {
|
28 |
-
border:0;
|
29 |
-
display:block;
|
30 |
-
}
|
31 |
-
|
32 |
-
.theme-light .nivo-controlNav {
|
33 |
-
text-align: left;
|
34 |
-
padding: 0;
|
35 |
-
position: relative;
|
36 |
-
z-index: 10;
|
37 |
-
}
|
38 |
-
.theme-light .nivo-controlNav a {
|
39 |
-
display:inline-block;
|
40 |
-
width:10px;
|
41 |
-
height:10px;
|
42 |
-
background:url(bullets.png) no-repeat;
|
43 |
-
text-indent:-9999px;
|
44 |
-
border:0;
|
45 |
-
margin: 0 2px;
|
46 |
-
}
|
47 |
-
.theme-light .nivo-controlNav a.active {
|
48 |
-
background-position:0 100%;
|
49 |
-
}
|
50 |
-
|
51 |
-
.theme-light .nivo-directionNav a {
|
52 |
-
display:block;
|
53 |
-
width:30px;
|
54 |
-
height:30px;
|
55 |
-
background: url(arrows.png) no-repeat;
|
56 |
-
text-indent:-9999px;
|
57 |
-
border:0;
|
58 |
-
top: auto;
|
59 |
-
bottom: -36px;
|
60 |
-
z-index: 11;
|
61 |
-
}
|
62 |
-
.theme-light .nivo-directionNav a:hover {
|
63 |
-
background-color: #eee;
|
64 |
-
-webkit-border-radius: 2px;
|
65 |
-
-moz-border-radius: 2px;
|
66 |
-
border-radius: 2px;
|
67 |
-
}
|
68 |
-
.theme-light a.nivo-nextNav {
|
69 |
-
background-position:160% 50%;
|
70 |
-
right:0px;
|
71 |
-
}
|
72 |
-
.theme-light a.nivo-prevNav {
|
73 |
-
background-position:-60% 50%;
|
74 |
-
left: auto;
|
75 |
-
right: 35px;
|
76 |
-
}
|
77 |
-
|
78 |
-
.theme-light .nivo-caption {
|
79 |
-
font-family: Helvetica, Arial, sans-serif;
|
80 |
-
}
|
81 |
-
.theme-light .nivo-caption a {
|
82 |
-
color:#fff;
|
83 |
-
border-bottom:1px dotted #fff;
|
84 |
-
}
|
85 |
-
.theme-light .nivo-caption a:hover {
|
86 |
-
color:#fff;
|
87 |
-
}
|
88 |
-
|
89 |
-
.theme-light .nivo-controlNav.nivo-thumbs-enabled {
|
90 |
-
width: 80%;
|
91 |
-
}
|
92 |
-
.theme-light .nivo-controlNav.nivo-thumbs-enabled a {
|
93 |
-
width: auto;
|
94 |
-
height: auto;
|
95 |
-
background: none;
|
96 |
-
margin-bottom: 5px;
|
97 |
-
}
|
98 |
-
.theme-light .nivo-controlNav.nivo-thumbs-enabled img {
|
99 |
-
display: block;
|
100 |
-
width: 120px;
|
101 |
-
height: auto;
|
102 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/easyslide/nivo/themes/light/loading.gif
DELETED
Binary file
|
skin/frontend/base/default/tm/firecheckout/css/firecheckout.css
DELETED
@@ -1,793 +0,0 @@
|
|
1 |
-
.page-empty.firecheckout-index-index { max-width: 1024px; margin: 0 auto; padding: 15px 5px; }
|
2 |
-
|
3 |
-
.firecheckout-header { text-align: center; padding: 0 0 10px; }
|
4 |
-
.firecheckout-logo strong {
|
5 |
-
font-size: 0;
|
6 |
-
height: 0;
|
7 |
-
left: -999em;
|
8 |
-
line-height: 0;
|
9 |
-
overflow: hidden;
|
10 |
-
position: absolute;
|
11 |
-
text-indent: -999em;
|
12 |
-
top: -999em;
|
13 |
-
width: 0;
|
14 |
-
}
|
15 |
-
.firecheckout-logo img { display: inline; }
|
16 |
-
|
17 |
-
.firecheckout-index-index {}
|
18 |
-
.firecheckout-index-index .page-title { zoom: 1; background: none; width: auto; }
|
19 |
-
.firecheckout-index-index .page-title:after { content: '.'; display: block; visibility: hidden; height: 0; font-size: 0; clear: both; }
|
20 |
-
.firecheckout-index-index .checkout-title h1 { float: left; color: #000; background: none; border: none; }
|
21 |
-
.firecheckout-index-index .checkout-title a { text-transform: none; }
|
22 |
-
.firecheckout-login-wrapper { float: right; margin: 3px 0 0 0; }
|
23 |
-
.firecheckout-top-container { margin: 10px 0; clear: both; }
|
24 |
-
|
25 |
-
/* Layout */
|
26 |
-
#firecheckout-form { display: block; }
|
27 |
-
#firecheckout-form .col3-fire-set .col-fire-1,
|
28 |
-
#firecheckout-form .col3-fire-set .col-fire-2 { width: 30%; float: left; border: none; padding: 0; }
|
29 |
-
#firecheckout-form .col3-fire-set .col-fire-2 { margin-left:1%; }
|
30 |
-
#firecheckout-form .col3-fire-set .col-fire-3 { width: 38%; float: right; border: none; padding: 0; }
|
31 |
-
#firecheckout-form .col2-fire-set .wide { width: auto; }
|
32 |
-
#firecheckout-form .col2-fire-set .col-fire-1 { width: 32.5%; float: left; border: none; padding: 0; }
|
33 |
-
#firecheckout-form .col2-fire-set .col-fire-2 { width: 66%; float: right; border: none; padding: 0; }
|
34 |
-
|
35 |
-
/* block styles */
|
36 |
-
.firecheckout-section {
|
37 |
-
background: #fff url(../images/sprite.png) repeat-x 0 -102px;
|
38 |
-
border: 1px solid #ccc;
|
39 |
-
-moz-border-radius: 6px;
|
40 |
-
-webkit-border-radius: 6px;
|
41 |
-
border-radius: 6px;
|
42 |
-
margin-bottom: 10px;
|
43 |
-
}
|
44 |
-
.firecheckout-section .block-title {
|
45 |
-
background: #e8ebed url(../images/sprite.png) repeat-x 0 -56px;
|
46 |
-
border-bottom: 1px solid #ccc;
|
47 |
-
border-width: 0 0 1px 0;
|
48 |
-
height: 19px;
|
49 |
-
font-size: 12px;
|
50 |
-
font-weight: bold;
|
51 |
-
text-transform: uppercase;
|
52 |
-
padding: 6px 5px 3px;
|
53 |
-
margin: 0 0 5px 0;
|
54 |
-
-moz-border-radius: 6px 6px 0 0;
|
55 |
-
-webkit-border-radius: 6px 6px 0 0;
|
56 |
-
border-radius: 6px 6px 0 0;
|
57 |
-
color: #333;
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
.firecheckout-section .block-title .num {
|
61 |
-
border: 1px solid #888;
|
62 |
-
-moz-border-radius: 4px;
|
63 |
-
-webkit-border-radius: 4px;
|
64 |
-
border-radius: 4px;
|
65 |
-
padding: 1px 5px;
|
66 |
-
margin: 0 5px 0 0;
|
67 |
-
background: #ccc;
|
68 |
-
}
|
69 |
-
.firecheckout-set #shipping-method-reset,
|
70 |
-
.firecheckout-set #payment-method-reset {
|
71 |
-
text-transform: lowercase;
|
72 |
-
font-weight: normal;
|
73 |
-
text-shadow: 1px 1px 1px #fff;
|
74 |
-
color: #999;
|
75 |
-
cursor: pointer;
|
76 |
-
background: #f1f3f4;
|
77 |
-
border-radius: 4px;
|
78 |
-
border: 1px solid #ccc;
|
79 |
-
padding: 0 3px;
|
80 |
-
position: absolute;
|
81 |
-
top: 5px;
|
82 |
-
right: 5px;
|
83 |
-
margin: 0;
|
84 |
-
}
|
85 |
-
.firecheckout-set #shipping-method-reset:hover,
|
86 |
-
.firecheckout-set #payment-method-reset:hover { color: #777; }
|
87 |
-
.firecheckout-set .block-content { margin: 0; padding: 0 10px; }
|
88 |
-
/* input field styles */
|
89 |
-
.firecheckout-set input.input-text,
|
90 |
-
.firecheckout-set select,
|
91 |
-
.firecheckout-set textarea {
|
92 |
-
height: auto;
|
93 |
-
width: 100%;
|
94 |
-
border: 1px solid #aaa;
|
95 |
-
border-color: #aaa #ccc #ccc #ccc;
|
96 |
-
border-radius: 4px;
|
97 |
-
padding: 4px 4px;
|
98 |
-
text-indent: 0;
|
99 |
-
box-sizing: border-box;
|
100 |
-
}
|
101 |
-
.firecheckout-set select { padding: 3px 4px; }
|
102 |
-
|
103 |
-
.form-checkoutfields label { float: none; }
|
104 |
-
.checkoutfield-note { font-size: .9em; color: #aaa; }
|
105 |
-
|
106 |
-
/*********************/
|
107 |
-
/* reset standard form styles */
|
108 |
-
.firecheckout-set .form-list,
|
109 |
-
.firecheckout-set .form-list ul { margin: 0; list-style: none; }
|
110 |
-
.firecheckout-set .form-list ul { padding: 0; }
|
111 |
-
.firecheckout-set .form-list li,
|
112 |
-
.firecheckout-set .form-list ul li { margin-left: 0; margin-right: 0; }
|
113 |
-
.firecheckout-set .sp-methods ul { margin: 0; }
|
114 |
-
.firecheckout-set .sp-methods ul,
|
115 |
-
.firecheckout-set .sp-methods li { padding: 0; list-style: none; }
|
116 |
-
.firecheckout-set .form-list .validation-advice { width: auto; margin: 0; }
|
117 |
-
.firecheckout-set span.validation-error,
|
118 |
-
.firecheckout-set div.validation-error,
|
119 |
-
.firecheckout-set span.validation-passed,
|
120 |
-
.firecheckout-set div.validation-passed { background: none; padding: 0; }
|
121 |
-
.firecheckout-set .form-list textarea { height: 60px; }
|
122 |
-
.firecheckout-set .input-text,
|
123 |
-
.firecheckout-set .form-list textarea,
|
124 |
-
.firecheckout-set .form-list li.wide textarea,
|
125 |
-
.firecheckout-set .form-list select,
|
126 |
-
.firecheckout-set .form-list li.wide select,
|
127 |
-
.firecheckout-set .form-list input.input-text,
|
128 |
-
.firecheckout-set .form-list li.wide input.input-text,
|
129 |
-
.firecheckout-set .gift-messages-form .item .details .form-list input.input-text,
|
130 |
-
.firecheckout-set .gift-messages-form .item .details .form-list li.wide textarea {
|
131 |
-
width: 100%; /* rewrite theme styles */
|
132 |
-
}
|
133 |
-
|
134 |
-
/* Ajax Loader */
|
135 |
-
.firecheckout-set .input-box { position: relative; }
|
136 |
-
.firecheckout-set .field-spinner-wrapper { position: absolute; top: 0; right: 0; z-index: 5; display: none; }
|
137 |
-
.firecheckout-set .loader:before,
|
138 |
-
.firecheckout-set .loader:after,
|
139 |
-
.firecheckout-set .loader {
|
140 |
-
border-radius: 50%;
|
141 |
-
width: 2.5em;
|
142 |
-
height: 2.5em;
|
143 |
-
animation-fill-mode: both;
|
144 |
-
animation: loader 1.0s infinite ease-in-out;
|
145 |
-
}
|
146 |
-
.firecheckout-set .loader {
|
147 |
-
display: block;
|
148 |
-
font-size: 4px;
|
149 |
-
margin-top: -3.5em; /* element height plus half */
|
150 |
-
margin-left: -6em; /* element:before width plus element width plus margins */
|
151 |
-
position: relative;
|
152 |
-
text-indent: -9999em;
|
153 |
-
transform: translateZ(0);
|
154 |
-
animation-delay: -0.16s;
|
155 |
-
}
|
156 |
-
.firecheckout-set .loader:before {
|
157 |
-
left: -3.5em;
|
158 |
-
animation-delay: -0.32s;
|
159 |
-
}
|
160 |
-
.firecheckout-set .loader:after {
|
161 |
-
left: 3.5em;
|
162 |
-
}
|
163 |
-
.firecheckout-set .loader:before,
|
164 |
-
.firecheckout-set .loader:after {
|
165 |
-
content: '';
|
166 |
-
position: absolute;
|
167 |
-
top: 0;
|
168 |
-
}
|
169 |
-
@keyframes loader {
|
170 |
-
0%, 80%, 100% { box-shadow: 0 2.5em 0 -1.3em #ccc; }
|
171 |
-
40% { box-shadow: 0 2.5em 0 0 #ccc; }
|
172 |
-
}
|
173 |
-
|
174 |
-
/* Loading button */
|
175 |
-
.firecheckout-set button.loading { animation: 1s button-blink infinite; cursor: wait; }
|
176 |
-
@keyframes button-blink { 50% { opacity: 0.5; } }
|
177 |
-
|
178 |
-
/* fluid form styles */
|
179 |
-
.firecheckout-set .form-list { padding: 0; margin: 0; }
|
180 |
-
.firecheckout-set .form-list label { width: auto; }
|
181 |
-
.firecheckout-set .form-list .control label { padding-right: 5px; }
|
182 |
-
.firecheckout-set .form-list .field,
|
183 |
-
.firecheckout-set .form-list .input-box { width: 100%; max-width: 100%; }
|
184 |
-
.firecheckout-set .form-list .fields .field { clear: none; }
|
185 |
-
.firecheckout-set .form-list .fields .field,
|
186 |
-
.firecheckout-set .form-list .fields .input-box,
|
187 |
-
.firecheckout-set .gift-messages-form .item .details .form-list .field { width: 50%; }
|
188 |
-
.firecheckout-set .form-list .field .input-box,
|
189 |
-
.firecheckout-set .form-list .fields .field .input-box,
|
190 |
-
.firecheckout-set .gift-messages-form .item .details .form-list li.wide .input-box { width: 100%; }
|
191 |
-
.firecheckout-set .form-list .fields .field:first-child .input-box { width: 98%; }
|
192 |
-
.firecheckout-set .form-list .wide .field,
|
193 |
-
.firecheckout-set .form-list .wide .input-box { width: 100%; }
|
194 |
-
.firecheckout-set .form-list .wide .field .input-box { width: 100%; }
|
195 |
-
|
196 |
-
/* dob */
|
197 |
-
.firecheckout-set .form-list .customer-dob .dob-day,
|
198 |
-
.firecheckout-set .form-list .customer-dob .dob-month { width: 25%; margin: 0; }
|
199 |
-
.firecheckout-set .form-list .customer-dob .dob-day .input-text,
|
200 |
-
.firecheckout-set .form-list .customer-dob .dob-month .input-text { width: 97%; }
|
201 |
-
.firecheckout-set .form-list .customer-dob .dob-year { width: 50%; }
|
202 |
-
.firecheckout-set .form-list .customer-dob .dob-year input.input-text { width: 100%; }
|
203 |
-
.firecheckout-set .form-list .fields .customer-dob .dob-year input.input-text { width: 98%; }
|
204 |
-
|
205 |
-
/* name */
|
206 |
-
.firecheckout-set .form-list .name-prefix
|
207 |
-
.firecheckout-set .form-list .name-middlename,
|
208 |
-
.firecheckout-set .form-list .name-suffix,
|
209 |
-
.firecheckout-set .form-list .name-firstname,
|
210 |
-
.firecheckout-set .form-list .name-lastname { width: 50% !important; }
|
211 |
-
.firecheckout-set .form-list .name-prefix .input-text,
|
212 |
-
.firecheckout-set .form-list .name-middlename .input-text,
|
213 |
-
.firecheckout-set .form-list .name-suffix .input-text,
|
214 |
-
.firecheckout-set .form-list .name-firstname .input-text,
|
215 |
-
.firecheckout-set .form-list .name-lastname .input-text,
|
216 |
-
.firecheckout-set .form-list .name-prefix .input-box,
|
217 |
-
.firecheckout-set .form-list .name-middlename .input-box,
|
218 |
-
.firecheckout-set .form-list .name-suffix .input-box,
|
219 |
-
.firecheckout-set .form-list .name-firstname .input-box,
|
220 |
-
.firecheckout-set .form-list .name-lastname .input-box { width: 100% !important; }
|
221 |
-
/* all is shown */
|
222 |
-
.firecheckout-set .form-list .customer-name-prefix-middlename-suffix .name-prefix .input-box,
|
223 |
-
.firecheckout-set .form-list .customer-name-prefix-middlename-suffix .name-middlename .input-box,
|
224 |
-
.firecheckout-set .form-list .customer-name-prefix-middlename-suffix .name-suffix .input-box,
|
225 |
-
.firecheckout-set .form-list .customer-name-prefix-middlename .name-prefix .input-box,
|
226 |
-
.firecheckout-set .form-list .customer-name-prefix-middlename .name-middlename .input-box { width: 98% !important; }
|
227 |
-
/* prefix is hidden (and suffix) */
|
228 |
-
.firecheckout-set .form-list .customer-name-middlename-suffix .name-firstname .input-box,
|
229 |
-
.firecheckout-set .form-list .customer-name-middlename-suffix .name-lastname .input-box,
|
230 |
-
.firecheckout-set .form-list .customer-name-middlename .name-firstname .input-box,
|
231 |
-
.firecheckout-set .form-list .customer-name-middlename .name-lastname .input-box { width: 98% !important; }
|
232 |
-
/* middlename is hidden (and suffix) */
|
233 |
-
.firecheckout-set .form-list .customer-name-prefix-suffix .name-prefix .input-box,
|
234 |
-
.firecheckout-set .form-list .customer-name-prefix-suffix .name-lastname .input-box,
|
235 |
-
.firecheckout-set .form-list .customer-name-prefix .name-prefix .input-box,
|
236 |
-
.firecheckout-set .form-list .customer-name-prefix .name-lastname .input-box { width: 98% !important; }
|
237 |
-
/* prefix and middlename are hidden (ans suffix) */
|
238 |
-
.firecheckout-set .form-list .customer-name-suffix .name-suffix .input-box,
|
239 |
-
.firecheckout-set .form-list .customer-name-suffix .name-firstname .input-box,
|
240 |
-
.firecheckout-set .form-list .customer-name .name-firstname .input-box { width: 98% !important; }
|
241 |
-
|
242 |
-
/*webkit fixes*/
|
243 |
-
.firecheckout-set .form-list .customer-name-middlename .name-lastname,
|
244 |
-
.firecheckout-set .form-list .customer-name-prefix-middlename .name-middlename,
|
245 |
-
.firecheckout-set .form-list .customer-name-prefix-middlename-suffix .name-middlename,
|
246 |
-
.firecheckout-set .form-list .customer-name-prefix-middlename-suffix .name-suffix,
|
247 |
-
.firecheckout-set .form-list .customer-name-prefix-suffix .name-lastname,
|
248 |
-
.firecheckout-set .form-list .customer-name-prefix .name-lastname { clear: left; }
|
249 |
-
/*********************/
|
250 |
-
|
251 |
-
.firecheckout-index-index #billing-new-address-form,
|
252 |
-
.firecheckout-index-index #shipping-new-address-form { width: auto; }
|
253 |
-
.firecheckout-index-index .same-as-billing { margin: 10px 0; }
|
254 |
-
.firecheckout-index-index .same-as-billing li { margin: 0; padding: 0; }
|
255 |
-
|
256 |
-
#firecheckout-form .discount-form .messages,
|
257 |
-
#firecheckout-form .giftcard-form .messages { width: 97%; }
|
258 |
-
#coupon-code, #giftcard_code { margin: 2px 0 2px; width: 125px; }
|
259 |
-
#coupon-cancel,
|
260 |
-
#coupon-apply,
|
261 |
-
#giftcard-add { display: inline; margin: 0 0 0 5px; }
|
262 |
-
#firecheckout-form .discount { padding: 0; }
|
263 |
-
#coupon-code,
|
264 |
-
#giftcard_code,
|
265 |
-
#rewardponts .input-text { margin: 2px 0; width: 110px; }
|
266 |
-
#rewardponts select.input-text { width: 165px; }
|
267 |
-
#firecheckout-form .discount .button,
|
268 |
-
#firecheckout-form .giftcard .button { margin: 0; }
|
269 |
-
|
270 |
-
/* gift messages */
|
271 |
-
.firecheckout-set .gift-messages { margin-bottom: 5px; }
|
272 |
-
.firecheckout-set .gift-messages h3 { font-size: 12px; font-weight: bold; margin: 0 0 5px; }
|
273 |
-
.firecheckout-set .gift-messages p.control,
|
274 |
-
.firecheckout-set .gift-messages p,
|
275 |
-
.firecheckout-set .gift-messages-form,
|
276 |
-
.firecheckout-set .gift-message-form { padding: 0; background: none; border: none; }
|
277 |
-
.firecheckout-set .gift-messages-form p { margin: 2px 0 10px; }
|
278 |
-
.firecheckout-set .gift-messages-form .item .product-img-box { float: left; width: 75px; }
|
279 |
-
.firecheckout-set .gift-messages-form .item .details { margin-left: 90px; float: none; }
|
280 |
-
.firecheckout-set .gift-messages-form .item .details .f-fix { float: left; }
|
281 |
-
.firecheckout-set .add-gift-message { padding: 10px 0; }
|
282 |
-
.firecheckout-set .add-gift-message h3 { font-size: 13px; font-weight: bold; }
|
283 |
-
.firecheckout-set .add-gift-message p { margin: 10px 0 0; }
|
284 |
-
.firecheckout-set .gift-message-form .inner-box h5,
|
285 |
-
.firecheckout-set .gift-message-form .inner-box h4 { font-size: 12px; font-weight: bold; margin: 10px 0 0px; padding: 0 5px; }
|
286 |
-
.firecheckout-set .gift-message-form .inner-box p { margin: 5px 0 10px; padding: 0 5px; }
|
287 |
-
.firecheckout-set .gift-options-for-order { padding: 0 0 0 20px; }
|
288 |
-
.firecheckout-set .gift-options-for-order #allow-gift-messages-for-order-container { margin-left: -20px; }
|
289 |
-
.gift-options-for-order .fieldset .input-text,
|
290 |
-
.gift-options-for-order .fieldset textarea { width: 100%; }
|
291 |
-
|
292 |
-
.gift-message-form .gift-item { background: none; }
|
293 |
-
.gift-message-form .gift-item .product-img-box { width: 75px; padding-right: 5px; background: none; }
|
294 |
-
.gift-message-form .gift-item .product-image { margin: 0; padding: 0; }
|
295 |
-
.gift-message-form .gift-item .product-name { margin-top: 5px; }
|
296 |
-
.gift-message-form .gift-item .fieldset { padding: 0 0 5px 0; float: none; margin-left: 80px; background: none; }
|
297 |
-
.gift-message-form .gift-item li.fields .field { float: none; width: 100%; }
|
298 |
-
.gift-message-form .gift-item .fieldset label { width: auto; text-align: left; }
|
299 |
-
.gift-message-form .fieldset .input-box { float: none; }
|
300 |
-
.gift-message-form .fieldset .input-text,
|
301 |
-
.gift-message-form .fieldset textarea { width: 100%; }
|
302 |
-
|
303 |
-
/* shipping & payment methods */
|
304 |
-
#checkout-shipping-method-load,
|
305 |
-
#checkout-payment-method-load { margin: 10px 0; }
|
306 |
-
.firecheckout-set .sp-methods { margin: 0; padding: 0; }
|
307 |
-
.firecheckout-set .sp-methods .form-list { padding: 0; }
|
308 |
-
.firecheckout-set .sp-methods .form-list li { float: none; width: auto; }
|
309 |
-
.firecheckout-set .sp-methods dt {}
|
310 |
-
.firecheckout-set .sp-methods dd { margin: 0; }
|
311 |
-
.firecheckout-set .sp-methods dd ul { margin: 0 0 10px; }
|
312 |
-
.firecheckout-set .sp-methods .input-box .v-fix { margin-right: 5px; max-width: 50%; }
|
313 |
-
.firecheckout-set .sp-methods .checkmo-list label { float: left; padding-right: 10px; text-align: right; width: 110px; }
|
314 |
-
.firecheckout-set .sp-methods .checkmo-list address { float: left; }
|
315 |
-
.firecheckout-set #advice-required-entry-ccsave_expiration_yr { width: 8em; }
|
316 |
-
.firecheckout-set #shipping-method .buttons-set { border: none; margin-top: 0; }
|
317 |
-
.firecheckout-set #checkout-payment-method-load .form-list .input-box { width: auto; }
|
318 |
-
|
319 |
-
.firecheckout-set .discount-form,
|
320 |
-
.firecheckout-set .giftcard-form,
|
321 |
-
#rewardponts .block-content { padding: 0 10px 8px; }
|
322 |
-
.discount-form .input-field-wrapper,
|
323 |
-
.giftcard-form .input-field-wrapper { float: left; margin-bottom: 3px; }
|
324 |
-
.firecheckout-set .discount-form .input-box,
|
325 |
-
.firecheckout-set .giftcard-form .input-box { zoom: 1; }
|
326 |
-
.firecheckout-set .discount-form .input-box:after,
|
327 |
-
.firecheckout-set .giftcard-form .input-box:after { content: '.'; display: block; visibility: hidden; height: 0; font-size: 0; clear: both; }
|
328 |
-
#customerbalance_placer,
|
329 |
-
#reward_placer { padding: 0 10px; }
|
330 |
-
|
331 |
-
/* editable shopping cart */
|
332 |
-
.qty-wrapper { position: relative; width: 66px; }
|
333 |
-
.qty-wrapper .qty { width: 20px !important; padding: 2px !important; font-size: 11px !important; border-width: 1px !important; }
|
334 |
-
.qty-wrapper .qty-spinner {}
|
335 |
-
.qty-wrapper.shown .qty-spinner { display: block; }
|
336 |
-
.qty-wrapper .qty-less,
|
337 |
-
.qty-wrapper .qty-more { position: absolute; top: 0; width: 20px; height: 21px; margin: 0; padding: 0; line-height: normal; cursor: pointer; }
|
338 |
-
.qty-wrapper .qty-less { left: 0; }
|
339 |
-
.qty-wrapper .qty-more { right: 0; }
|
340 |
-
|
341 |
-
#checkout-review-load .messages { margin: 4px 6px 0 !important; width: 98%; }
|
342 |
-
#checkout-review-load .messages li { margin: 0 0 4px !important; }
|
343 |
-
|
344 |
-
.firecheckout-set #checkout-review-submit { margin: 5px 0 3px; padding: 0 10px; }
|
345 |
-
.firecheckout-set #checkout-review-submit .form-list { padding: 0; }
|
346 |
-
.firecheckout-set #checkout-review-submit .form-comment label { position: static; }
|
347 |
-
|
348 |
-
.firecheckout-set #shipping-wrapper { margin: 20px 0 0; }
|
349 |
-
|
350 |
-
.firecheckout-set .updating {
|
351 |
-
opacity: 0.6;
|
352 |
-
animation: 1s div-blink infinite;
|
353 |
-
-ms-animation: none; /* IE11 on WIN8.1 bugfix */
|
354 |
-
cursor: wait;
|
355 |
-
}
|
356 |
-
@keyframes div-blink { 50% { opacity: 0.4; } }
|
357 |
-
|
358 |
-
#firecheckout-spinner { position: fixed; left: 50%; top: 50%; z-index: 10000;
|
359 |
-
background: #fff url(../images/ajax-loader.gif) no-repeat 50% 25px;
|
360 |
-
border-radius: 4px; text-align: center; padding: 60px 0 0 0;
|
361 |
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
362 |
-
width: 200px; height: 30px; margin: -60px 0 0 -100px; font-weight: bold; }
|
363 |
-
|
364 |
-
.firecheckout-set #checkout-payment-method-load { padding: 0 10px; }
|
365 |
-
|
366 |
-
.firecheckout-set .newsletter { margin: -6px 0 8px; padding: 0; }
|
367 |
-
.firecheckout-set .newsletter label { position: static; }
|
368 |
-
.firecheckout-set .buttons-set { margin: 1em 0 0; }
|
369 |
-
.firecheckout-index-index .buttons-set button.button { float: none; }
|
370 |
-
|
371 |
-
.checkout-agreements-load .messages { padding: 7px 10px 0 !important; box-sizing: border-box; }
|
372 |
-
.firecheckout-set .checkout-agreements { border-bottom: 1px solid #ccc; padding: 7px 10px; margin: 0; }
|
373 |
-
.firecheckout-set .checkout-agreements li { margin: 0; }
|
374 |
-
.firecheckout-set .checkout-agreements .agree { padding: 4px 0 4px 0; }
|
375 |
-
.firecheckout-set .checkout-agreements .last { margin: 0; }
|
376 |
-
.firecheckout-set .checkout-agreements .agreement-content { }
|
377 |
-
.btn-agree { cursor: pointer; }
|
378 |
-
.firecheckout-agreement-label-minimal { cursor: pointer; }
|
379 |
-
.btn-agree:hover,
|
380 |
-
.firecheckout-agreement-label-minimal:hover { text-decoration: underline; }
|
381 |
-
|
382 |
-
#shipping_form_delivery_date { margin: 10px 0; }
|
383 |
-
#shipping_form_delivery_date .input-box { width: 100% !important; }
|
384 |
-
#shipping_form_delivery_date .delivery-date,
|
385 |
-
#shipping_form_delivery_date .delivery-time { width: 50%; margin: 0; }
|
386 |
-
#shipping_form_delivery_date .wide .delivery-date,
|
387 |
-
#shipping_form_delivery_date .wide .delivery-time { width: 100%; }
|
388 |
-
#shipping_form_delivery_date .delivery-date .input-text { width: 98%; }
|
389 |
-
#shipping_form_delivery_date .wide .delivery-date .input-text { width: 100%; }
|
390 |
-
#shipping_form_delivery_date .delivery-date .input-text { margin-right: -23px; }
|
391 |
-
#shipping_form_delivery_date .delivery-date label { clear: left; display: block; float: none; color: #888; font-size: 10px; font-weight: normal; }
|
392 |
-
#shipping_form_delivery_date .delivery-date img { display: inline; }
|
393 |
-
#delivery_date,
|
394 |
-
#delivery_time { height: 30px; }
|
395 |
-
|
396 |
-
.firecheckout-set #checkout-review #checkout-additional {
|
397 |
-
padding: 15px 10px 10px;
|
398 |
-
margin: 0;
|
399 |
-
background: #fcfcfc;
|
400 |
-
border: none;
|
401 |
-
border-radius: 0;
|
402 |
-
border-bottom: 1px solid #ccc;
|
403 |
-
}
|
404 |
-
.firecheckout-set #checkout-review #checkout-additional .block-title { font-size: 11px; display: none; }
|
405 |
-
.firecheckout-set #checkout-review #checkout-additional label { color: #444; }
|
406 |
-
|
407 |
-
.firecheckout-set #checkout-review .block-title { margin: 0 !important; }
|
408 |
-
.firecheckout-set #checkout-review .collateral-wrapper { display: table; }
|
409 |
-
.firecheckout-set #checkout-review .collateral-wrapper img { max-width: none; }
|
410 |
-
.firecheckout-set #checkout-review .product-image,
|
411 |
-
.firecheckout-set #checkout-review .collateral { display: table-cell; vertical-align: top; }
|
412 |
-
.firecheckout-set #checkout-review .collateral { padding-left: 5px; }
|
413 |
-
.firecheckout-set #checkout-review .short-description { font-size: .9em; line-height: normal; }
|
414 |
-
.firecheckout-set #checkout-review .firecheckout-items-after { padding: 7px 10px; }
|
415 |
-
.firecheckout-set #checkout-review-table-wrapper { overflow: auto; }
|
416 |
-
.firecheckout-set #checkout-review #checkout-review-table { border-width: 0 0 1px 0; width: 100%; }
|
417 |
-
.firecheckout-set #checkout-review #checkout-review-table tr td:first-child,
|
418 |
-
.firecheckout-set #checkout-review #checkout-review-table tr th:first-child { border-left-width: 0; }
|
419 |
-
.firecheckout-set #checkout-review #checkout-review-table td.last,
|
420 |
-
.firecheckout-set #checkout-review #checkout-review-table th.last,
|
421 |
-
.firecheckout-set #checkout-review #checkout-review-table tr td:last-child,
|
422 |
-
.firecheckout-set #checkout-review #checkout-review-table tr th:last-child { border-right-width: 0; }
|
423 |
-
.firecheckout-set #checkout-review #checkout-review-table tr.first th { border-top: none; }
|
424 |
-
.firecheckout-set #checkout-review #checkout-review-table tfoot tr { background: none !important; }
|
425 |
-
.firecheckout-set #checkout-review #checkout-review-table tfoot tr.first td { background: none; }
|
426 |
-
/*.firecheckout-index-index #checkout-review-table td,
|
427 |
-
.firecheckout-index-index #checkout-review-table th,
|
428 |
-
.firecheckout-index-index #checkout-review-table-wrapper .data-table tr.last th,
|
429 |
-
.firecheckout-index-index .data-table thead th,
|
430 |
-
.firecheckout-index-index #checkout-review-table-wrapper .data-table tfoot tr.first td.a-left,
|
431 |
-
.firecheckout-index-index #checkout-review-table-wrapper .data-table tfoot td.a-left,
|
432 |
-
.firecheckout-index-index #checkout-review-table tfoot tr.last td.a-left { padding: 3px 8px; height: auto; }*/
|
433 |
-
.firecheckout-set #checkout-review-table .btn-remove { float: right; margin-left: 5px; }
|
434 |
-
.firecheckout-set #checkout-review-table .ugiftcert-remove { float: right; margin: 1px 0 0 2px; }
|
435 |
-
.firecheckout-set #review-buttons-container { padding: 8px 6px 6px 0; border: none; margin: 0; text-align: right; }
|
436 |
-
.firecheckout-set #review-buttons-container .please-wait { float: left; }
|
437 |
-
|
438 |
-
#addresses-review { padding: 10px 10px; border-bottom: 1px solid #ccc; font-size: 0.95em; line-height: 1.3em; }
|
439 |
-
#addresses-review .col-1,
|
440 |
-
#addresses-review .col-2 { width: 49% !important; float: left; clear: none; }
|
441 |
-
#addresses-review .col-2 { float: right; }
|
442 |
-
#payment-method-review { clear: left; margin-top: 10px !important; }
|
443 |
-
|
444 |
-
/* Address verification */
|
445 |
-
#address-verification-window .error-msg { min-height: 0 !important; margin: 4px 0 !important; }
|
446 |
-
.address-verification-title { font-weight: bold; margin: 5px 0 3px; padding: 0; }
|
447 |
-
.verification-note { margin: 0; }
|
448 |
-
.address-actions { padding-left: 5px; }
|
449 |
-
.address-actions li { line-height: 18px; }
|
450 |
-
|
451 |
-
/* window */
|
452 |
-
.firecheckout-window {
|
453 |
-
border: none;
|
454 |
-
background: #fff;
|
455 |
-
border-radius: 4px;
|
456 |
-
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
|
457 |
-
z-index: 9999;
|
458 |
-
position: absolute;
|
459 |
-
text-align: left;
|
460 |
-
padding: 15px;
|
461 |
-
box-sizing: border-box;
|
462 |
-
-moz-box-sizing: border-box;
|
463 |
-
}
|
464 |
-
.firecheckout-window .page-title { margin: 0 0 8px; text-align: left; font-size: 20px; line-height: normal; }
|
465 |
-
.firecheckout-window .page-title span { color: #0A263C; font-size: 20px; margin: 0; }
|
466 |
-
.firecheckout-window .content { padding: 0; margin: 0; overflow: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
|
467 |
-
.firecheckout-window label { width: auto; text-align: left; }
|
468 |
-
.firecheckout-window .form-list .input-box { clear: both; }
|
469 |
-
.firecheckout-window .form-list input.input-text,
|
470 |
-
.firecheckout-window .form-list textarea { width: 260px; }
|
471 |
-
#firecheckout-forgot-window .form-list input.input-text,
|
472 |
-
#firecheckout-login-window .form-list input.input-text {
|
473 |
-
width: 100%;
|
474 |
-
box-sizing: border-box;
|
475 |
-
}
|
476 |
-
.firecheckout-window .close {
|
477 |
-
position: absolute;
|
478 |
-
top: 3px;
|
479 |
-
right: 3px;
|
480 |
-
width: 16px;
|
481 |
-
height: 16px;
|
482 |
-
opacity: 1;
|
483 |
-
color: #6f6f6f;
|
484 |
-
text-decoration: none;
|
485 |
-
font-weight: bold;
|
486 |
-
font-size: 15px;
|
487 |
-
}
|
488 |
-
.firecheckout-window .close:hover { color: #000; text-decoration: none; }
|
489 |
-
.firecheckout-set .please-wait,
|
490 |
-
.firecheckout-window .please-wait { position: static; padding: 0; background: none; border: none; margin: 0; left: auto; top: auto; }
|
491 |
-
.firecheckout-window .buttons-set { margin: 1em 0 0; text-align: right; border-top:1px solid #e4e4e4; padding: 8px 0 5px; }
|
492 |
-
.firecheckout-window .actionbar { padding: 10px 10px 0; text-align: right; font-weight: bold; }
|
493 |
-
|
494 |
-
#emailexists-window .content a { text-decoration: underline; }
|
495 |
-
#emailexists-window .content a:hover { text-decoration: none; }
|
496 |
-
|
497 |
-
/* IE6 fix */
|
498 |
-
* html .firecheckout-hidden { visibility: hidden; }
|
499 |
-
* html .firecheckout-window { width: 800px; }
|
500 |
-
* html .d-sh-tl, * html .d-sh-tr { padding-right:42px; }
|
501 |
-
/* IE7 fix */
|
502 |
-
*:first-child+html .firecheckout-window { width: 800px; }
|
503 |
-
|
504 |
-
/* modules integration */
|
505 |
-
.firecheckout-window .centinel { overflow: auto; }
|
506 |
-
.firecheckout-window .centinel .authentication { width: 450px; }
|
507 |
-
.firecheckout-window .centinel .authentication iframe { width: 100%; min-height: 400px; }
|
508 |
-
#checkout-sagepay-iframe-load { }
|
509 |
-
#firecheckout-mask { background: #000; opacity: 0.4; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40);
|
510 |
-
position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 9901; }
|
511 |
-
* html #firecheckout-mask { position: absolute; }
|
512 |
-
|
513 |
-
/* Klarna */
|
514 |
-
.klarna_box { min-width: 0 !important; border: none !important; }
|
515 |
-
.klarna_box_top { height: auto !important; }
|
516 |
-
.klarna_box_bottom_left { float: none !important; width: 100% !important; }
|
517 |
-
.klarna_box_bottom_right { float: none !important; width: 100% !important; }
|
518 |
-
.klarna_box_bottom input[type="radio"], .klarna_box_bottom input[type="checkbox"] { float: none !important; }
|
519 |
-
/* Klarna */
|
520 |
-
|
521 |
-
/* SagePay Server Integration */
|
522 |
-
#checkout-sagepay-iframe-load { }
|
523 |
-
iframe#sage-pay-server-iframe { border:none; height:365px; width:687px; }
|
524 |
-
*:first-child+html iframe#sage-pay-server-iframe { width: 485px; }
|
525 |
-
/* End of SagePay Server Integration */
|
526 |
-
|
527 |
-
/* Relaypoint Integration */
|
528 |
-
.firecheckout-set #relaypoint { padding: 0; }
|
529 |
-
.firecheckout-set #relaypoint #suggestion { padding-left: 10px; }
|
530 |
-
.firecheckout-set #relaypoint #suggestion label { width: 245px; }
|
531 |
-
.firecheckout-set #relaypoint #suggestion label .s1 { width: auto; padding: 0; }
|
532 |
-
.firecheckout-set #relaypoint #address { width: 240px; }
|
533 |
-
.firecheckout-set #relaypoint #zipcode { width: 50px; }
|
534 |
-
.firecheckout-set #relaypoint #city { width: 130px; }
|
535 |
-
/* Relaypoint Integration */
|
536 |
-
|
537 |
-
/* Craftyclicks postcode lookup */
|
538 |
-
#billing_cp_result_display,
|
539 |
-
#shipping_cp_result_display { width: 260px !important; }
|
540 |
-
#billing_cp_result_display select,
|
541 |
-
#shipping_cp_result_display select { width: 265px !important; }
|
542 |
-
/* Craftyclicks postcode lookup */
|
543 |
-
|
544 |
-
/* AW_Newsletter */
|
545 |
-
.firecheckout-set div.awan-checkoutcheckboxes { padding: 0; margin: 0; border: none; }
|
546 |
-
.firecheckout-set div.awan-checkoutcheckboxes label { float: none; }
|
547 |
-
.firecheckout-set div.awan-checkoutcheckboxes label.an-data { float: none; font-weight: normal; color: #000; margin: 0 0 3px; position: static; display: block; }
|
548 |
-
.firecheckout-set div.awan-checkoutcheckboxes ul.an-checkboxes { padding: 0 0 0 12px; }
|
549 |
-
/* AW_Newsletter */
|
550 |
-
|
551 |
-
/* givechange */
|
552 |
-
#givechange { margin: 0 !important; border: none !important; border-bottom: 1px solid #ccc !important; }
|
553 |
-
#givechange-how { margin: 0 20px !important; }
|
554 |
-
/* givechange */
|
555 |
-
|
556 |
-
/* infostrates tnt */
|
557 |
-
.firecheckout-set .tnt_description { width: auto; }
|
558 |
-
/* infostrates tnt */
|
559 |
-
|
560 |
-
/* PostcodeNL */
|
561 |
-
.form-list input.pcnl-input-text-half,
|
562 |
-
.form-list select.pcnl-input-text-half { width: 45% !important; }
|
563 |
-
/* PostcodeNL */
|
564 |
-
|
565 |
-
/* TIG_PostNL */
|
566 |
-
#opc_postnl_ce .input-text { width: 100% !important; }
|
567 |
-
#opc_postnl_ce .field-postcode .input-box { width: 98% !important; }
|
568 |
-
#opc_postnl_ce .field { width: 50% !important; }
|
569 |
-
#opc_postnl_ce .field-postcode { width: 50% !important; }
|
570 |
-
#opc_postnl_ce .postnl.validation-advice { width: auto !important; }
|
571 |
-
/* TIG_PostNL */
|
572 |
-
|
573 |
-
/* Ebizmarts_MageMonkey */
|
574 |
-
.form-list .page-title h1 { font-size: 1em; }
|
575 |
-
/* Ebizmarts_MageMonkey */
|
576 |
-
|
577 |
-
/* IWD opc_signature */
|
578 |
-
.firecheckout-index-index .signature_wrapper { width: 50%; float: right; }
|
579 |
-
.firecheckout-index-index .signature_wrapper .signature { padding-right: 10px; }
|
580 |
-
/* IWD opc_signature */
|
581 |
-
|
582 |
-
/* MW_Storecreditpro */
|
583 |
-
#mw_storecredit_value { width: auto !important; }
|
584 |
-
#mw-checkout-payment-storecredit { margin-bottom: 10px; }
|
585 |
-
/* MW_Storecreditpro */
|
586 |
-
|
587 |
-
/* Billsafe */
|
588 |
-
#payment_form_billsafe .fields .field { width: 100%; } /* fixed styles for invalid billsafe markup */
|
589 |
-
/* Billsafe */
|
590 |
-
|
591 |
-
/* AW_Storecredit */
|
592 |
-
.checkout-onepage-payment-storecredit { padding: 0 8px 5px; }
|
593 |
-
/* AW_Storecredit */
|
594 |
-
|
595 |
-
/* Phoenix_Wirecard Seamless */
|
596 |
-
#window-overlay-qmore { display: none; }
|
597 |
-
/* Phoenix_Wirecard Seamless */
|
598 |
-
|
599 |
-
/* Emjainteractive_ShippingOption */
|
600 |
-
.umosaco-table td { border: none; vertical-align: middle; }
|
601 |
-
.umosaco-table td.label { display: table-cell; }
|
602 |
-
.umosaco-table label { margin: 0; }
|
603 |
-
/* Emjainteractive_ShippingOption */
|
604 |
-
|
605 |
-
#firecheckout-form div,
|
606 |
-
.firecheckout-window *,
|
607 |
-
#firecheckout-spinner {
|
608 |
-
-webkit-box-sizing: content-box;
|
609 |
-
-moz-box-sizing: content-box;
|
610 |
-
-ms-box-sizing: content-box;
|
611 |
-
-o-box-sizing: content-box;
|
612 |
-
box-sizing: content-box;
|
613 |
-
}
|
614 |
-
#firecheckout-form .col2-set,
|
615 |
-
#firecheckout-form .col3-set,
|
616 |
-
#firecheckout-form .col4-set {
|
617 |
-
max-width: 100%;
|
618 |
-
max-height: 100%;
|
619 |
-
box-sizing: border-box;
|
620 |
-
}
|
621 |
-
.firecheckout-window label,
|
622 |
-
#firecheckout-spinner { color: #666; }
|
623 |
-
.firecheckout-window { color: #2f2f2f; }
|
624 |
-
.firecheckout-window .validation-advice { color: #eb340a; }
|
625 |
-
/* clear background and
|
626 |
-
.firecheckout-window a { color: #1e7ec8; }
|
627 |
-
.firecheckout-section { background: none; border: none; border-radius: 0; }
|
628 |
-
.firecheckout-section .block-title { background: #ddd; border: none; border-radius: 0; }
|
629 |
-
.firecheckout-set input.input-text, .firecheckout-set select, .firecheckout-set textarea { border: none; border-radius: 0; }
|
630 |
-
.firecheckout-section .block-title .num { border-radius: 0; background: #fff; border: none; }
|
631 |
-
.firecheckout-set #shipping-method-reset, .firecheckout-set #payment-method-reset { border: none; background: #fff; border-radius: 0; }
|
632 |
-
*/
|
633 |
-
|
634 |
-
/* RWD theme */
|
635 |
-
.f-left { float: left; }
|
636 |
-
.f-right { float: right; }
|
637 |
-
.firecheckout-set .col2-set .col-1,
|
638 |
-
.firecheckout-set .col2-set .col-2 { padding: 0; width: 49%; }
|
639 |
-
.firecheckout-set .product-options ul.options-list label,
|
640 |
-
.firecheckout-set .col2-set .form-list .control label {
|
641 |
-
width: auto !important;
|
642 |
-
}
|
643 |
-
.firecheckout-set .form-list .control label, .sp-methods dt label,
|
644 |
-
.firecheckout-set #checkout-shipping-method-load .sp-methods dd label,
|
645 |
-
.firecheckout-set #co-shipping-method-form .sp-methods dd label,
|
646 |
-
.firecheckout-set .product-options ul.options-list label {
|
647 |
-
width: auto !important;
|
648 |
-
min-width: 0px !important;
|
649 |
-
background-color: transparent !important;
|
650 |
-
}
|
651 |
-
.firecheckout-set #checkout-review-table thead > tr > th,
|
652 |
-
.firecheckout-set #checkout-review-table thead > tr > th:first-child {
|
653 |
-
display: table-cell;
|
654 |
-
}
|
655 |
-
/* RWD theme */
|
656 |
-
|
657 |
-
/* ultimo theme integration */
|
658 |
-
/*
|
659 |
-
@media (min-width:960px) and (max-width:1200px) {
|
660 |
-
.firecheckout-set #checkout-review .product-image { display: none; }
|
661 |
-
.firecheckout-set #checkout-review .product-name,
|
662 |
-
.firecheckout-set #checkout-review .short-description,
|
663 |
-
.firecheckout-set #checkout-review .item-options { margin: 0 !important; }
|
664 |
-
.data-table th,
|
665 |
-
.data-table td { padding: 12px 6px; }
|
666 |
-
}
|
667 |
-
@media (max-width: 959px) {
|
668 |
-
.data-table table { display: table; }
|
669 |
-
.data-table thead { display: table-header-group; }
|
670 |
-
.data-table tbody { display: table-row-group; }
|
671 |
-
.data-table tr { display: table-row; }
|
672 |
-
table.data-table th, table.data-table td { display: table-cell; }
|
673 |
-
}
|
674 |
-
@media (max-width: 767px) {
|
675 |
-
.data-table th,
|
676 |
-
.data-table td { padding: 12px 6px; }
|
677 |
-
}
|
678 |
-
*/
|
679 |
-
|
680 |
-
/* RTL fixes */
|
681 |
-
[dir='rtl'] .firecheckout-set #checkout-review #checkout-review-table tr td:first-child,
|
682 |
-
[dir='rtl'] .firecheckout-set #checkout-review #checkout-review-table tr th:first-child {
|
683 |
-
border-right-width: 0;
|
684 |
-
border-left-width: 1px;
|
685 |
-
}
|
686 |
-
[dir='rtl'] .firecheckout-set #checkout-review #checkout-review-table td.last,
|
687 |
-
[dir='rtl'] .firecheckout-set #checkout-review #checkout-review-table th.last,
|
688 |
-
[dir='rtl'] .firecheckout-set #checkout-review #checkout-review-table tr td:last-child,
|
689 |
-
[dir='rtl'] .firecheckout-set #checkout-review #checkout-review-table tr th:last-child {
|
690 |
-
border-right-width: 1px;
|
691 |
-
border-left-width: 0;
|
692 |
-
}
|
693 |
-
[dir='rtl'] .firecheckout-index-index .checkout-title h1 { float: right; }
|
694 |
-
[dir='rtl'] .firecheckout-section .block-title .num { margin: 0 0 0 5px; }
|
695 |
-
[dir='rtl'] .firecheckout-login-wrapper { float: right; }
|
696 |
-
[dir='rtl'] #firecheckout-form .col2-fire-set .col-fire-1 { float: right; }
|
697 |
-
[dir='rtl'] #firecheckout-form .col2-fire-set .col-fire-2 { float: left; }
|
698 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set .col-fire-1,
|
699 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set .col-fire-2 { float: right; }
|
700 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set .col-fire-2 { margin-left: 0; margin-right: 1%; }
|
701 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set .col-fire-3 { float: left; }
|
702 |
-
[dir='rtl'] .fields .field { float: right; }
|
703 |
-
[dir='rtl'] .col2-set .col-1 { float: right; }
|
704 |
-
[dir='rtl'] .col2-set .col-2 { float: left; }
|
705 |
-
[dir='rtl'] .firecheckout-set #shipping-method-reset { right: auto; left: 5px; }
|
706 |
-
[dir='rtl'] .firecheckout-set #payment-method-reset { right: auto; left: 5px; }
|
707 |
-
[dir='rtl'] #shipping_form_delivery_date .delivery-date .input-text { margin-right: 0; margin-left: -23px; }
|
708 |
-
[dir='rtl'] #shipping_form_delivery_date .delivery-date #delivery_date_button { position: relative; }
|
709 |
-
[dir='rtl'] .discount-form .input-field-wrapper { float: right; }
|
710 |
-
[dir='rtl'] .giftcard-form .input-field-wrapper { float: right; }
|
711 |
-
[dir='rtl'] #coupon-cancel,
|
712 |
-
[dir='rtl'] #coupon-apply,
|
713 |
-
[dir='rtl'] #giftcard-add { margin: 0 5px 0 0; }
|
714 |
-
[dir='rtl'] .firecheckout-set #review-buttons-container { text-align: left; }
|
715 |
-
[dir='rtl'] .firecheckout-set #checkout-review .collateral { padding: 0 5px 0 0; }
|
716 |
-
|
717 |
-
/* mobile theme styles */
|
718 |
-
.fields .field { float: left; margin: 0; }
|
719 |
-
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
720 |
-
.firecheckout-section { background-size: 100px 125px; background-position: 0 -51px; }
|
721 |
-
.firecheckout-section .block-title { background-size: 100px 125px; background-position: 0 -28px; }
|
722 |
-
.firecheckout-window .close { font-size: 19px; }
|
723 |
-
#firecheckout-spinner {
|
724 |
-
background-image: url(../images/ajax-loader@2x.gif);
|
725 |
-
background-size: 30px 30px;
|
726 |
-
background-position: 50% 20px;
|
727 |
-
}
|
728 |
-
}
|
729 |
-
@media (max-width: 800px) {
|
730 |
-
#firecheckout-form .col3-fire-set .col-fire-1,
|
731 |
-
#firecheckout-form .col3-fire-set .col-fire-2,
|
732 |
-
#firecheckout-form .col3-fire-set .col-fire-3,
|
733 |
-
#firecheckout-form .col2-fire-set .col-fire-1,
|
734 |
-
#firecheckout-form .col2-fire-set .col-fire-2,
|
735 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set .col-fire-1,
|
736 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set .col-fire-2,
|
737 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set .col-fire-3,
|
738 |
-
[dir='rtl'] #firecheckout-form .col2-fire-set .col-fire-1,
|
739 |
-
[dir='rtl'] #firecheckout-form .col2-fire-set .col-fire-2 { width: auto; float: none; margin: 0 0 20px; }
|
740 |
-
|
741 |
-
#firecheckout-form .col3-fire-set #shipping-method { float: left; width: 49%; }
|
742 |
-
#firecheckout-form .col3-fire-set #payment-method { float: right; width: 49%; }
|
743 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set #shipping-method { float: right; width: 49%; }
|
744 |
-
[dir='rtl'] #firecheckout-form .col3-fire-set #payment-method { float: left; width: 49%; }
|
745 |
-
#firecheckout-form .col3-fire-set #checkout-coupon-discount-load,
|
746 |
-
#firecheckout-form .col3-fire-set #checkout-giftcard-load { clear: both; width: 100%; }
|
747 |
-
|
748 |
-
.firecheckout-set .wide .input-box { max-width: 100% !important; }
|
749 |
-
.firecheckout-set .form-list li.wide textarea,
|
750 |
-
.firecheckout-set .form-list li.wide select,
|
751 |
-
.firecheckout-set .form-list li.wide input.input-text { max-width: 100%; width: 100%; }
|
752 |
-
|
753 |
-
.firecheckout-set .product-name { font-size:.9em; }
|
754 |
-
.firecheckout-set .data-table tfoot,
|
755 |
-
.firecheckout-set .data-table strong { font-size: 1em; }
|
756 |
-
.firecheckout-set .qty-wrapper .qty-spinner { display: none; }
|
757 |
-
.firecheckout-set .qty-wrapper { width: auto; }
|
758 |
-
.firecheckout-section .block-title { white-space: nowrap; overflow: hidden; }
|
759 |
-
}
|
760 |
-
@media (max-width: 480px) {
|
761 |
-
.firecheckout-set .col2-set .col-1,
|
762 |
-
.firecheckout-set .col2-set .col-2,
|
763 |
-
.firecheckout-set #shipping-method,
|
764 |
-
.firecheckout-set #payment-method,
|
765 |
-
.firecheckout-set #checkout-coupon-discount-load,
|
766 |
-
.firecheckout-set #checkout-giftcard-load { float: none; width: 100% !important; }
|
767 |
-
.firecheckout-set #checkout-review .product-image { display: none; }
|
768 |
-
.firecheckout-set #checkout-review .collateral { margin: 0 !important; }
|
769 |
-
}
|
770 |
-
/* Mobile styles */
|
771 |
-
|
772 |
-
/* Clears */
|
773 |
-
.firecheckout-header,
|
774 |
-
.firecheckout-set .col2-set,
|
775 |
-
.firecheckout-set .col3-set,
|
776 |
-
.step-content,
|
777 |
-
.firecheckout-set .form-list li,
|
778 |
-
.firecheckout-set .form-list .field,
|
779 |
-
.firecheckout-index-index #checkout-shipping-method-load,
|
780 |
-
.firecheckout-index-index #checkout-payment-method-load,
|
781 |
-
.firecheckout-index-index .block-content { zoom: 1; }
|
782 |
-
|
783 |
-
.firecheckout-header:after,
|
784 |
-
.firecheckout-set .col2-set:after,
|
785 |
-
.firecheckout-set .col3-set:after,
|
786 |
-
.step-content:after,
|
787 |
-
.firecheckout-set .form-list li:after,
|
788 |
-
.firecheckout-set .form-list .field:after,
|
789 |
-
.firecheckout-index-index #checkout-shipping-method-load:after,
|
790 |
-
.firecheckout-index-index #checkout-payment-method-load:after,
|
791 |
-
.firecheckout-index-index .block-content:after { content: '.'; display: block; visibility: hidden; height: 0; font-size: 0; clear: both; }
|
792 |
-
|
793 |
-
#firecheckout-form .clearer:after { display:block; content:"."; clear:both; font-size:0; line-height:0; height:0; overflow:hidden; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/css/onecolumn.css
DELETED
@@ -1,313 +0,0 @@
|
|
1 |
-
.checkout-title .continue-shopping { display: none; }
|
2 |
-
.page-empty .checkout-title { padding-left: 7px; padding-right: 7px; }
|
3 |
-
.page-empty .checkout-title .continue-shopping { float: right; font-size: 12px; display: block; margin: 7px 0 0; }
|
4 |
-
|
5 |
-
.firecheckout-index-index { height: auto; /* Fix to make document.body.getHeight() works properly */ }
|
6 |
-
.firecheckout-index-index .col-main { border: none; }
|
7 |
-
.firecheckout-index-index .checkout-title h1 { float: none; }
|
8 |
-
|
9 |
-
#firecheckout-form div,
|
10 |
-
#firecheckout-spinner { box-sizing: border-box; }
|
11 |
-
#firecheckout-spinner { height: 90px; display: none; }
|
12 |
-
.firecheckout-set .field-spinner-wrapper { display: block; }
|
13 |
-
|
14 |
-
.firecheckout-set .input-box { padding-top: 2px; }
|
15 |
-
.firecheckout-set input.input-text,
|
16 |
-
.firecheckout-set select,
|
17 |
-
.firecheckout-set textarea {
|
18 |
-
font-size: 14px;
|
19 |
-
line-height: 1.5;
|
20 |
-
padding: 10px;
|
21 |
-
background: #fefefe;
|
22 |
-
color: #777;
|
23 |
-
border-color: #ddd;
|
24 |
-
border-width: 2px;
|
25 |
-
border-radius: 3px;
|
26 |
-
}
|
27 |
-
.firecheckout-set select {
|
28 |
-
padding-top: 10px !important;
|
29 |
-
padding-bottom: 10px !important;
|
30 |
-
}
|
31 |
-
.firecheckout-set input.input-text:focus,
|
32 |
-
.firecheckout-set select:focus,
|
33 |
-
.firecheckout-set textarea:focus {
|
34 |
-
background: #fefefe;
|
35 |
-
border-color: #d7d7d7;
|
36 |
-
border-width: 2px;
|
37 |
-
}
|
38 |
-
.firecheckout-set input.input-text.validation-failed,
|
39 |
-
.firecheckout-set select.validation-failed,
|
40 |
-
.firecheckout-set textarea.validation-failed {
|
41 |
-
border-style: dashed !important;
|
42 |
-
border-width: 2px !important;
|
43 |
-
border-color: #ddd !important;
|
44 |
-
background: #fff4f4 !important;
|
45 |
-
}
|
46 |
-
|
47 |
-
.firecheckout-set .form-list .wide .input-box { max-width: 50%; }
|
48 |
-
.firecheckout-set .wide .input-text,
|
49 |
-
.firecheckout-set .form-list .wide textarea,
|
50 |
-
.firecheckout-set .form-list .wide li.wide textarea,
|
51 |
-
.firecheckout-set .form-list .wide select,
|
52 |
-
.firecheckout-set .form-list li.wide select,
|
53 |
-
.firecheckout-set .form-list .wide input.input-text,
|
54 |
-
.firecheckout-set .form-list li.wide input.input-text { width: 98%; }
|
55 |
-
|
56 |
-
.firecheckout-set .form-list select { margin: 0; }
|
57 |
-
|
58 |
-
/* Buttons */
|
59 |
-
.firecheckout-set .step-buttons-set {
|
60 |
-
border: none;
|
61 |
-
text-align: right;
|
62 |
-
margin: 1em 0 0;
|
63 |
-
padding: 0;
|
64 |
-
}
|
65 |
-
.firecheckout-index-index .step-buttons-set button.button {
|
66 |
-
float: none;
|
67 |
-
height: auto;
|
68 |
-
background-image: none;
|
69 |
-
background-color: #40c781;
|
70 |
-
text-align: center;
|
71 |
-
font: bold 15px/34px Arial,Helvetica,sans-serif;
|
72 |
-
color: #fff;
|
73 |
-
border-radius: 3px;
|
74 |
-
text-decoration: none;
|
75 |
-
border: 0px solid rgba(0,0,0,0.15);
|
76 |
-
border-bottom-width: 2px;
|
77 |
-
padding: 0 15px;
|
78 |
-
position: relative;
|
79 |
-
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s;
|
80 |
-
}
|
81 |
-
.firecheckout-index-index .step-buttons-set button.button:hover { background-color:#34a46c; }
|
82 |
-
.firecheckout-index-index .step-buttons-set button.loading,
|
83 |
-
.firecheckout-index-index .step-buttons-set button.loading:hover { background-color: #40c781; opacity: 0.8; cursor: wait; animation: none; }
|
84 |
-
.firecheckout-index-index .step-buttons-set button.edit { background-color: #aaa; }
|
85 |
-
.firecheckout-index-index .step-buttons-set button.edit:hover { background-color: #888; }
|
86 |
-
.firecheckout-index-index .step-buttons-set button.disabled,
|
87 |
-
.firecheckout-index-index .step-buttons-set button.disabled:hover {
|
88 |
-
background-color: #ccc;
|
89 |
-
opacity: 0.6;
|
90 |
-
cursor: not-allowed;
|
91 |
-
}
|
92 |
-
|
93 |
-
/* Buttons loading state */
|
94 |
-
.firecheckout-set .step-buttons-set button .field-spinner-wrapper { top: 50%; right: 10px; }
|
95 |
-
.firecheckout-set .step-buttons-set button .loader:before,
|
96 |
-
.firecheckout-set .step-buttons-set button .loader:after,
|
97 |
-
.firecheckout-set .step-buttons-set button .loader { animation-name: loader-white; }
|
98 |
-
.firecheckout-set .step-buttons-set button.loading { padding-right: 55px; }
|
99 |
-
@keyframes loader-white {
|
100 |
-
0%, 80%, 100% { box-shadow: 0 2.5em 0 -1.3em #fff; }
|
101 |
-
40% { box-shadow: 0 2.5em 0 0 #fff; }
|
102 |
-
}
|
103 |
-
|
104 |
-
/* Reset inherited styles */
|
105 |
-
.checkout-title { border: none; }
|
106 |
-
.firecheckout-section { background: none; border: none; padding: 0; margin: 0; }
|
107 |
-
.firecheckout-section + .firecheckout-section { margin-top: 20px; }
|
108 |
-
.firecheckout-section .block-title {
|
109 |
-
background: none;
|
110 |
-
border: none;
|
111 |
-
height: auto;
|
112 |
-
line-height: normal;
|
113 |
-
overflow: visible;
|
114 |
-
padding: 0;
|
115 |
-
margin: 0 0 20px;
|
116 |
-
text-transform: none;
|
117 |
-
font-weight: normal;
|
118 |
-
font-size: 22px;
|
119 |
-
}
|
120 |
-
.firecheckout-section .block-title .num { display: none; }
|
121 |
-
.firecheckout-section .block-content { padding: 0; }
|
122 |
-
|
123 |
-
/* Layout */
|
124 |
-
.onecolumn { float: left; width: 64%; position: relative; }
|
125 |
-
.onecolumn-aside { float: right; width: 35%; }
|
126 |
-
|
127 |
-
/* Sidebar */
|
128 |
-
#order-total-clone { border: none; }
|
129 |
-
#order-total-clone .a-right { text-align: left !important; }
|
130 |
-
#order-total-clone td,
|
131 |
-
#order-total-clone th { padding: 5px; white-space: normal; }
|
132 |
-
#order-total-clone .summary-details { display: none; }
|
133 |
-
#order-total-clone tr.summary-total { cursor: default; }
|
134 |
-
#order-total-clone tr.summary-total .summary-collapse,
|
135 |
-
#order-total-clone tr.summary-total span { cursor: text; }
|
136 |
-
#order-total-clone tr.summary-total .summary-collapse { background: none; padding: 0; float: none; text-align: left; }
|
137 |
-
#order-total-clone tfoot tr { background: none !important; }
|
138 |
-
#order-total-clone tfoot tr.first td { background: none; }
|
139 |
-
|
140 |
-
/* Checkout Steps */
|
141 |
-
.firecheckout-set .step {
|
142 |
-
border-radius: 4px;
|
143 |
-
border: 1px solid #eee;
|
144 |
-
padding: 30px 40px 20px;
|
145 |
-
margin: 0 0 30px;
|
146 |
-
}
|
147 |
-
.onecolumn .step { display: none; background: #fff; width: 100%; }
|
148 |
-
.onecolumn .step-content { position: relative; }
|
149 |
-
.onecolumn .step-mask {
|
150 |
-
background: rgba(255,255,255,0.6);
|
151 |
-
z-index: 5;
|
152 |
-
position: absolute;
|
153 |
-
top: 0;
|
154 |
-
bottom: 0;
|
155 |
-
left: 0;
|
156 |
-
right: 0;
|
157 |
-
display: none;
|
158 |
-
}
|
159 |
-
.onecolumn .current,
|
160 |
-
.onecolumn .activated,
|
161 |
-
.onecolumn .completed { display: block; }
|
162 |
-
.onecolumn .current { background: #fcfcfc; }
|
163 |
-
.onecolumn .step .edit { display: none; }
|
164 |
-
.onecolumn .step.completed .step-mask { display: block; }
|
165 |
-
.onecolumn .step.completed .next { display: none; }
|
166 |
-
.onecolumn .step.completed .edit { display: inline; }
|
167 |
-
|
168 |
-
.expanded .step { display: block; }
|
169 |
-
.expanded .current { background: #fff; }
|
170 |
-
.expanded .step .next,
|
171 |
-
.expanded .step.completed .edit { display: none; }
|
172 |
-
.expanded .step-mask { display: none; }
|
173 |
-
|
174 |
-
/* Step name */
|
175 |
-
.mode-login .field-confirm-password { display: none; }
|
176 |
-
.step-name .btn-login,
|
177 |
-
.mode-login .next { display: none !important; }
|
178 |
-
.step-name.mode-login .btn-login { display: inline !important; }
|
179 |
-
.step-name .link-forgot-password { display: none; }
|
180 |
-
.step-name.mode-login .link-forgot-password { display: block; }
|
181 |
-
.field-password .link-forgot-password {
|
182 |
-
position: absolute;
|
183 |
-
right: 3px;
|
184 |
-
top: 10px;
|
185 |
-
border-left: 1px solid #ddd;
|
186 |
-
padding: 5px 7px;
|
187 |
-
font-size: 12px;
|
188 |
-
}
|
189 |
-
.hidden-registration { display: none; }
|
190 |
-
.mode-login .hidden-registration { display: block; }
|
191 |
-
|
192 |
-
/* Address */
|
193 |
-
.address-select-item .input-box,
|
194 |
-
.address-select-item .input-box select { max-width: 100% !important; width: 100% !important; }
|
195 |
-
.firecheckout-set li.newsletter { margin: 0; }
|
196 |
-
|
197 |
-
/* Coupons */
|
198 |
-
.discount-block .form {
|
199 |
-
margin: 0;
|
200 |
-
height: 0;
|
201 |
-
overflow: hidden;
|
202 |
-
opacity: 0;
|
203 |
-
transition: all 0.2s ease-in-out;
|
204 |
-
}
|
205 |
-
.discount-block .form.shown { height: auto; opacity: 1; }
|
206 |
-
.discount-block .block-title { margin: 0 0 7px; font-size: 18px; }
|
207 |
-
#coupon-discount label { display: none; }
|
208 |
-
.firecheckout-set .discount-form,
|
209 |
-
.firecheckout-set .giftcard-form,
|
210 |
-
#rewardponts .block-content { padding: 0; }
|
211 |
-
#coupon-code,
|
212 |
-
#giftcard_code,
|
213 |
-
#rewardponts .input-text { margin: 0; width: 150px; }
|
214 |
-
#coupon-code .validation-advice,
|
215 |
-
#giftcard_code .validation-advice,
|
216 |
-
#rewardponts .validation-advice { width: 150px; }
|
217 |
-
|
218 |
-
/* Shipping and Payments */
|
219 |
-
.firecheckout-set #shipping-method-reset,
|
220 |
-
.firecheckout-set #payment-method-reset {
|
221 |
-
font-size: 11px;
|
222 |
-
top: 7px;
|
223 |
-
right: 10px;
|
224 |
-
}
|
225 |
-
|
226 |
-
.firecheckout-set #checkout-payment-method-load { padding: 0; }
|
227 |
-
|
228 |
-
.firecheckout-set .step-shipping-payment-method input.input-text,
|
229 |
-
.firecheckout-set .step-shipping-payment-method select,
|
230 |
-
.firecheckout-set .step-shipping-payment-method textarea { padding: 3px !important; }
|
231 |
-
.firecheckout-set .step-shipping-payment-method .sp-methods .form-list { padding: 0 10px; margin: 10px 0 15px; }
|
232 |
-
|
233 |
-
.firecheckout-set .gift-messages { margin: 15px 0; }
|
234 |
-
.firecheckout-set .gift-messages-form { padding: 0; }
|
235 |
-
.firecheckout-set .gift-messages-form h4 { margin-bottom: 5px; }
|
236 |
-
.firecheckout-set .gift-messages-form .wide .input-box { max-width: 100%; }
|
237 |
-
|
238 |
-
/* Additional fields */
|
239 |
-
.firecheckout-set .form-comment .wide .input-box { max-width: 100%; }
|
240 |
-
.firecheckout-set .form-comment .wide .input-box textarea { max-width: 100%; }
|
241 |
-
|
242 |
-
/* Review */
|
243 |
-
.firecheckout-set #checkout-review #checkout-additional {
|
244 |
-
padding: 20px 25px;
|
245 |
-
margin: 20px 0;
|
246 |
-
background: none;
|
247 |
-
border: none;
|
248 |
-
border-radius: 3px;
|
249 |
-
}
|
250 |
-
.expanded #checkout-review #checkout-additional { background: none; }
|
251 |
-
.firecheckout-set .checkout-agreements { border: none; }
|
252 |
-
#addresses-review { border: none; }
|
253 |
-
.firecheckout-set #checkout-review .block-title { margin: 0 0 10px !important; }
|
254 |
-
.firecheckout-set #checkout-review .product-image { margin: 0; }
|
255 |
-
#checkout-review-load { margin: 7px 0 0; }
|
256 |
-
.qty-wrapper .qty-less,
|
257 |
-
.qty-wrapper .qty-more { background: transparent; border: none; }
|
258 |
-
|
259 |
-
.firecheckout-section .data-table thead,
|
260 |
-
.firecheckout-section .data-table th,
|
261 |
-
.firecheckout-section .data-table td,
|
262 |
-
.firecheckout-section .data-table tfoot tr,
|
263 |
-
.firecheckout-section .data-table tr.odd,
|
264 |
-
.firecheckout-section .data-table tr.even {
|
265 |
-
background: none;
|
266 |
-
border-left: none;
|
267 |
-
border-right: none;
|
268 |
-
}
|
269 |
-
.firecheckout-section .data-table tfoot td,
|
270 |
-
.firecheckout-section .data-table tfoot th { border: none; }
|
271 |
-
#checkout-review-table tfoot strong { font-size: 18px; }
|
272 |
-
|
273 |
-
[dir='rtl'] .onecolumn { float: right; }
|
274 |
-
[dir='rtl'] .onecolumn-aside { float: left; }
|
275 |
-
[dir='rtl'] .firecheckout-set .step-buttons-set { text-align: left; }
|
276 |
-
[dir='rtl'] .field-password .link-forgot-password { right: auto; left: 3px; }
|
277 |
-
[dir='rtl'] .firecheckout-set .loader { margin-left: 0; margin-right: -6em; }
|
278 |
-
[dir='rtl'] .firecheckout-set .step-buttons-set button.loading { padding-right: 15px; padding-left: 55px; }
|
279 |
-
[dir='rtl'] .firecheckout-set .step-buttons-set button .field-spinner-wrapper {
|
280 |
-
right: auto;
|
281 |
-
left: 10px;
|
282 |
-
}
|
283 |
-
|
284 |
-
@media (max-width: 1024px) {
|
285 |
-
.firecheckout-set .step { padding: 20px 30px; }
|
286 |
-
#checkout-coupon-discount-load,
|
287 |
-
#checkout-giftcard-load { float: none; width: auto; }
|
288 |
-
}
|
289 |
-
@media (max-width: 800px) {
|
290 |
-
.firecheckout-set .wide .input-text,
|
291 |
-
.firecheckout-set .form-list .wide textarea,
|
292 |
-
.firecheckout-set .form-list .wide li.wide textarea,
|
293 |
-
.firecheckout-set .form-list .wide select,
|
294 |
-
.firecheckout-set .form-list li.wide select,
|
295 |
-
.firecheckout-set .form-list .wide input.input-text,
|
296 |
-
.firecheckout-set .form-list li.wide input.input-text { width: 100%; }
|
297 |
-
|
298 |
-
input#coupon-code,
|
299 |
-
.discount-form .input-field-wrapper { width: 150px; }
|
300 |
-
|
301 |
-
.firecheckout-set .step { padding: 20px 30px; }
|
302 |
-
.onecolumn { float: none; width: auto; }
|
303 |
-
.onecolumn-aside { display: none; }
|
304 |
-
}
|
305 |
-
@media (max-width: 480px) {
|
306 |
-
.firecheckout-set .step { padding: 10px; }
|
307 |
-
.step-name.mode-login .field-password,
|
308 |
-
.field-email,
|
309 |
-
.field-email .input-box {
|
310 |
-
width: 100% !important;
|
311 |
-
float: none !important;
|
312 |
-
}
|
313 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/images/ajax-loader.gif
DELETED
Binary file
|
skin/frontend/base/default/tm/firecheckout/images/ajax-loader@2x.gif
DELETED
Binary file
|
skin/frontend/base/default/tm/firecheckout/images/sprite.png
DELETED
Binary file
|
skin/frontend/base/default/tm/firecheckout/js/components/address-verification.js
DELETED
@@ -1,186 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.AddressVerification = Class.create();
|
3 |
-
FC.AddressVerification.prototype = {
|
4 |
-
fields: [
|
5 |
-
'street1',
|
6 |
-
'street2',
|
7 |
-
'city',
|
8 |
-
'region_id',
|
9 |
-
'postcode'
|
10 |
-
],
|
11 |
-
|
12 |
-
initialize: function() {
|
13 |
-
this.container = $('address-verification-window');
|
14 |
-
if (this.container) {
|
15 |
-
this.addObservers();
|
16 |
-
this.initWindow();
|
17 |
-
this.initSkipLabels();
|
18 |
-
};
|
19 |
-
},
|
20 |
-
|
21 |
-
addObservers: function() {
|
22 |
-
this.container.down('.address-verification-skip').observe('click', this.skipVerification.bind(this));
|
23 |
-
this.container.down('.address-verification-edit').observe('click', this.editAddress.bind(this));
|
24 |
-
var self = this;
|
25 |
-
this.container.select('.address-verification-radio').each(function(el) {
|
26 |
-
el.observe('click', self.updateButtons.bind(self));
|
27 |
-
});
|
28 |
-
},
|
29 |
-
|
30 |
-
initWindow: function() {
|
31 |
-
this.verificationWindow = new FC.Window({
|
32 |
-
triggers: {},
|
33 |
-
destroy : 1,
|
34 |
-
size : {
|
35 |
-
maxWidth: 500
|
36 |
-
}
|
37 |
-
});
|
38 |
-
this.verificationWindow.update(this.container).show();
|
39 |
-
},
|
40 |
-
|
41 |
-
initSkipLabels: function() {
|
42 |
-
var labels = {
|
43 |
-
'billing' : '.address-verification-skip-billing',
|
44 |
-
'shipping': '.address-verification-skip-shipping'
|
45 |
-
};
|
46 |
-
|
47 |
-
for (var type in labels) {
|
48 |
-
var label = this.container.down(labels[type]);
|
49 |
-
if (!label) {
|
50 |
-
continue;
|
51 |
-
}
|
52 |
-
|
53 |
-
var address = [':'];
|
54 |
-
this.fields.each(function(id) {
|
55 |
-
var field = $(type + ':' + id);
|
56 |
-
if (!field) {
|
57 |
-
return;
|
58 |
-
}
|
59 |
-
|
60 |
-
var value = field.getValue();
|
61 |
-
if ('region_id' === id
|
62 |
-
&& countryRegions['US']
|
63 |
-
&& countryRegions['US'][value]) {
|
64 |
-
|
65 |
-
value = countryRegions['US'][value]['code'];
|
66 |
-
}
|
67 |
-
address.push(value);
|
68 |
-
});
|
69 |
-
|
70 |
-
label.insert({
|
71 |
-
bottom: address.join(' ')
|
72 |
-
});
|
73 |
-
};
|
74 |
-
},
|
75 |
-
|
76 |
-
getWindow: function() {
|
77 |
-
return this.verificationWindow;
|
78 |
-
},
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Radio button was clicked
|
82 |
-
*/
|
83 |
-
updateButtons: function() {
|
84 |
-
var buttons = this.container.down('.buttons-set');
|
85 |
-
buttons.select('.verification-option').invoke('hide');
|
86 |
-
|
87 |
-
var options = this.getSelectedOptions();
|
88 |
-
for (var i in options) {
|
89 |
-
if ('edit' === options[i]) {
|
90 |
-
buttons.select('.address-verification-edit').invoke('show');
|
91 |
-
return;
|
92 |
-
}
|
93 |
-
}
|
94 |
-
buttons.select('.address-verification-skip').invoke('show');
|
95 |
-
},
|
96 |
-
|
97 |
-
/**
|
98 |
-
* @return object
|
99 |
-
* billing : edit,
|
100 |
-
* shipping: skip
|
101 |
-
*/
|
102 |
-
getSelectedOptions: function() {
|
103 |
-
var options = {};
|
104 |
-
this.container.select('.address-verification-radio').each(function(el) {
|
105 |
-
if (el.checked) {
|
106 |
-
var type = el.readAttribute('name');
|
107 |
-
type = type.replace('address-verification[', '');
|
108 |
-
type = type.replace(']', '');
|
109 |
-
options[type] = el.getValue();
|
110 |
-
}
|
111 |
-
});
|
112 |
-
return options;
|
113 |
-
},
|
114 |
-
|
115 |
-
getVerifiedAddress: function() {
|
116 |
-
var address = {};
|
117 |
-
this.container.select('.address-verification-radio').each(function(el) {
|
118 |
-
if (el.checked) {
|
119 |
-
var type = el.readAttribute('name');
|
120 |
-
type = type.replace('address-verification[', '');
|
121 |
-
type = type.replace(']', '');
|
122 |
-
if (0 === el.id.indexOf('address-verification-verified-')) {
|
123 |
-
address[type] = {};
|
124 |
-
el.up('li').select('.input-verified').each(function(input) {
|
125 |
-
address[type][input.readAttribute('name')] = input.getValue();
|
126 |
-
});
|
127 |
-
}
|
128 |
-
}
|
129 |
-
});
|
130 |
-
return address;
|
131 |
-
},
|
132 |
-
|
133 |
-
/**
|
134 |
-
* "Place order using selected option" was clicked
|
135 |
-
*/
|
136 |
-
skipVerification: function() {
|
137 |
-
this.getWindow().hide();
|
138 |
-
|
139 |
-
var address = this.getVerifiedAddress();
|
140 |
-
for (var type in address) {
|
141 |
-
this.fillAddress(address[type]);
|
142 |
-
}
|
143 |
-
|
144 |
-
this.doSkipVerificationRequest();
|
145 |
-
},
|
146 |
-
|
147 |
-
doSkipVerificationRequest: function() {
|
148 |
-
checkout.save('?skip-address-verification=1', true);
|
149 |
-
},
|
150 |
-
|
151 |
-
fillAddress: function(data) {
|
152 |
-
for (var i in data) {
|
153 |
-
var value = data[i],
|
154 |
-
el = $(i);
|
155 |
-
|
156 |
-
if (!el || (!value && el.hasClassName('required-entry'))) {
|
157 |
-
continue;
|
158 |
-
}
|
159 |
-
el.setValue(value);
|
160 |
-
}
|
161 |
-
},
|
162 |
-
|
163 |
-
/**
|
164 |
-
* "Edit address" was clicked
|
165 |
-
*/
|
166 |
-
editAddress: function() {
|
167 |
-
this.getWindow().hide();
|
168 |
-
|
169 |
-
var options = this.getSelectedOptions();
|
170 |
-
for (var type in options) {
|
171 |
-
if ('edit' !== options[type]) {
|
172 |
-
continue;
|
173 |
-
}
|
174 |
-
var address = $(type + '-address');
|
175 |
-
address.scrollTo();
|
176 |
-
address.highlight();
|
177 |
-
}
|
178 |
-
},
|
179 |
-
|
180 |
-
autocorrectAddresses: function(address) {
|
181 |
-
for (var type in address) {
|
182 |
-
this.fillAddress(address[type]);
|
183 |
-
}
|
184 |
-
this.doSkipVerificationRequest();
|
185 |
-
}
|
186 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/ajax.js
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.Ajax = {
|
3 |
-
rules: {},
|
4 |
-
sectionsToReload: false,
|
5 |
-
|
6 |
-
getSectionsToUpdate: function() {
|
7 |
-
if (!this.sectionsToReload) {
|
8 |
-
this.sectionsToReload = {};
|
9 |
-
for (var sectionToReload in this.rules.reload) {
|
10 |
-
this.rules.reload[sectionToReload].each(function(section) {
|
11 |
-
if (!this.sectionsToReload[section]) {
|
12 |
-
this.sectionsToReload[section] = [];
|
13 |
-
}
|
14 |
-
this.sectionsToReload[section].push(sectionToReload);
|
15 |
-
}.bind(this));
|
16 |
-
}
|
17 |
-
}
|
18 |
-
|
19 |
-
var sections = [],
|
20 |
-
i = 0;
|
21 |
-
|
22 |
-
do {
|
23 |
-
if (this.sectionsToReload[arguments[i]]) {
|
24 |
-
sections = sections.concat(this.sectionsToReload[arguments[i]]);
|
25 |
-
}
|
26 |
-
i++;
|
27 |
-
} while (i < arguments.length);
|
28 |
-
|
29 |
-
return sections;
|
30 |
-
},
|
31 |
-
|
32 |
-
getSectionsToUpdateAsJson: function() {
|
33 |
-
return this.arrayToJson(this.getSectionsToUpdate.apply(this, arguments));
|
34 |
-
},
|
35 |
-
|
36 |
-
arrayToJson: function(array) {
|
37 |
-
var json = {};
|
38 |
-
array.each(function(section) {
|
39 |
-
json[section] = 1;
|
40 |
-
});
|
41 |
-
return json;
|
42 |
-
},
|
43 |
-
|
44 |
-
getSaveTriggers: function() {
|
45 |
-
var triggers = [],
|
46 |
-
i = 0;
|
47 |
-
|
48 |
-
do {
|
49 |
-
if (this.rules['save'][arguments[i]]) {
|
50 |
-
triggers = triggers.concat(this.rules['save'][arguments[i]]);
|
51 |
-
}
|
52 |
-
i++;
|
53 |
-
} while (i < arguments.length);
|
54 |
-
|
55 |
-
return triggers;
|
56 |
-
}
|
57 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/cart.js
DELETED
@@ -1,270 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.Cart = Class.create();
|
3 |
-
FC.Cart.prototype = {
|
4 |
-
initialize: function(config) {
|
5 |
-
if (config) { // can be called multiple times
|
6 |
-
this.config = config;
|
7 |
-
}
|
8 |
-
this.addQtyObservers();
|
9 |
-
this.addDescriptionToggler();
|
10 |
-
this.addLinkObservers();
|
11 |
-
},
|
12 |
-
|
13 |
-
addQtyObservers: function() {
|
14 |
-
var self = this,
|
15 |
-
qtyWrappers = $$('.qty-wrapper');
|
16 |
-
|
17 |
-
qtyWrappers.each(function(el) {
|
18 |
-
el.observe('mouseover', function(e) {
|
19 |
-
qtyWrappers.invoke('removeClassName', 'shown');
|
20 |
-
clearTimeout(self.timeout);
|
21 |
-
el.addClassName('shown');
|
22 |
-
});
|
23 |
-
el.observe('mouseout', function(e) {
|
24 |
-
self.timeout = setTimeout(Element.removeClassName, 500, el, 'shown');
|
25 |
-
});
|
26 |
-
});
|
27 |
-
|
28 |
-
$$('.qty-more, .qty-less').each(function(el) {
|
29 |
-
el.observe('click', function() {
|
30 |
-
var qtyWrapper = this.up('.qty-wrapper'),
|
31 |
-
field = this.up('.qty-wrapper').down('.qty'),
|
32 |
-
qty = parseFloat(field.value),
|
33 |
-
inc = parseFloat(qtyWrapper.down('.qty-increment').getValue());
|
34 |
-
|
35 |
-
inc = inc ? inc : 1;
|
36 |
-
inc = (this.hasClassName('qty-more') ? inc : -inc);
|
37 |
-
|
38 |
-
if (isNaN(qty)) {
|
39 |
-
qty = 0;
|
40 |
-
}
|
41 |
-
qty += inc;
|
42 |
-
self.updateQty(field, qty);
|
43 |
-
});
|
44 |
-
});
|
45 |
-
|
46 |
-
$$('input.qty').each(function(el) {
|
47 |
-
el.observe('change', function() {
|
48 |
-
self.updateQty(el);
|
49 |
-
if (window.getSelection) {
|
50 |
-
if (window.getSelection().empty) { // Chrome
|
51 |
-
window.getSelection().empty();
|
52 |
-
} else if (window.getSelection().removeAllRanges) { // Firefox
|
53 |
-
window.getSelection().removeAllRanges();
|
54 |
-
}
|
55 |
-
} else if (document.selection) { // IE?
|
56 |
-
document.selection.empty();
|
57 |
-
}
|
58 |
-
});
|
59 |
-
});
|
60 |
-
},
|
61 |
-
|
62 |
-
updateQty: function(field, qty) {
|
63 |
-
qty = (qty === undefined ? field.value : qty);
|
64 |
-
if (qty <= 0) {
|
65 |
-
qty = 0;
|
66 |
-
if (!confirm(checkout.translations.productRemoveConfirm)) {
|
67 |
-
field.value = field.defaultValue;
|
68 |
-
return;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
|
72 |
-
field.value = qty;
|
73 |
-
|
74 |
-
var options = FC.Ajax.getSectionsToUpdateAsJson('cart', 'total');
|
75 |
-
options.review = 1;
|
76 |
-
// collect only changed item to speed up cart update
|
77 |
-
options['updated_' + field.name] = field.value;
|
78 |
-
options['updated_' + field.previous().name] = field.previous().value;
|
79 |
-
checkout.update(checkout.urls.shopping_cart, options);
|
80 |
-
},
|
81 |
-
|
82 |
-
addLinkObservers: function() {
|
83 |
-
$('checkout-review-table').select('a').each(function(el) {
|
84 |
-
if (-1 != el.href.indexOf('giftcard/cart/remove')) {
|
85 |
-
el.observe('click', function(e) {
|
86 |
-
if (typeof event != 'undefined') { // ie9 fix
|
87 |
-
event.preventDefault ? event.preventDefault() : event.returnValue = false;
|
88 |
-
}
|
89 |
-
Event.stop(e);
|
90 |
-
var uriParts = this.href.replace(/\/+$/, '').split('/'),
|
91 |
-
code = uriParts[uriParts.length - 1];
|
92 |
-
|
93 |
-
checkout.update(checkout.urls.giftcard, {
|
94 |
-
'remove_giftcard': 1,
|
95 |
-
'giftcard_code': code,
|
96 |
-
'review': 1
|
97 |
-
});
|
98 |
-
return false;
|
99 |
-
});
|
100 |
-
} else if (-1 != el.href.indexOf('storecredit/cart/remove')) {
|
101 |
-
el.observe('click', function(e) {
|
102 |
-
if (typeof event != 'undefined') { // ie9 fix
|
103 |
-
event.preventDefault ? event.preventDefault() : event.returnValue = false;
|
104 |
-
}
|
105 |
-
Event.stop(e);
|
106 |
-
|
107 |
-
checkout.update(checkout.urls.paymentdata, {
|
108 |
-
'review': 1,
|
109 |
-
'remove_storecredit': 1
|
110 |
-
});
|
111 |
-
if ($('use_customer_balance')) {
|
112 |
-
$('use_customer_balance').checked = false;
|
113 |
-
var elements = $$('input[name="payment[method]"]');
|
114 |
-
for (var i=0; i<elements.length; i++) {
|
115 |
-
elements[i].disabled = false;
|
116 |
-
}
|
117 |
-
$('checkout-payment-method-load').show();
|
118 |
-
customerBalanceSubstracted = false;
|
119 |
-
}
|
120 |
-
return false;
|
121 |
-
});
|
122 |
-
} else if (-1 != el.href.indexOf('reward/cart/remove')) {
|
123 |
-
el.observe('click', function(e) {
|
124 |
-
if (typeof event != 'undefined') { // ie9 fix
|
125 |
-
event.preventDefault ? event.preventDefault() : event.returnValue = false;
|
126 |
-
}
|
127 |
-
Event.stop(e);
|
128 |
-
|
129 |
-
checkout.update(checkout.urls.paymentdata, {
|
130 |
-
'review': 1,
|
131 |
-
'remove_rewardpoints': 1
|
132 |
-
});
|
133 |
-
if ($('use_reward_points')) {
|
134 |
-
$('use_reward_points').checked = false;
|
135 |
-
var elements = $$('input[name="payment[method]"]');
|
136 |
-
for (var i=0; i<elements.length; i++) {
|
137 |
-
elements[i].disabled = false;
|
138 |
-
}
|
139 |
-
$('checkout-payment-method-load').show();
|
140 |
-
rewardPointsSubstracted = false;
|
141 |
-
}
|
142 |
-
return false;
|
143 |
-
});
|
144 |
-
} else if (-1 != el.href.indexOf('ugiftcert/checkout/remove')) {
|
145 |
-
el.observe('click', function(e) {
|
146 |
-
if (typeof event != 'undefined') { // ie9 fix
|
147 |
-
event.preventDefault ? event.preventDefault() : event.returnValue = false;
|
148 |
-
}
|
149 |
-
Event.stop(e);
|
150 |
-
var uriParts = this.href.replace(/\/+$/, '').split('/'),
|
151 |
-
code = uriParts[uriParts.length - 1];
|
152 |
-
|
153 |
-
checkout.update(checkout.urls.coupon, {
|
154 |
-
'remove_ugiftcert': 1,
|
155 |
-
'gc': code,
|
156 |
-
'review': 1
|
157 |
-
});
|
158 |
-
return false;
|
159 |
-
});
|
160 |
-
} else if (-1 != el.href.indexOf('awgiftcard/card/remove')) {
|
161 |
-
el.observe('click', function(e) {
|
162 |
-
if (typeof event != 'undefined') { // ie9 fix
|
163 |
-
event.preventDefault ? event.preventDefault() : event.returnValue = false;
|
164 |
-
}
|
165 |
-
Event.stop(e);
|
166 |
-
var uriParts = this.href.replace(/\/+$/, '').split('/'),
|
167 |
-
code = uriParts[uriParts.length - 1];
|
168 |
-
|
169 |
-
new Ajax.Request(awgiftcardRemoveUrl, { // see firecheckout/aw_giftcard/cart_giftcard.phtml
|
170 |
-
method:'post',
|
171 |
-
parameters: {
|
172 |
-
'giftcard_code': code
|
173 |
-
},
|
174 |
-
onComplete: function() {
|
175 |
-
checkout.update(checkout.urls.shopping_cart, {
|
176 |
-
'review': 1
|
177 |
-
});
|
178 |
-
}
|
179 |
-
});
|
180 |
-
return false;
|
181 |
-
});
|
182 |
-
}
|
183 |
-
});
|
184 |
-
},
|
185 |
-
|
186 |
-
addDescriptionToggler: function() {
|
187 |
-
var self = this;
|
188 |
-
$('checkout-review-table').select('.short-description .std').each(function(el) {
|
189 |
-
var description = el.innerHTML,
|
190 |
-
i = self.config.descriptionLength,
|
191 |
-
letter;
|
192 |
-
|
193 |
-
if (description.length <= i * 1.3) {
|
194 |
-
return;
|
195 |
-
}
|
196 |
-
|
197 |
-
// we can't place toggler inside these tags
|
198 |
-
// if we are inside one of them - try to move the pointer before them
|
199 |
-
var tagsToSkip = ['dl', 'ul', 'ol', 'table'],
|
200 |
-
begin = description.substr(0, i),
|
201 |
-
openedTags = closedTags = [],
|
202 |
-
k = 0,
|
203 |
-
tagName;
|
204 |
-
|
205 |
-
while ((tagName = tagsToSkip[k++])) {
|
206 |
-
while (begin.length > 10) {
|
207 |
-
openedTags = begin.match(new RegExp('<' + tagName + '.+?>', 'g'));
|
208 |
-
closedTags = begin.match(new RegExp('<' + tagName + '/>', 'g'));
|
209 |
-
|
210 |
-
if (!openedTags && !closedTags) { // no restricted elements - both regexp doesn't match
|
211 |
-
break;
|
212 |
-
}
|
213 |
-
|
214 |
-
if (!openedTags || !closedTags // one regexp doesn't match - tag is now closed on this position
|
215 |
-
|| openedTags.length != closedTags.length) { // we are inside restricted tags
|
216 |
-
|
217 |
-
i -= 4;
|
218 |
-
begin = description.substr(0, i);
|
219 |
-
} else {
|
220 |
-
break;
|
221 |
-
}
|
222 |
-
}
|
223 |
-
|
224 |
-
if (!openedTags && !closedTags) { // no restricted elements - both regexp doesn't match
|
225 |
-
continue;
|
226 |
-
}
|
227 |
-
if (!openedTags || !closedTags) { // one regexp doesn't match - tag is now closed on this position
|
228 |
-
return;
|
229 |
-
}
|
230 |
-
if (openedTags.length != closedTags.length) { // we are inside restricted tags
|
231 |
-
return;
|
232 |
-
}
|
233 |
-
}
|
234 |
-
|
235 |
-
// make offset to prevent breaking of html tags
|
236 |
-
var j = i;
|
237 |
-
while ((letter = description[j])) {
|
238 |
-
j--;
|
239 |
-
if (letter === '<') { // we was inside html tag, need to change the i value
|
240 |
-
i = j + 1;
|
241 |
-
break;
|
242 |
-
} else if (letter === '>') { // we was outside html tag
|
243 |
-
break;
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
-
var dots = '…',
|
248 |
-
begin = description.substr(0, i),
|
249 |
-
end = '<div style="display:none;">' + dots + description.substr(i).replace(/^\s+/, '') + '</div>',
|
250 |
-
toggler = '<a href="javascript:" class="description-toggler">' + dots + '</a>';
|
251 |
-
|
252 |
-
el.update(begin + toggler + end);
|
253 |
-
|
254 |
-
el.down('.description-toggler').observe('click', function(e) {
|
255 |
-
self.toggleDescription(this);
|
256 |
-
});
|
257 |
-
});
|
258 |
-
},
|
259 |
-
|
260 |
-
toggleDescription: function(toggler) {
|
261 |
-
var el = $(toggler).next();
|
262 |
-
if (toggler.hasClassName('active')) {
|
263 |
-
el.hide();
|
264 |
-
$(toggler).removeClassName('active');
|
265 |
-
} else {
|
266 |
-
el.show();
|
267 |
-
$(toggler).addClassName('active');
|
268 |
-
}
|
269 |
-
}
|
270 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/delivery-date.js
DELETED
@@ -1,184 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.DeliveryDate = Class.create();
|
3 |
-
FC.DeliveryDate.prototype = {
|
4 |
-
|
5 |
-
config: {
|
6 |
-
excludedDates : [],
|
7 |
-
periodicalDates : [],
|
8 |
-
nonPeriodicalDates: [],
|
9 |
-
excludeWeekend : 0,
|
10 |
-
useCalendar : 1,
|
11 |
-
weekendDays : '0,6',
|
12 |
-
ifFormat : '%m/%e/%Y',
|
13 |
-
shippingMethods : [],
|
14 |
-
todayOffset : 0,
|
15 |
-
useDefaultValue : 0,
|
16 |
-
period : 365
|
17 |
-
},
|
18 |
-
|
19 |
-
initialize: function(options) {
|
20 |
-
Object.extend(this.config, options);
|
21 |
-
var today = new Date();
|
22 |
-
|
23 |
-
// if delivery processing day is over add one more day
|
24 |
-
var serverDate = new Date(this.config.serverDate),
|
25 |
-
endOfDay = new Date(this.config.endOfDeliveryDayDate),
|
26 |
-
configOffset = this.config.todayOffset;
|
27 |
-
if (serverDate > endOfDay) {
|
28 |
-
configOffset++;
|
29 |
-
}
|
30 |
-
|
31 |
-
// offset first available date considering weekends and holidays
|
32 |
-
var offset = 0,
|
33 |
-
i = 0; // count iterations
|
34 |
-
while (offset < configOffset) {
|
35 |
-
if (i++ >= 365) {
|
36 |
-
// possible continious loop fix
|
37 |
-
console.error('There are no avaialable dates for the possible delivery within ' + i + ' days!');
|
38 |
-
break;
|
39 |
-
}
|
40 |
-
today.setDate(today.getDate() + 1);
|
41 |
-
if (this.config.excludeWeekend && this.config.weekendDays.indexOf(today.getDay()) >= 0) {
|
42 |
-
continue;
|
43 |
-
}
|
44 |
-
if (this.config.nonPeriodicalDates.indexOf(this.dateToString(today)) >= 0) {
|
45 |
-
continue;
|
46 |
-
}
|
47 |
-
if (this.config.periodicalDates.indexOf(this.dateToString(today).substr(0,7)) >= 0) {
|
48 |
-
continue;
|
49 |
-
}
|
50 |
-
offset += 1;
|
51 |
-
}
|
52 |
-
|
53 |
-
today.setHours(0);
|
54 |
-
today.setMinutes(0);
|
55 |
-
today.setSeconds(0);
|
56 |
-
today.setMilliseconds(0);
|
57 |
-
this.today = today;
|
58 |
-
|
59 |
-
if (this.config.useDefaultValue) {
|
60 |
-
$('delivery_date').setValue(today.print(this.config.ifFormat));
|
61 |
-
}
|
62 |
-
|
63 |
-
this.maxDate = new Date(today);
|
64 |
-
this.maxDate.setHours(23);
|
65 |
-
this.maxDate.setMinutes(59);
|
66 |
-
this.maxDate.setSeconds(59);
|
67 |
-
this.maxDate.setMilliseconds(59);
|
68 |
-
this.maxDate.setDate(this.maxDate.getDate() + this.config.period);
|
69 |
-
|
70 |
-
if (this.config.useCalendar) {
|
71 |
-
var label = $('shipping_form_delivery_date').down('.delivery-date label'),
|
72 |
-
html = label.innerHTML,
|
73 |
-
date = new Date();
|
74 |
-
|
75 |
-
date.setDate(25);
|
76 |
-
date.setMonth(10);
|
77 |
-
|
78 |
-
label.update(html.replace('{{date}}', date.print(this.config.ifFormat)));
|
79 |
-
this.initCalendar();
|
80 |
-
}
|
81 |
-
|
82 |
-
this.toggleDisplay();
|
83 |
-
},
|
84 |
-
|
85 |
-
toggleDisplay: function(shippingMethod) {
|
86 |
-
if (!this.config.shippingMethods.length) {
|
87 |
-
return;
|
88 |
-
}
|
89 |
-
|
90 |
-
if (!shippingMethod) {
|
91 |
-
$$('input[name="shipping_method"]').each(function(el) {
|
92 |
-
if (el.checked || el.readAttribute('checked') === 'checked') {
|
93 |
-
shippingMethod = el.value;
|
94 |
-
return;
|
95 |
-
}
|
96 |
-
});
|
97 |
-
}
|
98 |
-
|
99 |
-
if (-1 === this.config.shippingMethods.indexOf(shippingMethod)) {
|
100 |
-
$('shipping_form_delivery_date').hide();
|
101 |
-
} else {
|
102 |
-
$('shipping_form_delivery_date').show();
|
103 |
-
}
|
104 |
-
},
|
105 |
-
|
106 |
-
initCalendar: function() {
|
107 |
-
var self = this;
|
108 |
-
|
109 |
-
Calendar.prototype._init = Calendar.prototype._init.firecheckoutInterceptor(
|
110 |
-
function(firstDayOfWeek, date) {
|
111 |
-
if ('delivery_date' === this.params.inputField.id) {
|
112 |
-
return self.shiftToFirstAvailableDate(date);
|
113 |
-
}
|
114 |
-
}
|
115 |
-
);
|
116 |
-
|
117 |
-
Calendar.setup({
|
118 |
-
inputField : 'delivery_date',
|
119 |
-
ifFormat : this.config.ifFormat,
|
120 |
-
weekNumbers: false,
|
121 |
-
button : 'delivery_date_button',
|
122 |
-
// hiliteToday: false,
|
123 |
-
showOthers : true,
|
124 |
-
range : [
|
125 |
-
self.today.getFullYear(),
|
126 |
-
self.today.getFullYear() + 1
|
127 |
-
],
|
128 |
-
disableFunc: function(date) {
|
129 |
-
if (self.today > date) {
|
130 |
-
return true;
|
131 |
-
}
|
132 |
-
|
133 |
-
if (self.maxDate < date) {
|
134 |
-
return true;
|
135 |
-
}
|
136 |
-
|
137 |
-
if (self.config.excludeWeekend && self.config.weekendDays.indexOf(date.getDay()) >= 0) {
|
138 |
-
return true;
|
139 |
-
}
|
140 |
-
|
141 |
-
var i = 0,
|
142 |
-
sDate = self.dateToString(date);
|
143 |
-
while (self.config.excludedDates[i]) {
|
144 |
-
if (0 === sDate.indexOf(self.config.excludedDates[i])) {
|
145 |
-
return true;
|
146 |
-
}
|
147 |
-
i++;
|
148 |
-
}
|
149 |
-
return false;
|
150 |
-
}
|
151 |
-
});
|
152 |
-
},
|
153 |
-
|
154 |
-
shiftToFirstAvailableDate: function(date) {
|
155 |
-
var i = 0,
|
156 |
-
c = this.config;
|
157 |
-
|
158 |
-
while (-1 != c.nonPeriodicalDates.indexOf(this.dateToString(date)) ||
|
159 |
-
-1 != c.periodicalDates.indexOf(this.dateToString(date).substr(0, 7)) ||
|
160 |
-
(c.excludeWeekend && -1 != c.weekendDays.indexOf(date.getDay())) ||
|
161 |
-
this.today > date) {
|
162 |
-
|
163 |
-
date.setDate(date.getDate() + 1);
|
164 |
-
if (i++ >= 365) {
|
165 |
-
// possible continious loop fix
|
166 |
-
// alert('There are no avaialable dates for the possible delivery within ' + i + ' days');
|
167 |
-
return false;
|
168 |
-
}
|
169 |
-
}
|
170 |
-
|
171 |
-
return true;
|
172 |
-
},
|
173 |
-
|
174 |
-
dateToString: function(date) {
|
175 |
-
var year = date.getFullYear(),
|
176 |
-
month = date.getMonth() + 1,
|
177 |
-
day = date.getDate();
|
178 |
-
|
179 |
-
month = month < 10 ? '0' + month : month;
|
180 |
-
day = day < 10 ? '0' + day : day;
|
181 |
-
|
182 |
-
return month + '/' + day + '/' + year;
|
183 |
-
}
|
184 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/dependent-fields.js
DELETED
@@ -1,195 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.DependentFields = {
|
3 |
-
rules: {},
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @param {String} identifier Unique string to identify rule
|
7 |
-
* @param {Object} rule
|
8 |
-
*
|
9 |
-
* Rule examples:
|
10 |
-
* 1. Short notation {
|
11 |
-
* field: 'billing:country_id',
|
12 |
-
* value: 'US',
|
13 |
-
* dependentField: 'billing:company',
|
14 |
-
* match: 'hidden',
|
15 |
-
* unmatch: 'required'
|
16 |
-
* }
|
17 |
-
*
|
18 |
-
* 2. Full notation {
|
19 |
-
* fields: {
|
20 |
-
* 'billing:country_id': ['US', 'GB'], // Selectbox
|
21 |
-
* 'billing:city': '*', // Any non empty value
|
22 |
-
* 'billing:register_account': true // Checkbox
|
23 |
-
* 's_method_freeshipping_freeshipping': false // Radio
|
24 |
-
* },
|
25 |
-
* dependentField: ['billing:company', 'billing:email'],
|
26 |
-
* match: {
|
27 |
-
* status: 'hidden',
|
28 |
-
* method: function() {
|
29 |
-
* alert('match');
|
30 |
-
* }
|
31 |
-
* },
|
32 |
-
* unmatch: {
|
33 |
-
* status: 'required',
|
34 |
-
* method: function() {
|
35 |
-
* alert('unmatch');
|
36 |
-
* }
|
37 |
-
* }
|
38 |
-
* }
|
39 |
-
*/
|
40 |
-
addRule: function(identifier, rule) {
|
41 |
-
rule.dependentField = [].concat(rule.dependentField);
|
42 |
-
|
43 |
-
// move field to fields object
|
44 |
-
if (rule.field) {
|
45 |
-
if (!rule.fields) {
|
46 |
-
rule.fields = {};
|
47 |
-
}
|
48 |
-
rule.fields[rule.field] = rule.value;
|
49 |
-
}
|
50 |
-
|
51 |
-
// transform values into array
|
52 |
-
for (fieldId in rule.fields) {
|
53 |
-
rule.fields[fieldId] = [].concat(rule.fields[fieldId]);
|
54 |
-
}
|
55 |
-
|
56 |
-
this.rules[identifier] = rule;
|
57 |
-
|
58 |
-
for (fieldId in rule.fields) {
|
59 |
-
var field = $(fieldId);
|
60 |
-
if (!field) {
|
61 |
-
continue;
|
62 |
-
}
|
63 |
-
|
64 |
-
if (field.tagName === 'INPUT' && field.type === 'radio') {
|
65 |
-
var radios = $$('[name="' + field.name + '"]');
|
66 |
-
radios.each(function(radio) {
|
67 |
-
radio.observe('click', this.check.bind(this, identifier))
|
68 |
-
}.bind(this));
|
69 |
-
|
70 |
-
continue;
|
71 |
-
}
|
72 |
-
|
73 |
-
field.observe('change', this.check.bind(this, identifier));
|
74 |
-
}
|
75 |
-
|
76 |
-
this.check(identifier);
|
77 |
-
},
|
78 |
-
|
79 |
-
checkAll: function() {
|
80 |
-
for (identifier in this.rules) {
|
81 |
-
this.check(identifier);
|
82 |
-
}
|
83 |
-
},
|
84 |
-
|
85 |
-
check: function(identifier) {
|
86 |
-
if (!identifier || !this.rules[identifier]) {
|
87 |
-
return this.checkAll();
|
88 |
-
}
|
89 |
-
|
90 |
-
var fields = this.rules[identifier].fields,
|
91 |
-
dependentFields = this.rules[identifier].dependentField,
|
92 |
-
matched = true;
|
93 |
-
|
94 |
-
if (!dependentFields.length) {
|
95 |
-
return;
|
96 |
-
}
|
97 |
-
|
98 |
-
for (fieldId in fields) {
|
99 |
-
var field = $(fieldId),
|
100 |
-
possibleValues = fields[fieldId];
|
101 |
-
|
102 |
-
if (!field) {
|
103 |
-
continue;
|
104 |
-
}
|
105 |
-
|
106 |
-
// todo file elemets
|
107 |
-
var value = field.getValue(),
|
108 |
-
stringValue = value + '';
|
109 |
-
if (-1 !== possibleValues.indexOf('*') && stringValue.length) {
|
110 |
-
continue;
|
111 |
-
}
|
112 |
-
|
113 |
-
if (field.tagName === 'INPUT' && ['checkbox', 'radio'].indexOf(field.type) > -1) {
|
114 |
-
value = field.checked;
|
115 |
-
}
|
116 |
-
|
117 |
-
if (-1 === possibleValues.indexOf(value)) {
|
118 |
-
matched = false;
|
119 |
-
break;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
-
if (matched && this.rules[identifier].postMatch) {
|
124 |
-
matched = this.rules[identifier].postMatch();
|
125 |
-
}
|
126 |
-
|
127 |
-
var instructions = this.rules[identifier].match;
|
128 |
-
if (!matched) {
|
129 |
-
instructions = this.rules[identifier].unmatch;
|
130 |
-
}
|
131 |
-
|
132 |
-
var status = null,
|
133 |
-
method = null;
|
134 |
-
switch (typeof instructions) {
|
135 |
-
case 'string':
|
136 |
-
status = instructions;
|
137 |
-
break;
|
138 |
-
case 'function':
|
139 |
-
method = instructions;
|
140 |
-
break;
|
141 |
-
case 'object':
|
142 |
-
status = instructions.status;
|
143 |
-
method = instructions.method;
|
144 |
-
break;
|
145 |
-
}
|
146 |
-
|
147 |
-
if (status) {
|
148 |
-
dependentFields.each(function(dependentField) {
|
149 |
-
dependentField = $(dependentField);
|
150 |
-
if (!dependentField) {
|
151 |
-
return;
|
152 |
-
}
|
153 |
-
this.setFieldStatus(dependentField, status)
|
154 |
-
}.bind(this));
|
155 |
-
}
|
156 |
-
if (method) {
|
157 |
-
method();
|
158 |
-
}
|
159 |
-
},
|
160 |
-
|
161 |
-
setFieldStatus: function(field, status) {
|
162 |
-
var label = field.up('.input-box').previous('label'),
|
163 |
-
wrapper = field.up('.input-box').up();
|
164 |
-
|
165 |
-
switch (status) {
|
166 |
-
case 'required':
|
167 |
-
if (field.hasClassName('required-entry')) {
|
168 |
-
return;
|
169 |
-
}
|
170 |
-
wrapper.show();
|
171 |
-
if (label) {
|
172 |
-
label.addClassName('required');
|
173 |
-
label.insert({top: '<em>*</em>'});
|
174 |
-
}
|
175 |
-
field.addClassName('required-entry');
|
176 |
-
break;
|
177 |
-
case 'optional':
|
178 |
-
wrapper.show();
|
179 |
-
if (label) {
|
180 |
-
label.removeClassName('required');
|
181 |
-
label.innerHTML = label.innerHTML.replace('<em>*</em>', '');
|
182 |
-
}
|
183 |
-
field.removeClassName('required-entry');
|
184 |
-
field.removeClassName('validation-failed');
|
185 |
-
if ($('advice-required-entry-' + field.id)) {
|
186 |
-
$('advice-required-entry-' + field.id).remove();
|
187 |
-
}
|
188 |
-
break;
|
189 |
-
case 'hidden':
|
190 |
-
this.setFieldStatus(field, 'optional');
|
191 |
-
wrapper.hide();
|
192 |
-
break;
|
193 |
-
}
|
194 |
-
}
|
195 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/housenumber.js
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.Housenumber = Class.create();
|
3 |
-
FC.Housenumber.prototype = {
|
4 |
-
settings: {
|
5 |
-
/**
|
6 |
-
* Array of country codes
|
7 |
-
* @type {Array}
|
8 |
-
*/
|
9 |
-
optional: [],
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Array of country codes
|
13 |
-
* @type {Array}
|
14 |
-
*/
|
15 |
-
required: ['*']
|
16 |
-
},
|
17 |
-
|
18 |
-
initialize: function(addressType, config) {
|
19 |
-
Object.extend(this.settings, config || {});
|
20 |
-
this.addressType = addressType;
|
21 |
-
this.createField();
|
22 |
-
this.updateFieldStatus();
|
23 |
-
this.addObservers();
|
24 |
-
},
|
25 |
-
|
26 |
-
createField: function() {
|
27 |
-
var street1 = $(this.addressType + ':street1'),
|
28 |
-
parent = street1.up('li'),
|
29 |
-
housenum = $(this.addressType + ':street2'),
|
30 |
-
housenumLi = housenum.up('li'),
|
31 |
-
wrapper1 = new Element('div', {'class': 'field street1'}),
|
32 |
-
wrapper2 = new Element('div', {'class': 'field housenum'});
|
33 |
-
|
34 |
-
parent.removeClassName('wide');
|
35 |
-
parent.addClassName('fields');
|
36 |
-
|
37 |
-
parent.insert({top: wrapper1});
|
38 |
-
wrapper1.insert({top: street1.up().previous()});
|
39 |
-
wrapper1.insert({bottom: street1.up()});
|
40 |
-
|
41 |
-
parent.insert({bottom: wrapper2});
|
42 |
-
wrapper2.insert({top: housenum.up()});
|
43 |
-
housenum.insert({
|
44 |
-
before: '<label for="' + this.addressType + ':street2">' + this.settings.label + '</label>'
|
45 |
-
});
|
46 |
-
housenumLi.remove();
|
47 |
-
},
|
48 |
-
|
49 |
-
updateFieldStatus: function() {
|
50 |
-
var countryEl = $(this.addressType + ':country_id'),
|
51 |
-
housenumEl = $(this.addressType + ':street2'),
|
52 |
-
label = housenumEl.previous('label');
|
53 |
-
|
54 |
-
if (this.isRequired(countryEl.getValue())) {
|
55 |
-
if (housenumEl.hasClassName('required-entry')) {
|
56 |
-
return;
|
57 |
-
}
|
58 |
-
label.addClassName('required');
|
59 |
-
label.insert({top: '<em>*</em>'});
|
60 |
-
housenumEl.addClassName('required-entry');
|
61 |
-
} else {
|
62 |
-
label.removeClassName('required');
|
63 |
-
label.innerHTML = label.innerHTML.replace('<em>*</em>', '');
|
64 |
-
housenumEl.removeClassName('required-entry');
|
65 |
-
housenumEl.removeClassName('validation-failed');
|
66 |
-
if ($('advice-required-entry-' + this.addressType + ':street2')) {
|
67 |
-
$('advice-required-entry-' + this.addressType + ':street2').remove();
|
68 |
-
}
|
69 |
-
}
|
70 |
-
},
|
71 |
-
|
72 |
-
isRequired: function(countryCode) {
|
73 |
-
// if country is in required array
|
74 |
-
if (-1 !== this.settings.required.indexOf(countryCode)) {
|
75 |
-
return true;
|
76 |
-
}
|
77 |
-
|
78 |
-
// if country is in optional array
|
79 |
-
if (-1 !== this.settings.optional.indexOf(countryCode)) {
|
80 |
-
return false;
|
81 |
-
}
|
82 |
-
|
83 |
-
// if asterisk is in required array
|
84 |
-
if (-1 !== this.settings.required.indexOf('*')) {
|
85 |
-
return true;
|
86 |
-
}
|
87 |
-
|
88 |
-
// optional if not required
|
89 |
-
return false;
|
90 |
-
},
|
91 |
-
|
92 |
-
addObservers: function() {
|
93 |
-
var countryEl = $(this.addressType + ':country_id');
|
94 |
-
if (countryEl) {
|
95 |
-
countryEl.observe('change', this.updateFieldStatus.bind(this));
|
96 |
-
}
|
97 |
-
}
|
98 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/messenger.js
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.Messenger = {
|
3 |
-
add: function(message, section, type) {
|
4 |
-
section = $(section);
|
5 |
-
if (!section) {
|
6 |
-
return;
|
7 |
-
}
|
8 |
-
var ul = section.select('.messages')[0];
|
9 |
-
if (!ul) {
|
10 |
-
section.insert({
|
11 |
-
top: '<ul class="messages"></ul>'
|
12 |
-
});
|
13 |
-
ul = section.select('.messages')[0];
|
14 |
-
}
|
15 |
-
var li = $(ul).select('.' + type + '-msg')[0];
|
16 |
-
if (!li) {
|
17 |
-
$(ul).insert({
|
18 |
-
top: '<li class="' + type + '-msg"><ul></ul></li>'
|
19 |
-
});
|
20 |
-
li = $(ul).select('.' + type + '-msg')[0];
|
21 |
-
}
|
22 |
-
$(li).select('ul')[0].insert(
|
23 |
-
'<li>' + message + '</li>'
|
24 |
-
);
|
25 |
-
},
|
26 |
-
|
27 |
-
clear: function(section) {
|
28 |
-
section = $(section);
|
29 |
-
if (!section) {
|
30 |
-
return;
|
31 |
-
}
|
32 |
-
var ul = section.select('.messages')[0];
|
33 |
-
if (ul) {
|
34 |
-
ul.remove();
|
35 |
-
}
|
36 |
-
}
|
37 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/order-review.js
DELETED
@@ -1,185 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.OrderReview = Class.create();
|
3 |
-
FC.OrderReview.prototype = {
|
4 |
-
skip: {
|
5 |
-
'billing-address': {
|
6 |
-
'crafty_postcode_lookup_result_option1': 1
|
7 |
-
},
|
8 |
-
'shipping-address': {
|
9 |
-
'billing[email]': 1,
|
10 |
-
'crafty_postcode_lookup_result_option1': 1,
|
11 |
-
'crafty_postcode_lookup_result_option2': 1
|
12 |
-
}
|
13 |
-
},
|
14 |
-
|
15 |
-
initialize: function(options) {
|
16 |
-
var self = this;
|
17 |
-
|
18 |
-
this.options = options;
|
19 |
-
this.container = new Element('div');
|
20 |
-
this.container.writeAttribute('id', 'addresses-review');
|
21 |
-
this.container.writeAttribute('class', 'col2-set');
|
22 |
-
this.container.insert(
|
23 |
-
'<div id="billing-address-review" class="col-1"></div>'
|
24 |
-
+ '<div id="shipping-address-review" class="col-2"></div>'
|
25 |
-
+ '<div id="payment-method-review" class="col-1"></div>'
|
26 |
-
+ '<div class="clearer"></div>'
|
27 |
-
);
|
28 |
-
$('checkout-review-load').insert({
|
29 |
-
before: this.container
|
30 |
-
});
|
31 |
-
this.update('billing-address');
|
32 |
-
this.update('shipping-address');
|
33 |
-
this.update('payment-method');
|
34 |
-
|
35 |
-
$('billing-address') && $('billing-address').select('input:text, select, textarea').each(function(el) {
|
36 |
-
el.observe('change', function() {
|
37 |
-
self.update('billing-address');
|
38 |
-
if ($('shipping:same_as_billing') && $('shipping:same_as_billing').checked) {
|
39 |
-
self.update('billing-address', 'shipping-address');
|
40 |
-
}
|
41 |
-
});
|
42 |
-
});
|
43 |
-
|
44 |
-
$('shipping-address') && $('shipping-address').select('input:text, select, textarea').each(function(el) {
|
45 |
-
el.observe('change', function() {
|
46 |
-
self.update('shipping-address');
|
47 |
-
});
|
48 |
-
});
|
49 |
-
|
50 |
-
$('shipping:same_as_billing') && $('shipping:same_as_billing').observe('click', function() {
|
51 |
-
if (this.checked) {
|
52 |
-
self.update('billing-address', 'shipping-address');
|
53 |
-
} else {
|
54 |
-
self.update('shipping-address');
|
55 |
-
}
|
56 |
-
});
|
57 |
-
|
58 |
-
// craftyclicks postcode lookup
|
59 |
-
$(document).observe('dom:loaded', function() {
|
60 |
-
if (typeof _cp_instances !== 'undefined') {
|
61 |
-
_cp_instances.each(function(instance) {
|
62 |
-
instance.populate_form_fields = instance.populate_form_fields.wrap(function(original, j) {
|
63 |
-
original(j);
|
64 |
-
self.update('billing-address');
|
65 |
-
if ($('shipping-address')) {
|
66 |
-
if ($('shipping:same_as_billing') && $('shipping:same_as_billing').checked) {
|
67 |
-
self.update('billing-address', 'shipping-address');
|
68 |
-
} else {
|
69 |
-
self.update('shipping-address');
|
70 |
-
}
|
71 |
-
}
|
72 |
-
});
|
73 |
-
});
|
74 |
-
}
|
75 |
-
});
|
76 |
-
// craftyclicks postcode lookup
|
77 |
-
|
78 |
-
$(document).observe('change', function(e) {
|
79 |
-
var el = e.element();
|
80 |
-
if (el.name === 'payment[method]') {
|
81 |
-
self.update.bind(self).defer('payment-method');
|
82 |
-
}
|
83 |
-
});
|
84 |
-
|
85 |
-
$('payment-method').select('input:radio').each(function(el) {
|
86 |
-
el.observe('click', function() {
|
87 |
-
self.update.bind(self).defer('payment-method');
|
88 |
-
});
|
89 |
-
});
|
90 |
-
},
|
91 |
-
|
92 |
-
update: function(from, to) {
|
93 |
-
to = to || from;
|
94 |
-
var review = $(to + '-review');
|
95 |
-
review && review.update(this.getContent(from, to));
|
96 |
-
},
|
97 |
-
|
98 |
-
getContent: function(from, to) {
|
99 |
-
to = to || from;
|
100 |
-
|
101 |
-
var html = '',
|
102 |
-
self = this;
|
103 |
-
|
104 |
-
if ('payment-method' === from) {
|
105 |
-
if (payment.currentMethod) {
|
106 |
-
var radio = $('p_method_' + payment.currentMethod);
|
107 |
-
if (radio) {
|
108 |
-
var title = radio.readAttribute('title');
|
109 |
-
if (!title) {
|
110 |
-
var label = radio.up('dt').down('label');
|
111 |
-
title = label.innerHTML;
|
112 |
-
}
|
113 |
-
html += title;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
} else {
|
117 |
-
var from = $(from);
|
118 |
-
if (!from) {
|
119 |
-
return '';
|
120 |
-
}
|
121 |
-
var addressSelect = from.down('.address-select');
|
122 |
-
if (addressSelect) {
|
123 |
-
var option = addressSelect.options[addressSelect.selectedIndex];
|
124 |
-
if (option && option.value) {
|
125 |
-
return self.getTitle(to) + option.innerHTML.replace(/, /g, '<br/>');
|
126 |
-
}
|
127 |
-
}
|
128 |
-
|
129 |
-
from.down('fieldset').select('li').each(function(li) {
|
130 |
-
var br = '';
|
131 |
-
li.select('input:text, select, textarea').each(function(el) {
|
132 |
-
if (self.skip[to] && (self.skip[to][el.name] || self.skip[to][el.id])) {
|
133 |
-
return;
|
134 |
-
}
|
135 |
-
if (!el.visible() || el.type === 'hidden' || el.type === 'checkbox' || el.type === 'password') {
|
136 |
-
return;
|
137 |
-
}
|
138 |
-
if (!el.value.length) {
|
139 |
-
return;
|
140 |
-
}
|
141 |
-
|
142 |
-
if (el.tagName.toLowerCase() == 'select') {
|
143 |
-
var option = el.options[el.selectedIndex];
|
144 |
-
if (!option.value) {
|
145 |
-
return;
|
146 |
-
}
|
147 |
-
html += option.innerHTML + ' ';
|
148 |
-
} else {
|
149 |
-
html += el.value + ' ';
|
150 |
-
}
|
151 |
-
|
152 |
-
br = '</br>';
|
153 |
-
});
|
154 |
-
html += br;
|
155 |
-
});
|
156 |
-
}
|
157 |
-
if (html.length) {
|
158 |
-
html = self.getTitle(to) + html;
|
159 |
-
}
|
160 |
-
return html;
|
161 |
-
},
|
162 |
-
|
163 |
-
getTitle: function(block) {
|
164 |
-
var title = $(block).select('.block-title span'),
|
165 |
-
i = ('payment-method' === block ? 2 : 1);
|
166 |
-
|
167 |
-
return '<strong>' + title[title.length - i].innerHTML + '</strong>'
|
168 |
-
+ ' <a href="javascript:void(0)" onclick="reviewInfo.editBlock(\'' + block + '\')">' + this.options.changeText + '</a>'
|
169 |
-
+ '<br/>';
|
170 |
-
},
|
171 |
-
|
172 |
-
editBlock: function(id) {
|
173 |
-
var block = $(id),
|
174 |
-
sameAsBilling = $('shipping:same_as_billing');
|
175 |
-
|
176 |
-
if (-1 !== id.indexOf('address') && (!block || (sameAsBilling && sameAsBilling.checked))) {
|
177 |
-
block = $('billing-address');
|
178 |
-
}
|
179 |
-
|
180 |
-
if (block) {
|
181 |
-
block.scrollTo();
|
182 |
-
block.highlight();
|
183 |
-
}
|
184 |
-
}
|
185 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/taxvat.js
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.Taxvat = {
|
3 |
-
|
4 |
-
patterns: {
|
5 |
-
'AT': /^U[0-9]{8}$/,
|
6 |
-
'BE': /^0?[0-9]{*}$/,
|
7 |
-
'CZ': /^[0-9]{8,10}$/,
|
8 |
-
'DE': /^[0-9]{9}$/,
|
9 |
-
'CY': /^[0-9]{8}[A-Z]$/,
|
10 |
-
'DK': /^[0-9]{8}$/,
|
11 |
-
'EE': /^[0-9]{9}$/,
|
12 |
-
'GR': /^[0-9]{9}$/,
|
13 |
-
'ES': /^[0-9A-Z][0-9]{7}[0-9A-Z]$/,
|
14 |
-
'FI': /^[0-9]{8}$/,
|
15 |
-
'FR': /^[0-9A-Z]{2}[0-9]{9}$/,
|
16 |
-
'GB': /^([0-9]{9}|[0-9]{12})~(GD|HA)[0-9]{3}$/,
|
17 |
-
'UK': /^([0-9]{9}|[0-9]{12})~(GD|HA)[0-9]{3}$/,
|
18 |
-
'HU': /^[0-9]{8}$/,
|
19 |
-
'IE': /^[0-9][A-Z0-9\\+\\*][0-9]{5}[A-Z]$/,
|
20 |
-
'IT': /^[0-9]{11}$/,
|
21 |
-
'LT': /^([0-9]{9}|[0-9]{12})$/,
|
22 |
-
'LU': /^[0-9]{8}$/,
|
23 |
-
'LV': /^[0-9]{11}$/,
|
24 |
-
'MT': /^[0-9]{8}$/,
|
25 |
-
'NL': /^[0-9]{9}B[0-9]{2}$/,
|
26 |
-
'PL': /^[0-9]{10}$/,
|
27 |
-
'PT': /^[0-9]{9}$/,
|
28 |
-
'SE': /^[0-9]{12}$/,
|
29 |
-
'SI': /^[0-9]{8}$/,
|
30 |
-
'SK': /^[0-9]{10}$/
|
31 |
-
},
|
32 |
-
|
33 |
-
isValid: function(number, countryCode) {
|
34 |
-
var pattern = this.patterns[countryCode];
|
35 |
-
if (!pattern) {
|
36 |
-
// this.message = 'The provided CountryCode is invalid for the VAT number';
|
37 |
-
return false;
|
38 |
-
}
|
39 |
-
|
40 |
-
number = number.replace(countryCode, '');
|
41 |
-
if (!number.match(pattern)) {
|
42 |
-
// this.message = 'Invalid VAT number';
|
43 |
-
return false;
|
44 |
-
}
|
45 |
-
|
46 |
-
return true;
|
47 |
-
}
|
48 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/components/window.js
DELETED
@@ -1,303 +0,0 @@
|
|
1 |
-
var FC = FC || {};
|
2 |
-
FC.Window = Class.create();
|
3 |
-
FC.Window.prototype = {
|
4 |
-
initialize: function(config) {
|
5 |
-
this.config = Object.extend({
|
6 |
-
triggers: null,
|
7 |
-
markup: '<div class="content"></div><a href="javascript:void(0)" class="close">×</a>'
|
8 |
-
}, config || {});
|
9 |
-
this.config.size = Object.extend({
|
10 |
-
width : 'auto',
|
11 |
-
height : 'auto',
|
12 |
-
maxWidth : 550,
|
13 |
-
maxHeight: 600
|
14 |
-
}, this.config.size || {});
|
15 |
-
|
16 |
-
this._prepareMarkup();
|
17 |
-
this._attachEventListeners();
|
18 |
-
},
|
19 |
-
|
20 |
-
show: function() {
|
21 |
-
if (!this.centered) {
|
22 |
-
this.center();
|
23 |
-
}
|
24 |
-
$$('select').invoke('addClassName', 'firecheckout-hidden');
|
25 |
-
|
26 |
-
if (!$('firecheckout-mask')) {
|
27 |
-
var mask = new Element('div');
|
28 |
-
mask.writeAttribute('id', 'firecheckout-mask');
|
29 |
-
var body = document.body,
|
30 |
-
element = document.documentElement,
|
31 |
-
height = Math.max(
|
32 |
-
Math.max(body.scrollHeight, element.scrollHeight),
|
33 |
-
Math.max(body.offsetHeight, element.offsetHeight),
|
34 |
-
Math.max(body.clientHeight, element.clientHeight)
|
35 |
-
);
|
36 |
-
mask.setStyle({
|
37 |
-
height: height + 'px'
|
38 |
-
});
|
39 |
-
$(document.body).insert(mask);
|
40 |
-
}
|
41 |
-
|
42 |
-
if (!window.firecheckoutMaskCounter) {
|
43 |
-
window.firecheckoutMaskCounter = 0;
|
44 |
-
}
|
45 |
-
if (!this.maskCounted) {
|
46 |
-
this.maskCounted = 1;
|
47 |
-
window.firecheckoutMaskCounter++;
|
48 |
-
}
|
49 |
-
|
50 |
-
// set highest z-index
|
51 |
-
var zIndex = 999;
|
52 |
-
$$('.firecheckout-window').each(function(el) {
|
53 |
-
maxIndex = parseInt(el.getStyle('zIndex'));
|
54 |
-
if (zIndex < maxIndex) {
|
55 |
-
zIndex = maxIndex;
|
56 |
-
}
|
57 |
-
});
|
58 |
-
this.window.setStyle({
|
59 |
-
'zIndex': zIndex + 1
|
60 |
-
});
|
61 |
-
|
62 |
-
this._onKeyPressBind = this._onKeyPress.bind(this);
|
63 |
-
document.observe('keyup', this._onKeyPressBind);
|
64 |
-
this.window.show();
|
65 |
-
},
|
66 |
-
|
67 |
-
hide: function() {
|
68 |
-
if (this.modal || !this.window.visible()) {
|
69 |
-
return;
|
70 |
-
}
|
71 |
-
|
72 |
-
if (this._onKeyPressBind) {
|
73 |
-
document.stopObserving('keyup', this._onKeyPressBind);
|
74 |
-
}
|
75 |
-
if (this.config.destroy) {
|
76 |
-
this.window.remove();
|
77 |
-
} else {
|
78 |
-
this.window.hide();
|
79 |
-
}
|
80 |
-
this.maskCounted = 0;
|
81 |
-
if (!--window.firecheckoutMaskCounter) {
|
82 |
-
$('firecheckout-mask') && $('firecheckout-mask').remove();
|
83 |
-
$$('select').invoke('removeClassName', 'firecheckout-hidden');
|
84 |
-
}
|
85 |
-
},
|
86 |
-
|
87 |
-
setModal: function(flag) {
|
88 |
-
this.modal = flag;
|
89 |
-
|
90 |
-
if (flag) {
|
91 |
-
this.window.select('.close').invoke('hide');
|
92 |
-
} else {
|
93 |
-
this.window.select('.close').invoke('show');
|
94 |
-
}
|
95 |
-
return this;
|
96 |
-
},
|
97 |
-
|
98 |
-
update: function(content, size) {
|
99 |
-
var oldContent = this.content.down();
|
100 |
-
oldContent && $(document.body).insert(oldContent.hide());
|
101 |
-
|
102 |
-
this.content.update(content);
|
103 |
-
content.show();
|
104 |
-
this.addActionBar();
|
105 |
-
this.updateSize(size);
|
106 |
-
this.center();
|
107 |
-
return this;
|
108 |
-
},
|
109 |
-
|
110 |
-
addActionBar: function() {
|
111 |
-
this.removeActionBar();
|
112 |
-
|
113 |
-
var agreementId = this.content.down().id.replace('-window', ''),
|
114 |
-
trigger = this.config.triggers[agreementId];
|
115 |
-
|
116 |
-
if (!trigger || !trigger.actionbar || trigger.actionbar.hidden === 1) {
|
117 |
-
return;
|
118 |
-
}
|
119 |
-
|
120 |
-
this.content.insert({
|
121 |
-
after: '<div class="actionbar">' + trigger.actionbar.html + '</div>'
|
122 |
-
});
|
123 |
-
$(trigger.actionbar.el).observe(
|
124 |
-
trigger.actionbar.event,
|
125 |
-
trigger.actionbar.callback.bindAsEventListener(this, agreementId.replace('firecheckout-', ''))
|
126 |
-
);
|
127 |
-
},
|
128 |
-
|
129 |
-
removeActionBar: function() {
|
130 |
-
var agreementId = this.content.down().id.replace('-window', ''),
|
131 |
-
trigger = this.config.triggers[agreementId];
|
132 |
-
|
133 |
-
if (trigger && trigger.actionbar) {
|
134 |
-
var actionbar = $(trigger.actionbar.el);
|
135 |
-
if (actionbar) {
|
136 |
-
actionbar.stopObserving(trigger.actionbar.event);
|
137 |
-
}
|
138 |
-
}
|
139 |
-
|
140 |
-
this.window.select('.actionbar').invoke('remove');
|
141 |
-
},
|
142 |
-
|
143 |
-
getActionBar: function() {
|
144 |
-
return this.window.down('.actionbar');
|
145 |
-
},
|
146 |
-
|
147 |
-
center: function() {
|
148 |
-
var viewportSize = document.viewport.getDimensions(),
|
149 |
-
viewportOffset = document.viewport.getScrollOffsets(),
|
150 |
-
windowSize = this.window.getDimensions(),
|
151 |
-
left, top;
|
152 |
-
|
153 |
-
if ('undefined' === typeof viewportSize.width) { // mobile fix. not sure is this check is good enough.
|
154 |
-
top = viewportOffset.top + 20;
|
155 |
-
left = viewportOffset.left;
|
156 |
-
} else {
|
157 |
-
top = viewportSize.height / 2
|
158 |
-
- windowSize.height / 2
|
159 |
-
+ viewportOffset.top,
|
160 |
-
left = viewportSize.width / 2
|
161 |
-
- windowSize.width / 2
|
162 |
-
+ viewportOffset.left;
|
163 |
-
|
164 |
-
if (left < viewportOffset.left || windowSize.width > viewportSize.width) {
|
165 |
-
left = viewportOffset.left;
|
166 |
-
}
|
167 |
-
top = (top < viewportOffset.top ? (20 + viewportOffset.top) : top);
|
168 |
-
}
|
169 |
-
|
170 |
-
this.setPosition(left, top);
|
171 |
-
this.centered = true;
|
172 |
-
|
173 |
-
return this;
|
174 |
-
},
|
175 |
-
|
176 |
-
setPosition: function(x, y) {
|
177 |
-
this.window.setStyle({
|
178 |
-
left: x + 'px',
|
179 |
-
top : y + 'px'
|
180 |
-
});
|
181 |
-
|
182 |
-
return this;
|
183 |
-
},
|
184 |
-
|
185 |
-
activate: function(trigger) {
|
186 |
-
trigger = this.config.triggers[trigger];
|
187 |
-
this.update(trigger.window.show(), trigger.size).show();
|
188 |
-
},
|
189 |
-
|
190 |
-
updateSize: function(sizeConfig) {
|
191 |
-
sizeConfig = sizeConfig || this.config.size;
|
192 |
-
// reset previous size
|
193 |
-
this.window.setStyle({
|
194 |
-
width : 'auto',
|
195 |
-
height: 'auto',
|
196 |
-
left : 0, /* thin content box fix while page is scrolled to the right */
|
197 |
-
top : 0
|
198 |
-
});
|
199 |
-
this.content.setStyle({
|
200 |
-
width : isNaN(sizeConfig.width) ? sizeConfig.width : sizeConfig.width + 'px',
|
201 |
-
height: isNaN(sizeConfig.height) ? sizeConfig.height : sizeConfig.height + 'px'
|
202 |
-
});
|
203 |
-
|
204 |
-
this.window.setStyle({
|
205 |
-
visibility: 'hidden'
|
206 |
-
}).show();
|
207 |
-
|
208 |
-
var width = this.window.getWidth() + 30, /* close btn */
|
209 |
-
viewportSize = document.viewport.getDimensions();
|
210 |
-
|
211 |
-
sizeConfig = Object.extend(this.config.size, sizeConfig || {});
|
212 |
-
if ('auto' === sizeConfig.width
|
213 |
-
&& (width > sizeConfig.maxWidth || width > viewportSize.width)) {
|
214 |
-
|
215 |
-
if (width > viewportSize.width && viewportSize.width < (sizeConfig.maxWidth + 30)) {
|
216 |
-
width = viewportSize.width - 30; /* right shadow and borders */
|
217 |
-
} else {
|
218 |
-
width = sizeConfig.maxWidth;
|
219 |
-
}
|
220 |
-
var paddingHorizontal = parseInt(this.window.getStyle('padding-left')) + parseInt(this.window.getStyle('padding-right'));
|
221 |
-
this.content.setStyle({
|
222 |
-
width: width - paddingHorizontal + 'px'
|
223 |
-
});
|
224 |
-
}
|
225 |
-
|
226 |
-
var actionbar = this.getActionBar(),
|
227 |
-
actionbarHeight = actionbar ? actionbar.getHeight() : 0,
|
228 |
-
height = this.content.getHeight() + actionbarHeight + 20 /* top button */;
|
229 |
-
if ('auto' === sizeConfig.height
|
230 |
-
&& (height > sizeConfig.maxHeight || height > viewportSize.height)) {
|
231 |
-
|
232 |
-
if (height > viewportSize.height && viewportSize.height < (sizeConfig.maxHeight + actionbarHeight + 20)) {
|
233 |
-
height = viewportSize.height - 60; /* bottom shadow */
|
234 |
-
} else {
|
235 |
-
height = sizeConfig.maxHeight;
|
236 |
-
}
|
237 |
-
height -= actionbarHeight;
|
238 |
-
this.content.setStyle({
|
239 |
-
height: height + 'px'
|
240 |
-
});
|
241 |
-
}
|
242 |
-
|
243 |
-
// update window size. Fix for all IE browsers
|
244 |
-
this.window.hide()
|
245 |
-
.setStyle({
|
246 |
-
width : width + 'px',
|
247 |
-
visibility: 'visible'
|
248 |
-
});
|
249 |
-
|
250 |
-
return this;
|
251 |
-
},
|
252 |
-
|
253 |
-
_prepareMarkup: function() {
|
254 |
-
this.window = new Element('div');
|
255 |
-
this.window.addClassName('firecheckout-window');
|
256 |
-
this.window.update(this.config.markup).hide();
|
257 |
-
this.content = this.window.select('.content')[0];
|
258 |
-
this.close = this.window.select('.close')[0];
|
259 |
-
$(document.body).insert(this.window);
|
260 |
-
},
|
261 |
-
|
262 |
-
_attachEventListeners: function() {
|
263 |
-
// close window
|
264 |
-
this.close.observe('click', this.hide.bind(this));
|
265 |
-
// show window
|
266 |
-
if (this.config.triggers) {
|
267 |
-
for (var i in this.config.triggers) {
|
268 |
-
var trigger = this.config.triggers[i];
|
269 |
-
if (typeof trigger === 'function') {
|
270 |
-
continue;
|
271 |
-
}
|
272 |
-
trigger.size = trigger.size || {};
|
273 |
-
for (var j in this.config.size) {
|
274 |
-
if (trigger.size[j]) {
|
275 |
-
continue;
|
276 |
-
}
|
277 |
-
trigger.size[j] = this.config.size[j];
|
278 |
-
}
|
279 |
-
|
280 |
-
trigger.el.each(function(el) {
|
281 |
-
var t = trigger;
|
282 |
-
el.observe(t.event, function(e) {
|
283 |
-
if (typeof event != 'undefined') { // ie9 fix
|
284 |
-
event.preventDefault ? event.preventDefault() : event.returnValue = false;
|
285 |
-
}
|
286 |
-
Event.stop(e);
|
287 |
-
|
288 |
-
if (!t.window) {
|
289 |
-
return;
|
290 |
-
}
|
291 |
-
this.update(t.window, t.size).show();
|
292 |
-
}.bind(this));
|
293 |
-
}.bind(this));
|
294 |
-
}
|
295 |
-
}
|
296 |
-
},
|
297 |
-
|
298 |
-
_onKeyPress: function(e) {
|
299 |
-
if (e.keyCode == 27) {
|
300 |
-
this.hide();
|
301 |
-
}
|
302 |
-
}
|
303 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/firecheckout-compatibility.js
DELETED
@@ -1,887 +0,0 @@
|
|
1 |
-
if (typeof CentinelAuthenticate == 'function') {
|
2 |
-
CentinelAuthenticate.prototype._hideRelatedBlocks = function() {};
|
3 |
-
CentinelAuthenticate.prototype._showRelatedBlocks = function() {};
|
4 |
-
|
5 |
-
CentinelAuthenticate.prototype.success = function()
|
6 |
-
{
|
7 |
-
if (this._isRelatedBlocksLoaded() && this._isCentinelBlocksLoaded()) {
|
8 |
-
this._showRelatedBlocks();
|
9 |
-
$(this.centinelBlockId).hide();
|
10 |
-
this._isAuthenticationStarted = false;
|
11 |
-
|
12 |
-
firecheckoutWindow.hide();
|
13 |
-
checkout.save();
|
14 |
-
}
|
15 |
-
};
|
16 |
-
|
17 |
-
CentinelAuthenticate.prototype.cancel = function()
|
18 |
-
{
|
19 |
-
if (this._isAuthenticationStarted) {
|
20 |
-
if (this._isRelatedBlocksLoaded()) {
|
21 |
-
this._showRelatedBlocks();
|
22 |
-
firecheckoutWindow.hide();
|
23 |
-
}
|
24 |
-
if (this._isCentinelBlocksLoaded()) {
|
25 |
-
$(this.centinelBlockId).hide();
|
26 |
-
$(this.iframeId).src = '';
|
27 |
-
}
|
28 |
-
this._isAuthenticationStarted = false;
|
29 |
-
}
|
30 |
-
};
|
31 |
-
}
|
32 |
-
|
33 |
-
/* SagePay Server Integration */
|
34 |
-
registerTransaction= function() {
|
35 |
-
if($("opc-payment")) {
|
36 |
-
var a=$("opc-payment").hasClassName("allow")
|
37 |
-
} else {
|
38 |
-
var a=false
|
39 |
-
}
|
40 |
-
if(Ajax.activeRequestCount>1||((a==false)&&$("opc-payment"))) {
|
41 |
-
return
|
42 |
-
}
|
43 |
-
var c=$("wait-trn-create");
|
44 |
-
var b=$("sage-pay-server-iframe");
|
45 |
-
b.writeAttribute({src:""});
|
46 |
-
new Ajax.Request(SAGE_PAY_REG_TRN_URL,{
|
47 |
-
method:"get",
|
48 |
-
onSuccess: function(f) {
|
49 |
-
var d=f.responseText.evalJSON();
|
50 |
-
var e=d.response_status;
|
51 |
-
c.hide();
|
52 |
-
if(e=="OK") {
|
53 |
-
b.writeAttribute({src:d.next_url}).show();
|
54 |
-
if($$(".col-right")[0]) {new Ajax.Updater($$(".col-right")[0],SP_PROGRESS_URL,{method:"get"})
|
55 |
-
}
|
56 |
-
} else {
|
57 |
-
if(e=="INVALID"||e=="MALFORMED"||e=="ERROR"||e=="FAIL") {
|
58 |
-
if((typeof(SAGE_PAY_SERVER_UNIQUE)!="undefined")&&(SAGE_PAY_SERVER_UNIQUE==true)) {
|
59 |
-
b.hide()
|
60 |
-
}
|
61 |
-
if((a||!$("opc-payment"))) {
|
62 |
-
alert(Translator.translate("An error ocurred")+": \n"+d.response_status_detail)
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
},
|
67 |
-
onLoading: function() {
|
68 |
-
var d=$("advice-required-entry-d-sgps-hi");
|
69 |
-
if(d) {
|
70 |
-
d.hide()
|
71 |
-
}
|
72 |
-
if(b.visible()) {
|
73 |
-
b.hide()
|
74 |
-
}
|
75 |
-
c.setStyle({opacity:0.5}).show()
|
76 |
-
}
|
77 |
-
})
|
78 |
-
};
|
79 |
-
function createTrn() {
|
80 |
-
registerTransaction()
|
81 |
-
}
|
82 |
-
|
83 |
-
function DumpObjectIndented(f,c) {
|
84 |
-
var b="";
|
85 |
-
if(c==null) {
|
86 |
-
c=""
|
87 |
-
}
|
88 |
-
for(var e in f) {
|
89 |
-
var d=f[e];
|
90 |
-
if(typeof d=="string") {
|
91 |
-
d=d
|
92 |
-
} else {
|
93 |
-
if(typeof d=="object") {
|
94 |
-
if(d instanceof Array) {
|
95 |
-
d="[ "+d+" ]"
|
96 |
-
} else {
|
97 |
-
var a=DumpObjectIndented(d,c+" ");
|
98 |
-
d="\n"+c+"{\n"+a+"\n"+c+"}"
|
99 |
-
}
|
100 |
-
}
|
101 |
-
}
|
102 |
-
b+=c+"'"+e+"' : "+unescape(d)+",\n"
|
103 |
-
}
|
104 |
-
return b.replace(/,\n$/,"")
|
105 |
-
}
|
106 |
-
|
107 |
-
checkSagePayServerError= function() {
|
108 |
-
var a=$("sage-pay-server-error");
|
109 |
-
if(a.innerHTML.replace(/^\s+|\s+$/g,"")) {
|
110 |
-
var b=a.innerHTML.evalJSON();
|
111 |
-
alert(Translator.translate(b.response_status_detail));
|
112 |
-
if(b.Request) {
|
113 |
-
alert("REQUEST:\n"+DumpObjectIndented(b.Request));
|
114 |
-
alert("RESPONSE:\n"+DumpObjectIndented(b.Response))
|
115 |
-
}
|
116 |
-
return false
|
117 |
-
}
|
118 |
-
return true
|
119 |
-
};
|
120 |
-
view_iframe= function() {
|
121 |
-
if(checkSagePayServerError()===false) {
|
122 |
-
return
|
123 |
-
}
|
124 |
-
|
125 |
-
var oldContent = firecheckoutWindow.content.down();
|
126 |
-
if (oldContent && oldContent.select('#sage-pay-server-iframe')) {
|
127 |
-
// oldContent.update('');
|
128 |
-
} else if (oldContent) {
|
129 |
-
$(document.body).insert(oldContent.hide());
|
130 |
-
}
|
131 |
-
firecheckoutWindow
|
132 |
-
.update($('checkout-sagepay-iframe-load').show())
|
133 |
-
.show();
|
134 |
-
|
135 |
-
var iframe = $('sage-pay-server-iframe');
|
136 |
-
iframe.src = iframe.name;
|
137 |
-
//shPlaceOrderBlock("h")
|
138 |
-
};
|
139 |
-
/*_getPlaceBlock= function() {
|
140 |
-
return $$("#checkout-step-review .button-set p")
|
141 |
-
};
|
142 |
-
shPlaceOrderBlock= function(b) {
|
143 |
-
var a=_getPlaceBlock();
|
144 |
-
if((typeof(a[0])!="undefined")) {
|
145 |
-
if(b=="s") {
|
146 |
-
a[0].show();
|
147 |
-
if((typeof(a[1])!="undefined")) {
|
148 |
-
a[1].show()
|
149 |
-
}
|
150 |
-
} else {
|
151 |
-
a[0].hide();
|
152 |
-
if((typeof(a[1])!="undefined")) {
|
153 |
-
a[1].hide()
|
154 |
-
}
|
155 |
-
}
|
156 |
-
}
|
157 |
-
};*/
|
158 |
-
continueMonitor= function() {
|
159 |
-
var a=$$("#payment-buttons-container button");
|
160 |
-
if((typeof(a[0])!="undefined")) {
|
161 |
-
a[0].stopObserving();
|
162 |
-
Event.observe(a[0],"click", function(c) {
|
163 |
-
if($("checkout-agreements")) {
|
164 |
-
$("checkout-agreements").show()
|
165 |
-
}
|
166 |
-
var d=$("review-please-wait");
|
167 |
-
if($("p_method_sagepayserver").checked===false) {
|
168 |
-
d.innerHTML=d.innerHTML.replace(SGPS_vtwo,SGPS_vone)
|
169 |
-
} else {
|
170 |
-
d.innerHTML=d.innerHTML.replace(SGPS_vone,SGPS_vtwo)
|
171 |
-
}
|
172 |
-
/*var b=_getPlaceBlock();
|
173 |
-
if((typeof(b[0])!="undefined")&&!(b[0].visible())) {
|
174 |
-
shPlaceOrderBlock("s");
|
175 |
-
if($("review-buttons-container")&&!$("review-buttons-container").visible()) {
|
176 |
-
$("review-buttons-container").show()
|
177 |
-
}
|
178 |
-
}*/
|
179 |
-
})
|
180 |
-
}
|
181 |
-
};
|
182 |
-
sgps_placeOrder= function() {
|
183 |
-
var c=$("review-please-wait");
|
184 |
-
var a="";
|
185 |
-
var b=$("review-buttons-container");
|
186 |
-
//new Ajax.Request(SAGE_PAY_GTSPMC, {
|
187 |
-
//onSuccess: function(d) {
|
188 |
-
//c.hide();
|
189 |
-
//a=d.responseText;
|
190 |
-
//if($('p_method_sagepayserver').checked/*a=="sagepayserver"||a=="sagepayserverdot"*/) {
|
191 |
-
var h=false;
|
192 |
-
if(!SAGE_PAY_SERVER_ASIFRAME) {
|
193 |
-
var g=$$('p.agree input[type="checkbox"]');
|
194 |
-
if(g.length) {
|
195 |
-
g.each( function(k,j) {
|
196 |
-
if(!k.checked) {
|
197 |
-
alert(Translator.translate("Please agree to all Terms and Conditions before placing the order."));
|
198 |
-
h=true;
|
199 |
-
return false
|
200 |
-
}
|
201 |
-
})
|
202 |
-
}
|
203 |
-
if(!b.visible()) {
|
204 |
-
b.show()
|
205 |
-
}
|
206 |
-
}
|
207 |
-
if(!h) {
|
208 |
-
view_iframe();
|
209 |
-
if($("opc-review")) {
|
210 |
-
$("opc-review").scrollTo();
|
211 |
-
try {
|
212 |
-
var e=$("opc-review").positionedOffset().top;
|
213 |
-
var f=$$("div.header")[0].getStyle("height").replace("px","");
|
214 |
-
if(SP_DESIGN_MODERN) {
|
215 |
-
f=parseInt(f)+parseInt($$("div.toplinks-bar")[0].getStyle("height").replace("px",""))+parseInt($$("div.search-bar")[0].getStyle("height").replace("px",""))+parseInt($$("div.search-bar")[0].getStyle("margin-bottom").replace("px",""));
|
216 |
-
f=parseInt($$("div.middle")[0].getStyle("paddingTop").replace("px",""))+parseInt(f)+48
|
217 |
-
} else {
|
218 |
-
f=parseInt($$("div.middle")[0].getStyle("paddingTop").replace("px",""))+parseInt(f)
|
219 |
-
}
|
220 |
-
e=(e-f)+"px";
|
221 |
-
$$("div.one-page-checkout-progress")[0].setStyle({marginTop:e})
|
222 |
-
} catch(i) {
|
223 |
-
}
|
224 |
-
} else {
|
225 |
-
if($$("div.multi-address-checkout-box div.box")[1]) {
|
226 |
-
$$("div.multi-address-checkout-box div.box")[1].scrollTo()
|
227 |
-
}
|
228 |
-
}
|
229 |
-
}
|
230 |
-
//} else {
|
231 |
-
// checkout.save();
|
232 |
-
//}
|
233 |
-
//}
|
234 |
-
/*,
|
235 |
-
onLoading: function() {
|
236 |
-
if(b) {
|
237 |
-
b.hide()
|
238 |
-
}
|
239 |
-
c.setStyle({opacity:0.5}).show()
|
240 |
-
}*/
|
241 |
-
//});
|
242 |
-
};
|
243 |
-
dstrb= function() {
|
244 |
-
alert(SAGEPAY_SERVER_NV)
|
245 |
-
};
|
246 |
-
sagePayServerAdvance= function() {
|
247 |
-
if(SAGE_PAY_SERVER_AAOS) {
|
248 |
-
continueMonitor();
|
249 |
-
if(!SGPS_ISMS) {
|
250 |
-
sgps_placeOrder();
|
251 |
-
} else {
|
252 |
-
$("multishipping-billing-form").submit()
|
253 |
-
}
|
254 |
-
}
|
255 |
-
};
|
256 |
-
sgps_uniqueHandler= function() {
|
257 |
-
var a=$("p_method_sagepayserver").ancestors();
|
258 |
-
if(a[0].hasClassName("no-display")) {
|
259 |
-
a[0].removeClassName("no-display")
|
260 |
-
}
|
261 |
-
if((typeof(SAGE_PAY_SERVER_UNIQUE)!="undefined")&&(SAGE_PAY_SERVER_UNIQUE==true)&&(!$("sage-pay-server-iframe").visible()||$("sage-pay-server-iframe").readAttribute("src")=="")) {
|
262 |
-
if($("wait-trn-create").visible()) {
|
263 |
-
return
|
264 |
-
}
|
265 |
-
registerTransaction()
|
266 |
-
}
|
267 |
-
};
|
268 |
-
listenRBSagePay_bind=createTrn.bindAsEventListener();
|
269 |
-
listenRBSagePayServer_bind=sagePayServerAdvance.bindAsEventListener();
|
270 |
-
try {
|
271 |
-
Event.observe(window,"load", function() {
|
272 |
-
if((typeof(SAGE_PAY_VALID_INSTALL)!="undefined")&&(SAGE_PAY_VALID_INSTALL==false)) {
|
273 |
-
if(SAGE_PAY_MODE=="live") {new PeriodicalExecuter(dstrb,3)
|
274 |
-
} else {
|
275 |
-
var a='<ul class="messages"><li class="error-msg">'+SAGEPAY_SERVER_NV+"</li></ul>";
|
276 |
-
if($("checkoutSteps")) {new Insertion.Before("checkoutSteps",a)
|
277 |
-
} else {
|
278 |
-
var b=$$("div.multi-address-checkout-box");
|
279 |
-
if(b.length>0) {new Insertion.Before(b[0],a)
|
280 |
-
}
|
281 |
-
}
|
282 |
-
}
|
283 |
-
}
|
284 |
-
})
|
285 |
-
} catch(er) {
|
286 |
-
};
|
287 |
-
/* SagePay Server Integration */
|
288 |
-
|
289 |
-
/* Relaypoint integration */
|
290 |
-
function updateshipping(url) {
|
291 |
-
if ($("s_method_relaypoint_relaypoint") && $("s_method_relaypoint_relaypoint").checked) {
|
292 |
-
var radioGrp = $('checkout-shipping-method-load').select('input[name="relay-point"]');
|
293 |
-
if (radioGrp) {
|
294 |
-
for( i = 0; i < radioGrp.length; i++) {
|
295 |
-
if(radioGrp[i].checked == true) {
|
296 |
-
var radioValue = radioGrp[i].value;
|
297 |
-
}
|
298 |
-
}
|
299 |
-
} else {
|
300 |
-
if(radioValue == null) {
|
301 |
-
FC.Messenger.add(
|
302 |
-
'Vous devez choisir une adresse de livraison',
|
303 |
-
'checkout-shipping-method-load',
|
304 |
-
'error'
|
305 |
-
);
|
306 |
-
return false;
|
307 |
-
}
|
308 |
-
}
|
309 |
-
var shippingstring = new Array();
|
310 |
-
if (radioValue) {
|
311 |
-
shippingstring = radioValue.split("&&&");
|
312 |
-
} else {
|
313 |
-
FC.Messenger.add(
|
314 |
-
"Vous devez choisir une adresse de livraison",
|
315 |
-
'checkout-shipping-method-load',
|
316 |
-
'error'
|
317 |
-
);
|
318 |
-
return false;
|
319 |
-
}
|
320 |
-
// var street = shippingstring[0];
|
321 |
-
// var description = shippingstring[1];
|
322 |
-
// var postcode = shippingstring[2];
|
323 |
-
// var city = shippingstring[3];
|
324 |
-
// new Ajax.Request(url, {
|
325 |
-
// method : 'post',
|
326 |
-
// parameters : {
|
327 |
-
// street : street,
|
328 |
-
// description : description,
|
329 |
-
// postcode : postcode,
|
330 |
-
// city : city
|
331 |
-
// }
|
332 |
-
// });
|
333 |
-
}
|
334 |
-
}
|
335 |
-
/* Relaypoint integration */
|
336 |
-
|
337 |
-
/* phoenix ipayment */
|
338 |
-
function processOnepagecheckoutResponse(response) {
|
339 |
-
processResponse (response);
|
340 |
-
|
341 |
-
if (response.get('ret_status') == 'SUCCESS') {
|
342 |
-
if (response.get('paydata_bank_name'))
|
343 |
-
document.getElementById('ipayment_elv_bank_name').value = response.get('paydata_bank_name');
|
344 |
-
|
345 |
-
|
346 |
-
var formData = Form.serialize($('firecheckout-form'), true);
|
347 |
-
var params = {};
|
348 |
-
for (var i in formData) {
|
349 |
-
if (i.indexOf('payment') == 0) { // sagepay think that onestepcheckout is active if billing was supplied
|
350 |
-
params[i] = formData[i];
|
351 |
-
}
|
352 |
-
}
|
353 |
-
|
354 |
-
new Ajax.Request(
|
355 |
-
checkout.urls.payment_method,
|
356 |
-
{
|
357 |
-
method:'post',
|
358 |
-
parameters: params,
|
359 |
-
onComplete: function() {
|
360 |
-
checkout.setLoadWaiting(false);
|
361 |
-
checkout.save('', true);
|
362 |
-
}
|
363 |
-
}
|
364 |
-
);
|
365 |
-
}
|
366 |
-
}
|
367 |
-
/* phoenix ipayment */
|
368 |
-
|
369 |
-
/* Orgone fix */
|
370 |
-
var accordion = {};
|
371 |
-
accordion.openSection = function() {}
|
372 |
-
/* Orgone fix */
|
373 |
-
|
374 |
-
/* Payone integration */
|
375 |
-
if (window.payone) {
|
376 |
-
window.payone.handleResponseCreditcardCheck = function(response) {
|
377 |
-
if (response.status != 'VALID') {
|
378 |
-
// Failure
|
379 |
-
alert(response.customermessage);
|
380 |
-
checkout.setLoadWaiting(false);
|
381 |
-
return false;
|
382 |
-
}
|
383 |
-
// Success!
|
384 |
-
var pseudocardpan = response.pseudocardpan;
|
385 |
-
var truncatedcardpan = response.truncatedcardpan;
|
386 |
-
$('payone_pseudocardpan').setValue(pseudocardpan);
|
387 |
-
$('payone_truncatedcardpan').setValue(truncatedcardpan);
|
388 |
-
// $('payone_creditcard_cc_number').setValue(truncatedcardpan); // validation
|
389 |
-
cid = $('payone_creditcard_cc_cid');
|
390 |
-
if (cid != undefined) {
|
391 |
-
// $('payone_creditcard_cc_cid').setValue('')
|
392 |
-
}
|
393 |
-
checkout.setLoadWaiting(false);
|
394 |
-
checkout.save('', true); // suffix, force
|
395 |
-
// Post payment form to Magento:
|
396 |
-
// var request = new Ajax.Request(payment.saveUrl, {
|
397 |
-
// method : 'post',
|
398 |
-
// onComplete : payment.onComplete,
|
399 |
-
// onSuccess : payment.onSave,
|
400 |
-
// onFailure : checkout.ajaxFailure.bind(checkout),
|
401 |
-
// parameters : Form.serialize(payment.form)
|
402 |
-
// });
|
403 |
-
};
|
404 |
-
}
|
405 |
-
/* Payone integration */
|
406 |
-
|
407 |
-
/* Klarna integration */
|
408 |
-
document.observe('dom:loaded', function() {
|
409 |
-
if (typeof Klarna !== 'undefined') {
|
410 |
-
var FirecheckoutToKlarna = function() {
|
411 |
-
var mapping = {
|
412 |
-
'billing[firstname]': [
|
413 |
-
'payment[invoice_first_name]',
|
414 |
-
'payment[part_first_name]',
|
415 |
-
'payment[klarna_partpayment_firstname]',
|
416 |
-
'payment[klarna_invoice_firstname]'
|
417 |
-
],
|
418 |
-
'billing[lastname]': [
|
419 |
-
'payment[invoice_last_name]',
|
420 |
-
'payment[part_last_name]',
|
421 |
-
'payment[klarna_partpayment_lastname]',
|
422 |
-
'payment[klarna_invoice_lastname]'
|
423 |
-
],
|
424 |
-
'billing[street][]': [
|
425 |
-
'payment[invoice_street]',
|
426 |
-
'payment[part_street]',
|
427 |
-
'payment[klarna_partpayment_street]',
|
428 |
-
'payment[klarna_invoice_street]'
|
429 |
-
],
|
430 |
-
'billing[postcode]': [
|
431 |
-
'payment[invoice_zipcode]',
|
432 |
-
'payment[part_zipcode]',
|
433 |
-
'payment[klarna_partpayment_zipcode]',
|
434 |
-
'payment[klarna_invoice_zipcode]'
|
435 |
-
],
|
436 |
-
'billing[region]': [
|
437 |
-
'payment[invoice_city]',
|
438 |
-
'payment[part_city]',
|
439 |
-
'payment[klarna_partpayment_city]',
|
440 |
-
'payment[klarna_invoice_city]'
|
441 |
-
],
|
442 |
-
'billing[city]': [
|
443 |
-
'payment[invoice_city]',
|
444 |
-
'payment[part_city]',
|
445 |
-
'payment[klarna_partpayment_city]',
|
446 |
-
'payment[klarna_invoice_city]'
|
447 |
-
],
|
448 |
-
'billing[telephone]': [
|
449 |
-
'payment[invoice_phone_number]',
|
450 |
-
'payment[part_phone_number]',
|
451 |
-
'payment[klarna_partpayment_phonenumber]',
|
452 |
-
'payment[klarna_invoice_phonenumber]'
|
453 |
-
],
|
454 |
-
// 'billing[gender]': [
|
455 |
-
// 'payment[invoice_gender]',
|
456 |
-
// 'payment[part_gender]',
|
457 |
-
// 'payment[klarna_partpayment_gender]',
|
458 |
-
// 'payment[klarna_invoice_gender]'
|
459 |
-
// ],
|
460 |
-
'billing[day]': [
|
461 |
-
'payment[invoice_dob_day]',
|
462 |
-
'payment[part_dob_day]',
|
463 |
-
'payment[klarna_partpayment_dob_day]',
|
464 |
-
'payment[klarna_invoice_dob_day]',
|
465 |
-
],
|
466 |
-
'billing[month]': [
|
467 |
-
'payment[invoice_dob_month]',
|
468 |
-
'payment[part_dob_month]',
|
469 |
-
'payment[klarna_partpayment_dob_month]',
|
470 |
-
'payment[klarna_invoice_dob_month]',
|
471 |
-
],
|
472 |
-
'billing[year]': [
|
473 |
-
'payment[invoice_dob_year]',
|
474 |
-
'payment[part_dob_year]',
|
475 |
-
'payment[klarna_partpayment_dob_year]',
|
476 |
-
'payment[klarna_invoice_dob_year]'
|
477 |
-
]
|
478 |
-
};
|
479 |
-
var blocked = [];
|
480 |
-
|
481 |
-
for (var name in mapping) {
|
482 |
-
var el = $$('[name="' + name + '"]').first();
|
483 |
-
if (!el) {
|
484 |
-
continue;
|
485 |
-
}
|
486 |
-
el.observe('change', function() {
|
487 |
-
var i = 0,
|
488 |
-
klarnaName;
|
489 |
-
while ((klarnaName = mapping[this.readAttribute('name')][i])) {
|
490 |
-
var klarnaEl = $$('[name="' + klarnaName + '"]').first();
|
491 |
-
i++;
|
492 |
-
if (!klarnaEl) {
|
493 |
-
continue;
|
494 |
-
}
|
495 |
-
klarnaEl.setValue(this.getValue());
|
496 |
-
}
|
497 |
-
});
|
498 |
-
}
|
499 |
-
}();
|
500 |
-
}
|
501 |
-
});
|
502 |
-
/* Klarna integration */
|
503 |
-
|
504 |
-
/* phone field formatting */
|
505 |
-
//document.observe('dom:loaded', function() {
|
506 |
-
// if (typeof txtBoxFormat === 'function') {
|
507 |
-
// var ids = ['billing:telephone', 'shipping:telephone'];
|
508 |
-
// ids.each(function(id) {
|
509 |
-
// var field = $(id);
|
510 |
-
// if (field) {
|
511 |
-
// field.writeAttribute('size', 30);
|
512 |
-
// field.writeAttribute('maxlength', 15);
|
513 |
-
// field.observe('keypress', function(e) {
|
514 |
-
// txtBoxFormat(this, '(999) 9999-9999', e);
|
515 |
-
// });
|
516 |
-
// }
|
517 |
-
// });
|
518 |
-
// }
|
519 |
-
//});
|
520 |
-
/* phone field formatting */
|
521 |
-
|
522 |
-
/* Billpay integration */
|
523 |
-
function billpayGetForm() {
|
524 |
-
var form = $('firecheckout-form');
|
525 |
-
if (!form) {
|
526 |
-
form = $('gcheckout-onepage-form');
|
527 |
-
}
|
528 |
-
if (!form) {
|
529 |
-
form = $('co-payment-form');
|
530 |
-
}
|
531 |
-
|
532 |
-
return form;
|
533 |
-
};
|
534 |
-
/* Billpay integration */
|
535 |
-
|
536 |
-
/* MultiFees */
|
537 |
-
document.observe('dom:loaded', function() {
|
538 |
-
if (typeof MultiFees !== 'undefined') {
|
539 |
-
firecheckoutMultifees = function(el) {
|
540 |
-
var params = { review: 1 },
|
541 |
-
url;
|
542 |
-
if ($(el).up('#shipping-method')) {
|
543 |
-
params['is_payment_fee'] = 0;
|
544 |
-
params['is_shipping_fee'] = 1;
|
545 |
-
url = checkout.urls.shipping_method;
|
546 |
-
} else {
|
547 |
-
params['is_payment_fee'] = 1;
|
548 |
-
params['is_shipping_fee'] = 0;
|
549 |
-
url = checkout.urls.payment_method;
|
550 |
-
}
|
551 |
-
checkout.update(url, params);
|
552 |
-
};
|
553 |
-
MultiFees.labelClick = MultiFees.labelClick.wrap(function(original, el) {
|
554 |
-
if (false === original(el)) {
|
555 |
-
return;
|
556 |
-
}
|
557 |
-
firecheckoutMultifees(el);
|
558 |
-
});
|
559 |
-
MultiFees.showShipping = MultiFees.showShipping.wrap(function(original, code) {
|
560 |
-
original(code);
|
561 |
-
$('multifees_shipping_'+code) && $('multifees_shipping_'+code)
|
562 |
-
.select('input[type="checkbox"]').each(function(el) {
|
563 |
-
el.stopObserving('change');
|
564 |
-
el.observe('change', function(e) {
|
565 |
-
firecheckoutMultifees(this);
|
566 |
-
});
|
567 |
-
});
|
568 |
-
});
|
569 |
-
checkout.update(checkout.urls.shipping_method);
|
570 |
-
checkout.update(checkout.urls.payment_method);
|
571 |
-
}
|
572 |
-
});
|
573 |
-
/* MultiFees */
|
574 |
-
|
575 |
-
function hiddenOnChange(input, callback) {
|
576 |
-
var oldvalue = input.getValue();
|
577 |
-
setInterval(function(){
|
578 |
-
if (input.getValue() != oldvalue){
|
579 |
-
oldvalue = input.getValue();
|
580 |
-
callback();
|
581 |
-
}
|
582 |
-
}, 100);
|
583 |
-
}
|
584 |
-
|
585 |
-
/* infostrates tnt */
|
586 |
-
document.observe('inforstrates:shippingMethodTntCompleted', function(response) {
|
587 |
-
checkout.save('', true);
|
588 |
-
});
|
589 |
-
ShippingMethod.prototype.addObservers = ShippingMethod.prototype.addObservers.wrap(function(original) {
|
590 |
-
original();
|
591 |
-
var tntField = $('tnt_relais1');
|
592 |
-
if (tntField) {
|
593 |
-
hiddenOnChange(tntField, function() {
|
594 |
-
if (!tntField.getValue().length) {
|
595 |
-
return;
|
596 |
-
}
|
597 |
-
|
598 |
-
//41 RUE RODIER&&&PEINTURE RODIER COLOR C3071&&&75009&&&PARIS 09
|
599 |
-
var parts = tntField.getValue().split('&&&'),
|
600 |
-
keys = ['street1', 'company', 'postcode', 'city'],
|
601 |
-
input, i;
|
602 |
-
|
603 |
-
for (i in parts) {
|
604 |
-
input = $('shipping:' + keys[i]) || $('billing:' + keys[i]);
|
605 |
-
if (input) {
|
606 |
-
input.setValue(parts[i]);
|
607 |
-
}
|
608 |
-
}
|
609 |
-
|
610 |
-
var shippingCountry = $('shipping:country_id'),
|
611 |
-
billingCountry = $('billing:country_id');
|
612 |
-
if (billingCountry && shippingCountry) {
|
613 |
-
shippingCountry.setValue(billingCountry.getValue());
|
614 |
-
}
|
615 |
-
|
616 |
-
if ($('shipping:same_as_billing')) {
|
617 |
-
$('shipping:same_as_billing').checked = false;
|
618 |
-
shipping.setSameAsBilling(false);
|
619 |
-
}
|
620 |
-
|
621 |
-
reviewInfo && reviewInfo.update('shipping-address');
|
622 |
-
});
|
623 |
-
}
|
624 |
-
});
|
625 |
-
/* infostrates tnt */
|
626 |
-
|
627 |
-
/* Webtex Giftcards */
|
628 |
-
if (typeof OnepageGiftcard !== 'undefined') {
|
629 |
-
OnepageGiftcard.prototype.save = OnepageGiftcard.prototype.save.wrap(function(original) {
|
630 |
-
checkout.setLoadWaiting(true);
|
631 |
-
var request = new Ajax.Request(this.saveUrl, {
|
632 |
-
method:'post',
|
633 |
-
onComplete: this.onComplete,
|
634 |
-
onSuccess: this.onSave,
|
635 |
-
onFailure: checkout.ajaxFailure.bind(checkout),
|
636 |
-
parameters: Form.serialize(checkout.form)
|
637 |
-
});
|
638 |
-
});
|
639 |
-
OnepageGiftcard.prototype.nextStep = OnepageGiftcard.prototype.nextStep.wrap(function(original, transport) {
|
640 |
-
original(transport);
|
641 |
-
checkout.update.bind(checkout).defer(checkout.urls.shipping_method, {review: 1});
|
642 |
-
});
|
643 |
-
}
|
644 |
-
/* Webtex Giftcards */
|
645 |
-
|
646 |
-
/* Customweb_PayUnity */
|
647 |
-
if (typeof Customweb !== 'undefined') {
|
648 |
-
Customweb.CheckoutPreloadFlag = true; // disable preload functionality
|
649 |
-
}
|
650 |
-
/* Customweb_PayUnity */
|
651 |
-
|
652 |
-
/* Bpost_ShippingManager */
|
653 |
-
if (typeof bpostShippingManagerBase !== 'undefined') {
|
654 |
-
bpostShippingManagerBase.prototype.updateShippingAddress = bpostShippingManagerBase.prototype.updateShippingAddress.wrap(function(o, details) {
|
655 |
-
o(details);
|
656 |
-
checkout.update(checkout.urls.shipping_method);
|
657 |
-
});
|
658 |
-
}
|
659 |
-
/* Bpost_ShippingManager */
|
660 |
-
|
661 |
-
/* Webshopapps_Desttype */
|
662 |
-
document.observe('dom:loaded', function() {
|
663 |
-
$('billing:dest_type') && $('billing:dest_type').observe('change', function() {
|
664 |
-
checkout.update(checkout.urls.billing_address, {
|
665 |
-
'shipping-method': 1,
|
666 |
-
'review' : 1
|
667 |
-
});
|
668 |
-
});
|
669 |
-
$('shipping:dest_type') && $('shipping:dest_type').observe('change', function() {
|
670 |
-
checkout.update(checkout.urls.shipping_address, {
|
671 |
-
'shipping-method': 1,
|
672 |
-
'review' : 1
|
673 |
-
});
|
674 |
-
});
|
675 |
-
});
|
676 |
-
/* Webshopapps_Desttype */
|
677 |
-
|
678 |
-
/* AW_Storecredit */
|
679 |
-
document.observe('dom:loaded', function() {
|
680 |
-
if ($('use_storecredit')) {
|
681 |
-
$('use_storecredit').observe('click', function() {
|
682 |
-
var sections = FC.Ajax.getSectionsToUpdate('payment-method');
|
683 |
-
if (sections.length) {
|
684 |
-
checkout.update(
|
685 |
-
checkout.urls.payment_method,
|
686 |
-
FC.Ajax.arrayToJson(sections)
|
687 |
-
);
|
688 |
-
}
|
689 |
-
});
|
690 |
-
}
|
691 |
-
if (typeof storeCreditManager !== 'undefined') {
|
692 |
-
if (storeCreditManager.grandTotalInit) {
|
693 |
-
storeCreditManager.grandTotalInit();
|
694 |
-
}
|
695 |
-
if (storeCreditManager.storecreditInit()) {
|
696 |
-
storeCreditManager.storecreditInit();
|
697 |
-
}
|
698 |
-
}
|
699 |
-
});
|
700 |
-
/* AW_Storecredit */
|
701 |
-
|
702 |
-
/* TIG_PostNL deliveryoptions */
|
703 |
-
document.observe('postnl:selectOptionSaved', function() {
|
704 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
705 |
-
if (sections.length) {
|
706 |
-
checkout.update(
|
707 |
-
checkout.urls.shipping_method,
|
708 |
-
FC.Ajax.arrayToJson(sections)
|
709 |
-
);
|
710 |
-
}
|
711 |
-
});
|
712 |
-
/* TIG_PostNL deliveryoptions */
|
713 |
-
|
714 |
-
// craftyclicks postcode lookup
|
715 |
-
if (typeof CraftyPostcodeCreate !== 'undefined') {
|
716 |
-
CraftyPostcodeCreate = CraftyPostcodeCreate.wrap(function(o) {
|
717 |
-
var instance = o();
|
718 |
-
|
719 |
-
instance.populate_form_fields = instance.populate_form_fields.wrap(function(original, j) {
|
720 |
-
original(j);
|
721 |
-
|
722 |
-
var el;
|
723 |
-
if (-1 !== this.config.result_elem_id.indexOf('billing')) {
|
724 |
-
el = $('billing:country_id') || $('billing:postcode');
|
725 |
-
} else {
|
726 |
-
el = $('shipping:country_id') || $('shipping:postcode')
|
727 |
-
}
|
728 |
-
if (el) {
|
729 |
-
if (document.createEvent) {
|
730 |
-
var oEvent = document.createEvent("HTMLEvents");
|
731 |
-
oEvent.initEvent('change', true, true);
|
732 |
-
el.dispatchEvent.bind(el).delay(0.1, oEvent);
|
733 |
-
} else {
|
734 |
-
var oEvent = document.createEventObject();
|
735 |
-
setTimeout(function() {
|
736 |
-
el.fireEvent('onchange', oEvent);
|
737 |
-
}, 20);
|
738 |
-
}
|
739 |
-
}
|
740 |
-
});
|
741 |
-
|
742 |
-
return instance;
|
743 |
-
});
|
744 |
-
}
|
745 |
-
// craftyclicks postcode lookup
|
746 |
-
|
747 |
-
/* Phoenix_Wirecard Seamless see js/phoenix/wirecard_checkout_page/processing.js */
|
748 |
-
if (typeof wirecardCheckoutPageApplication !== 'undefined') {
|
749 |
-
FireCheckout.prototype.setResponse = FireCheckout.prototype.setResponse.wrap(function (next, transport) {
|
750 |
-
if (payment.currentMethod.indexOf("wirecard_checkout_page") === -1) {
|
751 |
-
next(transport);
|
752 |
-
return;
|
753 |
-
}
|
754 |
-
outerTransport = transport;
|
755 |
-
nextStep = next;
|
756 |
-
var outerResponse = eval('(' + outerTransport.responseText + ')');
|
757 |
-
if (typeof outerResponse.redirect == 'undefined') {
|
758 |
-
nextStep(outerTransport);
|
759 |
-
}
|
760 |
-
else {
|
761 |
-
var params = {'paymentMethod': payment.currentMethod};
|
762 |
-
var request = new Ajax.Request(
|
763 |
-
qmoreIsIframe,
|
764 |
-
{
|
765 |
-
method: 'get',
|
766 |
-
parameters: params,
|
767 |
-
onSuccess: function (innerTransport) {
|
768 |
-
if (innerTransport && innerTransport.responseText) {
|
769 |
-
try {
|
770 |
-
var innerResponse = eval('(' + innerTransport.responseText + ')');
|
771 |
-
var outerResponse = eval('(' + outerTransport.responseText + ')');
|
772 |
-
}
|
773 |
-
catch (e) {
|
774 |
-
innerResponse = {};
|
775 |
-
}
|
776 |
-
if (innerResponse.isIframe) {
|
777 |
-
//show iframe and set link
|
778 |
-
toggleQMoreIFrame();
|
779 |
-
$('qmore-iframe').src = outerResponse.redirect;
|
780 |
-
}
|
781 |
-
else {
|
782 |
-
nextStep(outerTransport);
|
783 |
-
}
|
784 |
-
}
|
785 |
-
},
|
786 |
-
onFailure: function (innerTransport) {
|
787 |
-
nextStep(outerTransport);
|
788 |
-
}
|
789 |
-
});
|
790 |
-
}
|
791 |
-
});
|
792 |
-
}
|
793 |
-
/* Phoenix_Wirecard Seamless */
|
794 |
-
|
795 |
-
/* HeidelpayCD_Edition */
|
796 |
-
if (typeof Heidelpay !== 'undefined') {
|
797 |
-
FireCheckout.prototype.setResponse = FireCheckout.prototype.setResponse.wrap(function (next, transport) {
|
798 |
-
if (payment.currentMethod.indexOf("hcdcc") === -1 && payment.currentMethod.indexOf("hcddc") === -1) {
|
799 |
-
next(transport);
|
800 |
-
return;
|
801 |
-
}
|
802 |
-
var response;
|
803 |
-
try {
|
804 |
-
response = transport.responseText.evalJSON();
|
805 |
-
/*
|
806 |
-
* we need to use the hcdcc_URL from the server-response (the state-value is changing)
|
807 |
-
*/
|
808 |
-
// console.log(response.update_section['payment-method']);
|
809 |
-
// console.log( $('checkout-payment-method-load') );
|
810 |
-
|
811 |
-
} catch (err) {
|
812 |
-
alert('An error has occured during request processing. Try again please');
|
813 |
-
checkout.setLoadWaiting(false);
|
814 |
-
$('review-please-wait').hide();
|
815 |
-
return false;
|
816 |
-
}
|
817 |
-
|
818 |
-
// we need to use the hcdcc_URL from the server-response (the state-value is changing) it's injected as "redirect"-URL
|
819 |
-
if (response.success && response.redirect) {
|
820 |
-
// taken from heidelpaycd.js and slightly modified
|
821 |
-
var actPayment = payment.currentMethod;
|
822 |
-
var form = new Element('form', {
|
823 |
-
style:'display:none',
|
824 |
-
action: response.redirect,
|
825 |
-
method: "POST"
|
826 |
-
});
|
827 |
-
$(document.body).insert(form);
|
828 |
-
|
829 |
-
var data = {
|
830 |
-
ACCOUNT_BRAND: $$("." + actPayment + "_ACCOUNT_BRAND")[0].value ,
|
831 |
-
ACCOUNT_NUMBER: $$("." + actPayment +"_ACCOUNT_NUMBER")[0].value,
|
832 |
-
ACCOUNT_HOLDER: $$("." + actPayment + "_ACCOUNT_HOLDER")[0].value,
|
833 |
-
ACCOUNT_EXPIRY_MONTH: $$("." + actPayment + "_ACCOUNT_EXPIRY_MONTH")[0].value,
|
834 |
-
ACCOUNT_EXPIRY_YEAR: $$("." + actPayment + "_ACCOUNT_EXPIRY_YEAR")[0].value,
|
835 |
-
ACCOUNT_VERIFICATION: $$("." + actPayment + "_ACCOUNT_VERIFICATION")[0].value
|
836 |
-
};
|
837 |
-
|
838 |
-
for ( var key in data ) {
|
839 |
-
form.insert(
|
840 |
-
{bottom: new Element(
|
841 |
-
'input',
|
842 |
-
{type: 'text', name: key.replace(/_/,"."), value: data[key] }
|
843 |
-
)}
|
844 |
-
);
|
845 |
-
|
846 |
-
};
|
847 |
-
form.submit();
|
848 |
-
// end: taken from heidelpaycd.js
|
849 |
-
} else {
|
850 |
-
next(transport);
|
851 |
-
return;
|
852 |
-
}
|
853 |
-
});
|
854 |
-
}
|
855 |
-
/* HeidelpayCD_Edition */
|
856 |
-
|
857 |
-
/* Magestore_Giftvoucher */
|
858 |
-
document.observe('giftvoucher:success', function() {
|
859 |
-
checkout.update(checkout.urls.shopping_cart);
|
860 |
-
});
|
861 |
-
/* Magestore_Giftvoucher */
|
862 |
-
|
863 |
-
/* JRD_Paczkomaty */
|
864 |
-
document.observe('firecheckout:shippingMethod:addObserversAfter', function() {
|
865 |
-
var wrapper = $('paczkomaty_dropdown_wrapper');
|
866 |
-
if (wrapper && wrapper.down('select')) {
|
867 |
-
wrapper.down('select').observe('change', function() {
|
868 |
-
checkout.update(checkout.urls.shipping_method);
|
869 |
-
});
|
870 |
-
if ($('paczkomaty_customer_telephone')) {
|
871 |
-
$('paczkomaty_customer_telephone').observe('change', function() {
|
872 |
-
checkout.update(checkout.urls.shipping_method);
|
873 |
-
});
|
874 |
-
}
|
875 |
-
}
|
876 |
-
});
|
877 |
-
/* JRD_Paczkomaty */
|
878 |
-
|
879 |
-
// Billpay
|
880 |
-
document.observe('firecheckout:paymentMethod:addObserversAfter', function() {
|
881 |
-
if (typeof billpayPaymentSelected === 'function'
|
882 |
-
&& payment.getCurrentMethod()
|
883 |
-
&& payment.getCurrentMethod().indexOf('billpay') === 0) {
|
884 |
-
|
885 |
-
billpayPaymentSelected();
|
886 |
-
}
|
887 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/firecheckout.js
DELETED
@@ -1,1601 +0,0 @@
|
|
1 |
-
var FireCheckout = Class.create();
|
2 |
-
FireCheckout.prototype = {
|
3 |
-
|
4 |
-
_requestStates: {},
|
5 |
-
|
6 |
-
initialize: function(form, urls, translations) {
|
7 |
-
this._addNumberToTitles();
|
8 |
-
|
9 |
-
this.translations = translations;
|
10 |
-
this.urls = urls;
|
11 |
-
this.form = form;
|
12 |
-
this.loadCounter = 0;
|
13 |
-
this.loadWaiting = false;
|
14 |
-
this.validator = new Validation(this.form);
|
15 |
-
|
16 |
-
payment.saveUrl = this.urls.payment_method;
|
17 |
-
|
18 |
-
this.sectionsToValidate = [
|
19 |
-
payment
|
20 |
-
];
|
21 |
-
if (typeof shippingMethod === 'object') {
|
22 |
-
this.sectionsToValidate.push(shippingMethod);
|
23 |
-
}
|
24 |
-
|
25 |
-
this._addEventListeners();
|
26 |
-
},
|
27 |
-
|
28 |
-
_addNumberToTitles: function() {
|
29 |
-
var titles = [
|
30 |
-
'#billing-address .block-title',
|
31 |
-
'#shipping-method .block-title',
|
32 |
-
'#payment-method .block-title',
|
33 |
-
'#checkout-additional .block-title',
|
34 |
-
'#checkout-review .block-title'
|
35 |
-
],
|
36 |
-
i = 0,
|
37 |
-
j = 1,
|
38 |
-
title;
|
39 |
-
|
40 |
-
while ((selector = titles[i])) {
|
41 |
-
i++;
|
42 |
-
if ((title = $$(selector)[0])) {
|
43 |
-
title.insert({
|
44 |
-
top: '<span class="num num' + (j) + '">' + (j) + '</span>'
|
45 |
-
});
|
46 |
-
j++;
|
47 |
-
}
|
48 |
-
}
|
49 |
-
},
|
50 |
-
|
51 |
-
_addEventListeners: function() {
|
52 |
-
var self = this;
|
53 |
-
|
54 |
-
$('firecheckout-login-form') && $('firecheckout-login-form').observe('submit', function(e) {
|
55 |
-
if (typeof event != 'undefined') { // ie9 fix
|
56 |
-
event.preventDefault ? event.preventDefault() : event.returnValue = false;
|
57 |
-
}
|
58 |
-
Event.stop(e);
|
59 |
-
|
60 |
-
if (!loginForm.validator.validate()) {
|
61 |
-
return false;
|
62 |
-
}
|
63 |
-
|
64 |
-
$('login-please-wait').show();
|
65 |
-
$('send2').setAttribute('disabled', 'disabled');
|
66 |
-
$$('#firecheckout-login-form .buttons-set')[0]
|
67 |
-
.addClassName('disabled')
|
68 |
-
.setOpacity(0.5);
|
69 |
-
|
70 |
-
new Ajax.Request($('firecheckout-login-form').action, {
|
71 |
-
parameters: $('firecheckout-login-form').serialize(),
|
72 |
-
onSuccess: function(transport) {
|
73 |
-
FC.Messenger.clear('firecheckout-login-form');
|
74 |
-
|
75 |
-
var response = transport.responseText.evalJSON();
|
76 |
-
if (response.error) {
|
77 |
-
FC.Messenger.add(response.error, 'firecheckout-login-form', 'error');
|
78 |
-
self.updateCaptcha('user_login');
|
79 |
-
}
|
80 |
-
if (response.redirect) {
|
81 |
-
document.location = response.redirect;
|
82 |
-
return;
|
83 |
-
}
|
84 |
-
$('login-please-wait').hide();
|
85 |
-
$('send2').removeAttribute('disabled');
|
86 |
-
$$('#firecheckout-login-form .buttons-set')[0]
|
87 |
-
.removeClassName('disabled')
|
88 |
-
.setOpacity(1);
|
89 |
-
}
|
90 |
-
});
|
91 |
-
});
|
92 |
-
|
93 |
-
$('firecheckout-forgot-password-form') && $('firecheckout-forgot-password-form').observe('submit', function(e) {
|
94 |
-
if (typeof event != 'undefined') { // ie9 fix
|
95 |
-
event.preventDefault ? event.preventDefault() : event.returnValue = false;
|
96 |
-
}
|
97 |
-
Event.stop(e);
|
98 |
-
|
99 |
-
if (!forgotForm.validator.validate()) {
|
100 |
-
return false;
|
101 |
-
}
|
102 |
-
|
103 |
-
$('forgot-please-wait').show();
|
104 |
-
$('btn-forgot').setAttribute('disabled', 'disabled');
|
105 |
-
$$('#firecheckout-forgot-password-form .buttons-set')[0]
|
106 |
-
.addClassName('disabled')
|
107 |
-
.setOpacity(0.5);
|
108 |
-
|
109 |
-
new Ajax.Request($('firecheckout-forgot-password-form').action, {
|
110 |
-
parameters: $('firecheckout-forgot-password-form').serialize(),
|
111 |
-
onSuccess: function(transport) {
|
112 |
-
FC.Messenger.clear('firecheckout-forgot-password-form');
|
113 |
-
|
114 |
-
$('forgot-please-wait').hide();
|
115 |
-
$('btn-forgot').removeAttribute('disabled');
|
116 |
-
$$('#firecheckout-forgot-password-form .buttons-set')[0]
|
117 |
-
.removeClassName('disabled')
|
118 |
-
.setOpacity(1);
|
119 |
-
|
120 |
-
var response = transport.responseText.evalJSON();
|
121 |
-
|
122 |
-
if (response.error) {
|
123 |
-
FC.Messenger.add(response.error, 'firecheckout-forgot-password-form', 'error');
|
124 |
-
self.updateCaptcha('user_forgotpassword');
|
125 |
-
} else if (response.message) {
|
126 |
-
FC.Messenger.clear('firecheckout-login-form');
|
127 |
-
FC.Messenger.add(response.message, 'firecheckout-login-form', 'success');
|
128 |
-
firecheckoutWindow.activate('login');
|
129 |
-
}
|
130 |
-
}
|
131 |
-
});
|
132 |
-
});
|
133 |
-
},
|
134 |
-
|
135 |
-
ajaxFailure: function(){
|
136 |
-
location.href = this.urls.failure;
|
137 |
-
},
|
138 |
-
|
139 |
-
_disableEnableAll: function(element, isDisabled) {
|
140 |
-
var descendants = element.descendants();
|
141 |
-
for (var k in descendants) {
|
142 |
-
descendants[k].disabled = isDisabled;
|
143 |
-
}
|
144 |
-
element.disabled = isDisabled;
|
145 |
-
},
|
146 |
-
|
147 |
-
setLoadWaiting: function(flag) {
|
148 |
-
if (flag) {
|
149 |
-
this.loadCounter++;
|
150 |
-
} else if (this.loadCounter > 0) {
|
151 |
-
this.loadCounter--;
|
152 |
-
if (this.loadCounter > 0) {
|
153 |
-
flag = true;
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
document.fire('firecheckout:setLoadWaitingBefore', {
|
158 |
-
flag: flag
|
159 |
-
});
|
160 |
-
|
161 |
-
var spinner = $('firecheckout-spinner'),
|
162 |
-
container = $('review-buttons-container');
|
163 |
-
if (flag && !spinner) {
|
164 |
-
spinner = new Element('div');
|
165 |
-
spinner.writeAttribute('id', 'firecheckout-spinner');
|
166 |
-
spinner.insert(this.translations.spinnerText);
|
167 |
-
$(document.body).insert({
|
168 |
-
bottom: spinner
|
169 |
-
});
|
170 |
-
container.addClassName('disabled');
|
171 |
-
container.setStyle({opacity:0.5});
|
172 |
-
this._disableEnableAll(container, true);
|
173 |
-
} else if (!flag && spinner) {
|
174 |
-
spinner.remove();
|
175 |
-
container.removeClassName('disabled');
|
176 |
-
container.setStyle({opacity:1});
|
177 |
-
this._disableEnableAll(container, false);
|
178 |
-
}
|
179 |
-
this.loadWaiting = flag;
|
180 |
-
},
|
181 |
-
|
182 |
-
setLoadingField: function(field, flag) {
|
183 |
-
document.fire('firecheckout:setLoadingFieldBefore', {
|
184 |
-
field: field,
|
185 |
-
flag: flag
|
186 |
-
});
|
187 |
-
|
188 |
-
var fieldOuterHeight = field.getHeight(),
|
189 |
-
offset = field.positionedOffset(),
|
190 |
-
inputBox = field.up('.input-box');
|
191 |
-
|
192 |
-
if (false === flag) {
|
193 |
-
inputBox.removeClassName('loading');
|
194 |
-
var spinner = inputBox.down('.field-spinner-wrapper');
|
195 |
-
if (spinner) {
|
196 |
-
spinner.remove();
|
197 |
-
}
|
198 |
-
} else {
|
199 |
-
inputBox.addClassName('loading');
|
200 |
-
field.insert({
|
201 |
-
after: '<div class="field-spinner-wrapper"><div class="loader"></div></div>'
|
202 |
-
});
|
203 |
-
var left = 'auto',
|
204 |
-
right = fieldOuterHeight / 5;
|
205 |
-
if (field.tagName === 'SELECT') {
|
206 |
-
right += 17; /* gap for trigger */
|
207 |
-
}
|
208 |
-
right = Math.round(right) + 'px';
|
209 |
-
|
210 |
-
if (this.isRtl()) {
|
211 |
-
left = right;
|
212 |
-
right = 'auto';
|
213 |
-
}
|
214 |
-
inputBox.down('.field-spinner-wrapper').setStyle({
|
215 |
-
top: Math.round(offset.top + fieldOuterHeight / 2) + 'px',
|
216 |
-
right: right,
|
217 |
-
left: left
|
218 |
-
});
|
219 |
-
}
|
220 |
-
},
|
221 |
-
|
222 |
-
isRtl: function() {
|
223 |
-
return document.dir === 'rtl' || document.body.dir === 'rtl';
|
224 |
-
},
|
225 |
-
|
226 |
-
setLoadingButton: function(button, flag) {
|
227 |
-
if (false === flag) {
|
228 |
-
button.removeClassName('loading').enable();
|
229 |
-
// button.down('.field-spinner-wrapper').remove();
|
230 |
-
} else {
|
231 |
-
button.addClassName('loading').disable();
|
232 |
-
// to use this feature, need to be sure about button styles
|
233 |
-
// to safely change button paddings
|
234 |
-
// button.insert({
|
235 |
-
// bottom: '<div class="field-spinner-wrapper"><div class="loader"></div></div>'
|
236 |
-
// });
|
237 |
-
}
|
238 |
-
},
|
239 |
-
|
240 |
-
validate: function() {
|
241 |
-
var isValid = true;
|
242 |
-
|
243 |
-
if (!this.validator.validate()) {
|
244 |
-
isValid = false;
|
245 |
-
}
|
246 |
-
|
247 |
-
for (var i in this.sectionsToValidate) {
|
248 |
-
if (typeof this.sectionsToValidate[i] === 'function') {
|
249 |
-
continue;
|
250 |
-
}
|
251 |
-
if (!this.sectionsToValidate[i].validate()) {
|
252 |
-
isValid = false;
|
253 |
-
}
|
254 |
-
}
|
255 |
-
FC.Messenger.clear('agreements-wrapper');
|
256 |
-
$$('.checkout-agreements input[type="checkbox"]').each(function(el) {
|
257 |
-
if (!el.checked) {
|
258 |
-
FC.Messenger.add(this.translations.acceptAgreementText, 'agreements-wrapper', 'error');
|
259 |
-
isValid = false;
|
260 |
-
throw $break;
|
261 |
-
}
|
262 |
-
}.bind(this));
|
263 |
-
|
264 |
-
// var taxvatField = $('billing:taxvat');
|
265 |
-
// if (taxvatField && taxvatField.value.length) {
|
266 |
-
// if (!FC.Taxvat.isValid(taxvatField.value, $('billing:country_id').value)) {
|
267 |
-
// taxvatField.addClassName('validation-failed')
|
268 |
-
// isValid = false;
|
269 |
-
// }
|
270 |
-
// }
|
271 |
-
|
272 |
-
if (!isValid) {
|
273 |
-
// scroll to error
|
274 |
-
var validationMessages = $$('.validation-advice, .messages').findAll(function(el) {
|
275 |
-
return el.visible();
|
276 |
-
});
|
277 |
-
if (!validationMessages.length) {
|
278 |
-
return isValid;
|
279 |
-
}
|
280 |
-
|
281 |
-
var viewportSize = document.viewport.getDimensions();
|
282 |
-
var needToScroll = false;
|
283 |
-
|
284 |
-
validationMessages.each(function(el) {
|
285 |
-
var offset = el.viewportOffset();
|
286 |
-
if (offset.top < 0 || offset.top > viewportSize.height
|
287 |
-
|| offset.left < 0 || offset.left > viewportSize.width) {
|
288 |
-
|
289 |
-
needToScroll = true;
|
290 |
-
throw $break;
|
291 |
-
}
|
292 |
-
});
|
293 |
-
|
294 |
-
if (needToScroll) {
|
295 |
-
var scrollTo = validationMessages[0];
|
296 |
-
if (validationMessages[0].up('.field')) {
|
297 |
-
scrollTo = validationMessages[0].up('.field');
|
298 |
-
}
|
299 |
-
Effect.ScrollTo(scrollTo, {
|
300 |
-
duration: '0.5',
|
301 |
-
// offset: -20
|
302 |
-
});
|
303 |
-
}
|
304 |
-
}
|
305 |
-
return isValid;
|
306 |
-
},
|
307 |
-
|
308 |
-
save: function(urlSuffix, forceSave) {
|
309 |
-
if (this.loadWaiting != false) {
|
310 |
-
return;
|
311 |
-
}
|
312 |
-
|
313 |
-
if (!this.validate()) {
|
314 |
-
return;
|
315 |
-
}
|
316 |
-
|
317 |
-
if (payment.currentMethod) {
|
318 |
-
// stripe integration
|
319 |
-
if (!forceSave && payment.currentMethod.indexOf("stripe") === 0) {
|
320 |
-
if ('undefined' !== typeof createStripeToken) {
|
321 |
-
// createStripeToken(); // Stripe
|
322 |
-
} else {
|
323 |
-
payment.save(); // TemplateTag_Stripe
|
324 |
-
}
|
325 |
-
return;
|
326 |
-
}
|
327 |
-
// stripe integration
|
328 |
-
|
329 |
-
// payone integration
|
330 |
-
if (!forceSave && payment.currentMethod.indexOf("payone_") === 0) {
|
331 |
-
payment.save();
|
332 |
-
return;
|
333 |
-
}
|
334 |
-
// payone integration
|
335 |
-
|
336 |
-
// phoenix ipayment integration
|
337 |
-
if (!forceSave && payment.currentMethod.indexOf("ipayment_") === 0) {
|
338 |
-
payment.save();
|
339 |
-
return;
|
340 |
-
}
|
341 |
-
// phoenix ipayment integration
|
342 |
-
|
343 |
-
// orgone integration
|
344 |
-
if (!forceSave && payment.currentMethod.indexOf("ops_") === 0) {
|
345 |
-
payment.save();
|
346 |
-
return;
|
347 |
-
}
|
348 |
-
// orgone integration
|
349 |
-
|
350 |
-
// paymill integration
|
351 |
-
if (!forceSave && payment.currentMethod.indexOf("paymill") === 0) {
|
352 |
-
if (typeof paymill_onestep_cc !== 'undefined') {
|
353 |
-
paymill_onestep_cc(function() {
|
354 |
-
checkout.save('', true);
|
355 |
-
});
|
356 |
-
return;
|
357 |
-
}
|
358 |
-
}
|
359 |
-
// paymill integration
|
360 |
-
|
361 |
-
// phoenix_wirecard
|
362 |
-
if (!forceSave && payment.currentMethod.indexOf("wirecard_checkout_page") === 0) {
|
363 |
-
payment.save();
|
364 |
-
return;
|
365 |
-
}
|
366 |
-
// phoenix_wirecard
|
367 |
-
}
|
368 |
-
|
369 |
-
// infostrates tnt
|
370 |
-
if (!forceSave && (typeof shippingMethod === 'object')
|
371 |
-
&& shippingMethod.getCurrentMethod().indexOf("tnt_") === 0
|
372 |
-
&& typeof shippingMethodTnt !== 'undefined') {
|
373 |
-
|
374 |
-
shippingMethodTnt(shippingMethodTntUrl);
|
375 |
-
return;
|
376 |
-
}
|
377 |
-
// infostrates tnt
|
378 |
-
|
379 |
-
checkout.setLoadWaiting(true);
|
380 |
-
var params = Form.serialize(this.form, true);
|
381 |
-
$('review-please-wait').show();
|
382 |
-
|
383 |
-
// braintree integration
|
384 |
-
if (payment.currentMethod && "braintree" === payment.currentMethod) {
|
385 |
-
if (typeof braintree !== 'undefined') {
|
386 |
-
$('payment_form_braintree').select('input, select').each(function(element) {
|
387 |
-
if (element.readAttribute('data-encrypt') === 'true') {
|
388 |
-
params[element.readAttribute('name')] = braintree.encrypt(element.value);
|
389 |
-
} else if (element.readAttribute('data-encrypted-name')) {
|
390 |
-
params[element.readAttribute('data-encrypted-name')] = braintree.encrypt(element.value);
|
391 |
-
}
|
392 |
-
});
|
393 |
-
}
|
394 |
-
}
|
395 |
-
// braintree integration
|
396 |
-
|
397 |
-
urlSuffix = urlSuffix || '';
|
398 |
-
var request = new Ajax.Request(this.urls.save + urlSuffix, {
|
399 |
-
method:'post',
|
400 |
-
parameters:params,
|
401 |
-
onSuccess: this.setResponse.bind(this),
|
402 |
-
onFailure: this.ajaxFailure.bind(this)
|
403 |
-
});
|
404 |
-
},
|
405 |
-
|
406 |
-
/**
|
407 |
-
* @param {String} url
|
408 |
-
* @param {Object} params
|
409 |
-
* @param {Function} callback
|
410 |
-
* @return {false|undefined} Returns false if request was not sent
|
411 |
-
*/
|
412 |
-
update: function(url, params, callback) {
|
413 |
-
var self = this;
|
414 |
-
if (self._requestStates[url]) {
|
415 |
-
// prevent multiple requests when using form autofill
|
416 |
-
return false;
|
417 |
-
}
|
418 |
-
self._requestStates[url] = true;
|
419 |
-
|
420 |
-
var parameters = $(this.form).serialize(true);
|
421 |
-
|
422 |
-
if (typeof url == 'object') {
|
423 |
-
params = url;
|
424 |
-
url = this.urls.update;
|
425 |
-
}
|
426 |
-
for (var i in params) {
|
427 |
-
parameters[i] = params[i];
|
428 |
-
if (!params[i]) {
|
429 |
-
continue;
|
430 |
-
}
|
431 |
-
var el = $('checkout-' + i + '-load');
|
432 |
-
if (!el) {
|
433 |
-
el = $$('.checkout-' + i + '-load').first();
|
434 |
-
}
|
435 |
-
if (el) {
|
436 |
-
el.addClassName('updating');
|
437 |
-
}
|
438 |
-
}
|
439 |
-
checkout.setLoadWaiting(true);
|
440 |
-
var request = new Ajax.Request(url, {
|
441 |
-
method: 'post',
|
442 |
-
onSuccess: function(response) {
|
443 |
-
self._requestStates[url] = false;
|
444 |
-
if (typeof callback === 'function') {
|
445 |
-
callback(response);
|
446 |
-
}
|
447 |
-
self.setResponse(response);
|
448 |
-
},
|
449 |
-
onFailure: function(response) {
|
450 |
-
self._requestStates[url] = false;
|
451 |
-
if (typeof callback === 'function') {
|
452 |
-
callback(response);
|
453 |
-
}
|
454 |
-
self.ajaxFailure(response);
|
455 |
-
},
|
456 |
-
parameters: parameters
|
457 |
-
});
|
458 |
-
},
|
459 |
-
|
460 |
-
saveField: function(field, url, params, callback) {
|
461 |
-
var self = this;
|
462 |
-
self.setLoadingField(field);
|
463 |
-
var result = this.update(url, params, callback);
|
464 |
-
if (false === result) {
|
465 |
-
self.setLoadingField(field, false);
|
466 |
-
}
|
467 |
-
},
|
468 |
-
|
469 |
-
updateCaptcha: function(id) {
|
470 |
-
var captchaEl = $(id);
|
471 |
-
if (captchaEl && captchaEl.captcha) {
|
472 |
-
captchaEl.captcha.refresh(captchaEl.previous('img.captcha-reload'));
|
473 |
-
// try to focus input element:
|
474 |
-
var inputEl = $('captcha_' + id);
|
475 |
-
if (inputEl) {
|
476 |
-
inputEl.focus();
|
477 |
-
}
|
478 |
-
}
|
479 |
-
},
|
480 |
-
|
481 |
-
setResponse: function(response){
|
482 |
-
var reponseUrl = response.transport.responseURL;
|
483 |
-
try {
|
484 |
-
response = response.responseText.evalJSON();
|
485 |
-
document.fire('firecheckout:setResponseBefore', {
|
486 |
-
response: response,
|
487 |
-
url: reponseUrl
|
488 |
-
});
|
489 |
-
} catch (err) {
|
490 |
-
alert('An error has occured during request processing. Try again please');
|
491 |
-
checkout.setLoadWaiting(false);
|
492 |
-
$('review-please-wait').hide();
|
493 |
-
return false;
|
494 |
-
}
|
495 |
-
|
496 |
-
if (response.redirect) {
|
497 |
-
location.href = response.redirect;
|
498 |
-
return true;
|
499 |
-
}
|
500 |
-
|
501 |
-
if (response.success) {
|
502 |
-
window.location = this.urls.success;
|
503 |
-
return;
|
504 |
-
} else {
|
505 |
-
if (response.captcha) {
|
506 |
-
this.updateCaptcha(response.captcha);
|
507 |
-
}
|
508 |
-
if (response.error_messages) {
|
509 |
-
var msg = response.error_messages;
|
510 |
-
if (typeof(msg) == 'object') {
|
511 |
-
msg = msg.join("\n");
|
512 |
-
}
|
513 |
-
alert(msg);
|
514 |
-
} else if (response.message) {
|
515 |
-
var msg = response.message;
|
516 |
-
if (typeof(msg) == 'object') {
|
517 |
-
msg = msg.join("\n");
|
518 |
-
}
|
519 |
-
alert(msg);
|
520 |
-
}
|
521 |
-
}
|
522 |
-
|
523 |
-
checkout.setLoadWaiting(false);
|
524 |
-
$('review-please-wait').hide();
|
525 |
-
|
526 |
-
if (response.update_section) {
|
527 |
-
if (response.update_section.name && response.update_section.html) {
|
528 |
-
// standard magento response
|
529 |
-
response.update_section[response.update_section.name] = response.update_section.html;
|
530 |
-
delete response.update_section.name;
|
531 |
-
delete response.update_section.html;
|
532 |
-
}
|
533 |
-
for (var i in response.update_section) {
|
534 |
-
var el = $('checkout-' + i + '-load');
|
535 |
-
if (!el) {
|
536 |
-
el = $$('.checkout-' + i + '-load').first();
|
537 |
-
}
|
538 |
-
if (el) {
|
539 |
-
var data = {};
|
540 |
-
el.select('input, select').each(function(input) {
|
541 |
-
if (input.type === 'hidden') {
|
542 |
-
// tnt_infostrates fix for hidden inputs
|
543 |
-
if (input.up('#tnt_cp')) {
|
544 |
-
return;
|
545 |
-
}
|
546 |
-
// subscribepro fix for hidden inputs
|
547 |
-
if (input.up('#payment_form_subscribe_pro')) {
|
548 |
-
return;
|
549 |
-
}
|
550 |
-
}
|
551 |
-
|
552 |
-
if ('radio' == input.type || 'checkbox' == input.type) {
|
553 |
-
data[input.id] = input.checked;
|
554 |
-
} else {
|
555 |
-
data[input.id] = input.getValue();
|
556 |
-
}
|
557 |
-
});
|
558 |
-
|
559 |
-
el.update(response.update_section[i]).removeClassName('updating');
|
560 |
-
|
561 |
-
if (i == 'coupon-discount' || i == 'giftcard') {
|
562 |
-
continue;
|
563 |
-
}
|
564 |
-
|
565 |
-
for (var j in data) {
|
566 |
-
if (!j) {
|
567 |
-
continue;
|
568 |
-
}
|
569 |
-
var input = el.down('#' + j);
|
570 |
-
if (input) {
|
571 |
-
if ('radio' == input.type || 'checkbox' == input.type) {
|
572 |
-
input.checked = data[j];
|
573 |
-
} else {
|
574 |
-
input.setValue(data[j]);
|
575 |
-
}
|
576 |
-
}
|
577 |
-
}
|
578 |
-
}
|
579 |
-
|
580 |
-
if (i === 'shipping-method' && typeof shippingMethod !== 'undefined') {
|
581 |
-
shippingMethod.addObservers();
|
582 |
-
} else if (i === 'review') {
|
583 |
-
this.addCartObservers();
|
584 |
-
}
|
585 |
-
}
|
586 |
-
}
|
587 |
-
|
588 |
-
if (response.method) {
|
589 |
-
if ('centinel' == response.method) {
|
590 |
-
this.showCentinel();
|
591 |
-
} else if (0 === response.method.indexOf('billsafe')) {
|
592 |
-
lpg.open();
|
593 |
-
var form = $('firecheckout-form');
|
594 |
-
form.action = BILLSAFE_FORM_ACTION;
|
595 |
-
form.submit();
|
596 |
-
}
|
597 |
-
|
598 |
-
// SagePay Server Integration
|
599 |
-
// else if ('sagepayserver' === response.method) {
|
600 |
-
// var revertStyles = function(el) {
|
601 |
-
// el.setStyle({
|
602 |
-
// height: '500px'
|
603 |
-
// });
|
604 |
-
// };
|
605 |
-
// $('sage-pay-server-iframe').observe('load', function() {
|
606 |
-
// $$('.d-sh-tl, .d-sh-tr').each(function(el) {
|
607 |
-
// el.setStyle({
|
608 |
-
// height: 'auto'
|
609 |
-
// });
|
610 |
-
// revertStyles.delay(0.03, el);
|
611 |
-
// });
|
612 |
-
// });
|
613 |
-
// sgps_placeOrder();
|
614 |
-
// }
|
615 |
-
// End of SagePay Server Integration
|
616 |
-
}
|
617 |
-
|
618 |
-
if (response.popup) {
|
619 |
-
this.showPopup(response.popup);
|
620 |
-
} else if (response.afterform) {
|
621 |
-
$('firecheckout-form').insert({
|
622 |
-
after: response.afterform.content
|
623 |
-
});
|
624 |
-
} else if (response.body) {
|
625 |
-
$(document.body).insert({
|
626 |
-
'bottom': response.body.content
|
627 |
-
});
|
628 |
-
}
|
629 |
-
|
630 |
-
// ogone fix
|
631 |
-
if (payment.toggleOpsCcInputs) {
|
632 |
-
payment.toggleOpsCcInputs();
|
633 |
-
}
|
634 |
-
// ogone fix
|
635 |
-
|
636 |
-
document.fire('firecheckout:setResponseAfter', {
|
637 |
-
response: response,
|
638 |
-
url: reponseUrl
|
639 |
-
});
|
640 |
-
|
641 |
-
return false;
|
642 |
-
},
|
643 |
-
|
644 |
-
showPopup: function(popup) {
|
645 |
-
var id = 'firecheckout-window-' + popup.id,
|
646 |
-
cnt = $(id);
|
647 |
-
if (!cnt) {
|
648 |
-
cnt = new Element('div');
|
649 |
-
cnt.writeAttribute('id', id);
|
650 |
-
cnt.hide();
|
651 |
-
}
|
652 |
-
cnt.update(popup.content);
|
653 |
-
|
654 |
-
|
655 |
-
if (popup.window) {
|
656 |
-
var wnd = new FC.Window(popup.window);
|
657 |
-
} else {
|
658 |
-
var wnd = firecheckoutWindow;
|
659 |
-
}
|
660 |
-
|
661 |
-
var oldContent = wnd.content.down();
|
662 |
-
oldContent && $(document.body).insert(oldContent.hide());
|
663 |
-
wnd.update(cnt)
|
664 |
-
.setModal(popup.modal)
|
665 |
-
.show();
|
666 |
-
},
|
667 |
-
|
668 |
-
showCentinel: function() {
|
669 |
-
var oldContent = firecheckoutWindow.content.down();
|
670 |
-
oldContent && $(document.body).insert(oldContent.hide());
|
671 |
-
firecheckoutWindow
|
672 |
-
.update($('checkout-centinel-iframe-load').show())
|
673 |
-
.show();
|
674 |
-
},
|
675 |
-
|
676 |
-
addCartObservers: function() {
|
677 |
-
fireCart.initialize();
|
678 |
-
},
|
679 |
-
|
680 |
-
gotoSection: function(){},
|
681 |
-
reloadProgressBlock: function(){}
|
682 |
-
};
|
683 |
-
|
684 |
-
// billing
|
685 |
-
var Billing = Class.create();
|
686 |
-
Billing.prototype = {
|
687 |
-
save: function() {
|
688 |
-
checkout.update(checkout.urls.billing_address);
|
689 |
-
},
|
690 |
-
|
691 |
-
initialize: function(){
|
692 |
-
var self = this;
|
693 |
-
|
694 |
-
var functions = {};
|
695 |
-
var _fields = FC.Ajax.getSaveTriggers('billing', 'shipping'),
|
696 |
-
fields = [];
|
697 |
-
// clean duplicates
|
698 |
-
_fields.each(function(selector) {
|
699 |
-
var s = selector.replace(/shipping/g, 'billing');
|
700 |
-
var skip = fields.detect(function(_selector) {
|
701 |
-
return _selector === s;
|
702 |
-
});
|
703 |
-
if (!skip) {
|
704 |
-
fields.push(selector);
|
705 |
-
}
|
706 |
-
});
|
707 |
-
fields.concat(['billing-address-select']).each(function(selector) {
|
708 |
-
selector = selector.replace(/shipping/g, 'billing');
|
709 |
-
if (selector === 'billing:street') {
|
710 |
-
selector = '[name="billing[street][]"]';
|
711 |
-
}
|
712 |
-
|
713 |
-
if (selector[0].match(/[a-zA-Z0-9_]/)) {
|
714 |
-
field = $(selector);
|
715 |
-
if (field) {
|
716 |
-
field = [field];
|
717 |
-
} else {
|
718 |
-
field = [];
|
719 |
-
}
|
720 |
-
} else {
|
721 |
-
field = $$(selector);
|
722 |
-
}
|
723 |
-
if (field.length) {
|
724 |
-
field.each(function(_field) {
|
725 |
-
_field.observe('change', function() {
|
726 |
-
var sections,
|
727 |
-
sameAsBilling = $('shipping:same_as_billing');
|
728 |
-
|
729 |
-
if (!sameAsBilling || (sameAsBilling && sameAsBilling.checked)) {
|
730 |
-
sections = FC.Ajax.getSectionsToUpdate('billing', 'shipping');
|
731 |
-
} else {
|
732 |
-
sections = FC.Ajax.getSectionsToUpdate('billing');
|
733 |
-
}
|
734 |
-
|
735 |
-
if (functions[_field.id]) {
|
736 |
-
functions[_field.id]();
|
737 |
-
}
|
738 |
-
if (sections.length) {
|
739 |
-
// give some time to update another fields in case
|
740 |
-
// of some autocompleter
|
741 |
-
checkout.saveField.bind(checkout).delay(
|
742 |
-
0.2,
|
743 |
-
_field,
|
744 |
-
checkout.urls.billing_address,
|
745 |
-
FC.Ajax.arrayToJson(sections),
|
746 |
-
checkout.setLoadingField.bind(checkout, _field, false)
|
747 |
-
);
|
748 |
-
}
|
749 |
-
});
|
750 |
-
});
|
751 |
-
}
|
752 |
-
});
|
753 |
-
|
754 |
-
// TIG_PostNL
|
755 |
-
// if ($('virtual:billing:street2')) {
|
756 |
-
// $('virtual:billing:street2').observe('change', function() {
|
757 |
-
// var sections,
|
758 |
-
// sameAsBilling = $('shipping:same_as_billing');
|
759 |
-
|
760 |
-
// if (!sameAsBilling || (sameAsBilling && sameAsBilling.checked)) {
|
761 |
-
// sections = FC.Ajax.getSectionsToUpdate('billing', 'shipping');
|
762 |
-
// } else {
|
763 |
-
// sections = FC.Ajax.getSectionsToUpdate('billing');
|
764 |
-
// }
|
765 |
-
|
766 |
-
// if (sections.length) {
|
767 |
-
// checkout.update.bind(checkout).delay(
|
768 |
-
// 0.1,
|
769 |
-
// checkout.urls.billing_address,
|
770 |
-
// FC.Ajax.arrayToJson(sections)
|
771 |
-
// );
|
772 |
-
// }
|
773 |
-
// });
|
774 |
-
// }
|
775 |
-
// TIG_PostNL
|
776 |
-
|
777 |
-
var createAccount = $('billing:register_account');
|
778 |
-
this.setCreateAccount(createAccount ? createAccount.checked : 1); // create account if checkbox is missing
|
779 |
-
},
|
780 |
-
|
781 |
-
newAddress: function(isNew){
|
782 |
-
if (isNew) {
|
783 |
-
this.resetSelectedAddress();
|
784 |
-
Element.show('billing-new-address-form');
|
785 |
-
} else {
|
786 |
-
Element.hide('billing-new-address-form');
|
787 |
-
}
|
788 |
-
},
|
789 |
-
|
790 |
-
resetSelectedAddress: function(){
|
791 |
-
var selectElement = $('billing-address-select');
|
792 |
-
if (selectElement) {
|
793 |
-
selectElement.value='';
|
794 |
-
}
|
795 |
-
var form = $('billing-new-address-form');
|
796 |
-
if (form) {
|
797 |
-
form.select('input[type="text"], select, textarea').each(function(el) {
|
798 |
-
if (el.id.indexOf('country_id') > -1 || el.id.indexOf('region_id') > -1) {
|
799 |
-
// keep default values in the country and state elements
|
800 |
-
return;
|
801 |
-
}
|
802 |
-
el.setValue('');
|
803 |
-
});
|
804 |
-
}
|
805 |
-
},
|
806 |
-
|
807 |
-
setCreateAccount: function(flag) {
|
808 |
-
var password = $('register-customer-password');
|
809 |
-
if (flag) {
|
810 |
-
if (password) {
|
811 |
-
password.show();
|
812 |
-
// Effect.SlideDown(password, { duration: 0.3 });
|
813 |
-
}
|
814 |
-
$(document.body).fire('login:setMethod', {method : 'register'});
|
815 |
-
} else {
|
816 |
-
if (password) {
|
817 |
-
password.hide();
|
818 |
-
// Effect.SlideUp(password, { duration: 0.3 });
|
819 |
-
}
|
820 |
-
$(document.body).fire('login:setMethod', {method : 'guest'});
|
821 |
-
}
|
822 |
-
}
|
823 |
-
};
|
824 |
-
|
825 |
-
// shipping
|
826 |
-
var Shipping = Class.create();
|
827 |
-
Shipping.prototype = {
|
828 |
-
save: function() {
|
829 |
-
checkout.update(checkout.urls.shipping_address);
|
830 |
-
},
|
831 |
-
|
832 |
-
initialize: function(form) {
|
833 |
-
this.form = form;
|
834 |
-
if ($('shipping:same_as_billing') && $('shipping:same_as_billing').checked) {
|
835 |
-
$('billing:use_for_shipping').value = 1;
|
836 |
-
}
|
837 |
-
|
838 |
-
var functions = {};
|
839 |
-
var fields = FC.Ajax.getSaveTriggers('shipping');
|
840 |
-
fields.concat(['shipping-address-select']).each(function(selector) {
|
841 |
-
if (selector === 'shipping:street') {
|
842 |
-
selector = '[name="shipping[street][]"]';
|
843 |
-
}
|
844 |
-
|
845 |
-
if (selector[0].match(/[a-zA-Z0-9_]/)) {
|
846 |
-
field = $(selector);
|
847 |
-
if (field) {
|
848 |
-
field = [field];
|
849 |
-
} else {
|
850 |
-
field = [];
|
851 |
-
}
|
852 |
-
// if (relatedFields[selector]) {
|
853 |
-
// var relatedField = $(relatedFields[selector]);
|
854 |
-
// if (relatedField) {
|
855 |
-
// field.push(relatedField);
|
856 |
-
// }
|
857 |
-
// }
|
858 |
-
} else {
|
859 |
-
field = $$(selector);
|
860 |
-
}
|
861 |
-
if (field.length) {
|
862 |
-
field.each(function(_field) {
|
863 |
-
_field.observe('change', function() {
|
864 |
-
if (functions[_field.id]) {
|
865 |
-
functions[_field.id]();
|
866 |
-
}
|
867 |
-
if ($('shipping:same_as_billing') && $('shipping:same_as_billing').checked) {
|
868 |
-
return;
|
869 |
-
}
|
870 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping');
|
871 |
-
if (sections.length) {
|
872 |
-
// give some time to update another fields in case
|
873 |
-
// of some autocompleter
|
874 |
-
checkout.saveField.bind(checkout).delay(
|
875 |
-
0.2,
|
876 |
-
_field,
|
877 |
-
checkout.urls.shipping_address,
|
878 |
-
FC.Ajax.arrayToJson(sections),
|
879 |
-
checkout.setLoadingField.bind(checkout, _field, false)
|
880 |
-
);
|
881 |
-
}
|
882 |
-
});
|
883 |
-
});
|
884 |
-
}
|
885 |
-
});
|
886 |
-
|
887 |
-
// TIG_PostNL
|
888 |
-
// if ($('virtual:shipping:street2')) {
|
889 |
-
// $('virtual:shipping:street2').observe('change', function() {
|
890 |
-
// var sections = FC.Ajax.getSectionsToUpdate('shipping');
|
891 |
-
// if (sections.length) {
|
892 |
-
// checkout.update.bind(checkout).delay(
|
893 |
-
// 0.1,
|
894 |
-
// checkout.urls.shipping_address,
|
895 |
-
// FC.Ajax.arrayToJson(sections)
|
896 |
-
// );
|
897 |
-
// }
|
898 |
-
// });
|
899 |
-
// }
|
900 |
-
// TIG_PostNL
|
901 |
-
},
|
902 |
-
|
903 |
-
newAddress: function(isNew) {
|
904 |
-
if (isNew) {
|
905 |
-
this.resetSelectedAddress();
|
906 |
-
Element.show('shipping-new-address-form');
|
907 |
-
} else {
|
908 |
-
Element.hide('shipping-new-address-form');
|
909 |
-
}
|
910 |
-
},
|
911 |
-
|
912 |
-
resetSelectedAddress: function() {
|
913 |
-
var selectElement = $('shipping-address-select');
|
914 |
-
if (selectElement) {
|
915 |
-
selectElement.value = '';
|
916 |
-
}
|
917 |
-
var form = $('shipping-new-address-form');
|
918 |
-
if (form) {
|
919 |
-
form.select('input[type="text"], select, textarea').each(function(el) {
|
920 |
-
if (el.id.indexOf('country_id') > -1 || el.id.indexOf('region_id') > -1) {
|
921 |
-
// keep default values in the country and state elements
|
922 |
-
return;
|
923 |
-
}
|
924 |
-
el.setValue('');
|
925 |
-
});
|
926 |
-
}
|
927 |
-
},
|
928 |
-
|
929 |
-
setSameAsBilling: function(flag) {
|
930 |
-
$('shipping:same_as_billing').checked = flag;
|
931 |
-
$('billing:use_for_shipping').value = flag ? 1 : 0;
|
932 |
-
// this.syncWithBilling();
|
933 |
-
|
934 |
-
if (FC.Ajax.getSaveTriggers('shipping') && typeof checkout !== 'undefined') {
|
935 |
-
var url = flag ? checkout.urls.billing_address : checkout.urls.shipping_address,
|
936 |
-
sections = FC.Ajax.getSectionsToUpdate('shipping');
|
937 |
-
|
938 |
-
if (sections.length) {
|
939 |
-
checkout.update(url, FC.Ajax.arrayToJson(sections));
|
940 |
-
}
|
941 |
-
}
|
942 |
-
|
943 |
-
if (flag) {
|
944 |
-
$('shipping-address').hide();
|
945 |
-
} else {
|
946 |
-
$('shipping-address').show();
|
947 |
-
|
948 |
-
// crafty clicks fix
|
949 |
-
if (typeof _cp_instances !== 'undefined' && _cp_instances.length) {
|
950 |
-
var el = $('shipping:country_id');
|
951 |
-
if (el) {
|
952 |
-
if (document.createEvent) {
|
953 |
-
var oEvent = document.createEvent("HTMLEvents");
|
954 |
-
oEvent.initEvent('change', true, true);
|
955 |
-
el.dispatchEvent(oEvent);
|
956 |
-
} else {
|
957 |
-
var oEvent = document.createEventObject();
|
958 |
-
el.fireEvent('onchange', oEvent);
|
959 |
-
}
|
960 |
-
}
|
961 |
-
}
|
962 |
-
// crafty clicks fix
|
963 |
-
}
|
964 |
-
},
|
965 |
-
|
966 |
-
syncWithBilling: function () {
|
967 |
-
$('billing-address-select') && this.newAddress(!$('billing-address-select').value);
|
968 |
-
// $('shipping:same_as_billing').checked = true;
|
969 |
-
// $('billing:use_for_shipping').value = 1;
|
970 |
-
if (!$('billing-address-select') || !$('billing-address-select').value) {
|
971 |
-
arrElements = $('shipping-address').select('input,select');
|
972 |
-
for (var elemIndex in arrElements) {
|
973 |
-
if (arrElements[elemIndex].id) {
|
974 |
-
var sourceField = $(arrElements[elemIndex].id.replace(/^shipping:/, 'billing:'));
|
975 |
-
if (sourceField){
|
976 |
-
arrElements[elemIndex].value = sourceField.value;
|
977 |
-
}
|
978 |
-
}
|
979 |
-
}
|
980 |
-
//$('shipping:country_id').value = $('billing:country_id').value;
|
981 |
-
shippingRegionUpdater.update();
|
982 |
-
$('shipping:region_id').value = $('billing:region_id').value;
|
983 |
-
$('shipping:region').value = $('billing:region').value;
|
984 |
-
//shippingForm.elementChildLoad($('shipping:country_id'), this.setRegionValue.bind(this));
|
985 |
-
} else {
|
986 |
-
$('shipping-address-select').value = $('billing-address-select').value;
|
987 |
-
}
|
988 |
-
},
|
989 |
-
|
990 |
-
setRegionValue: function(){
|
991 |
-
$('shipping:region').value = $('billing:region').value;
|
992 |
-
}
|
993 |
-
};
|
994 |
-
|
995 |
-
// shipping method
|
996 |
-
var ShippingMethod = Class.create();
|
997 |
-
ShippingMethod.prototype = {
|
998 |
-
initialize: function() {
|
999 |
-
this.addObservers();
|
1000 |
-
},
|
1001 |
-
|
1002 |
-
save: function() {
|
1003 |
-
// infostrates tnt dummy
|
1004 |
-
},
|
1005 |
-
|
1006 |
-
addObservers: function() {
|
1007 |
-
var self = this;
|
1008 |
-
|
1009 |
-
this.setCheckedRadios(); // fix for "hide other shipping methods if free is in the list"
|
1010 |
-
|
1011 |
-
$$('input[name="shipping_method"]').each(function(el) {
|
1012 |
-
el.observe('click', function() {
|
1013 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
1014 |
-
/* SmartPost */
|
1015 |
-
var smartpostSelect = $('smartpost_select_point');
|
1016 |
-
if (smartpostSelect) {
|
1017 |
-
if (el.id !== 's_method_itellaSmartPost') {
|
1018 |
-
smartpostSelect.setValue('itellaSmartPost');
|
1019 |
-
if (sections.length) {
|
1020 |
-
checkout.update(
|
1021 |
-
checkout.urls.shipping_method,
|
1022 |
-
FC.Ajax.arrayToJson(sections)
|
1023 |
-
);
|
1024 |
-
}
|
1025 |
-
} else {
|
1026 |
-
var availableOptions = smartpostSelect.select('option');
|
1027 |
-
if (availableOptions.length >= 2) {
|
1028 |
-
smartpostSelect.setValue(availableOptions[1].value);
|
1029 |
-
updatePointValue();
|
1030 |
-
if (sections.length) {
|
1031 |
-
checkout.update(
|
1032 |
-
checkout.urls.shipping_method,
|
1033 |
-
FC.Ajax.arrayToJson(sections)
|
1034 |
-
);
|
1035 |
-
}
|
1036 |
-
}
|
1037 |
-
}
|
1038 |
-
}
|
1039 |
-
/* SmartPost */
|
1040 |
-
|
1041 |
-
else if (FC.Ajax.getSectionsToUpdate('shipping-method').length) {
|
1042 |
-
if (sections.length) {
|
1043 |
-
checkout.update(
|
1044 |
-
checkout.urls.shipping_method,
|
1045 |
-
FC.Ajax.arrayToJson(sections)
|
1046 |
-
);
|
1047 |
-
}
|
1048 |
-
}
|
1049 |
-
/* Storepickup integration */
|
1050 |
-
var storepickupBox = $('free-location-box');
|
1051 |
-
if (storepickupBox) {
|
1052 |
-
if ('storepickup_storepickup' == this.value) {
|
1053 |
-
storepickupBox.show();
|
1054 |
-
} else {
|
1055 |
-
storepickupBox.hide();
|
1056 |
-
}
|
1057 |
-
}
|
1058 |
-
/* Storepickup integration */
|
1059 |
-
|
1060 |
-
/* Relaypoint integration */
|
1061 |
-
var relaypointBox = $("relaypoint");
|
1062 |
-
if (relaypointBox) {
|
1063 |
-
if ('relaypoint_relaypoint' == this.value) {
|
1064 |
-
relaypointBox.show();
|
1065 |
-
} else {
|
1066 |
-
relaypointBox.hide();
|
1067 |
-
}
|
1068 |
-
}
|
1069 |
-
/* Relaypoint integration */
|
1070 |
-
|
1071 |
-
/* Delivery Date */
|
1072 |
-
if (typeof deliveryDate == 'object') {
|
1073 |
-
deliveryDate.toggleDisplay(this.value);
|
1074 |
-
}
|
1075 |
-
/* Delivery Date */
|
1076 |
-
|
1077 |
-
/* Infostrates TNT */
|
1078 |
-
if (-1 !== this.value.indexOf('tnt_') && typeof radioCheck !== 'undefined') {
|
1079 |
-
radioCheck();
|
1080 |
-
}
|
1081 |
-
/* Infostrates TNT */
|
1082 |
-
});
|
1083 |
-
});
|
1084 |
-
|
1085 |
-
if ($('shipping-method-reset')) {
|
1086 |
-
$('shipping-method-reset').stopObserving('click');
|
1087 |
-
$('shipping-method-reset').observe('click', function() {
|
1088 |
-
$$('input[name="shipping_method"]').each(function(el) {
|
1089 |
-
el.checked = '';
|
1090 |
-
});
|
1091 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
1092 |
-
if (sections.length) {
|
1093 |
-
sections.push('remove-shipping');
|
1094 |
-
checkout.update(
|
1095 |
-
checkout.urls.shipping_method,
|
1096 |
-
FC.Ajax.arrayToJson(sections)
|
1097 |
-
);
|
1098 |
-
}
|
1099 |
-
});
|
1100 |
-
}
|
1101 |
-
|
1102 |
-
/* Storepickup integration */
|
1103 |
-
var storepickupRadio = $('s_method_storepickup_storepickup');
|
1104 |
-
if (storepickupRadio) {
|
1105 |
-
if (storepickupRadio.checked) {
|
1106 |
-
$('free-location-box').show();
|
1107 |
-
} else {
|
1108 |
-
$('free-location-box').hide();
|
1109 |
-
}
|
1110 |
-
}
|
1111 |
-
/* Storepickup integration */
|
1112 |
-
|
1113 |
-
/* Relaypoint integration */
|
1114 |
-
var relaypointRadio = $('s_method_relaypoint_relaypoint');
|
1115 |
-
if (relaypointRadio) {
|
1116 |
-
if (relaypointRadio.checked) {
|
1117 |
-
$("relaypoint").show();
|
1118 |
-
} else {
|
1119 |
-
$("relaypoint").hide();
|
1120 |
-
}
|
1121 |
-
}
|
1122 |
-
/* Relaypoint integration */
|
1123 |
-
|
1124 |
-
/* uSplitRates Unirgy integration */
|
1125 |
-
$$('.shipment-methods').each(function(el) {
|
1126 |
-
el.observe('change', function() {
|
1127 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
1128 |
-
if (sections.length) {
|
1129 |
-
checkout.update(
|
1130 |
-
checkout.urls.shipping_method,
|
1131 |
-
FC.Ajax.arrayToJson(sections)
|
1132 |
-
);
|
1133 |
-
}
|
1134 |
-
});
|
1135 |
-
});
|
1136 |
-
/* uSplitRates Unirgy integration */
|
1137 |
-
|
1138 |
-
/* Delivery Date */
|
1139 |
-
if (typeof deliveryDate == 'object') {
|
1140 |
-
deliveryDate.toggleDisplay();
|
1141 |
-
}
|
1142 |
-
/* Delivery Date */
|
1143 |
-
|
1144 |
-
/* MageWorx Multifees */
|
1145 |
-
$$('.multifees-shipping-fee').each(function(el) {
|
1146 |
-
el.select('input[type="checkbox"]').each(function(el) {
|
1147 |
-
el.stopObserving('change');
|
1148 |
-
el.observe('change', function(e) {
|
1149 |
-
firecheckoutMultifees(this);
|
1150 |
-
});
|
1151 |
-
});
|
1152 |
-
});
|
1153 |
-
/* MageWorx Multifees */
|
1154 |
-
|
1155 |
-
/* SmartPost */
|
1156 |
-
var smartpostSelect = $('smartpost_select_point');
|
1157 |
-
if (smartpostSelect) {
|
1158 |
-
smartpostSelect.observe('change', function() {
|
1159 |
-
updatePointValue();
|
1160 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
1161 |
-
if (sections.length) {
|
1162 |
-
checkout.update(
|
1163 |
-
checkout.urls.shipping_method,
|
1164 |
-
FC.Ajax.arrayToJson(sections)
|
1165 |
-
);
|
1166 |
-
}
|
1167 |
-
});
|
1168 |
-
}
|
1169 |
-
/* SmartPost */
|
1170 |
-
|
1171 |
-
/* Aitoc_Aitgiftwrap */
|
1172 |
-
var giftwrap = $('gift_wrap');
|
1173 |
-
if (giftwrap) {
|
1174 |
-
giftwrap.observe('click', function() {
|
1175 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
1176 |
-
if (sections.length) {
|
1177 |
-
checkout.update(
|
1178 |
-
checkout.urls.shipping_method,
|
1179 |
-
FC.Ajax.arrayToJson(sections)
|
1180 |
-
);
|
1181 |
-
}
|
1182 |
-
});
|
1183 |
-
}
|
1184 |
-
/* Aitoc_Aitgiftwrap */
|
1185 |
-
|
1186 |
-
/* EE Giftwrap */
|
1187 |
-
document.observe('dom:loaded', function() {
|
1188 |
-
var giftwrap = $('onepage-checkout-shipping-method-additional-load');
|
1189 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
1190 |
-
if (giftwrap && sections.length) {
|
1191 |
-
var giftOptions = giftwrap.select('select');
|
1192 |
-
giftOptions.each(function(el) {
|
1193 |
-
el.observe('change', function() {
|
1194 |
-
checkout.update(checkout.urls.shipping_method, {
|
1195 |
-
review: 1
|
1196 |
-
});
|
1197 |
-
});
|
1198 |
-
});
|
1199 |
-
if (giftOptions.length) {
|
1200 |
-
checkout.update(checkout.urls.shipping_method, {
|
1201 |
-
review: 1
|
1202 |
-
});
|
1203 |
-
}
|
1204 |
-
var giftToggles = giftwrap.select('input[type="checkbox"]');
|
1205 |
-
giftToggles.each(function(el) {
|
1206 |
-
el.observe('click', function() {
|
1207 |
-
if (this.checked) {
|
1208 |
-
return;
|
1209 |
-
}
|
1210 |
-
checkout.update(checkout.urls.shipping_method, {
|
1211 |
-
review: 1
|
1212 |
-
});
|
1213 |
-
});
|
1214 |
-
});
|
1215 |
-
}
|
1216 |
-
});
|
1217 |
-
/* EE Giftwrap */
|
1218 |
-
|
1219 |
-
document.body.fire('firecheckout:shippingMethod:addObserversAfter');
|
1220 |
-
},
|
1221 |
-
|
1222 |
-
setCheckedRadios: function() {
|
1223 |
-
$$('[name="shipping_method"]').each(function(el) {
|
1224 |
-
if (!el.readAttribute('checked')) {
|
1225 |
-
el.checked = false;
|
1226 |
-
return;
|
1227 |
-
}
|
1228 |
-
el.checked = 'checked';
|
1229 |
-
el.writeAttribute('checked', 'checked');
|
1230 |
-
});
|
1231 |
-
},
|
1232 |
-
|
1233 |
-
getCurrentMethod: function() {
|
1234 |
-
var input = $$('input[name="shipping_method"]').find(function(el) {
|
1235 |
-
return el.checked;
|
1236 |
-
});
|
1237 |
-
if (input) {
|
1238 |
-
return input.value;
|
1239 |
-
}
|
1240 |
-
return '';
|
1241 |
-
},
|
1242 |
-
|
1243 |
-
validate: function() {
|
1244 |
-
FC.Messenger.clear('checkout-shipping-method-load');
|
1245 |
-
var methods = document.getElementsByName('shipping_method');
|
1246 |
-
if (methods.length==0) {
|
1247 |
-
FC.Messenger.add(
|
1248 |
-
Translator.translate('Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.'),
|
1249 |
-
'checkout-shipping-method-load',
|
1250 |
-
'error'
|
1251 |
-
);
|
1252 |
-
return false;
|
1253 |
-
}
|
1254 |
-
|
1255 |
-
/* Relaypoint integration */
|
1256 |
-
if (typeof updateshipping == 'function' && typeof relaypointUpdateShippingUrl != 'undefined') {
|
1257 |
-
if (false === updateshipping(relaypointUpdateShippingUrl)) {
|
1258 |
-
return false;
|
1259 |
-
}
|
1260 |
-
}
|
1261 |
-
/* Relaypoint integration */
|
1262 |
-
|
1263 |
-
for (var i=0; i<methods.length; i++) {
|
1264 |
-
if (methods[i].checked) {
|
1265 |
-
return true;
|
1266 |
-
}
|
1267 |
-
}
|
1268 |
-
FC.Messenger.add(
|
1269 |
-
Translator.translate('Please specify shipping method.'),
|
1270 |
-
'checkout-shipping-method-load',
|
1271 |
-
'error'
|
1272 |
-
);
|
1273 |
-
return false;
|
1274 |
-
}
|
1275 |
-
};
|
1276 |
-
|
1277 |
-
// payment
|
1278 |
-
var Payment = Class.create();
|
1279 |
-
Payment.prototype = {
|
1280 |
-
beforeInitFunc:$H({}),
|
1281 |
-
afterInitFunc:$H({}),
|
1282 |
-
beforeValidateFunc:$H({}),
|
1283 |
-
afterValidateFunc:$H({}),
|
1284 |
-
initialize: function(container){
|
1285 |
-
this.cnt = container;
|
1286 |
-
this.form = 'firecheckout-form';
|
1287 |
-
},
|
1288 |
-
|
1289 |
-
save: function() {
|
1290 |
-
// dummy for phoenix/ipayment
|
1291 |
-
checkout.setLoadWaiting(false);
|
1292 |
-
checkout.save('', true); // do not call for ipayment methods anymore
|
1293 |
-
},
|
1294 |
-
|
1295 |
-
onSave: function() {
|
1296 |
-
checkout.setLoadWaiting(false);
|
1297 |
-
checkout.save('', true);
|
1298 |
-
},
|
1299 |
-
|
1300 |
-
onComplete: function() {
|
1301 |
-
// dummy for payone
|
1302 |
-
},
|
1303 |
-
|
1304 |
-
addObservers: function() {
|
1305 |
-
var self = this;
|
1306 |
-
|
1307 |
-
if ($('payment-method-reset')) {
|
1308 |
-
$('payment-method-reset').stopObserving('click');
|
1309 |
-
$('payment-method-reset').observe('click', function() {
|
1310 |
-
$$('input[name="payment[method]"]').each(function(el) {
|
1311 |
-
el.checked = '';
|
1312 |
-
});
|
1313 |
-
self.switchMethod();
|
1314 |
-
var sections = FC.Ajax.getSectionsToUpdate('payment-method');
|
1315 |
-
if (sections.length) {
|
1316 |
-
sections.push('payment[remove]');
|
1317 |
-
checkout.update(
|
1318 |
-
checkout.urls.payment_method,
|
1319 |
-
FC.Ajax.arrayToJson(sections)
|
1320 |
-
);
|
1321 |
-
}
|
1322 |
-
});
|
1323 |
-
}
|
1324 |
-
|
1325 |
-
|
1326 |
-
$$('input[name="payment[method]"]').each(function(el) {
|
1327 |
-
el.observe('click', function() {
|
1328 |
-
var sections = FC.Ajax.getSectionsToUpdate('payment-method');
|
1329 |
-
if (sections.length) {
|
1330 |
-
checkout.update(
|
1331 |
-
checkout.urls.payment_method,
|
1332 |
-
FC.Ajax.arrayToJson(sections)
|
1333 |
-
);
|
1334 |
-
}
|
1335 |
-
if ('p_method_sagepayserver' != this.id) {
|
1336 |
-
$("checkout-sagepay-iframe-load").hide();
|
1337 |
-
}
|
1338 |
-
});
|
1339 |
-
});
|
1340 |
-
|
1341 |
-
/* MageWorx Multifees */
|
1342 |
-
$$('.multifees-payment-fee').each(function(el) {
|
1343 |
-
el.select('input[type="checkbox"]').each(function(el) {
|
1344 |
-
el.observe('change', function(e) {
|
1345 |
-
firecheckoutMultifees(this);
|
1346 |
-
});
|
1347 |
-
});
|
1348 |
-
});
|
1349 |
-
/* MageWorx Multifees */
|
1350 |
-
|
1351 |
-
document.body.fire('firecheckout:paymentMethod:addObserversAfter');
|
1352 |
-
},
|
1353 |
-
|
1354 |
-
addBeforeInitFunction : function(code, func) {
|
1355 |
-
this.beforeInitFunc.set(code, func);
|
1356 |
-
},
|
1357 |
-
|
1358 |
-
beforeInit : function() {
|
1359 |
-
this.addObservers();
|
1360 |
-
(this.beforeInitFunc).each(function(init){
|
1361 |
-
(init.value)();
|
1362 |
-
});
|
1363 |
-
},
|
1364 |
-
|
1365 |
-
init : function () {
|
1366 |
-
this.beforeInit();
|
1367 |
-
var elements = $(this.cnt).down('.sp-methods').select('input', 'select', 'textarea');
|
1368 |
-
var method = null;
|
1369 |
-
for (var i=0; i<elements.length; i++) {
|
1370 |
-
if (elements[i].name=='payment[method]') {
|
1371 |
-
if (elements[i].checked/* || i == 0*/) {
|
1372 |
-
method = elements[i].value;
|
1373 |
-
}
|
1374 |
-
} else {
|
1375 |
-
elements[i].disabled = true;
|
1376 |
-
}
|
1377 |
-
elements[i].setAttribute('autocomplete','off');
|
1378 |
-
}
|
1379 |
-
if (method) this.switchMethod(method);
|
1380 |
-
this.afterInit();
|
1381 |
-
},
|
1382 |
-
|
1383 |
-
addAfterInitFunction : function(code, func) {
|
1384 |
-
this.afterInitFunc.set(code, func);
|
1385 |
-
},
|
1386 |
-
|
1387 |
-
afterInit : function() {
|
1388 |
-
this.initWhatIsCvvListeners();
|
1389 |
-
|
1390 |
-
// update currentMethod, if it's not available in radios (Mymonki_Ship2pay compatibility)
|
1391 |
-
this.paymentOutdatedFlag = false;
|
1392 |
-
if (this.currentMethod !== this.getCurrentMethod()) {
|
1393 |
-
this.currentMethod = this.getCurrentMethod();
|
1394 |
-
this.paymentOutdatedFlag = true;
|
1395 |
-
}
|
1396 |
-
|
1397 |
-
(this.afterInitFunc).each(function(init){
|
1398 |
-
(init.value)();
|
1399 |
-
});
|
1400 |
-
|
1401 |
-
document.body.fire('firecheckout:paymentMethod:afterInitAfter');
|
1402 |
-
},
|
1403 |
-
|
1404 |
-
switchMethod: function(method){
|
1405 |
-
var hideOldForm = true;
|
1406 |
-
if (method === 'customercredit') {
|
1407 |
-
hideOldForm = false;
|
1408 |
-
el = $('p_method_customercredit');
|
1409 |
-
if (!el || !el.checked) {
|
1410 |
-
method = '';
|
1411 |
-
}
|
1412 |
-
}
|
1413 |
-
|
1414 |
-
var elementTypes = ['input', 'select', 'textarea'];
|
1415 |
-
|
1416 |
-
if (hideOldForm && this.currentMethod && $('payment_form_'+this.currentMethod + '_preencrypt')) {
|
1417 |
-
this.changeVisible(this.currentMethod + '_preencrypt', true);
|
1418 |
-
}
|
1419 |
-
|
1420 |
-
if (hideOldForm && this.currentMethod && $('payment_form_'+this.currentMethod)) {
|
1421 |
-
this.changeVisible(this.currentMethod, true);
|
1422 |
-
$('payment_form_'+this.currentMethod).fire('payment-method:switched-off', {method_code : this.currentMethod});
|
1423 |
-
}
|
1424 |
-
|
1425 |
-
if ($('payment_form_'+method) || $('payment_form_' + method + '_preencrypt')) {
|
1426 |
-
if ($('payment_form_'+method)) {
|
1427 |
-
this.changeVisible(method, false);
|
1428 |
-
$('payment_form_'+method).fire('payment-method:switched', {method_code : method});
|
1429 |
-
} else {
|
1430 |
-
this.changeVisible(method + '_preencrypt', false);
|
1431 |
-
}
|
1432 |
-
} else {
|
1433 |
-
//Event fix for payment methods without form like "Check / Money order"
|
1434 |
-
$(document.body).fire('payment-method:switched', {method_code : method});
|
1435 |
-
}
|
1436 |
-
|
1437 |
-
if (method) {
|
1438 |
-
this.lastUsedMethod = method;
|
1439 |
-
}
|
1440 |
-
if (hideOldForm) {
|
1441 |
-
this.currentMethod = method;
|
1442 |
-
}
|
1443 |
-
|
1444 |
-
if (typeof MultiFees !== 'undefined') {
|
1445 |
-
MultiFees.showPayment();
|
1446 |
-
}
|
1447 |
-
},
|
1448 |
-
|
1449 |
-
getCurrentMethod: function() {
|
1450 |
-
var input = $$('input[name="payment[method]"]').find(function(el) {
|
1451 |
-
return el.checked;
|
1452 |
-
});
|
1453 |
-
if (input) {
|
1454 |
-
return input.value;
|
1455 |
-
}
|
1456 |
-
return '';
|
1457 |
-
},
|
1458 |
-
|
1459 |
-
changeVisible: function(method, mode) {
|
1460 |
-
var block = 'payment_form_' + method;
|
1461 |
-
[block + '_before', block, block + '_after'].each(function(el) {
|
1462 |
-
element = $(el);
|
1463 |
-
if (element) {
|
1464 |
-
element.style.display = (mode) ? 'none' : '';
|
1465 |
-
element.select('input', 'select', 'textarea', 'button').each(function(field) {
|
1466 |
-
field.disabled = mode;
|
1467 |
-
});
|
1468 |
-
}
|
1469 |
-
});
|
1470 |
-
},
|
1471 |
-
|
1472 |
-
addBeforeValidateFunction : function(code, func) {
|
1473 |
-
this.beforeValidateFunc.set(code, func);
|
1474 |
-
},
|
1475 |
-
|
1476 |
-
beforeValidate : function() {
|
1477 |
-
var validateResult = true;
|
1478 |
-
var hasValidation = false;
|
1479 |
-
(this.beforeValidateFunc).each(function(validate){
|
1480 |
-
hasValidation = true;
|
1481 |
-
if ((validate.value)() == false) {
|
1482 |
-
validateResult = false;
|
1483 |
-
}
|
1484 |
-
}.bind(this));
|
1485 |
-
if (!hasValidation) {
|
1486 |
-
validateResult = false;
|
1487 |
-
}
|
1488 |
-
return validateResult;
|
1489 |
-
},
|
1490 |
-
|
1491 |
-
validate: function() {
|
1492 |
-
FC.Messenger.clear('checkout-payment-method-load');
|
1493 |
-
var result = this.beforeValidate();
|
1494 |
-
if (result) {
|
1495 |
-
return true;
|
1496 |
-
}
|
1497 |
-
var methods = document.getElementsByName('payment[method]');
|
1498 |
-
if (methods.length==0) {
|
1499 |
-
FC.Messenger.add(
|
1500 |
-
Translator.translate('Your order cannot be completed at this time as there is no payment methods available for it.'),
|
1501 |
-
'checkout-payment-method-load',
|
1502 |
-
'error'
|
1503 |
-
);
|
1504 |
-
return false;
|
1505 |
-
}
|
1506 |
-
for (var i=0; i<methods.length; i++) {
|
1507 |
-
if (methods[i].checked) {
|
1508 |
-
return true;
|
1509 |
-
}
|
1510 |
-
}
|
1511 |
-
result = this.afterValidate();
|
1512 |
-
if (result) {
|
1513 |
-
return true;
|
1514 |
-
}
|
1515 |
-
FC.Messenger.add(
|
1516 |
-
Translator.translate('Please specify payment method.'),
|
1517 |
-
'checkout-payment-method-load',
|
1518 |
-
'error'
|
1519 |
-
);
|
1520 |
-
return false;
|
1521 |
-
},
|
1522 |
-
|
1523 |
-
addAfterValidateFunction : function(code, func) {
|
1524 |
-
this.afterValidateFunc.set(code, func);
|
1525 |
-
},
|
1526 |
-
|
1527 |
-
afterValidate : function() {
|
1528 |
-
var validateResult = true;
|
1529 |
-
var hasValidation = false;
|
1530 |
-
(this.afterValidateFunc).each(function(validate){
|
1531 |
-
hasValidation = true;
|
1532 |
-
if ((validate.value)() == false) {
|
1533 |
-
validateResult = false;
|
1534 |
-
}
|
1535 |
-
}.bind(this));
|
1536 |
-
if (!hasValidation) {
|
1537 |
-
validateResult = false;
|
1538 |
-
}
|
1539 |
-
return validateResult;
|
1540 |
-
},
|
1541 |
-
|
1542 |
-
initWhatIsCvvListeners: function(){
|
1543 |
-
$$('.cvv-what-is-this').each(function(element){
|
1544 |
-
Event.observe(element, 'click', toggleToolTip);
|
1545 |
-
});
|
1546 |
-
}
|
1547 |
-
};
|
1548 |
-
|
1549 |
-
var Review = Class.create();
|
1550 |
-
Review.prototype = {
|
1551 |
-
initialize: function(saveUrl, successUrl, agreementsForm){
|
1552 |
-
this.saveUrl = saveUrl;
|
1553 |
-
this.successUrl = successUrl;
|
1554 |
-
this.agreementsForm = agreementsForm;
|
1555 |
-
this.onSave = this.nextStep.bindAsEventListener(this);
|
1556 |
-
this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
|
1557 |
-
},
|
1558 |
-
|
1559 |
-
save: function(){
|
1560 |
-
checkout.save();
|
1561 |
-
},
|
1562 |
-
|
1563 |
-
resetLoadWaiting: function(transport){
|
1564 |
-
checkout.setLoadWaiting(false);
|
1565 |
-
},
|
1566 |
-
|
1567 |
-
nextStep: function(transport){},
|
1568 |
-
|
1569 |
-
isSuccess: false
|
1570 |
-
};
|
1571 |
-
|
1572 |
-
FireCheckout.isIE9 = function() {
|
1573 |
-
return Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5)) == 9;
|
1574 |
-
};
|
1575 |
-
|
1576 |
-
Function.prototype.firecheckoutInterceptor = function(fcn, scope) {
|
1577 |
-
var method = this;
|
1578 |
-
return (typeof fcn !== 'function') ?
|
1579 |
-
this :
|
1580 |
-
function() {
|
1581 |
-
var me = this,
|
1582 |
-
args = arguments;
|
1583 |
-
fcn.target = me;
|
1584 |
-
fcn.method = method;
|
1585 |
-
return (fcn.apply(scope || me || window, args) !== false) ?
|
1586 |
-
method.apply(me || window, args) :
|
1587 |
-
null;
|
1588 |
-
};
|
1589 |
-
};
|
1590 |
-
|
1591 |
-
// backwards compatibility
|
1592 |
-
FireCheckout.AddressVerification = FC.AddressVerification;
|
1593 |
-
FireCheckout.Ajax = FC.Ajax;
|
1594 |
-
FireCheckout.Cart = FC.Cart;
|
1595 |
-
FireCheckout.DeliveryDate = FC.DeliveryDate;
|
1596 |
-
FireCheckout.DependentFields = FC.DependentFields;
|
1597 |
-
FireCheckout.Housenumber = FC.Housenumber;
|
1598 |
-
FireCheckout.Messenger = FC.Messenger;
|
1599 |
-
FireCheckout.OrderReview = FC.OrderReview;
|
1600 |
-
FireCheckout.Taxvat = FC.Taxvat;
|
1601 |
-
FireCheckout.Window = FC.Window;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/checkoutapi_chargepayment.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
document.observe('firecheckout:setResponseBefore', function(e) {
|
2 |
-
var response = e.memo.response;
|
3 |
-
if (response.update_section && response.update_section.review) {
|
4 |
-
// restore original onclick handler because module does not do it
|
5 |
-
var buttonCheckout = $$('#checkout-review-submit .btn-checkout');
|
6 |
-
if (buttonCheckout.length) {
|
7 |
-
buttonCheckout.each(function(button) {
|
8 |
-
button.writeAttribute('onclick', button.readAttribute('data-clickevent'));
|
9 |
-
});
|
10 |
-
}
|
11 |
-
}
|
12 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/cryozonic_stripe.js
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
document.observe('dom:loaded', function() {
|
2 |
-
if (typeof OnecolumnCheckout !== 'undefined' && typeof createStripeToken !== 'undefined') {
|
3 |
-
OnecolumnCheckout.saveStep = OnecolumnCheckout.saveStep.wrap(function(o, url, button, callback, params) {
|
4 |
-
if (url !== checkout.urls.payment_method || payment.currentMethod != 'cryozonic_stripe') {
|
5 |
-
return o(url, button, callback, params);
|
6 |
-
}
|
7 |
-
|
8 |
-
createStripeToken(function(err) {
|
9 |
-
if (err) {
|
10 |
-
alert(err);
|
11 |
-
} else {
|
12 |
-
return o(url, button, callback, params);
|
13 |
-
}
|
14 |
-
});
|
15 |
-
});
|
16 |
-
}
|
17 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/dhl_account.js
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
document.observe('dom:loaded', function() {
|
2 |
-
setPackstationdata = setPackstationdata.wrap(function(o, packstation) {
|
3 |
-
o(packstation);
|
4 |
-
checkout.update(checkout.urls.shipping_address);
|
5 |
-
});
|
6 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/ebizmarts_sagepaysuite.js
DELETED
@@ -1,160 +0,0 @@
|
|
1 |
-
document.observe('firecheckout:setResponseAfter', function(e) {
|
2 |
-
// save payment response
|
3 |
-
var url = e.memo.url;
|
4 |
-
if (url === checkout.urls.payment_method) {
|
5 |
-
$('checkout-review-submit').show();
|
6 |
-
if ($('sagepaysuite-server-incheckout-iframe')) {
|
7 |
-
$('sagepaysuite-server-incheckout-iframe').remove();
|
8 |
-
}
|
9 |
-
return;
|
10 |
-
}
|
11 |
-
|
12 |
-
// update review reponse
|
13 |
-
var response = e.memo.response;
|
14 |
-
if (response.update_section && response.update_section.review) {
|
15 |
-
$('checkout-review-submit').show();
|
16 |
-
if ($('sagepaysuite-server-incheckout-iframe')) {
|
17 |
-
$('sagepaysuite-server-incheckout-iframe').remove();
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
// saveOrder response
|
22 |
-
if (!response.method) {
|
23 |
-
return;
|
24 |
-
}
|
25 |
-
|
26 |
-
var methods = [
|
27 |
-
'sagepayserver',
|
28 |
-
'sagepayform',
|
29 |
-
'sagepaydirectpro',
|
30 |
-
'sagepaypaypal'
|
31 |
-
];
|
32 |
-
if (methods.indexOf(response.method) >= 0) {
|
33 |
-
window._sagepayonepageTriggerId = $('.button.btn-checkout');
|
34 |
-
window._sagepayonepageFormId = 'firecheckout-form';
|
35 |
-
|
36 |
-
var SageServer = new EbizmartsSagePaySuite.Checkout({});
|
37 |
-
SageServer.code = response.method;
|
38 |
-
SageServer.setPaymentMethod();
|
39 |
-
SageServer.reviewSave();
|
40 |
-
}
|
41 |
-
});
|
42 |
-
|
43 |
-
setOscLoad = function() {
|
44 |
-
checkout.setLoadWaiting(true);
|
45 |
-
$('review-please-wait').show();
|
46 |
-
};
|
47 |
-
|
48 |
-
restoreOscLoad = function () {
|
49 |
-
window._sagepayprocessingorder = false;
|
50 |
-
checkout.setLoadWaiting(false);
|
51 |
-
$('review-please-wait').hide();
|
52 |
-
};
|
53 |
-
|
54 |
-
EbizmartsSagePaySuite.Checkout.prototype.reviewSave = EbizmartsSagePaySuite.Checkout.prototype.reviewSave.wrap(function(o, transport) {
|
55 |
-
if (typeof transport !== 'undefined') {
|
56 |
-
var response = {};
|
57 |
-
try {
|
58 |
-
response = this.evalTransport(transport);
|
59 |
-
} catch(notv) {
|
60 |
-
suiteLogError(notv);
|
61 |
-
}
|
62 |
-
|
63 |
-
if (!response.redirect || !response.success) {
|
64 |
-
checkout.setResponse(transport);
|
65 |
-
if(response.response_status == 'INVALID'){
|
66 |
-
alert(response.response_status_detail);
|
67 |
-
}
|
68 |
-
return;
|
69 |
-
}
|
70 |
-
|
71 |
-
return o(transport);
|
72 |
-
} else {
|
73 |
-
transport = {};
|
74 |
-
}
|
75 |
-
|
76 |
-
if (this.isFormPaymentMethod()) {
|
77 |
-
checkout.setLoadWaiting(true);
|
78 |
-
new Ajax.Request(SuiteConfig.getConfig('global', 'sgps_saveorder_url'),{
|
79 |
-
method:"post",
|
80 |
-
parameters: Form.serialize($('firecheckout-form')),
|
81 |
-
onSuccess:function(f){
|
82 |
-
checkout.setLoadWaiting(false);
|
83 |
-
var d = f.responseText.evalJSON();
|
84 |
-
if(d.response_status == 'ERROR'){
|
85 |
-
alert(d.response_status_detail);
|
86 |
-
this.resetOscLoading();
|
87 |
-
return;
|
88 |
-
}
|
89 |
-
|
90 |
-
setLocation(SuiteConfig.getConfig('form','url'));
|
91 |
-
}
|
92 |
-
});
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
if((this.isDirectPaymentMethod() || this.isServerPaymentMethod()) && parseInt(SuiteConfig.getConfig('global','token_enabled')) === 1){
|
97 |
-
if((typeof transport.tokenSuccess) == 'undefined'){
|
98 |
-
this.setPaymentMethod();
|
99 |
-
|
100 |
-
if(!this.isDirectTokenTransaction() && !this.isServerTokenTransaction() && (($('remembertoken-sagepaydirectpro') && $('remembertoken-sagepaydirectpro').checked === true) || ($('remembertoken-sagepayserver') && $('remembertoken-sagepayserver').checked === true))){
|
101 |
-
return;
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
if (typeof transport.tokenSuccess != 'undefined' && true === transport.tokenSuccess) {
|
107 |
-
|
108 |
-
if (Ajax.activeRequestCount > 1 && (typeof transport.tokenSuccess) == 'undefined') {
|
109 |
-
return;
|
110 |
-
}
|
111 |
-
|
112 |
-
var slPayM = this.getPaymentMethod();
|
113 |
-
if (slPayM == this.paypalcode) {
|
114 |
-
checkout.setLoadWaiting(true);
|
115 |
-
new Ajax.Request(SuiteConfig.getConfig('global', 'sgps_saveorder_url'),{
|
116 |
-
method:"post",
|
117 |
-
parameters: Form.serialize($('firecheckout-form')),
|
118 |
-
onSuccess: function(f) {
|
119 |
-
setLocation(SuiteConfig.getConfig('paypal', 'redirect_url'));
|
120 |
-
}
|
121 |
-
});
|
122 |
-
return;
|
123 |
-
}
|
124 |
-
|
125 |
-
if (slPayM == this.servercode || slPayM == this.directcode) {
|
126 |
-
checkout.setLoadWaiting(true);
|
127 |
-
new Ajax.Request(SuiteConfig.getConfig('global', 'sgps_saveorder_url'),{
|
128 |
-
method:"post",
|
129 |
-
parameters: Form.serialize($('firecheckout-form')),
|
130 |
-
onSuccess: function(f) {
|
131 |
-
checkout.setLoadWaiting(false);
|
132 |
-
this.reviewSave(f);
|
133 |
-
}.bind(this)
|
134 |
-
});
|
135 |
-
return;
|
136 |
-
} else {
|
137 |
-
checkout.setLoadWaiting(true);
|
138 |
-
new Ajax.Request(SuiteConfig.getConfig('global', 'sgps_saveorder_url'),{
|
139 |
-
method:"post",
|
140 |
-
parameters: Form.serialize($('firecheckout-form')),
|
141 |
-
onSuccess: function(f) {
|
142 |
-
checkout.setLoadWaiting(false);
|
143 |
-
this.reviewSave(f);
|
144 |
-
}.bind(this)
|
145 |
-
});
|
146 |
-
return;
|
147 |
-
}
|
148 |
-
} else {
|
149 |
-
checkout.setLoadWaiting(true);
|
150 |
-
new Ajax.Request(SuiteConfig.getConfig('global', 'sgps_saveorder_url'),{
|
151 |
-
method:"post",
|
152 |
-
parameters: Form.serialize($('firecheckout-form')),
|
153 |
-
onSuccess: function(f) {
|
154 |
-
checkout.setLoadWaiting(false);
|
155 |
-
this.reviewSave(f);
|
156 |
-
}.bind(this)
|
157 |
-
});
|
158 |
-
return;
|
159 |
-
}
|
160 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/mage_molpayseamless.js
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
document.observe('firecheckout:setResponseAfter', function(e) {
|
2 |
-
var response = e.memo.response;
|
3 |
-
if (response.method && response.method === 'molpayseamless') {
|
4 |
-
jQuery('#seamless-form').submit();
|
5 |
-
}
|
6 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/mymonki_ship2pay.js
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Fix for module logic, because it does not remove payment method actually
|
3 |
-
* and firecheckout left payment fee in totals for hidden method.
|
4 |
-
*
|
5 |
-
* The true way is to override Mage::helper('payment')::getStoreMethods method
|
6 |
-
* instead of Mage_Checkout_Block_Onepage_Payment_Methods::getMethods
|
7 |
-
*/
|
8 |
-
document.observe('firecheckout:paymentMethod:afterInitAfter', function() {
|
9 |
-
// @see payemnt::afterInit
|
10 |
-
if (payment.paymentOutdatedFlag && typeof checkout !== 'undefined') {
|
11 |
-
var sections = FireCheckout.Ajax.getSectionsToUpdate('payment-method');
|
12 |
-
if (sections.length) {
|
13 |
-
sections.push('payment[remove]');
|
14 |
-
checkout.update(
|
15 |
-
checkout.urls.payment_method,
|
16 |
-
FireCheckout.Ajax.arrayToJson(sections)
|
17 |
-
);
|
18 |
-
}
|
19 |
-
}
|
20 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/sfc_autoship.js
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
FC.AutoShip = {
|
2 |
-
isTokenized: function() {
|
3 |
-
return $('subscribe_pro_payment_token').getValue().length > 0 &&
|
4 |
-
$('subscribe_pro_cc_number').getValue().indexOf('XXXXXX') >= 0;
|
5 |
-
},
|
6 |
-
waitForToken: function(callback) {
|
7 |
-
if (!this.isTokenized()) {
|
8 |
-
return setTimeout(function() {
|
9 |
-
FC.AutoShip.waitForToken(callback);
|
10 |
-
}, 500);
|
11 |
-
} else {
|
12 |
-
callback();
|
13 |
-
}
|
14 |
-
}
|
15 |
-
};
|
16 |
-
|
17 |
-
document.observe('dom:loaded', function() {
|
18 |
-
paymentSaveAjaxCall = function(){}; // prevent automatic checkout.save call
|
19 |
-
|
20 |
-
if (typeof OnecolumnCheckout !== 'undefined') {
|
21 |
-
OnecolumnCheckout.validateStep = OnecolumnCheckout.validateStep.wrap(function(o, step) {
|
22 |
-
if (payment.currentMethod === 'subscribe_pro' &&
|
23 |
-
step.className.indexOf('payment-method')) {
|
24 |
-
|
25 |
-
return true;
|
26 |
-
}
|
27 |
-
return o(step);
|
28 |
-
});
|
29 |
-
}
|
30 |
-
|
31 |
-
checkout.validator.validate = checkout.validator.validate.wrap(function(o) {
|
32 |
-
if (payment.currentMethod === 'subscribe_pro') {
|
33 |
-
return true; // disable validation, because module replaces form values with XXXXXX
|
34 |
-
}
|
35 |
-
return o();
|
36 |
-
});
|
37 |
-
checkout.update = checkout.update.wrap(function(o, url, params, callback) {
|
38 |
-
if (payment.currentMethod !== 'subscribe_pro' || url !== checkout.urls.payment_method) {
|
39 |
-
return o(url, params, callback);
|
40 |
-
}
|
41 |
-
checkout.setLoadWaiting(false);
|
42 |
-
payment.save();
|
43 |
-
FC.AutoShip.waitForToken(o.bind(this, url, params, callback));
|
44 |
-
});
|
45 |
-
checkout.save = checkout.save.wrap(function(o, urlSuffix, forceSave) {
|
46 |
-
if (payment.currentMethod && payment.currentMethod === 'subscribe_pro') {
|
47 |
-
checkout.setLoadWaiting(false);
|
48 |
-
payment.save();
|
49 |
-
checkout.setLoadWaiting(false);
|
50 |
-
FC.AutoShip.waitForToken(o.bind(this, urlSuffix, forceSave));
|
51 |
-
} else {
|
52 |
-
o(urlSuffix, forceSave);
|
53 |
-
}
|
54 |
-
});
|
55 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/webshopapps_calendarbase.js
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
function firecheckoutWrapChangeShipOptions() {
|
2 |
-
if (typeof changeShipOptions !== 'function') {
|
3 |
-
return;
|
4 |
-
}
|
5 |
-
|
6 |
-
changeShipOptions = changeShipOptions.wrap(function(o, data, dateText) {
|
7 |
-
o(data, dateText);
|
8 |
-
|
9 |
-
// can't use shippingMethod.addObservers to prevent too much recursion error.
|
10 |
-
$$('input[name="shipping_method"]').each(function(el) {
|
11 |
-
el.stopObserving('click');
|
12 |
-
el.observe('click', function() {
|
13 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
14 |
-
if (sections.length) {
|
15 |
-
checkout.update(
|
16 |
-
checkout.urls.shipping_method,
|
17 |
-
FC.Ajax.arrayToJson(sections)
|
18 |
-
);
|
19 |
-
}
|
20 |
-
});
|
21 |
-
});
|
22 |
-
|
23 |
-
var sections = FC.Ajax.getSectionsToUpdate('shipping-method');
|
24 |
-
if (sections.length) {
|
25 |
-
checkout.update(
|
26 |
-
checkout.urls.shipping_method,
|
27 |
-
FC.Ajax.arrayToJson(sections)
|
28 |
-
);
|
29 |
-
}
|
30 |
-
});
|
31 |
-
}
|
32 |
-
|
33 |
-
document.observe('dom:loaded', function() { firecheckoutWrapChangeShipOptions(); });
|
34 |
-
document.observe('firecheckout:shippingMethod:addObserversAfter', function() { firecheckoutWrapChangeShipOptions(); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/integration/ydral_correos.js
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
document.observe('firecheckout:setResponseAfter', function(e) {
|
2 |
-
var response = e.memo.response;
|
3 |
-
if (response.update_section && response.update_section['shipping-method']) {
|
4 |
-
$$('input[name="shipping_method"]').each(function(el) {
|
5 |
-
el.checked = '';
|
6 |
-
});
|
7 |
-
}
|
8 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/onecolumn.js
DELETED
@@ -1,649 +0,0 @@
|
|
1 |
-
var OnecolumnCheckout = {
|
2 |
-
currentStep: null,
|
3 |
-
|
4 |
-
init: function() {
|
5 |
-
$$('.onecolumn').first().insert({
|
6 |
-
bottom: '<div id="scrolling-spacer"></div>'
|
7 |
-
});
|
8 |
-
this.stepForward($$('.onecolumn .step').first(), false);
|
9 |
-
this.addObservers();
|
10 |
-
},
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @param {DOM.Element} step Step to activate
|
14 |
-
* @param {boolean} scroll Flag, to indicate that scrolling should be used or not
|
15 |
-
*/
|
16 |
-
stepForward: function(step, scroll) {
|
17 |
-
if (!step) {
|
18 |
-
return;
|
19 |
-
}
|
20 |
-
|
21 |
-
if (this.currentStep) {
|
22 |
-
if (!this.validateStep(this.currentStep)) {
|
23 |
-
return false;
|
24 |
-
}
|
25 |
-
this.currentStep.addClassName('completed').removeClassName('current');
|
26 |
-
}
|
27 |
-
|
28 |
-
this.latestStep = this.currentStep;
|
29 |
-
this.currentStep = step;
|
30 |
-
step.addClassName('current activated');
|
31 |
-
this._handleScroll.bind(this).delay(0.1, scroll);
|
32 |
-
},
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Go to specified step and deactivate all completed steps
|
36 |
-
*/
|
37 |
-
stepTo: function(step, scroll) {
|
38 |
-
if (!step) {
|
39 |
-
return;
|
40 |
-
}
|
41 |
-
|
42 |
-
step.nextSiblings().each(function(el) {
|
43 |
-
el.removeClassName('current')
|
44 |
-
.removeClassName('completed')
|
45 |
-
.removeClassName('activated');
|
46 |
-
});
|
47 |
-
|
48 |
-
this.latestStep = this.currentStep;
|
49 |
-
this.currentStep = step;
|
50 |
-
step.removeClassName('completed').addClassName('current');
|
51 |
-
this._handleScroll.bind(this).delay(0.1, scroll);
|
52 |
-
},
|
53 |
-
|
54 |
-
_handleScroll: function(scroll) {
|
55 |
-
var step = this.currentStep;
|
56 |
-
|
57 |
-
var sidebar = $$('.onecolumn-aside').first();
|
58 |
-
if (sidebar && sidebar.getStyle('display') !== 'none') {
|
59 |
-
var scrollingSpaceNeeded = step.viewportOffset().top - 20,
|
60 |
-
viewportOffsetBottom = document.viewport.getScrollOffsets().top + document.viewport.getDimensions().height,
|
61 |
-
availableScrollingSpace = (document.body.getHeight() - $('scrolling-spacer').getHeight()) - viewportOffsetBottom;
|
62 |
-
|
63 |
-
if (scrollingSpaceNeeded > availableScrollingSpace) {
|
64 |
-
if (step.viewportOffset().top === sidebar.viewportOffset().top) { // first step
|
65 |
-
$('scrolling-spacer').setStyle({
|
66 |
-
height: - availableScrollingSpace + 'px'
|
67 |
-
});
|
68 |
-
} else {
|
69 |
-
$('scrolling-spacer').setStyle({
|
70 |
-
height: scrollingSpaceNeeded - availableScrollingSpace + 'px'
|
71 |
-
});
|
72 |
-
}
|
73 |
-
|
74 |
-
// min-height on content block fix
|
75 |
-
availableScrollingSpace = (document.body.getHeight() - $('scrolling-spacer').getHeight()) - viewportOffsetBottom;
|
76 |
-
if (availableScrollingSpace < 0) {
|
77 |
-
$('scrolling-spacer').setStyle({
|
78 |
-
height: - availableScrollingSpace + 'px'
|
79 |
-
});
|
80 |
-
}
|
81 |
-
} else {
|
82 |
-
$('scrolling-spacer').setStyle({
|
83 |
-
height: 0 + 'px'
|
84 |
-
});
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
if (false !== scroll) {
|
89 |
-
Effect.ScrollTo(step, {
|
90 |
-
duration: 0.5,
|
91 |
-
offset: -20
|
92 |
-
});
|
93 |
-
}
|
94 |
-
},
|
95 |
-
|
96 |
-
addObservers: function() {
|
97 |
-
var self = this;
|
98 |
-
|
99 |
-
// next step buttons
|
100 |
-
$$('.step .next').each(function(el) {
|
101 |
-
el.observe('click', function() {
|
102 |
-
var step = el.up('.step'),
|
103 |
-
method = step.readAttribute('data-step-save');
|
104 |
-
|
105 |
-
if (method && self[method]) {
|
106 |
-
self[method](el, self.stepForward.bind(self, step.next('.step')));
|
107 |
-
} else {
|
108 |
-
self.stepForward(step.next('.step'));
|
109 |
-
}
|
110 |
-
});
|
111 |
-
});
|
112 |
-
|
113 |
-
// previous step buttons
|
114 |
-
$$('.step .edit').each(function(el) {
|
115 |
-
el.observe('click', function() {
|
116 |
-
self.stepTo(el.up('.step'), false);
|
117 |
-
});
|
118 |
-
});
|
119 |
-
|
120 |
-
// login button
|
121 |
-
$$('.step .btn-login').each(function(el) {
|
122 |
-
el.observe('click', function() {
|
123 |
-
var email = $('billing\:email'),
|
124 |
-
password = $('billing\:customer_password'),
|
125 |
-
messageContainer = $$('.step-name .block-content').first();
|
126 |
-
|
127 |
-
if (!Validation.validate(email) || !Validation.validate(password)) {
|
128 |
-
return;
|
129 |
-
}
|
130 |
-
|
131 |
-
// captcha integration
|
132 |
-
var loginWindow = $('firecheckout-login-window');
|
133 |
-
if (loginWindow.down('#user_login')) {
|
134 |
-
firecheckoutWindow
|
135 |
-
.update(loginWindow, {
|
136 |
-
maxWidth: 380
|
137 |
-
})
|
138 |
-
.show();
|
139 |
-
loginWindow.down('#email').setValue(email.getValue());
|
140 |
-
loginWindow.down('#pass').setValue(password.getValue());
|
141 |
-
var captchaInput = loginWindow.down('#captcha_user_login');
|
142 |
-
if (captchaInput) {
|
143 |
-
captchaInput.focus();
|
144 |
-
}
|
145 |
-
return;
|
146 |
-
}
|
147 |
-
|
148 |
-
self.setLoadingButton(el);
|
149 |
-
new Ajax.Request(checkout.urls.login, {
|
150 |
-
parameters: {
|
151 |
-
'login[username]': email.getValue(),
|
152 |
-
'login[password]': password.getValue()
|
153 |
-
},
|
154 |
-
onSuccess: function(transport) {
|
155 |
-
var response = {};
|
156 |
-
try {
|
157 |
-
response = transport.responseText.evalJSON();
|
158 |
-
} catch (e) {
|
159 |
-
response.error = e;
|
160 |
-
}
|
161 |
-
|
162 |
-
self.setLoadingButton(el, false);
|
163 |
-
FC.Messenger.clear(messageContainer);
|
164 |
-
if (response.error) {
|
165 |
-
FC.Messenger.add(response.error, messageContainer, 'error');
|
166 |
-
checkout.updateCaptcha('user_login');
|
167 |
-
password.focus();
|
168 |
-
password.setSelectionRange(0, password.value.length);
|
169 |
-
}
|
170 |
-
if (response.redirect) {
|
171 |
-
document.location = response.redirect;
|
172 |
-
}
|
173 |
-
}
|
174 |
-
});
|
175 |
-
});
|
176 |
-
});
|
177 |
-
|
178 |
-
// forgot password button
|
179 |
-
$$('.step .link-forgot-password').each(function(el) {
|
180 |
-
el.observe('click', function(e) {
|
181 |
-
Event.stop(e);
|
182 |
-
var email = $('billing\:email'),
|
183 |
-
messageContainer = $$('.step-name .block-content').first();
|
184 |
-
|
185 |
-
if (!Validation.validate(email)) {
|
186 |
-
return;
|
187 |
-
}
|
188 |
-
|
189 |
-
// captcha integration
|
190 |
-
var forgotWindow = $('firecheckout-forgot-window');
|
191 |
-
if (forgotWindow.down('#user_forgotpassword')) {
|
192 |
-
firecheckoutWindow
|
193 |
-
.update(forgotWindow, {
|
194 |
-
maxWidth: 380
|
195 |
-
})
|
196 |
-
.show();
|
197 |
-
forgotWindow.down('#email_address').setValue(email.getValue());
|
198 |
-
var captchaInput = forgotWindow.down('#captcha_user_forgotpassword');
|
199 |
-
if (captchaInput) {
|
200 |
-
captchaInput.focus();
|
201 |
-
}
|
202 |
-
return;
|
203 |
-
}
|
204 |
-
|
205 |
-
el.hide();
|
206 |
-
checkout.setLoadingField(el.up('.input-box').down('input'));
|
207 |
-
|
208 |
-
new Ajax.Request(checkout.urls.forgotpassword, {
|
209 |
-
parameters: {
|
210 |
-
'email': email.getValue()
|
211 |
-
},
|
212 |
-
onSuccess: function(transport) {
|
213 |
-
checkout.setLoadingField(el.up('.input-box').down('input'), false);
|
214 |
-
el.show();
|
215 |
-
|
216 |
-
FC.Messenger.clear(messageContainer);
|
217 |
-
|
218 |
-
var response = transport.responseText.evalJSON();
|
219 |
-
if (response.error) {
|
220 |
-
FC.Messenger.add(response.error, messageContainer, 'error');
|
221 |
-
checkout.updateCaptcha('user_forgotpassword');
|
222 |
-
} else if (response.message) {
|
223 |
-
FC.Messenger.add(response.message, messageContainer, 'success');
|
224 |
-
}
|
225 |
-
}
|
226 |
-
});
|
227 |
-
});
|
228 |
-
});
|
229 |
-
|
230 |
-
// instant field validation
|
231 |
-
$$('.onecolumn').first().select('input,select,radio,checkbox,textarea').each(function(el) {
|
232 |
-
var tagName = el.tagName.toLowerCase(),
|
233 |
-
eventName = 'change';
|
234 |
-
|
235 |
-
if ('checkbox' === tagName || 'radio' === tagName) {
|
236 |
-
eventName = 'click';
|
237 |
-
}
|
238 |
-
|
239 |
-
el.observe(eventName, function() {
|
240 |
-
if (!self.canValidate(el)) {
|
241 |
-
return;
|
242 |
-
}
|
243 |
-
if (Validation.validate(el)) {
|
244 |
-
self.getFieldsToValidate(el).each(function(selector) {
|
245 |
-
var field = $$(selector).first();
|
246 |
-
if (field && self.canValidate(field)) {
|
247 |
-
Validation.validate(field);
|
248 |
-
}
|
249 |
-
});
|
250 |
-
}
|
251 |
-
});
|
252 |
-
});
|
253 |
-
|
254 |
-
// discount form
|
255 |
-
var discountToggler = $('discount_block_toggle');
|
256 |
-
if (discountToggler) {
|
257 |
-
discountToggler.observe('click', function() {
|
258 |
-
var form = this.up('li').next('.form');
|
259 |
-
if (this.checked) {
|
260 |
-
form.addClassName('shown');
|
261 |
-
} else {
|
262 |
-
form.removeClassName('shown');
|
263 |
-
}
|
264 |
-
});
|
265 |
-
}
|
266 |
-
|
267 |
-
// email verification
|
268 |
-
var emailField = $('billing\:email');
|
269 |
-
if (emailField) {
|
270 |
-
emailField.observe('change', self.onEmailChange.bind(self));
|
271 |
-
if (emailField.value.length && Validation.validate(emailField)) {
|
272 |
-
self.onEmailChange();
|
273 |
-
}
|
274 |
-
}
|
275 |
-
},
|
276 |
-
|
277 |
-
onEmailChange: function() {
|
278 |
-
var self = this,
|
279 |
-
emailField = $('billing\:email'),
|
280 |
-
buttonSet = $('step-name').down('.step-buttons-set');
|
281 |
-
|
282 |
-
if (!emailField.value.length || !Validation.validate(emailField)) {
|
283 |
-
return;
|
284 |
-
}
|
285 |
-
checkout.setLoadingField(emailField);
|
286 |
-
self.setDisableButtonSet(buttonSet);
|
287 |
-
self.verifyEmail(emailField.value, function(result) {
|
288 |
-
checkout.setLoadingField(emailField, false);
|
289 |
-
self.setDisableButtonSet(buttonSet, false);
|
290 |
-
if (!result.success) {
|
291 |
-
alert('An error has occured during request processing. Try again please');
|
292 |
-
}
|
293 |
-
self.toggleLogin(result.exists);
|
294 |
-
});
|
295 |
-
},
|
296 |
-
|
297 |
-
verifyEmail: function(email, callback) {
|
298 |
-
new Ajax.Request(checkout.urls.email_verification, {
|
299 |
-
parameters: {
|
300 |
-
email: email
|
301 |
-
},
|
302 |
-
onFailure: function(transport) {
|
303 |
-
callback({
|
304 |
-
success: false
|
305 |
-
});
|
306 |
-
},
|
307 |
-
onSuccess: function(transport) {
|
308 |
-
try {
|
309 |
-
response = transport.responseText.evalJSON();
|
310 |
-
} catch (err) {
|
311 |
-
callback({success: false});
|
312 |
-
return false;
|
313 |
-
}
|
314 |
-
callback({
|
315 |
-
success: true,
|
316 |
-
exists: response.exists
|
317 |
-
});
|
318 |
-
}
|
319 |
-
});
|
320 |
-
},
|
321 |
-
|
322 |
-
toggleLogin: function(flag) {
|
323 |
-
var checkbox = $('register-customer-checkbox'),
|
324 |
-
name = $$('.field-name').first(),
|
325 |
-
stepName = $$('.step-name').first();
|
326 |
-
|
327 |
-
if (flag) {
|
328 |
-
this.stepTo(stepName, false);
|
329 |
-
stepName.addClassName('mode-login');
|
330 |
-
if (checkbox) {
|
331 |
-
checkbox.hide();
|
332 |
-
billing.setCreateAccount(true);
|
333 |
-
}
|
334 |
-
name.hide();
|
335 |
-
$('billing\:customer_password').focus();
|
336 |
-
} else {
|
337 |
-
stepName.removeClassName('mode-login');
|
338 |
-
if (checkbox) {
|
339 |
-
checkbox.show();
|
340 |
-
if (!checkbox.down('input:checked')) {
|
341 |
-
billing.setCreateAccount(false);
|
342 |
-
}
|
343 |
-
}
|
344 |
-
name.show();
|
345 |
-
$('billing\:firstname').focus();
|
346 |
-
}
|
347 |
-
},
|
348 |
-
|
349 |
-
/**
|
350 |
-
* Defines field validators requirements.
|
351 |
-
*
|
352 |
-
* Example:
|
353 |
-
* There is no need to validate credit card type, if cc_number is
|
354 |
-
* not available yet and so on..
|
355 |
-
*
|
356 |
-
* @param {DOMElement} field
|
357 |
-
* @return {boolean}
|
358 |
-
*/
|
359 |
-
canValidate: function(field) {
|
360 |
-
var rules = {
|
361 |
-
'payment[cc_type]': ['[name=payment[cc_number]]'],
|
362 |
-
'payment[cc_cid]': ['[name=payment[cc_type]]']
|
363 |
-
};
|
364 |
-
if (!rules[field.name]) {
|
365 |
-
return true;
|
366 |
-
}
|
367 |
-
|
368 |
-
var form = $('payment_form_' + payment.getCurrentMethod()),
|
369 |
-
result = true;
|
370 |
-
|
371 |
-
if (!form) {
|
372 |
-
return true;
|
373 |
-
}
|
374 |
-
|
375 |
-
rules[field.name].each(function(selector) {
|
376 |
-
var field = form.down(selector);
|
377 |
-
if (field && !field.getValue()) {
|
378 |
-
result = false;
|
379 |
-
throw $break;
|
380 |
-
}
|
381 |
-
});
|
382 |
-
return result;
|
383 |
-
},
|
384 |
-
|
385 |
-
/**
|
386 |
-
* Defines dependencies between fields validators.
|
387 |
-
*
|
388 |
-
* Example:
|
389 |
-
* When cc number is changed we should validate cc_type as well.
|
390 |
-
*
|
391 |
-
* @param {DOMElement} field
|
392 |
-
* @return {array} Array of dependent field selectors
|
393 |
-
*/
|
394 |
-
getFieldsToValidate: function(field) {
|
395 |
-
var linkedFields = {
|
396 |
-
'payment[cc_number]': ['[name=payment[cc_type]]']
|
397 |
-
};
|
398 |
-
if (!linkedFields[field.name]) {
|
399 |
-
return [];
|
400 |
-
}
|
401 |
-
return linkedFields[field.name];
|
402 |
-
},
|
403 |
-
|
404 |
-
validateStep: function(step) {
|
405 |
-
if (!step.validator) {
|
406 |
-
step.validator = new Validation(step);
|
407 |
-
}
|
408 |
-
return step.validator.validate();
|
409 |
-
},
|
410 |
-
|
411 |
-
setDisableButtonSet: function(set, status) {
|
412 |
-
if (false === status) {
|
413 |
-
set.select('button').each(function(button) {
|
414 |
-
button.removeClassName('disabled').enable();
|
415 |
-
});
|
416 |
-
} else {
|
417 |
-
set.select('button').each(function(button) {
|
418 |
-
button.addClassName('disabled').disable();
|
419 |
-
});
|
420 |
-
}
|
421 |
-
},
|
422 |
-
|
423 |
-
setLoadingButton: function(button, status) {
|
424 |
-
if (false === status) {
|
425 |
-
button.removeClassName('loading').enable();
|
426 |
-
button.down('.field-spinner-wrapper').remove();
|
427 |
-
} else {
|
428 |
-
button.addClassName('loading').disable();
|
429 |
-
button.insert({
|
430 |
-
bottom: '<div class="field-spinner-wrapper"><div class="loader"></div></div>'
|
431 |
-
});
|
432 |
-
}
|
433 |
-
},
|
434 |
-
|
435 |
-
saveStep: function(url, button, callback, params) {
|
436 |
-
var self = this;
|
437 |
-
|
438 |
-
params = Object.extend({
|
439 |
-
urlSuffix: '',
|
440 |
-
force_validation: 1
|
441 |
-
}, params || {});
|
442 |
-
|
443 |
-
self.setLoadingButton(button);
|
444 |
-
var result = checkout.update(
|
445 |
-
url + params.urlSuffix,
|
446 |
-
params,
|
447 |
-
function(response) {
|
448 |
-
self.setLoadingButton(button, false);
|
449 |
-
try {
|
450 |
-
response = response.responseText.evalJSON();
|
451 |
-
} catch (err) {
|
452 |
-
return;
|
453 |
-
}
|
454 |
-
if (response.error) {
|
455 |
-
return;
|
456 |
-
}
|
457 |
-
callback();
|
458 |
-
}
|
459 |
-
);
|
460 |
-
if (false === result) {
|
461 |
-
self.setLoadingButton(button, false);
|
462 |
-
}
|
463 |
-
},
|
464 |
-
|
465 |
-
saveName: function(button, callback, options) {
|
466 |
-
var self = this;
|
467 |
-
|
468 |
-
var password = $('register-customer-password');
|
469 |
-
if (password && password.visible() && password.hasClassName('hidden-registration')) {
|
470 |
-
password.hide(); // hack to pass Validation method
|
471 |
-
}
|
472 |
-
|
473 |
-
if (!self.validateStep(button.up('.step'))) {
|
474 |
-
return;
|
475 |
-
}
|
476 |
-
|
477 |
-
options = Object.extend({
|
478 |
-
force_validation: 0
|
479 |
-
}, options || {});
|
480 |
-
|
481 |
-
self.saveStep(checkout.urls.billing_address, button, callback, options);
|
482 |
-
},
|
483 |
-
|
484 |
-
saveAddress: function(button, callback, options) {
|
485 |
-
var self = this;
|
486 |
-
if (!self.validateStep(button.up('.step'))) {
|
487 |
-
return;
|
488 |
-
}
|
489 |
-
|
490 |
-
self.saveStep(
|
491 |
-
checkout.urls.billing_address_with_validation,
|
492 |
-
button,
|
493 |
-
function() {
|
494 |
-
var sameAsBilling = $('shipping:same_as_billing');
|
495 |
-
if (sameAsBilling && !sameAsBilling.checked) {
|
496 |
-
self.saveStep(checkout.urls.shipping_address, button, callback, options);
|
497 |
-
} else {
|
498 |
-
callback();
|
499 |
-
}
|
500 |
-
},
|
501 |
-
options
|
502 |
-
);
|
503 |
-
},
|
504 |
-
|
505 |
-
saveShippingMethod: function(button, callback, options) {
|
506 |
-
var self = this;
|
507 |
-
if (!shippingMethod.validate() || !self.validateStep(button.up('.step'))) {
|
508 |
-
this.scrollToError($$('.step-shipping-method').first());
|
509 |
-
return;
|
510 |
-
}
|
511 |
-
self.saveStep(checkout.urls.shipping_method, button, callback, options);
|
512 |
-
},
|
513 |
-
|
514 |
-
savePaymentMethod: function(button, callback, options) {
|
515 |
-
var self = this;
|
516 |
-
if (!payment.validate() || !self.validateStep(button.up('.step'))) {
|
517 |
-
this.scrollToError($$('.step-payment-method').first());
|
518 |
-
return;
|
519 |
-
}
|
520 |
-
self.saveStep(checkout.urls.payment_method, button, callback, options);
|
521 |
-
},
|
522 |
-
|
523 |
-
saveShippingAndPaymentMethods: function(button, callback, options) {
|
524 |
-
var self = this;
|
525 |
-
if (!shippingMethod.validate() || !payment.validate() || !self.validateStep(button.up('.step'))) {
|
526 |
-
this.scrollToError($$('.step-shipping-payment-method').first());
|
527 |
-
return;
|
528 |
-
}
|
529 |
-
self.saveStep(checkout.urls.shipping_method, button, function() {
|
530 |
-
self.saveStep(checkout.urls.payment_method, button, function() {
|
531 |
-
callback();
|
532 |
-
}, options);
|
533 |
-
}, options);
|
534 |
-
},
|
535 |
-
|
536 |
-
scrollToError: function(step) {
|
537 |
-
var validationMessages = step.select('.messages').findAll(function(el) {
|
538 |
-
return el.visible();
|
539 |
-
});
|
540 |
-
var viewportSize = document.viewport.getDimensions();
|
541 |
-
var needToScroll = false;
|
542 |
-
validationMessages.each(function(el) {
|
543 |
-
var offset = el.viewportOffset();
|
544 |
-
if (offset.top < 0 || offset.top > viewportSize.height
|
545 |
-
|| offset.left < 0 || offset.left > viewportSize.width) {
|
546 |
-
|
547 |
-
needToScroll = true;
|
548 |
-
throw $break;
|
549 |
-
}
|
550 |
-
});
|
551 |
-
|
552 |
-
if (needToScroll) {
|
553 |
-
Effect.ScrollTo(validationMessages[0], {
|
554 |
-
duration: '0.5',
|
555 |
-
offset: -20
|
556 |
-
});
|
557 |
-
}
|
558 |
-
}
|
559 |
-
};
|
560 |
-
|
561 |
-
var OrderSummary = {
|
562 |
-
cloneOrderTotals: function() {
|
563 |
-
var div = $('order-total-clone');
|
564 |
-
if (!div) {
|
565 |
-
return;
|
566 |
-
}
|
567 |
-
var totals = $('checkout-review-table').down('tfoot');
|
568 |
-
div.update('<tfoot>' + totals.innerHTML.stripScripts() + '</tfoot>');
|
569 |
-
},
|
570 |
-
|
571 |
-
init: function() {
|
572 |
-
var self = this;
|
573 |
-
self.cloneOrderTotals();
|
574 |
-
document.observe('firecheckout:setResponseAfter', function(e) {
|
575 |
-
self.cloneOrderTotals();
|
576 |
-
});
|
577 |
-
}
|
578 |
-
};
|
579 |
-
|
580 |
-
document.observe('dom:loaded', function() {
|
581 |
-
OnecolumnCheckout.init();
|
582 |
-
|
583 |
-
if (typeof reviewInfo !== 'undefined') {
|
584 |
-
reviewInfo.editBlock = reviewInfo.editBlock.wrap(function(o, id) {
|
585 |
-
o(id);
|
586 |
-
|
587 |
-
var block = $(id),
|
588 |
-
sameAsBilling = $('shipping:same_as_billing');
|
589 |
-
|
590 |
-
if (-1 !== id.indexOf('address') && (!block || (sameAsBilling && sameAsBilling.checked))) {
|
591 |
-
block = $('billing-address');
|
592 |
-
}
|
593 |
-
|
594 |
-
OnecolumnCheckout.stepTo(block.up('.step'), false);
|
595 |
-
});
|
596 |
-
}
|
597 |
-
|
598 |
-
// USPS Address Verification
|
599 |
-
if (FC.AddressVerification) {
|
600 |
-
FC.AddressVerification.prototype.doSkipVerificationRequest = function() {
|
601 |
-
var step = OnecolumnCheckout.currentStep;
|
602 |
-
|
603 |
-
OnecolumnCheckout.saveAddress(
|
604 |
-
step.down('.step-buttons-set .next'),
|
605 |
-
OnecolumnCheckout.stepForward.bind(OnecolumnCheckout, step.next('.step')),
|
606 |
-
{
|
607 |
-
urlSuffix: '?skip-address-verification=1'
|
608 |
-
}
|
609 |
-
);
|
610 |
-
};
|
611 |
-
}
|
612 |
-
});
|
613 |
-
|
614 |
-
document.observe('firecheckout:setLoadWaitingBefore', function(e) {
|
615 |
-
var buttons = OnecolumnCheckout.currentStep.down('.step-buttons-set');
|
616 |
-
if (buttons) {
|
617 |
-
OnecolumnCheckout.setDisableButtonSet(buttons, e.memo.flag);
|
618 |
-
}
|
619 |
-
|
620 |
-
// enable previous step buttons
|
621 |
-
var prevStep = OnecolumnCheckout.latestStep;
|
622 |
-
if (prevStep) {
|
623 |
-
buttons = prevStep.down('.step-buttons-set');
|
624 |
-
if (buttons) {
|
625 |
-
OnecolumnCheckout.setDisableButtonSet(buttons, false);
|
626 |
-
}
|
627 |
-
}
|
628 |
-
});
|
629 |
-
|
630 |
-
document.observe('firecheckout:setResponseAfter', function(e) {
|
631 |
-
var step = false;
|
632 |
-
|
633 |
-
if (e.memo.response.onecolumn_step) {
|
634 |
-
step = e.memo.response.onecolumn_step;
|
635 |
-
} else if (e.memo.response.goto_section) {
|
636 |
-
var gotoMapping = {
|
637 |
-
'payment' : 'step-shipping-payment-method',
|
638 |
-
'shipping_method' : 'step-shipping-payment-method',
|
639 |
-
'shipping' : 'step-address',
|
640 |
-
'billing' : 'step-address',
|
641 |
-
'review' : 'step-review'
|
642 |
-
};
|
643 |
-
step = gotoMapping[e.memo.response.goto_section];
|
644 |
-
}
|
645 |
-
|
646 |
-
if (step) {
|
647 |
-
OnecolumnCheckout.stepTo($(step), true);
|
648 |
-
}
|
649 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/firecheckout/js/prototype.sticky-kit.js
DELETED
@@ -1,273 +0,0 @@
|
|
1 |
-
// Generated by CoffeeScript 1.9.2
|
2 |
-
|
3 |
-
/**
|
4 |
-
@license Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net
|
5 |
-
*/
|
6 |
-
|
7 |
-
var StickInParent = function(opts) {
|
8 |
-
var doc, elm, enable_bottoming, fn, i, inner_scrolling, len, manual_spacer, offset_top, outer_width, parent_selector, recalc_every, sticky_class;
|
9 |
-
if (opts == null) {
|
10 |
-
opts = {};
|
11 |
-
}
|
12 |
-
sticky_class = opts.sticky_class, inner_scrolling = opts.inner_scrolling, recalc_every = opts.recalc_every, parent_selector = opts.parent, offset_top = opts.offset_top, manual_spacer = opts.spacer, enable_bottoming = opts.bottoming;
|
13 |
-
if (offset_top == null) {
|
14 |
-
offset_top = 0;
|
15 |
-
}
|
16 |
-
if (parent_selector == null) {
|
17 |
-
parent_selector = void 0;
|
18 |
-
}
|
19 |
-
if (inner_scrolling == null) {
|
20 |
-
inner_scrolling = true;
|
21 |
-
}
|
22 |
-
if (sticky_class == null) {
|
23 |
-
sticky_class = "is_stuck";
|
24 |
-
}
|
25 |
-
doc = $(document);
|
26 |
-
if (enable_bottoming == null) {
|
27 |
-
enable_bottoming = true;
|
28 |
-
}
|
29 |
-
outer_width = function(el) {
|
30 |
-
var computed, w;
|
31 |
-
if (window.getComputedStyle) {
|
32 |
-
computed = window.getComputedStyle(el);
|
33 |
-
w = parseFloat(computed.getPropertyValue("width")) + parseFloat(computed.getPropertyValue("margin-left")) + parseFloat(computed.getPropertyValue("margin-right"));
|
34 |
-
if (computed.getPropertyValue("box-sizing") !== "border-box") {
|
35 |
-
w += parseFloat(computed.getPropertyValue("border-left-width")) + parseFloat(computed.getPropertyValue("border-right-width")) + parseFloat(computed.getPropertyValue("padding-left")) + parseFloat(computed.getPropertyValue("padding-right"));
|
36 |
-
}
|
37 |
-
return w;
|
38 |
-
} else {
|
39 |
-
return el.getWidth() +
|
40 |
-
parseInt(el.getStyle("padding-left"), 10) +
|
41 |
-
parseInt(el.getStyle("padding-right"), 10) +
|
42 |
-
parseInt(el.getStyle("margin-left"), 10) +
|
43 |
-
parseInt(el.getStyle("margin-right"), 10);
|
44 |
-
}
|
45 |
-
};
|
46 |
-
fn = function(elm, padding_bottom, parent_top, parent_height, top, height, el_float, detached) {
|
47 |
-
var bottomed, detach, fixed, last_pos, last_scroll_height, offset, parent, recalc, recalc_and_tick, recalc_counter, spacer, tick;
|
48 |
-
if (elm.readAttribute("sticky_kit")) {
|
49 |
-
return;
|
50 |
-
}
|
51 |
-
elm.writeAttribute("sticky_kit", true);
|
52 |
-
last_scroll_height = document.body.getHeight();
|
53 |
-
parent = elm.up();
|
54 |
-
// if (parent_selector != null) {
|
55 |
-
// parent = parent.closest(parent_selector);
|
56 |
-
// }
|
57 |
-
if (!parent) {
|
58 |
-
throw "failed to find stick parent";
|
59 |
-
}
|
60 |
-
fixed = false;
|
61 |
-
bottomed = false;
|
62 |
-
spacer = manual_spacer != null ? manual_spacer && elm.closest(manual_spacer) : new Element("div");
|
63 |
-
if (spacer) {
|
64 |
-
spacer.setStyle('position', elm.getStyle('position'));
|
65 |
-
}
|
66 |
-
recalc = function() {
|
67 |
-
var border_top, padding_top, restore;
|
68 |
-
if (detached) {
|
69 |
-
return;
|
70 |
-
}
|
71 |
-
last_scroll_height = document.body.getHeight();
|
72 |
-
border_top = parseInt(parent.getStyle("border-top-width"), 10);
|
73 |
-
border_top = isNaN(border_top) ? 0 : border_top; // IE10 returns 'medium'
|
74 |
-
padding_top = parseInt(parent.getStyle("padding-top"), 10);
|
75 |
-
padding_bottom = parseInt(parent.getStyle("padding-bottom"), 10);
|
76 |
-
parent_top = parent.cumulativeOffset().top + border_top + padding_top;
|
77 |
-
parent_height = parent.getHeight();
|
78 |
-
if (fixed) {
|
79 |
-
fixed = false;
|
80 |
-
bottomed = false;
|
81 |
-
if (manual_spacer == null) {
|
82 |
-
spacer.insert({
|
83 |
-
after: elm
|
84 |
-
});
|
85 |
-
spacer.remove();
|
86 |
-
}
|
87 |
-
elm.setStyle({
|
88 |
-
position: "static",
|
89 |
-
top: "auto",
|
90 |
-
width: "",
|
91 |
-
bottom: "auto"
|
92 |
-
}).removeClassName(sticky_class);
|
93 |
-
restore = true;
|
94 |
-
}
|
95 |
-
top = elm.cumulativeOffset().top - (parseInt(elm.getStyle("margin-top"), 10) || 0) - offset_top;
|
96 |
-
height = elm.getDimensions().height + parseInt(elm.getStyle("margin-top"), 10) + parseInt(elm.getStyle("margin-bottom"), 10);
|
97 |
-
el_float = elm.getStyle("float");
|
98 |
-
if (spacer) {
|
99 |
-
spacer.setStyle({
|
100 |
-
width: outer_width(elm) + 'px',
|
101 |
-
height: height + 'px',
|
102 |
-
display: elm.getStyle("display"),
|
103 |
-
"vertical-align": elm.getStyle("vertical-align"),
|
104 |
-
"float": el_float
|
105 |
-
});
|
106 |
-
}
|
107 |
-
if (restore) {
|
108 |
-
return tick();
|
109 |
-
}
|
110 |
-
};
|
111 |
-
recalc();
|
112 |
-
// if (height === parent_height) {
|
113 |
-
// return;
|
114 |
-
// }
|
115 |
-
last_pos = void 0;
|
116 |
-
offset = offset_top;
|
117 |
-
recalc_counter = recalc_every;
|
118 |
-
tick = function() {
|
119 |
-
var css, delta, recalced, scroll, will_bottom, win_height;
|
120 |
-
if (detached) {
|
121 |
-
return;
|
122 |
-
}
|
123 |
-
recalced = false;
|
124 |
-
if (recalc_counter != null) {
|
125 |
-
recalc_counter -= 1;
|
126 |
-
if (recalc_counter <= 0) {
|
127 |
-
recalc_counter = recalc_every;
|
128 |
-
recalc();
|
129 |
-
recalced = true;
|
130 |
-
}
|
131 |
-
}
|
132 |
-
if (!recalced && document.body.getHeight() !== last_scroll_height) {
|
133 |
-
recalc();
|
134 |
-
recalced = true;
|
135 |
-
}
|
136 |
-
scroll = document.viewport.getScrollOffsets().top;
|
137 |
-
if (last_pos != null) {
|
138 |
-
delta = scroll - last_pos;
|
139 |
-
}
|
140 |
-
last_pos = scroll;
|
141 |
-
if (fixed) {
|
142 |
-
if (enable_bottoming) {
|
143 |
-
will_bottom = scroll + height + offset > parent_height + parent_top;
|
144 |
-
if (bottomed && !will_bottom) {
|
145 |
-
bottomed = false;
|
146 |
-
elm.setStyle({
|
147 |
-
position: "fixed",
|
148 |
-
bottom: "auto",
|
149 |
-
top: offset + 'px'
|
150 |
-
}).fire("sticky_kit:unbottom");
|
151 |
-
}
|
152 |
-
}
|
153 |
-
if (scroll < top) {
|
154 |
-
fixed = false;
|
155 |
-
offset = offset_top;
|
156 |
-
if (manual_spacer == null) {
|
157 |
-
if (el_float === "left" || el_float === "right") {
|
158 |
-
spacer.insert({
|
159 |
-
after: elm
|
160 |
-
});
|
161 |
-
}
|
162 |
-
spacer.remove();
|
163 |
-
}
|
164 |
-
css = {
|
165 |
-
position: "static",
|
166 |
-
width: "",
|
167 |
-
top: "auto"
|
168 |
-
};
|
169 |
-
elm.setStyle(css).removeClassName(sticky_class).fire("sticky_kit:unstick");
|
170 |
-
}
|
171 |
-
if (inner_scrolling) {
|
172 |
-
win_height = document.body.getHeight();
|
173 |
-
if (height + offset_top > win_height) {
|
174 |
-
if (!bottomed) {
|
175 |
-
offset -= delta;
|
176 |
-
offset = Math.max(win_height - height, offset);
|
177 |
-
offset = Math.min(offset_top, offset);
|
178 |
-
if (fixed) {
|
179 |
-
elm.setStyle({
|
180 |
-
top: offset + "px"
|
181 |
-
});
|
182 |
-
}
|
183 |
-
}
|
184 |
-
}
|
185 |
-
}
|
186 |
-
} else {
|
187 |
-
if (scroll > top) {
|
188 |
-
fixed = true;
|
189 |
-
css = {
|
190 |
-
position: "fixed",
|
191 |
-
top: offset + 'px'
|
192 |
-
};
|
193 |
-
css.width = elm.getStyle("box-sizing") === "border-box" ?
|
194 |
-
elm.getWidth() + parseInt(elm.getStyle("padding-left"), 10) + parseInt(elm.getStyle("padding-right"), 10) + "px"
|
195 |
-
: elm.getWidth() + "px";
|
196 |
-
elm.setStyle(css).addClassName(sticky_class);
|
197 |
-
if (manual_spacer == null) {
|
198 |
-
elm.insert({
|
199 |
-
after: spacer
|
200 |
-
});
|
201 |
-
if (el_float === "left" || el_float === "right") {
|
202 |
-
spacer.insert({
|
203 |
-
bottom: elm
|
204 |
-
});
|
205 |
-
}
|
206 |
-
}
|
207 |
-
elm.fire("sticky_kit:stick");
|
208 |
-
}
|
209 |
-
}
|
210 |
-
if (fixed && enable_bottoming) {
|
211 |
-
if (will_bottom == null) {
|
212 |
-
will_bottom = scroll + height + offset > parent_height + parent_top;
|
213 |
-
}
|
214 |
-
if (!bottomed && will_bottom) {
|
215 |
-
bottomed = true;
|
216 |
-
if (parent.getStyle("position") === "static") {
|
217 |
-
parent.setStyle({
|
218 |
-
position: "relative"
|
219 |
-
});
|
220 |
-
}
|
221 |
-
return elm.setStyle({
|
222 |
-
position: "absolute",
|
223 |
-
bottom: padding_bottom + 'px',
|
224 |
-
top: "auto"
|
225 |
-
}).fire("sticky_kit:bottom");
|
226 |
-
}
|
227 |
-
}
|
228 |
-
};
|
229 |
-
recalc_and_tick = function() {
|
230 |
-
recalc();
|
231 |
-
return tick();
|
232 |
-
};
|
233 |
-
detach = function() {
|
234 |
-
detached = true;
|
235 |
-
document.stopObserving("touchmove", tick);
|
236 |
-
document.stopObserving("scroll", tick);
|
237 |
-
document.stopObserving("resize", recalc_and_tick);
|
238 |
-
$(document.body).stopObserving("sticky_kit:recalc", recalc_and_tick);
|
239 |
-
elm.stopObserving("sticky_kit:detach", detach);
|
240 |
-
elm.writeAttribute("sticky_kit", false);
|
241 |
-
elm.setStyle({
|
242 |
-
position: "static",
|
243 |
-
bottom: "auto",
|
244 |
-
top: "auto",
|
245 |
-
width: ""
|
246 |
-
});
|
247 |
-
parent.setStyle("position", "static");
|
248 |
-
if (fixed) {
|
249 |
-
if (manual_spacer == null) {
|
250 |
-
if (el_float === "left" || el_float === "right") {
|
251 |
-
spacer.insert({
|
252 |
-
after: elm
|
253 |
-
});
|
254 |
-
// elm.insertAfter(spacer);
|
255 |
-
}
|
256 |
-
spacer.remove();
|
257 |
-
}
|
258 |
-
return elm.removeClassName(sticky_class);
|
259 |
-
}
|
260 |
-
};
|
261 |
-
document.observe("touchmove", tick);
|
262 |
-
document.observe("scroll", tick);
|
263 |
-
document.observe("resize", recalc_and_tick);
|
264 |
-
$(document.body).observe("sticky_kit:recalc", recalc_and_tick);
|
265 |
-
elm.observe("sticky_kit:detach", detach);
|
266 |
-
return setTimeout(tick, 0);
|
267 |
-
};
|
268 |
-
return {
|
269 |
-
stick: function(el) {
|
270 |
-
fn(el);
|
271 |
-
}
|
272 |
-
};
|
273 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/orderattachment/css/orderattachment.css
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
.orderattachment { margin: 0 0 10px; }
|
2 |
-
.orderattachment .validation-advice { padding: 0; background-image: none; min-height: 0; }
|
3 |
-
.list-attachments { margin: 10px 0 0; }
|
4 |
-
.list-attachments li { padding: 2px 0; }
|
5 |
-
.list-attachments li.disabled { opacity: .5; cursor: progress; }
|
6 |
-
.list-attachments .filename { display: inline-block; width: 25%; min-width: 150px; word-break: break-all; vertical-align: top; }
|
7 |
-
.list-attachments .comment { max-width: 50%; min-width: 200px; vertical-align: top; }
|
8 |
-
.list-attachments .btn-remove { cursor: pointer; display: inline-block; vertical-align: top; }
|
9 |
-
|
10 |
-
.order-attachments .col-file { width: 25%; max-width: 200px; word-wrap: break-word; }
|
11 |
-
.order-attachments .col-comment { width: 75%; }
|
12 |
-
.order-attachments .disabled { opacity: .5; cursor: progress; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/quickshopping/css/quickshopping.css
DELETED
@@ -1,287 +0,0 @@
|
|
1 |
-
.category-products .item,
|
2 |
-
.catalog-listing .item { position: relative; }
|
3 |
-
|
4 |
-
.category-products .quickshoppinglink,
|
5 |
-
.catalog-listing .quickshoppinglink {
|
6 |
-
background: #eee;
|
7 |
-
border: 1px solid #bbb;
|
8 |
-
border-radius: 3px;
|
9 |
-
-webkit-box-shadow: inset 0 0 1px 1px #f6f6f6;
|
10 |
-
box-shadow: inset 0 0 1px 1px #f6f6f6;
|
11 |
-
color: #333;
|
12 |
-
line-height: normal;
|
13 |
-
font-size: 12px;
|
14 |
-
padding: 7px 10px;
|
15 |
-
text-align: center;
|
16 |
-
text-decoration: none;
|
17 |
-
text-shadow: 0 1px 0 #fff;
|
18 |
-
position: absolute;
|
19 |
-
left: 0px;
|
20 |
-
top: 0px;
|
21 |
-
display: none;
|
22 |
-
z-index: 11; /*prolabels fix*/
|
23 |
-
}
|
24 |
-
.category-products .quickshoppinglink:hover,
|
25 |
-
.catalog-listing .quickshoppinglink:hover {
|
26 |
-
background: #e4e4e4;
|
27 |
-
-webkit-box-shadow: inset 0 0 1px 1px #eaeaea;
|
28 |
-
box-shadow: inset 0 0 1px 1px #eaeaea;
|
29 |
-
color: #222;
|
30 |
-
cursor: pointer;
|
31 |
-
}
|
32 |
-
.category-products .quickshoppinglink:active,
|
33 |
-
.catalog-listing .quickshoppinglink:active {
|
34 |
-
background: #dadada;
|
35 |
-
-webkit-box-shadow: inset 0 0 1px 1px #e3e3e3;
|
36 |
-
box-shadow: inset 0 0 1px 1px #e3e3e3;
|
37 |
-
color: #000;
|
38 |
-
}
|
39 |
-
.product-view .quickshoppinglink {}
|
40 |
-
|
41 |
-
.q-shopping {}
|
42 |
-
.q-shopping .block-layered-nav { display: none; }
|
43 |
-
.q-shopping .product-essential { padding: 5px 10px 10px; background: none; }
|
44 |
-
.q-shopping .product-collateral { padding: 10px; }
|
45 |
-
.q-shopping .product-view { border: none; float: none; width: auto; min-height: 0; min-width: 0; background: none; padding: 0; }
|
46 |
-
.q-shopping .product-view .product-img-box { width: 40%; margin: 0; float: left; padding: 0; }
|
47 |
-
.q-shopping .product-view .product-img-box .product-image { text-align: center; }
|
48 |
-
.q-shopping .product-view .product-img-box img { max-width: 100%; }
|
49 |
-
.q-shopping .product-view .more-views li { display: inline-block; }
|
50 |
-
.q-shopping .product-view .product-shop { width: 58%; float: right; margin: 0; padding: 0; }
|
51 |
-
.q-shopping .product-view .product-shop .product-name { float: none; }
|
52 |
-
.q-shopping .product-view .product-shop .availability { clear: both; float: none; }
|
53 |
-
.q-shopping .product-view .product-shop .price-box { display: block; }
|
54 |
-
.q-shopping .product-view .product-shop .add-to-box { clear: both; }
|
55 |
-
.q-shopping .product-view .product-shop .add-to-box .or { display: none; }
|
56 |
-
.q-shopping .product-view .product-shop .add-to-box .add-to-links,
|
57 |
-
.q-shopping .product-view .product-shop .add-to-links { margin-top: 10px; float: left; clear: both; }
|
58 |
-
.q-shopping .product-view .product-shop .price-as-configured { display: none; }
|
59 |
-
.q-shopping .product-view .product-shop .short-description { margin-top: 8px; clear: both; }
|
60 |
-
.q-shopping .product-collateral .box-collateral { margin: 0 0 10px; }
|
61 |
-
.q-shopping .product-collateral h2,
|
62 |
-
.q-shopping .product-collateral .h2 { margin: 7px 0 5px !important; }
|
63 |
-
.q-shopping .product-view .products-grid .product-image { width: 120px; height: 120px; }
|
64 |
-
.q-shopping .product-view .products-grid img { max-width: 100%; max-height: 100%; }
|
65 |
-
.q-shopping .product-view .quickshoppinglink { display: none; }
|
66 |
-
.q-shopping #messages_product_view { margin: 0 10px; }
|
67 |
-
|
68 |
-
/* scp_integration */
|
69 |
-
.q-shopping .product-view .product-img-box .product-image-zoom { width: auto; }
|
70 |
-
|
71 |
-
.q-shopping-navigation { width: 100%; margin: 0 0 10px; }
|
72 |
-
.q-shopping-navigation td { width: 33%; }
|
73 |
-
|
74 |
-
/* lightwindow styles */
|
75 |
-
#lightwindow_overlay {
|
76 |
-
display: none;
|
77 |
-
visibility: hidden;
|
78 |
-
position: absolute;
|
79 |
-
top: 0;
|
80 |
-
left: 0;
|
81 |
-
width: 100%;
|
82 |
-
height: 100px;
|
83 |
-
z-index: 994;
|
84 |
-
}
|
85 |
-
#lightwindow {
|
86 |
-
display: none;
|
87 |
-
visibility: hidden;
|
88 |
-
position: absolute;
|
89 |
-
z-index: 995;
|
90 |
-
}
|
91 |
-
#lightwindow_container {
|
92 |
-
display: none;
|
93 |
-
visibility: hidden;
|
94 |
-
position: absolute;
|
95 |
-
padding: 0;
|
96 |
-
margin: 0;
|
97 |
-
text-align: left;
|
98 |
-
border: none;
|
99 |
-
background: #fff;
|
100 |
-
box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.4);
|
101 |
-
border-radius: 3px;
|
102 |
-
}
|
103 |
-
* html #lightwindow_container {
|
104 |
-
overflow: hidden;
|
105 |
-
}
|
106 |
-
|
107 |
-
#lightwindow_contents {
|
108 |
-
overflow: hidden;
|
109 |
-
z-index: 0;
|
110 |
-
position: relative;
|
111 |
-
/*border: 10px solid #fff;
|
112 |
-
border-width: 0 0 10px;*/
|
113 |
-
margin-top: 0px;
|
114 |
-
}
|
115 |
-
|
116 |
-
#lightwindow_loading {
|
117 |
-
height: 100%;
|
118 |
-
width: 100%;
|
119 |
-
top: -15px;
|
120 |
-
left: 0px;
|
121 |
-
z-index: 9999;
|
122 |
-
position: absolute;
|
123 |
-
/*padding: 10px;*/
|
124 |
-
background: url(../images/ajax-loading.gif) no-repeat 50% 50%;
|
125 |
-
}
|
126 |
-
|
127 |
-
#lightwindow_loading_shim {
|
128 |
-
display: none;
|
129 |
-
left: 0px;
|
130 |
-
position: absolute;
|
131 |
-
top: 0px;
|
132 |
-
width: 100%;
|
133 |
-
height: 100%;
|
134 |
-
}
|
135 |
-
|
136 |
-
#lightwindow_loading span {
|
137 |
-
font-size: 12px;
|
138 |
-
line-height: 32px;
|
139 |
-
color: #444444;
|
140 |
-
float: left;
|
141 |
-
padding: 0 10px 0 0;
|
142 |
-
}
|
143 |
-
|
144 |
-
#lightwindow_loading span a, #lightwindow_loading span a:link, #lightwindow_loading span a:visited {
|
145 |
-
color: #09F;
|
146 |
-
text-decoration: none;
|
147 |
-
cursor: pointer;
|
148 |
-
}
|
149 |
-
|
150 |
-
#lightwindow_loading span a:hover, #lightwindow_loading span a:active {
|
151 |
-
text-decoration: underline;
|
152 |
-
}
|
153 |
-
|
154 |
-
#lightwindow_loading img {
|
155 |
-
float: left;
|
156 |
-
margin: 0 10px 0 0;
|
157 |
-
}
|
158 |
-
|
159 |
-
#lightwindow_navigation {
|
160 |
-
position: absolute;
|
161 |
-
right: 33px;
|
162 |
-
top: 7px;
|
163 |
-
z-index: 2;
|
164 |
-
width: 35px;
|
165 |
-
/*display: none;*/
|
166 |
-
}
|
167 |
-
|
168 |
-
#lightwindow_navigation a, #lightwindow_navigation a:link, #lightwindow_navigation a:visited, #lightwindow_navigation a:hover, #lightwindow_navigation a:active {
|
169 |
-
outline: none;
|
170 |
-
}
|
171 |
-
|
172 |
-
#lightwindow_previous, #lightwindow_next {
|
173 |
-
background: url(../images/controls.gif) -1000px -1000px no-repeat;
|
174 |
-
display: block;
|
175 |
-
width: 17px;
|
176 |
-
height: 17px;
|
177 |
-
opacity: 0.5;
|
178 |
-
filter: alpha(opacity="50");
|
179 |
-
}
|
180 |
-
|
181 |
-
#lightwindow_previous {
|
182 |
-
background-position: 0 -154px;
|
183 |
-
float: left;
|
184 |
-
}
|
185 |
-
|
186 |
-
#lightwindow_next {
|
187 |
-
background-position: 100% -308px;
|
188 |
-
float: right;
|
189 |
-
}
|
190 |
-
|
191 |
-
#lightwindow_previous:hover, #lightwindow_previous:active,
|
192 |
-
#lightwindow_next:hover, #lightwindow_next:active { opacity: 1; filter: alpha(opacity="100"); }
|
193 |
-
#lightwindow_previous_title, #lightwindow_next_title { text-indent: -9999px; }
|
194 |
-
|
195 |
-
#lightwindow_data {
|
196 |
-
position: absolute;
|
197 |
-
}
|
198 |
-
|
199 |
-
#lightwindow_data_slide {
|
200 |
-
position: relative;
|
201 |
-
}
|
202 |
-
|
203 |
-
#lightwindow_data_slide_inner {
|
204 |
-
background-color: #ffffff;
|
205 |
-
padding: 0 10px 10px 10px;
|
206 |
-
}
|
207 |
-
|
208 |
-
#lightwindow_data_caption {
|
209 |
-
padding: 10px 0 0 0;
|
210 |
-
color: #666666;
|
211 |
-
line-height: 25px;
|
212 |
-
background-color: #ffffff;
|
213 |
-
clear: both;
|
214 |
-
}
|
215 |
-
|
216 |
-
#lightwindow_data_details {
|
217 |
-
background-color: #f0f0f0;
|
218 |
-
padding: 0 10px 0 10px;
|
219 |
-
height: 20px;
|
220 |
-
}
|
221 |
-
|
222 |
-
#lightwindow_title_bar {
|
223 |
-
zoom: 1;
|
224 |
-
overflow: hidden;
|
225 |
-
position: relative;
|
226 |
-
z-index: 1;
|
227 |
-
padding: 0;
|
228 |
-
height: 31px;
|
229 |
-
}
|
230 |
-
|
231 |
-
#lightwindow_title_bar_title {
|
232 |
-
font-size: 13px;
|
233 |
-
font-weight: bold;
|
234 |
-
line-height: 25px;
|
235 |
-
text-align: left;
|
236 |
-
float: left;
|
237 |
-
width: 515px;
|
238 |
-
}
|
239 |
-
|
240 |
-
#lightwindow_title_bar_close_link, #lightwindow_title_bar_close_link:visited {
|
241 |
-
width: 17px;
|
242 |
-
height: 17px;
|
243 |
-
background: url(../images/controls.gif) no-repeat 0 0;
|
244 |
-
position: absolute;
|
245 |
-
right: 3px;
|
246 |
-
top: 7px;
|
247 |
-
text-indent: -9999px;
|
248 |
-
text-align: left;
|
249 |
-
cursor: pointer;
|
250 |
-
line-height: 25px;
|
251 |
-
padding: 0;
|
252 |
-
margin: 0;
|
253 |
-
opacity: 0.5;
|
254 |
-
filter: alpha(opacity="50");
|
255 |
-
}
|
256 |
-
#lightwindow_title_bar_close_link:active, #lightwindow_title_bar_close_link:hover {
|
257 |
-
opacity: 1;
|
258 |
-
filter: alpha(opacity="100");
|
259 |
-
}
|
260 |
-
|
261 |
-
#lightwindow_title_bar_inner {
|
262 |
-
padding: 3px 9px;
|
263 |
-
text-align: right;
|
264 |
-
overflow: hidden;
|
265 |
-
zoom: 1;
|
266 |
-
}
|
267 |
-
/* eo lightwindow styles */
|
268 |
-
|
269 |
-
@media (max-width: 480px) {
|
270 |
-
.category-products .quickshoppinglink,
|
271 |
-
.catalog-listing .quickshoppinglink { margin-left: -9999px; }
|
272 |
-
|
273 |
-
.q-shopping .product-view .product-img-box,
|
274 |
-
.q-shopping .product-view .product-shop { float: none; width: auto; clear: both; }
|
275 |
-
.q-shopping .product-view .product-img-box { margin: 0 0 10px; }
|
276 |
-
.q-shopping .product-view .product-img-box .product-image { float: none; width: auto; }
|
277 |
-
.q-shopping .product-view .product-img-box .more-views h2 { display: none; }
|
278 |
-
.q-shopping .product-view .products-grid td { padding: 7px 5px 5px; }
|
279 |
-
.q-shopping .product-view .products-grid .product-name { font-size: 11px; }
|
280 |
-
.q-shopping .product-view .products-grid .ratings { display: none; }
|
281 |
-
.q-shopping .product-view .products-grid .product-image { width: 55px; height: 55px; }
|
282 |
-
.q-shopping .product-view .box-tags .form-add .input-box { width: 60%; }
|
283 |
-
.q-shopping .product-view .box-tags .form-add input.input-text { width: 100%; }
|
284 |
-
}
|
285 |
-
|
286 |
-
.q-shopping .product-view .product-img-box { zoom: 1; }
|
287 |
-
.q-shopping .product-view .product-img-box:after { content: '.'; clear: both; visibility: hidden; font-size: 0; height: 0; display: block; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/quickshopping/images/ajax-loading.gif
DELETED
Binary file
|
skin/frontend/base/default/tm/quickshopping/images/black-70.png
DELETED
Binary file
|
skin/frontend/base/default/tm/quickshopping/images/black.png
DELETED
Binary file
|
skin/frontend/base/default/tm/quickshopping/images/controls.gif
DELETED
Binary file
|
skin/frontend/base/default/tm/quickshopping/js/configurableswatches.js
DELETED
@@ -1,60 +0,0 @@
|
|
1 |
-
// configurable swatches integration
|
2 |
-
document.observe("dom:loaded", function () {
|
3 |
-
if ('undefined' !== typeof ProductMediaManager) {
|
4 |
-
ProductMediaManager.createZoom = ProductMediaManager.createZoom.wrap(function(original, image) {
|
5 |
-
original(image);
|
6 |
-
|
7 |
-
var img = $j('.q-shopping .product-image img');
|
8 |
-
if (!img.length) {
|
9 |
-
return;
|
10 |
-
}
|
11 |
-
|
12 |
-
// prevent image size increasing
|
13 |
-
if (!img.hasClass('resized') && img.height()) {
|
14 |
-
img.addClass('resized')
|
15 |
-
.css({
|
16 |
-
'max-height': img.height()
|
17 |
-
});
|
18 |
-
}
|
19 |
-
|
20 |
-
$j('.q-shopping .product-image a').attr('href', image.attr('src'));
|
21 |
-
var srcset = img.attr('srcset'),
|
22 |
-
newSrc = image.attr('src');
|
23 |
-
img.attr('src', newSrc);
|
24 |
-
|
25 |
-
if (srcset) {
|
26 |
-
if (image.attr('srcset')) {
|
27 |
-
img.attr('srcset', image.attr('srcset'));
|
28 |
-
} else {
|
29 |
-
var newSrcset = '';
|
30 |
-
srcset.split(',').each(function(rule) {
|
31 |
-
rule = rule.split(' ');
|
32 |
-
newSrcset = newSrc + ' ' + rule[1];
|
33 |
-
});
|
34 |
-
img.attr('srcset', newSrcset);
|
35 |
-
}
|
36 |
-
}
|
37 |
-
});
|
38 |
-
ProductMediaManager.swapImage = ProductMediaManager.swapImage.wrap(function(original, targetImage) {
|
39 |
-
original(targetImage);
|
40 |
-
|
41 |
-
var imageGallery = $j('.q-shopping .product-img-box');
|
42 |
-
if (!imageGallery.length) {
|
43 |
-
return;
|
44 |
-
}
|
45 |
-
|
46 |
-
// targetImage = $j(targetImage);
|
47 |
-
// targetImage.addClass('gallery-image');
|
48 |
-
|
49 |
-
if (targetImage[0].complete) {
|
50 |
-
// ProductMediaManager.createZoom(targetImage);
|
51 |
-
} else {
|
52 |
-
imageGallery.addClass('loading');
|
53 |
-
imagesLoaded(targetImage, function() {
|
54 |
-
imageGallery.removeClass('loading');
|
55 |
-
// ProductMediaManager.createZoom(targetImage);
|
56 |
-
});
|
57 |
-
}
|
58 |
-
});
|
59 |
-
}
|
60 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/quickshopping/js/quickshopping.button.js
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
var QuickviewButton = Class.create();
|
2 |
-
QuickviewButton.prototype = {
|
3 |
-
initialize: function(parent)
|
4 |
-
{
|
5 |
-
var that = this;
|
6 |
-
$$(parent).each(function(el, index){
|
7 |
-
el.observe('mouseover', that.showButton);
|
8 |
-
el.observe('mouseout', that.hideButton);
|
9 |
-
});
|
10 |
-
},
|
11 |
-
|
12 |
-
showButton: function(e)
|
13 |
-
{
|
14 |
-
el = this;
|
15 |
-
while (el.tagName != 'LI') {
|
16 |
-
el = el.up();
|
17 |
-
}
|
18 |
-
var link = $(el).select('.quickshoppinglink')[0];
|
19 |
-
link && link.setStyle({
|
20 |
-
display: 'block'
|
21 |
-
});
|
22 |
-
},
|
23 |
-
|
24 |
-
hideButton: function(e)
|
25 |
-
{
|
26 |
-
el = this;
|
27 |
-
while (el.tagName != 'LI') {
|
28 |
-
el = el.up();
|
29 |
-
}
|
30 |
-
var link = $(el).select('.quickshoppinglink')[0];
|
31 |
-
link && link.setStyle({
|
32 |
-
display: 'none'
|
33 |
-
});
|
34 |
-
}
|
35 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/tm/quickshopping/js/quickshopping.window.js
DELETED
@@ -1,1038 +0,0 @@
|
|
1 |
-
// lightwindow.js v2.0
|
2 |
-
// Copyright (c) 2007 stickmanlabs
|
3 |
-
// Author: Kevin P Miller | http://www.stickmanlabs.com
|
4 |
-
// LightWindow is freely distributable under the terms of an MIT-style license.
|
5 |
-
/*-----------------------------------------------------------------------------------------------*/
|
6 |
-
|
7 |
-
// This will stop image flickering in IE6 when elements with images are moved
|
8 |
-
try {
|
9 |
-
document.execCommand("BackgroundImageCache", false, true);
|
10 |
-
} catch(e) {}
|
11 |
-
|
12 |
-
var lightwindow = Class.create();
|
13 |
-
lightwindow.prototype = {
|
14 |
-
//
|
15 |
-
// Setup Variables
|
16 |
-
//
|
17 |
-
element : null,
|
18 |
-
contentToFetch : null,
|
19 |
-
windowActive : false,
|
20 |
-
dataEffects : [],
|
21 |
-
dimensions : {
|
22 |
-
cruft : null,
|
23 |
-
container : null,
|
24 |
-
viewport : {
|
25 |
-
height : null,
|
26 |
-
width : null,
|
27 |
-
offsetTop : null,
|
28 |
-
offsetLeft : null
|
29 |
-
}
|
30 |
-
},
|
31 |
-
pagePosition : {
|
32 |
-
x : 0,
|
33 |
-
y : 0
|
34 |
-
},
|
35 |
-
pageDimensions : {
|
36 |
-
width : null,
|
37 |
-
height : null
|
38 |
-
},
|
39 |
-
resizeTo : {
|
40 |
-
height : null,
|
41 |
-
heightPercent : null,
|
42 |
-
width : null,
|
43 |
-
widthPercent : null,
|
44 |
-
fixedTop : null,
|
45 |
-
fixedLeft : null
|
46 |
-
},
|
47 |
-
scrollbarOffset : 18,
|
48 |
-
navigationObservers : {
|
49 |
-
previous : 'lightwindow_previous',
|
50 |
-
next : 'lightwindow_next'
|
51 |
-
},
|
52 |
-
containerChange : {
|
53 |
-
height : 0,
|
54 |
-
width : 0
|
55 |
-
},
|
56 |
-
//
|
57 |
-
// Initialize the lightwindow.
|
58 |
-
//
|
59 |
-
initialize : function(options) {
|
60 |
-
$('lightwindow') && $('lightwindow').remove();
|
61 |
-
$('lightwindow_overlay') && $('lightwindow_overlay').remove();
|
62 |
-
this.options = Object.extend({
|
63 |
-
skinpath : '',
|
64 |
-
resizeSpeed : 1,
|
65 |
-
contentOffset : {
|
66 |
-
height : 10,
|
67 |
-
width : 0
|
68 |
-
},
|
69 |
-
dimensions : {
|
70 |
-
external : {height : 250, width : 450}
|
71 |
-
},
|
72 |
-
classNames : {
|
73 |
-
standard : 'lightwindow',
|
74 |
-
action : 'lightwindow_action'
|
75 |
-
},
|
76 |
-
viewportPadding : 10,
|
77 |
-
overlay : {
|
78 |
-
opacity : 0.7,
|
79 |
-
image : options.skinpath+'black.png',
|
80 |
-
presetImage : options.skinpath+'black-70.png'
|
81 |
-
},
|
82 |
-
skin : {
|
83 |
-
main : '<div id="lightwindow_container" >'+
|
84 |
-
'<div id="lightwindow_stage" >'+
|
85 |
-
'<div id="lightwindow_title_bar" >'+
|
86 |
-
'<div id="lightwindow_title_bar_inner" >'+
|
87 |
-
'<span id="lightwindow_title_bar_title"></span>'+
|
88 |
-
'<a id="lightwindow_title_bar_close_link" >close</a>'+
|
89 |
-
'</div>'+
|
90 |
-
'</div>'+
|
91 |
-
'<div id="lightwindow_contents" >'+
|
92 |
-
'</div>'+
|
93 |
-
'<div id="lightwindow_navigation" >'+
|
94 |
-
'<a href="#" id="lightwindow_previous" >'+
|
95 |
-
'<span id="lightwindow_previous_title"></span>'+
|
96 |
-
'</a>'+
|
97 |
-
'<a href="#" id="lightwindow_next" >'+
|
98 |
-
'<span id="lightwindow_next_title"></span>'+
|
99 |
-
'</a>'+
|
100 |
-
'</div>'+
|
101 |
-
'</div>'+
|
102 |
-
'</div>',
|
103 |
-
loading : '<div id="lightwindow_loading" >'+
|
104 |
-
'<iframe name="lightwindow_loading_shim" id="lightwindow_loading_shim" src="javascript:false;" frameBorder="0" scrolling="no"></iframe>'+
|
105 |
-
'</div>'
|
106 |
-
},
|
107 |
-
hideFlash : false
|
108 |
-
}, options || {});
|
109 |
-
this.duration = ((11-this.options.resizeSpeed)*0.15);
|
110 |
-
this._setupLinks();
|
111 |
-
this._getScroll();
|
112 |
-
this._getPageDimensions();
|
113 |
-
this._browserDimensions();
|
114 |
-
this._addLightWindowMarkup(false);
|
115 |
-
this._setupDimensions();
|
116 |
-
this._toggleTroubleElements('visible', false);
|
117 |
-
},
|
118 |
-
//
|
119 |
-
// Activate the lightwindow.
|
120 |
-
//
|
121 |
-
activate : function(e, link){
|
122 |
-
// Clear out the window Contents
|
123 |
-
this._clearWindowContents();
|
124 |
-
|
125 |
-
// Add back in out loading panel
|
126 |
-
this._addLoadingWindowMarkup();
|
127 |
-
|
128 |
-
// Setup the element properties
|
129 |
-
this._setupWindowElements(link);
|
130 |
-
|
131 |
-
// Setup everything
|
132 |
-
this._getScroll();
|
133 |
-
this._browserDimensions();
|
134 |
-
this._setupDimensions();
|
135 |
-
this._toggleTroubleElements('hidden', false);
|
136 |
-
this._displayLightWindow('block', 'hidden');
|
137 |
-
this._setStatus(true);
|
138 |
-
this._monitorKeyboard(true);
|
139 |
-
this._prepareIE(true);
|
140 |
-
this._loadWindow();
|
141 |
-
},
|
142 |
-
//
|
143 |
-
// Turn off the window
|
144 |
-
//
|
145 |
-
deactivate : function(){
|
146 |
-
// The window is not active
|
147 |
-
this.windowActive = false;
|
148 |
-
|
149 |
-
// Kill the animation
|
150 |
-
this.animating = false;
|
151 |
-
|
152 |
-
// Clear our element
|
153 |
-
this.element = null;
|
154 |
-
|
155 |
-
$('lightwindow_previous').setStyle({
|
156 |
-
visibility: 'hidden'
|
157 |
-
});
|
158 |
-
$('lightwindow_next').setStyle({
|
159 |
-
visibility: 'hidden'
|
160 |
-
});
|
161 |
-
|
162 |
-
// hide the window.
|
163 |
-
this._displayLightWindow('none', 'visible');
|
164 |
-
|
165 |
-
// Clear out the window Contents
|
166 |
-
this._clearWindowContents();
|
167 |
-
|
168 |
-
// Stop all animation
|
169 |
-
var queue = Effect.Queues.get('lightwindowAnimation').each(function(e){
|
170 |
-
e.cancel();
|
171 |
-
});
|
172 |
-
|
173 |
-
// Undo the setup
|
174 |
-
this._prepareIE(false);
|
175 |
-
this._setupDimensions();
|
176 |
-
this._toggleTroubleElements('visible', false);
|
177 |
-
this._monitorKeyboard(false);
|
178 |
-
},
|
179 |
-
//
|
180 |
-
// Initialize specific window
|
181 |
-
//
|
182 |
-
createWindow : function(element, attributes) {
|
183 |
-
this._processLink($(element));
|
184 |
-
},
|
185 |
-
//
|
186 |
-
// Reload the window with another location
|
187 |
-
//
|
188 |
-
openWindow : function(element) {
|
189 |
-
var element = $(element);
|
190 |
-
|
191 |
-
if (!element) {
|
192 |
-
return;
|
193 |
-
}
|
194 |
-
|
195 |
-
// The window is active
|
196 |
-
this.windowActive = true;
|
197 |
-
|
198 |
-
// Clear out the window Contents
|
199 |
-
this._clearWindowContents();
|
200 |
-
|
201 |
-
// Add back in out loading panel
|
202 |
-
this._addLoadingWindowMarkup();
|
203 |
-
|
204 |
-
// Setup the element properties
|
205 |
-
this._setupWindowElements(element);
|
206 |
-
|
207 |
-
this._setStatus(true);
|
208 |
-
this._loadWindow();
|
209 |
-
},
|
210 |
-
//
|
211 |
-
// Navigate the window
|
212 |
-
//
|
213 |
-
navigateWindow : function(direction) {
|
214 |
-
if (direction == 'previous') {
|
215 |
-
this.openWindow(this.navigationObservers.previous);
|
216 |
-
} else if (direction == 'next') {
|
217 |
-
this.openWindow(this.navigationObservers.next);
|
218 |
-
}
|
219 |
-
},
|
220 |
-
|
221 |
-
//
|
222 |
-
// Set Links Up
|
223 |
-
//
|
224 |
-
_setupLinks : function() {
|
225 |
-
var links = $$('.'+this.options.classNames.standard);
|
226 |
-
links.each(function(link) {
|
227 |
-
this._processLink(link);
|
228 |
-
}.bind(this));
|
229 |
-
},
|
230 |
-
//
|
231 |
-
// Process a Link
|
232 |
-
//
|
233 |
-
_processLink : function(link) {
|
234 |
-
// Take care of our inline content
|
235 |
-
var url = link.getAttribute('href');
|
236 |
-
if (url.indexOf('?') > -1) {
|
237 |
-
url = url.substring(0, url.indexOf('?'));
|
238 |
-
}
|
239 |
-
|
240 |
-
var container = url.substring(url.indexOf('#')+1);
|
241 |
-
if($(container)) {
|
242 |
-
$(container).setStyle({
|
243 |
-
display : 'none'
|
244 |
-
});
|
245 |
-
}
|
246 |
-
|
247 |
-
var func = this.activate.bindAsEventListener(this, link);
|
248 |
-
Event.stopObserving(link, 'click');
|
249 |
-
Event.observe(link, 'click', func, false);
|
250 |
-
link.onclick = function() {return false;};
|
251 |
-
},
|
252 |
-
//
|
253 |
-
// Add the markup to the page.
|
254 |
-
//
|
255 |
-
_addLightWindowMarkup : function(rebuild) {
|
256 |
-
var overlay = Element.extend(document.createElement('div'));
|
257 |
-
overlay.setAttribute('id', 'lightwindow_overlay');
|
258 |
-
// FF Mac has a problem with putting Flash above a layer without a 100% opacity background, so we need to use a pre-made
|
259 |
-
if (Prototype.Browser.Gecko || Prototype.Browser.IE) {
|
260 |
-
overlay.setStyle({
|
261 |
-
backgroundImage: 'url('+this.options.overlay.presetImage+')',
|
262 |
-
backgroundRepeat: 'repeat',
|
263 |
-
height: this.pageDimensions.height+'px'
|
264 |
-
});
|
265 |
-
} else {
|
266 |
-
overlay.setStyle({
|
267 |
-
opacity: this.options.overlay.opacity,
|
268 |
-
backgroundImage: 'url('+this.options.overlay.image+')',
|
269 |
-
backgroundRepeat: 'repeat',
|
270 |
-
height: this.pageDimensions.height+'px'
|
271 |
-
});
|
272 |
-
}
|
273 |
-
|
274 |
-
// fix for slowly loaded images, that affects page height
|
275 |
-
var self = this;
|
276 |
-
Event.observe(window, 'load', function() {
|
277 |
-
self._getPageDimensions.bind(self)();
|
278 |
-
$('lightwindow_overlay').setStyle({
|
279 |
-
height: self.pageDimensions.height + 'px'
|
280 |
-
});
|
281 |
-
});
|
282 |
-
|
283 |
-
var lw = document.createElement('div');
|
284 |
-
lw.setAttribute('id', 'lightwindow');
|
285 |
-
lw.innerHTML = this.options.skin.main;
|
286 |
-
|
287 |
-
var body = document.getElementsByTagName('body')[0];
|
288 |
-
body.appendChild(overlay);
|
289 |
-
body.appendChild(lw);
|
290 |
-
|
291 |
-
var close = $(lw).down('#lightwindow_title_bar_close_link');
|
292 |
-
if (close) {
|
293 |
-
Event.stopObserving(close, 'click');
|
294 |
-
Event.observe(close, 'click', this.deactivate.bindAsEventListener(this));
|
295 |
-
close.onclick = function() {return false;};
|
296 |
-
}
|
297 |
-
|
298 |
-
Event.stopObserving($('lightwindow_previous'), 'click');
|
299 |
-
Event.observe($('lightwindow_previous'), 'click', this.navigateWindow.bind(this, 'previous'), false);
|
300 |
-
$('lightwindow_previous').onclick = function() {return false;};
|
301 |
-
Event.stopObserving($('lightwindow_next'), 'click');
|
302 |
-
Event.observe($('lightwindow_next'), 'click', this.navigateWindow.bind(this, 'next'), false);
|
303 |
-
$('lightwindow_next').onclick = function() {return false;};
|
304 |
-
|
305 |
-
$('lightwindow_previous').setStyle({
|
306 |
-
visibility: 'hidden'
|
307 |
-
});
|
308 |
-
$('lightwindow_next').setStyle({
|
309 |
-
visibility: 'hidden'
|
310 |
-
});
|
311 |
-
|
312 |
-
// Because we use position absolute, kill the scroll Wheel on animations
|
313 |
-
if (Prototype.Browser.IE) {
|
314 |
-
Event.observe(document, 'mousewheel', this._stopScrolling.bindAsEventListener(this), false);
|
315 |
-
} else {
|
316 |
-
Event.observe(window, 'DOMMouseScroll', this._stopScrolling.bindAsEventListener(this), false);
|
317 |
-
}
|
318 |
-
|
319 |
-
Event.stopObserving(overlay, 'click');
|
320 |
-
Event.observe(overlay, 'click', this.deactivate.bindAsEventListener(this), false);
|
321 |
-
overlay.onclick = function() {return false;};
|
322 |
-
},
|
323 |
-
//
|
324 |
-
// Add loading window markup
|
325 |
-
//
|
326 |
-
_addLoadingWindowMarkup : function() {
|
327 |
-
$('lightwindow_contents').innerHTML += this.options.skin.loading;
|
328 |
-
},
|
329 |
-
//
|
330 |
-
// Setup the window elements
|
331 |
-
//
|
332 |
-
_setupWindowElements : function(link) {
|
333 |
-
this.element = link;
|
334 |
-
this.element.title = null ? '' : link.getAttribute('title');
|
335 |
-
this.element.author = null ? '' : link.getAttribute('author');
|
336 |
-
this.element.caption = null ? '' : link.getAttribute('caption');
|
337 |
-
this.element.rel = null ? '' : link.getAttribute('rel');
|
338 |
-
this.element.params = null ? '' : link.getAttribute('params');
|
339 |
-
|
340 |
-
// Set the window type
|
341 |
-
this.contentToFetch = this.element.href;
|
342 |
-
},
|
343 |
-
//
|
344 |
-
// Clear the window contents out
|
345 |
-
//
|
346 |
-
_clearWindowContents : function() {
|
347 |
-
// Empty the contents
|
348 |
-
$('lightwindow_contents').innerHTML = '';
|
349 |
-
|
350 |
-
// Reset the scroll bars
|
351 |
-
$('lightwindow_contents').setStyle({
|
352 |
-
overflow: 'hidden'
|
353 |
-
});
|
354 |
-
|
355 |
-
$('lightwindow_title_bar_title').innerHTML = '';
|
356 |
-
},
|
357 |
-
//
|
358 |
-
// Set the status of our animation to keep things from getting clunky
|
359 |
-
//
|
360 |
-
_setStatus : function(status) {
|
361 |
-
this.animating = status;
|
362 |
-
if (status) {
|
363 |
-
Element.show('lightwindow_loading');
|
364 |
-
}
|
365 |
-
if (!(/MSIE 6./i.test(navigator.userAgent))) {
|
366 |
-
this._fixedWindow(status);
|
367 |
-
}
|
368 |
-
},
|
369 |
-
//
|
370 |
-
// Make this window Fixed
|
371 |
-
//
|
372 |
-
_fixedWindow : function(status) {
|
373 |
-
if (status) {
|
374 |
-
if (this.windowActive) {
|
375 |
-
this._getScroll();
|
376 |
-
$('lightwindow').setStyle({
|
377 |
-
position: 'absolute',
|
378 |
-
top: parseFloat($('lightwindow').getStyle('top'))+this.pagePosition.y+'px',
|
379 |
-
left: parseFloat($('lightwindow').getStyle('left'))+this.pagePosition.x+'px'
|
380 |
-
});
|
381 |
-
} else {
|
382 |
-
$('lightwindow').setStyle({
|
383 |
-
position: 'absolute'
|
384 |
-
});
|
385 |
-
}
|
386 |
-
} else {
|
387 |
-
if (this.windowActive) {
|
388 |
-
this._getScroll();
|
389 |
-
$('lightwindow').setStyle({
|
390 |
-
position: 'fixed',
|
391 |
-
top: parseFloat($('lightwindow').getStyle('top'))-this.pagePosition.y+'px',
|
392 |
-
left: parseFloat($('lightwindow').getStyle('left'))-this.pagePosition.x+'px'
|
393 |
-
});
|
394 |
-
} else {
|
395 |
-
$('lightwindow').setStyle({
|
396 |
-
position: 'fixed',
|
397 |
-
top: (parseFloat(this._getParameter('lightwindow_top')) ? parseFloat(this._getParameter('lightwindow_top'))+'px' : this.dimensions.viewport.height/2+'px'),
|
398 |
-
left: (parseFloat(this._getParameter('lightwindow_left')) ? parseFloat(this._getParameter('lightwindow_left'))+'px' : this.dimensions.viewport.width/2+'px')
|
399 |
-
});
|
400 |
-
}
|
401 |
-
}
|
402 |
-
},
|
403 |
-
//
|
404 |
-
// Prepare the window for IE.
|
405 |
-
//
|
406 |
-
_prepareIE : function(setup) {
|
407 |
-
if (Prototype.Browser.IE) {
|
408 |
-
var height, overflowX, overflowY;
|
409 |
-
if (setup) {
|
410 |
-
var height = '100%';
|
411 |
-
} else {
|
412 |
-
var height = 'auto';
|
413 |
-
}
|
414 |
-
var body = document.getElementsByTagName('body')[0];
|
415 |
-
var html = document.getElementsByTagName('html')[0];
|
416 |
-
html.style.height = body.style.height = height;
|
417 |
-
}
|
418 |
-
},
|
419 |
-
|
420 |
-
_stopScrolling : function(e) {
|
421 |
-
if (this.animating) {
|
422 |
-
if (e.preventDefault) {
|
423 |
-
e.preventDefault();
|
424 |
-
}
|
425 |
-
e.returnValue = false;
|
426 |
-
}
|
427 |
-
},
|
428 |
-
//
|
429 |
-
// Get the scroll for the page.
|
430 |
-
//
|
431 |
-
_getScroll : function(){
|
432 |
-
if(typeof(window.pageYOffset) == 'number') {
|
433 |
-
this.pagePosition.x = window.pageXOffset;
|
434 |
-
this.pagePosition.y = window.pageYOffset;
|
435 |
-
} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
|
436 |
-
this.pagePosition.x = document.body.scrollLeft;
|
437 |
-
this.pagePosition.y = document.body.scrollTop;
|
438 |
-
} else if(document.documentElement) {
|
439 |
-
this.pagePosition.x = document.documentElement.scrollLeft;
|
440 |
-
this.pagePosition.y = document.documentElement.scrollTop;
|
441 |
-
}
|
442 |
-
},
|
443 |
-
//
|
444 |
-
// Reset the scroll.
|
445 |
-
//
|
446 |
-
_setScroll : function(x, y) {
|
447 |
-
document.documentElement.scrollLeft = x;
|
448 |
-
document.documentElement.scrollTop = y;
|
449 |
-
},
|
450 |
-
//
|
451 |
-
// Hide Selects from the page because of IE.
|
452 |
-
// We could use iframe shims instead here but why add all the extra markup for one browser when this is much easier and cleaner
|
453 |
-
//
|
454 |
-
_toggleTroubleElements : function(visibility, content){
|
455 |
-
|
456 |
-
if (content) {
|
457 |
-
var selects = $('lightwindow_contents').getElementsByTagName('select');
|
458 |
-
} else {
|
459 |
-
var selects = document.getElementsByTagName('select');
|
460 |
-
}
|
461 |
-
|
462 |
-
for(var i = 0; i < selects.length; i++) {
|
463 |
-
selects[i].style.visibility = visibility;
|
464 |
-
}
|
465 |
-
|
466 |
-
if (!content) {
|
467 |
-
if (this.options.hideFlash){
|
468 |
-
var objects = document.getElementsByTagName('object');
|
469 |
-
for (i = 0; i != objects.length; i++) {
|
470 |
-
objects[i].style.visibility = visibility;
|
471 |
-
}
|
472 |
-
var embeds = document.getElementsByTagName('embed');
|
473 |
-
for (i = 0; i != embeds.length; i++) {
|
474 |
-
embeds[i].style.visibility = visibility;
|
475 |
-
}
|
476 |
-
}
|
477 |
-
// var iframes = document.getElementsByTagName('iframe');
|
478 |
-
// for (i = 0; i != iframes.length; i++) {
|
479 |
-
// iframes[i].style.visibility = visibility;
|
480 |
-
// }
|
481 |
-
}
|
482 |
-
},
|
483 |
-
//
|
484 |
-
// Get the actual page size
|
485 |
-
//
|
486 |
-
_getPageDimensions : function() {
|
487 |
-
var xScroll, yScroll;
|
488 |
-
if (window.innerHeight && window.scrollMaxY) {
|
489 |
-
xScroll = document.body.scrollWidth;
|
490 |
-
yScroll = window.innerHeight + window.scrollMaxY;
|
491 |
-
} else if (document.body.scrollHeight > document.body.offsetHeight){
|
492 |
-
xScroll = document.body.scrollWidth;
|
493 |
-
yScroll = document.body.scrollHeight;
|
494 |
-
} else {
|
495 |
-
xScroll = document.body.offsetWidth;
|
496 |
-
yScroll = document.body.offsetHeight;
|
497 |
-
}
|
498 |
-
|
499 |
-
var windowWidth, windowHeight;
|
500 |
-
if (self.innerHeight) {
|
501 |
-
windowWidth = self.innerWidth;
|
502 |
-
windowHeight = self.innerHeight;
|
503 |
-
} else if (document.documentElement && document.documentElement.clientHeight) {
|
504 |
-
windowWidth = document.documentElement.clientWidth;
|
505 |
-
windowHeight = document.documentElement.clientHeight;
|
506 |
-
} else if (document.body) {
|
507 |
-
windowWidth = document.body.clientWidth;
|
508 |
-
windowHeight = document.body.clientHeight;
|
509 |
-
}
|
510 |
-
|
511 |
-
if(yScroll < windowHeight){
|
512 |
-
this.pageDimensions.height = windowHeight;
|
513 |
-
} else {
|
514 |
-
this.pageDimensions.height = yScroll;
|
515 |
-
}
|
516 |
-
|
517 |
-
if(xScroll < windowWidth){
|
518 |
-
this.pageDimensions.width = windowWidth;
|
519 |
-
} else {
|
520 |
-
this.pageDimensions.width = xScroll;
|
521 |
-
}
|
522 |
-
},
|
523 |
-
//
|
524 |
-
// Display the lightWindow.
|
525 |
-
//
|
526 |
-
_displayLightWindow : function(display, visibility) {
|
527 |
-
$('lightwindow_overlay').style.display = $('lightwindow').style.display = $('lightwindow_container').style.display = display;
|
528 |
-
$('lightwindow_overlay').style.visibility = $('lightwindow').style.visibility = $('lightwindow_container').style.visibility = visibility;
|
529 |
-
},
|
530 |
-
//
|
531 |
-
// Setup Dimensions of lightwindow.
|
532 |
-
|
533 |
-
//
|
534 |
-
_setupDimensions : function() {
|
535 |
-
|
536 |
-
var originalHeight, originalWidth;
|
537 |
-
originalHeight = this.options.dimensions.external.height;
|
538 |
-
originalWidth = this.options.dimensions.external.width;
|
539 |
-
|
540 |
-
|
541 |
-
var offsetHeight = this._getParameter('lightwindow_top') ? parseFloat(this._getParameter('lightwindow_top'))+this.pagePosition.y : this.dimensions.viewport.height/2+this.pagePosition.y;
|
542 |
-
var offsetWidth = this._getParameter('lightwindow_left') ? parseFloat(this._getParameter('lightwindow_left'))+this.pagePosition.x : this.dimensions.viewport.width/2+this.pagePosition.x;
|
543 |
-
|
544 |
-
// So if a theme has say shadowed edges, they should be consistant and take care of in the contentOffset
|
545 |
-
$('lightwindow').setStyle({
|
546 |
-
top: offsetHeight+'px',
|
547 |
-
left: offsetWidth+'px'
|
548 |
-
});
|
549 |
-
|
550 |
-
$('lightwindow_container').setStyle({
|
551 |
-
height: originalHeight+'px',
|
552 |
-
width: originalWidth+'px',
|
553 |
-
left: -(originalWidth/2)+'px',
|
554 |
-
top: -(originalHeight/2)+'px'
|
555 |
-
});
|
556 |
-
|
557 |
-
$('lightwindow_contents').setStyle({
|
558 |
-
height: originalHeight+'px',
|
559 |
-
width: originalWidth+'px'
|
560 |
-
});
|
561 |
-
},
|
562 |
-
//
|
563 |
-
// Monitor the keyboard while this lightwindow is up
|
564 |
-
//
|
565 |
-
_monitorKeyboard : function(status) {
|
566 |
-
if (status) document.onkeydown = this._eventKeypress.bind(this);
|
567 |
-
else document.onkeydown = '';
|
568 |
-
},
|
569 |
-
//
|
570 |
-
// Perform keyboard actions
|
571 |
-
//
|
572 |
-
_eventKeypress : function(e) {
|
573 |
-
if (e == null) {
|
574 |
-
var keycode = event.keyCode;
|
575 |
-
} else {
|
576 |
-
var keycode = e.which;
|
577 |
-
}
|
578 |
-
|
579 |
-
switch (keycode) {
|
580 |
-
case 27:
|
581 |
-
this.deactivate();
|
582 |
-
break;
|
583 |
-
|
584 |
-
case 13:
|
585 |
-
return;
|
586 |
-
|
587 |
-
default:
|
588 |
-
break;
|
589 |
-
}
|
590 |
-
|
591 |
-
// Gotta stop those quick fingers
|
592 |
-
if (this.animating) {
|
593 |
-
return false;
|
594 |
-
}
|
595 |
-
|
596 |
-
switch (keycode) {
|
597 |
-
case 80: case 37: // p, <-
|
598 |
-
if (this.navigationObservers.previous && this.allowPrevious) {
|
599 |
-
this.navigateWindow('previous');
|
600 |
-
}
|
601 |
-
break;
|
602 |
-
|
603 |
-
case 78: case 39: // n, ->
|
604 |
-
if (this.navigationObservers.next && this.allowNext) {
|
605 |
-
this.navigateWindow('next');
|
606 |
-
}
|
607 |
-
break;
|
608 |
-
|
609 |
-
default:
|
610 |
-
break;
|
611 |
-
}
|
612 |
-
},
|
613 |
-
//
|
614 |
-
// Get the value from the params attribute string.
|
615 |
-
//
|
616 |
-
_getParameter : function(parameter, parameters) {
|
617 |
-
if (!this.element) return false;
|
618 |
-
if (parameter == 'lightwindow_top' && this.element.top) {
|
619 |
-
return unescape(this.element.top);
|
620 |
-
} else if (parameter == 'lightwindow_left' && this.element.left) {
|
621 |
-
return unescape(this.element.left);
|
622 |
-
} else if (parameter == 'lightwindow_height' && this.element.height) {
|
623 |
-
return unescape(this.element.height);
|
624 |
-
} else if (parameter == 'lightwindow_width' && this.element.width) {
|
625 |
-
return unescape(this.element.width);
|
626 |
-
} else {
|
627 |
-
if (!parameters) {
|
628 |
-
if (this.element.params) parameters = this.element.params;
|
629 |
-
else return;
|
630 |
-
}
|
631 |
-
var value;
|
632 |
-
var parameterArray = parameters.split(',');
|
633 |
-
var compareString = parameter+'=';
|
634 |
-
var compareLength = compareString.length;
|
635 |
-
for (var i = 0; i < parameterArray.length; i++) {
|
636 |
-
if (parameterArray[i].substr(0, compareLength) == compareString) {
|
637 |
-
var currentParameter = parameterArray[i].split('=');
|
638 |
-
value = currentParameter[1];
|
639 |
-
break;
|
640 |
-
}
|
641 |
-
}
|
642 |
-
if (!value) return false;
|
643 |
-
else return unescape(value);
|
644 |
-
}
|
645 |
-
},
|
646 |
-
//
|
647 |
-
// Get the Browser Viewport Dimensions
|
648 |
-
//
|
649 |
-
_browserDimensions : function() {
|
650 |
-
if (Prototype.Browser.IE) {
|
651 |
-
this.dimensions.viewport.height = document.documentElement.clientHeight;
|
652 |
-
this.dimensions.viewport.width = document.documentElement.clientWidth;
|
653 |
-
} else {
|
654 |
-
this.dimensions.viewport.height = window.innerHeight;
|
655 |
-
this.dimensions.viewport.width = document.width || document.body.offsetWidth;
|
656 |
-
}
|
657 |
-
},
|
658 |
-
//
|
659 |
-
// Get the scrollbar offset, I don't like this method but there is really no other way I can find.
|
660 |
-
//
|
661 |
-
_getScrollerWidth : function() {
|
662 |
-
var scrollDiv = Element.extend(document.createElement('div'));
|
663 |
-
scrollDiv.setAttribute('id', 'lightwindow_scroll_div');
|
664 |
-
scrollDiv.setStyle({
|
665 |
-
position: 'absolute',
|
666 |
-
top: '-10000px',
|
667 |
-
left: '-10000px',
|
668 |
-
width: '100px',
|
669 |
-
height: '100px',
|
670 |
-
overflow: 'hidden'
|
671 |
-
});
|
672 |
-
|
673 |
-
var contentDiv = Element.extend(document.createElement('div'));
|
674 |
-
contentDiv.setAttribute('id', 'lightwindow_content_scroll_div');
|
675 |
-
contentDiv.setStyle({
|
676 |
-
width: '100%',
|
677 |
-
height: '200px'
|
678 |
-
});
|
679 |
-
|
680 |
-
scrollDiv.appendChild(contentDiv);
|
681 |
-
|
682 |
-
var body = document.getElementsByTagName('body')[0];
|
683 |
-
body.appendChild(scrollDiv);
|
684 |
-
|
685 |
-
var noScroll = $('lightwindow_content_scroll_div').offsetWidth;
|
686 |
-
scrollDiv.style.overflow = 'auto';
|
687 |
-
var withScroll = $('lightwindow_content_scroll_div').offsetWidth;
|
688 |
-
|
689 |
-
Element.remove($('lightwindow_scroll_div'));
|
690 |
-
|
691 |
-
this.scrollbarOffset = noScroll-withScroll;
|
692 |
-
},
|
693 |
-
|
694 |
-
//
|
695 |
-
// Load the window Information
|
696 |
-
//
|
697 |
-
_loadWindow : function() {
|
698 |
-
this._processWindow();
|
699 |
-
|
700 |
-
var newAJAX = new Ajax.Request(
|
701 |
-
this.contentToFetch, {
|
702 |
-
method: 'get',
|
703 |
-
parameters: '',
|
704 |
-
onFailure: function(transport) {
|
705 |
-
$('lightwindow_contents').setStyle({
|
706 |
-
overflow: 'auto'
|
707 |
-
});
|
708 |
-
this._setStatus(false);
|
709 |
-
$('lightwindow_title_bar_title').innerHTML = transport.status;
|
710 |
-
$('lightwindow_contents').innerHTML = '';
|
711 |
-
$('lightwindow_contents').insert(transport.responseText);
|
712 |
-
}.bind(this),
|
713 |
-
onSuccess: function(transport) {
|
714 |
-
$('lightwindow_contents').setStyle({
|
715 |
-
overflow: 'auto'
|
716 |
-
});
|
717 |
-
this._setStatus(false);
|
718 |
-
|
719 |
-
try {
|
720 |
-
var response = transport.responseText.evalJSON();
|
721 |
-
} catch (e) {
|
722 |
-
var response = {
|
723 |
-
title : transport.status,
|
724 |
-
previous: {},
|
725 |
-
next : {},
|
726 |
-
content : transport.responseText
|
727 |
-
};
|
728 |
-
}
|
729 |
-
|
730 |
-
$('lightwindow_title_bar_title').innerHTML = response.title;
|
731 |
-
|
732 |
-
if (response.previous.url) {
|
733 |
-
this.allowPrevious = true;
|
734 |
-
$('lightwindow_previous').href = response.previous.url;
|
735 |
-
$('lightwindow_previous').title = response.previous.name;
|
736 |
-
$('lightwindow_previous').setStyle({
|
737 |
-
visibility: 'visible'
|
738 |
-
});
|
739 |
-
} else {
|
740 |
-
this.allowPrevious = false;
|
741 |
-
$('lightwindow_previous').href = '#';
|
742 |
-
$('lightwindow_previous').setStyle({
|
743 |
-
visibility: 'hidden'
|
744 |
-
});
|
745 |
-
}
|
746 |
-
|
747 |
-
if (response.next.url) {
|
748 |
-
this.allowNext = true;
|
749 |
-
$('lightwindow_next').href = response.next.url;
|
750 |
-
$('lightwindow_next').title = response.next.name;
|
751 |
-
$('lightwindow_next').setStyle({
|
752 |
-
visibility: 'visible'
|
753 |
-
});
|
754 |
-
} else {
|
755 |
-
this.allowNext = false;
|
756 |
-
$('lightwindow_next').href = '#';
|
757 |
-
$('lightwindow_next').setStyle({
|
758 |
-
visibility: 'hidden'
|
759 |
-
});
|
760 |
-
}
|
761 |
-
$('lightwindow_contents').innerHTML = '';
|
762 |
-
try {
|
763 |
-
var content = response.content;
|
764 |
-
if (content && content.toElement) {
|
765 |
-
content = content.toElement();
|
766 |
-
}
|
767 |
-
content = Object.toHTML(content);
|
768 |
-
|
769 |
-
$('lightwindow_contents').insert(content.stripScripts());
|
770 |
-
response.content.extractScripts().map(function(script) {
|
771 |
-
try {
|
772 |
-
return QuickviewGlobalEval.defer(script);
|
773 |
-
// return window.eval.defer(script);
|
774 |
-
} catch (e) {
|
775 |
-
console.log(e);
|
776 |
-
}
|
777 |
-
});
|
778 |
-
} catch (e) {
|
779 |
-
contole.log(e);
|
780 |
-
}
|
781 |
-
|
782 |
-
if (typeof AjaxPro !== 'undefined') {
|
783 |
-
switch (typeof AjaxPro) {
|
784 |
-
case 'function':
|
785 |
-
AjaxPro().fire.delay(1, 'addObservers');
|
786 |
-
break;
|
787 |
-
case 'object':
|
788 |
-
AjaxPro.fire.delay(1, 'addObservers');
|
789 |
-
break;
|
790 |
-
}
|
791 |
-
}
|
792 |
-
|
793 |
-
this.calendar.addObserver();
|
794 |
-
|
795 |
-
if (typeof addSubmitEvent === 'function') { // AW ajaxcartpro
|
796 |
-
addSubmitEvent.delay(1);
|
797 |
-
}
|
798 |
-
|
799 |
-
if (typeof iCart !== 'undefined' && iCart.updateLinks) {
|
800 |
-
iCart.updateLinks.delay(1);
|
801 |
-
}
|
802 |
-
|
803 |
-
// fire event that product preview is ready
|
804 |
-
document.fire("quickshopping:previewloaded");
|
805 |
-
|
806 |
-
}.bind(this)
|
807 |
-
}
|
808 |
-
);
|
809 |
-
},
|
810 |
-
|
811 |
-
calendar: {
|
812 |
-
fixPosition: function(e, counter) {
|
813 |
-
var counter = counter || 0,
|
814 |
-
calendarBlock = $$('.calendar')[$$('.calendar').length - 1];
|
815 |
-
if (calendarBlock) {
|
816 |
-
calendarBlock.setStyle({
|
817 |
-
left : e.pointerX() + 'px',
|
818 |
-
top : e.pointerY() + 'px',
|
819 |
-
zIndex: 999
|
820 |
-
});
|
821 |
-
} else if (counter < 3) {
|
822 |
-
this.fixPosition.bind(this).delay(0.1, e, ++counter);
|
823 |
-
}
|
824 |
-
},
|
825 |
-
addObserver: function(counter) {
|
826 |
-
var dateField = $$('input.datetime-picker')[0],
|
827 |
-
counter = counter || 0,
|
828 |
-
self = this;
|
829 |
-
if (dateField) {
|
830 |
-
dateField.next().observe('click', function(e) {
|
831 |
-
self.fixPosition.delay(0.1, e);
|
832 |
-
});
|
833 |
-
} else if (counter < 3) {
|
834 |
-
this.addObserver.bind(this).delay(0.1, ++counter);
|
835 |
-
}
|
836 |
-
}
|
837 |
-
},
|
838 |
-
|
839 |
-
//
|
840 |
-
// Resize the Window to fit the viewport if necessary
|
841 |
-
//
|
842 |
-
_resizeWindowToFit : function() {
|
843 |
-
if (this.resizeTo.height+this.dimensions.cruft.height > this.dimensions.viewport.height) {
|
844 |
-
var heightRatio = this.resizeTo.height/this.resizeTo.width;
|
845 |
-
this.resizeTo.height = this.dimensions.viewport.height-this.dimensions.cruft.height-(2*this.options.viewportPadding);
|
846 |
-
}
|
847 |
-
if (this.resizeTo.width+this.dimensions.cruft.width > this.dimensions.viewport.width) {
|
848 |
-
var widthRatio = this.resizeTo.width/this.resizeTo.height;
|
849 |
-
this.resizeTo.width = this.dimensions.viewport.width-2*this.dimensions.cruft.width-(2*this.options.viewportPadding);
|
850 |
-
}
|
851 |
-
},
|
852 |
-
|
853 |
-
//
|
854 |
-
// Set the Window to a preset size
|
855 |
-
//
|
856 |
-
_presetWindowSize : function() {
|
857 |
-
if (this._getParameter('lightwindow_height')) {
|
858 |
-
this.resizeTo.height = parseFloat(this._getParameter('lightwindow_height'));
|
859 |
-
}
|
860 |
-
if (this._getParameter('lightwindow_width')) {
|
861 |
-
this.resizeTo.width = parseFloat(this._getParameter('lightwindow_width'));
|
862 |
-
}
|
863 |
-
},
|
864 |
-
|
865 |
-
//
|
866 |
-
// Process the Window
|
867 |
-
//
|
868 |
-
_processWindow : function() {
|
869 |
-
// Clean out our effects
|
870 |
-
this.dimensions.dataEffects = [];
|
871 |
-
|
872 |
-
var originalContainerDimensions = {
|
873 |
-
height: $('lightwindow_container').getHeight(),
|
874 |
-
width: $('lightwindow_container').getWidth()
|
875 |
-
};
|
876 |
-
|
877 |
-
// Position the window
|
878 |
-
if (!this.windowActive) {
|
879 |
-
$('lightwindow_container').setStyle({
|
880 |
-
height: 'auto',
|
881 |
-
// We need to set the width to a px not auto as opera has problems with it
|
882 |
-
width: $('lightwindow_container').getWidth() +
|
883 |
-
this.options.contentOffset.width + 'px'
|
884 |
-
});
|
885 |
-
}
|
886 |
-
|
887 |
-
var newContainerDimensions = {
|
888 |
-
height: $('lightwindow_container').getHeight(),
|
889 |
-
width: $('lightwindow_container').getWidth()
|
890 |
-
};
|
891 |
-
|
892 |
-
// We need to record the container dimension changes
|
893 |
-
this.containerChange = {
|
894 |
-
height: originalContainerDimensions.height-newContainerDimensions.height,
|
895 |
-
width: originalContainerDimensions.width-newContainerDimensions.width
|
896 |
-
};
|
897 |
-
|
898 |
-
// Get out general dimensions
|
899 |
-
this.dimensions.container = {
|
900 |
-
height: $('lightwindow_container').getHeight(),
|
901 |
-
width: $('lightwindow_container').getWidth()
|
902 |
-
};
|
903 |
-
this.dimensions.cruft = {
|
904 |
-
height: this.dimensions.container.height-$('lightwindow_contents').getHeight()+this.options.contentOffset.height,
|
905 |
-
width: this.dimensions.container.width-$('lightwindow_contents').getWidth()+this.options.contentOffset.width
|
906 |
-
};
|
907 |
-
|
908 |
-
// Set Sizes if we need too
|
909 |
-
this._presetWindowSize(); // set the max size
|
910 |
-
this._resizeWindowToFit(); // Even if the window is preset we still don't want it to go outside of the viewport
|
911 |
-
|
912 |
-
if (!this.windowActive) {
|
913 |
-
// Position the window
|
914 |
-
$('lightwindow_container').setStyle({
|
915 |
-
left: -(this.dimensions.container.width/2)+'px',
|
916 |
-
top: -(this.dimensions.container.height/2)+'px'
|
917 |
-
});
|
918 |
-
}
|
919 |
-
|
920 |
-
// We are ready, lets show this puppy off!
|
921 |
-
this._displayLightWindow('block', 'visible');
|
922 |
-
this._defaultAnimationHandler();
|
923 |
-
},
|
924 |
-
|
925 |
-
//
|
926 |
-
// This is the default animation handler for LightWindow
|
927 |
-
//
|
928 |
-
_defaultAnimationHandler : function() {
|
929 |
-
var resized = false;
|
930 |
-
var ratio = this.dimensions.container.width
|
931 |
-
- $('lightwindow_contents').getWidth()
|
932 |
-
+ this.resizeTo.width
|
933 |
-
+ this.options.contentOffset.width;
|
934 |
-
|
935 |
-
if (ratio != $('lightwindow_container').getWidth()) {
|
936 |
-
new Effect.Parallel([
|
937 |
-
new Effect.Scale('lightwindow_contents', 100*(this.resizeTo.width/$('lightwindow_contents').getWidth()), {
|
938 |
-
scaleFrom: 100*($('lightwindow_contents').getWidth()/($('lightwindow_contents').getWidth()+(this.options.contentOffset.width))),
|
939 |
-
sync: true,
|
940 |
-
scaleY: false,
|
941 |
-
scaleContent: false
|
942 |
-
}),
|
943 |
-
new Effect.Scale('lightwindow_container', 100*(ratio/(this.dimensions.container.width)), {
|
944 |
-
sync: true,
|
945 |
-
scaleY: false,
|
946 |
-
scaleFromCenter: true,
|
947 |
-
scaleContent: false
|
948 |
-
})
|
949 |
-
], {
|
950 |
-
duration: this.duration,
|
951 |
-
delay: 0.25,
|
952 |
-
queue: {
|
953 |
-
position: 'end',
|
954 |
-
scope: 'lightwindowAnimation'
|
955 |
-
}
|
956 |
-
}
|
957 |
-
);
|
958 |
-
}
|
959 |
-
|
960 |
-
ratio = this.dimensions.container.height
|
961 |
-
- $('lightwindow_contents').getHeight()
|
962 |
-
// - $('lightwindow_title_bar').getHeight()
|
963 |
-
- 50
|
964 |
-
+ this.resizeTo.height
|
965 |
-
+ this.options.contentOffset.height;
|
966 |
-
|
967 |
-
if (ratio > $('lightwindow_container').getHeight()) {
|
968 |
-
new Effect.Parallel([
|
969 |
-
// new Effect.Scale('lightwindow_contents', 100*((this.resizeTo.height - 50)/$('lightwindow_contents').getHeight()), {
|
970 |
-
// scaleFrom: 100*($('lightwindow_contents').getHeight()/($('lightwindow_contents').getHeight()+(this.options.contentOffset.height))),
|
971 |
-
// sync: true,
|
972 |
-
// scaleX: false,
|
973 |
-
// scaleContent: false
|
974 |
-
// }),
|
975 |
-
new Effect.Scale('lightwindow_container', 100*((this.resizeTo.height + 0)/$('lightwindow_container').getHeight()), {
|
976 |
-
sync: true,
|
977 |
-
scaleX: false,
|
978 |
-
scaleFromCenter: true,
|
979 |
-
scaleContent: false
|
980 |
-
})
|
981 |
-
], {
|
982 |
-
duration: this.duration,
|
983 |
-
afterFinish: function() {
|
984 |
-
$('lightwindow_contents').setStyle({
|
985 |
-
height: this.resizeTo.height - 50 + 'px'
|
986 |
-
});
|
987 |
-
if (this.dimensions.dataEffects.length > 0) {
|
988 |
-
new Effect.Parallel(this.dimensions.dataEffects, {
|
989 |
-
duration: this.duration,
|
990 |
-
queue: {position: 'end', scope: 'lightwindowAnimation'}
|
991 |
-
});
|
992 |
-
}
|
993 |
-
}.bind(this),
|
994 |
-
queue: {position: 'end', scope: 'lightwindowAnimation'}
|
995 |
-
}
|
996 |
-
);
|
997 |
-
resized = true;
|
998 |
-
}
|
999 |
-
|
1000 |
-
// We need to do our data effect since there was no resizing
|
1001 |
-
if (!resized && this.dimensions.dataEffects.length > 0) {
|
1002 |
-
new Effect.Parallel(this.dimensions.dataEffects, {
|
1003 |
-
duration: this.duration,
|
1004 |
-
beforeStart: function() {
|
1005 |
-
if (this.containerChange.height != 0 || this.containerChange.width != 0) {
|
1006 |
-
new Effect.MoveBy('lightwindow_container', this.containerChange.height, this.containerChange.width, {
|
1007 |
-
transition: Effect.Transitions.sinoidal
|
1008 |
-
});
|
1009 |
-
}
|
1010 |
-
}.bind(this),
|
1011 |
-
queue: {position: 'end', scope: 'lightwindowAnimation'}
|
1012 |
-
}
|
1013 |
-
);
|
1014 |
-
}
|
1015 |
-
}
|
1016 |
-
};
|
1017 |
-
|
1018 |
-
/**
|
1019 |
-
* Safari fix. See https://github.com/skeeto/skewer-mode/issues/14
|
1020 |
-
*/
|
1021 |
-
QuickviewGlobalEval = (function() {
|
1022 |
-
var eval0 = (function(original, Object) {
|
1023 |
-
try {
|
1024 |
-
return [eval][0]('Object') === original;
|
1025 |
-
} catch (e) {
|
1026 |
-
return false;
|
1027 |
-
}
|
1028 |
-
}(Object, false));
|
1029 |
-
if (eval0) {
|
1030 |
-
return function(expression) {
|
1031 |
-
return [eval][0](expression);
|
1032 |
-
};
|
1033 |
-
} else {
|
1034 |
-
return function(expression) { // Safari
|
1035 |
-
return eval.call(window, expression);
|
1036 |
-
};
|
1037 |
-
}
|
1038 |
-
}());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|