Version Notes
Capacity Web Solutions - Responsive Banner Slider
Download this release
Release Info
Developer | Capacity Web Solutions |
Extension | Responsive_Banner_Slider |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider.php +19 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit.php +62 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit/Form.php +26 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit/Tab/Form.php +326 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit/Tabs.php +30 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Grid.php +151 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Renderer/Groups.php +29 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup.php +45 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit.php +64 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Form.php +27 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Categories.php +155 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Code.php +22 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Form.php +396 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Pages.php +42 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Product.php +38 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Sliders.php +66 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tabs.php +65 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Grid.php +131 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/View.php +56 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/View/Bottom.php +68 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/View/Top.php +72 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Helper/Data.php +64 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Categories.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Category.php +27 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Effect.php +22 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Animationdirection.php +21 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Animationtype.php +21 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Effect.php +22 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Navigation.php +22 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Navigationarrow.php +23 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Navigationstyle.php +30 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Pages.php +27 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Paginationposition.php +25 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Paginationstyle.php +23 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Position.php +20 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Status.php +20 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Theme.php +22 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Type.php +22 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Urltarget.php +21 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Video.php +22 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Categories.php +16 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Categories/Collection.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Page.php +16 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Page/Collection.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Product.php +16 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Product/Collection.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Responsivebannerslider.php +16 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Responsivebannerslider/Collection.php +54 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Slide.php +16 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Slide/Collection.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Store.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Store/Collection.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Observer.php +107 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Page.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Product.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Responsivebannerslider.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Slide.php +35 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Status.php +22 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Store.php +17 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/Adminhtml/SliderController.php +266 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/Adminhtml/SlidergroupController.php +372 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/IndexController.php +21 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/etc/config.xml +242 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/etc/system.xml +119 -0
- app/code/community/CapacityWebSolutions/Responsivebannerslider/sql/responsivebannerslider_setup/mysql4-install-1.0.0.php +100 -0
- app/design/adminhtml/default/default/layout/responsivebannerslider.xml +53 -0
- app/design/adminhtml/default/default/template/responsivebannerslider/category/edit/tab/categories.phtml +123 -0
- app/design/adminhtml/default/default/template/responsivebannerslider/category/edit/tab/product.phtml +51 -0
- app/design/adminhtml/default/default/template/responsivebannerslider/code.phtml +82 -0
- app/design/adminhtml/default/default/template/responsivebannerslider/group.phtml +44 -0
- app/design/adminhtml/default/default/template/responsivebannerslider/store.phtml +11 -0
- app/design/frontend/base/default/layout/responsivebannerslider.xml +70 -0
- app/design/frontend/base/default/template/responsivebannerslider/slider.phtml +543 -0
- app/etc/modules/CapacityWebSolutions_Responsivebannerslider.xml +9 -0
- js/responsivebannerslider/froogaloop.js +4 -0
- js/responsivebannerslider/jquery.easing.js +175 -0
- js/responsivebannerslider/jquery.fitvid.js +2 -0
- js/responsivebannerslider/jquery.flexslider.js +1165 -0
- js/responsivebannerslider/jquery.lazy.js +604 -0
- js/responsivebannerslider/jquery.min.js +4 -0
- js/responsivebannerslider/jscolor/Thumbs.db +0 -0
- js/responsivebannerslider/jscolor/arrow.gif +0 -0
- js/responsivebannerslider/jscolor/cross.gif +0 -0
- js/responsivebannerslider/jscolor/hs.png +0 -0
- js/responsivebannerslider/jscolor/hv.png +0 -0
- js/responsivebannerslider/jscolor/jscolor.js +993 -0
- js/responsivebannerslider/product-selector.js +193 -0
- package.xml +20 -0
- skin/adminhtml/default/default/responsivebannerslider/cwsarw.eot +0 -0
- skin/adminhtml/default/default/responsivebannerslider/cwsarw.svg +32 -0
- skin/adminhtml/default/default/responsivebannerslider/cwsarw.ttf +0 -0
- skin/adminhtml/default/default/responsivebannerslider/cwsarw.woff +0 -0
- skin/adminhtml/default/default/responsivebannerslider/responsivebannerslider.css +45 -0
- skin/frontend/base/default/css/responsivebannerslider/Thumbs.db +0 -0
- skin/frontend/base/default/css/responsivebannerslider/bottom-shadow.png +0 -0
- skin/frontend/base/default/css/responsivebannerslider/default.css +168 -0
- skin/frontend/base/default/css/responsivebannerslider/fonts/cwsarw.eot +0 -0
- skin/frontend/base/default/css/responsivebannerslider/fonts/cwsarw.svg +32 -0
- skin/frontend/base/default/css/responsivebannerslider/fonts/cwsarw.ttf +0 -0
- skin/frontend/base/default/css/responsivebannerslider/fonts/cwsarw.woff +0 -0
- skin/frontend/base/default/css/responsivebannerslider/loading.gif +0 -0
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider extends Mage_Adminhtml_Block_Widget_Grid_Container
|
11 |
+
{
|
12 |
+
public function __construct() {
|
13 |
+
$this->_controller = 'adminhtml_slider';
|
14 |
+
$this->_blockGroup = 'responsivebannerslider';
|
15 |
+
$this->_headerText = Mage::helper('responsivebannerslider')->__('Responsive Banner Slider - Slides');
|
16 |
+
$this->_addButtonLabel = Mage::helper('responsivebannerslider')->__('Add Slide');
|
17 |
+
parent::__construct();
|
18 |
+
}
|
19 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
12 |
+
{
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
parent::__construct();
|
16 |
+
|
17 |
+
$this->_objectId = 'id';
|
18 |
+
$this->_blockGroup = 'responsivebannerslider';
|
19 |
+
$this->_controller = 'adminhtml_slider';
|
20 |
+
|
21 |
+
$this->_updateButton('save', 'label', Mage::helper('responsivebannerslider')->__('Save Item'));
|
22 |
+
$this->_updateButton('delete', 'label', Mage::helper('responsivebannerslider')->__('Delete Item'));
|
23 |
+
|
24 |
+
$this->_addButton('saveandcontinue', array(
|
25 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
26 |
+
'onclick' => 'saveAndContinueEdit()',
|
27 |
+
'class' => 'save',
|
28 |
+
), -100);
|
29 |
+
|
30 |
+
$this->_formScripts[] = "
|
31 |
+
function toggleEditor() {
|
32 |
+
if (tinyMCE.getInstanceById('web_content') == null) {
|
33 |
+
tinyMCE.execCommand('mceAddControl', false, 'web_content');
|
34 |
+
} else {
|
35 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'web_content');
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
function saveAndContinueEdit(){
|
40 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
41 |
+
}
|
42 |
+
";
|
43 |
+
}
|
44 |
+
|
45 |
+
protected function _prepareLayout() {
|
46 |
+
parent::_prepareLayout();
|
47 |
+
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
48 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
49 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
50 |
+
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
public function getHeaderText()
|
55 |
+
{
|
56 |
+
if( Mage::registry('slider_data') && Mage::registry('slider_data')->getId() ) {
|
57 |
+
return Mage::helper('responsivebannerslider')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('slider_data')->getTitles()));
|
58 |
+
} else {
|
59 |
+
return Mage::helper('responsivebannerslider')->__('Add Slide');
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit/Form.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
11 |
+
{
|
12 |
+
protected function _prepareForm()
|
13 |
+
{
|
14 |
+
$form = new Varien_Data_Form(array(
|
15 |
+
'id' => 'edit_form',
|
16 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
17 |
+
'method' => 'post',
|
18 |
+
'enctype' => 'multipart/form-data'
|
19 |
+
)
|
20 |
+
);
|
21 |
+
|
22 |
+
$form->setUseContainer(true);
|
23 |
+
$this->setForm($form);
|
24 |
+
return parent::_prepareForm();
|
25 |
+
}
|
26 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
12 |
+
{
|
13 |
+
|
14 |
+
protected function Groupsid() {
|
15 |
+
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection()->setOrder('slidergroup_id', 'ASC');
|
16 |
+
|
17 |
+
foreach($groups as $group) {
|
18 |
+
|
19 |
+
$data = array(
|
20 |
+
'value' => $group->getData('slidergroup_id'),
|
21 |
+
'label' => $group->getTitle());
|
22 |
+
|
23 |
+
$options[] = $data;
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
return $options;
|
28 |
+
}
|
29 |
+
|
30 |
+
public function _sliderAdd() {
|
31 |
+
if($this->getRequest()->getParam('id')) {
|
32 |
+
return true;
|
33 |
+
} else {
|
34 |
+
return false;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _prepareForm()
|
39 |
+
{
|
40 |
+
$form = new Varien_Data_Form();
|
41 |
+
$this->setForm($form);
|
42 |
+
$fieldset = $form->addFieldset('slider_form', array('legend'=>Mage::helper('responsivebannerslider')->__('General information')));
|
43 |
+
|
44 |
+
$group_name = $fieldset->addField('group_names', 'multiselect', array(
|
45 |
+
'label' => Mage::helper('responsivebannerslider')->__('Group'),
|
46 |
+
'class' => 'required-entry',
|
47 |
+
'required' => true,
|
48 |
+
'name' => 'group_names[]',
|
49 |
+
'values' => $this->Groupsid(),
|
50 |
+
));
|
51 |
+
|
52 |
+
|
53 |
+
$title = $fieldset->addField('titles', 'text', array(
|
54 |
+
'label' => Mage::helper('responsivebannerslider')->__('Title'),
|
55 |
+
'class' => 'required-entry',
|
56 |
+
'required' => true,
|
57 |
+
'name' => 'titles',
|
58 |
+
));
|
59 |
+
|
60 |
+
$img_video = $fieldset->addField('img_video', 'select', array(
|
61 |
+
'label' => Mage::helper('responsivebannerslider')->__('Image or Video'),
|
62 |
+
'name' => 'img_video',
|
63 |
+
'disabled' => $this->_sliderAdd(),
|
64 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_video')->toOptionArray(),
|
65 |
+
));
|
66 |
+
|
67 |
+
$img_hosting = $fieldset->addField('img_hosting', 'select', array(
|
68 |
+
'label' => Mage::helper('responsivebannerslider')->__('Use External Image Hosting'),
|
69 |
+
'name' => 'img_hosting',
|
70 |
+
'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
|
71 |
+
));
|
72 |
+
|
73 |
+
$video_height = $fieldset->addField('video_height', 'text', array(
|
74 |
+
'label' => Mage::helper('responsivebannerslider')->__('Height of Video'),
|
75 |
+
'name' => 'video_height',
|
76 |
+
'class' => 'validate-number',
|
77 |
+
'required' => true,
|
78 |
+
));
|
79 |
+
|
80 |
+
$video_id = $fieldset->addField('video_id', 'text', array(
|
81 |
+
'label' => Mage::helper('responsivebannerslider')->__('Video ID'),
|
82 |
+
'name' => 'video_id',
|
83 |
+
'note' => 'enter the video id of your YouTube or Vimeo video (not the full link)',
|
84 |
+
|
85 |
+
));
|
86 |
+
|
87 |
+
$hosted_url = $fieldset->addField('hosted_url', 'text', array(
|
88 |
+
'label' => Mage::helper('responsivebannerslider')->__('Hosted Image URL'),
|
89 |
+
'name' => 'hosted_url',
|
90 |
+
'note' => "Ex - http://example.com/filename",
|
91 |
+
));
|
92 |
+
|
93 |
+
$hosted_thumb = $fieldset->addField('hosted_thumb', 'text', array(
|
94 |
+
'label' => Mage::helper('responsivebannerslider')->__('Hosted Image Thumb URL'),
|
95 |
+
'name' => 'hosted_thumb',
|
96 |
+
'note' => 'you can use the same URL as above but for performance reasons it\'s better to upload a seperate small thumbnail of this image, the thumbnails are used in carousels',
|
97 |
+
));
|
98 |
+
|
99 |
+
$filename = $fieldset->addField('filename', 'image', array(
|
100 |
+
'label' => Mage::helper('responsivebannerslider')->__('Image'),
|
101 |
+
'required' => false,
|
102 |
+
'name' => 'filename',
|
103 |
+
|
104 |
+
));
|
105 |
+
|
106 |
+
$alt_text = $fieldset->addField('alt_text', 'text', array(
|
107 |
+
'label' => Mage::helper('responsivebannerslider')->__('ALT Text'),
|
108 |
+
'name' => 'alt_text',
|
109 |
+
));
|
110 |
+
|
111 |
+
$url = $fieldset->addField('url', 'text', array(
|
112 |
+
'label' => Mage::helper('responsivebannerslider')->__('URL'),
|
113 |
+
'name' => 'url',
|
114 |
+
));
|
115 |
+
|
116 |
+
$url_target = $fieldset->addField('url_target', 'select', array(
|
117 |
+
'label' => Mage::helper('responsivebannerslider')->__('URL Target'),
|
118 |
+
'name' => 'url_target',
|
119 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_urltarget')->toOptionArray(),
|
120 |
+
));
|
121 |
+
|
122 |
+
|
123 |
+
$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
|
124 |
+
array('tab_id' => $this->getTabId())
|
125 |
+
);
|
126 |
+
|
127 |
+
$wysiwygConfig["files_browser_window_url"] = Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index');
|
128 |
+
$wysiwygConfig["directives_url"] = Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive');
|
129 |
+
$wysiwygConfig["directives_url_quoted"] = Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive');
|
130 |
+
$wysiwygConfig["add_images"] = false;
|
131 |
+
$wysiwygConfig["add_widgets"] = false;
|
132 |
+
$wysiwygConfig["add_variables"] = false;
|
133 |
+
$wysiwygConfig["widget_plugin_src"] = false;
|
134 |
+
$wysiwygConfig->setData("plugins",array());
|
135 |
+
|
136 |
+
$style = 'height:20em; width:50em;';
|
137 |
+
$config = $wysiwygConfig;
|
138 |
+
|
139 |
+
|
140 |
+
$description = $fieldset->addField('description','editor',array(
|
141 |
+
'label' => Mage::helper('responsivebannerslider')->__('Description'),
|
142 |
+
'required' => false,
|
143 |
+
'name' => 'description',
|
144 |
+
'style' => $style,
|
145 |
+
'wysiwyg' => true,
|
146 |
+
'config' => $config,
|
147 |
+
));
|
148 |
+
|
149 |
+
|
150 |
+
$date_enabled = $fieldset->addField('date_enabled', 'select', array(
|
151 |
+
'label' => Mage::helper('responsivebannerslider')->__('Use Date Range'),
|
152 |
+
'name' => 'date_enabled',
|
153 |
+
'values' => array(
|
154 |
+
0 => Mage::helper('responsivebannerslider')->__('No'),
|
155 |
+
1 => Mage::helper('responsivebannerslider')->__('Yes'),
|
156 |
+
),
|
157 |
+
));
|
158 |
+
|
159 |
+
$note= $this->__('The current server time is').': '.$this->formatTime(now(),Mage_Core_Model_Locale::FORMAT_TYPE_SHORT,true);
|
160 |
+
|
161 |
+
$current_timezone = Mage::app()->getStore()->getConfig('general/locale/timezone');
|
162 |
+
$dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
|
163 |
+
|
164 |
+
$from_date = $fieldset->addField('from_date', 'date', array(
|
165 |
+
'name' => 'from_date',
|
166 |
+
'label' => Mage::helper('responsivebannerslider')->__('From Date & Time'),
|
167 |
+
'title' => Mage::helper('responsivebannerslider')->__('From Date & Time'),
|
168 |
+
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
169 |
+
'class' => 'validate-date',
|
170 |
+
'time' => true,
|
171 |
+
'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
|
172 |
+
'format' => $dateFormatIso
|
173 |
+
));
|
174 |
+
|
175 |
+
$to_date = $fieldset->addField('to_date', 'date', array(
|
176 |
+
'name' => 'to_date',
|
177 |
+
'label' => Mage::helper('responsivebannerslider')->__('To Date & Time'),
|
178 |
+
'title' => Mage::helper('responsivebannerslider')->__('To Date & Time'),
|
179 |
+
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
180 |
+
'class' => 'validate-date',
|
181 |
+
'time' => true,
|
182 |
+
'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
|
183 |
+
'format' => $dateFormatIso,
|
184 |
+
'note' =>$note,
|
185 |
+
));
|
186 |
+
|
187 |
+
$sort_order = $fieldset->addField('sort_order', 'text', array(
|
188 |
+
'label' => Mage::helper('responsivebannerslider')->__('Sort Order'),
|
189 |
+
'class' => 'validate-number',
|
190 |
+
'required' => false,
|
191 |
+
'name' => 'sort_order',
|
192 |
+
));
|
193 |
+
|
194 |
+
$status = $fieldset->addField('statuss', 'select', array(
|
195 |
+
'label' => Mage::helper('responsivebannerslider')->__('Status'),
|
196 |
+
'name' => 'statuss',
|
197 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_status')->toOptionArray(),
|
198 |
+
));
|
199 |
+
|
200 |
+
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
201 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
202 |
+
|
203 |
+
}
|
204 |
+
|
205 |
+
if (Mage::getSingleton('adminhtml/session')->getSliderData()) {
|
206 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getSliderData());
|
207 |
+
Mage::getSingleton('adminhtml/session')->setSliderData(null);
|
208 |
+
} elseif (Mage::registry('slider_data')) {
|
209 |
+
|
210 |
+
$dataimg = Mage::registry('slider_data')->getData();
|
211 |
+
|
212 |
+
if(count($dataimg)>0) {
|
213 |
+
|
214 |
+
$tmp = "responsivebannerslider/".$dataimg['filename'];
|
215 |
+
unset($dataimg['filename']);
|
216 |
+
$dataimg = array_merge($dataimg, array("filename"=>$tmp));
|
217 |
+
|
218 |
+
|
219 |
+
if($dataimg['filename'] == "responsivebannerslider/"){
|
220 |
+
unset($dataimg['filename']);
|
221 |
+
array_merge($dataimg, array("filename"=>""));
|
222 |
+
$form->setValues($dataimg);
|
223 |
+
}else {
|
224 |
+
$form->setValues($dataimg);
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
|
230 |
+
$this->setForm($form);
|
231 |
+
$this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
|
232 |
+
->addFieldMap($img_video->getHtmlId(), $img_video->getName())
|
233 |
+
->addFieldMap($img_hosting->getHtmlId(), $img_hosting->getName())
|
234 |
+
->addFieldMap($video_id->getHtmlId(), $video_id->getName())
|
235 |
+
->addFieldMap($hosted_url->getHtmlId(), $hosted_url->getName())
|
236 |
+
->addFieldMap($hosted_thumb->getHtmlId(), $hosted_thumb->getName())
|
237 |
+
->addFieldMap($filename->getHtmlId(), $filename->getName())
|
238 |
+
->addFieldMap($alt_text->getHtmlId(), $alt_text->getName())
|
239 |
+
->addFieldMap($url->getHtmlId(), $url->getName())
|
240 |
+
->addFieldMap($url_target->getHtmlId(), $url_target->getName())
|
241 |
+
->addFieldMap($description->getHtmlId(), $description->getName())
|
242 |
+
->addFieldMap($video_height->getHtmlId(), $video_height->getName())
|
243 |
+
->addFieldMap($to_date->getHtmlId(), $to_date->getName())
|
244 |
+
->addFieldMap($from_date->getHtmlId(), $from_date->getName())
|
245 |
+
->addFieldMap($date_enabled->getHtmlId(), $date_enabled->getName())
|
246 |
+
->addFieldDependence(
|
247 |
+
$to_date->getName(),
|
248 |
+
$date_enabled->getName(),
|
249 |
+
1
|
250 |
+
)
|
251 |
+
->addFieldDependence(
|
252 |
+
$from_date->getName(),
|
253 |
+
$date_enabled->getName(),
|
254 |
+
1
|
255 |
+
)
|
256 |
+
->addFieldDependence(
|
257 |
+
$video_id->getName(),
|
258 |
+
$img_video->getName(),
|
259 |
+
array('youtube','vimeo')
|
260 |
+
)
|
261 |
+
->addFieldDependence(
|
262 |
+
$video_height->getName(),
|
263 |
+
$img_video->getName(),
|
264 |
+
array('youtube','vimeo')
|
265 |
+
)
|
266 |
+
->addFieldDependence(
|
267 |
+
$img_hosting->getName(),
|
268 |
+
$img_video->getName(),
|
269 |
+
'image'
|
270 |
+
)
|
271 |
+
->addFieldDependence(
|
272 |
+
$hosted_url->getName(),
|
273 |
+
$img_video->getName(),
|
274 |
+
'image'
|
275 |
+
)
|
276 |
+
->addFieldDependence(
|
277 |
+
$hosted_thumb->getName(),
|
278 |
+
$img_video->getName(),
|
279 |
+
'image'
|
280 |
+
)
|
281 |
+
->addFieldDependence(
|
282 |
+
$filename->getName(),
|
283 |
+
$img_video->getName(),
|
284 |
+
'image'
|
285 |
+
)
|
286 |
+
->addFieldDependence(
|
287 |
+
$alt_text->getName(),
|
288 |
+
$img_video->getName(),
|
289 |
+
'image'
|
290 |
+
)
|
291 |
+
->addFieldDependence(
|
292 |
+
$url->getName(),
|
293 |
+
$img_video->getName(),
|
294 |
+
'image'
|
295 |
+
)
|
296 |
+
->addFieldDependence(
|
297 |
+
$url_target->getName(),
|
298 |
+
$img_video->getName(),
|
299 |
+
'image'
|
300 |
+
)
|
301 |
+
->addFieldDependence(
|
302 |
+
$description->getName(),
|
303 |
+
$img_video->getName(),
|
304 |
+
'image'
|
305 |
+
)
|
306 |
+
->addFieldDependence(
|
307 |
+
$hosted_url->getName(),
|
308 |
+
$img_hosting->getName(),
|
309 |
+
1
|
310 |
+
)
|
311 |
+
->addFieldDependence(
|
312 |
+
$hosted_thumb->getName(),
|
313 |
+
$img_hosting->getName(),
|
314 |
+
1
|
315 |
+
)
|
316 |
+
->addFieldDependence(
|
317 |
+
$filename->getName(),
|
318 |
+
$img_hosting->getName(),
|
319 |
+
0
|
320 |
+
)
|
321 |
+
|
322 |
+
);
|
323 |
+
|
324 |
+
return parent::_prepareForm();
|
325 |
+
}
|
326 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Edit/Tabs.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
11 |
+
{
|
12 |
+
public function __construct()
|
13 |
+
{
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('slider_tabs');
|
16 |
+
$this->setDestElementId('edit_form');
|
17 |
+
$this->setTitle(Mage::helper('responsivebannerslider')->__('Manage Slide'));
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _beforeToHtml()
|
21 |
+
{
|
22 |
+
$this->addTab('slide_section', array(
|
23 |
+
'label' => Mage::helper('responsivebannerslider')->__('General Information'),
|
24 |
+
'title' => Mage::helper('responsivebannerslider')->__('General Information'),
|
25 |
+
'content' => $this->getLayout()->createBlock('responsivebannerslider/adminhtml_slider_edit_tab_form')->toHtml(),
|
26 |
+
));
|
27 |
+
|
28 |
+
return parent::_beforeToHtml();
|
29 |
+
}
|
30 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Grid.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
12 |
+
{
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
parent::__construct();
|
16 |
+
$this->setId('sliderGrid');
|
17 |
+
$this->setDefaultSort('slide_id');
|
18 |
+
$this->setDefaultDir('ASC');
|
19 |
+
$this->setSaveParametersInSession(true);
|
20 |
+
$this->setUseAjax(true);
|
21 |
+
}
|
22 |
+
|
23 |
+
protected function _prepareCollection()
|
24 |
+
{
|
25 |
+
$collection = Mage::getModel('responsivebannerslider/slide')->getCollection();
|
26 |
+
$groupId = (int) $this->getRequest()->getParam('group');
|
27 |
+
|
28 |
+
if($groupId != 0) {
|
29 |
+
$collection->addFieldToFilter('group_names', array(array('finset' => $groupId)));
|
30 |
+
}
|
31 |
+
|
32 |
+
$this->setCollection($collection);
|
33 |
+
|
34 |
+
return parent::_prepareCollection();
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
+
protected function Groupsid() {
|
39 |
+
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection();
|
40 |
+
foreach($groups as $group) {
|
41 |
+
$options[$group->getData('slidergroup_id')] = $group->getTitle();
|
42 |
+
}
|
43 |
+
|
44 |
+
return $options;
|
45 |
+
}
|
46 |
+
|
47 |
+
protected function _prepareColumns()
|
48 |
+
{
|
49 |
+
$this->addColumn('slide_id', array(
|
50 |
+
'header' => Mage::helper('responsivebannerslider')->__('ID'),
|
51 |
+
'align' =>'right',
|
52 |
+
'width' => '50px',
|
53 |
+
'index' => 'slide_id',
|
54 |
+
));
|
55 |
+
|
56 |
+
$this->addColumn('titles', array(
|
57 |
+
'header' => Mage::helper('responsivebannerslider')->__('Slide Title'),
|
58 |
+
'align' =>'left',
|
59 |
+
'index' => 'titles',
|
60 |
+
));
|
61 |
+
|
62 |
+
$this->addColumn('Group', array(
|
63 |
+
'header' => Mage::helper('responsivebannerslider')->__('Group'),
|
64 |
+
'align' =>'left',
|
65 |
+
'index' => 'group_names',
|
66 |
+
'renderer' => 'CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Renderer_Groups',
|
67 |
+
'filter' => false,
|
68 |
+
));
|
69 |
+
|
70 |
+
$this->addColumn('sort_order', array(
|
71 |
+
'header' => Mage::helper('responsivebannerslider')->__('Sort Order'),
|
72 |
+
'align' =>'left',
|
73 |
+
'index' => 'sort_order',
|
74 |
+
'width' => '80px',
|
75 |
+
));
|
76 |
+
|
77 |
+
$this->addColumn('statuss', array(
|
78 |
+
'header' => Mage::helper('responsivebannerslider')->__('Status'),
|
79 |
+
'align' => 'left',
|
80 |
+
'width' => '80px',
|
81 |
+
'index' => 'statuss',
|
82 |
+
'type' => 'options',
|
83 |
+
'options' => array(
|
84 |
+
1 => 'Enabled',
|
85 |
+
0 => 'Disabled',
|
86 |
+
),
|
87 |
+
));
|
88 |
+
|
89 |
+
$this->addColumn('action',
|
90 |
+
array(
|
91 |
+
'header' => Mage::helper('responsivebannerslider')->__('Action'),
|
92 |
+
'width' => '100',
|
93 |
+
'type' => 'action',
|
94 |
+
'getter' => 'getId',
|
95 |
+
'actions' => array(
|
96 |
+
array(
|
97 |
+
'caption' => Mage::helper('responsivebannerslider')->__('Edit'),
|
98 |
+
'url' => array('base'=> '*/*/edit'),
|
99 |
+
'field' => 'id'
|
100 |
+
)
|
101 |
+
),
|
102 |
+
'filter' => false,
|
103 |
+
'sortable' => false,
|
104 |
+
'index' => 'stores',
|
105 |
+
'is_system' => true,
|
106 |
+
));
|
107 |
+
|
108 |
+
return parent::_prepareColumns();
|
109 |
+
}
|
110 |
+
|
111 |
+
protected function _prepareMassaction()
|
112 |
+
{
|
113 |
+
$this->setMassactionIdField('slide_id');
|
114 |
+
$this->getMassactionBlock()->setFormFieldName('responsivebannerslider_slide');
|
115 |
+
|
116 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
117 |
+
'label' => Mage::helper('responsivebannerslider')->__('Delete'),
|
118 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
119 |
+
'confirm' => Mage::helper('responsivebannerslider')->__('Are you sure?')
|
120 |
+
));
|
121 |
+
|
122 |
+
$statuses = Mage::getSingleton('responsivebannerslider/status')->getOptionArray();
|
123 |
+
|
124 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
125 |
+
$this->getMassactionBlock()->addItem('status', array(
|
126 |
+
'label'=> Mage::helper('responsivebannerslider')->__('Change status'),
|
127 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
128 |
+
'additional' => array(
|
129 |
+
'visibility' => array(
|
130 |
+
'name' => 'statuss',
|
131 |
+
'type' => 'select',
|
132 |
+
'class' => 'required-entry',
|
133 |
+
'label' => Mage::helper('responsivebannerslider')->__('Status'),
|
134 |
+
'values' => $statuses
|
135 |
+
)
|
136 |
+
)
|
137 |
+
));
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
|
141 |
+
public function getRowUrl($row) {
|
142 |
+
|
143 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
144 |
+
}
|
145 |
+
|
146 |
+
public function getGridUrl()
|
147 |
+
{
|
148 |
+
return $this->getUrl('*/*/grid', array('_current' => true));
|
149 |
+
}
|
150 |
+
|
151 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slider/Renderer/Groups.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slider_Renderer_Groups extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
11 |
+
{
|
12 |
+
public function render(Varien_Object $row)
|
13 |
+
{
|
14 |
+
$value = $row->getData($this->getColumn()->getIndex());
|
15 |
+
$groupdata = explode(",",$value);
|
16 |
+
$Slider_Groups = '';
|
17 |
+
for($i=0; $i<count($groupdata); $i++) {
|
18 |
+
|
19 |
+
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->load($groupdata[$i]);
|
20 |
+
$title = $groups->getData('title');
|
21 |
+
if($i ==0){
|
22 |
+
$Slider_Groups = $title;
|
23 |
+
}else{
|
24 |
+
$Slider_Groups .= ", ".$title;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
return $Slider_Groups;
|
28 |
+
}
|
29 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup extends Mage_Adminhtml_Block_Widget_Grid_Container
|
11 |
+
{
|
12 |
+
public function __construct() {
|
13 |
+
|
14 |
+
$this->_controller = 'adminhtml_slidergroup';
|
15 |
+
$this->_blockGroup = 'responsivebannerslider';
|
16 |
+
$this->_headerText = Mage::helper('responsivebannerslider')->__('Responsive Banner Slider Groups');
|
17 |
+
$this->_addButtonLabel = Mage::helper('responsivebannerslider')->__('Add Group');
|
18 |
+
parent::__construct();
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _prepareLayout() {
|
22 |
+
|
23 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
24 |
+
$this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')
|
25 |
+
->setUseConfirm(false)
|
26 |
+
->setSwitchUrl($this->getUrl('*/*/*', array('store'=>null)))
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
return parent::_prepareLayout();
|
31 |
+
}
|
32 |
+
|
33 |
+
public function getStoreSwitcherHtml() {
|
34 |
+
return $this->getChildHtml('store_switcher');
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getGroupData() {
|
38 |
+
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection()->setOrder('slidergroup_id', 'ASC');
|
39 |
+
foreach($groups as $group) {
|
40 |
+
$options[$group->getData('slidergroup_id')] = $group->getTitle();
|
41 |
+
}
|
42 |
+
|
43 |
+
return $options;
|
44 |
+
}
|
45 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
12 |
+
{
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
parent::__construct();
|
16 |
+
|
17 |
+
$this->_objectId = 'id';
|
18 |
+
$this->_blockGroup = 'responsivebannerslider';
|
19 |
+
$this->_controller = 'adminhtml_slidergroup';
|
20 |
+
|
21 |
+
$this->_updateButton('save', 'label', Mage::helper('responsivebannerslider')->__('Save Item'));
|
22 |
+
$this->_updateButton('delete', 'label', Mage::helper('responsivebannerslider')->__('Delete Item'));
|
23 |
+
|
24 |
+
$this->_addButton('saveandcontinue', array(
|
25 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
26 |
+
'onclick' => 'saveAndContinueEdit()',
|
27 |
+
'class' => 'save',
|
28 |
+
), -100);
|
29 |
+
|
30 |
+
$this->_formScripts[] = "
|
31 |
+
function toggleEditor() {
|
32 |
+
if (tinyMCE.getInstanceById('web_content') == null) {
|
33 |
+
tinyMCE.execCommand('mceAddControl', false, 'web_content');
|
34 |
+
} else {
|
35 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'web_content');
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
onload = function()
|
40 |
+
{
|
41 |
+
|
42 |
+
var e = document.getElementById('navigation_style');
|
43 |
+
var strUser = e.options[e.selectedIndex].value;
|
44 |
+
//document.getElementById('navigation_style_name').innerHTML = strUser;
|
45 |
+
document.getElementById('navigation_style_name').addClassName(strUser);
|
46 |
+
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
function saveAndContinueEdit(){
|
51 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
52 |
+
}
|
53 |
+
";
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getHeaderText()
|
57 |
+
{
|
58 |
+
if( Mage::registry('slidergroup_data') && Mage::registry('slidergroup_data')->getId() ) {
|
59 |
+
return Mage::helper('responsivebannerslider')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('slidergroup_data')->getTitle()));
|
60 |
+
} else {
|
61 |
+
return Mage::helper('responsivebannerslider')->__('Add Group');
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Form.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
12 |
+
{
|
13 |
+
protected function _prepareForm()
|
14 |
+
{
|
15 |
+
$form = new Varien_Data_Form(array(
|
16 |
+
'id' => 'edit_form',
|
17 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
18 |
+
'method' => 'post',
|
19 |
+
'enctype' => 'multipart/form-data'
|
20 |
+
)
|
21 |
+
);
|
22 |
+
|
23 |
+
$form->setUseContainer(true);
|
24 |
+
$this->setForm($form);
|
25 |
+
return parent::_prepareForm();
|
26 |
+
}
|
27 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Categories.php
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
|
13 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit_Tab_Categories extends Mage_Adminhtml_Block_Catalog_Category_Tree
|
14 |
+
{
|
15 |
+
protected $_categoryIds = null;
|
16 |
+
protected $_selectedNodes = null;
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
|
20 |
+
$this->setTemplate('responsivebannerslider/category/edit/tab/categories.phtml');
|
21 |
+
$this->_withProductCount = false;
|
22 |
+
}
|
23 |
+
|
24 |
+
public function getCategoryIds(){
|
25 |
+
|
26 |
+
$data = Mage::registry('slidergroup_data');
|
27 |
+
$cate_model = Mage::getModel('responsivebannerslider/categories')->getCollection()->addFieldToFilter('slidergroup_id',array('eq' => $data->getData('slidergroup_id')));
|
28 |
+
|
29 |
+
$_categoryIds = array();
|
30 |
+
|
31 |
+
foreach($cate_model as $cate_data){
|
32 |
+
$_categoryIds[] = $cate_data->getData('category_ids');
|
33 |
+
}
|
34 |
+
$this->_categoryIds = $_categoryIds;
|
35 |
+
|
36 |
+
return $this->_categoryIds;
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
public function getIdsString(){
|
41 |
+
return implode(',', $this->getCategoryIds());
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getRootNode(){
|
45 |
+
$root = $this->getRoot();
|
46 |
+
if ($root && in_array($root->getId(), $this->getCategoryIds())) {
|
47 |
+
$root->setChecked(true);
|
48 |
+
}
|
49 |
+
return $root;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function getRoot($parentNodeCategory = null, $recursionLevel = 3){
|
53 |
+
if (!is_null($parentNodeCategory) && $parentNodeCategory->getId()) {
|
54 |
+
return $this->getNode($parentNodeCategory, $recursionLevel);
|
55 |
+
}
|
56 |
+
$root = Mage::registry('category_root');
|
57 |
+
if (is_null($root)) {
|
58 |
+
$rootId = Mage_Catalog_Model_Category::TREE_ROOT_ID;
|
59 |
+
$ids = $this->getSelectedCategotyPathIds($rootId);
|
60 |
+
$tree = Mage::getResourceSingleton('catalog/category_tree')
|
61 |
+
->loadByIds($ids, false, false);
|
62 |
+
if ($this->getCategory()) {
|
63 |
+
$tree->loadEnsuredNodes($this->getCategory(), $tree->getNodeById($rootId));
|
64 |
+
}
|
65 |
+
$tree->addCollectionData($this->getCategoryCollection());
|
66 |
+
$root = $tree->getNodeById($rootId);
|
67 |
+
Mage::register('category_root', $root);
|
68 |
+
}
|
69 |
+
return $root;
|
70 |
+
}
|
71 |
+
protected function _getNodeJson($node, $level = 1){
|
72 |
+
$item = parent::_getNodeJson($node, $level);
|
73 |
+
if ($this->_isParentSelectedCategory($node)) {
|
74 |
+
$item['expanded'] = true;
|
75 |
+
}
|
76 |
+
if (in_array($node->getId(), $this->getCategoryIds())) {
|
77 |
+
$item['checked'] = true;
|
78 |
+
}
|
79 |
+
return $item;
|
80 |
+
}
|
81 |
+
protected function _isParentSelectedCategory($node){
|
82 |
+
$result = false;
|
83 |
+
// Contains string with all category IDs of children (not exactly direct) of the node
|
84 |
+
$allChildren = $node->getAllChildren();
|
85 |
+
if ($allChildren) {
|
86 |
+
$selectedCategoryIds = $this->getCategoryIds();
|
87 |
+
$allChildrenArr = explode(',', $allChildren);
|
88 |
+
for ($i = 0, $cnt = count($selectedCategoryIds); $i < $cnt; $i++) {
|
89 |
+
$isSelf = $node->getId() == $selectedCategoryIds[$i];
|
90 |
+
if (!$isSelf && in_array($selectedCategoryIds[$i], $allChildrenArr)) {
|
91 |
+
$result = true;
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
return $result;
|
97 |
+
}
|
98 |
+
protected function _getSelectedNodes(){
|
99 |
+
if ($this->_selectedNodes === null) {
|
100 |
+
$this->_selectedNodes = array();
|
101 |
+
$root = $this->getRoot();
|
102 |
+
foreach ($this->getCategoryIds() as $categoryId) {
|
103 |
+
if ($root) {
|
104 |
+
$this->_selectedNodes[] = $root->getTree()->getNodeById($categoryId);
|
105 |
+
}
|
106 |
+
}
|
107 |
+
}
|
108 |
+
return $this->_selectedNodes;
|
109 |
+
}
|
110 |
+
|
111 |
+
public function getCategoryChildrenJson($categoryId){
|
112 |
+
$category = Mage::getModel('catalog/category')->load($categoryId);
|
113 |
+
$node = $this->getRoot($category, 1)->getTree()->getNodeById($categoryId);
|
114 |
+
if (!$node || !$node->hasChildren()) {
|
115 |
+
return '[]';
|
116 |
+
}
|
117 |
+
$children = array();
|
118 |
+
foreach ($node->getChildren() as $child) {
|
119 |
+
$children[] = $this->_getNodeJson($child);
|
120 |
+
}
|
121 |
+
return Mage::helper('core')->jsonEncode($children);
|
122 |
+
}
|
123 |
+
|
124 |
+
public function getLoadTreeUrl($expanded = null){
|
125 |
+
return $this->getUrl('*/*/categoriesJson', array('_current' => true));
|
126 |
+
}
|
127 |
+
|
128 |
+
public function getSelectedCategoryPathIds($rootId = false){
|
129 |
+
$ids = array();
|
130 |
+
$categoryIds = $this->getCategoryIds();
|
131 |
+
if (empty($categoryIds)) {
|
132 |
+
return array();
|
133 |
+
}
|
134 |
+
$collection = Mage::getResourceModel('catalog/category_collection');
|
135 |
+
if ($rootId) {
|
136 |
+
$collection->addFieldToFilter('parent_id', $rootId);
|
137 |
+
}
|
138 |
+
else {
|
139 |
+
$collection->addFieldToFilter('entity_id', array('in'=>$categoryIds));
|
140 |
+
}
|
141 |
+
|
142 |
+
foreach ($collection as $item) {
|
143 |
+
if ($rootId && !in_array($rootId, $item->getPathIds())) {
|
144 |
+
continue;
|
145 |
+
}
|
146 |
+
foreach ($item->getPathIds() as $id) {
|
147 |
+
if (!in_array($id, $ids)) {
|
148 |
+
$ids[] = $id;
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
+
return $ids;
|
153 |
+
}
|
154 |
+
|
155 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Code.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit_Tab_Code extends Mage_Adminhtml_Block_Widget_Grid
|
12 |
+
{
|
13 |
+
public function __construct() {
|
14 |
+
parent::__construct();
|
15 |
+
$this->setTemplate('responsivebannerslider/code.phtml');
|
16 |
+
}
|
17 |
+
|
18 |
+
public function getCurrentGroup() {
|
19 |
+
return Mage::registry('slidergroup_data');
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,396 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
12 |
+
{
|
13 |
+
protected function _prepareForm()
|
14 |
+
{
|
15 |
+
|
16 |
+
$form = new Varien_Data_Form();
|
17 |
+
$this->setForm($form);
|
18 |
+
$fieldset = $form->addFieldset('general_form', array('legend'=>Mage::helper('responsivebannerslider')->__('General information')));
|
19 |
+
|
20 |
+
|
21 |
+
$title = $fieldset->addField('title', 'text', array(
|
22 |
+
'label' => Mage::helper('responsivebannerslider')->__('Title'),
|
23 |
+
'class' => 'required-entry',
|
24 |
+
'required' => true,
|
25 |
+
'name' => 'title',
|
26 |
+
));
|
27 |
+
|
28 |
+
$position = $fieldset->addField('position', 'select', array(
|
29 |
+
'label' => Mage::helper('responsivebannerslider')->__('Position'),
|
30 |
+
'name' => 'position',
|
31 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_position')->toOptionArray(),
|
32 |
+
));
|
33 |
+
|
34 |
+
$sort_order = $fieldset->addField('sort_order', 'text', array(
|
35 |
+
'label' => Mage::helper('responsivebannerslider')->__('Sort Order'),
|
36 |
+
'class' => 'validate-number',
|
37 |
+
'required' => false,
|
38 |
+
'name' => 'sort_order',
|
39 |
+
'note' => 'set the sort order in case of multiple group on one page'
|
40 |
+
));
|
41 |
+
|
42 |
+
|
43 |
+
$status = $fieldset->addField('status', 'select', array(
|
44 |
+
'label' => Mage::helper('responsivebannerslider')->__('Status'),
|
45 |
+
'name' => 'status',
|
46 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_status')->toOptionArray(),
|
47 |
+
));
|
48 |
+
|
49 |
+
|
50 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
51 |
+
$stores = $fieldset->addField('store_id', 'multiselect', array(
|
52 |
+
'name' => 'store_id[]',
|
53 |
+
'label' => Mage::helper('responsivebannerslider')->__('Visible In'),
|
54 |
+
'required' => true,
|
55 |
+
'values' => Mage::getSingleton('adminhtml/system_store')
|
56 |
+
->getStoreValuesForForm(),
|
57 |
+
|
58 |
+
));
|
59 |
+
}else {
|
60 |
+
$stores = $fieldset->addField('store_id', 'hidden', array(
|
61 |
+
'name' => 'store_id[]',
|
62 |
+
'value' => Mage::app()->getStore(true)->getId()
|
63 |
+
));
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
$fieldset = $form->addFieldset('effect_form', array('legend'=>Mage::helper('responsivebannerslider')->__('Slider Effect')));
|
68 |
+
|
69 |
+
$start_animation = $fieldset->addField('start_animation', 'select', array(
|
70 |
+
'label' => Mage::helper('responsivebannerslider')->__('Auto Start Animation'),
|
71 |
+
'name' => 'start_animation',
|
72 |
+
'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
|
73 |
+
));
|
74 |
+
|
75 |
+
$loop_slider = $fieldset->addField('loop_slider', 'select', array(
|
76 |
+
'label' => Mage::helper('responsivebannerslider')->__('Loop Slider '),
|
77 |
+
'name' => 'loop_slider',
|
78 |
+
'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
|
79 |
+
));
|
80 |
+
|
81 |
+
$pause_snavigation = $fieldset->addField('pause_snavigation', 'select', array(
|
82 |
+
'label' => Mage::helper('responsivebannerslider')->__('Pause Slider On Navigation'),
|
83 |
+
'name' => 'pause_snavigation',
|
84 |
+
'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
|
85 |
+
));
|
86 |
+
|
87 |
+
$pause_shover = $fieldset->addField('pause_shover', 'select', array(
|
88 |
+
'label' => Mage::helper('responsivebannerslider')->__('Pause Slider On Hover'),
|
89 |
+
'name' => 'pause_shover',
|
90 |
+
'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
|
91 |
+
));
|
92 |
+
|
93 |
+
$animation_type = $fieldset->addField('animation_type', 'select', array(
|
94 |
+
'label' => Mage::helper('responsivebannerslider')->__('Animation Type'),
|
95 |
+
'name' => 'animation_type',
|
96 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_animationtype')->toOptionArray(),
|
97 |
+
));
|
98 |
+
|
99 |
+
$animation_duration = $fieldset->addField('animation_duration', 'text', array(
|
100 |
+
'label' => Mage::helper('responsivebannerslider')->__('Animation Duration'),
|
101 |
+
'class' => 'required-entry validate-number',
|
102 |
+
'required' => true,
|
103 |
+
'name' => 'animation_duration',
|
104 |
+
'note' => 'in milliseconds (default is 600)',
|
105 |
+
));
|
106 |
+
|
107 |
+
$animation_direction = $fieldset->addField('animation_direction', 'select', array(
|
108 |
+
'label' => Mage::helper('responsivebannerslider')->__('Animation Direction'),
|
109 |
+
'name' => 'animation_direction',
|
110 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_animationdirection')->toOptionArray(),
|
111 |
+
));
|
112 |
+
|
113 |
+
$slide_duration = $fieldset->addField('slide_duration', 'text', array(
|
114 |
+
'label' => Mage::helper('responsivebannerslider')->__('Slide Duration'),
|
115 |
+
'class' => 'required-entry validate-number',
|
116 |
+
'required' => true,
|
117 |
+
'name' => 'slide_duration',
|
118 |
+
'note' => 'in milliseconds (default is 7000)',
|
119 |
+
));
|
120 |
+
|
121 |
+
$random_order = $fieldset->addField('random_order', 'select', array(
|
122 |
+
'label' => Mage::helper('responsivebannerslider')->__('Random Order'),
|
123 |
+
'name' => 'random_order',
|
124 |
+
'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
|
125 |
+
));
|
126 |
+
|
127 |
+
$smooth_height = $fieldset->addField('smooth_height', 'select', array(
|
128 |
+
'label' => Mage::helper('responsivebannerslider')->__('Smooth Height '),
|
129 |
+
'name' => 'smooth_height',
|
130 |
+
'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(),
|
131 |
+
));
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
|
136 |
+
|
137 |
+
$fieldset = $form->addFieldset('style_form', array('legend'=>Mage::helper('responsivebannerslider')->__('Slider Style')));
|
138 |
+
|
139 |
+
$max_width = $fieldset->addField('max_width', 'text', array(
|
140 |
+
'label' => Mage::helper('responsivebannerslider')->__('Maximum Width Slider'),
|
141 |
+
'class' => 'validate-number',
|
142 |
+
'required' => false,
|
143 |
+
'name' => 'max_width',
|
144 |
+
'note' => 'maximum width of the slider in pixels, leave empty or 0 for full responsive width',
|
145 |
+
));
|
146 |
+
|
147 |
+
$slider_theme = $fieldset->addField('slider_theme', 'select', array(
|
148 |
+
'label' => Mage::helper('responsivebannerslider')->__('Slider Theme'),
|
149 |
+
'name' => 'slider_theme',
|
150 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_theme')->toOptionArray(),
|
151 |
+
));
|
152 |
+
|
153 |
+
$slider_type = $fieldset->addField('slider_type', 'select', array(
|
154 |
+
'label' => Mage::helper('responsivebannerslider')->__('Slider Type'),
|
155 |
+
'name' => 'slider_type',
|
156 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_type')->toOptionArray(),
|
157 |
+
));
|
158 |
+
|
159 |
+
$content_background = $fieldset->addField('content_background', 'text', array(
|
160 |
+
'label' => Mage::helper('responsivebannerslider')->__('Banner content background'),
|
161 |
+
'required' => false,
|
162 |
+
'name' => 'content_background',
|
163 |
+
'class' => "color",
|
164 |
+
));
|
165 |
+
|
166 |
+
$content_opacity = $fieldset->addField('content_opacity', 'text', array(
|
167 |
+
'label' => Mage::helper('responsivebannerslider')->__('Banner content opacity'),
|
168 |
+
'class' => 'validate-number',
|
169 |
+
'required' => false,
|
170 |
+
'name' => 'content_opacity',
|
171 |
+
));
|
172 |
+
|
173 |
+
$thumbnail_size = $fieldset->addField('thumbnail_size', 'text', array(
|
174 |
+
'name' => 'thumbnail_size',
|
175 |
+
'label' => Mage::helper('responsivebannerslider')->__('Thumbnail Width'),
|
176 |
+
'required' => false,
|
177 |
+
'class' => 'validate-number validate-greater-than-zero',
|
178 |
+
'note' => 'width of the images in carousel, should not be larger then thumbnail upload width in general settings (default is 200)',
|
179 |
+
));
|
180 |
+
|
181 |
+
$navigation_arrow = $fieldset->addField('navigation_arrow', 'select', array(
|
182 |
+
'label' => Mage::helper('responsivebannerslider')->__('Show Navigation Arrows'),
|
183 |
+
'name' => 'navigation_arrow',
|
184 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_navigation')->toOptionArray(),
|
185 |
+
));
|
186 |
+
|
187 |
+
$navigation_style = $fieldset->addField('navigation_style', 'select', array(
|
188 |
+
'label' => Mage::helper('responsivebannerslider')->__('Navigation Arrows Style'),
|
189 |
+
'name' => 'navigation_style',
|
190 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_navigationstyle')->toOptionArray(),
|
191 |
+
'onchange' => 'notEmpty()',
|
192 |
+
'after_element_html' => '<td id="navi_arrow" class="scope-label"><i class="cws" id="navigation_style_name"></i></td>',
|
193 |
+
));
|
194 |
+
|
195 |
+
echo "<script>
|
196 |
+
function notEmpty(){
|
197 |
+
var e = document.getElementById('navigation_style');
|
198 |
+
|
199 |
+
var strUser = e.options[e.selectedIndex].value;
|
200 |
+
//document.getElementById('navigation_style_name').innerHTML = strUser;
|
201 |
+
document.getElementById('navi_arrow').getElementsByTagName('i')[0].removeAttribute('class');
|
202 |
+
document.getElementById('navigation_style_name').addClassName('cws '+strUser);
|
203 |
+
}
|
204 |
+
</script>";
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
$navigation_aposition = $fieldset->addField('navigation_aposition', 'select', array(
|
209 |
+
'label' => Mage::helper('responsivebannerslider')->__('Navigation Arrows Position'),
|
210 |
+
'name' => 'navigation_aposition',
|
211 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_navigationarrow')->toOptionArray(),
|
212 |
+
));
|
213 |
+
|
214 |
+
|
215 |
+
$navigation_acolor = $fieldset->addField('navigation_acolor', 'text', array(
|
216 |
+
'label' => Mage::helper('responsivebannerslider')->__('Navigation Arrows Color'),
|
217 |
+
'required' => false,
|
218 |
+
'name' => 'navigation_acolor',
|
219 |
+
'class' => 'color',
|
220 |
+
));
|
221 |
+
|
222 |
+
|
223 |
+
$show_pagination = $fieldset->addField('show_pagination', 'select', array(
|
224 |
+
'label' => Mage::helper('responsivebannerslider')->__('Show Pagination'),
|
225 |
+
'name' => 'show_pagination',
|
226 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_navigation')->toOptionArray(),
|
227 |
+
));
|
228 |
+
|
229 |
+
$pagination_style = $fieldset->addField('pagination_style', 'select', array(
|
230 |
+
'label' => Mage::helper('responsivebannerslider')->__('Pagination Style'),
|
231 |
+
'name' => 'pagination_style',
|
232 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_paginationstyle')->toOptionArray(),
|
233 |
+
));
|
234 |
+
|
235 |
+
$pagination_position = $fieldset->addField('pagination_position', 'select', array(
|
236 |
+
'label' => Mage::helper('responsivebannerslider')->__('Pagination Position'),
|
237 |
+
'name' => 'pagination_position',
|
238 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_paginationposition')->toOptionArray(),
|
239 |
+
));
|
240 |
+
|
241 |
+
$pagination_color = $fieldset->addField('pagination_color', 'text', array(
|
242 |
+
'label' => Mage::helper('responsivebannerslider')->__('Pagination Color'),
|
243 |
+
'required' => false,
|
244 |
+
'name' => 'pagination_color',
|
245 |
+
'class' => 'color',
|
246 |
+
));
|
247 |
+
|
248 |
+
$pagination_active = $fieldset->addField('pagination_active', 'text', array(
|
249 |
+
'label' => Mage::helper('responsivebannerslider')->__('Pagination Active Color'),
|
250 |
+
'required' => false,
|
251 |
+
'name' => 'pagination_active',
|
252 |
+
'class' => 'color',
|
253 |
+
));
|
254 |
+
|
255 |
+
$pagination_bar = $fieldset->addField('pagination_bar', 'text', array(
|
256 |
+
'label' => Mage::helper('responsivebannerslider')->__('Pagination Bar Background Color'),
|
257 |
+
'required' => false,
|
258 |
+
'name' => 'pagination_bar',
|
259 |
+
'class' => 'color',
|
260 |
+
));
|
261 |
+
|
262 |
+
|
263 |
+
|
264 |
+
|
265 |
+
if (Mage::getSingleton('adminhtml/session')->getSlidergroupData()) {
|
266 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getSlidergroupData());
|
267 |
+
$data = Mage::getSingleton('adminhtml/session')->getSlidergroupData();
|
268 |
+
|
269 |
+
Mage::getSingleton('adminhtml/session')->setSlidergroupData(null);
|
270 |
+
|
271 |
+
|
272 |
+
|
273 |
+
|
274 |
+
|
275 |
+
|
276 |
+
}elseif ( Mage::registry('slidergroup_data') ) {
|
277 |
+
$data = Mage::registry('slidergroup_data');
|
278 |
+
$store_model = Mage::getModel('responsivebannerslider/store')->getCollection()->addFieldToFilter('slidergroup_id',array('eq' => $data->getData('slidergroup_id')));
|
279 |
+
$store_data = array();
|
280 |
+
foreach($store_model as $s_data){
|
281 |
+
$store_data[] = $s_data->getData('store_id');
|
282 |
+
}
|
283 |
+
$model_data = $data->getData();
|
284 |
+
array_push($model_data,$model_data['store_id'] = $store_data);
|
285 |
+
|
286 |
+
$form->setValues($model_data);
|
287 |
+
|
288 |
+
}
|
289 |
+
|
290 |
+
|
291 |
+
|
292 |
+
$id = $this->getRequest()->getParam('id');
|
293 |
+
|
294 |
+
if($id == ''){
|
295 |
+
$model_data['animation_duration'] = '600';
|
296 |
+
$model_data['slide_duration'] = '7000';
|
297 |
+
$model_data['content_background'] = '333333';
|
298 |
+
$model_data['content_opacity'] = '9';
|
299 |
+
$model_data['navigation_acolor'] = '333333';
|
300 |
+
$model_data['pagination_color'] = '777777';
|
301 |
+
$model_data['pagination_active'] = '000000';
|
302 |
+
$model_data['pagination_bar'] = 'e5e5e5';
|
303 |
+
$model_data['thumbnail_size'] = '200';
|
304 |
+
$form->setValues($model_data);
|
305 |
+
$this->setForm($form);
|
306 |
+
}
|
307 |
+
|
308 |
+
|
309 |
+
$this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
|
310 |
+
->addFieldMap($slider_type->getHtmlId(), $slider_type->getName())
|
311 |
+
->addFieldMap($thumbnail_size->getHtmlId(), $thumbnail_size->getName())
|
312 |
+
->addFieldMap($navigation_arrow->getHtmlId(), $navigation_arrow->getName())
|
313 |
+
->addFieldMap($navigation_style->getHtmlId(), $navigation_style->getName())
|
314 |
+
->addFieldMap($navigation_aposition->getHtmlId(), $navigation_aposition->getName())
|
315 |
+
->addFieldMap($navigation_acolor->getHtmlId(), $navigation_acolor->getName())
|
316 |
+
->addFieldMap($show_pagination->getHtmlId(), $show_pagination->getName())
|
317 |
+
->addFieldMap($pagination_style->getHtmlId(), $pagination_style->getName())
|
318 |
+
->addFieldMap($pagination_position->getHtmlId(), $pagination_position->getName())
|
319 |
+
->addFieldMap($pagination_color->getHtmlId(), $pagination_color->getName())
|
320 |
+
->addFieldMap($start_animation->getHtmlId(), $start_animation->getName())
|
321 |
+
->addFieldMap($loop_slider->getHtmlId(), $loop_slider->getName())
|
322 |
+
->addFieldMap($pause_snavigation->getHtmlId(), $pause_snavigation->getName())
|
323 |
+
->addFieldMap($pause_shover->getHtmlId(), $pause_shover->getName())
|
324 |
+
->addFieldMap($pagination_active->getHtmlId(), $pagination_active->getName())
|
325 |
+
->addFieldMap($pagination_bar->getHtmlId(), $pagination_bar->getName())
|
326 |
+
|
327 |
+
->addFieldDependence(
|
328 |
+
$pagination_bar->getName(),
|
329 |
+
$pagination_style->getName(),
|
330 |
+
array('circular_bar','square_bar')
|
331 |
+
)
|
332 |
+
|
333 |
+
->addFieldDependence(
|
334 |
+
$thumbnail_size->getName(),
|
335 |
+
$slider_type->getName(),
|
336 |
+
array('carousel','bas-caro')
|
337 |
+
)
|
338 |
+
->addFieldDependence(
|
339 |
+
$navigation_style->getName(),
|
340 |
+
$navigation_arrow->getName(),
|
341 |
+
array('hover','always')
|
342 |
+
)
|
343 |
+
->addFieldDependence(
|
344 |
+
$navigation_aposition->getName(),
|
345 |
+
$navigation_arrow->getName(),
|
346 |
+
array('hover','always')
|
347 |
+
)
|
348 |
+
->addFieldDependence(
|
349 |
+
$navigation_acolor->getName(),
|
350 |
+
$navigation_arrow->getName(),
|
351 |
+
array('hover','always')
|
352 |
+
)
|
353 |
+
->addFieldDependence(
|
354 |
+
$pagination_style->getName(),
|
355 |
+
$show_pagination->getName(),
|
356 |
+
array('hover','always')
|
357 |
+
)
|
358 |
+
->addFieldDependence(
|
359 |
+
$pagination_position->getName(),
|
360 |
+
$show_pagination->getName(),
|
361 |
+
array('hover','always')
|
362 |
+
)
|
363 |
+
|
364 |
+
->addFieldDependence(
|
365 |
+
$pagination_active->getName(),
|
366 |
+
$show_pagination->getName(),
|
367 |
+
array('hover','always')
|
368 |
+
)
|
369 |
+
|
370 |
+
->addFieldDependence(
|
371 |
+
$pagination_color->getName(),
|
372 |
+
$show_pagination->getName(),
|
373 |
+
array('hover','always')
|
374 |
+
)
|
375 |
+
->addFieldDependence(
|
376 |
+
$loop_slider->getName(),
|
377 |
+
$start_animation->getName(),
|
378 |
+
1
|
379 |
+
)
|
380 |
+
->addFieldDependence(
|
381 |
+
$pause_snavigation->getName(),
|
382 |
+
$start_animation->getName(),
|
383 |
+
1
|
384 |
+
)
|
385 |
+
->addFieldDependence(
|
386 |
+
$pause_shover->getName(),
|
387 |
+
$start_animation->getName(),
|
388 |
+
1
|
389 |
+
)
|
390 |
+
|
391 |
+
);
|
392 |
+
|
393 |
+
return parent::_prepareForm();
|
394 |
+
|
395 |
+
}
|
396 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Pages.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
|
13 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit_Tab_Pages extends Mage_Adminhtml_Block_Widget_Form
|
14 |
+
{
|
15 |
+
protected function _prepareForm()
|
16 |
+
{
|
17 |
+
|
18 |
+
$data = Mage::registry('slidergroup_data');
|
19 |
+
$page_model = Mage::getModel('responsivebannerslider/page')->getCollection()
|
20 |
+
->addFieldToFilter('slidergroup_id',array('eq' => $data->getData('slidergroup_id')));
|
21 |
+
$page = array();
|
22 |
+
foreach($page_model as $page_data)
|
23 |
+
{
|
24 |
+
$page[] = $page_data->getData('pages');
|
25 |
+
}
|
26 |
+
|
27 |
+
$form = new Varien_Data_Form();
|
28 |
+
$this->setForm($form);
|
29 |
+
$fieldset = $form->addFieldset('pages_form', array('legend'=>Mage::helper('responsivebannerslider')->__('Group Pages')));
|
30 |
+
|
31 |
+
$fieldset->addField('pages', 'multiselect', array(
|
32 |
+
'name' => 'pages[]',
|
33 |
+
'label' => Mage::helper('responsivebannerslider')->__('Visible In'),
|
34 |
+
'required' => false,
|
35 |
+
'values' => Mage::getSingleton('responsivebannerslider/config_source_pages')->toOptionArray(),
|
36 |
+
'value' => $page,
|
37 |
+
|
38 |
+
));
|
39 |
+
|
40 |
+
return parent::_prepareForm();
|
41 |
+
}
|
42 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Product.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
|
13 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit_Tab_Product extends Mage_Adminhtml_Block_Widget_Grid
|
14 |
+
{
|
15 |
+
|
16 |
+
public function __construct() {
|
17 |
+
parent::__construct();
|
18 |
+
$this->setTemplate('responsivebannerslider/category/edit/tab/product.phtml');
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function getProductIds() {
|
22 |
+
|
23 |
+
$data = Mage::registry('slidergroup_data');
|
24 |
+
$prd_model = Mage::getModel('responsivebannerslider/product')->getCollection()
|
25 |
+
->addFieldToFilter('slidergroup_id',array('eq' => $data->getData('slidergroup_id')));
|
26 |
+
$_productList = array();
|
27 |
+
|
28 |
+
foreach($prd_model as $prd_data){
|
29 |
+
$_productList[] = $prd_data->getData('product_sku');
|
30 |
+
}
|
31 |
+
return is_array($_productList) ? $_productList : array();
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getIdsString() {
|
35 |
+
return implode(', ', $this->getProductIds());
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tab/Sliders.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit_Tab_Sliders extends Mage_Adminhtml_Block_Widget_Grid
|
12 |
+
{
|
13 |
+
public function __construct() {
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('sliderGrid');
|
16 |
+
$this->setDefaultSort('slide_id');
|
17 |
+
$this->setDefaultDir('asc');
|
18 |
+
$this->setSaveParametersInSession(true);
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _prepareCollection() {
|
22 |
+
$slide_collection = Mage::getModel('responsivebannerslider/slide')->getCollection();
|
23 |
+
$current_groupid = $this->getGroupId();
|
24 |
+
$slide_collection->addFieldToFilter('group_names', array(array('finset' => $current_groupid)));
|
25 |
+
$this->setCollection($slide_collection);
|
26 |
+
|
27 |
+
return parent::_prepareCollection();
|
28 |
+
}
|
29 |
+
|
30 |
+
protected function _prepareColumns() {
|
31 |
+
$this->addColumn('slide_id', array(
|
32 |
+
'header' => $this->__('ID'),
|
33 |
+
'align' => 'left',
|
34 |
+
'width' => '60px',
|
35 |
+
'index' => 'slide_id',
|
36 |
+
));
|
37 |
+
|
38 |
+
$this->addColumn('titles', array(
|
39 |
+
'header' => $this->__('Title'),
|
40 |
+
'align' => 'left',
|
41 |
+
'index' => 'titles',
|
42 |
+
));
|
43 |
+
|
44 |
+
$this->addColumn('statuss', array(
|
45 |
+
'header' => $this->__('Enabled'),
|
46 |
+
'width' => '90px',
|
47 |
+
'index' => 'statuss',
|
48 |
+
'type' => 'options',
|
49 |
+
'options' => array(
|
50 |
+
1 => $this->__('Enabled'),
|
51 |
+
0 => $this->__('Disabled'),
|
52 |
+
),
|
53 |
+
));
|
54 |
+
|
55 |
+
return parent::_prepareColumns();
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getGroupId() {
|
59 |
+
return Mage::registry('slidergroup_data') ? Mage::registry('slidergroup_data')->getId() : 0;
|
60 |
+
}
|
61 |
+
public function getRowUrl($row) {
|
62 |
+
|
63 |
+
return $this->getUrl('*/adminhtml_slider/edit', array('id' => $row->getId()));
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Edit/Tabs.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
12 |
+
{
|
13 |
+
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
parent::__construct();
|
17 |
+
$this->setId('slidergroup_tabs');
|
18 |
+
$this->setDestElementId('edit_form');
|
19 |
+
$this->setTitle(Mage::helper('responsivebannerslider')->__('Manage Groups'));
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function _beforeToHtml()
|
23 |
+
{
|
24 |
+
$this->addTab('form_section', array(
|
25 |
+
'label' => Mage::helper('responsivebannerslider')->__('General Information'),
|
26 |
+
'title' => Mage::helper('responsivebannerslider')->__('General Information'),
|
27 |
+
'content' => $this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit_tab_form')->toHtml(),
|
28 |
+
));
|
29 |
+
|
30 |
+
$this->addTab('pages_section', array(
|
31 |
+
'label' => Mage::helper('responsivebannerslider')->__('Display on Pages'),
|
32 |
+
'title' => Mage::helper('responsivebannerslider')->__('Display on Pages'),
|
33 |
+
'content' => $this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit_tab_pages')->toHtml(),
|
34 |
+
));
|
35 |
+
|
36 |
+
$this->addTab('category_section', array(
|
37 |
+
'label' => Mage::helper('responsivebannerslider')->__('Display on Categories'),
|
38 |
+
'title' => Mage::helper('responsivebannerslider')->__('Display on Categories'),
|
39 |
+
'content' => $this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit_tab_categories')->toHtml(),
|
40 |
+
));
|
41 |
+
|
42 |
+
$this->addTab('product_section', array(
|
43 |
+
'label' => Mage::helper('responsivebannerslider')->__('Display on Product Pages'),
|
44 |
+
'title' => Mage::helper('responsivebannerslider')->__('Display on Product Pages'),
|
45 |
+
'content' => $this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit_tab_product')->toHtml(),
|
46 |
+
));
|
47 |
+
|
48 |
+
if ($this->getRequest()->getParam('id')) {
|
49 |
+
|
50 |
+
$this->addTab('sliders_section', array(
|
51 |
+
'label' => Mage::helper('responsivebannerslider')->__('Slides of this Groups'),
|
52 |
+
'title' => Mage::helper('responsivebannerslider')->__('Slides of this Groups'),
|
53 |
+
'content' => $this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit_tab_sliders')->toHtml(),
|
54 |
+
));
|
55 |
+
|
56 |
+
$this->addTab('code_section', array(
|
57 |
+
'label' => Mage::helper('responsivebannerslider')->__('Use Code Inserts'),
|
58 |
+
'title' => Mage::helper('responsivebannerslider')->__('Use Code Inserts'),
|
59 |
+
'content' => $this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit_tab_code')->toHtml(),
|
60 |
+
));
|
61 |
+
}
|
62 |
+
|
63 |
+
return parent::_beforeToHtml();
|
64 |
+
}
|
65 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/Adminhtml/Slidergroup/Grid.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_Adminhtml_Slidergroup_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
11 |
+
{
|
12 |
+
public function __construct() {
|
13 |
+
parent::__construct();
|
14 |
+
$this->setId('slidergroupGrid');
|
15 |
+
$this->setDefaultSort('slidergroup_id');
|
16 |
+
$this->setDefaultDir('ASC');
|
17 |
+
$this->setSaveParametersInSession(true);
|
18 |
+
$this->setUseAjax(true);
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _prepareCollection() {
|
22 |
+
|
23 |
+
$collection = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection();
|
24 |
+
|
25 |
+
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
26 |
+
if($storeId){
|
27 |
+
$collection->storeFilter($storeId);
|
28 |
+
}
|
29 |
+
$this->setCollection($collection);
|
30 |
+
|
31 |
+
return parent::_prepareCollection();
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function _prepareColumns()
|
35 |
+
{
|
36 |
+
$this->addColumn('slidergroup_id', array(
|
37 |
+
'header' => Mage::helper('responsivebannerslider')->__('ID'),
|
38 |
+
'align' =>'right',
|
39 |
+
'width' => '50px',
|
40 |
+
'index' => 'slidergroup_id',
|
41 |
+
));
|
42 |
+
|
43 |
+
$this->addColumn('title', array(
|
44 |
+
'header' => Mage::helper('responsivebannerslider')->__('Group Title'),
|
45 |
+
'align' =>'left',
|
46 |
+
'index' => 'title',
|
47 |
+
));
|
48 |
+
|
49 |
+
$this->addColumn('sort_order', array(
|
50 |
+
'header' => Mage::helper('responsivebannerslider')->__('Sort Order'),
|
51 |
+
'align' =>'left',
|
52 |
+
'index' => 'sort_order',
|
53 |
+
));
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
$this->addColumn('status', array(
|
58 |
+
'header' => Mage::helper('responsivebannerslider')->__('Status'),
|
59 |
+
'align' => 'left',
|
60 |
+
'width' => '80px',
|
61 |
+
'index' => 'status',
|
62 |
+
'type' => 'options',
|
63 |
+
'options' => array(
|
64 |
+
1 => 'Enabled',
|
65 |
+
0 => 'Disabled',
|
66 |
+
),
|
67 |
+
));
|
68 |
+
|
69 |
+
$this->addColumn('action',
|
70 |
+
array(
|
71 |
+
'header' => Mage::helper('responsivebannerslider')->__('Action'),
|
72 |
+
'width' => '100',
|
73 |
+
'type' => 'action',
|
74 |
+
'getter' => 'getId',
|
75 |
+
'actions' => array(
|
76 |
+
array(
|
77 |
+
'caption' => Mage::helper('responsivebannerslider')->__('Edit'),
|
78 |
+
'url' => array('base'=> '*/*/edit'),
|
79 |
+
'field' => 'id'
|
80 |
+
)
|
81 |
+
),
|
82 |
+
'filter' => false,
|
83 |
+
'sortable' => false,
|
84 |
+
'index' => 'stores',
|
85 |
+
'is_system' => true,
|
86 |
+
));
|
87 |
+
|
88 |
+
return parent::_prepareColumns();
|
89 |
+
}
|
90 |
+
|
91 |
+
protected function _prepareMassaction()
|
92 |
+
{
|
93 |
+
$this->setMassactionIdField('slidergroup_id');
|
94 |
+
$this->getMassactionBlock()->setFormFieldName('responsivebannerslider_group');
|
95 |
+
|
96 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
97 |
+
'label' => Mage::helper('responsivebannerslider')->__('Delete'),
|
98 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
99 |
+
'confirm' => Mage::helper('responsivebannerslider')->__('Are you sure?')
|
100 |
+
));
|
101 |
+
|
102 |
+
$statuses = Mage::getSingleton('responsivebannerslider/status')->getOptionArray();
|
103 |
+
|
104 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
105 |
+
$this->getMassactionBlock()->addItem('status', array(
|
106 |
+
'label'=> Mage::helper('responsivebannerslider')->__('Change status'),
|
107 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
108 |
+
'additional' => array(
|
109 |
+
'visibility' => array(
|
110 |
+
'name' => 'status',
|
111 |
+
'type' => 'select',
|
112 |
+
'class' => 'required-entry',
|
113 |
+
'label' => Mage::helper('responsivebannerslider')->__('Status'),
|
114 |
+
'values' => $statuses
|
115 |
+
)
|
116 |
+
)
|
117 |
+
));
|
118 |
+
return $this;
|
119 |
+
}
|
120 |
+
|
121 |
+
public function getRowUrl($row) {
|
122 |
+
|
123 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
124 |
+
}
|
125 |
+
|
126 |
+
public function getGridUrl()
|
127 |
+
{
|
128 |
+
return $this->getUrl('*/*/grid', array('_current' => true));
|
129 |
+
}
|
130 |
+
|
131 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/View.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_View extends Mage_Core_Block_Template
|
13 |
+
{
|
14 |
+
public function __construct() {
|
15 |
+
$this->setLazylaod(Mage::getStoreConfig("responsivebannerslider/general/lazy_load_jquery"));
|
16 |
+
}
|
17 |
+
|
18 |
+
|
19 |
+
public function getGroupscollection()
|
20 |
+
{
|
21 |
+
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection();
|
22 |
+
$groups ->addFieldToFilter('status',1);
|
23 |
+
$groups ->addFieldToFilter('slidergroup_id',$this->getCode());
|
24 |
+
|
25 |
+
$cms_page = Mage::getStoreConfig('responsivebannerslider/general/cms_page');
|
26 |
+
$category_page = Mage::getStoreConfig('responsivebannerslider/general/category_page');
|
27 |
+
$product_page = Mage::getStoreConfig('responsivebannerslider/general/product_page');
|
28 |
+
|
29 |
+
if(Mage::registry('current_category')) {
|
30 |
+
if($category_page == 0) {
|
31 |
+
return false;
|
32 |
+
}
|
33 |
+
}elseif (Mage::registry('current_product')) {
|
34 |
+
if($product_page == 0) {
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
}elseif (Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms') {
|
38 |
+
if($cms_page == 0) {
|
39 |
+
return false;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
return $groups;
|
44 |
+
}
|
45 |
+
|
46 |
+
public function getSlides($slidegroupId) {
|
47 |
+
$slide_collection = Mage::getModel('responsivebannerslider/slide')->getCollection()
|
48 |
+
->addFieldToFilter('group_names', array(array('finset' => $slidegroupId)))
|
49 |
+
->addFieldToFilter('statuss', '1')
|
50 |
+
->setOrder('sort_order','ASC');
|
51 |
+
|
52 |
+
return $slide_collection;
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
?>
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/View/Bottom.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
|
13 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_View_Bottom extends Mage_Core_Block_Template
|
14 |
+
{
|
15 |
+
public function __construct() {
|
16 |
+
$this->setLazylaod(Mage::getStoreConfig("responsivebannerslider/general/lazy_load_jquery"));
|
17 |
+
}
|
18 |
+
|
19 |
+
public function getGroupscollection()
|
20 |
+
{
|
21 |
+
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection();
|
22 |
+
$groups->addFieldToFilter('status',1);
|
23 |
+
$groups->addFieldToFilter('position','content_bottom');
|
24 |
+
$groups ->setOrder('sort_order','ASC');
|
25 |
+
$cms_page = Mage::getStoreConfig('responsivebannerslider/general/cms_page');
|
26 |
+
$category_page = Mage::getStoreConfig('responsivebannerslider/general/category_page');
|
27 |
+
$product_page = Mage::getStoreConfig('responsivebannerslider/general/product_page');
|
28 |
+
if(Mage::registry('current_category')) {
|
29 |
+
if($category_page) {
|
30 |
+
$category_id = Mage::registry('current_category')->getId();
|
31 |
+
$groups->categoryFilter($category_id);
|
32 |
+
}else{
|
33 |
+
return false;
|
34 |
+
}
|
35 |
+
}elseif (Mage::registry('current_product')) {
|
36 |
+
if($product_page) {
|
37 |
+
$productsku = Mage::registry('current_product')->getSku();
|
38 |
+
$groups->productFilter($productsku);
|
39 |
+
}else{
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
}elseif (Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms') {
|
43 |
+
if($cms_page) {
|
44 |
+
$pageId = Mage::getBlockSingleton('cms/page')->getPage()->getPageId();
|
45 |
+
$groups->pageFilter($pageId);
|
46 |
+
}else{
|
47 |
+
return false;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
$store_id = Mage::app()->getStore()->getId();
|
51 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
52 |
+
$groups->storeFilter($store_id);
|
53 |
+
}
|
54 |
+
|
55 |
+
return $groups;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getSlides($slidegroupId) {
|
59 |
+
$slide_collection = Mage::getModel('responsivebannerslider/slide')->getCollection()
|
60 |
+
->addFieldToFilter('group_names', array(array('finset' => $slidegroupId)))
|
61 |
+
->addFieldToFilter('statuss', '1')
|
62 |
+
->setOrder('sort_order','ASC');
|
63 |
+
|
64 |
+
return $slide_collection;
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
68 |
+
?>
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Block/View/Top.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
|
13 |
+
class CapacityWebSolutions_Responsivebannerslider_Block_View_Top extends Mage_Core_Block_Template
|
14 |
+
{
|
15 |
+
|
16 |
+
public function __construct() {
|
17 |
+
$this->setLazylaod(Mage::getStoreConfig("responsivebannerslider/general/lazy_load_jquery"));
|
18 |
+
}
|
19 |
+
|
20 |
+
public function getGroupscollection()
|
21 |
+
{
|
22 |
+
$groups = Mage::getModel('responsivebannerslider/responsivebannerslider')->getCollection();
|
23 |
+
$groups ->addFieldToFilter('status',1);
|
24 |
+
$groups ->addFieldToFilter('position','content_top');
|
25 |
+
$groups ->setOrder('sort_order','ASC');
|
26 |
+
|
27 |
+
$cms_page = Mage::getStoreConfig('responsivebannerslider/general/cms_page');
|
28 |
+
$category_page = Mage::getStoreConfig('responsivebannerslider/general/category_page');
|
29 |
+
$product_page = Mage::getStoreConfig('responsivebannerslider/general/product_page');
|
30 |
+
|
31 |
+
|
32 |
+
if(Mage::registry('current_category')) {
|
33 |
+
if($category_page) {
|
34 |
+
$category_id = Mage::registry('current_category')->getId();
|
35 |
+
$groups->categoryFilter($category_id);
|
36 |
+
}else{
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
}elseif (Mage::registry('current_product')) {
|
40 |
+
if($product_page) {
|
41 |
+
$productsku = Mage::registry('current_product')->getSku();
|
42 |
+
$groups->productFilter($productsku);
|
43 |
+
}else{
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
}elseif (Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms') {
|
47 |
+
if($cms_page) {
|
48 |
+
$pageId = Mage::getBlockSingleton('cms/page')->getPage()->getPageId();
|
49 |
+
$groups->pageFilter($pageId);
|
50 |
+
}else{
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
$store_id = Mage::app()->getStore()->getId();
|
55 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
56 |
+
$groups->storeFilter($store_id);
|
57 |
+
}
|
58 |
+
|
59 |
+
return $groups;
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getSlides($slidegroupId) {
|
63 |
+
|
64 |
+
$slide_collection = Mage::getModel('responsivebannerslider/slide')->getCollection()
|
65 |
+
->addFieldToFilter('group_names', array(array('finset' => $slidegroupId)))
|
66 |
+
->addFieldToFilter('statuss', '1')
|
67 |
+
->setOrder('sort_order','ASC');
|
68 |
+
return $slide_collection;
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
?>
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Helper/Data.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Helper_Data extends Mage_Core_Helper_Abstract
|
12 |
+
{
|
13 |
+
|
14 |
+
const NAME_DIR_JS = 'responsivebannerslider/';
|
15 |
+
|
16 |
+
protected $_files = array(
|
17 |
+
'jquery.min.js',
|
18 |
+
'jquery.flexslider.js',
|
19 |
+
'jquery.easing.js',
|
20 |
+
'froogaloop.js',
|
21 |
+
'jquery.fitvid.js',
|
22 |
+
|
23 |
+
|
24 |
+
);
|
25 |
+
|
26 |
+
public function getJQueryPath($file){
|
27 |
+
return self::NAME_DIR_JS . $file;
|
28 |
+
}
|
29 |
+
|
30 |
+
public function getFiles(){
|
31 |
+
return $this->_files;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function resizeImg($fileName)
|
35 |
+
{
|
36 |
+
$dir = "thumbnails";
|
37 |
+
$width = Mage::getStoreConfig('responsivebannerslider/general/thumbnail_width');
|
38 |
+
|
39 |
+
if(trim($width) == "" || trim($width) < 0){
|
40 |
+
$width = "200";
|
41 |
+
}
|
42 |
+
|
43 |
+
$basePath = Mage::getBaseDir('media') . DS . "responsivebannerslider" . DS . $fileName;
|
44 |
+
$newPath = Mage::getBaseDir('media') . DS . "responsivebannerslider" . DS . $dir . DS . $fileName;
|
45 |
+
|
46 |
+
if ($width != '') {
|
47 |
+
|
48 |
+
if (file_exists($newPath)) {
|
49 |
+
unlink($newPath);
|
50 |
+
}
|
51 |
+
|
52 |
+
if (file_exists($basePath) && is_file($basePath) && !file_exists($newPath)) {
|
53 |
+
$imageObj = new Varien_Image($basePath);
|
54 |
+
$imageObj->constrainOnly(TRUE);
|
55 |
+
$imageObj->keepAspectRatio(TRUE);
|
56 |
+
$imageObj->keepFrame(FALSE);
|
57 |
+
$imageObj->quality(100);
|
58 |
+
$imageObj->resize($width);
|
59 |
+
$imageObj->save($newPath);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
return true;
|
63 |
+
}
|
64 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Categories.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Categories extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/categories');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Category.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Category extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
protected function _construct(){
|
13 |
+
$this->_init('responsivebannerslider/category_category');
|
14 |
+
}
|
15 |
+
public function savecategoryRelation($category){
|
16 |
+
$data = $category->getCategoriesData();
|
17 |
+
if (!is_null($data)) {
|
18 |
+
$this->_getResource()->savecategoryRelation($category, $data);
|
19 |
+
}
|
20 |
+
return $this;
|
21 |
+
}
|
22 |
+
public function getCategoryCollection($category){
|
23 |
+
$collection = Mage::getResourceModel('responsivebannerslider/category_category_collection')
|
24 |
+
->addcategoryFilter($category);
|
25 |
+
return $collection;
|
26 |
+
}
|
27 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Effect.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Color Swatches Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Effect
|
11 |
+
{
|
12 |
+
public function toOptionArray()
|
13 |
+
{
|
14 |
+
return array(
|
15 |
+
array('value' => 0, 'label'=>Mage::helper('adminhtml')->__('Data1')),
|
16 |
+
array('value' => 1, 'label'=>Mage::helper('adminhtml')->__('Data2 ')),
|
17 |
+
array('value' => 2, 'label'=>Mage::helper('adminhtml')->__('Data3 ')),
|
18 |
+
);
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
22 |
+
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Animationdirection.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Animationdirection
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'horizontal', 'label'=>Mage::helper('adminhtml')->__('Horizontal')),
|
17 |
+
array('value' => 'vertical', 'label'=>Mage::helper('adminhtml')->__('Vertical')),
|
18 |
+
|
19 |
+
);
|
20 |
+
}
|
21 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Animationtype.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Animationtype
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'slide', 'label'=>Mage::helper('adminhtml')->__('Slide')),
|
17 |
+
array('value' => 'fade', 'label'=>Mage::helper('adminhtml')->__('Fade')),
|
18 |
+
|
19 |
+
);
|
20 |
+
}
|
21 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Effect.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Color Swatches Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Effect
|
11 |
+
{
|
12 |
+
public function toOptionArray()
|
13 |
+
{
|
14 |
+
return array(
|
15 |
+
array('value' => 0, 'label'=>Mage::helper('adminhtml')->__('Data1')),
|
16 |
+
array('value' => 1, 'label'=>Mage::helper('adminhtml')->__('Data2 ')),
|
17 |
+
array('value' => 2, 'label'=>Mage::helper('adminhtml')->__('Data3 ')),
|
18 |
+
);
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
22 |
+
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Navigation.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Navigation
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'hover', 'label'=>Mage::helper('adminhtml')->__('On hover')),
|
17 |
+
array('value' => 'always', 'label'=>Mage::helper('adminhtml')->__('Always')),
|
18 |
+
array('value' => 'never', 'label'=>Mage::helper('adminhtml')->__('Never')),
|
19 |
+
|
20 |
+
);
|
21 |
+
}
|
22 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Navigationarrow.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Navigationarrow
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'inside', 'label'=>Mage::helper('adminhtml')->__('Inside slider on both sides')),
|
17 |
+
array('value' => 'outside', 'label'=>Mage::helper('adminhtml')->__('Outside the slider on both sides')),
|
18 |
+
array('value' => 'inside_left', 'label'=>Mage::helper('adminhtml')->__('Inside slider grouped left')),
|
19 |
+
array('value' => 'inside_right', 'label'=>Mage::helper('adminhtml')->__('Inside slider grouped right')),
|
20 |
+
|
21 |
+
);
|
22 |
+
}
|
23 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Navigationstyle.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Navigationstyle
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'angle', 'label'=>Mage::helper('adminhtml')->__('Angle')),
|
17 |
+
array('value' => 'angle_small', 'label'=>Mage::helper('adminhtml')->__('Angle Small')),
|
18 |
+
array('value' => 'angle_circle', 'label'=>Mage::helper('adminhtml')->__('Angle Circle')),
|
19 |
+
array('value' => 'angle_square', 'label'=>Mage::helper('adminhtml')->__('Angle Square')),
|
20 |
+
array('value' => 'arrow', 'label'=>Mage::helper('adminhtml')->__('Arrow')),
|
21 |
+
array('value' => 'arrow_circle', 'label'=>Mage::helper('adminhtml')->__('Arrow Circle')),
|
22 |
+
array('value' => 'caret', 'label'=>Mage::helper('adminhtml')->__('Caret')),
|
23 |
+
array('value' => 'chevron', 'label'=>Mage::helper('adminhtml')->__('Chevron')),
|
24 |
+
array('value' => 'chevron_smooth', 'label'=>Mage::helper('adminhtml')->__('Chevron Smooth')),
|
25 |
+
array('value' => 'chevron_circle', 'label'=>Mage::helper('adminhtml')->__('Chevron Circle')),
|
26 |
+
array('value' => 'chevron_square', 'label'=>Mage::helper('adminhtml')->__('Chevron Square')),
|
27 |
+
|
28 |
+
);
|
29 |
+
}
|
30 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Pages.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Pages
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
$collection = Mage::getSingleton('cms/page')->getCollection()
|
16 |
+
->addFieldToFilter('is_active', 1);
|
17 |
+
|
18 |
+
$result = array();
|
19 |
+
foreach ($collection as $item) {
|
20 |
+
$data = array(
|
21 |
+
'value' => $item->getData('page_id'),
|
22 |
+
'label' => $item->getData('title'));
|
23 |
+
$result[] = $data;
|
24 |
+
}
|
25 |
+
return $result;
|
26 |
+
}
|
27 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Paginationposition.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Paginationposition
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'below', 'label'=>Mage::helper('adminhtml')->__('Below the slider')),
|
17 |
+
array('value' => 'above', 'label'=>Mage::helper('adminhtml')->__('Above the slider')),
|
18 |
+
array('value' => 'inside_top', 'label'=>Mage::helper('adminhtml')->__('Inside top slider')),
|
19 |
+
array('value' => 'inside_bottom', 'label'=>Mage::helper('adminhtml')->__('Inside bottom slider')),
|
20 |
+
array('value' => 'inside_bottom_left', 'label'=>Mage::helper('adminhtml')->__('Inside bottom left')),
|
21 |
+
array('value' => 'inside_bottom_right', 'label'=>Mage::helper('adminhtml')->__('Inside bottom right')),
|
22 |
+
|
23 |
+
);
|
24 |
+
}
|
25 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Paginationstyle.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Paginationstyle
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'circular', 'label'=>Mage::helper('adminhtml')->__('Circular')),
|
17 |
+
array('value' => 'squared', 'label'=>Mage::helper('adminhtml')->__('Square')),
|
18 |
+
array('value' => 'circular_bar', 'label'=>Mage::helper('adminhtml')->__('Circular with bar')),
|
19 |
+
array('value' => 'square_bar', 'label'=>Mage::helper('adminhtml')->__('Square with bar')),
|
20 |
+
|
21 |
+
);
|
22 |
+
}
|
23 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Position.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Position
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'content_top', 'label'=>Mage::helper('adminhtml')->__('Content Top')),
|
17 |
+
array('value' => 'content_bottom', 'label'=>Mage::helper('adminhtml')->__('Content Bottom')),
|
18 |
+
);
|
19 |
+
}
|
20 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Status.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Status
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 1, 'label'=>Mage::helper('adminhtml')->__('Enabled')),
|
17 |
+
array('value' => 0, 'label'=>Mage::helper('adminhtml')->__('Disabled')),
|
18 |
+
);
|
19 |
+
}
|
20 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Theme.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Theme
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'default', 'label'=>Mage::helper('adminhtml')->__('Default')),
|
17 |
+
array('value' => 'blank', 'label'=>Mage::helper('adminhtml')->__('Blank')),
|
18 |
+
array('value' => 'drop_shadow', 'label'=>Mage::helper('adminhtml')->__('Drop Shadow')),
|
19 |
+
array('value' => 'embose', 'label'=>Mage::helper('adminhtml')->__('Embose')),
|
20 |
+
);
|
21 |
+
}
|
22 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Type.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Type
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'basic', 'label'=>Mage::helper('adminhtml')->__('Basic slider')),
|
17 |
+
array('value' => 'carousel', 'label'=>Mage::helper('adminhtml')->__('Carousel')),
|
18 |
+
array('value' => 'bas-caro', 'label'=>Mage::helper('adminhtml')->__('Basic slider with carousel navigation')),
|
19 |
+
|
20 |
+
);
|
21 |
+
}
|
22 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Urltarget.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Urltarget
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'same_window', 'label'=>Mage::helper('adminhtml')->__('Same Window / Tab')),
|
17 |
+
array('value' => 'new_window', 'label'=>Mage::helper('adminhtml')->__('New Window / Tab')),
|
18 |
+
|
19 |
+
);
|
20 |
+
}
|
21 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Config/Source/Video.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Config_Source_Video
|
12 |
+
{
|
13 |
+
public function toOptionArray()
|
14 |
+
{
|
15 |
+
return array(
|
16 |
+
array('value' => 'image', 'label'=>Mage::helper('adminhtml')->__('Image')),
|
17 |
+
array('value' => 'youtube', 'label'=>Mage::helper('adminhtml')->__('Youtube Video')),
|
18 |
+
array('value' => 'vimeo', 'label'=>Mage::helper('adminhtml')->__('Vimeo Video')),
|
19 |
+
|
20 |
+
);
|
21 |
+
}
|
22 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Categories.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Categories extends Mage_Core_Model_Mysql4_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
$this->_init('responsivebannerslider/categories', 'category_id');
|
15 |
+
}
|
16 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Categories/Collection.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Categories_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/categories');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Page.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Page extends Mage_Core_Model_Mysql4_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
$this->_init('responsivebannerslider/page', 'page_id');
|
15 |
+
}
|
16 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Page/Collection.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Page_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/page');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Product.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Product extends Mage_Core_Model_Mysql4_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
$this->_init('responsivebannerslider/product', 'product_id');
|
15 |
+
}
|
16 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Product/Collection.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Product_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/product');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Responsivebannerslider.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Responsivebannerslider extends Mage_Core_Model_Mysql4_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
$this->_init('responsivebannerslider/responsivebannerslider', 'slidergroup_id');
|
15 |
+
}
|
16 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Responsivebannerslider/Collection.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Responsivebannerslider_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/responsivebannerslider');
|
16 |
+
}
|
17 |
+
public function categoryFilter($category) {
|
18 |
+
|
19 |
+
$this->getSelect()->join(
|
20 |
+
array('category_table' => $this->getTable('responsivebannerslider/categories')),
|
21 |
+
'main_table.slidergroup_id = category_table.slidergroup_id',
|
22 |
+
array()
|
23 |
+
)
|
24 |
+
->where('category_table.category_ids = ?', $category);
|
25 |
+
return $this;
|
26 |
+
}
|
27 |
+
public function productFilter($productsku) {
|
28 |
+
$this->getSelect()->join(
|
29 |
+
array('product_table' => $this->getTable('responsivebannerslider/product')),
|
30 |
+
'main_table.slidergroup_id = product_table.slidergroup_id',
|
31 |
+
array()
|
32 |
+
)
|
33 |
+
->where('product_table.product_sku = ?', $productsku);
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
public function pageFilter($pageId) {
|
37 |
+
$this->getSelect()->join(
|
38 |
+
array('page_table' => $this->getTable('responsivebannerslider/page')),
|
39 |
+
'main_table.slidergroup_id = page_table.slidergroup_id',
|
40 |
+
array()
|
41 |
+
)
|
42 |
+
->where('page_table.pages = ?', $pageId);
|
43 |
+
return $this;
|
44 |
+
}
|
45 |
+
public function storeFilter($store_id) {
|
46 |
+
$this->getSelect()->join(
|
47 |
+
array('store_table' => $this->getTable('responsivebannerslider/store')),
|
48 |
+
'main_table.slidergroup_id = store_table.slidergroup_id',
|
49 |
+
array()
|
50 |
+
)
|
51 |
+
->where('store_table. store_id = ?', $store_id);
|
52 |
+
return $this;
|
53 |
+
}
|
54 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Slide.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Slide extends Mage_Core_Model_Mysql4_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
$this->_init('responsivebannerslider/slide', 'slide_id');
|
15 |
+
}
|
16 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Slide/Collection.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Slide_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/slide');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Store.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Store extends Mage_Core_Model_Mysql4_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
$this->_init('responsivebannerslider/store', 'store_ids');
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Mysql4/Store/Collection.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Mysql4_Store_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/store');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Observer.php
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Observer
|
11 |
+
{
|
12 |
+
public function prepareLayoutBefore(Varien_Event_Observer $observer)
|
13 |
+
{
|
14 |
+
$enabled = Mage::getStoreConfig('responsivebannerslider/general/enabled');
|
15 |
+
|
16 |
+
$disable_output = Mage::getStoreConfig('advanced/modules_disable_output/CapacityWebSolutions_Responsivebannerslider');
|
17 |
+
|
18 |
+
if (!$enabled) {
|
19 |
+
return $this;
|
20 |
+
}
|
21 |
+
if ($disable_output) {
|
22 |
+
return $this;
|
23 |
+
}
|
24 |
+
|
25 |
+
$block = $observer->getEvent()->getBlock();
|
26 |
+
|
27 |
+
if ("head" == $block->getNameInLayout()) {
|
28 |
+
foreach (Mage::helper('responsivebannerslider')->getFiles() as $file) {
|
29 |
+
$jquery_enabled = Mage::getStoreConfig('responsivebannerslider/general/jquery');
|
30 |
+
$lazy_load_jquery = Mage::getStoreConfig('responsivebannerslider/general/lazy_load_jquery');
|
31 |
+
|
32 |
+
if($file=="jquery.min.js")
|
33 |
+
{
|
34 |
+
if($jquery_enabled){
|
35 |
+
$block->addJs(Mage::helper('responsivebannerslider')->getJQueryPath($file));
|
36 |
+
}
|
37 |
+
}else{
|
38 |
+
$block->addJs(Mage::helper('responsivebannerslider')->getJQueryPath($file));
|
39 |
+
}
|
40 |
+
|
41 |
+
if($lazy_load_jquery){
|
42 |
+
$block->addJs('responsivebannerslider/jquery.lazy.js');
|
43 |
+
}
|
44 |
+
|
45 |
+
$block->addCss('css/responsivebannerslider/default.css');
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
return $this;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function adminSystemConfigChangedSection($observer)
|
53 |
+
{
|
54 |
+
// Resized Images //
|
55 |
+
|
56 |
+
$dir = Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA) . DS . "responsivebannerslider" . DS . "thumbnails";
|
57 |
+
|
58 |
+
if (is_dir($dir)) {
|
59 |
+
|
60 |
+
foreach(glob($dir . '/*') as $file) {
|
61 |
+
unlink($file);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
$path_to_image_dir = Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA) . DS . "responsivebannerslider";
|
66 |
+
|
67 |
+
if ( $handle = opendir( $path_to_image_dir ) )
|
68 |
+
{
|
69 |
+
while (false !== ($file = readdir($handle)))
|
70 |
+
{
|
71 |
+
if ( is_file($path_to_image_dir.'/'.$file) )
|
72 |
+
{
|
73 |
+
|
74 |
+
$basepath = Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA) . DS . "responsivebannerslider" . DS . $file;
|
75 |
+
|
76 |
+
$newpath = Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA) . DS . "responsivebannerslider" . DS . "thumbnails". DS . $file;
|
77 |
+
|
78 |
+
$width = Mage::getStoreConfig('responsivebannerslider/general/thumbnail_width');
|
79 |
+
|
80 |
+
if(trim($width) == "" || trim($width) < 0){
|
81 |
+
$width = "200";
|
82 |
+
}
|
83 |
+
|
84 |
+
if ($width != '') {
|
85 |
+
|
86 |
+
//if image has already resized then just return URL
|
87 |
+
if (file_exists($basepath) && is_file($basepath) && !file_exists($newpath)) {
|
88 |
+
|
89 |
+
$imageObj = new Varien_Image($basepath);
|
90 |
+
$imageObj->constrainOnly(TRUE);
|
91 |
+
$imageObj->keepAspectRatio(FALSE);
|
92 |
+
$imageObj->keepFrame(FALSE);
|
93 |
+
$imageObj->resize($width);
|
94 |
+
$imageObj->save($newpath);
|
95 |
+
}
|
96 |
+
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
closedir($handle);
|
102 |
+
}
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Page.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Page extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/page');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Product.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Product extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/product');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Responsivebannerslider.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Responsivebannerslider extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/responsivebannerslider');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Slide.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Slide extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/slide');
|
16 |
+
}
|
17 |
+
public function validateData(Varien_Object $object)
|
18 |
+
{
|
19 |
+
$result = array();
|
20 |
+
$fromDate = $toDate = null;
|
21 |
+
if ($object->hasFromDate() && $object->hasToDate()) {
|
22 |
+
$fromDate = $object->getFromDate();
|
23 |
+
$toDate = $object->getToDate();
|
24 |
+
}
|
25 |
+
if ($fromDate && $toDate) {
|
26 |
+
$fromDate = new Zend_Date($fromDate,Varien_Date::DATETIME_INTERNAL_FORMAT);
|
27 |
+
$toDate = new Zend_Date($toDate,Varien_Date::DATETIME_INTERNAL_FORMAT);
|
28 |
+
|
29 |
+
if ($fromDate->compare($toDate) === 1) {
|
30 |
+
$result[] = Mage::helper('responsivebannerslider')->__('End Date must be greater than Start Date.');
|
31 |
+
}
|
32 |
+
}
|
33 |
+
return !empty($result) ? $result : true;
|
34 |
+
}
|
35 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Status.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Status extends Varien_Object
|
11 |
+
{
|
12 |
+
const STATUS_DISABLED = 0;
|
13 |
+
const STATUS_ENABLED = 1;
|
14 |
+
|
15 |
+
static public function getOptionArray()
|
16 |
+
{
|
17 |
+
return array(
|
18 |
+
array('value' => 1, 'label'=>Mage::helper('adminhtml')->__('Enabled')),
|
19 |
+
array('value' => 0, 'label'=>Mage::helper('adminhtml')->__('Disabled')),
|
20 |
+
);
|
21 |
+
}
|
22 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/Model/Store.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Model_Store extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
public function _construct()
|
13 |
+
{
|
14 |
+
parent::_construct();
|
15 |
+
$this->_init('responsivebannerslider/store');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/Adminhtml/SliderController.php
ADDED
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
|
12 |
+
class CapacityWebSolutions_Responsivebannerslider_Adminhtml_SliderController extends Mage_Adminhtml_Controller_action
|
13 |
+
{
|
14 |
+
|
15 |
+
protected function _initAction() {
|
16 |
+
$this->loadLayout()
|
17 |
+
->_setActiveMenu('cws')
|
18 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Responsive Banner Slider Manager'), Mage::helper('adminhtml')->__('Responsive Banner Slider Manager'));
|
19 |
+
|
20 |
+
return $this;
|
21 |
+
}
|
22 |
+
|
23 |
+
public function indexAction() {
|
24 |
+
$this->_initAction()
|
25 |
+
->renderLayout();
|
26 |
+
}
|
27 |
+
|
28 |
+
public function editAction() {
|
29 |
+
$id = $this->getRequest()->getParam('id');
|
30 |
+
$model = Mage::getModel('responsivebannerslider/slide')->load($id);
|
31 |
+
|
32 |
+
if ($model->getId() || $id == 0) {
|
33 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
34 |
+
if (!empty($data)) {
|
35 |
+
$model->setData($data);
|
36 |
+
}
|
37 |
+
|
38 |
+
Mage::register('slider_data', $model);
|
39 |
+
|
40 |
+
$this->loadLayout();
|
41 |
+
$this->_setActiveMenu('cws');
|
42 |
+
|
43 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Responsive Banner Slider Manager'), Mage::helper('adminhtml')->__('Responsive Banner Slider Manager'));
|
44 |
+
|
45 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
46 |
+
|
47 |
+
$this->_addContent($this->getLayout()->createBlock('responsivebannerslider/adminhtml_slider_edit'))
|
48 |
+
->_addLeft($this->getLayout()->createBlock('responsivebannerslider/adminhtml_slider_edit_tabs'));
|
49 |
+
|
50 |
+
$this->renderLayout();
|
51 |
+
} else {
|
52 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('responsivebannerslider')->__('Slider does not exist'));
|
53 |
+
$this->_redirect('*/*/');
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
public function newAction() {
|
58 |
+
$this->_forward('edit');
|
59 |
+
}
|
60 |
+
|
61 |
+
public function saveAction() {
|
62 |
+
if ($data = $this->getRequest()->getPost()) {
|
63 |
+
|
64 |
+
if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
|
65 |
+
|
66 |
+
try {
|
67 |
+
|
68 |
+
$uploader = new Varien_File_Uploader('filename');
|
69 |
+
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
70 |
+
$uploader->setAllowRenameFiles(false);
|
71 |
+
$uploader->setFilesDispersion(false);
|
72 |
+
$path = Mage::getBaseDir('media') . DS . 'responsivebannerslider'. DS;
|
73 |
+
$path_parts = pathinfo($_FILES['filename']['name']);
|
74 |
+
$filename = $path_parts['filename'].'_'.time().'.'.$path_parts['extension'];
|
75 |
+
$uploader->save($path, $filename );
|
76 |
+
|
77 |
+
Mage::helper('responsivebannerslider/data')->resizeImg($filename);
|
78 |
+
|
79 |
+
} catch (Exception $e) {
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
$data['filename'] = $filename;
|
84 |
+
|
85 |
+
}else {
|
86 |
+
|
87 |
+
if (isset($data['filename']['delete']) && $data['filename']['delete'] == 1) {
|
88 |
+
|
89 |
+
$path =str_replace("responsivebannerslider/","",$data['filename']['value']);
|
90 |
+
$img_filename = Mage::getBaseDir('media') . DS . "responsivebannerslider" . DS . $path;
|
91 |
+
if (file_exists($img_filename)) {
|
92 |
+
unlink($img_filename);
|
93 |
+
}
|
94 |
+
|
95 |
+
$img_file = Mage::getBaseDir('media') . DS . "responsivebannerslider" . DS . "thumbnails" . DS . $path;
|
96 |
+
if (file_exists($img_file)) {
|
97 |
+
unlink($img_file);
|
98 |
+
}
|
99 |
+
|
100 |
+
$data['filename'] = '';
|
101 |
+
|
102 |
+
}else {
|
103 |
+
unset($data['filename']);
|
104 |
+
}
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
$model = Mage::getModel('responsivebannerslider/slide');
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
$model->setData($data)
|
114 |
+
->setId($this->getRequest()->getParam('id'));
|
115 |
+
|
116 |
+
try {
|
117 |
+
|
118 |
+
$group_label ='';
|
119 |
+
|
120 |
+
for($i=0;$i<count($data['group_names']);$i++) {
|
121 |
+
if($i < count($data['group_names'])-1){
|
122 |
+
$group_label .= $data['group_names'][$i].",";
|
123 |
+
|
124 |
+
}else{
|
125 |
+
$group_label .= $data['group_names'][$i];
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
$validateResult = $model->validateData(new Varien_Object($data));//for validate start ,end date and time duration
|
130 |
+
if ($validateResult !== true) {
|
131 |
+
foreach ($validateResult as $errorMessage) {
|
132 |
+
$this->_getSession()->addError($errorMessage);
|
133 |
+
}
|
134 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
135 |
+
return;
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
$model->setData("group_names",$group_label);
|
140 |
+
|
141 |
+
$model->save();
|
142 |
+
|
143 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('responsivebannerslider')->__('Slide was successfully saved'));
|
144 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
145 |
+
|
146 |
+
if ($this->getRequest()->getParam('back')) {
|
147 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
148 |
+
return;
|
149 |
+
}
|
150 |
+
$this->_redirect('*/*/');
|
151 |
+
return;
|
152 |
+
} catch (Exception $e) {
|
153 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
154 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
155 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
156 |
+
return;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('responsivebannerslider')->__('Unable to find Slide to save'));
|
160 |
+
$this->_redirect('*/*/');
|
161 |
+
}
|
162 |
+
|
163 |
+
public function deleteAction() {
|
164 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
165 |
+
try {
|
166 |
+
$model = Mage::getModel('responsivebannerslider/slide');
|
167 |
+
|
168 |
+
$imgdata = $model->load($this->getRequest()->getParam('id'));
|
169 |
+
if($imgdata['filename']) {
|
170 |
+
$img_list_filename = Mage::getBaseDir('media') . DS . "responsivebannerslider" . DS . $imgdata['filename'];
|
171 |
+
if (file_exists($img_list_filename)) {
|
172 |
+
unlink($img_list_filename);
|
173 |
+
}
|
174 |
+
|
175 |
+
$img_file = Mage::getBaseDir('media') . DS . "responsivebannerslider" . DS . "thumbnails" . DS . $imgdata['filename'];
|
176 |
+
if (file_exists($img_file)) {
|
177 |
+
unlink($img_file);
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
$model->setId($this->getRequest()->getParam('id'))
|
182 |
+
->delete();
|
183 |
+
|
184 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Slides was successfully deleted'));
|
185 |
+
$this->_redirect('*/*/');
|
186 |
+
} catch (Exception $e) {
|
187 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
188 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
189 |
+
}
|
190 |
+
}
|
191 |
+
$this->_redirect('*/*/');
|
192 |
+
}
|
193 |
+
|
194 |
+
public function massDeleteAction() {
|
195 |
+
$webIds = $this->getRequest()->getParam('responsivebannerslider_slide');
|
196 |
+
if(!is_array($webIds)) {
|
197 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select Slide(s)'));
|
198 |
+
} else {
|
199 |
+
try {
|
200 |
+
foreach ($webIds as $webId) {
|
201 |
+
$responsivebannerslider_group = Mage::getModel('responsivebannerslider/slide')->load($webId);
|
202 |
+
|
203 |
+
if($responsivebannerslider_group['filename']) {
|
204 |
+
$img_list_filename = Mage::getBaseDir('media') . DS . "responsivebannerslider" . DS . $responsivebannerslider_group['filename'];
|
205 |
+
if (file_exists($img_list_filename)) {
|
206 |
+
unlink($img_list_filename);
|
207 |
+
}
|
208 |
+
|
209 |
+
|
210 |
+
$img_file = Mage::getBaseDir('media') . DS . "responsivebannerslider" . DS . "thumbnails" .DS . $responsivebannerslider_group['filename'];
|
211 |
+
if (file_exists($img_file)) {
|
212 |
+
unlink($img_file);
|
213 |
+
}
|
214 |
+
|
215 |
+
}
|
216 |
+
|
217 |
+
$responsivebannerslider_group->delete();
|
218 |
+
}
|
219 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
220 |
+
Mage::helper('adminhtml')->__(
|
221 |
+
'Total of %d record(s) were successfully deleted', count($webIds)
|
222 |
+
)
|
223 |
+
);
|
224 |
+
} catch (Exception $e) {
|
225 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
226 |
+
}
|
227 |
+
}
|
228 |
+
$this->_redirect('*/*/index');
|
229 |
+
}
|
230 |
+
|
231 |
+
public function massStatusAction()
|
232 |
+
{
|
233 |
+
$webIds = $this->getRequest()->getParam('responsivebannerslider_slide');
|
234 |
+
if(!is_array($webIds)) {
|
235 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
236 |
+
} else {
|
237 |
+
try {
|
238 |
+
foreach ($webIds as $webId) {
|
239 |
+
|
240 |
+
$responsivebannerslider_group = Mage::getSingleton('responsivebannerslider/slide')
|
241 |
+
->load($webId)
|
242 |
+
->setStatuss($this->getRequest()->getParam('statuss'))
|
243 |
+
->setIsMassupdate(true)
|
244 |
+
->save();
|
245 |
+
}
|
246 |
+
|
247 |
+
$this->_getSession()->addSuccess(
|
248 |
+
$this->__('Total of %d record(s) were successfully updated', count($webIds))
|
249 |
+
);
|
250 |
+
} catch (Exception $e) {
|
251 |
+
$this->_getSession()->addError($e->getMessage());
|
252 |
+
}
|
253 |
+
}
|
254 |
+
$this->_redirect('*/*/index');
|
255 |
+
}
|
256 |
+
|
257 |
+
|
258 |
+
public function gridAction()
|
259 |
+
{
|
260 |
+
$this->loadLayout();
|
261 |
+
$this->getResponse()->setBody(
|
262 |
+
$this->getLayout()->createBlock('responsivebannerslider/adminhtml_slider_grid')->toHtml()
|
263 |
+
);
|
264 |
+
}
|
265 |
+
|
266 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/Adminhtml/SlidergroupController.php
ADDED
@@ -0,0 +1,372 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
|
10 |
+
class CapacityWebSolutions_Responsivebannerslider_Adminhtml_SlidergroupController extends Mage_Adminhtml_Controller_action {
|
11 |
+
|
12 |
+
protected function _initAction() {
|
13 |
+
$this->loadLayout()
|
14 |
+
->_setActiveMenu('cws')
|
15 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Responsive Banner Slider'), Mage::helper('adminhtml')->__('Responsive Banner Slider'));
|
16 |
+
|
17 |
+
return $this;
|
18 |
+
}
|
19 |
+
|
20 |
+
public function indexAction() {
|
21 |
+
$this->_initAction()
|
22 |
+
->renderLayout();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function gridAction()
|
26 |
+
{
|
27 |
+
$this->loadLayout();
|
28 |
+
$this->getResponse()->setBody(
|
29 |
+
$this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_grid')->toHtml()
|
30 |
+
);
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
public function editAction() {
|
35 |
+
$id = $this->getRequest()->getParam('id');
|
36 |
+
$model = Mage::getModel('responsivebannerslider/responsivebannerslider')->load($id);
|
37 |
+
|
38 |
+
if ($model->getId() || $id == 0) {
|
39 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
40 |
+
if (!empty($data)) {
|
41 |
+
$model->setData($data);
|
42 |
+
}
|
43 |
+
|
44 |
+
Mage::register('slidergroup_data', $model);
|
45 |
+
|
46 |
+
$this->loadLayout();
|
47 |
+
$this->_setActiveMenu('cws');
|
48 |
+
|
49 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Slider Group Manager'), Mage::helper('adminhtml')->__('Slider Group Manager'));
|
50 |
+
|
51 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
52 |
+
|
53 |
+
$this->_addContent($this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit'))
|
54 |
+
->_addLeft($this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit_tabs'));
|
55 |
+
|
56 |
+
$this->renderLayout();
|
57 |
+
} else {
|
58 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('responsivebannerslider')->__('Item does not exist'));
|
59 |
+
$this->_redirect('*/*/');
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
public function newAction() {
|
64 |
+
$this->_forward('edit');
|
65 |
+
}
|
66 |
+
|
67 |
+
public function saveAction() {
|
68 |
+
if ($data = $this->getRequest()->getPost()) {
|
69 |
+
|
70 |
+
$dataid = $this->getRequest()->getParam('id');
|
71 |
+
|
72 |
+
if (isset($data['category_ids'])) {
|
73 |
+
$data['category_ids'] = explode(',',$data['category_ids']);
|
74 |
+
if (is_array($data['category_ids'])) {
|
75 |
+
$data['category_ids'] = array_unique($data['category_ids']);
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
if (isset($data['product_sku'])) {
|
80 |
+
$data['product_sku'] = explode(', ',$data['product_sku']);
|
81 |
+
if (is_array($data['product_sku'])) {
|
82 |
+
$data['product_sku'] = array_unique($data['product_sku']);
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
$model = Mage::getModel('responsivebannerslider/responsivebannerslider');
|
87 |
+
$model->setData($data)
|
88 |
+
->setId($this->getRequest()->getParam('id'));
|
89 |
+
|
90 |
+
try {
|
91 |
+
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
92 |
+
$model->setCreatedTime(now())
|
93 |
+
->setUpdateTime(now());
|
94 |
+
} else {
|
95 |
+
$model->setUpdateTime(now());
|
96 |
+
}
|
97 |
+
|
98 |
+
$model->save();
|
99 |
+
|
100 |
+
$store_model = Mage::getModel('responsivebannerslider/store');
|
101 |
+
if($dataid != "") {
|
102 |
+
$store_data = $store_model->getCollection()
|
103 |
+
->addFieldToFilter('slidergroup_id',$dataid);
|
104 |
+
$store_data->walk('delete');
|
105 |
+
}
|
106 |
+
foreach($model->getData('store_id') as $store){
|
107 |
+
$data_store['slidergroup_id'] = $model->getData('slidergroup_id');
|
108 |
+
$data_store['store_id'] = $store;
|
109 |
+
$store_model->setData($data_store);
|
110 |
+
$store_model->save();
|
111 |
+
}
|
112 |
+
|
113 |
+
$page_model = Mage::getModel('responsivebannerslider/page');
|
114 |
+
if($dataid != "") {
|
115 |
+
$page_data = $page_model->getCollection()
|
116 |
+
->addFieldToFilter('slidergroup_id',$dataid);
|
117 |
+
$page_data->walk('delete');
|
118 |
+
}
|
119 |
+
foreach($model->getData('pages') as $pages) {
|
120 |
+
$data_page['slidergroup_id'] = $model->getData('slidergroup_id');
|
121 |
+
$data_page['pages'] = $pages;
|
122 |
+
$page_model->setData($data_page);
|
123 |
+
$page_model->save();
|
124 |
+
}
|
125 |
+
|
126 |
+
$cate_model = Mage::getModel('responsivebannerslider/categories');
|
127 |
+
if($dataid != "") {
|
128 |
+
$cate_data = $cate_model->getCollection()
|
129 |
+
->addFieldToFilter('slidergroup_id',$dataid);
|
130 |
+
$cate_data->walk('delete');
|
131 |
+
}
|
132 |
+
foreach($model->getData('category_ids') as $category_id) {
|
133 |
+
if($category_id != "") {
|
134 |
+
$data_cate['slidergroup_id'] = $model->getData('slidergroup_id');
|
135 |
+
$data_cate['category_ids'] = $category_id;
|
136 |
+
$cate_model->setData($data_cate);
|
137 |
+
$cate_model->save();
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
$product_model = Mage::getModel('responsivebannerslider/product');
|
142 |
+
if($dataid != "") {
|
143 |
+
$prd_data = $product_model->getCollection()
|
144 |
+
->addFieldToFilter('slidergroup_id',$dataid);
|
145 |
+
$prd_data->walk('delete');
|
146 |
+
}
|
147 |
+
foreach($model->getData('product_sku') as $product) {
|
148 |
+
$data_prd['slidergroup_id'] = $model->getData('slidergroup_id');
|
149 |
+
$data_prd['product_sku'] = $product;
|
150 |
+
|
151 |
+
$product_model->setData($data_prd);
|
152 |
+
$product_model->save();
|
153 |
+
}
|
154 |
+
|
155 |
+
if($this->getRequest()->getParam('id') == ""){
|
156 |
+
$group_id = $model->getData('slidergroup_id');
|
157 |
+
}else{
|
158 |
+
$group_id = $this->getRequest()->getParam('id');
|
159 |
+
}
|
160 |
+
if (!file_exists(Mage::getBaseDir('skin').DS.'frontend'.DS.'base'.DS.'default'.DS.'css'.DS.'responsivebannerslider')) {
|
161 |
+
mkdir(Mage::getBaseDir('skin').DS.'frontend'.DS.'base'.DS.'default'.DS.'css'.DS.'responsivebannerslider', 0777, true);
|
162 |
+
}
|
163 |
+
$path = Mage::getBaseDir('skin').DS.'frontend'.DS.'base'.DS.'default'.DS.'css'.DS.'responsivebannerslider'.DS;
|
164 |
+
$path .= "group-".$group_id.".css";
|
165 |
+
$css = $this->get_menu_css($group_id);
|
166 |
+
file_put_contents($path,$css);
|
167 |
+
|
168 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('responsivebannerslider')->__('Group was successfully saved'));
|
169 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
170 |
+
|
171 |
+
if ($this->getRequest()->getParam('back')) {
|
172 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
173 |
+
return;
|
174 |
+
}
|
175 |
+
$this->_redirect('*/*/');
|
176 |
+
return;
|
177 |
+
} catch (Exception $e) {
|
178 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
179 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
180 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
181 |
+
return;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('responsivebannerslider')->__('Unable to find Group to save'));
|
185 |
+
$this->_redirect('*/*/');
|
186 |
+
}
|
187 |
+
|
188 |
+
public function deleteAction() {
|
189 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
190 |
+
|
191 |
+
$slide_collection = Mage::getModel('responsivebannerslider/slide')->getCollection();
|
192 |
+
$current_groupid = $this->getRequest()->getParam('id');
|
193 |
+
$slide_collection->addFieldToFilter('group_names', array(array('finset' => $current_groupid)));
|
194 |
+
|
195 |
+
if(count($slide_collection->getData()) <= 0){
|
196 |
+
try {
|
197 |
+
$model = Mage::getModel('responsivebannerslider/responsivebannerslider');
|
198 |
+
|
199 |
+
$model->setId($this->getRequest()->getParam('id'))
|
200 |
+
->delete();
|
201 |
+
$dataid = $this->getRequest()->getParam('id');
|
202 |
+
|
203 |
+
$store_model = Mage::getModel('responsivebannerslider/store');
|
204 |
+
$store_data = $store_model->getCollection()
|
205 |
+
->addFieldToFilter('slidergroup_id',$dataid);
|
206 |
+
$store_data->walk('delete');
|
207 |
+
|
208 |
+
$page_model = Mage::getModel('responsivebannerslider/page');
|
209 |
+
$page_data = $page_model->getCollection()
|
210 |
+
->addFieldToFilter('slidergroup_id',$dataid);
|
211 |
+
$page_data->walk('delete');
|
212 |
+
|
213 |
+
$cate_model = Mage::getModel('responsivebannerslider/categories');
|
214 |
+
$cate_data = $cate_model->getCollection()
|
215 |
+
->addFieldToFilter('slidergroup_id',$dataid);
|
216 |
+
$cate_data->walk('delete');
|
217 |
+
|
218 |
+
$product_model = Mage::getModel('responsivebannerslider/product');
|
219 |
+
$prd_data = $product_model->getCollection()
|
220 |
+
->addFieldToFilter('slidergroup_id',$dataid);
|
221 |
+
$prd_data->walk('delete');
|
222 |
+
|
223 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Group was successfully deleted'));
|
224 |
+
$this->_redirect('*/*/');
|
225 |
+
} catch (Exception $e) {
|
226 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
227 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
228 |
+
}
|
229 |
+
}else {
|
230 |
+
Mage::getSingleton('adminhtml/session')->addError("Please Remove Assigned slider form the selected group before delete group.");
|
231 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
232 |
+
}
|
233 |
+
|
234 |
+
}
|
235 |
+
$this->_redirect('*/*/');
|
236 |
+
}
|
237 |
+
|
238 |
+
public function massDeleteAction() {
|
239 |
+
$webIds = $this->getRequest()->getParam('responsivebannerslider_group');
|
240 |
+
if(!is_array($webIds)) {
|
241 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select Group(s)'));
|
242 |
+
} else {
|
243 |
+
try {
|
244 |
+
foreach ($webIds as $webId) {
|
245 |
+
$responsivebannerslider_group = Mage::getModel('responsivebannerslider/responsivebannerslider')->load($webId);
|
246 |
+
|
247 |
+
$slide_collection = Mage::getModel('responsivebannerslider/slide')->getCollection();
|
248 |
+
$slide_collection->addFieldToFilter('group_names', array(array('finset' => $webId)));
|
249 |
+
|
250 |
+
if(count($slide_collection->getData()) <= 0){
|
251 |
+
|
252 |
+
$responsivebannerslider_group->delete();
|
253 |
+
|
254 |
+
$store_model = Mage::getModel('responsivebannerslider/store');
|
255 |
+
$store_data = $store_model->getCollection()
|
256 |
+
->addFieldToFilter('slidergroup_id',$webId);
|
257 |
+
$store_data->walk('delete');
|
258 |
+
|
259 |
+
$page_model = Mage::getModel('responsivebannerslider/page');
|
260 |
+
$page_data = $page_model->getCollection()
|
261 |
+
->addFieldToFilter('slidergroup_id',$webId);
|
262 |
+
$page_data->walk('delete');
|
263 |
+
|
264 |
+
|
265 |
+
$cate_model = Mage::getModel('responsivebannerslider/categories');
|
266 |
+
$cate_data = $cate_model->getCollection()
|
267 |
+
->addFieldToFilter('slidergroup_id',$webId);
|
268 |
+
$cate_data->walk('delete');
|
269 |
+
|
270 |
+
$product_model = Mage::getModel('responsivebannerslider/product');
|
271 |
+
$prd_data = $product_model->getCollection()
|
272 |
+
->addFieldToFilter('slidergroup_id',$webId);
|
273 |
+
$prd_data->walk('delete');
|
274 |
+
|
275 |
+
$groupname = $responsivebannerslider_group->getData('title');
|
276 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__(''.$groupname.' Group was successfully deleted'));
|
277 |
+
}else{
|
278 |
+
|
279 |
+
$groupname = $responsivebannerslider_group->getData('title');
|
280 |
+
Mage::getSingleton('adminhtml/session')->addError("Please Remove Assigned slider form the selected ".$groupname." group before delete ".$groupname." group.");
|
281 |
+
|
282 |
+
}
|
283 |
+
|
284 |
+
}
|
285 |
+
|
286 |
+
} catch (Exception $e) {
|
287 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
288 |
+
}
|
289 |
+
}
|
290 |
+
$this->_redirect('*/*/index');
|
291 |
+
}
|
292 |
+
|
293 |
+
public function massStatusAction(){
|
294 |
+
$webIds = $this->getRequest()->getParam('responsivebannerslider_group');
|
295 |
+
if(!is_array($webIds)) {
|
296 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
297 |
+
} else {
|
298 |
+
try {
|
299 |
+
foreach ($webIds as $webId) {
|
300 |
+
$responsivebannerslider_group = Mage::getSingleton('responsivebannerslider/responsivebannerslider')
|
301 |
+
->load($webId)
|
302 |
+
->setStatus($this->getRequest()->getParam('status'))
|
303 |
+
->setIsMassupdate(true)
|
304 |
+
->save();
|
305 |
+
}
|
306 |
+
$this->_getSession()->addSuccess(
|
307 |
+
$this->__('Total of %d record(s) were successfully updated', count($webIds))
|
308 |
+
);
|
309 |
+
} catch (Exception $e) {
|
310 |
+
$this->_getSession()->addError($e->getMessage());
|
311 |
+
}
|
312 |
+
}
|
313 |
+
$this->_redirect('*/*/index');
|
314 |
+
}
|
315 |
+
|
316 |
+
public function categoriesAction(){
|
317 |
+
$this->_initcategory();
|
318 |
+
$this->loadLayout();
|
319 |
+
$this->renderLayout();
|
320 |
+
}
|
321 |
+
public function categoriesJsonAction(){
|
322 |
+
|
323 |
+
$this->_initcategory();
|
324 |
+
$this->getResponse()->setBody(
|
325 |
+
$this->getLayout()->createBlock('responsivebannerslider/adminhtml_slidergroup_edit_tab_categories')
|
326 |
+
->getCategoryChildrenJson($this->getRequest()->getParam('category'))
|
327 |
+
);
|
328 |
+
}
|
329 |
+
protected function _initcategory(){
|
330 |
+
|
331 |
+
$categoryId = $this->getRequest()->getParam('id');
|
332 |
+
$category = Mage::getModel('responsivebannerslider/responsivebannerslider');
|
333 |
+
|
334 |
+
if ($categoryId) {
|
335 |
+
$category->load($categoryId);
|
336 |
+
}
|
337 |
+
Mage::register('slidergroup_data', $category);
|
338 |
+
return $category;
|
339 |
+
}
|
340 |
+
|
341 |
+
public function get_menu_css($group_id){
|
342 |
+
$groupdata = Mage::getModel("responsivebannerslider/responsivebannerslider")->load($group_id);
|
343 |
+
|
344 |
+
$max_width = $groupdata->getMaxWidth();
|
345 |
+
$content_background = $groupdata->getContentBackground();
|
346 |
+
$content_opacity = $groupdata->getContentOpacity();
|
347 |
+
$navigation_acolor = $groupdata->getNavigationAcolor();
|
348 |
+
$pagination_color = $groupdata->getPaginationColor();
|
349 |
+
$pagination_active_color = $groupdata->getPaginationActive();
|
350 |
+
$pagination_bar = $groupdata->getPaginationBar();
|
351 |
+
|
352 |
+
if ($max_width > 0) {
|
353 |
+
$max_width = $groupdata->getMaxWidth().'px';
|
354 |
+
} else {
|
355 |
+
$max_width = "";
|
356 |
+
}
|
357 |
+
$css = '';
|
358 |
+
$css .= '#bnrSlider-'.$group_id.' { }';
|
359 |
+
$css .= '#bnrSlider-'.$group_id.' { max-width:'.$max_width.'; }';
|
360 |
+
$css .= '#bnrSlider-'.$group_id.' .sliderdecs { background-color:#'.$content_background.'; opacity:0.'.$content_opacity.'; }';
|
361 |
+
$css .= '#bnrSlider-'.$group_id.' .cws-arw a:before { color:#'.$navigation_acolor.'; }';
|
362 |
+
$css .= '#bnrSlider-'.$group_id.' .cws-pager a { background-color:#'.$pagination_color.'; }';
|
363 |
+
$css .= '#bnrSlider-'.$group_id.' .cws-pager a.cws-active { background-color:#'.$pagination_active_color.'; }';
|
364 |
+
$css .= '#bnrSlider-'.$group_id.' .cws-pager.cir-bar { background-color:#'.$pagination_bar.'; }';
|
365 |
+
$css .= '#bnrSlider-'.$group_id.' .cws-pager.squ-bar { background-color:#'.$pagination_bar.'; }';
|
366 |
+
return $css;
|
367 |
+
}
|
368 |
+
|
369 |
+
|
370 |
+
|
371 |
+
|
372 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/controllers/IndexController.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
|
12 |
+
class CapacityWebSolutions_Responsivebannerslider_IndexController extends Mage_Core_Controller_Front_Action
|
13 |
+
{
|
14 |
+
public function indexAction()
|
15 |
+
{
|
16 |
+
$this->loadLayout();
|
17 |
+
$this->renderLayout();
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
}
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/etc/config.xml
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
-->
|
11 |
+
|
12 |
+
<config>
|
13 |
+
<modules>
|
14 |
+
<CapacityWebSolutions_Responsivebannerslider>
|
15 |
+
<version>1.0.0</version>
|
16 |
+
</CapacityWebSolutions_Responsivebannerslider>
|
17 |
+
</modules>
|
18 |
+
<frontend>
|
19 |
+
<routers>
|
20 |
+
<responsivebannerslider>
|
21 |
+
<use>standard</use>
|
22 |
+
<args>
|
23 |
+
<module>CapacityWebSolutions_Responsivebannerslider</module>
|
24 |
+
<frontName>responsivebannerslider</frontName>
|
25 |
+
</args>
|
26 |
+
</responsivebannerslider>
|
27 |
+
</routers>
|
28 |
+
<layout>
|
29 |
+
<updates>
|
30 |
+
<responsivebannerslider>
|
31 |
+
<file>responsivebannerslider.xml</file>
|
32 |
+
</responsivebannerslider>
|
33 |
+
</updates>
|
34 |
+
</layout>
|
35 |
+
|
36 |
+
<events>
|
37 |
+
<core_block_abstract_prepare_layout_before>
|
38 |
+
<observers>
|
39 |
+
<capacityWebSolutions_responsivebannerslider_prepare_layout_before>
|
40 |
+
<class>responsivebannerslider/observer</class>
|
41 |
+
<method>prepareLayoutBefore</method>
|
42 |
+
</capacityWebSolutions_responsivebannerslider_prepare_layout_before>
|
43 |
+
</observers>
|
44 |
+
</core_block_abstract_prepare_layout_before>
|
45 |
+
</events>
|
46 |
+
|
47 |
+
</frontend>
|
48 |
+
<admin>
|
49 |
+
<routers>
|
50 |
+
<responsivebannerslider>
|
51 |
+
<use>admin</use>
|
52 |
+
<args>
|
53 |
+
<module>CapacityWebSolutions_Responsivebannerslider</module>
|
54 |
+
<frontName>responsivebannerslider</frontName>
|
55 |
+
</args>
|
56 |
+
</responsivebannerslider>
|
57 |
+
</routers>
|
58 |
+
</admin>
|
59 |
+
|
60 |
+
<adminhtml>
|
61 |
+
<menu>
|
62 |
+
<cws module="responsivebannerslider">
|
63 |
+
<title>CWS Extensions</title>
|
64 |
+
<sort_order>70</sort_order>
|
65 |
+
<children>
|
66 |
+
<responsivebannerslider module="responsivebannerslider">
|
67 |
+
<title>Responsive Banner Slider</title>
|
68 |
+
<sort_order>70</sort_order>
|
69 |
+
|
70 |
+
<children>
|
71 |
+
<group module="responsivebannerslider">
|
72 |
+
<title>Manage Groups</title>
|
73 |
+
<sort_order>0</sort_order>
|
74 |
+
<action>responsivebannerslider/adminhtml_slidergroup</action>
|
75 |
+
|
76 |
+
</group>
|
77 |
+
<slides module="responsivebannerslider">
|
78 |
+
<title>Manage Slides</title>
|
79 |
+
<sort_order>10</sort_order>
|
80 |
+
<action>responsivebannerslider/adminhtml_slider</action>
|
81 |
+
</slides>
|
82 |
+
|
83 |
+
<settings module="responsivebannerslider">
|
84 |
+
<title>Settings</title>
|
85 |
+
<sort_order>20</sort_order>
|
86 |
+
<action>adminhtml/system_config/edit/section/responsivebannerslider</action>
|
87 |
+
</settings>
|
88 |
+
|
89 |
+
</children>
|
90 |
+
</responsivebannerslider>
|
91 |
+
</children>
|
92 |
+
</cws>
|
93 |
+
</menu>
|
94 |
+
<acl>
|
95 |
+
<resources>
|
96 |
+
<all>
|
97 |
+
<title>Allow Everything</title>
|
98 |
+
</all>
|
99 |
+
<admin>
|
100 |
+
<children>
|
101 |
+
<cws module="responsivebannerslider">
|
102 |
+
<title>CWS Extensions</title>
|
103 |
+
<children>
|
104 |
+
<responsivebannerslider module="responsivebannerslider">
|
105 |
+
<title>Responsive Banner Slider</title>
|
106 |
+
<children>
|
107 |
+
<group module="responsivebannerslider">
|
108 |
+
<title>Manage Groups</title>
|
109 |
+
<action>responsivebannerslider/adminhtml_slidergroup</action>
|
110 |
+
</group>
|
111 |
+
<slides module="responsivebannerslider">
|
112 |
+
<title>Manage Slides</title>
|
113 |
+
<action>responsivebannerslider/adminhtml_slider</action>
|
114 |
+
</slides>
|
115 |
+
</children>
|
116 |
+
</responsivebannerslider>
|
117 |
+
</children>
|
118 |
+
</cws>
|
119 |
+
</children>
|
120 |
+
|
121 |
+
</admin>
|
122 |
+
</resources>
|
123 |
+
</acl>
|
124 |
+
<layout>
|
125 |
+
<updates>
|
126 |
+
<responsivebannerslider>
|
127 |
+
<file>responsivebannerslider.xml</file>
|
128 |
+
</responsivebannerslider>
|
129 |
+
</updates>
|
130 |
+
</layout>
|
131 |
+
|
132 |
+
<acl>
|
133 |
+
<resources>
|
134 |
+
<admin>
|
135 |
+
<children>
|
136 |
+
<system>
|
137 |
+
<children>
|
138 |
+
<config>
|
139 |
+
<children>
|
140 |
+
<responsivebannerslider>
|
141 |
+
<title>Responsivebannerslider</title>
|
142 |
+
</responsivebannerslider>
|
143 |
+
</children>
|
144 |
+
</config>
|
145 |
+
</children>
|
146 |
+
</system>
|
147 |
+
</children>
|
148 |
+
</admin>
|
149 |
+
</resources>
|
150 |
+
</acl>
|
151 |
+
<events>
|
152 |
+
<admin_system_config_changed_section_responsivebannerslider>
|
153 |
+
<observers>
|
154 |
+
<responsivebannerslider>
|
155 |
+
<type>singleton</type>
|
156 |
+
<class>responsivebannerslider/observer</class>
|
157 |
+
<method>adminSystemConfigChangedSection</method>
|
158 |
+
</responsivebannerslider>
|
159 |
+
</observers>
|
160 |
+
</admin_system_config_changed_section_responsivebannerslider>
|
161 |
+
</events>
|
162 |
+
</adminhtml>
|
163 |
+
<global>
|
164 |
+
|
165 |
+
<models>
|
166 |
+
<responsivebannerslider>
|
167 |
+
<class>CapacityWebSolutions_Responsivebannerslider_Model</class>
|
168 |
+
<resourceModel>responsivebannerslider_mysql4</resourceModel>
|
169 |
+
</responsivebannerslider>
|
170 |
+
<responsivebannerslider_mysql4>
|
171 |
+
<class>CapacityWebSolutions_Responsivebannerslider_Model_Mysql4</class>
|
172 |
+
<entities>
|
173 |
+
<responsivebannerslider>
|
174 |
+
<table>responsivebannerslider_group</table>
|
175 |
+
</responsivebannerslider>
|
176 |
+
<slide>
|
177 |
+
<table>responsivebannerslider_slide</table>
|
178 |
+
</slide>
|
179 |
+
<page>
|
180 |
+
<table>responsivebannerslider_page</table>
|
181 |
+
</page>
|
182 |
+
<categories>
|
183 |
+
<table>responsivebannerslider_category</table>
|
184 |
+
</categories>
|
185 |
+
<product>
|
186 |
+
<table>responsivebannerslider_product</table>
|
187 |
+
</product>
|
188 |
+
<store>
|
189 |
+
<table>responsivebannerslider_store</table>
|
190 |
+
</store>
|
191 |
+
</entities>
|
192 |
+
</responsivebannerslider_mysql4>
|
193 |
+
</models>
|
194 |
+
<resources>
|
195 |
+
<responsivebannerslider_setup>
|
196 |
+
<setup>
|
197 |
+
<module>CapacityWebSolutions_Responsivebannerslider</module>
|
198 |
+
</setup>
|
199 |
+
<connection>
|
200 |
+
<use>core_setup</use>
|
201 |
+
</connection>
|
202 |
+
</responsivebannerslider_setup>
|
203 |
+
<responsivebannerslider_write>
|
204 |
+
<connection>
|
205 |
+
<use>core_write</use>
|
206 |
+
</connection>
|
207 |
+
</responsivebannerslider_write>
|
208 |
+
<responsivebannerslider_read>
|
209 |
+
<connection>
|
210 |
+
<use>core_read</use>
|
211 |
+
</connection>
|
212 |
+
</responsivebannerslider_read>
|
213 |
+
</resources>
|
214 |
+
<blocks>
|
215 |
+
<responsivebannerslider>
|
216 |
+
<class>CapacityWebSolutions_Responsivebannerslider_Block</class>
|
217 |
+
</responsivebannerslider>
|
218 |
+
</blocks>
|
219 |
+
<helpers>
|
220 |
+
<responsivebannerslider>
|
221 |
+
<class>CapacityWebSolutions_Responsivebannerslider_Helper</class>
|
222 |
+
</responsivebannerslider>
|
223 |
+
</helpers>
|
224 |
+
|
225 |
+
|
226 |
+
|
227 |
+
</global>
|
228 |
+
|
229 |
+
<default>
|
230 |
+
<responsivebannerslider>
|
231 |
+
<general>
|
232 |
+
<enabled>1</enabled>
|
233 |
+
<jquery>1</jquery>
|
234 |
+
<thumbnail_width>200</thumbnail_width>
|
235 |
+
<cms_page>1</cms_page>
|
236 |
+
<category_page>1</category_page>
|
237 |
+
<product_page>1</product_page>
|
238 |
+
</general>
|
239 |
+
</responsivebannerslider>
|
240 |
+
</default>
|
241 |
+
|
242 |
+
</config>
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/etc/system.xml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
-->
|
11 |
+
|
12 |
+
<config>
|
13 |
+
<tabs>
|
14 |
+
<cws translate="label" module="responsivebannerslider">
|
15 |
+
<label>Capacity Web Solutions</label>
|
16 |
+
<sort_order>100</sort_order>
|
17 |
+
</cws>
|
18 |
+
</tabs>
|
19 |
+
<sections>
|
20 |
+
<responsivebannerslider translate="label" module="responsivebannerslider">
|
21 |
+
<label>Responsive Banner Slider</label>
|
22 |
+
<tab>cws</tab>
|
23 |
+
<sort_order>130</sort_order>
|
24 |
+
<show_in_default>1</show_in_default>
|
25 |
+
<show_in_website>1</show_in_website>
|
26 |
+
<show_in_store>1</show_in_store>
|
27 |
+
<groups>
|
28 |
+
<general translate="label">
|
29 |
+
<label>General</label>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>80</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<fields>
|
36 |
+
<enabled translate="label">
|
37 |
+
<label>Enabled</label>
|
38 |
+
<comment>Select Yes for display the Responsive Banner Slider on frontend.</comment>
|
39 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
40 |
+
<frontend_type>select</frontend_type>
|
41 |
+
<sort_order>10</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>1</show_in_store>
|
45 |
+
</enabled>
|
46 |
+
|
47 |
+
<jquery translate="label">
|
48 |
+
<label>Include Jquery</label>
|
49 |
+
<comment>Select Yes for include the jquery library.</comment>
|
50 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
51 |
+
<frontend_type>select</frontend_type>
|
52 |
+
<sort_order>20</sort_order>
|
53 |
+
<show_in_default>1</show_in_default>
|
54 |
+
<show_in_website>1</show_in_website>
|
55 |
+
<show_in_store>1</show_in_store>
|
56 |
+
</jquery>
|
57 |
+
|
58 |
+
|
59 |
+
<lazy_load_jquery translate="label">
|
60 |
+
<label>Lazy Load</label>
|
61 |
+
<comment>Select Yes for the Lazy Load.</comment>
|
62 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
63 |
+
<frontend_type>select</frontend_type>
|
64 |
+
<sort_order>30</sort_order>
|
65 |
+
<show_in_default>1</show_in_default>
|
66 |
+
<show_in_website>1</show_in_website>
|
67 |
+
<show_in_store>1</show_in_store>
|
68 |
+
</lazy_load_jquery>
|
69 |
+
|
70 |
+
|
71 |
+
<thumbnail_width translate="label">
|
72 |
+
<label>Thumbnail Upload Width</label>
|
73 |
+
<comment>Set the width of the thumbnails created during upload. Thumbnails are used in carousels (default is 200).</comment>
|
74 |
+
<frontend_type>text</frontend_type>
|
75 |
+
<sort_order>40</sort_order>
|
76 |
+
<show_in_default>1</show_in_default>
|
77 |
+
<show_in_website>1</show_in_website>
|
78 |
+
<show_in_store>1</show_in_store>
|
79 |
+
</thumbnail_width>
|
80 |
+
|
81 |
+
<cms_page translate="label">
|
82 |
+
<label>Show in CMS Pages</label>
|
83 |
+
<comment>Select Yes for display the Responsive Banner Slider on frontend for Selected CMS Pages.</comment>
|
84 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
85 |
+
<frontend_type>select</frontend_type>
|
86 |
+
<sort_order>50</sort_order>
|
87 |
+
<show_in_default>1</show_in_default>
|
88 |
+
<show_in_website>1</show_in_website>
|
89 |
+
<show_in_store>1</show_in_store>
|
90 |
+
</cms_page>
|
91 |
+
<category_page translate="label">
|
92 |
+
<label>Show in Category Pages</label>
|
93 |
+
<comment>Select Yes for display the Responsive Banner Slider on frontend for Selected CMS Pages.</comment>
|
94 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
95 |
+
<frontend_type>select</frontend_type>
|
96 |
+
<sort_order>60</sort_order>
|
97 |
+
<show_in_default>1</show_in_default>
|
98 |
+
<show_in_website>1</show_in_website>
|
99 |
+
<show_in_store>1</show_in_store>
|
100 |
+
</category_page>
|
101 |
+
|
102 |
+
<product_page translate="label">
|
103 |
+
<label>Show in Product Pages</label>
|
104 |
+
<comment>Select Yes for display the Responsive Banner Slider on frontend for Selected Product Pages.</comment>
|
105 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
106 |
+
<frontend_type>select</frontend_type>
|
107 |
+
<sort_order>70</sort_order>
|
108 |
+
<show_in_default>1</show_in_default>
|
109 |
+
<show_in_website>1</show_in_website>
|
110 |
+
<show_in_store>1</show_in_store>
|
111 |
+
</product_page>
|
112 |
+
|
113 |
+
</fields>
|
114 |
+
</general>
|
115 |
+
</groups>
|
116 |
+
|
117 |
+
</responsivebannerslider>
|
118 |
+
</sections>
|
119 |
+
</config>
|
app/code/community/CapacityWebSolutions/Responsivebannerslider/sql/responsivebannerslider_setup/mysql4-install-1.0.0.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
|
9 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('responsivebannerslider_group')} (
|
10 |
+
`slidergroup_id` int(11) unsigned NOT NULL auto_increment,
|
11 |
+
`title` varchar(255) NOT NULL default '',
|
12 |
+
`position` varchar(255) NOT NULL default '',
|
13 |
+
`sort_order` smallint(6) NOT NULL default '1',
|
14 |
+
`status` tinyint(1) NOT NULL default '1',
|
15 |
+
`start_animation` varchar(32) NOT NULL default '',
|
16 |
+
`loop_slider` tinyint(1) NOT NULL default '0',
|
17 |
+
`pause_snavigation` tinyint(1) NOT NULL default '0',
|
18 |
+
`pause_shover` tinyint(1) NOT NULL default '0',
|
19 |
+
`animation_type` varchar(32) NOT NULL default '',
|
20 |
+
`animation_duration` varchar(32) NOT NULL default '600',
|
21 |
+
`animation_direction` varchar(32) NOT NULL default '',
|
22 |
+
`slide_duration` varchar(32) NOT NULL default '7000',
|
23 |
+
`random_order` varchar(32) NOT NULL default '',
|
24 |
+
`smooth_height` tinyint(1) NOT NULL default '1',
|
25 |
+
`max_width` smallint(6) NOT NULL default '0',
|
26 |
+
`slider_theme` varchar(32) NOT NULL default '',
|
27 |
+
`slider_type` varchar(32) NOT NULL default '',
|
28 |
+
`content_background` varchar(32) NOT NULL default '',
|
29 |
+
`content_opacity` varchar(32) NOT NULL default '',
|
30 |
+
`thumbnail_size` smallint(6) NOT NULL DEFAULT '200',
|
31 |
+
`navigation_arrow` varchar(32) NOT NULL default '',
|
32 |
+
`navigation_style` varchar(32) NOT NULL default '',
|
33 |
+
`navigation_aposition` varchar(32) NOT NULL default '',
|
34 |
+
`navigation_acolor` varchar(32) NOT NULL default '',
|
35 |
+
`show_pagination` varchar(32) NOT NULL default '',
|
36 |
+
`pagination_style` varchar(32) NOT NULL default '',
|
37 |
+
`pagination_position` varchar(32) NOT NULL default '',
|
38 |
+
`pagination_color` varchar(32) NOT NULL default '',
|
39 |
+
`pagination_active` varchar(32) NOT NULL default '',
|
40 |
+
`pagination_bar` varchar(32) NOT NULL default '',
|
41 |
+
PRIMARY KEY (`slidergroup_id`)
|
42 |
+
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=0;
|
43 |
+
|
44 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('responsivebannerslider_page')} (
|
45 |
+
`page_id` int(11) unsigned NOT NULL auto_increment,
|
46 |
+
`slidergroup_id` smallint(6) NOT NULL,
|
47 |
+
`pages` smallint(6) NOT NULL,
|
48 |
+
PRIMARY KEY (`page_id`)
|
49 |
+
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=0;
|
50 |
+
|
51 |
+
|
52 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('responsivebannerslider_category')} (
|
53 |
+
`category_id` int(11) unsigned NOT NULL auto_increment,
|
54 |
+
`slidergroup_id` smallint(6) NOT NULL,
|
55 |
+
`category_ids` smallint(6) NOT NULL,
|
56 |
+
PRIMARY KEY (`category_id`)
|
57 |
+
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=0;
|
58 |
+
|
59 |
+
|
60 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('responsivebannerslider_product')} (
|
61 |
+
`product_id` int(11) unsigned NOT NULL auto_increment,
|
62 |
+
`slidergroup_id` smallint(6) NOT NULL,
|
63 |
+
`product_sku` varchar(255) NOT NULL default '',
|
64 |
+
PRIMARY KEY (`product_id`)
|
65 |
+
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=0;
|
66 |
+
|
67 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('responsivebannerslider_store')} (
|
68 |
+
`store_ids` int(11) unsigned NOT NULL auto_increment,
|
69 |
+
`slidergroup_id` smallint(6) NOT NULL,
|
70 |
+
`store_id` smallint(6) NOT NULL,
|
71 |
+
PRIMARY KEY (`store_ids`)
|
72 |
+
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=0;
|
73 |
+
|
74 |
+
|
75 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('responsivebannerslider_slide')} (
|
76 |
+
`slide_id` int(11) unsigned NOT NULL auto_increment,
|
77 |
+
`group_names` varchar(255) NOT NULL default '',
|
78 |
+
`titles` varchar(255) NOT NULL default '',
|
79 |
+
`img_video` varchar(32) NOT NULL default '',
|
80 |
+
`img_hosting` tinyint(1) NOT NULL default '0',
|
81 |
+
`video_height` varchar(32) NOT NULL default '',
|
82 |
+
`video_id` varchar(255) NOT NULL default '',
|
83 |
+
`hosted_url` varchar(512) NOT NULL default '',
|
84 |
+
`hosted_thumb` varchar(512) NOT NULL default '',
|
85 |
+
`filename` varchar(255) NOT NULL DEFAULT '',
|
86 |
+
`alt_text` varchar(255) NOT NULL default '',
|
87 |
+
`url` varchar(255) NOT NULL default '',
|
88 |
+
`url_target` varchar(255) NOT NULL default '',
|
89 |
+
`description` text NOT NULL,
|
90 |
+
`date_enabled` tinyint(1) NOT NULL,
|
91 |
+
`from_date` datetime DEFAULT NULL,
|
92 |
+
`to_date` datetime DEFAULT NULL,
|
93 |
+
`sort_order` smallint(6) NOT NULL default '1',
|
94 |
+
`statuss` tinyint(1) NOT NULL default '1',
|
95 |
+
PRIMARY KEY (`slide_id`)
|
96 |
+
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=0;
|
97 |
+
|
98 |
+
");
|
99 |
+
|
100 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/responsivebannerslider.xml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
/***************************************************************************
|
5 |
+
@extension : Responsive Banner Slider Extension.
|
6 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
7 |
+
( http://www.capacitywebsolutions.com )
|
8 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
9 |
+
@support : magento@capacitywebsolutions.com
|
10 |
+
***************************************************************************/
|
11 |
+
-->
|
12 |
+
|
13 |
+
<layout version="0.1.0">
|
14 |
+
|
15 |
+
|
16 |
+
<responsivebannerslider_adminhtml_slidergroup_index>
|
17 |
+
<reference name="content">
|
18 |
+
<block type="responsivebannerslider/adminhtml_slidergroup" name="store_switcher" template="responsivebannerslider/store.phtml" />
|
19 |
+
<block type="responsivebannerslider/adminhtml_slidergroup" name="slidergroup" />
|
20 |
+
</reference>
|
21 |
+
</responsivebannerslider_adminhtml_slidergroup_index>
|
22 |
+
<responsivebannerslider_adminhtml_slidergroup_edit>
|
23 |
+
<reference name="head">
|
24 |
+
<action method="addJs"><script>responsivebannerslider/jscolor/jscolor.js</script></action>
|
25 |
+
<action method="addJs"><script>responsivebannerslider/product-selector.js</script></action>
|
26 |
+
<action method="addCss"><stylesheet>responsivebannerslider/responsivebannerslider.css</stylesheet></action>
|
27 |
+
|
28 |
+
<action method="setCanLoadExtJs"><flag>1</flag></action>
|
29 |
+
<action method="addJs"><script>lib/flex.js</script></action>
|
30 |
+
<action method="addJs"><script>lib/FABridge.js</script></action>
|
31 |
+
<action method="addJs"><script>mage/adminhtml/flexuploader.js</script></action>
|
32 |
+
<action method="addJs"><script>mage/adminhtml/browser.js</script></action>
|
33 |
+
<action method="addJs"><script>prototype/window.js</script></action>
|
34 |
+
<action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
|
35 |
+
<action method="addCss"><stylesheet>lib/prototype/windows/themes/magento.css</stylesheet></action>
|
36 |
+
|
37 |
+
</reference>
|
38 |
+
|
39 |
+
</responsivebannerslider_adminhtml_slidergroup_edit>
|
40 |
+
<responsivebannerslider_adminhtml_slider_index>
|
41 |
+
<reference name="content">
|
42 |
+
<block type="responsivebannerslider/adminhtml_slidergroup" name="group_switcher" template="responsivebannerslider/group.phtml" />
|
43 |
+
<block type="responsivebannerslider/adminhtml_slider" name="slider" />
|
44 |
+
</reference>
|
45 |
+
</responsivebannerslider_adminhtml_slider_index>
|
46 |
+
|
47 |
+
<responsivebannerslider_adminhtml_slidergroup_categories>
|
48 |
+
<block type="core/text_list" name="root" output="toHtml">
|
49 |
+
<block type="responsivebannerslider/adminhtml_slidergroup_edit_tab_categories" name="category.edit.tab.categories"/>
|
50 |
+
</block>
|
51 |
+
</responsivebannerslider_adminhtml_slidergroup_categories>
|
52 |
+
|
53 |
+
</layout>
|
app/design/adminhtml/default/default/template/responsivebannerslider/category/edit/tab/categories.phtml
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<div class="entry-edit-head">
|
12 |
+
<h4 class="icon-head head-edit-form fieldset-legend">
|
13 |
+
<?php echo Mage::helper('responsivebannerslider')->__('Categories') ?>
|
14 |
+
</h4>
|
15 |
+
</div>
|
16 |
+
<fieldset id="grop_fields">
|
17 |
+
<input type="hidden" name="category_ids" id="category_categories" value="<?php echo $this->getIdsString() ?>">
|
18 |
+
|
19 |
+
<div id="category-categories" class="tree"></div>
|
20 |
+
</fieldset>
|
21 |
+
</div>
|
22 |
+
<?php if($this->getRootNode() && $this->getRootNode()->hasChildren()): ?>
|
23 |
+
<script type="text/javascript">
|
24 |
+
Ext.EventManager.onDocumentReady(function() {
|
25 |
+
var categoryLoader = new Ext.tree.TreeLoader({
|
26 |
+
dataUrl: '<?php echo $this->getLoadTreeUrl()?>'
|
27 |
+
});
|
28 |
+
categoryLoader.createNode = function(config) {
|
29 |
+
config.uiProvider = Ext.tree.CheckboxNodeUI;
|
30 |
+
var node;
|
31 |
+
if (config.children && !config.children.length) {
|
32 |
+
delete(config.children);
|
33 |
+
node = new Ext.tree.AsyncTreeNode(config);
|
34 |
+
}
|
35 |
+
else {
|
36 |
+
node = new Ext.tree.TreeNode(config);
|
37 |
+
}
|
38 |
+
return node;
|
39 |
+
};
|
40 |
+
categoryLoader.on("beforeload", function(treeLoader, node) {
|
41 |
+
treeLoader.baseParams.category = node.attributes.id;
|
42 |
+
});
|
43 |
+
|
44 |
+
categoryLoader.on("load", function(treeLoader, node, config) {
|
45 |
+
varienWindowOnload();
|
46 |
+
});
|
47 |
+
var tree = new Ext.tree.TreePanel('category-categories', {
|
48 |
+
animate:true,
|
49 |
+
loader: categoryLoader,
|
50 |
+
enableDD:false,
|
51 |
+
containerScroll: true,
|
52 |
+
rootUIProvider: Ext.tree.CheckboxNodeUI,
|
53 |
+
selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
|
54 |
+
rootVisible: '<?php echo $this->getRootNode()->getIsVisible() ?>'
|
55 |
+
});
|
56 |
+
tree.on('check', function(node) {
|
57 |
+
if(node.attributes.checked) {
|
58 |
+
categoryAdd(node.id);
|
59 |
+
} else {
|
60 |
+
categoryRemove(node.id);
|
61 |
+
}
|
62 |
+
varienElementMethods.setHasChanges(node.getUI().checkbox);
|
63 |
+
}, tree);
|
64 |
+
var root = new Ext.tree.TreeNode({
|
65 |
+
text: '<?php echo $this->jsQuoteEscape($this->getRootNode()->getName()) ?>',
|
66 |
+
draggable:false,
|
67 |
+
checked:'<?php echo $this->getRootNode()->getChecked() ?>',
|
68 |
+
id:'<?php echo $this->getRootNode()->getId() ?>',
|
69 |
+
disabled: <?php echo ($this->getRootNode()->getDisabled() ? 'true' : 'false') ?>,
|
70 |
+
uiProvider: Ext.tree.CheckboxNodeUI
|
71 |
+
});
|
72 |
+
tree.setRootNode(root);
|
73 |
+
bildCategoryTree(root, <?php echo $this->getTreeJson() ?>);
|
74 |
+
tree.addListener('click', categoryClick.createDelegate(this));
|
75 |
+
tree.render();
|
76 |
+
root.expand();
|
77 |
+
});
|
78 |
+
function bildCategoryTree(parent, config){
|
79 |
+
if (!config) {
|
80 |
+
return null;
|
81 |
+
}
|
82 |
+
if (parent && config && config.length){
|
83 |
+
for (var i = 0; i < config.length; i++){
|
84 |
+
config[i].uiProvider = Ext.tree.CheckboxNodeUI;
|
85 |
+
var node;
|
86 |
+
var _node = Object.clone(config[i]);
|
87 |
+
if (_node.children && !_node.children.length) {
|
88 |
+
delete(_node.children);
|
89 |
+
node = new Ext.tree.AsyncTreeNode(_node);
|
90 |
+
|
91 |
+
}
|
92 |
+
else {
|
93 |
+
node = new Ext.tree.TreeNode(config[i]);
|
94 |
+
}
|
95 |
+
parent.appendChild(node);
|
96 |
+
node.loader = node.getOwnerTree().loader;
|
97 |
+
if(config[i].children){
|
98 |
+
bildCategoryTree(node, config[i].children);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
function categoryClick(node, e){
|
104 |
+
if (node.disabled) {
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
node.getUI().check(!node.getUI().checked());
|
108 |
+
varienElementMethods.setHasChanges(Event.element(e), e);
|
109 |
+
};
|
110 |
+
function categoryAdd(id) {
|
111 |
+
var ids = $('category_categories').value.split(',');
|
112 |
+
ids.push(id);
|
113 |
+
$('category_categories').value = ids.join(',');
|
114 |
+
}
|
115 |
+
function categoryRemove(id) {
|
116 |
+
var ids = $('category_categories').value.split(',');
|
117 |
+
while (-1 != ids.indexOf(id)) {
|
118 |
+
ids.splice(ids.indexOf(id), 1);
|
119 |
+
}
|
120 |
+
$('category_categories').value = ids.join(',');
|
121 |
+
}
|
122 |
+
</script>
|
123 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/responsivebannerslider/category/edit/tab/product.phtml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/***************************************************************************
|
4 |
+
@extension : Responsive Banner Slider Extension.
|
5 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
6 |
+
( http://www.capacitywebsolutions.com )
|
7 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
+
@support : magento@capacitywebsolutions.com
|
9 |
+
***************************************************************************/
|
10 |
+
|
11 |
+
?>
|
12 |
+
<style>
|
13 |
+
.product-param label { padding-right: 10px; }
|
14 |
+
.product-param .label { color: black; font-weight: bold; }
|
15 |
+
.product-param .label:hover { color: blue; font-weight: bold; }
|
16 |
+
.product-param .element { display: none; }
|
17 |
+
.product-param input, .product-param select { min-width: 350px; width: auto !important; }
|
18 |
+
.product-param-edit .label { display: none; }
|
19 |
+
.product-param-edit .element { display: inline; }
|
20 |
+
.product-chooser { border: 1px solid #CCC; display: none; margin: 10px 0; padding: 5px; }
|
21 |
+
</style>
|
22 |
+
|
23 |
+
<div class="entry-edit">
|
24 |
+
<div class="entry-edit-head">
|
25 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('responsivebannerslider')->__('Group Products') ?></h4>
|
26 |
+
|
27 |
+
</div>
|
28 |
+
<fieldset id="product_fieldset">
|
29 |
+
<ul>
|
30 |
+
<li>
|
31 |
+
<span class="product-param">
|
32 |
+
<label for="product_sku"><?php echo Mage::helper('responsivebannerslider')->__('Show On Product Pages (SKU)') ?></label>
|
33 |
+
<a class="label" href="javascript:void(0)"><?php if($this->getIdsString()) { echo $this->getIdsString(); } else { echo Mage::helper('responsivebannerslider')->__('Click Here To Add Products'); } ?></a>
|
34 |
+
<span class="element">
|
35 |
+
<input id="product_sku" class="input-text element-value-changer" type="text" value="<?php echo $this->getIdsString() ?>" name="product_sku">
|
36 |
+
<a class="product-chooser-trigger" href="javascript:void(0)">
|
37 |
+
<img src="<?php echo Mage::getDesign()->getSkinUrl('images/rule_chooser_trigger.gif') ?>" alt="" class="v-middle product-chooser-trigger" title="<?php echo Mage::helper('responsivebannerslider')->__('Open Chooser') ?>" />
|
38 |
+
</a>
|
39 |
+
</span>
|
40 |
+
</span>
|
41 |
+
<div class="product-chooser" url="<?php echo Mage::getUrl('adminhtml/promo_widget/chooser/attribute/sku/form/rule_conditions_fieldset', array('_secure' => Mage::app()->getStore()->isAdminUrlSecure())); ?>">
|
42 |
+
</li>
|
43 |
+
</ul>
|
44 |
+
</fieldset>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
<script type="text/javascript">
|
48 |
+
var rule_conditions_fieldset = new VarienRulesForm('product_fieldset', '<?php echo Mage::getUrl('/admin/promo_catalog/newConditionHtml/form/rule_conditions_fieldset/', array('_secure' => Mage::app()->getStore()->isAdminUrlSecure())) ?>');
|
49 |
+
|
50 |
+
|
51 |
+
</script>
|
app/design/adminhtml/default/default/template/responsivebannerslider/code.phtml
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
?>
|
10 |
+
|
11 |
+
<?php $GroupData = $this->getCurrentGroup(); ?>
|
12 |
+
<div class="entry-edit">
|
13 |
+
<div class="entry-edit-head">
|
14 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('responsivebannerslider')->__('Information') ?></h4>
|
15 |
+
</div>
|
16 |
+
<fieldset id="xml-info">
|
17 |
+
<?php $GroupInfo= $GroupData->getData('slidergroup_id'); ?>
|
18 |
+
|
19 |
+
<p>For more flexibility on where to load this slider group you can use a template tag or Layout XML code to add this slider group to a CMS page or static block. The following template tag or XML code can be used to display the <strong><?php echo $GroupData->getData('title'); ?></strong> slider group in your webshop.</p>
|
20 |
+
|
21 |
+
<p>Instead of selecting a page or category to display the <strong><?php echo $GroupData->getData('title') ?></strong> slider group you can copy either the template tag or the XML code below and paste it into the content editor of a CMS page or static block (for template tag) or either a Layout XML file or a Custom Layout Update XML field of a CMS page or category (Layout XML code). You can change the reference name parameter to position the group where you want it to show in the CMS page or category.</p>
|
22 |
+
</fieldset>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<div class="entry-edit">
|
26 |
+
<div class="entry-edit-head">
|
27 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('responsivebannerslider')->__('Template Tag') ?></h4>
|
28 |
+
</div>
|
29 |
+
|
30 |
+
<fieldset id="template-tag">
|
31 |
+
|
32 |
+
|
33 |
+
<textarea id="flexslider-template-tag" rows="3" cols="176" onclick="this.focus();this.select()" readonly="readonly">
|
34 |
+
|
35 |
+
{{block type="responsivebannerslider/view" name="responsivebannerslider_view<?php echo $GroupInfo; ?>" template="responsivebannerslider/slider.phtml" code="<?php echo $GroupInfo; ?>"}}
|
36 |
+
</textarea>
|
37 |
+
|
38 |
+
|
39 |
+
</fieldset>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<div class="entry-edit">
|
43 |
+
<div class="entry-edit-head">
|
44 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('responsivebannerslider')->__('XML Code') ?></h4>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
<fieldset id="xml-code">
|
48 |
+
|
49 |
+
|
50 |
+
<textarea id="flexslider-code" rows="7" cols="176" onclick="this.focus();this.select()" readonly="readonly">
|
51 |
+
|
52 |
+
<reference name="content">
|
53 |
+
<block type="responsivebannerslider/view" name="responsivebannerslider_view<?php echo $GroupInfo; ?>" template="responsivebannerslider/slider.phtml">
|
54 |
+
<action method="setCode"><code><?php echo $GroupInfo; ?></code></action>
|
55 |
+
</block>
|
56 |
+
</reference>
|
57 |
+
</textarea>
|
58 |
+
|
59 |
+
|
60 |
+
</fieldset>
|
61 |
+
</div>
|
62 |
+
|
63 |
+
|
64 |
+
<div class="entry-edit">
|
65 |
+
<div class="entry-edit-head">
|
66 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('responsivebannerslider')->__('
|
67 |
+
Call Via Frontend Template File') ?></h4>
|
68 |
+
</div>
|
69 |
+
|
70 |
+
<fieldset id="template-tag">
|
71 |
+
|
72 |
+
|
73 |
+
<textarea id="flexslider-template-tag" rows="3" cols="176" onclick="this.focus();this.select()" readonly="readonly">
|
74 |
+
|
75 |
+
<?php echo
|
76 |
+
'<?php echo $this->getLayout()->createBlock("responsivebannerslider/view")->setCode('.$GroupInfo.')->setTemplate("responsivebannerslider/slider.phtml")->toHtml() ?>';
|
77 |
+
|
78 |
+
?></textarea>
|
79 |
+
|
80 |
+
|
81 |
+
</fieldset>
|
82 |
+
</div>
|
app/design/adminhtml/default/default/template/responsivebannerslider/group.phtml
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
?>
|
10 |
+
|
11 |
+
<?php if(count($this->getGroupData()) > 1) { ?>
|
12 |
+
|
13 |
+
<?php $url = Mage::helper('adminhtml')->getUrl('responsivebannerslider/adminhtml_slider/index'); ?>
|
14 |
+
<?php $group_id = $this->getRequest()->getParam('group'); ?>
|
15 |
+
|
16 |
+
<p class="switcher"><label for="store_switcher"><?php echo $this->__('Choose Slider Group:') ?></label>
|
17 |
+
<select name="store_switcher" id="store_switcher" onchange="return switchStore(this);">
|
18 |
+
<option value="0"><?php echo $this->__('Show All Slider Group'); ?></option>
|
19 |
+
<?php foreach($this->getGroupData() as $key => $value) {
|
20 |
+
if($group_id == $key){
|
21 |
+
?>
|
22 |
+
<option value="<?php echo $key; ?>" selected><?php echo $value; ?></option>
|
23 |
+
<?php }else{?>
|
24 |
+
<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
|
25 |
+
<?php } ?>
|
26 |
+
|
27 |
+
<?php }?>
|
28 |
+
|
29 |
+
</select>
|
30 |
+
|
31 |
+
</p>
|
32 |
+
|
33 |
+
<script type="text/javascript">
|
34 |
+
function switchStore(obj) {
|
35 |
+
var storeParam = obj.value ? 'group/' + obj.value + '/' : '';
|
36 |
+
if (obj.switchParams) {
|
37 |
+
storeParam += obj.switchParams;
|
38 |
+
}
|
39 |
+
|
40 |
+
setLocation('<?php echo $url ?>' + storeParam);
|
41 |
+
|
42 |
+
}
|
43 |
+
</script>
|
44 |
+
<?php }?>
|
app/design/adminhtml/default/default/template/responsivebannerslider/store.phtml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
?>
|
10 |
+
|
11 |
+
<?php echo $this->getStoreSwitcherHtml() ?>
|
app/design/frontend/base/default/layout/responsivebannerslider.xml
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<layout version="0.1.0">
|
4 |
+
<default>
|
5 |
+
<reference name="head">
|
6 |
+
<action method="removeItem"><type>skin_js</type><name>js/lib/jquery-1.10.2.min.js</name></action>
|
7 |
+
<action method="removeItem"><type>js</type><name>lib/jquery/jquery-1.10.2.min.js</name></action>
|
8 |
+
</reference>
|
9 |
+
</default>
|
10 |
+
<cms_page>
|
11 |
+
<reference name="content">
|
12 |
+
<block type="responsivebannerslider/view_top" name="responsivebannerslider_top" before="_">
|
13 |
+
<action method="setTemplate" ifconfig="responsivebannerslider/general/enabled">
|
14 |
+
<template>responsivebannerslider/slider.phtml</template>
|
15 |
+
</action>
|
16 |
+
</block>
|
17 |
+
<block type="responsivebannerslider/view_bottom" name="responsivebannerslider_bottom" after="_">
|
18 |
+
<action method="setTemplate" ifconfig="responsivebannerslider/general/enabled">
|
19 |
+
<template>responsivebannerslider/slider.phtml</template>
|
20 |
+
</action>
|
21 |
+
</block>
|
22 |
+
</reference>
|
23 |
+
</cms_page>
|
24 |
+
|
25 |
+
<catalog_category_default>
|
26 |
+
<reference name="content">
|
27 |
+
<block type="responsivebannerslider/view_top" name="responsivebannerslider_tops" before="_">
|
28 |
+
<action method="setTemplate" ifconfig="responsivebannerslider/general/enabled">
|
29 |
+
<template>responsivebannerslider/slider.phtml</template>
|
30 |
+
</action>
|
31 |
+
</block>
|
32 |
+
<block type="responsivebannerslider/view_bottom" name="responsivebannerslider_bottom" after="_">
|
33 |
+
<action method="setTemplate" ifconfig="responsivebannerslider/general/enabled">
|
34 |
+
<template>responsivebannerslider/slider.phtml</template>
|
35 |
+
</action>
|
36 |
+
</block>
|
37 |
+
</reference>
|
38 |
+
</catalog_category_default>
|
39 |
+
|
40 |
+
<catalog_category_layered>
|
41 |
+
<reference name="content">
|
42 |
+
<block type="responsivebannerslider/view_top" name="responsivebannerslider_top" before="_">
|
43 |
+
<action method="setTemplate" ifconfig="responsivebannerslider/general/enabled">
|
44 |
+
<template>responsivebannerslider/slider.phtml</template>
|
45 |
+
</action>
|
46 |
+
</block>
|
47 |
+
<block type="responsivebannerslider/view_bottom" name="responsivebannerslider_bottom" after="_">
|
48 |
+
<action method="setTemplate" ifconfig="responsivebannerslider/general/enabled">
|
49 |
+
<template>responsivebannerslider/slider.phtml</template>
|
50 |
+
</action>
|
51 |
+
</block>
|
52 |
+
</reference>
|
53 |
+
</catalog_category_layered>
|
54 |
+
|
55 |
+
<catalog_product_view>
|
56 |
+
<reference name="content">
|
57 |
+
<block type="responsivebannerslider/view_top" name="responsivebannerslider_top" before="_">
|
58 |
+
<action method="setTemplate" ifconfig="responsivebannerslider/general/enabled">
|
59 |
+
<template>responsivebannerslider/slider.phtml</template>
|
60 |
+
</action>
|
61 |
+
</block>
|
62 |
+
<block type="responsivebannerslider/view_bottom" name="responsivebannerslider_bottom" after="_">
|
63 |
+
<action method="setTemplate" ifconfig="responsivebannerslider/general/enabled">
|
64 |
+
<template>responsivebannerslider/slider.phtml</template>
|
65 |
+
</action>
|
66 |
+
</block>
|
67 |
+
</reference>
|
68 |
+
</catalog_product_view>
|
69 |
+
|
70 |
+
</layout>
|
app/design/frontend/base/default/template/responsivebannerslider/slider.phtml
ADDED
@@ -0,0 +1,543 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
@extension : Responsive Banner Slider Extension.
|
4 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
5 |
+
( http://www.capacitywebsolutions.com )
|
6 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
+
@support : magento@capacitywebsolutions.com
|
8 |
+
***************************************************************************/
|
9 |
+
?>
|
10 |
+
|
11 |
+
<?php if ($this->getGroupscollection() != "") { ?>
|
12 |
+
<?php $groupsdata = $this->getGroupscollection()->getData(); ?>
|
13 |
+
|
14 |
+
<?php foreach ($groupsdata as $groups ) { ?>
|
15 |
+
<?php
|
16 |
+
|
17 |
+
if ($groups ['slider_theme'] == "default") {
|
18 |
+
$theme = "defaultTheme";
|
19 |
+
} elseif ($groups ['slider_theme'] == "blank") {
|
20 |
+
$theme = "blankTheme";
|
21 |
+
} elseif ($groups ['slider_theme'] == "drop_shadow") {
|
22 |
+
$theme = "dropShadow";
|
23 |
+
} else {
|
24 |
+
$theme = "emboss";
|
25 |
+
}
|
26 |
+
|
27 |
+
if ($groups ['navigation_arrow'] == "never") {
|
28 |
+
$navarrow = "noNavArw";
|
29 |
+
} elseif ($groups ['navigation_arrow'] == "always") {
|
30 |
+
$navarrow = "alwaysNavArw";
|
31 |
+
} else {
|
32 |
+
$navarrow = "NavArwOnHover";
|
33 |
+
}
|
34 |
+
|
35 |
+
if ($groups ['navigation_style'] == "angle") {
|
36 |
+
$navstyle = "angle";
|
37 |
+
} elseif ($groups ['navigation_style'] == "angle_small") {
|
38 |
+
$navstyle = "angle_small";
|
39 |
+
} elseif ($groups ['navigation_style'] == "angle_circle") {
|
40 |
+
$navstyle = "angle_circle";
|
41 |
+
} elseif ($groups ['navigation_style'] == "angle_square") {
|
42 |
+
$navstyle = "angle_square";
|
43 |
+
} elseif ($groups ['navigation_style'] == "arrow") {
|
44 |
+
$navstyle = "arrow";
|
45 |
+
} elseif ($groups ['navigation_style'] == "arrow_circle") {
|
46 |
+
$navstyle = "arrow_circle";
|
47 |
+
} elseif ($groups ['navigation_style'] == "caret") {
|
48 |
+
$navstyle = "caret";
|
49 |
+
} elseif ($groups ['navigation_style'] == "chevron") {
|
50 |
+
$navstyle = "chevron";
|
51 |
+
} elseif ($groups ['navigation_style'] == "chevron_smooth") {
|
52 |
+
$navstyle = "chevron_smooth";
|
53 |
+
} elseif ($groups ['navigation_style'] == "chevron_circle") {
|
54 |
+
$navstyle = "chevron_circle";
|
55 |
+
} else {
|
56 |
+
$navstyle = "chevron_square";
|
57 |
+
}
|
58 |
+
|
59 |
+
if ($groups ['navigation_aposition'] == "inside") {
|
60 |
+
$navpos = "navArwInside";
|
61 |
+
} elseif ($groups ['navigation_aposition'] == "outside") {
|
62 |
+
$navpos = "navArwOutside";
|
63 |
+
} elseif ($groups ['navigation_aposition'] == "inside_left") {
|
64 |
+
$navpos = "navArwInLeft";
|
65 |
+
} else {
|
66 |
+
$navpos = "navArwInRight";
|
67 |
+
}
|
68 |
+
|
69 |
+
if ($groups ['show_pagination'] == "never") {
|
70 |
+
$showpage = "noPaging";
|
71 |
+
} elseif ($groups ['show_pagination'] == "always") {
|
72 |
+
$showpage = "alwaysPaging";
|
73 |
+
} else {
|
74 |
+
$showpage = "pagingOnHover";
|
75 |
+
}
|
76 |
+
|
77 |
+
if ($groups ['pagination_style'] == "circular") {
|
78 |
+
$pagestyle = "circular";
|
79 |
+
} elseif ($groups ['pagination_style'] == "squared") {
|
80 |
+
$pagestyle = "squared";
|
81 |
+
} elseif ($groups ['pagination_style'] == "circular_bar") {
|
82 |
+
$pagestyle = "cir-bar";
|
83 |
+
} else {
|
84 |
+
$pagestyle = "squ-bar";
|
85 |
+
}
|
86 |
+
|
87 |
+
if ($groups ['pagination_position'] == "below") {
|
88 |
+
$pagepos = "pagerBelow";
|
89 |
+
} elseif ($groups ['pagination_position'] == "above") {
|
90 |
+
$pagepos = "pagerAbove";
|
91 |
+
} elseif ($groups ['pagination_position'] == "inside_top") {
|
92 |
+
$pagepos = "pagerInTop";
|
93 |
+
} elseif ($groups ['pagination_position'] == "inside_bottom") {
|
94 |
+
$pagepos = "pagerInBottom";
|
95 |
+
} elseif ($groups ['pagination_position'] == "inside_bottom_left") {
|
96 |
+
$pagepos = "pagerInBottomleft";
|
97 |
+
} else {
|
98 |
+
$pagepos = "pagerInBottomright";
|
99 |
+
}
|
100 |
+
|
101 |
+
if ($groups ['slider_type'] == "basic") {
|
102 |
+
$bannerStyle = "basSlider";
|
103 |
+
} elseif ($groups ['slider_type'] == "carousel") {
|
104 |
+
$bannerStyle = "basCarousel";
|
105 |
+
} else {
|
106 |
+
$bannerStyle = "slideNcrosel";
|
107 |
+
}
|
108 |
+
|
109 |
+
?>
|
110 |
+
<?php $sliedsdata = $this->getSlides($groups['slidergroup_id']); ?>
|
111 |
+
<?php if(count($sliedsdata) > 0 ) { ?>
|
112 |
+
<?php $groupId = $groups['slidergroup_id']; ?>
|
113 |
+
<link rel="stylesheet" type="text/css"
|
114 |
+
href="<?php echo $this->getSkinUrl('css/responsivebannerslider/group-'.$groupId.'.css');?>"
|
115 |
+
media="all" />
|
116 |
+
<div id="bnrSlider-<?php echo $groups['slidergroup_id']; ?>"
|
117 |
+
class="cwsSlider <?php echo $bannerStyle.' '.$theme; ?>">
|
118 |
+
<?php if($groups['slider_type'] != "carousel") { ?>
|
119 |
+
<div class="slider loading">
|
120 |
+
<div id="rwdSlider-<?php echo $groups['slidergroup_id']; ?>"
|
121 |
+
class="cwsRwdSlider <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
122 |
+
<ul class="slides">
|
123 |
+
<?php
|
124 |
+
$youtube = '';
|
125 |
+
$vimeo = '';
|
126 |
+
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
127 |
+
foreach ( $sliedsdata as $slide ) {
|
128 |
+
if ($slide->getDateEnabled () == 1) {
|
129 |
+
$fromdate = strtotime ( $slide->getFromDate () );
|
130 |
+
$todate = strtotime ( $slide->getToDate () );
|
131 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
132 |
+
} else {
|
133 |
+
$fromdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
134 |
+
$todate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
135 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
136 |
+
}
|
137 |
+
$videoid = $groups ['slidergroup_id'];
|
138 |
+
$video_height = $slide->getVideoHeight ();
|
139 |
+
?>
|
140 |
+
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
141 |
+
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
142 |
+
<?php $vimeo = $vimeo + 1; ?>
|
143 |
+
<li class="video"><iframe id="player_<?php echo $videoid; ?>"
|
144 |
+
src="http://player.vimeo.com/video/<?php echo $slide->getVideoId(); ?>?api=1&player_id=player_<?php echo $videoid; ?>"
|
145 |
+
width="100%" height="<?php echo $video_height; ?>" frameborder="0"
|
146 |
+
webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></li>
|
147 |
+
<?php } elseif($slide->getImgVideo() == "youtube") { ?>
|
148 |
+
<?php $youtube = $youtube + 1; ?>
|
149 |
+
<li class="video"><iframe class="youtube"
|
150 |
+
id="youtube_<?php echo $videoid; ?>"
|
151 |
+
src="http://www.youtube.com/embed/<?php echo $slide->getVideoId(); ?>?enablejsapi=1&wmode=opaque&playerapiid=youtube_<?php echo $videoid; ?>"
|
152 |
+
width="100%" height="<?php echo $video_height; ?>" frameborder="0"
|
153 |
+
webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></li>
|
154 |
+
<?php } else { ?>
|
155 |
+
<?php
|
156 |
+
if ($slide->getData ( 'filename' )) {
|
157 |
+
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/" . $slide->getData ( 'filename' );
|
158 |
+
} else {
|
159 |
+
if ($slide->getData ( 'hosted_thumb' )) {
|
160 |
+
$imgsrc = $slide->getHostedThumb ();
|
161 |
+
} else {
|
162 |
+
$imgsrc = $slide->getHostedUrl ();
|
163 |
+
}
|
164 |
+
}
|
165 |
+
$loading_img = $this->getSkinUrl ( 'css/responsivebannerslider/loading.gif' );
|
166 |
+
?>
|
167 |
+
<li><?php if($slide->getUrl()) {?><a
|
168 |
+
href="<?php echo $slide->getUrl(); ?>"
|
169 |
+
title="<?php echo $slide->getUrl(); ?>"
|
170 |
+
target="<?php if($slide->getUrlTarget() == "new_window") { echo "_blank"; } ?>"><?php } ?><img
|
171 |
+
class="cwslazy" <?php if($this->getLazylaod()) { ?>
|
172 |
+
data-src="<?php echo $imgsrc; ?>" <?php } ?>
|
173 |
+
src="<?php if(!$this->getLazylaod()) { echo $imgsrc; }else { echo $loading_img; } ?>"
|
174 |
+
alt="<?php echo $slide->getAltText(); ?>" /><?php if($slide->getUrl()) {?></a><?php } ?><?php if($slide->getDescription()) { ?><span
|
175 |
+
class="sliderdecs"><?php echo $slide->getDescription(); ?></span><?php } ?></li>
|
176 |
+
<?php } ?>
|
177 |
+
<?php if($slide->getDateEnabled() == 1) { } } ?> <?php } ?>
|
178 |
+
</ul>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
<?php } ?>
|
182 |
+
|
183 |
+
<?php if($groups['slider_type'] == "carousel") { ?>
|
184 |
+
<div class="slider loading">
|
185 |
+
<div id="carousel-<?php echo $groups['slidergroup_id']; ?>"
|
186 |
+
class="rwdCarousel <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
187 |
+
<ul class="slides">
|
188 |
+
<?php
|
189 |
+
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
190 |
+
foreach ( $sliedsdata as $slide ) {
|
191 |
+
if ($slide->getDateEnabled () == 1) {
|
192 |
+
$fromdate = strtotime ( $slide->getFromDate () );
|
193 |
+
$todate = strtotime ( $slide->getToDate () );
|
194 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
195 |
+
} else {
|
196 |
+
$fromdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
197 |
+
$todate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
198 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
199 |
+
}
|
200 |
+
$youtube = '';
|
201 |
+
$vimeo = '';
|
202 |
+
$videoid = $slide->getSlideId () . $groups ['slidergroup_id'];
|
203 |
+
?>
|
204 |
+
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
205 |
+
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
206 |
+
<?php
|
207 |
+
$vimeo = $vimeo + 1;
|
208 |
+
$img = $slide->getVideoId ();
|
209 |
+
$hash = unserialize ( file_get_contents ( "http://vimeo.com/api/v2/video/$img.php" ) );
|
210 |
+
?>
|
211 |
+
<li class="video"><a
|
212 |
+
href="http://vimeo.com/<?php echo $slide->getVideoId(); ?>"
|
213 |
+
title="<?php echo $this->escapeHtml($slide->getTitles()) ?>"
|
214 |
+
target="_blank"><img
|
215 |
+
src="<?php echo $hash[0]['thumbnail_large']; ?>"
|
216 |
+
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></a></li>
|
217 |
+
<?php }elseif($slide->getImgVideo() == "youtube") {?>
|
218 |
+
<?php $youtube = $youtube + 1; ?>
|
219 |
+
<li class="video"><a
|
220 |
+
href="http://www.youtube.com/watch?v=<?php echo $slide->getVideoId(); ?>"
|
221 |
+
title="<?php echo $this->escapeHtml($slide->getTitles()) ?>"
|
222 |
+
target="_blank"><img
|
223 |
+
src="http://img.youtube.com/vi/<?php echo $slide->getVideoId(); ?>/0.jpg"
|
224 |
+
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></a></li>
|
225 |
+
<?php }else{ ?>
|
226 |
+
<?php
|
227 |
+
if ($slide->getData ( 'filename' )) {
|
228 |
+
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/thumbnails/" . $slide->getData ( 'filename' );
|
229 |
+
} else {
|
230 |
+
if ($slide->getData ( 'hosted_thumb' )) {
|
231 |
+
$imgsrc = $slide->getHostedThumb ();
|
232 |
+
} else {
|
233 |
+
$imgsrc = $slide->getHostedUrl ();
|
234 |
+
}
|
235 |
+
}
|
236 |
+
?>
|
237 |
+
<li><?php if($slide->getUrl()) {?><a
|
238 |
+
href="<?php echo $slide->getUrl(); ?>"
|
239 |
+
title="<?php echo $slide->getUrl(); ?>"
|
240 |
+
target="<?php if($slide->getUrlTarget() == "new_window") { echo "_blank"; } ?>"><?php } ?><img
|
241 |
+
src="<?php echo $imgsrc; ?>"
|
242 |
+
alt="<?php echo $slide->getAltText(); ?>" /><?php if($slide->getUrl()) {?></a><?php } ?></li>
|
243 |
+
<?php } ?>
|
244 |
+
<?php } ?>
|
245 |
+
<?php } ?>
|
246 |
+
</ul>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
<?php } ?>
|
250 |
+
|
251 |
+
<?php if($groups['slider_type'] == "bas-caro") { ?>
|
252 |
+
<div class="slider loading">
|
253 |
+
<div id="carousel-<?php echo $groups['slidergroup_id']; ?>"
|
254 |
+
class="rwdSlideCrousel <?php echo $navpos.' '.$navarrow.' '.$showpage.' '.$pagepos ?>">
|
255 |
+
<ul class="slides">
|
256 |
+
<?php
|
257 |
+
$sliedsdata = $this->getSlides ( $groups ['slidergroup_id'] );
|
258 |
+
foreach ( $sliedsdata as $slide ) {
|
259 |
+
if ($slide->getDateEnabled () == 1) {
|
260 |
+
$fromdate = strtotime ( $slide->getFromDate () );
|
261 |
+
$todate = strtotime ( $slide->getToDate () );
|
262 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
263 |
+
} else {
|
264 |
+
$fromdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
265 |
+
$todate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
266 |
+
$nowdate = strtotime ( $this->formatTime ( now (), Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, true ) );
|
267 |
+
}
|
268 |
+
$youtube = '';
|
269 |
+
$vimeo = '';
|
270 |
+
$videoid = $slide->getSlideId () . $groups ['slidergroup_id'];
|
271 |
+
?>
|
272 |
+
<?php if($fromdate <= $nowdate && $todate >= $nowdate ) { ?>
|
273 |
+
<?php if($slide->getImgVideo() == "vimeo") { ?>
|
274 |
+
<?php
|
275 |
+
$vimeo = $vimeo + 1;
|
276 |
+
$img = $slide->getVideoId ();
|
277 |
+
$hash = unserialize ( file_get_contents ( "http://vimeo.com/api/v2/video/$img.php" ) );
|
278 |
+
?>
|
279 |
+
<li class="video"><img
|
280 |
+
src="<?php echo $hash[0]['thumbnail_large']; ?>"
|
281 |
+
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></li>
|
282 |
+
<?php } elseif($slide->getImgVideo() == "youtube") { ?>
|
283 |
+
<?php $youtube = $youtube + 1; ?>
|
284 |
+
<li class="video"><img
|
285 |
+
src="http://img.youtube.com/vi/<?php echo $slide->getVideoId(); ?>/0.jpg"
|
286 |
+
alt="<?php echo $this->escapeHtml($slide->getTitles()) ?>" /></li>
|
287 |
+
<?php } else { ?>
|
288 |
+
<?php
|
289 |
+
if ($slide->getData ( 'filename' )) {
|
290 |
+
$imgsrc = Mage::getBaseUrl ( 'media' ) . "responsivebannerslider/thumbnails/" . $slide->getData ( 'filename' );
|
291 |
+
} else {
|
292 |
+
if ($slide->getData ( 'hosted_thumb' )) {
|
293 |
+
$imgsrc = $slide->getHostedThumb ();
|
294 |
+
} else {
|
295 |
+
$imgsrc = $slide->getHostedUrl ();
|
296 |
+
}
|
297 |
+
}
|
298 |
+
?>
|
299 |
+
<li><img src="<?php echo $imgsrc; ?>"
|
300 |
+
alt="<?php echo $slide->getAltText(); ?>" /></li>
|
301 |
+
<?php } ?>
|
302 |
+
<?php } ?>
|
303 |
+
<?php } ?>
|
304 |
+
</ul>
|
305 |
+
</div>
|
306 |
+
</div>
|
307 |
+
<?php } ?>
|
308 |
+
</div>
|
309 |
+
|
310 |
+
<script type="text/javascript">
|
311 |
+
|
312 |
+
function getGridSize() {
|
313 |
+
|
314 |
+
return (window.innerWidth < 999) ? 4 :
|
315 |
+
(window.innerWidth < 999) ? 2 : 4;
|
316 |
+
}
|
317 |
+
|
318 |
+
jQuery(window).load(function(){
|
319 |
+
|
320 |
+
<?php if($groups['slider_type'] != "basic") { ?>
|
321 |
+
jQuery('#carousel-<?php echo $groups['slidergroup_id']; ?>').flexslider({
|
322 |
+
animation: "slide",
|
323 |
+
itemWidth: <?php echo $groups['thumbnail_size']; ?>,
|
324 |
+
itemMargin: 10,
|
325 |
+
directionNav: <?php if($groups['navigation_arrow'] == "never") { echo "false"; } else { echo "true"; } ?>,
|
326 |
+
<?php if($groups['slider_type']== "bas-caro") { ?>
|
327 |
+
slideshow: false,
|
328 |
+
animationLoop: true,
|
329 |
+
controlNav: false,
|
330 |
+
asNavFor: '#rwdSlider-<?php echo $groups['slidergroup_id']; ?>',
|
331 |
+
<?php } else { ?>
|
332 |
+
controlNav: <?php if($groups['show_pagination'] == "never" || $groups['slider_type']== "bas-caro" || $groups['slider_type']== "basic") { echo "false"; } else { echo "true"; } ?>,
|
333 |
+
slideshow: <?php if($groups['start_animation']==0) { echo 'false'; } else { echo 'true'; } ?>,
|
334 |
+
animationLoop: <?php if($groups['loop_slider']==0) { echo 'false'; } else { echo 'true'; } ?>,
|
335 |
+
<?php } ?>
|
336 |
+
start: function(slider){
|
337 |
+
jQuery('.slider').removeClass('loading');
|
338 |
+
flexslider = slider;
|
339 |
+
},
|
340 |
+
|
341 |
+
navarrow : "<?php echo $navarrow; ?>",
|
342 |
+
navstyle : "<?php echo $navstyle; ?>",
|
343 |
+
showpage : "<?php echo $showpage; ?>",
|
344 |
+
pagestyle : "<?php echo $pagestyle; ?>",
|
345 |
+
pagepos : "<?php echo $pagepos; ?>",
|
346 |
+
minItems: getGridSize(), // use function to pull in initial value
|
347 |
+
maxItems: getGridSize() // use function to pull in initial value
|
348 |
+
});
|
349 |
+
|
350 |
+
jQuery(window).resize(function() {
|
351 |
+
var gridSize = getGridSize();
|
352 |
+
|
353 |
+
flexslider.vars.minItems = gridSize;
|
354 |
+
flexslider.vars.maxItems = gridSize;
|
355 |
+
});
|
356 |
+
|
357 |
+
<?php } ?>
|
358 |
+
|
359 |
+
<?php if($groups['slider_type'] != "carousel") { ?>
|
360 |
+
<?php if($youtube) { ?>
|
361 |
+
jQuery.getScript('//www.youtube.com/iframe_api');
|
362 |
+
|
363 |
+
var cnt = 0;
|
364 |
+
jQuery('#rwdSlider-<?php echo $groups['slidergroup_id']; ?> li.video iframe.youtube').each(function() {
|
365 |
+
jQuery(this).attr('id', 'youtubeplayer' + cnt);
|
366 |
+
cnt++;
|
367 |
+
});
|
368 |
+
|
369 |
+
loadSlider();
|
370 |
+
|
371 |
+
function loadSlider() {
|
372 |
+
if(typeof(YT) != 'undefined') {
|
373 |
+
jQuery('.slides').fitVids();
|
374 |
+
<?php } ?>
|
375 |
+
|
376 |
+
|
377 |
+
jQuery('#rwdSlider-<?php echo $groups['slidergroup_id']; ?>').fitVids().flexslider({
|
378 |
+
|
379 |
+
directionNav: <?php if($groups['navigation_arrow'] == "never") { echo "false"; } else { echo "true"; } ?>,
|
380 |
+
controlNav: <?php if($groups['show_pagination'] == "never" || $groups['slider_type']== "bas-caro" || $groups['slider_type']== "carousel") { echo "false"; } else { echo "true"; } ?>,
|
381 |
+
slideshow: <?php if($groups['start_animation']==0) { echo 'false'; } else { echo 'true'; } ?>,
|
382 |
+
animationLoop: <?php if($groups['loop_slider']==0) { echo 'false'; } else { echo 'true'; } ?>,
|
383 |
+
pauseOnAction: <?php if($groups['pause_snavigation']==0) { echo 'false'; } else { echo 'true'; } ?>,
|
384 |
+
pauseOnHover: <?php if($groups['pause_shover']==0) { echo 'false'; } else { echo 'true'; } ?>,
|
385 |
+
animation: "<?php echo $groups['animation_type'] ?>",
|
386 |
+
animationSpeed: <?php echo $groups['animation_duration'] ?>,
|
387 |
+
direction: "<?php echo $groups['animation_direction'] ?>",
|
388 |
+
slideshowSpeed: <?php echo $groups['slide_duration'] ?>,
|
389 |
+
randomize: <?php if($groups['random_order']==0 || $groups['slider_type'] == "bas-caro") { echo 'false'; } else { echo 'true'; } ?>,
|
390 |
+
smoothHeight: <?php if($groups['smooth_height']==0) { echo 'false'; } else { echo 'true'; } ?>,
|
391 |
+
|
392 |
+
<?php if($vimeo || $youtube) { ?>
|
393 |
+
video: true,
|
394 |
+
<?php } ?>
|
395 |
+
|
396 |
+
<?php if($groups['slider_type']== "bas-caro") { ?>
|
397 |
+
sync: "#carousel-<?php echo $groups['slidergroup_id']; ?>",
|
398 |
+
<?php } ?>
|
399 |
+
|
400 |
+
<?php if($vimeo) { ?>
|
401 |
+
before: function(slider){
|
402 |
+
$f(player).api('pause');
|
403 |
+
|
404 |
+
},
|
405 |
+
<?php } ?>
|
406 |
+
|
407 |
+
<?php if($youtube) { ?>
|
408 |
+
after: function(slider) {
|
409 |
+
|
410 |
+
createPlayers(slider);
|
411 |
+
|
412 |
+
},
|
413 |
+
before: function(slider) {
|
414 |
+
for (key in players) {
|
415 |
+
|
416 |
+
players[key].pauseVideo();
|
417 |
+
|
418 |
+
|
419 |
+
}
|
420 |
+
<?php if($vimeo) { ?>
|
421 |
+
$f(player).api('pause');
|
422 |
+
<?php } ?>
|
423 |
+
},
|
424 |
+
start: function(slider) {
|
425 |
+
|
426 |
+
createPlayers(slider);
|
427 |
+
|
428 |
+
jQuery('.slider').removeClass('loading');
|
429 |
+
|
430 |
+
},
|
431 |
+
<?php } else { ?>
|
432 |
+
start: function(slider){
|
433 |
+
jQuery('.slider').removeClass('loading');
|
434 |
+
|
435 |
+
<?php if($this->getLazylaod()) { ?>
|
436 |
+
jQuery(slider).find("img.cwslazy").slice(0,2).each(function () {
|
437 |
+
var src = jQuery(this).attr("data-src");
|
438 |
+
jQuery(this).attr("src", src).removeAttr("data-src").removeClass("cwslazy");
|
439 |
+
});
|
440 |
+
<?php } ?>
|
441 |
+
|
442 |
+
},
|
443 |
+
|
444 |
+
<?php if($this->getLazylaod()) { ?>
|
445 |
+
before: function (slider) {
|
446 |
+
|
447 |
+
var slide = jQuery(slider).find('.slides').children().eq(slider.animatingTo+1).find('img');
|
448 |
+
var src = slide.attr("data-src");
|
449 |
+
slide.attr("src", src).removeAttr("data-src").removeClass("cwslazy");
|
450 |
+
},
|
451 |
+
<?php } ?>
|
452 |
+
<?php } ?>
|
453 |
+
navarrow : "<?php echo $navarrow; ?>",
|
454 |
+
navstyle : "<?php echo $navstyle; ?>",
|
455 |
+
showpage : "<?php echo $showpage; ?>",
|
456 |
+
pagestyle : "<?php echo $pagestyle; ?>",
|
457 |
+
pagepos : "<?php echo $pagepos; ?>",
|
458 |
+
|
459 |
+
});
|
460 |
+
|
461 |
+
<?php if($youtube) { ?>
|
462 |
+
clearTimeout(timeout);
|
463 |
+
} else {
|
464 |
+
var timeout = setTimeout(loadSlider, 1000);
|
465 |
+
}
|
466 |
+
}
|
467 |
+
<?php } ?>
|
468 |
+
|
469 |
+
<?php if($vimeo) { ?>
|
470 |
+
var player = document.getElementById('player_<?php echo $groups['slidergroup_id']; ?>');
|
471 |
+
|
472 |
+
$f(player).addEvent('ready', ready);
|
473 |
+
|
474 |
+
function addEvent(element, eventName, callback) {
|
475 |
+
|
476 |
+
(element.addEventListener) ? element.addEventListener(eventName, callback, false) : element.attachEvent(eventName, callback, false);
|
477 |
+
}
|
478 |
+
|
479 |
+
function ready(player_id) {
|
480 |
+
var froogaloop = $f(player_id);
|
481 |
+
|
482 |
+
froogaloop.addEvent('play', function(data) {
|
483 |
+
|
484 |
+
jQuery('#rwdSlider-<?php echo $groups['slidergroup_id']; ?>').flexslider("pause");
|
485 |
+
});
|
486 |
+
|
487 |
+
froogaloop.addEvent('pause', function(data) {
|
488 |
+
jQuery('#rwdSlider-<?php echo $groups['slidergroup_id']; ?>').flexslider("play");
|
489 |
+
});
|
490 |
+
}
|
491 |
+
<?php } ?>
|
492 |
+
|
493 |
+
<?php if($youtube) { ?>
|
494 |
+
var players = {};
|
495 |
+
|
496 |
+
function createPlayers(slider) {
|
497 |
+
var playtimer = [];
|
498 |
+
(function(jQuery) {
|
499 |
+
jQuery("#rwdSlider-<?php echo $groups['slidergroup_id']; ?> li.video iframe.youtube").each(function(index) {
|
500 |
+
var frameID = this.id;
|
501 |
+
|
502 |
+
|
503 |
+
if (frameID) {
|
504 |
+
|
505 |
+
if (!(frameID in players)) {
|
506 |
+
|
507 |
+
if (jQuery(this).parents('.cws-active-slide').length > 0) {
|
508 |
+
|
509 |
+
players[frameID] = new YT.Player(frameID, {
|
510 |
+
events: {
|
511 |
+
"onStateChange": function(event) {
|
512 |
+
|
513 |
+
if(event.data == 1 || event.data == 3) {
|
514 |
+
slider.flexslider('pause');
|
515 |
+
for (var i=0; i<playtimer.length; i++) {
|
516 |
+
clearTimeout(playtimer[i]);
|
517 |
+
}
|
518 |
+
playtimer = [];
|
519 |
+
|
520 |
+
} else {
|
521 |
+
|
522 |
+
playtimer.push(setTimeout(function(){
|
523 |
+
slider.flexslider('play');
|
524 |
+
|
525 |
+
}, 2000));
|
526 |
+
}
|
527 |
+
}
|
528 |
+
}
|
529 |
+
});
|
530 |
+
}
|
531 |
+
}
|
532 |
+
}
|
533 |
+
});
|
534 |
+
}) (jQuery);
|
535 |
+
}
|
536 |
+
|
537 |
+
<?php } ?>
|
538 |
+
<?php } ?>
|
539 |
+
});
|
540 |
+
</script>
|
541 |
+
<?php } ?>
|
542 |
+
<?php } ?>
|
543 |
+
<?php } ?>
|
app/etc/modules/CapacityWebSolutions_Responsivebannerslider.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<CapacityWebSolutions_Responsivebannerslider>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</CapacityWebSolutions_Responsivebannerslider>
|
8 |
+
</modules>
|
9 |
+
</config>
|
js/responsivebannerslider/froogaloop.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
var Froogaloop=function(){function e(c){return new e.fn.init(c)}function g(c,b,a){if(!a.contentWindow.postMessage)return!1;var d=a.getAttribute("src").split("?")[0],c=JSON.stringify({method:c,value:b});a.contentWindow.postMessage(c,d)}function i(c){var b,a;try{b=JSON.parse(c.data),a=b.event||b.method}catch(l){}"ready"==a&&!h&&(h=!0);if(c.origin!=j)return!1;var c=b.value,e=b.data,f=""===f?null:b.player_id;b=f?d[f][a]:d[a];a=[];if(!b)return!1;void 0!==c&&a.push(c);e&&a.push(e);f&&a.push(f);return 0<
|
2 |
+
a.length?b.apply(null,a):b.call()}function k(c,b,a){a?(d[a]||(d[a]={}),d[a][c]=b):d[c]=b}var d={},h=!1,j="";e.fn=e.prototype={element:null,init:function(c){"string"===typeof c&&(c=document.getElementById(c));this.element=c;for(var c=this.element.getAttribute("src").split("/"),b="",a=0,d=c.length;a<d;a++){if(3>a)b+=c[a];else break;2>a&&(b+="/")}j=b;return this},api:function(c,b){if(!this.element||!c)return!1;var a=this.element,d=""!==a.id?a.id:null,e=!b||!b.constructor||!b.call||!b.apply?b:null,f=
|
3 |
+
b&&b.constructor&&b.call&&b.apply?b:null;f&&k(c,f,d);g(c,e,a);return this},addEvent:function(c,b){if(!this.element)return!1;var a=this.element,d=""!==a.id?a.id:null;k(c,b,d);"ready"!=c?g("addEventListener",c,a):"ready"==c&&h&&b.call(null,d);return this},removeEvent:function(c){if(!this.element)return!1;var b=this.element,a;a:{if((a=""!==b.id?b.id:null)&&d[a]){if(!d[a][c]){a=!1;break a}d[a][c]=null}else{if(!d[c]){a=!1;break a}d[c]=null}a=!0}"ready"!=c&&a&&g("removeEventListener",c,b)}};e.fn.init.prototype=
|
4 |
+
e.fn;window.addEventListener?window.addEventListener("message",i,!1):window.attachEvent("onmessage",i,!1);return window.Froogaloop=window.$f=e}();
|
js/responsivebannerslider/jquery.easing.js
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/***************************************************************************
|
2 |
+
@extension : Responsive Banner Slider Extension.
|
3 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
4 |
+
( http://www.capacitywebsolutions.com )
|
5 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
6 |
+
@support : magento@capacitywebsolutions.com
|
7 |
+
***************************************************************************/
|
8 |
+
|
9 |
+
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
10 |
+
|
11 |
+
jQuery.extend( jQuery.easing,
|
12 |
+
{
|
13 |
+
def: 'easeOutQuad',
|
14 |
+
swing: function (x, t, b, c, d) {
|
15 |
+
//alert(jQuery.easing.default);
|
16 |
+
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
17 |
+
},
|
18 |
+
easeInQuad: function (x, t, b, c, d) {
|
19 |
+
return c*(t/=d)*t + b;
|
20 |
+
},
|
21 |
+
easeOutQuad: function (x, t, b, c, d) {
|
22 |
+
return -c *(t/=d)*(t-2) + b;
|
23 |
+
},
|
24 |
+
easeInOutQuad: function (x, t, b, c, d) {
|
25 |
+
if ((t/=d/2) < 1) return c/2*t*t + b;
|
26 |
+
return -c/2 * ((--t)*(t-2) - 1) + b;
|
27 |
+
},
|
28 |
+
easeInCubic: function (x, t, b, c, d) {
|
29 |
+
return c*(t/=d)*t*t + b;
|
30 |
+
},
|
31 |
+
easeOutCubic: function (x, t, b, c, d) {
|
32 |
+
return c*((t=t/d-1)*t*t + 1) + b;
|
33 |
+
},
|
34 |
+
easeInOutCubic: function (x, t, b, c, d) {
|
35 |
+
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
36 |
+
return c/2*((t-=2)*t*t + 2) + b;
|
37 |
+
},
|
38 |
+
easeInQuart: function (x, t, b, c, d) {
|
39 |
+
return c*(t/=d)*t*t*t + b;
|
40 |
+
},
|
41 |
+
easeOutQuart: function (x, t, b, c, d) {
|
42 |
+
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
43 |
+
},
|
44 |
+
easeInOutQuart: function (x, t, b, c, d) {
|
45 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
46 |
+
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
47 |
+
},
|
48 |
+
easeInQuint: function (x, t, b, c, d) {
|
49 |
+
return c*(t/=d)*t*t*t*t + b;
|
50 |
+
},
|
51 |
+
easeOutQuint: function (x, t, b, c, d) {
|
52 |
+
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
53 |
+
},
|
54 |
+
easeInOutQuint: function (x, t, b, c, d) {
|
55 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
56 |
+
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
57 |
+
},
|
58 |
+
easeInSine: function (x, t, b, c, d) {
|
59 |
+
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
60 |
+
},
|
61 |
+
easeOutSine: function (x, t, b, c, d) {
|
62 |
+
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
63 |
+
},
|
64 |
+
easeInOutSine: function (x, t, b, c, d) {
|
65 |
+
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
66 |
+
},
|
67 |
+
easeInExpo: function (x, t, b, c, d) {
|
68 |
+
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
69 |
+
},
|
70 |
+
easeOutExpo: function (x, t, b, c, d) {
|
71 |
+
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
72 |
+
},
|
73 |
+
easeInOutExpo: function (x, t, b, c, d) {
|
74 |
+
if (t==0) return b;
|
75 |
+
if (t==d) return b+c;
|
76 |
+
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
77 |
+
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
78 |
+
},
|
79 |
+
easeInCirc: function (x, t, b, c, d) {
|
80 |
+
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
81 |
+
},
|
82 |
+
easeOutCirc: function (x, t, b, c, d) {
|
83 |
+
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
84 |
+
},
|
85 |
+
easeInOutCirc: function (x, t, b, c, d) {
|
86 |
+
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
87 |
+
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
88 |
+
},
|
89 |
+
easeInElastic: function (x, t, b, c, d) {
|
90 |
+
var s=1.70158;var p=0;var a=c;
|
91 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
92 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
93 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
94 |
+
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
95 |
+
},
|
96 |
+
easeOutElastic: function (x, t, b, c, d) {
|
97 |
+
var s=1.70158;var p=0;var a=c;
|
98 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
99 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
100 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
101 |
+
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
102 |
+
},
|
103 |
+
easeInOutElastic: function (x, t, b, c, d) {
|
104 |
+
var s=1.70158;var p=0;var a=c;
|
105 |
+
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
106 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
107 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
108 |
+
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
109 |
+
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
110 |
+
},
|
111 |
+
easeInBack: function (x, t, b, c, d, s) {
|
112 |
+
if (s == undefined) s = 1.70158;
|
113 |
+
return c*(t/=d)*t*((s+1)*t - s) + b;
|
114 |
+
},
|
115 |
+
easeOutBack: function (x, t, b, c, d, s) {
|
116 |
+
if (s == undefined) s = 1.70158;
|
117 |
+
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
118 |
+
},
|
119 |
+
easeInOutBack: function (x, t, b, c, d, s) {
|
120 |
+
if (s == undefined) s = 1.70158;
|
121 |
+
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
122 |
+
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
123 |
+
},
|
124 |
+
easeInBounce: function (x, t, b, c, d) {
|
125 |
+
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
126 |
+
},
|
127 |
+
easeOutBounce: function (x, t, b, c, d) {
|
128 |
+
if ((t/=d) < (1/2.75)) {
|
129 |
+
return c*(7.5625*t*t) + b;
|
130 |
+
} else if (t < (2/2.75)) {
|
131 |
+
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
132 |
+
} else if (t < (2.5/2.75)) {
|
133 |
+
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
134 |
+
} else {
|
135 |
+
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
136 |
+
}
|
137 |
+
},
|
138 |
+
easeInOutBounce: function (x, t, b, c, d) {
|
139 |
+
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
140 |
+
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
141 |
+
}
|
142 |
+
});
|
143 |
+
|
144 |
+
/*
|
145 |
+
*
|
146 |
+
* TERMS OF USE - EASING EQUATIONS
|
147 |
+
*
|
148 |
+
* Open source under the BSD License.
|
149 |
+
*
|
150 |
+
* Copyright © 2001 Robert Penner
|
151 |
+
* All rights reserved.
|
152 |
+
*
|
153 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
154 |
+
* are permitted provided that the following conditions are met:
|
155 |
+
*
|
156 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
157 |
+
* conditions and the following disclaimer.
|
158 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
159 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
160 |
+
* provided with the distribution.
|
161 |
+
*
|
162 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
163 |
+
* or promote products derived from this software without specific prior written permission.
|
164 |
+
*
|
165 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
166 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
167 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
168 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
169 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
170 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
171 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
172 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
173 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
174 |
+
*
|
175 |
+
*/
|
js/responsivebannerslider/jquery.fitvid.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
|
2 |
+
(function(a){a.fn.fitVids=function(b){var c={customSelector:null},d=document.createElement("div"),e=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];return d.className="fit-vids-style",d.innerHTML="­<style> .fluid-width-video-wrapper { width: 100%; position: relative; padding: 0; } .fluid-width-video-wrapper iframe, .fluid-width-video-wrapper object, .fluid-width-video-wrapper embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } </style>",e.parentNode.insertBefore(d,e),b&&a.extend(c,b),this.each(function(){var b=["iframe[src^='http://player.vimeo.com']","iframe[src^='http://www.youtube.com']","iframe[src^='https://www.youtube.com']","iframe[src^='http://www.kickstarter.com']","iframe[src^='http://fast.wistia.com']","object","embed"];c.customSelector&&b.push(c.customSelector);var d=a(this).find(b.join(","));d.each(function(){var b=a(this);if(this.tagName.toLowerCase()=="embed"&&b.parent("object").length||b.parent(".fluid-width-video-wrapper").length)return;var c=this.tagName.toLowerCase()=="object"?b.attr("height"):b.height(),d=c/b.width();if(!b.attr("id")){var e="fitvid"+Math.floor(Math.random()*999999);b.attr("id",e)}b.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",d*100+"%"),b.removeAttr("height").removeAttr("width")})})}})(jQuery)
|
js/responsivebannerslider/jquery.flexslider.js
ADDED
@@ -0,0 +1,1165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
;
|
3 |
+
(function ($) {
|
4 |
+
|
5 |
+
//FlexSlider: Object Instance
|
6 |
+
$.flexslider = function(el, options) {
|
7 |
+
|
8 |
+
var slider = $(el);
|
9 |
+
|
10 |
+
// making variables public
|
11 |
+
slider.vars = $.extend({}, $.flexslider.defaults, options);
|
12 |
+
|
13 |
+
var namespace = slider.vars.namespace,
|
14 |
+
|
15 |
+
msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
|
16 |
+
touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
|
17 |
+
// depricating this idea, as devices are being released with both of these events
|
18 |
+
//eventType = (touch) ? "touchend" : "click",
|
19 |
+
eventType = "click touchend MSPointerUp keyup",
|
20 |
+
watchedEvent = "",
|
21 |
+
watchedEventClearTimer,
|
22 |
+
vertical = slider.vars.direction === "vertical",
|
23 |
+
reverse = slider.vars.reverse,
|
24 |
+
carousel = (slider.vars.itemWidth > 0),
|
25 |
+
fade = slider.vars.animation === "fade",
|
26 |
+
asNav = slider.vars.asNavFor !== "",
|
27 |
+
methods = {},
|
28 |
+
focused = true;
|
29 |
+
// alert (slider.vars.test);
|
30 |
+
|
31 |
+
/* Start default cws class */
|
32 |
+
var navarrow = slider.vars.navarrow;
|
33 |
+
var navstyle = slider.vars.navstyle;
|
34 |
+
var showpage = slider.vars.showpage;
|
35 |
+
var pagestyle = slider.vars.pagestyle;
|
36 |
+
var pagepos = slider.vars.pagepos;
|
37 |
+
|
38 |
+
/* End default cws class */
|
39 |
+
|
40 |
+
// Store a reference to the slider object
|
41 |
+
$.data(el, "flexslider", slider);
|
42 |
+
|
43 |
+
// Private slider methods
|
44 |
+
methods = {
|
45 |
+
init: function() {
|
46 |
+
slider.animating = false;
|
47 |
+
// Get current slide and make sure it is a number
|
48 |
+
slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 );
|
49 |
+
if ( isNaN( slider.currentSlide ) ) slider.currentSlide = 0;
|
50 |
+
slider.animatingTo = slider.currentSlide;
|
51 |
+
slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
|
52 |
+
slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
|
53 |
+
slider.slides = $(slider.vars.selector, slider);
|
54 |
+
slider.container = $(slider.containerSelector, slider);
|
55 |
+
slider.count = slider.slides.length;
|
56 |
+
// SYNC:
|
57 |
+
slider.syncExists = $(slider.vars.sync).length > 0;
|
58 |
+
// SLIDE:
|
59 |
+
if (slider.vars.animation === "slide") slider.vars.animation = "swing";
|
60 |
+
slider.prop = (vertical) ? "top" : "marginLeft";
|
61 |
+
slider.args = {};
|
62 |
+
// SLIDESHOW:
|
63 |
+
slider.manualPause = false;
|
64 |
+
slider.stopped = false;
|
65 |
+
//PAUSE WHEN INVISIBLE
|
66 |
+
slider.started = false;
|
67 |
+
slider.startTimeout = null;
|
68 |
+
// TOUCH/USECSS:
|
69 |
+
slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
|
70 |
+
var obj = document.createElement('div'),
|
71 |
+
props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
|
72 |
+
for (var i in props) {
|
73 |
+
if ( obj.style[ props[i] ] !== undefined ) {
|
74 |
+
slider.pfx = props[i].replace('Perspective','').toLowerCase();
|
75 |
+
slider.prop = "-" + slider.pfx + "-transform";
|
76 |
+
return true;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
return false;
|
80 |
+
}());
|
81 |
+
slider.ensureAnimationEnd = '';
|
82 |
+
// CONTROLSCONTAINER:
|
83 |
+
if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
|
84 |
+
// MANUAL:
|
85 |
+
if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);
|
86 |
+
|
87 |
+
// RANDOMIZE:
|
88 |
+
if (slider.vars.randomize) {
|
89 |
+
slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
|
90 |
+
slider.container.empty().append(slider.slides);
|
91 |
+
}
|
92 |
+
|
93 |
+
slider.doMath();
|
94 |
+
|
95 |
+
// INIT
|
96 |
+
slider.setup("init");
|
97 |
+
|
98 |
+
// CONTROLNAV:
|
99 |
+
if (slider.vars.controlNav) methods.controlNav.setup();
|
100 |
+
|
101 |
+
// DIRECTIONNAV:
|
102 |
+
if (slider.vars.directionNav) methods.directionNav.setup();
|
103 |
+
|
104 |
+
// KEYBOARD:
|
105 |
+
if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
|
106 |
+
$(document).bind('keyup', function(event) {
|
107 |
+
var keycode = event.keyCode;
|
108 |
+
if (!slider.animating && (keycode === 39 || keycode === 37)) {
|
109 |
+
var target = (keycode === 39) ? slider.getTarget('next') :
|
110 |
+
(keycode === 37) ? slider.getTarget('prev') : false;
|
111 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
112 |
+
}
|
113 |
+
});
|
114 |
+
}
|
115 |
+
// MOUSEWHEEL:
|
116 |
+
if (slider.vars.mousewheel) {
|
117 |
+
slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
|
118 |
+
event.preventDefault();
|
119 |
+
var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
120 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
121 |
+
});
|
122 |
+
}
|
123 |
+
|
124 |
+
// PAUSEPLAY
|
125 |
+
if (slider.vars.pausePlay) methods.pausePlay.setup();
|
126 |
+
|
127 |
+
//PAUSE WHEN INVISIBLE
|
128 |
+
if (slider.vars.slideshow && slider.vars.pauseInvisible) methods.pauseInvisible.init();
|
129 |
+
|
130 |
+
// SLIDSESHOW
|
131 |
+
if (slider.vars.slideshow) {
|
132 |
+
if (slider.vars.pauseOnHover) {
|
133 |
+
slider.hover(function() {
|
134 |
+
if (!slider.manualPlay && !slider.manualPause) slider.pause();
|
135 |
+
}, function() {
|
136 |
+
if (!slider.manualPause && !slider.manualPlay && !slider.stopped) slider.play();
|
137 |
+
});
|
138 |
+
}
|
139 |
+
// initialize animation
|
140 |
+
//If we're visible, or we don't use PageVisibility API
|
141 |
+
if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
|
142 |
+
(slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
// ASNAV:
|
147 |
+
if (asNav) methods.asNav.setup();
|
148 |
+
|
149 |
+
// TOUCH
|
150 |
+
if (touch && slider.vars.touch) methods.touch();
|
151 |
+
|
152 |
+
// FADE&&SMOOTHHEIGHT || SLIDE:
|
153 |
+
if (!fade || (fade && slider.vars.smoothHeight)) $(window).bind("resize orientationchange focus", methods.resize);
|
154 |
+
|
155 |
+
slider.find("img").attr("draggable", "false");
|
156 |
+
|
157 |
+
// API: start() Callback
|
158 |
+
setTimeout(function(){
|
159 |
+
slider.vars.start(slider);
|
160 |
+
}, 200);
|
161 |
+
},
|
162 |
+
asNav: {
|
163 |
+
setup: function() {
|
164 |
+
slider.asNav = true;
|
165 |
+
slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
|
166 |
+
slider.currentItem = slider.currentSlide;
|
167 |
+
slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
|
168 |
+
if(!msGesture){
|
169 |
+
slider.slides.on(eventType, function(e){
|
170 |
+
e.preventDefault();
|
171 |
+
var $slide = $(this),
|
172 |
+
target = $slide.index();
|
173 |
+
var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
|
174 |
+
if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
|
175 |
+
slider.flexAnimate(slider.getTarget("prev"), true);
|
176 |
+
} else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
|
177 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
178 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
|
179 |
+
}
|
180 |
+
});
|
181 |
+
}else{
|
182 |
+
el._slider = slider;
|
183 |
+
slider.slides.each(function (){
|
184 |
+
var that = this;
|
185 |
+
that._gesture = new MSGesture();
|
186 |
+
that._gesture.target = that;
|
187 |
+
that.addEventListener("MSPointerDown", function (e){
|
188 |
+
e.preventDefault();
|
189 |
+
if(e.currentTarget._gesture)
|
190 |
+
e.currentTarget._gesture.addPointer(e.pointerId);
|
191 |
+
}, false);
|
192 |
+
that.addEventListener("MSGestureTap", function (e){
|
193 |
+
e.preventDefault();
|
194 |
+
var $slide = $(this),
|
195 |
+
target = $slide.index();
|
196 |
+
if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
|
197 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
198 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
|
199 |
+
}
|
200 |
+
});
|
201 |
+
});
|
202 |
+
}
|
203 |
+
}
|
204 |
+
},
|
205 |
+
controlNav: {
|
206 |
+
setup: function() {
|
207 |
+
if (!slider.manualControls) {
|
208 |
+
methods.controlNav.setupPaging();
|
209 |
+
} else { // MANUALCONTROLS:
|
210 |
+
methods.controlNav.setupManual();
|
211 |
+
}
|
212 |
+
},
|
213 |
+
setupPaging: function() {
|
214 |
+
var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
|
215 |
+
j = 1,
|
216 |
+
item,
|
217 |
+
slide;
|
218 |
+
|
219 |
+
slider.controlNavScaffold = $('<ol class="'+ namespace + 'pager ' + namespace + type + ' '+ pagestyle +'"></ol>');
|
220 |
+
|
221 |
+
if (slider.pagingCount > 1) {
|
222 |
+
for (var i = 0; i < slider.pagingCount; i++) {
|
223 |
+
slide = slider.slides.eq(i);
|
224 |
+
item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>';
|
225 |
+
if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
|
226 |
+
var captn = slide.attr( 'data-thumbcaption' );
|
227 |
+
if ( '' != captn && undefined != captn ) item += '<span class="' + namespace + 'caption">' + captn + '</span>';
|
228 |
+
}
|
229 |
+
slider.controlNavScaffold.append('<li>' + item + '</li>');
|
230 |
+
j++;
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
// CONTROLSCONTAINER:
|
235 |
+
(slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
|
236 |
+
methods.controlNav.set();
|
237 |
+
|
238 |
+
methods.controlNav.active();
|
239 |
+
|
240 |
+
slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
|
241 |
+
event.preventDefault();
|
242 |
+
|
243 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
244 |
+
var $this = $(this),
|
245 |
+
target = slider.controlNav.index($this);
|
246 |
+
|
247 |
+
if (!$this.hasClass(namespace + 'active')) {
|
248 |
+
slider.direction = (target > slider.currentSlide) ? "next" : "prev";
|
249 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
// setup flags to prevent event duplication
|
254 |
+
if (watchedEvent === "") {
|
255 |
+
watchedEvent = event.type;
|
256 |
+
}
|
257 |
+
methods.setToClearWatchedEvent();
|
258 |
+
|
259 |
+
});
|
260 |
+
},
|
261 |
+
setupManual: function() {
|
262 |
+
slider.controlNav = slider.manualControls;
|
263 |
+
methods.controlNav.active();
|
264 |
+
|
265 |
+
slider.controlNav.bind(eventType, function(event) {
|
266 |
+
event.preventDefault();
|
267 |
+
|
268 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
269 |
+
var $this = $(this),
|
270 |
+
target = slider.controlNav.index($this);
|
271 |
+
|
272 |
+
if (!$this.hasClass(namespace + 'active')) {
|
273 |
+
(target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
|
274 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
// setup flags to prevent event duplication
|
279 |
+
if (watchedEvent === "") {
|
280 |
+
watchedEvent = event.type;
|
281 |
+
}
|
282 |
+
methods.setToClearWatchedEvent();
|
283 |
+
});
|
284 |
+
},
|
285 |
+
set: function() {
|
286 |
+
var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
|
287 |
+
slider.controlNav = $('.'+ namespace + 'pager li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
|
288 |
+
},
|
289 |
+
active: function() {
|
290 |
+
slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
|
291 |
+
},
|
292 |
+
update: function(action, pos) {
|
293 |
+
if (slider.pagingCount > 1 && action === "add") {
|
294 |
+
slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
|
295 |
+
} else if (slider.pagingCount === 1) {
|
296 |
+
slider.controlNavScaffold.find('li').remove();
|
297 |
+
} else {
|
298 |
+
slider.controlNav.eq(pos).closest('li').remove();
|
299 |
+
}
|
300 |
+
methods.controlNav.set();
|
301 |
+
(slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
|
302 |
+
}
|
303 |
+
},
|
304 |
+
directionNav: {
|
305 |
+
setup: function() {
|
306 |
+
var directionNavScaffold = $('<ul class="'+namespace+'arw '+navstyle+'"><li><a class="' + namespace + 'prev '+ navstyle +'" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next '+ navstyle +'" href="#">' + slider.vars.nextText + '</a></li></ul>');
|
307 |
+
|
308 |
+
// CONTROLSCONTAINER:
|
309 |
+
if (slider.controlsContainer) {
|
310 |
+
$(slider.controlsContainer).append(directionNavScaffold);
|
311 |
+
slider.directionNav = $('.'+namespace+'arw li a', slider.controlsContainer);
|
312 |
+
} else {
|
313 |
+
slider.append(directionNavScaffold);
|
314 |
+
slider.directionNav = $('.'+namespace+'arw li a', slider);
|
315 |
+
}
|
316 |
+
|
317 |
+
methods.directionNav.update();
|
318 |
+
|
319 |
+
slider.directionNav.bind(eventType, function(event) {
|
320 |
+
event.preventDefault();
|
321 |
+
var target;
|
322 |
+
|
323 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
324 |
+
target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
|
325 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
326 |
+
}
|
327 |
+
|
328 |
+
// setup flags to prevent event duplication
|
329 |
+
if (watchedEvent === "") {
|
330 |
+
watchedEvent = event.type;
|
331 |
+
}
|
332 |
+
methods.setToClearWatchedEvent();
|
333 |
+
});
|
334 |
+
},
|
335 |
+
update: function() {
|
336 |
+
var disabledClass = namespace + 'disabled';
|
337 |
+
if (slider.pagingCount === 1) {
|
338 |
+
slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
|
339 |
+
} else if (!slider.vars.animationLoop) {
|
340 |
+
if (slider.animatingTo === 0) {
|
341 |
+
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
|
342 |
+
} else if (slider.animatingTo === slider.last) {
|
343 |
+
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
|
344 |
+
} else {
|
345 |
+
slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
|
346 |
+
}
|
347 |
+
} else {
|
348 |
+
slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
|
349 |
+
}
|
350 |
+
}
|
351 |
+
},
|
352 |
+
pausePlay: {
|
353 |
+
setup: function() {
|
354 |
+
var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>');
|
355 |
+
|
356 |
+
// CONTROLSCONTAINER:
|
357 |
+
if (slider.controlsContainer) {
|
358 |
+
slider.controlsContainer.append(pausePlayScaffold);
|
359 |
+
slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
|
360 |
+
} else {
|
361 |
+
slider.append(pausePlayScaffold);
|
362 |
+
slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
|
363 |
+
}
|
364 |
+
|
365 |
+
methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
|
366 |
+
|
367 |
+
slider.pausePlay.bind(eventType, function(event) {
|
368 |
+
event.preventDefault();
|
369 |
+
|
370 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
371 |
+
if ($(this).hasClass(namespace + 'pause')) {
|
372 |
+
slider.manualPause = true;
|
373 |
+
slider.manualPlay = false;
|
374 |
+
slider.pause();
|
375 |
+
} else {
|
376 |
+
slider.manualPause = false;
|
377 |
+
slider.manualPlay = true;
|
378 |
+
slider.play();
|
379 |
+
}
|
380 |
+
}
|
381 |
+
|
382 |
+
// setup flags to prevent event duplication
|
383 |
+
if (watchedEvent === "") {
|
384 |
+
watchedEvent = event.type;
|
385 |
+
}
|
386 |
+
methods.setToClearWatchedEvent();
|
387 |
+
});
|
388 |
+
},
|
389 |
+
update: function(state) {
|
390 |
+
(state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
|
391 |
+
}
|
392 |
+
},
|
393 |
+
touch: function() {
|
394 |
+
var startX,
|
395 |
+
startY,
|
396 |
+
offset,
|
397 |
+
cwidth,
|
398 |
+
dx,
|
399 |
+
startT,
|
400 |
+
scrolling = false,
|
401 |
+
localX = 0,
|
402 |
+
localY = 0,
|
403 |
+
accDx = 0;
|
404 |
+
|
405 |
+
if(!msGesture){
|
406 |
+
el.addEventListener('touchstart', onTouchStart, false);
|
407 |
+
|
408 |
+
function onTouchStart(e) {
|
409 |
+
if (slider.animating) {
|
410 |
+
e.preventDefault();
|
411 |
+
} else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
|
412 |
+
slider.pause();
|
413 |
+
// CAROUSEL:
|
414 |
+
cwidth = (vertical) ? slider.h : slider. w;
|
415 |
+
startT = Number(new Date());
|
416 |
+
// CAROUSEL:
|
417 |
+
|
418 |
+
// Local vars for X and Y points.
|
419 |
+
localX = e.touches[0].pageX;
|
420 |
+
localY = e.touches[0].pageY;
|
421 |
+
|
422 |
+
offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
|
423 |
+
(carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
424 |
+
(carousel && slider.currentSlide === slider.last) ? slider.limit :
|
425 |
+
(carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
|
426 |
+
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
|
427 |
+
startX = (vertical) ? localY : localX;
|
428 |
+
startY = (vertical) ? localX : localY;
|
429 |
+
|
430 |
+
el.addEventListener('touchmove', onTouchMove, false);
|
431 |
+
el.addEventListener('touchend', onTouchEnd, false);
|
432 |
+
}
|
433 |
+
}
|
434 |
+
|
435 |
+
function onTouchMove(e) {
|
436 |
+
// Local vars for X and Y points.
|
437 |
+
|
438 |
+
localX = e.touches[0].pageX;
|
439 |
+
localY = e.touches[0].pageY;
|
440 |
+
|
441 |
+
dx = (vertical) ? startX - localY : startX - localX;
|
442 |
+
scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
|
443 |
+
|
444 |
+
var fxms = 500;
|
445 |
+
|
446 |
+
if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
|
447 |
+
e.preventDefault();
|
448 |
+
if (!fade && slider.transitions) {
|
449 |
+
if (!slider.vars.animationLoop) {
|
450 |
+
dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
|
451 |
+
}
|
452 |
+
slider.setProps(offset + dx, "setTouch");
|
453 |
+
}
|
454 |
+
}
|
455 |
+
}
|
456 |
+
|
457 |
+
function onTouchEnd(e) {
|
458 |
+
// finish the touch by undoing the touch session
|
459 |
+
el.removeEventListener('touchmove', onTouchMove, false);
|
460 |
+
|
461 |
+
if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
|
462 |
+
var updateDx = (reverse) ? -dx : dx,
|
463 |
+
target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
464 |
+
|
465 |
+
if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
|
466 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
467 |
+
} else {
|
468 |
+
if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
|
469 |
+
}
|
470 |
+
}
|
471 |
+
el.removeEventListener('touchend', onTouchEnd, false);
|
472 |
+
|
473 |
+
startX = null;
|
474 |
+
startY = null;
|
475 |
+
dx = null;
|
476 |
+
offset = null;
|
477 |
+
}
|
478 |
+
}else{
|
479 |
+
el.style.msTouchAction = "none";
|
480 |
+
el._gesture = new MSGesture();
|
481 |
+
el._gesture.target = el;
|
482 |
+
el.addEventListener("MSPointerDown", onMSPointerDown, false);
|
483 |
+
el._slider = slider;
|
484 |
+
el.addEventListener("MSGestureChange", onMSGestureChange, false);
|
485 |
+
el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
|
486 |
+
|
487 |
+
function onMSPointerDown(e){
|
488 |
+
e.stopPropagation();
|
489 |
+
if (slider.animating) {
|
490 |
+
e.preventDefault();
|
491 |
+
}else{
|
492 |
+
slider.pause();
|
493 |
+
el._gesture.addPointer(e.pointerId);
|
494 |
+
accDx = 0;
|
495 |
+
cwidth = (vertical) ? slider.h : slider. w;
|
496 |
+
startT = Number(new Date());
|
497 |
+
// CAROUSEL:
|
498 |
+
|
499 |
+
offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
|
500 |
+
(carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
501 |
+
(carousel && slider.currentSlide === slider.last) ? slider.limit :
|
502 |
+
(carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
|
503 |
+
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
|
504 |
+
}
|
505 |
+
}
|
506 |
+
|
507 |
+
function onMSGestureChange(e) {
|
508 |
+
e.stopPropagation();
|
509 |
+
var slider = e.target._slider;
|
510 |
+
if(!slider){
|
511 |
+
return;
|
512 |
+
}
|
513 |
+
var transX = -e.translationX,
|
514 |
+
transY = -e.translationY;
|
515 |
+
|
516 |
+
//Accumulate translations.
|
517 |
+
accDx = accDx + ((vertical) ? transY : transX);
|
518 |
+
dx = accDx;
|
519 |
+
scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
|
520 |
+
|
521 |
+
if(e.detail === e.MSGESTURE_FLAG_INERTIA){
|
522 |
+
setImmediate(function (){
|
523 |
+
el._gesture.stop();
|
524 |
+
});
|
525 |
+
|
526 |
+
return;
|
527 |
+
}
|
528 |
+
|
529 |
+
if (!scrolling || Number(new Date()) - startT > 500) {
|
530 |
+
e.preventDefault();
|
531 |
+
if (!fade && slider.transitions) {
|
532 |
+
if (!slider.vars.animationLoop) {
|
533 |
+
dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
|
534 |
+
}
|
535 |
+
slider.setProps(offset + dx, "setTouch");
|
536 |
+
}
|
537 |
+
}
|
538 |
+
}
|
539 |
+
|
540 |
+
function onMSGestureEnd(e) {
|
541 |
+
e.stopPropagation();
|
542 |
+
var slider = e.target._slider;
|
543 |
+
if(!slider){
|
544 |
+
return;
|
545 |
+
}
|
546 |
+
if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
|
547 |
+
var updateDx = (reverse) ? -dx : dx,
|
548 |
+
target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
549 |
+
|
550 |
+
if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
|
551 |
+
slider.flexAnimate(target, slider.vars.pauseOnAction);
|
552 |
+
} else {
|
553 |
+
if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
|
554 |
+
}
|
555 |
+
}
|
556 |
+
|
557 |
+
startX = null;
|
558 |
+
startY = null;
|
559 |
+
dx = null;
|
560 |
+
offset = null;
|
561 |
+
accDx = 0;
|
562 |
+
}
|
563 |
+
}
|
564 |
+
},
|
565 |
+
resize: function() {
|
566 |
+
if (!slider.animating && slider.is(':visible')) {
|
567 |
+
if (!carousel) slider.doMath();
|
568 |
+
|
569 |
+
if (fade) {
|
570 |
+
// SMOOTH HEIGHT:
|
571 |
+
methods.smoothHeight();
|
572 |
+
} else if (carousel) { //CAROUSEL:
|
573 |
+
slider.slides.width(slider.computedW);
|
574 |
+
slider.update(slider.pagingCount);
|
575 |
+
slider.setProps();
|
576 |
+
}
|
577 |
+
else if (vertical) { //VERTICAL:
|
578 |
+
slider.viewport.height(slider.h);
|
579 |
+
slider.setProps(slider.h, "setTotal");
|
580 |
+
} else {
|
581 |
+
// SMOOTH HEIGHT:
|
582 |
+
if (slider.vars.smoothHeight) methods.smoothHeight();
|
583 |
+
slider.newSlides.width(slider.computedW);
|
584 |
+
slider.setProps(slider.computedW, "setTotal");
|
585 |
+
}
|
586 |
+
}
|
587 |
+
},
|
588 |
+
smoothHeight: function(dur) {
|
589 |
+
if (!vertical || fade) {
|
590 |
+
var $obj = (fade) ? slider : slider.viewport;
|
591 |
+
(dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
|
592 |
+
}
|
593 |
+
},
|
594 |
+
sync: function(action) {
|
595 |
+
var $obj = $(slider.vars.sync).data("flexslider"),
|
596 |
+
target = slider.animatingTo;
|
597 |
+
|
598 |
+
switch (action) {
|
599 |
+
case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
|
600 |
+
case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
|
601 |
+
case "pause": $obj.pause(); break;
|
602 |
+
}
|
603 |
+
},
|
604 |
+
uniqueID: function($clone) {
|
605 |
+
// Append _clone to current level and children elements with id attributes
|
606 |
+
$clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
|
607 |
+
var $this = $(this);
|
608 |
+
$this.attr( 'id', $this.attr( 'id' ) + '_clone' );
|
609 |
+
});
|
610 |
+
return $clone;
|
611 |
+
},
|
612 |
+
pauseInvisible: {
|
613 |
+
visProp: null,
|
614 |
+
init: function() {
|
615 |
+
var prefixes = ['webkit','moz','ms','o'];
|
616 |
+
|
617 |
+
if ('hidden' in document) return 'hidden';
|
618 |
+
for (var i = 0; i < prefixes.length; i++) {
|
619 |
+
if ((prefixes[i] + 'Hidden') in document)
|
620 |
+
methods.pauseInvisible.visProp = prefixes[i] + 'Hidden';
|
621 |
+
}
|
622 |
+
if (methods.pauseInvisible.visProp) {
|
623 |
+
var evtname = methods.pauseInvisible.visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
|
624 |
+
document.addEventListener(evtname, function() {
|
625 |
+
if (methods.pauseInvisible.isHidden()) {
|
626 |
+
if(slider.startTimeout) clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
|
627 |
+
else slider.pause(); //Or just pause
|
628 |
+
}
|
629 |
+
else {
|
630 |
+
if(slider.started) slider.play(); //Initiated before, just play
|
631 |
+
else (slider.vars.initDelay > 0) ? setTimeout(slider.play, slider.vars.initDelay) : slider.play(); //Didn't init before: simply init or wait for it
|
632 |
+
}
|
633 |
+
});
|
634 |
+
}
|
635 |
+
},
|
636 |
+
isHidden: function() {
|
637 |
+
return document[methods.pauseInvisible.visProp] || false;
|
638 |
+
}
|
639 |
+
},
|
640 |
+
setToClearWatchedEvent: function() {
|
641 |
+
clearTimeout(watchedEventClearTimer);
|
642 |
+
watchedEventClearTimer = setTimeout(function() {
|
643 |
+
watchedEvent = "";
|
644 |
+
}, 3000);
|
645 |
+
}
|
646 |
+
};
|
647 |
+
|
648 |
+
// public methods
|
649 |
+
slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
|
650 |
+
if (!slider.vars.animationLoop && target !== slider.currentSlide) {
|
651 |
+
slider.direction = (target > slider.currentSlide) ? "next" : "prev";
|
652 |
+
}
|
653 |
+
|
654 |
+
if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
655 |
+
|
656 |
+
if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
|
657 |
+
if (asNav && withSync) {
|
658 |
+
var master = $(slider.vars.asNavFor).data('flexslider');
|
659 |
+
slider.atEnd = target === 0 || target === slider.count - 1;
|
660 |
+
master.flexAnimate(target, true, false, true, fromNav);
|
661 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
662 |
+
master.direction = slider.direction;
|
663 |
+
|
664 |
+
if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
|
665 |
+
slider.currentItem = target;
|
666 |
+
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
|
667 |
+
target = Math.floor(target/slider.visible);
|
668 |
+
} else {
|
669 |
+
slider.currentItem = target;
|
670 |
+
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
|
671 |
+
return false;
|
672 |
+
}
|
673 |
+
}
|
674 |
+
|
675 |
+
slider.animating = true;
|
676 |
+
slider.animatingTo = target;
|
677 |
+
|
678 |
+
// SLIDESHOW:
|
679 |
+
if (pause) slider.pause();
|
680 |
+
|
681 |
+
// API: before() animation Callback
|
682 |
+
slider.vars.before(slider);
|
683 |
+
|
684 |
+
// SYNC:
|
685 |
+
if (slider.syncExists && !fromNav) methods.sync("animate");
|
686 |
+
|
687 |
+
// CONTROLNAV
|
688 |
+
if (slider.vars.controlNav) methods.controlNav.active();
|
689 |
+
|
690 |
+
// !CAROUSEL:
|
691 |
+
// CANDIDATE: slide active class (for add/remove slide)
|
692 |
+
if (!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide');
|
693 |
+
|
694 |
+
// INFINITE LOOP:
|
695 |
+
// CANDIDATE: atEnd
|
696 |
+
slider.atEnd = target === 0 || target === slider.last;
|
697 |
+
|
698 |
+
// DIRECTIONNAV:
|
699 |
+
if (slider.vars.directionNav) methods.directionNav.update();
|
700 |
+
|
701 |
+
if (target === slider.last) {
|
702 |
+
// API: end() of cycle Callback
|
703 |
+
slider.vars.end(slider);
|
704 |
+
// SLIDESHOW && !INFINITE LOOP:
|
705 |
+
if (!slider.vars.animationLoop) slider.pause();
|
706 |
+
}
|
707 |
+
|
708 |
+
// SLIDE:
|
709 |
+
if (!fade) {
|
710 |
+
var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
|
711 |
+
margin, slideString, calcNext;
|
712 |
+
|
713 |
+
// INFINITE LOOP / REVERSE:
|
714 |
+
if (carousel) {
|
715 |
+
//margin = (slider.vars.itemWidth > slider.w) ? slider.vars.itemMargin * 2 : slider.vars.itemMargin;
|
716 |
+
margin = slider.vars.itemMargin;
|
717 |
+
calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
|
718 |
+
slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
|
719 |
+
} else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
|
720 |
+
slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
|
721 |
+
} else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
|
722 |
+
slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
|
723 |
+
} else {
|
724 |
+
slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
|
725 |
+
}
|
726 |
+
slider.setProps(slideString, "", slider.vars.animationSpeed);
|
727 |
+
if (slider.transitions) {
|
728 |
+
if (!slider.vars.animationLoop || !slider.atEnd) {
|
729 |
+
slider.animating = false;
|
730 |
+
slider.currentSlide = slider.animatingTo;
|
731 |
+
}
|
732 |
+
|
733 |
+
// Unbind previous transitionEnd events and re-bind new transitionEnd event
|
734 |
+
slider.container.unbind("webkitTransitionEnd transitionend");
|
735 |
+
slider.container.bind("webkitTransitionEnd transitionend", function() {
|
736 |
+
clearTimeout(slider.ensureAnimationEnd);
|
737 |
+
slider.wrapup(dimension);
|
738 |
+
});
|
739 |
+
|
740 |
+
// Insurance for the ever-so-fickle transitionEnd event
|
741 |
+
clearTimeout(slider.ensureAnimationEnd);
|
742 |
+
slider.ensureAnimationEnd = setTimeout(function() {
|
743 |
+
slider.wrapup(dimension);
|
744 |
+
}, slider.vars.animationSpeed + 100);
|
745 |
+
|
746 |
+
} else {
|
747 |
+
slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
|
748 |
+
slider.wrapup(dimension);
|
749 |
+
});
|
750 |
+
}
|
751 |
+
} else { // FADE:
|
752 |
+
if (!touch) {
|
753 |
+
//slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing);
|
754 |
+
//slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
|
755 |
+
|
756 |
+
slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
|
757 |
+
slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
|
758 |
+
|
759 |
+
} else {
|
760 |
+
slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
|
761 |
+
slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
|
762 |
+
slider.wrapup(dimension);
|
763 |
+
}
|
764 |
+
}
|
765 |
+
// SMOOTH HEIGHT:
|
766 |
+
if (slider.vars.smoothHeight) methods.smoothHeight(slider.vars.animationSpeed);
|
767 |
+
}
|
768 |
+
};
|
769 |
+
slider.wrapup = function(dimension) {
|
770 |
+
// SLIDE:
|
771 |
+
if (!fade && !carousel) {
|
772 |
+
if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
|
773 |
+
slider.setProps(dimension, "jumpEnd");
|
774 |
+
} else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
|
775 |
+
slider.setProps(dimension, "jumpStart");
|
776 |
+
}
|
777 |
+
}
|
778 |
+
slider.animating = false;
|
779 |
+
slider.currentSlide = slider.animatingTo;
|
780 |
+
// API: after() animation Callback
|
781 |
+
slider.vars.after(slider);
|
782 |
+
};
|
783 |
+
|
784 |
+
// SLIDESHOW:
|
785 |
+
slider.animateSlides = function() {
|
786 |
+
if (!slider.animating && focused ) slider.flexAnimate(slider.getTarget("next"));
|
787 |
+
};
|
788 |
+
// SLIDESHOW:
|
789 |
+
slider.pause = function() {
|
790 |
+
clearInterval(slider.animatedSlides);
|
791 |
+
slider.animatedSlides = null;
|
792 |
+
slider.playing = false;
|
793 |
+
// PAUSEPLAY:
|
794 |
+
if (slider.vars.pausePlay) methods.pausePlay.update("play");
|
795 |
+
// SYNC:
|
796 |
+
if (slider.syncExists) methods.sync("pause");
|
797 |
+
};
|
798 |
+
// SLIDESHOW:
|
799 |
+
slider.play = function() {
|
800 |
+
if (slider.playing) clearInterval(slider.animatedSlides);
|
801 |
+
slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
|
802 |
+
slider.started = slider.playing = true;
|
803 |
+
// PAUSEPLAY:
|
804 |
+
if (slider.vars.pausePlay) methods.pausePlay.update("pause");
|
805 |
+
// SYNC:
|
806 |
+
if (slider.syncExists) methods.sync("play");
|
807 |
+
};
|
808 |
+
// STOP:
|
809 |
+
slider.stop = function () {
|
810 |
+
slider.pause();
|
811 |
+
slider.stopped = true;
|
812 |
+
};
|
813 |
+
slider.canAdvance = function(target, fromNav) {
|
814 |
+
// ASNAV:
|
815 |
+
var last = (asNav) ? slider.pagingCount - 1 : slider.last;
|
816 |
+
return (fromNav) ? true :
|
817 |
+
(asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
|
818 |
+
(asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
|
819 |
+
(target === slider.currentSlide && !asNav) ? false :
|
820 |
+
(slider.vars.animationLoop) ? true :
|
821 |
+
(slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
|
822 |
+
(slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
|
823 |
+
true;
|
824 |
+
};
|
825 |
+
slider.getTarget = function(dir) {
|
826 |
+
slider.direction = dir;
|
827 |
+
if (dir === "next") {
|
828 |
+
return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
|
829 |
+
} else {
|
830 |
+
return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
|
831 |
+
}
|
832 |
+
};
|
833 |
+
|
834 |
+
// SLIDE:
|
835 |
+
slider.setProps = function(pos, special, dur) {
|
836 |
+
var target = (function() {
|
837 |
+
var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
|
838 |
+
posCalc = (function() {
|
839 |
+
if (carousel) {
|
840 |
+
return (special === "setTouch") ? pos :
|
841 |
+
(reverse && slider.animatingTo === slider.last) ? 0 :
|
842 |
+
(reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
843 |
+
(slider.animatingTo === slider.last) ? slider.limit : posCheck;
|
844 |
+
} else {
|
845 |
+
switch (special) {
|
846 |
+
case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
|
847 |
+
case "setTouch": return (reverse) ? pos : pos;
|
848 |
+
case "jumpEnd": return (reverse) ? pos : slider.count * pos;
|
849 |
+
case "jumpStart": return (reverse) ? slider.count * pos : pos;
|
850 |
+
default: return pos;
|
851 |
+
}
|
852 |
+
}
|
853 |
+
}());
|
854 |
+
|
855 |
+
return (posCalc * -1) + "px";
|
856 |
+
}());
|
857 |
+
|
858 |
+
if (slider.transitions) {
|
859 |
+
target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
|
860 |
+
dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
|
861 |
+
slider.container.css("-" + slider.pfx + "-transition-duration", dur);
|
862 |
+
slider.container.css("transition-duration", dur);
|
863 |
+
}
|
864 |
+
|
865 |
+
slider.args[slider.prop] = target;
|
866 |
+
if (slider.transitions || dur === undefined) slider.container.css(slider.args);
|
867 |
+
|
868 |
+
slider.container.css('transform',target);
|
869 |
+
};
|
870 |
+
|
871 |
+
slider.setup = function(type) {
|
872 |
+
// SLIDE:
|
873 |
+
if (!fade) {
|
874 |
+
var sliderOffset, arr;
|
875 |
+
|
876 |
+
if (type === "init") {
|
877 |
+
slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
|
878 |
+
// INFINITE LOOP:
|
879 |
+
slider.cloneCount = 0;
|
880 |
+
slider.cloneOffset = 0;
|
881 |
+
// REVERSE:
|
882 |
+
if (reverse) {
|
883 |
+
arr = $.makeArray(slider.slides).reverse();
|
884 |
+
slider.slides = $(arr);
|
885 |
+
slider.container.empty().append(slider.slides);
|
886 |
+
}
|
887 |
+
}
|
888 |
+
// INFINITE LOOP && !CAROUSEL:
|
889 |
+
if (slider.vars.animationLoop && !carousel) {
|
890 |
+
slider.cloneCount = 2;
|
891 |
+
slider.cloneOffset = 1;
|
892 |
+
// clear out old clones
|
893 |
+
if (type !== "init") slider.container.find('.clone').remove();
|
894 |
+
slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
|
895 |
+
.prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
|
896 |
+
}
|
897 |
+
slider.newSlides = $(slider.vars.selector, slider);
|
898 |
+
|
899 |
+
sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
|
900 |
+
// VERTICAL:
|
901 |
+
if (vertical && !carousel) {
|
902 |
+
slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
|
903 |
+
setTimeout(function(){
|
904 |
+
slider.newSlides.css({"display": "block"});
|
905 |
+
slider.doMath();
|
906 |
+
slider.viewport.height(slider.h);
|
907 |
+
slider.setProps(sliderOffset * slider.h, "init");
|
908 |
+
}, (type === "init") ? 100 : 0);
|
909 |
+
} else {
|
910 |
+
slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
|
911 |
+
slider.setProps(sliderOffset * slider.computedW, "init");
|
912 |
+
setTimeout(function(){
|
913 |
+
slider.doMath();
|
914 |
+
slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
|
915 |
+
// SMOOTH HEIGHT:
|
916 |
+
if (slider.vars.smoothHeight) methods.smoothHeight();
|
917 |
+
}, (type === "init") ? 100 : 0);
|
918 |
+
}
|
919 |
+
} else { // FADE:
|
920 |
+
slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
|
921 |
+
if (type === "init") {
|
922 |
+
if (!touch) {
|
923 |
+
//slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
|
924 |
+
if (slider.vars.fadeFirstSlide == false) {
|
925 |
+
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
|
926 |
+
} else {
|
927 |
+
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
|
928 |
+
}
|
929 |
+
} else {
|
930 |
+
slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
|
931 |
+
}
|
932 |
+
}
|
933 |
+
// SMOOTH HEIGHT:
|
934 |
+
if (slider.vars.smoothHeight) methods.smoothHeight();
|
935 |
+
}
|
936 |
+
// !CAROUSEL:
|
937 |
+
// CANDIDATE: active slide
|
938 |
+
if (!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide");
|
939 |
+
|
940 |
+
//FlexSlider: init() Callback
|
941 |
+
slider.vars.init(slider);
|
942 |
+
};
|
943 |
+
|
944 |
+
slider.doMath = function() {
|
945 |
+
var slide = slider.slides.first(),
|
946 |
+
slideMargin = slider.vars.itemMargin,
|
947 |
+
minItems = slider.vars.minItems,
|
948 |
+
maxItems = slider.vars.maxItems;
|
949 |
+
|
950 |
+
slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
|
951 |
+
slider.h = slide.height();
|
952 |
+
slider.boxPadding = slide.outerWidth() - slide.width();
|
953 |
+
|
954 |
+
// CAROUSEL:
|
955 |
+
if (carousel) {
|
956 |
+
slider.itemT = slider.vars.itemWidth + slideMargin;
|
957 |
+
slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
|
958 |
+
slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
|
959 |
+
slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
|
960 |
+
(slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
|
961 |
+
(slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
|
962 |
+
|
963 |
+
slider.visible = Math.floor(slider.w/(slider.itemW));
|
964 |
+
slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
|
965 |
+
slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
|
966 |
+
slider.last = slider.pagingCount - 1;
|
967 |
+
slider.limit = (slider.pagingCount === 1) ? 0 :
|
968 |
+
(slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
|
969 |
+
} else {
|
970 |
+
slider.itemW = slider.w;
|
971 |
+
slider.pagingCount = slider.count;
|
972 |
+
slider.last = slider.count - 1;
|
973 |
+
}
|
974 |
+
slider.computedW = slider.itemW - slider.boxPadding;
|
975 |
+
};
|
976 |
+
|
977 |
+
slider.update = function(pos, action) {
|
978 |
+
slider.doMath();
|
979 |
+
|
980 |
+
// update currentSlide and slider.animatingTo if necessary
|
981 |
+
if (!carousel) {
|
982 |
+
if (pos < slider.currentSlide) {
|
983 |
+
slider.currentSlide += 1;
|
984 |
+
} else if (pos <= slider.currentSlide && pos !== 0) {
|
985 |
+
slider.currentSlide -= 1;
|
986 |
+
}
|
987 |
+
slider.animatingTo = slider.currentSlide;
|
988 |
+
}
|
989 |
+
|
990 |
+
// update controlNav
|
991 |
+
if (slider.vars.controlNav && !slider.manualControls) {
|
992 |
+
if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
|
993 |
+
methods.controlNav.update("add");
|
994 |
+
} else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
|
995 |
+
if (carousel && slider.currentSlide > slider.last) {
|
996 |
+
slider.currentSlide -= 1;
|
997 |
+
slider.animatingTo -= 1;
|
998 |
+
}
|
999 |
+
methods.controlNav.update("remove", slider.last);
|
1000 |
+
}
|
1001 |
+
}
|
1002 |
+
// update directionNav
|
1003 |
+
if (slider.vars.directionNav) methods.directionNav.update();
|
1004 |
+
|
1005 |
+
};
|
1006 |
+
|
1007 |
+
slider.addSlide = function(obj, pos) {
|
1008 |
+
var $obj = $(obj);
|
1009 |
+
|
1010 |
+
slider.count += 1;
|
1011 |
+
slider.last = slider.count - 1;
|
1012 |
+
|
1013 |
+
// append new slide
|
1014 |
+
if (vertical && reverse) {
|
1015 |
+
(pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
|
1016 |
+
} else {
|
1017 |
+
(pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
// update currentSlide, animatingTo, controlNav, and directionNav
|
1021 |
+
slider.update(pos, "add");
|
1022 |
+
|
1023 |
+
// update slider.slides
|
1024 |
+
slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
|
1025 |
+
// re-setup the slider to accomdate new slide
|
1026 |
+
slider.setup();
|
1027 |
+
|
1028 |
+
//FlexSlider: added() Callback
|
1029 |
+
slider.vars.added(slider);
|
1030 |
+
};
|
1031 |
+
slider.removeSlide = function(obj) {
|
1032 |
+
var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
|
1033 |
+
|
1034 |
+
// update count
|
1035 |
+
slider.count -= 1;
|
1036 |
+
slider.last = slider.count - 1;
|
1037 |
+
|
1038 |
+
// remove slide
|
1039 |
+
if (isNaN(obj)) {
|
1040 |
+
$(obj, slider.slides).remove();
|
1041 |
+
} else {
|
1042 |
+
(vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
// update currentSlide, animatingTo, controlNav, and directionNav
|
1046 |
+
slider.doMath();
|
1047 |
+
slider.update(pos, "remove");
|
1048 |
+
|
1049 |
+
// update slider.slides
|
1050 |
+
slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
|
1051 |
+
// re-setup the slider to accomdate new slide
|
1052 |
+
slider.setup();
|
1053 |
+
|
1054 |
+
// FlexSlider: removed() Callback
|
1055 |
+
slider.vars.removed(slider);
|
1056 |
+
};
|
1057 |
+
|
1058 |
+
//FlexSlider: Initialize
|
1059 |
+
methods.init();
|
1060 |
+
};
|
1061 |
+
|
1062 |
+
// Ensure the slider isn't focussed if the window loses focus.
|
1063 |
+
$( window ).blur( function ( e ) {
|
1064 |
+
focused = false;
|
1065 |
+
}).focus( function ( e ) {
|
1066 |
+
focused = true;
|
1067 |
+
});
|
1068 |
+
|
1069 |
+
//FlexSlider: Default Settings
|
1070 |
+
$.flexslider.defaults = {
|
1071 |
+
namespace: "cws-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
|
1072 |
+
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
|
1073 |
+
animation: "fade", //String: Select your animation type, "fade" or "slide"
|
1074 |
+
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
|
1075 |
+
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
|
1076 |
+
reverse: false, //{NEW} Boolean: Reverse the animation direction
|
1077 |
+
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
|
1078 |
+
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
|
1079 |
+
startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
|
1080 |
+
slideshow: true, //Boolean: Animate slider automatically
|
1081 |
+
slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds
|
1082 |
+
animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
|
1083 |
+
initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds
|
1084 |
+
randomize: false, //Boolean: Randomize slide order
|
1085 |
+
fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade"
|
1086 |
+
thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
|
1087 |
+
|
1088 |
+
// Usability features
|
1089 |
+
pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
|
1090 |
+
pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
|
1091 |
+
pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
|
1092 |
+
useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available
|
1093 |
+
touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
|
1094 |
+
video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
|
1095 |
+
|
1096 |
+
// Primary Controls
|
1097 |
+
controlNav: true, //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
|
1098 |
+
directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false)
|
1099 |
+
prevText: "Prev", //String: Set the text for the "previous" directionNav item
|
1100 |
+
nextText: "Next", //String: Set the text for the "next" directionNav item
|
1101 |
+
|
1102 |
+
// Secondary Navigation
|
1103 |
+
keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys
|
1104 |
+
multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
|
1105 |
+
mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
|
1106 |
+
pausePlay: false, //Boolean: Create pause/play dynamic element
|
1107 |
+
pauseText: "Pause", //String: Set the text for the "pause" pausePlay item
|
1108 |
+
playText: "Play", //String: Set the text for the "play" pausePlay item
|
1109 |
+
|
1110 |
+
// Special properties
|
1111 |
+
controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
|
1112 |
+
manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
|
1113 |
+
sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
|
1114 |
+
asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
|
1115 |
+
|
1116 |
+
// Carousel Options
|
1117 |
+
itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
|
1118 |
+
itemMargin: 0, //{NEW} Integer: Margin between carousel items.
|
1119 |
+
minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
|
1120 |
+
maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
|
1121 |
+
move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
|
1122 |
+
allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
|
1123 |
+
|
1124 |
+
// Callback API
|
1125 |
+
start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
|
1126 |
+
before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
|
1127 |
+
after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
|
1128 |
+
end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
|
1129 |
+
added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added
|
1130 |
+
removed: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is removed
|
1131 |
+
init: function() {} //{NEW} Callback: function(slider) - Fires after the slider is initially setup
|
1132 |
+
};
|
1133 |
+
|
1134 |
+
//FlexSlider: Plugin Function
|
1135 |
+
$.fn.flexslider = function(options) {
|
1136 |
+
if (options === undefined) options = {};
|
1137 |
+
|
1138 |
+
if (typeof options === "object") {
|
1139 |
+
return this.each(function() {
|
1140 |
+
var $this = $(this),
|
1141 |
+
selector = (options.selector) ? options.selector : ".slides > li",
|
1142 |
+
$slides = $this.find(selector);
|
1143 |
+
|
1144 |
+
if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
|
1145 |
+
$slides.fadeIn(400);
|
1146 |
+
if (options.start) options.start($this);
|
1147 |
+
} else if ($this.data('flexslider') === undefined) {
|
1148 |
+
new $.flexslider(this, options);
|
1149 |
+
}
|
1150 |
+
});
|
1151 |
+
} else {
|
1152 |
+
// Helper strings to quickly perform functions on the slider
|
1153 |
+
var $slider = $(this).data('flexslider');
|
1154 |
+
switch (options) {
|
1155 |
+
case "play": $slider.play(); break;
|
1156 |
+
case "pause": $slider.pause(); break;
|
1157 |
+
case "stop": $slider.stop(); break;
|
1158 |
+
case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
|
1159 |
+
case "prev":
|
1160 |
+
case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
|
1161 |
+
default: if (typeof options === "number") $slider.flexAnimate(options, true);
|
1162 |
+
}
|
1163 |
+
}
|
1164 |
+
};
|
1165 |
+
})(jQuery);
|
js/responsivebannerslider/jquery.lazy.js
ADDED
@@ -0,0 +1,604 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Lazy - v0.5.3
|
3 |
+
* http://jquery.eisbehr.de/lazy/
|
4 |
+
* http://eisbehr.de
|
5 |
+
*
|
6 |
+
* Copyright 2012 - 2015, Daniel 'Eisbehr' Kern
|
7 |
+
*
|
8 |
+
* Dual licensed under the MIT and GPL-2.0 licenses:
|
9 |
+
* http://www.opensource.org/licenses/mit-license.php
|
10 |
+
* http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
*
|
12 |
+
* jQuery("img.lazy").lazy();
|
13 |
+
*/
|
14 |
+
|
15 |
+
;(function($, window, document, undefined)
|
16 |
+
{
|
17 |
+
"use strict";
|
18 |
+
|
19 |
+
// make lazy a bit more case-insensitive :)
|
20 |
+
$.fn.Lazy = $.fn.lazy = function(settings)
|
21 |
+
{
|
22 |
+
return new LazyPlugin(this, settings);
|
23 |
+
};
|
24 |
+
|
25 |
+
/**
|
26 |
+
* contains all logic and the whole element handling
|
27 |
+
* is packed in a private function outside class to reduce memory usage, because it will not be created on every plugin instance
|
28 |
+
* @access private
|
29 |
+
* @type {function}
|
30 |
+
* @param {LazyPlugin} instance
|
31 |
+
* @param {function} configuration
|
32 |
+
* @param {object} items
|
33 |
+
* @param {object} event
|
34 |
+
* @returns void
|
35 |
+
*/
|
36 |
+
function _executeLazy(instance, configuration, items, event)
|
37 |
+
{
|
38 |
+
/**
|
39 |
+
* a helper to trigger the onFinishedAll callback after all other events
|
40 |
+
* @access private
|
41 |
+
* @type {number}
|
42 |
+
*/
|
43 |
+
var _awaitingAfterLoad = 0,
|
44 |
+
|
45 |
+
/**
|
46 |
+
* visible content width
|
47 |
+
* @access private
|
48 |
+
* @type {number}
|
49 |
+
*/
|
50 |
+
_actualWidth = -1,
|
51 |
+
|
52 |
+
/**
|
53 |
+
* visible content height
|
54 |
+
* @access private
|
55 |
+
* @type {number}
|
56 |
+
*/
|
57 |
+
_actualHeight = -1,
|
58 |
+
|
59 |
+
/**
|
60 |
+
* determine possible detected high pixel density
|
61 |
+
* @access private
|
62 |
+
* @type {boolean}
|
63 |
+
*/
|
64 |
+
_isRetinaDisplay = false,
|
65 |
+
|
66 |
+
/**
|
67 |
+
* queue timer
|
68 |
+
* @access private
|
69 |
+
* @type {null|number}
|
70 |
+
*/
|
71 |
+
_queueTimer = null,
|
72 |
+
|
73 |
+
/**
|
74 |
+
* array of items in queue
|
75 |
+
* @access private
|
76 |
+
* @type {Array}
|
77 |
+
*/
|
78 |
+
_queueItems = [],
|
79 |
+
|
80 |
+
/**
|
81 |
+
* identifies if queue actually contains the lazy magic
|
82 |
+
* @access private
|
83 |
+
* @type {boolean}
|
84 |
+
*/
|
85 |
+
_queueContainsMagic = false;
|
86 |
+
|
87 |
+
/**
|
88 |
+
* initialize plugin
|
89 |
+
* bind loading to events or set delay time to load all images at once
|
90 |
+
* @access private
|
91 |
+
* @return void
|
92 |
+
*/
|
93 |
+
function _initialize()
|
94 |
+
{
|
95 |
+
// detect actual device pixel ratio
|
96 |
+
// noinspection JSUnresolvedVariable
|
97 |
+
_isRetinaDisplay = window.devicePixelRatio > 1;
|
98 |
+
|
99 |
+
// bind instance to every element and set default image and placeholder to all images if nothing else is set
|
100 |
+
if( configuration("defaultImage") !== null || configuration("placeholder") !== null )
|
101 |
+
for( var i = 0; i < items.length; i++ )
|
102 |
+
{
|
103 |
+
var element = $(items[i]),
|
104 |
+
tag = items[i].tagName.toLowerCase(),
|
105 |
+
propertyName = "background-image";
|
106 |
+
|
107 |
+
// append instance to all elements
|
108 |
+
element.data("plugin_" + instance.name, instance);
|
109 |
+
|
110 |
+
// set default image on every element without source
|
111 |
+
if( tag == "img" && configuration("defaultImage") && !element.attr("src") )
|
112 |
+
element.attr("src", configuration("defaultImage"));
|
113 |
+
|
114 |
+
// set placeholder on every element without background image
|
115 |
+
else if( tag != "img" && configuration("placeholder") && (!element.css(propertyName) || element.css(propertyName) == "none") )
|
116 |
+
element.css(propertyName, "url(" + configuration("placeholder") + ")");
|
117 |
+
}
|
118 |
+
|
119 |
+
// if delay time is set load all images at once after delay time
|
120 |
+
if( configuration("delay") >= 0 ) setTimeout(function() { _lazyLoadImages(true); }, configuration("delay"));
|
121 |
+
|
122 |
+
// if no delay is set or combine usage is active bind events
|
123 |
+
if( configuration("delay") < 0 || configuration("combined") )
|
124 |
+
{
|
125 |
+
// load initial images
|
126 |
+
_lazyLoadImages();
|
127 |
+
|
128 |
+
// create unique event function
|
129 |
+
event.e = _throttle(configuration("throttle"), function(event)
|
130 |
+
{
|
131 |
+
// reset detected window size on resize event
|
132 |
+
if( event.type === "resize" )
|
133 |
+
_actualWidth = _actualHeight = -1;
|
134 |
+
|
135 |
+
// append 'lazy magic' to queue
|
136 |
+
_addToQueue(function() { _lazyLoadImages(event.all) }, instance, true);
|
137 |
+
});
|
138 |
+
|
139 |
+
// bind lazy load functions to scroll and resize event
|
140 |
+
$(configuration("appendScroll")).on("scroll." + instance.name + " resize." + instance.name, event.e);
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* the 'lazy magic' - check all items
|
146 |
+
* @access private
|
147 |
+
* @param {boolean} [allImages]
|
148 |
+
* @return void
|
149 |
+
*/
|
150 |
+
function _lazyLoadImages(allImages)
|
151 |
+
{
|
152 |
+
// stop and unbind if no items where left
|
153 |
+
if( !items.length ) return instance.destroy();
|
154 |
+
|
155 |
+
// helper to see if something was changed
|
156 |
+
var loadedImages = false;
|
157 |
+
|
158 |
+
// loop all available items
|
159 |
+
for( var i = 0; i < items.length; i++ )
|
160 |
+
(function(item)
|
161 |
+
{
|
162 |
+
if( _isInLoadableArea(item) || allImages )
|
163 |
+
{
|
164 |
+
var element = $(item),
|
165 |
+
tag = item.tagName.toLowerCase();
|
166 |
+
|
167 |
+
// skip element if already loaded, this may happen because of queued cleanup function
|
168 |
+
if( element.data(configuration("handledName")) ) return;
|
169 |
+
|
170 |
+
if( // image source attribute is available
|
171 |
+
element.attr(configuration("attribute")) &&
|
172 |
+
// and is image tag where attribute is not equal source
|
173 |
+
((tag == "img" && element.attr(configuration("attribute")) != element.attr("src")) ||
|
174 |
+
// or is non image tag where attribute is not equal background
|
175 |
+
((tag != "img" && element.attr(configuration("attribute")) != element.css("background-image"))) ) &&
|
176 |
+
// and is visible or visibility doesn't matter
|
177 |
+
(element.is(":visible") || !configuration("visibleOnly")) )
|
178 |
+
{
|
179 |
+
// mark element always as handled as this point to prevent double loading
|
180 |
+
loadedImages = true;
|
181 |
+
element.data(configuration("handledName"), true);
|
182 |
+
|
183 |
+
// add item to loading queue
|
184 |
+
_addToQueue(function() { _handleItem(element, tag) });
|
185 |
+
}
|
186 |
+
}
|
187 |
+
})(items[i]);
|
188 |
+
|
189 |
+
// when something was loaded remove them from remaining items
|
190 |
+
if( loadedImages ) _addToQueue(function()
|
191 |
+
{
|
192 |
+
items = $(items).filter(function()
|
193 |
+
{
|
194 |
+
return !$(this).data(configuration("handledName"));
|
195 |
+
});
|
196 |
+
});
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* load the given element the lazy way
|
201 |
+
* @access private
|
202 |
+
* @param {object} element
|
203 |
+
* @param {string} tag
|
204 |
+
* @return void
|
205 |
+
*/
|
206 |
+
function _handleItem(element, tag)
|
207 |
+
{
|
208 |
+
// create image object
|
209 |
+
var imageObj = $(new Image());
|
210 |
+
|
211 |
+
// increment count of items waiting for after load
|
212 |
+
++_awaitingAfterLoad;
|
213 |
+
|
214 |
+
// bind error event to trigger callback and reduce waiting amount
|
215 |
+
imageObj.error(function()
|
216 |
+
{
|
217 |
+
_triggerCallback("onError", element);
|
218 |
+
_reduceAwaiting();
|
219 |
+
});
|
220 |
+
|
221 |
+
// bind after load callback to image
|
222 |
+
imageObj.one("load", function()
|
223 |
+
{
|
224 |
+
// remove element from view
|
225 |
+
element.hide();
|
226 |
+
|
227 |
+
// set image back to element
|
228 |
+
if( tag == "img" ) element.attr("src", imageObj.attr("src"));
|
229 |
+
else element.css("background-image", "url(" + imageObj.attr("src") + ")");
|
230 |
+
|
231 |
+
// bring it back with some effect!
|
232 |
+
element[configuration("effect")](configuration("effectTime"));
|
233 |
+
|
234 |
+
// remove attribute from element
|
235 |
+
if( configuration("removeAttribute") )
|
236 |
+
element.removeAttr(configuration("attribute") + " " + configuration("retinaAttribute"));
|
237 |
+
|
238 |
+
// call after load event
|
239 |
+
_triggerCallback("afterLoad", element);
|
240 |
+
|
241 |
+
// unbind error event and remove image object
|
242 |
+
imageObj.off("error").remove();
|
243 |
+
|
244 |
+
// remove item from waiting cue and possible trigger finished event
|
245 |
+
_reduceAwaiting();
|
246 |
+
});
|
247 |
+
|
248 |
+
// trigger function before loading image
|
249 |
+
_triggerCallback("beforeLoad", element);
|
250 |
+
|
251 |
+
// set source
|
252 |
+
imageObj.attr("src", element.attr(configuration(_isRetinaDisplay && element.attr(configuration("retinaAttribute")) ? "retinaAttribute" : "attribute")));
|
253 |
+
|
254 |
+
// call after load even on cached image
|
255 |
+
if( imageObj.complete ) imageObj.load();
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* check if the given element is inside the current viewport or threshold
|
260 |
+
* @access private
|
261 |
+
* @param {object} element
|
262 |
+
* @return {boolean}
|
263 |
+
*/
|
264 |
+
function _isInLoadableArea(element)
|
265 |
+
{
|
266 |
+
var elementBound = element.getBoundingClientRect(),
|
267 |
+
threshold = configuration("threshold"),
|
268 |
+
vertical = // check if element is in loadable area from top
|
269 |
+
((_getActualHeight() + threshold) > elementBound.top) &&
|
270 |
+
// check if element is even in loadable are from bottom
|
271 |
+
(-threshold < elementBound.bottom),
|
272 |
+
horizontal = // check if element is in loadable area from left
|
273 |
+
((_getActualWidth() + threshold) > elementBound.left) &&
|
274 |
+
// check if element is even in loadable are from right
|
275 |
+
(-threshold < elementBound.right);
|
276 |
+
|
277 |
+
if( configuration("scrollDirection") == "vertical" ) return vertical;
|
278 |
+
else if( configuration("scrollDirection") == "horizontal" ) return horizontal;
|
279 |
+
|
280 |
+
return vertical && horizontal;
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* receive the current viewed width of the browser
|
285 |
+
* @access private
|
286 |
+
* @return {number}
|
287 |
+
*/
|
288 |
+
function _getActualWidth()
|
289 |
+
{
|
290 |
+
return _actualWidth = _getDimension(_actualWidth, "Width");
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* receive the current viewed height of the browser
|
295 |
+
* @access private
|
296 |
+
* @return {number}
|
297 |
+
*/
|
298 |
+
function _getActualHeight()
|
299 |
+
{
|
300 |
+
return _actualHeight = _getDimension(_actualHeight, "Height");
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* try to allocate current viewed dimension (width or height) of the browser
|
305 |
+
* uses fallback option when no dimension is found
|
306 |
+
* @access private
|
307 |
+
* @param {number} buffer
|
308 |
+
* @param {string} type
|
309 |
+
* @return {number}
|
310 |
+
*/
|
311 |
+
function _getDimension(buffer, type)
|
312 |
+
{
|
313 |
+
if( buffer >= 0 ) return buffer;
|
314 |
+
|
315 |
+
return window["inner" + type] ||
|
316 |
+
(document.documentElement || document.body)["client" + type] ||
|
317 |
+
document.body["offset" + type] ||
|
318 |
+
configuration("fallback" + type);
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* helper function to throttle down event triggering
|
323 |
+
* @access private
|
324 |
+
* @param {number} delay
|
325 |
+
* @param {function} callback
|
326 |
+
* @return {function}
|
327 |
+
*/
|
328 |
+
function _throttle(delay, callback)
|
329 |
+
{
|
330 |
+
var timeout, lastExecute = 0;
|
331 |
+
|
332 |
+
return function(event, ignoreThrottle)
|
333 |
+
{
|
334 |
+
var elapsed = +new Date() - lastExecute;
|
335 |
+
|
336 |
+
function run()
|
337 |
+
{
|
338 |
+
lastExecute = +new Date();
|
339 |
+
callback.call(undefined, event);
|
340 |
+
}
|
341 |
+
|
342 |
+
timeout && clearTimeout(timeout);
|
343 |
+
|
344 |
+
if( elapsed > delay || !configuration("enableThrottle") || ignoreThrottle ) run();
|
345 |
+
else timeout = setTimeout(run, delay - elapsed);
|
346 |
+
};
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
* reduce count of awaiting elements to 'afterLoad' event and fire 'onFinishedAll' if reached zero
|
351 |
+
* @access private
|
352 |
+
* @return void
|
353 |
+
*/
|
354 |
+
function _reduceAwaiting()
|
355 |
+
{
|
356 |
+
--_awaitingAfterLoad;
|
357 |
+
|
358 |
+
// if no items were left trigger finished event
|
359 |
+
if( !items.size() && !_awaitingAfterLoad ) _triggerCallback("onFinishedAll", null);
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* single implementation to handle callbacks and pass parameter
|
364 |
+
* @access private
|
365 |
+
* @param {string|function} callback
|
366 |
+
* @param {object} [element]
|
367 |
+
* @return void
|
368 |
+
*/
|
369 |
+
function _triggerCallback(callback, element)
|
370 |
+
{
|
371 |
+
if( callback = configuration(callback) )
|
372 |
+
{
|
373 |
+
if( element )
|
374 |
+
_addToQueue(function() { callback(element); }, instance);
|
375 |
+
else
|
376 |
+
_addToQueue(callback, instance);
|
377 |
+
}
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* set next timer for queue execution
|
382 |
+
* @access private
|
383 |
+
* @return void
|
384 |
+
*/
|
385 |
+
function _setQueueTimer()
|
386 |
+
{
|
387 |
+
_queueTimer = setTimeout(function()
|
388 |
+
{
|
389 |
+
_addToQueue();
|
390 |
+
if( _queueItems.length ) _setQueueTimer();
|
391 |
+
}, 2);
|
392 |
+
}
|
393 |
+
|
394 |
+
/**
|
395 |
+
* add new function to queue for execution
|
396 |
+
* @access private
|
397 |
+
* @param {function} [callable]
|
398 |
+
* @param {object} [context]
|
399 |
+
* @param {boolean} [isLazyMagic]
|
400 |
+
* @returns void
|
401 |
+
*/
|
402 |
+
function _addToQueue(callable, context, isLazyMagic)
|
403 |
+
{
|
404 |
+
if( callable )
|
405 |
+
{
|
406 |
+
// execute directly when queue is disabled and stop queuing
|
407 |
+
if( !configuration("enableQueueing") )
|
408 |
+
{
|
409 |
+
callable.call(context || window);
|
410 |
+
return;
|
411 |
+
}
|
412 |
+
|
413 |
+
// let the lazy magic only be once in queue
|
414 |
+
if( !isLazyMagic || !_queueContainsMagic )
|
415 |
+
{
|
416 |
+
_queueItems.push([callable, context, isLazyMagic]);
|
417 |
+
if( isLazyMagic ) _queueContainsMagic = true;
|
418 |
+
}
|
419 |
+
|
420 |
+
// start queue execution directly on first item
|
421 |
+
if( _queueItems.length == 1 ) _setQueueTimer();
|
422 |
+
return;
|
423 |
+
}
|
424 |
+
|
425 |
+
if( callable = _queueItems.shift() )
|
426 |
+
{
|
427 |
+
if( callable[2] ) _queueContainsMagic = false;
|
428 |
+
callable[0].call(callable[1] || window);
|
429 |
+
}
|
430 |
+
}
|
431 |
+
|
432 |
+
// set up lazy
|
433 |
+
(function()
|
434 |
+
{
|
435 |
+
// late-bind error callback to images if set
|
436 |
+
if( configuration("onError") )
|
437 |
+
for( var i = 0; i < items.length; i++ )
|
438 |
+
_addToQueue(function()
|
439 |
+
{
|
440 |
+
$(this).on("error." + instance.name, function()
|
441 |
+
{
|
442 |
+
_triggerCallback("onError", $(this));
|
443 |
+
});
|
444 |
+
}, items[i]);
|
445 |
+
|
446 |
+
// if event driven don't wait for page loading
|
447 |
+
if( configuration("bind") == "event" ) _initialize();
|
448 |
+
|
449 |
+
// otherwise load initial images and start lazy after page load
|
450 |
+
else $(window).load(_initialize);
|
451 |
+
})();
|
452 |
+
}
|
453 |
+
|
454 |
+
/**
|
455 |
+
* lazy plugin class constructor
|
456 |
+
* @constructor
|
457 |
+
* @access private
|
458 |
+
* @param {object} elements
|
459 |
+
* @param {object} settings
|
460 |
+
* @returns {object|LazyPlugin}
|
461 |
+
*/
|
462 |
+
function LazyPlugin(elements, settings)
|
463 |
+
{
|
464 |
+
// overwrite configuration with custom user settings
|
465 |
+
if( settings ) $.extend(this.configuration, settings);
|
466 |
+
|
467 |
+
/**
|
468 |
+
* this lazy plugin instance
|
469 |
+
* @access private
|
470 |
+
* @type {LazyPlugin}
|
471 |
+
*/
|
472 |
+
var _instance = this,
|
473 |
+
|
474 |
+
/**
|
475 |
+
* all selected elements by jquery
|
476 |
+
* @access private
|
477 |
+
* @type {object}
|
478 |
+
*/
|
479 |
+
_items = elements,
|
480 |
+
|
481 |
+
/**
|
482 |
+
* instance generated event executed on container scroll or resize
|
483 |
+
* packed in an object to be referenceable
|
484 |
+
* @access private
|
485 |
+
* @type {object}
|
486 |
+
*/
|
487 |
+
_event = {e: null},
|
488 |
+
|
489 |
+
/**
|
490 |
+
* wrapper to get an entry from plugin instance configuration
|
491 |
+
* much smaller on minify as direct access
|
492 |
+
* @access private
|
493 |
+
* @type {function}
|
494 |
+
* @param {string} entryName
|
495 |
+
* @return {*}
|
496 |
+
*/
|
497 |
+
_configuration = function(entryName)
|
498 |
+
{
|
499 |
+
return _instance.configuration[entryName];
|
500 |
+
};
|
501 |
+
|
502 |
+
/**
|
503 |
+
* force lazy to load all images in loadable area right now
|
504 |
+
* by default without throttle
|
505 |
+
* @access public
|
506 |
+
* @type {function}
|
507 |
+
* @param {boolean} [useThrottle]
|
508 |
+
* @returns void
|
509 |
+
*/
|
510 |
+
_instance.update = function(useThrottle)
|
511 |
+
{
|
512 |
+
_event.e({}, !useThrottle);
|
513 |
+
};
|
514 |
+
|
515 |
+
/**
|
516 |
+
* force lazy to load all images right now
|
517 |
+
* @access public
|
518 |
+
* @type {function}
|
519 |
+
* @returns void
|
520 |
+
*/
|
521 |
+
_instance.loadAll = function()
|
522 |
+
{
|
523 |
+
_event.e({all: true});
|
524 |
+
};
|
525 |
+
|
526 |
+
/**
|
527 |
+
* destroy this plugin instance
|
528 |
+
* @access public
|
529 |
+
* @type {function}
|
530 |
+
* @returns void
|
531 |
+
*/
|
532 |
+
_instance.destroy = function ()
|
533 |
+
{
|
534 |
+
// unbind instance generated events
|
535 |
+
$(_configuration("appendScroll")).off("." + _instance.name, _event.e);
|
536 |
+
|
537 |
+
// clear items and event
|
538 |
+
_items = {};
|
539 |
+
_event.e = null;
|
540 |
+
};
|
541 |
+
|
542 |
+
// start using lazy and return all elements to be chainable or instance for further use
|
543 |
+
_executeLazy(_instance, _configuration, _items, _event);
|
544 |
+
return _configuration("chainable") ? elements : _instance;
|
545 |
+
}
|
546 |
+
|
547 |
+
// use jquery to extend class prototype without conflicts
|
548 |
+
$.extend(LazyPlugin.prototype,
|
549 |
+
{
|
550 |
+
/**
|
551 |
+
* internal name used for bindings and namespaces
|
552 |
+
* @access public
|
553 |
+
* @var {string}
|
554 |
+
*/
|
555 |
+
name: "lazy",
|
556 |
+
|
557 |
+
/**
|
558 |
+
* settings and configuration data
|
559 |
+
* @access public
|
560 |
+
* @type {object}
|
561 |
+
*/
|
562 |
+
configuration:
|
563 |
+
{
|
564 |
+
// general
|
565 |
+
chainable : true,
|
566 |
+
bind : "load",
|
567 |
+
threshold : 500,
|
568 |
+
fallbackWidth : 2000,
|
569 |
+
fallbackHeight : 2000,
|
570 |
+
visibleOnly : false,
|
571 |
+
appendScroll : window,
|
572 |
+
scrollDirection : "both",
|
573 |
+
defaultImage : "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",
|
574 |
+
placeholder : null,
|
575 |
+
|
576 |
+
// delay
|
577 |
+
delay : -1,
|
578 |
+
combined : false,
|
579 |
+
|
580 |
+
// attributes
|
581 |
+
attribute : "data-src",
|
582 |
+
retinaAttribute : "data-retina",
|
583 |
+
removeAttribute : true,
|
584 |
+
handledName : "handled",
|
585 |
+
|
586 |
+
// effect
|
587 |
+
effect : "show",
|
588 |
+
effectTime : 0,
|
589 |
+
|
590 |
+
// throttle
|
591 |
+
enableThrottle : true,
|
592 |
+
throttle : 250,
|
593 |
+
|
594 |
+
// queue
|
595 |
+
enableQueueing : true,
|
596 |
+
|
597 |
+
// callbacks
|
598 |
+
beforeLoad : null,
|
599 |
+
afterLoad : null,
|
600 |
+
onError : null,
|
601 |
+
onFinishedAll : null
|
602 |
+
}
|
603 |
+
});
|
604 |
+
})(jQuery, window, document);
|
js/responsivebannerslider/jquery.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2 |
+
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(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 ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(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 tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
|
3 |
+
if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&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 m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.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]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={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:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.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=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,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||(m.cssNumber[c]?"":"px")
|
4 |
+
},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):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):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],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 kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.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){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,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":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
|
js/responsivebannerslider/jscolor/Thumbs.db
ADDED
Binary file
|
js/responsivebannerslider/jscolor/arrow.gif
ADDED
Binary file
|
js/responsivebannerslider/jscolor/cross.gif
ADDED
Binary file
|
js/responsivebannerslider/jscolor/hs.png
ADDED
Binary file
|
js/responsivebannerslider/jscolor/hv.png
ADDED
Binary file
|
js/responsivebannerslider/jscolor/jscolor.js
ADDED
@@ -0,0 +1,993 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/***************************************************************************
|
2 |
+
@extension : Responsive Banner Slider Extension.
|
3 |
+
@copyright : Copyright (c) 2015 Capacity Web Solutions.
|
4 |
+
( http://www.capacitywebsolutions.com )
|
5 |
+
@author : Capacity Web Solutions Pvt. Ltd.
|
6 |
+
@support : magento@capacitywebsolutions.com
|
7 |
+
***************************************************************************/
|
8 |
+
|
9 |
+
var jscolor = {
|
10 |
+
|
11 |
+
|
12 |
+
dir : '', // location of jscolor directory (leave empty to autodetect)
|
13 |
+
bindClass : 'color', // class name
|
14 |
+
binding : true, // automatic binding via <input class="...">
|
15 |
+
preloading : true, // use image preloading?
|
16 |
+
|
17 |
+
|
18 |
+
install : function() {
|
19 |
+
jscolor.addEvent(window, 'load', jscolor.init);
|
20 |
+
},
|
21 |
+
|
22 |
+
|
23 |
+
init : function() {
|
24 |
+
if(jscolor.binding) {
|
25 |
+
jscolor.bind();
|
26 |
+
}
|
27 |
+
if(jscolor.preloading) {
|
28 |
+
jscolor.preload();
|
29 |
+
}
|
30 |
+
},
|
31 |
+
|
32 |
+
|
33 |
+
getDir : function() {
|
34 |
+
if(!jscolor.dir) {
|
35 |
+
var detected = jscolor.detectDir();
|
36 |
+
jscolor.dir = detected!==false ? detected : 'jscolor/';
|
37 |
+
}
|
38 |
+
return jscolor.dir;
|
39 |
+
},
|
40 |
+
|
41 |
+
|
42 |
+
detectDir : function() {
|
43 |
+
var base = location.href;
|
44 |
+
|
45 |
+
var e = document.getElementsByTagName('base');
|
46 |
+
for(var i=0; i<e.length; i+=1) {
|
47 |
+
if(e[i].href) { base = e[i].href; }
|
48 |
+
}
|
49 |
+
|
50 |
+
var e = document.getElementsByTagName('script');
|
51 |
+
for(var i=0; i<e.length; i+=1) {
|
52 |
+
if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
|
53 |
+
var src = new jscolor.URI(e[i].src);
|
54 |
+
var srcAbs = src.toAbsolute(base);
|
55 |
+
srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
|
56 |
+
srcAbs.query = null;
|
57 |
+
srcAbs.fragment = null;
|
58 |
+
return srcAbs.toString();
|
59 |
+
}
|
60 |
+
}
|
61 |
+
return false;
|
62 |
+
},
|
63 |
+
|
64 |
+
|
65 |
+
bind : function() {
|
66 |
+
var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')(\\s*(\\{[^}]*\\})|\\s|$)', 'i');
|
67 |
+
var e = document.getElementsByTagName('input');
|
68 |
+
for(var i=0; i<e.length; i+=1) {
|
69 |
+
var m;
|
70 |
+
if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
|
71 |
+
var prop = {};
|
72 |
+
if(m[4]) {
|
73 |
+
try {
|
74 |
+
prop = (new Function ('return (' + m[4] + ')'))();
|
75 |
+
} catch(eInvalidProp) {}
|
76 |
+
}
|
77 |
+
e[i].color = new jscolor.color(e[i], prop);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
},
|
81 |
+
|
82 |
+
|
83 |
+
preload : function() {
|
84 |
+
for(var fn in jscolor.imgRequire) {
|
85 |
+
if(jscolor.imgRequire.hasOwnProperty(fn)) {
|
86 |
+
jscolor.loadImage(fn);
|
87 |
+
}
|
88 |
+
}
|
89 |
+
},
|
90 |
+
|
91 |
+
|
92 |
+
images : {
|
93 |
+
pad : [ 181, 101 ],
|
94 |
+
sld : [ 16, 101 ],
|
95 |
+
cross : [ 15, 15 ],
|
96 |
+
arrow : [ 7, 11 ]
|
97 |
+
},
|
98 |
+
|
99 |
+
|
100 |
+
imgRequire : {},
|
101 |
+
imgLoaded : {},
|
102 |
+
|
103 |
+
|
104 |
+
requireImage : function(filename) {
|
105 |
+
jscolor.imgRequire[filename] = true;
|
106 |
+
},
|
107 |
+
|
108 |
+
|
109 |
+
loadImage : function(filename) {
|
110 |
+
if(!jscolor.imgLoaded[filename]) {
|
111 |
+
jscolor.imgLoaded[filename] = new Image();
|
112 |
+
jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
|
113 |
+
}
|
114 |
+
},
|
115 |
+
|
116 |
+
|
117 |
+
fetchElement : function(mixed) {
|
118 |
+
return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
|
119 |
+
},
|
120 |
+
|
121 |
+
|
122 |
+
addEvent : function(el, evnt, func) {
|
123 |
+
if(el.addEventListener) {
|
124 |
+
el.addEventListener(evnt, func, false);
|
125 |
+
} else if(el.attachEvent) {
|
126 |
+
el.attachEvent('on'+evnt, func);
|
127 |
+
}
|
128 |
+
},
|
129 |
+
|
130 |
+
|
131 |
+
fireEvent : function(el, evnt) {
|
132 |
+
if(!el) {
|
133 |
+
return;
|
134 |
+
}
|
135 |
+
if(document.createEvent) {
|
136 |
+
var ev = document.createEvent('HTMLEvents');
|
137 |
+
ev.initEvent(evnt, true, true);
|
138 |
+
el.dispatchEvent(ev);
|
139 |
+
} else if(document.createEventObject) {
|
140 |
+
var ev = document.createEventObject();
|
141 |
+
el.fireEvent('on'+evnt, ev);
|
142 |
+
} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
|
143 |
+
el['on'+evnt]();
|
144 |
+
}
|
145 |
+
},
|
146 |
+
|
147 |
+
|
148 |
+
getElementPos : function(e) {
|
149 |
+
var e1=e, e2=e;
|
150 |
+
var x=0, y=0;
|
151 |
+
if(e1.offsetParent) {
|
152 |
+
do {
|
153 |
+
x += e1.offsetLeft;
|
154 |
+
y += e1.offsetTop;
|
155 |
+
} while(e1 = e1.offsetParent);
|
156 |
+
}
|
157 |
+
while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
|
158 |
+
x -= e2.scrollLeft;
|
159 |
+
y -= e2.scrollTop;
|
160 |
+
}
|
161 |
+
return [x, y];
|
162 |
+
},
|
163 |
+
|
164 |
+
|
165 |
+
getElementSize : function(e) {
|
166 |
+
return [e.offsetWidth, e.offsetHeight];
|
167 |
+
},
|
168 |
+
|
169 |
+
|
170 |
+
getRelMousePos : function(e) {
|
171 |
+
var x = 0, y = 0;
|
172 |
+
if (!e) { e = window.event; }
|
173 |
+
if (typeof e.offsetX === 'number') {
|
174 |
+
x = e.offsetX;
|
175 |
+
y = e.offsetY;
|
176 |
+
} else if (typeof e.layerX === 'number') {
|
177 |
+
x = e.layerX;
|
178 |
+
y = e.layerY;
|
179 |
+
}
|
180 |
+
return { x: x, y: y };
|
181 |
+
},
|
182 |
+
|
183 |
+
|
184 |
+
getViewPos : function() {
|
185 |
+
if(typeof window.pageYOffset === 'number') {
|
186 |
+
return [window.pageXOffset, window.pageYOffset];
|
187 |
+
} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
|
188 |
+
return [document.body.scrollLeft, document.body.scrollTop];
|
189 |
+
} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
|
190 |
+
return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
|
191 |
+
} else {
|
192 |
+
return [0, 0];
|
193 |
+
}
|
194 |
+
},
|
195 |
+
|
196 |
+
|
197 |
+
getViewSize : function() {
|
198 |
+
if(typeof window.innerWidth === 'number') {
|
199 |
+
return [window.innerWidth, window.innerHeight];
|
200 |
+
} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
|
201 |
+
return [document.body.clientWidth, document.body.clientHeight];
|
202 |
+
} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
|
203 |
+
return [document.documentElement.clientWidth, document.documentElement.clientHeight];
|
204 |
+
} else {
|
205 |
+
return [0, 0];
|
206 |
+
}
|
207 |
+
},
|
208 |
+
|
209 |
+
|
210 |
+
URI : function(uri) { // See RFC3986
|
211 |
+
|
212 |
+
this.scheme = null;
|
213 |
+
this.authority = null;
|
214 |
+
this.path = '';
|
215 |
+
this.query = null;
|
216 |
+
this.fragment = null;
|
217 |
+
|
218 |
+
this.parse = function(uri) {
|
219 |
+
var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
|
220 |
+
this.scheme = m[3] ? m[2] : null;
|
221 |
+
this.authority = m[5] ? m[6] : null;
|
222 |
+
this.path = m[7];
|
223 |
+
this.query = m[9] ? m[10] : null;
|
224 |
+
this.fragment = m[12] ? m[13] : null;
|
225 |
+
return this;
|
226 |
+
};
|
227 |
+
|
228 |
+
this.toString = function() {
|
229 |
+
var result = '';
|
230 |
+
if(this.scheme !== null) { result = result + this.scheme + ':'; }
|
231 |
+
if(this.authority !== null) { result = result + '//' + this.authority; }
|
232 |
+
if(this.path !== null) { result = result + this.path; }
|
233 |
+
if(this.query !== null) { result = result + '?' + this.query; }
|
234 |
+
if(this.fragment !== null) { result = result + '#' + this.fragment; }
|
235 |
+
return result;
|
236 |
+
};
|
237 |
+
|
238 |
+
this.toAbsolute = function(base) {
|
239 |
+
var base = new jscolor.URI(base);
|
240 |
+
var r = this;
|
241 |
+
var t = new jscolor.URI;
|
242 |
+
|
243 |
+
if(base.scheme === null) { return false; }
|
244 |
+
|
245 |
+
if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
|
246 |
+
r.scheme = null;
|
247 |
+
}
|
248 |
+
|
249 |
+
if(r.scheme !== null) {
|
250 |
+
t.scheme = r.scheme;
|
251 |
+
t.authority = r.authority;
|
252 |
+
t.path = removeDotSegments(r.path);
|
253 |
+
t.query = r.query;
|
254 |
+
} else {
|
255 |
+
if(r.authority !== null) {
|
256 |
+
t.authority = r.authority;
|
257 |
+
t.path = removeDotSegments(r.path);
|
258 |
+
t.query = r.query;
|
259 |
+
} else {
|
260 |
+
if(r.path === '') {
|
261 |
+
t.path = base.path;
|
262 |
+
if(r.query !== null) {
|
263 |
+
t.query = r.query;
|
264 |
+
} else {
|
265 |
+
t.query = base.query;
|
266 |
+
}
|
267 |
+
} else {
|
268 |
+
if(r.path.substr(0,1) === '/') {
|
269 |
+
t.path = removeDotSegments(r.path);
|
270 |
+
} else {
|
271 |
+
if(base.authority !== null && base.path === '') {
|
272 |
+
t.path = '/'+r.path;
|
273 |
+
} else {
|
274 |
+
t.path = base.path.replace(/[^\/]+$/,'')+r.path;
|
275 |
+
}
|
276 |
+
t.path = removeDotSegments(t.path);
|
277 |
+
}
|
278 |
+
t.query = r.query;
|
279 |
+
}
|
280 |
+
t.authority = base.authority;
|
281 |
+
}
|
282 |
+
t.scheme = base.scheme;
|
283 |
+
}
|
284 |
+
t.fragment = r.fragment;
|
285 |
+
|
286 |
+
return t;
|
287 |
+
};
|
288 |
+
|
289 |
+
function removeDotSegments(path) {
|
290 |
+
var out = '';
|
291 |
+
while(path) {
|
292 |
+
if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
|
293 |
+
path = path.replace(/^\.+/,'').substr(1);
|
294 |
+
} else if(path.substr(0,3)==='/./' || path==='/.') {
|
295 |
+
path = '/'+path.substr(3);
|
296 |
+
} else if(path.substr(0,4)==='/../' || path==='/..') {
|
297 |
+
path = '/'+path.substr(4);
|
298 |
+
out = out.replace(/\/?[^\/]*$/, '');
|
299 |
+
} else if(path==='.' || path==='..') {
|
300 |
+
path = '';
|
301 |
+
} else {
|
302 |
+
var rm = path.match(/^\/?[^\/]*/)[0];
|
303 |
+
path = path.substr(rm.length);
|
304 |
+
out = out + rm;
|
305 |
+
}
|
306 |
+
}
|
307 |
+
return out;
|
308 |
+
}
|
309 |
+
|
310 |
+
if(uri) {
|
311 |
+
this.parse(uri);
|
312 |
+
}
|
313 |
+
|
314 |
+
},
|
315 |
+
|
316 |
+
|
317 |
+
//
|
318 |
+
// Usage example:
|
319 |
+
// var myColor = new jscolor.color(myInputElement)
|
320 |
+
//
|
321 |
+
|
322 |
+
color : function(target, prop) {
|
323 |
+
|
324 |
+
|
325 |
+
this.required = true; // refuse empty values?
|
326 |
+
this.adjust = true; // adjust value to uniform notation?
|
327 |
+
this.hash = false; // prefix color with # symbol?
|
328 |
+
this.caps = true; // uppercase?
|
329 |
+
this.slider = true; // show the value/saturation slider?
|
330 |
+
this.valueElement = target; // value holder
|
331 |
+
this.styleElement = target; // where to reflect current color
|
332 |
+
this.onImmediateChange = null; // onchange callback (can be either string or function)
|
333 |
+
this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1
|
334 |
+
this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1
|
335 |
+
this.minH = 0; // read-only 0-6
|
336 |
+
this.maxH = 6; // read-only 0-6
|
337 |
+
this.minS = 0; // read-only 0-1
|
338 |
+
this.maxS = 1; // read-only 0-1
|
339 |
+
this.minV = 0; // read-only 0-1
|
340 |
+
this.maxV = 1; // read-only 0-1
|
341 |
+
|
342 |
+
this.pickerOnfocus = true; // display picker on focus?
|
343 |
+
this.pickerMode = 'HSV'; // HSV | HVS
|
344 |
+
this.pickerPosition = 'bottom'; // left | right | top | bottom
|
345 |
+
this.pickerSmartPosition = true; // automatically adjust picker position when necessary
|
346 |
+
this.pickerButtonHeight = 20; // px
|
347 |
+
this.pickerClosable = false;
|
348 |
+
this.pickerCloseText = 'Close';
|
349 |
+
this.pickerButtonColor = 'ButtonText'; // px
|
350 |
+
this.pickerFace = 10; // px
|
351 |
+
this.pickerFaceColor = 'ThreeDFace'; // CSS color
|
352 |
+
this.pickerBorder = 1; // px
|
353 |
+
this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
|
354 |
+
this.pickerInset = 1; // px
|
355 |
+
this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
|
356 |
+
this.pickerZIndex = 10000;
|
357 |
+
|
358 |
+
|
359 |
+
for(var p in prop) {
|
360 |
+
if(prop.hasOwnProperty(p)) {
|
361 |
+
this[p] = prop[p];
|
362 |
+
}
|
363 |
+
}
|
364 |
+
|
365 |
+
|
366 |
+
this.hidePicker = function() {
|
367 |
+
if(isPickerOwner()) {
|
368 |
+
removePicker();
|
369 |
+
}
|
370 |
+
};
|
371 |
+
|
372 |
+
|
373 |
+
this.showPicker = function() {
|
374 |
+
if(!isPickerOwner()) {
|
375 |
+
var tp = jscolor.getElementPos(target); // target pos
|
376 |
+
var ts = jscolor.getElementSize(target); // target size
|
377 |
+
var vp = jscolor.getViewPos(); // view pos
|
378 |
+
var vs = jscolor.getViewSize(); // view size
|
379 |
+
var ps = getPickerDims(this); // picker size
|
380 |
+
var a, b, c;
|
381 |
+
switch(this.pickerPosition.toLowerCase()) {
|
382 |
+
case 'left': a=1; b=0; c=-1; break;
|
383 |
+
case 'right':a=1; b=0; c=1; break;
|
384 |
+
case 'top': a=0; b=1; c=-1; break;
|
385 |
+
default: a=0; b=1; c=1; break;
|
386 |
+
}
|
387 |
+
var l = (ts[b]+ps[b])/2;
|
388 |
+
|
389 |
+
// picker pos
|
390 |
+
if (!this.pickerSmartPosition) {
|
391 |
+
var pp = [
|
392 |
+
tp[a],
|
393 |
+
tp[b]+ts[b]-l+l*c
|
394 |
+
];
|
395 |
+
} else {
|
396 |
+
var pp = [
|
397 |
+
-vp[a]+tp[a]+ps[a] > vs[a] ?
|
398 |
+
(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
|
399 |
+
tp[a],
|
400 |
+
-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
|
401 |
+
(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
|
402 |
+
(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
|
403 |
+
];
|
404 |
+
}
|
405 |
+
drawPicker(pp[a], pp[b]);
|
406 |
+
}
|
407 |
+
};
|
408 |
+
|
409 |
+
|
410 |
+
this.importColor = function() {
|
411 |
+
if(!valueElement) {
|
412 |
+
this.exportColor();
|
413 |
+
} else {
|
414 |
+
if(!this.adjust) {
|
415 |
+
if(!this.fromString(valueElement.value, leaveValue)) {
|
416 |
+
styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
|
417 |
+
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
|
418 |
+
styleElement.style.color = styleElement.jscStyle.color;
|
419 |
+
this.exportColor(leaveValue | leaveStyle);
|
420 |
+
}
|
421 |
+
} else if(!this.required && /^\s*$/.test(valueElement.value)) {
|
422 |
+
valueElement.value = '';
|
423 |
+
styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
|
424 |
+
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
|
425 |
+
styleElement.style.color = styleElement.jscStyle.color;
|
426 |
+
this.exportColor(leaveValue | leaveStyle);
|
427 |
+
|
428 |
+
} else if(this.fromString(valueElement.value)) {
|
429 |
+
// OK
|
430 |
+
} else {
|
431 |
+
this.exportColor();
|
432 |
+
}
|
433 |
+
}
|
434 |
+
};
|
435 |
+
|
436 |
+
|
437 |
+
this.exportColor = function(flags) {
|
438 |
+
if(!(flags & leaveValue) && valueElement) {
|
439 |
+
var value = this.toString();
|
440 |
+
if(this.caps) { value = value.toUpperCase(); }
|
441 |
+
if(this.hash) { value = '#'+value; }
|
442 |
+
valueElement.value = value;
|
443 |
+
}
|
444 |
+
if(!(flags & leaveStyle) && styleElement) {
|
445 |
+
styleElement.style.backgroundImage = "none";
|
446 |
+
styleElement.style.backgroundColor =
|
447 |
+
'#'+this.toString();
|
448 |
+
styleElement.style.color =
|
449 |
+
0.213 * this.rgb[0] +
|
450 |
+
0.715 * this.rgb[1] +
|
451 |
+
0.072 * this.rgb[2]
|
452 |
+
< 0.5 ? '#FFF' : '#000';
|
453 |
+
}
|
454 |
+
if(!(flags & leavePad) && isPickerOwner()) {
|
455 |
+
redrawPad();
|
456 |
+
}
|
457 |
+
if(!(flags & leaveSld) && isPickerOwner()) {
|
458 |
+
redrawSld();
|
459 |
+
}
|
460 |
+
};
|
461 |
+
|
462 |
+
|
463 |
+
this.fromHSV = function(h, s, v, flags) { // null = don't change
|
464 |
+
if(h !== null) { h = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, h)); }
|
465 |
+
if(s !== null) { s = Math.max(0.0, this.minS, Math.min(1.0, this.maxS, s)); }
|
466 |
+
if(v !== null) { v = Math.max(0.0, this.minV, Math.min(1.0, this.maxV, v)); }
|
467 |
+
|
468 |
+
this.rgb = HSV_RGB(
|
469 |
+
h===null ? this.hsv[0] : (this.hsv[0]=h),
|
470 |
+
s===null ? this.hsv[1] : (this.hsv[1]=s),
|
471 |
+
v===null ? this.hsv[2] : (this.hsv[2]=v)
|
472 |
+
);
|
473 |
+
|
474 |
+
this.exportColor(flags);
|
475 |
+
};
|
476 |
+
|
477 |
+
|
478 |
+
this.fromRGB = function(r, g, b, flags) { // null = don't change
|
479 |
+
if(r !== null) { r = Math.max(0.0, Math.min(1.0, r)); }
|
480 |
+
if(g !== null) { g = Math.max(0.0, Math.min(1.0, g)); }
|
481 |
+
if(b !== null) { b = Math.max(0.0, Math.min(1.0, b)); }
|
482 |
+
|
483 |
+
var hsv = RGB_HSV(
|
484 |
+
r===null ? this.rgb[0] : r,
|
485 |
+
g===null ? this.rgb[1] : g,
|
486 |
+
b===null ? this.rgb[2] : b
|
487 |
+
);
|
488 |
+
if(hsv[0] !== null) {
|
489 |
+
this.hsv[0] = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, hsv[0]));
|
490 |
+
}
|
491 |
+
if(hsv[2] !== 0) {
|
492 |
+
this.hsv[1] = hsv[1]===null ? null : Math.max(0.0, this.minS, Math.min(1.0, this.maxS, hsv[1]));
|
493 |
+
}
|
494 |
+
this.hsv[2] = hsv[2]===null ? null : Math.max(0.0, this.minV, Math.min(1.0, this.maxV, hsv[2]));
|
495 |
+
|
496 |
+
// update RGB according to final HSV, as some values might be trimmed
|
497 |
+
var rgb = HSV_RGB(this.hsv[0], this.hsv[1], this.hsv[2]);
|
498 |
+
this.rgb[0] = rgb[0];
|
499 |
+
this.rgb[1] = rgb[1];
|
500 |
+
this.rgb[2] = rgb[2];
|
501 |
+
|
502 |
+
this.exportColor(flags);
|
503 |
+
};
|
504 |
+
|
505 |
+
|
506 |
+
this.fromString = function(hex, flags) {
|
507 |
+
var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
|
508 |
+
if(!m) {
|
509 |
+
return false;
|
510 |
+
} else {
|
511 |
+
if(m[1].length === 6) { // 6-char notation
|
512 |
+
this.fromRGB(
|
513 |
+
parseInt(m[1].substr(0,2),16) / 255,
|
514 |
+
parseInt(m[1].substr(2,2),16) / 255,
|
515 |
+
parseInt(m[1].substr(4,2),16) / 255,
|
516 |
+
flags
|
517 |
+
);
|
518 |
+
} else { // 3-char notation
|
519 |
+
this.fromRGB(
|
520 |
+
parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
|
521 |
+
parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
|
522 |
+
parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
|
523 |
+
flags
|
524 |
+
);
|
525 |
+
}
|
526 |
+
return true;
|
527 |
+
}
|
528 |
+
};
|
529 |
+
|
530 |
+
|
531 |
+
this.toString = function() {
|
532 |
+
return (
|
533 |
+
(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
|
534 |
+
(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
|
535 |
+
(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
|
536 |
+
);
|
537 |
+
};
|
538 |
+
|
539 |
+
|
540 |
+
function RGB_HSV(r, g, b) {
|
541 |
+
var n = Math.min(Math.min(r,g),b);
|
542 |
+
var v = Math.max(Math.max(r,g),b);
|
543 |
+
var m = v - n;
|
544 |
+
if(m === 0) { return [ null, 0, v ]; }
|
545 |
+
var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
|
546 |
+
return [ h===6?0:h, m/v, v ];
|
547 |
+
}
|
548 |
+
|
549 |
+
|
550 |
+
function HSV_RGB(h, s, v) {
|
551 |
+
if(h === null) { return [ v, v, v ]; }
|
552 |
+
var i = Math.floor(h);
|
553 |
+
var f = i%2 ? h-i : 1-(h-i);
|
554 |
+
var m = v * (1 - s);
|
555 |
+
var n = v * (1 - s*f);
|
556 |
+
switch(i) {
|
557 |
+
case 6:
|
558 |
+
case 0: return [v,n,m];
|
559 |
+
case 1: return [n,v,m];
|
560 |
+
case 2: return [m,v,n];
|
561 |
+
case 3: return [m,n,v];
|
562 |
+
case 4: return [n,m,v];
|
563 |
+
case 5: return [v,m,n];
|
564 |
+
}
|
565 |
+
}
|
566 |
+
|
567 |
+
|
568 |
+
function removePicker() {
|
569 |
+
delete jscolor.picker.owner;
|
570 |
+
document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
|
571 |
+
}
|
572 |
+
|
573 |
+
|
574 |
+
function drawPicker(x, y) {
|
575 |
+
if(!jscolor.picker) {
|
576 |
+
jscolor.picker = {
|
577 |
+
box : document.createElement('div'),
|
578 |
+
boxB : document.createElement('div'),
|
579 |
+
pad : document.createElement('div'),
|
580 |
+
padB : document.createElement('div'),
|
581 |
+
padM : document.createElement('div'),
|
582 |
+
sld : document.createElement('div'),
|
583 |
+
sldB : document.createElement('div'),
|
584 |
+
sldM : document.createElement('div'),
|
585 |
+
btn : document.createElement('div'),
|
586 |
+
btnS : document.createElement('span'),
|
587 |
+
btnT : document.createTextNode(THIS.pickerCloseText)
|
588 |
+
};
|
589 |
+
for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
|
590 |
+
var seg = document.createElement('div');
|
591 |
+
seg.style.height = segSize+'px';
|
592 |
+
seg.style.fontSize = '1px';
|
593 |
+
seg.style.lineHeight = '0';
|
594 |
+
jscolor.picker.sld.appendChild(seg);
|
595 |
+
}
|
596 |
+
jscolor.picker.sldB.appendChild(jscolor.picker.sld);
|
597 |
+
jscolor.picker.box.appendChild(jscolor.picker.sldB);
|
598 |
+
jscolor.picker.box.appendChild(jscolor.picker.sldM);
|
599 |
+
jscolor.picker.padB.appendChild(jscolor.picker.pad);
|
600 |
+
jscolor.picker.box.appendChild(jscolor.picker.padB);
|
601 |
+
jscolor.picker.box.appendChild(jscolor.picker.padM);
|
602 |
+
jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
|
603 |
+
jscolor.picker.btn.appendChild(jscolor.picker.btnS);
|
604 |
+
jscolor.picker.box.appendChild(jscolor.picker.btn);
|
605 |
+
jscolor.picker.boxB.appendChild(jscolor.picker.box);
|
606 |
+
}
|
607 |
+
|
608 |
+
var p = jscolor.picker;
|
609 |
+
|
610 |
+
// controls interaction
|
611 |
+
p.box.onmouseup =
|
612 |
+
p.box.onmouseout = function() { target.focus(); };
|
613 |
+
p.box.onmousedown = function() { abortBlur=true; };
|
614 |
+
p.box.onmousemove = function(e) {
|
615 |
+
if (holdPad || holdSld) {
|
616 |
+
holdPad && setPad(e);
|
617 |
+
holdSld && setSld(e);
|
618 |
+
if (document.selection) {
|
619 |
+
document.selection.empty();
|
620 |
+
} else if (window.getSelection) {
|
621 |
+
window.getSelection().removeAllRanges();
|
622 |
+
}
|
623 |
+
dispatchImmediateChange();
|
624 |
+
}
|
625 |
+
};
|
626 |
+
if('ontouchstart' in window) { // if touch device
|
627 |
+
var handle_touchmove = function(e) {
|
628 |
+
var event={
|
629 |
+
'offsetX': e.touches[0].pageX-touchOffset.X,
|
630 |
+
'offsetY': e.touches[0].pageY-touchOffset.Y
|
631 |
+
};
|
632 |
+
if (holdPad || holdSld) {
|
633 |
+
holdPad && setPad(event);
|
634 |
+
holdSld && setSld(event);
|
635 |
+
dispatchImmediateChange();
|
636 |
+
}
|
637 |
+
e.stopPropagation(); // prevent move "view" on broswer
|
638 |
+
e.preventDefault(); // prevent Default - Android Fix (else android generated only 1-2 touchmove events)
|
639 |
+
};
|
640 |
+
p.box.removeEventListener('touchmove', handle_touchmove, false)
|
641 |
+
p.box.addEventListener('touchmove', handle_touchmove, false)
|
642 |
+
}
|
643 |
+
p.padM.onmouseup =
|
644 |
+
p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
|
645 |
+
p.padM.onmousedown = function(e) {
|
646 |
+
// if the slider is at the bottom, move it up
|
647 |
+
switch(modeID) {
|
648 |
+
case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;
|
649 |
+
case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;
|
650 |
+
}
|
651 |
+
holdSld=false;
|
652 |
+
holdPad=true;
|
653 |
+
setPad(e);
|
654 |
+
dispatchImmediateChange();
|
655 |
+
};
|
656 |
+
if('ontouchstart' in window) {
|
657 |
+
p.padM.addEventListener('touchstart', function(e) {
|
658 |
+
touchOffset={
|
659 |
+
'X': e.target.offsetParent.offsetLeft,
|
660 |
+
'Y': e.target.offsetParent.offsetTop
|
661 |
+
};
|
662 |
+
this.onmousedown({
|
663 |
+
'offsetX':e.touches[0].pageX-touchOffset.X,
|
664 |
+
'offsetY':e.touches[0].pageY-touchOffset.Y
|
665 |
+
});
|
666 |
+
});
|
667 |
+
}
|
668 |
+
p.sldM.onmouseup =
|
669 |
+
p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
|
670 |
+
p.sldM.onmousedown = function(e) {
|
671 |
+
holdPad=false;
|
672 |
+
holdSld=true;
|
673 |
+
setSld(e);
|
674 |
+
dispatchImmediateChange();
|
675 |
+
};
|
676 |
+
if('ontouchstart' in window) {
|
677 |
+
p.sldM.addEventListener('touchstart', function(e) {
|
678 |
+
touchOffset={
|
679 |
+
'X': e.target.offsetParent.offsetLeft,
|
680 |
+
'Y': e.target.offsetParent.offsetTop
|
681 |
+
};
|
682 |
+
this.onmousedown({
|
683 |
+
'offsetX':e.touches[0].pageX-touchOffset.X,
|
684 |
+
'offsetY':e.touches[0].pageY-touchOffset.Y
|
685 |
+
});
|
686 |
+
});
|
687 |
+
}
|
688 |
+
|
689 |
+
// picker
|
690 |
+
var dims = getPickerDims(THIS);
|
691 |
+
p.box.style.width = dims[0] + 'px';
|
692 |
+
p.box.style.height = dims[1] + 'px';
|
693 |
+
|
694 |
+
// picker border
|
695 |
+
p.boxB.style.position = 'absolute';
|
696 |
+
p.boxB.style.clear = 'both';
|
697 |
+
p.boxB.style.left = x+'px';
|
698 |
+
p.boxB.style.top = y+'px';
|
699 |
+
p.boxB.style.zIndex = THIS.pickerZIndex;
|
700 |
+
p.boxB.style.border = THIS.pickerBorder+'px solid';
|
701 |
+
p.boxB.style.borderColor = THIS.pickerBorderColor;
|
702 |
+
p.boxB.style.background = THIS.pickerFaceColor;
|
703 |
+
|
704 |
+
// pad image
|
705 |
+
p.pad.style.width = jscolor.images.pad[0]+'px';
|
706 |
+
p.pad.style.height = jscolor.images.pad[1]+'px';
|
707 |
+
|
708 |
+
// pad border
|
709 |
+
p.padB.style.position = 'absolute';
|
710 |
+
p.padB.style.left = THIS.pickerFace+'px';
|
711 |
+
p.padB.style.top = THIS.pickerFace+'px';
|
712 |
+
p.padB.style.border = THIS.pickerInset+'px solid';
|
713 |
+
p.padB.style.borderColor = THIS.pickerInsetColor;
|
714 |
+
|
715 |
+
// pad mouse area
|
716 |
+
p.padM.style.position = 'absolute';
|
717 |
+
p.padM.style.left = '0';
|
718 |
+
p.padM.style.top = '0';
|
719 |
+
p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
|
720 |
+
p.padM.style.height = p.box.style.height;
|
721 |
+
p.padM.style.cursor = 'crosshair';
|
722 |
+
|
723 |
+
// slider image
|
724 |
+
p.sld.style.overflow = 'hidden';
|
725 |
+
p.sld.style.width = jscolor.images.sld[0]+'px';
|
726 |
+
p.sld.style.height = jscolor.images.sld[1]+'px';
|
727 |
+
|
728 |
+
// slider border
|
729 |
+
p.sldB.style.display = THIS.slider ? 'block' : 'none';
|
730 |
+
p.sldB.style.position = 'absolute';
|
731 |
+
p.sldB.style.right = THIS.pickerFace+'px';
|
732 |
+
p.sldB.style.top = THIS.pickerFace+'px';
|
733 |
+
p.sldB.style.border = THIS.pickerInset+'px solid';
|
734 |
+
p.sldB.style.borderColor = THIS.pickerInsetColor;
|
735 |
+
|
736 |
+
// slider mouse area
|
737 |
+
p.sldM.style.display = THIS.slider ? 'block' : 'none';
|
738 |
+
p.sldM.style.position = 'absolute';
|
739 |
+
p.sldM.style.right = '0';
|
740 |
+
p.sldM.style.top = '0';
|
741 |
+
p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
|
742 |
+
p.sldM.style.height = p.box.style.height;
|
743 |
+
try {
|
744 |
+
p.sldM.style.cursor = 'pointer';
|
745 |
+
} catch(eOldIE) {
|
746 |
+
p.sldM.style.cursor = 'hand';
|
747 |
+
}
|
748 |
+
|
749 |
+
// "close" button
|
750 |
+
function setBtnBorder() {
|
751 |
+
var insetColors = THIS.pickerInsetColor.split(/\s+/);
|
752 |
+
var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
|
753 |
+
p.btn.style.borderColor = pickerOutsetColor;
|
754 |
+
}
|
755 |
+
p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
|
756 |
+
p.btn.style.position = 'absolute';
|
757 |
+
p.btn.style.left = THIS.pickerFace + 'px';
|
758 |
+
p.btn.style.bottom = THIS.pickerFace + 'px';
|
759 |
+
p.btn.style.padding = '0 15px';
|
760 |
+
p.btn.style.height = '18px';
|
761 |
+
p.btn.style.border = THIS.pickerInset + 'px solid';
|
762 |
+
setBtnBorder();
|
763 |
+
p.btn.style.color = THIS.pickerButtonColor;
|
764 |
+
p.btn.style.font = '12px sans-serif';
|
765 |
+
p.btn.style.textAlign = 'center';
|
766 |
+
try {
|
767 |
+
p.btn.style.cursor = 'pointer';
|
768 |
+
} catch(eOldIE) {
|
769 |
+
p.btn.style.cursor = 'hand';
|
770 |
+
}
|
771 |
+
p.btn.onmousedown = function () {
|
772 |
+
THIS.hidePicker();
|
773 |
+
};
|
774 |
+
p.btnS.style.lineHeight = p.btn.style.height;
|
775 |
+
|
776 |
+
// load images in optimal order
|
777 |
+
switch(modeID) {
|
778 |
+
case 0: var padImg = 'hs.png'; break;
|
779 |
+
case 1: var padImg = 'hv.png'; break;
|
780 |
+
}
|
781 |
+
p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
|
782 |
+
p.padM.style.backgroundRepeat = "no-repeat";
|
783 |
+
p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
|
784 |
+
p.sldM.style.backgroundRepeat = "no-repeat";
|
785 |
+
p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
|
786 |
+
p.pad.style.backgroundRepeat = "no-repeat";
|
787 |
+
p.pad.style.backgroundPosition = "0 0";
|
788 |
+
|
789 |
+
// place pointers
|
790 |
+
redrawPad();
|
791 |
+
redrawSld();
|
792 |
+
|
793 |
+
jscolor.picker.owner = THIS;
|
794 |
+
document.getElementsByTagName('body')[0].appendChild(p.boxB);
|
795 |
+
}
|
796 |
+
|
797 |
+
|
798 |
+
function getPickerDims(o) {
|
799 |
+
var dims = [
|
800 |
+
2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
|
801 |
+
(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
|
802 |
+
o.pickerClosable ?
|
803 |
+
4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
|
804 |
+
2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
|
805 |
+
];
|
806 |
+
return dims;
|
807 |
+
}
|
808 |
+
|
809 |
+
|
810 |
+
function redrawPad() {
|
811 |
+
// redraw the pad pointer
|
812 |
+
switch(modeID) {
|
813 |
+
case 0: var yComponent = 1; break;
|
814 |
+
case 1: var yComponent = 2; break;
|
815 |
+
}
|
816 |
+
var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
|
817 |
+
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
|
818 |
+
jscolor.picker.padM.style.backgroundPosition =
|
819 |
+
(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
|
820 |
+
(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
|
821 |
+
|
822 |
+
// redraw the slider image
|
823 |
+
var seg = jscolor.picker.sld.childNodes;
|
824 |
+
|
825 |
+
switch(modeID) {
|
826 |
+
case 0:
|
827 |
+
var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
|
828 |
+
for(var i=0; i<seg.length; i+=1) {
|
829 |
+
seg[i].style.backgroundColor = 'rgb('+
|
830 |
+
(rgb[0]*(1-i/seg.length)*100)+'%,'+
|
831 |
+
(rgb[1]*(1-i/seg.length)*100)+'%,'+
|
832 |
+
(rgb[2]*(1-i/seg.length)*100)+'%)';
|
833 |
+
}
|
834 |
+
break;
|
835 |
+
case 1:
|
836 |
+
var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
|
837 |
+
var i = Math.floor(THIS.hsv[0]);
|
838 |
+
var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
|
839 |
+
switch(i) {
|
840 |
+
case 6:
|
841 |
+
case 0: rgb=[0,1,2]; break;
|
842 |
+
case 1: rgb=[1,0,2]; break;
|
843 |
+
case 2: rgb=[2,0,1]; break;
|
844 |
+
case 3: rgb=[2,1,0]; break;
|
845 |
+
case 4: rgb=[1,2,0]; break;
|
846 |
+
case 5: rgb=[0,2,1]; break;
|
847 |
+
}
|
848 |
+
for(var i=0; i<seg.length; i+=1) {
|
849 |
+
s = 1 - 1/(seg.length-1)*i;
|
850 |
+
c[1] = c[0] * (1 - s*f);
|
851 |
+
c[2] = c[0] * (1 - s);
|
852 |
+
seg[i].style.backgroundColor = 'rgb('+
|
853 |
+
(c[rgb[0]]*100)+'%,'+
|
854 |
+
(c[rgb[1]]*100)+'%,'+
|
855 |
+
(c[rgb[2]]*100)+'%)';
|
856 |
+
}
|
857 |
+
break;
|
858 |
+
}
|
859 |
+
}
|
860 |
+
|
861 |
+
|
862 |
+
function redrawSld() {
|
863 |
+
// redraw the slider pointer
|
864 |
+
switch(modeID) {
|
865 |
+
case 0: var yComponent = 2; break;
|
866 |
+
case 1: var yComponent = 1; break;
|
867 |
+
}
|
868 |
+
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
|
869 |
+
jscolor.picker.sldM.style.backgroundPosition =
|
870 |
+
'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
|
871 |
+
}
|
872 |
+
|
873 |
+
|
874 |
+
function isPickerOwner() {
|
875 |
+
return jscolor.picker && jscolor.picker.owner === THIS;
|
876 |
+
}
|
877 |
+
|
878 |
+
|
879 |
+
function blurTarget() {
|
880 |
+
if(valueElement === target) {
|
881 |
+
THIS.importColor();
|
882 |
+
}
|
883 |
+
if(THIS.pickerOnfocus) {
|
884 |
+
THIS.hidePicker();
|
885 |
+
}
|
886 |
+
}
|
887 |
+
|
888 |
+
|
889 |
+
function blurValue() {
|
890 |
+
if(valueElement !== target) {
|
891 |
+
THIS.importColor();
|
892 |
+
}
|
893 |
+
}
|
894 |
+
|
895 |
+
|
896 |
+
function setPad(e) {
|
897 |
+
var mpos = jscolor.getRelMousePos(e);
|
898 |
+
var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
|
899 |
+
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
|
900 |
+
switch(modeID) {
|
901 |
+
case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
|
902 |
+
case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
|
903 |
+
}
|
904 |
+
}
|
905 |
+
|
906 |
+
|
907 |
+
function setSld(e) {
|
908 |
+
var mpos = jscolor.getRelMousePos(e);
|
909 |
+
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
|
910 |
+
switch(modeID) {
|
911 |
+
case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
|
912 |
+
case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
|
913 |
+
}
|
914 |
+
}
|
915 |
+
|
916 |
+
|
917 |
+
function dispatchImmediateChange() {
|
918 |
+
if (THIS.onImmediateChange) {
|
919 |
+
var callback;
|
920 |
+
if (typeof THIS.onImmediateChange === 'string') {
|
921 |
+
callback = new Function (THIS.onImmediateChange);
|
922 |
+
} else {
|
923 |
+
callback = THIS.onImmediateChange;
|
924 |
+
}
|
925 |
+
callback.call(THIS);
|
926 |
+
}
|
927 |
+
}
|
928 |
+
|
929 |
+
|
930 |
+
var THIS = this;
|
931 |
+
var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
|
932 |
+
var abortBlur = false;
|
933 |
+
var
|
934 |
+
valueElement = jscolor.fetchElement(this.valueElement),
|
935 |
+
styleElement = jscolor.fetchElement(this.styleElement);
|
936 |
+
var
|
937 |
+
holdPad = false,
|
938 |
+
holdSld = false,
|
939 |
+
touchOffset = {};
|
940 |
+
var
|
941 |
+
leaveValue = 1<<0,
|
942 |
+
leaveStyle = 1<<1,
|
943 |
+
leavePad = 1<<2,
|
944 |
+
leaveSld = 1<<3;
|
945 |
+
|
946 |
+
// target
|
947 |
+
jscolor.addEvent(target, 'focus', function() {
|
948 |
+
if(THIS.pickerOnfocus) { THIS.showPicker(); }
|
949 |
+
});
|
950 |
+
jscolor.addEvent(target, 'blur', function() {
|
951 |
+
if(!abortBlur) {
|
952 |
+
window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
|
953 |
+
} else {
|
954 |
+
abortBlur = false;
|
955 |
+
}
|
956 |
+
});
|
957 |
+
|
958 |
+
// valueElement
|
959 |
+
if(valueElement) {
|
960 |
+
var updateField = function() {
|
961 |
+
THIS.fromString(valueElement.value, leaveValue);
|
962 |
+
dispatchImmediateChange();
|
963 |
+
};
|
964 |
+
jscolor.addEvent(valueElement, 'keyup', updateField);
|
965 |
+
jscolor.addEvent(valueElement, 'input', updateField);
|
966 |
+
jscolor.addEvent(valueElement, 'blur', blurValue);
|
967 |
+
valueElement.setAttribute('autocomplete', 'off');
|
968 |
+
}
|
969 |
+
|
970 |
+
// styleElement
|
971 |
+
if(styleElement) {
|
972 |
+
styleElement.jscStyle = {
|
973 |
+
backgroundImage : styleElement.style.backgroundImage,
|
974 |
+
backgroundColor : styleElement.style.backgroundColor,
|
975 |
+
color : styleElement.style.color
|
976 |
+
};
|
977 |
+
}
|
978 |
+
|
979 |
+
// require images
|
980 |
+
switch(modeID) {
|
981 |
+
case 0: jscolor.requireImage('hs.png'); break;
|
982 |
+
case 1: jscolor.requireImage('hv.png'); break;
|
983 |
+
}
|
984 |
+
jscolor.requireImage('cross.gif');
|
985 |
+
jscolor.requireImage('arrow.gif');
|
986 |
+
|
987 |
+
this.importColor();
|
988 |
+
}
|
989 |
+
|
990 |
+
};
|
991 |
+
|
992 |
+
|
993 |
+
jscolor.install();
|
js/responsivebannerslider/product-selector.js
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var VarienRulesForm = new Class.create();
|
2 |
+
VarienRulesForm.prototype = {
|
3 |
+
initialize : function(parent, newChildUrl){
|
4 |
+
this.parent = $(parent);
|
5 |
+
this.newChildUrl = newChildUrl;
|
6 |
+
this.shownElement = null;
|
7 |
+
this.updateElement = null;
|
8 |
+
this.chooserSelectedItems = $H({});
|
9 |
+
|
10 |
+
var elems = this.parent.getElementsByClassName('product-param');
|
11 |
+
for (var i=0; i<elems.length; i++) {
|
12 |
+
this.initParam(elems[i]);
|
13 |
+
}
|
14 |
+
|
15 |
+
var elems = this.parent.getElementsByClassName('product-param');
|
16 |
+
for (var i=0; i<elems.length; i++) {
|
17 |
+
var container = elems[i];
|
18 |
+
}
|
19 |
+
},
|
20 |
+
|
21 |
+
initParam: function (container) {
|
22 |
+
container.rulesObject = this;
|
23 |
+
var label = Element.down(container, '.label');
|
24 |
+
if (label) {
|
25 |
+
Event.observe(label, 'click', this.showParamInputField.bind(this, container));
|
26 |
+
}
|
27 |
+
var elem = Element.down(container, '.element');
|
28 |
+
if (elem) {
|
29 |
+
var trig = elem.down('.product-chooser-trigger');
|
30 |
+
if (trig) {
|
31 |
+
Event.observe(trig, 'click', this.toggleChooser.bind(this, container));
|
32 |
+
}
|
33 |
+
}
|
34 |
+
},
|
35 |
+
|
36 |
+
showChooserElement: function (chooser) {
|
37 |
+
this.chooserSelectedItems = $H({});
|
38 |
+
var values = this.updateElement.value.split(','), s = '';
|
39 |
+
for (i=0; i<values.length; i++) {
|
40 |
+
s = values[i].strip();
|
41 |
+
if (s!='') {
|
42 |
+
this.chooserSelectedItems.set(s,1);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
new Ajax.Request(chooser.getAttribute('url'), {
|
46 |
+
evalScripts: true,
|
47 |
+
parameters: {'form_key': FORM_KEY, 'selected[]':this.chooserSelectedItems.keys() },
|
48 |
+
onSuccess: function(transport) {
|
49 |
+
if (this._processSuccess(transport)) {
|
50 |
+
$(chooser).update(transport.responseText);
|
51 |
+
this.showChooserLoaded(chooser, transport);
|
52 |
+
}
|
53 |
+
}.bind(this),
|
54 |
+
onFailure: this._processFailure.bind(this)
|
55 |
+
});
|
56 |
+
},
|
57 |
+
|
58 |
+
showChooserLoaded: function(chooser, transport) {
|
59 |
+
chooser.style.display = 'block';
|
60 |
+
},
|
61 |
+
|
62 |
+
showChooser: function (container, event) {
|
63 |
+
var chooser = container.up('li');
|
64 |
+
if (!chooser) {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
chooser = chooser.down('.product-chooser');
|
68 |
+
if (!chooser) {
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
this.showChooserElement(chooser);
|
72 |
+
},
|
73 |
+
|
74 |
+
hideChooser: function (container, event) {
|
75 |
+
var chooser = container.up('li');
|
76 |
+
if (!chooser) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
chooser = chooser.down('.product-chooser');
|
80 |
+
if (!chooser) {
|
81 |
+
return;
|
82 |
+
}
|
83 |
+
chooser.style.display = 'none';
|
84 |
+
},
|
85 |
+
|
86 |
+
toggleChooser: function (container, event) {
|
87 |
+
var chooser = container.up('li').down('.product-chooser');
|
88 |
+
if (!chooser) {
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
if (chooser.style.display=='block') {
|
92 |
+
chooser.style.display = 'none';
|
93 |
+
this.cleanChooser(container, event);
|
94 |
+
} else {
|
95 |
+
this.showChooserElement(chooser);
|
96 |
+
}
|
97 |
+
},
|
98 |
+
|
99 |
+
cleanChooser: function (container, event) {
|
100 |
+
var chooser = container.up('li').down('.product-chooser');
|
101 |
+
if (!chooser) {
|
102 |
+
return;
|
103 |
+
}
|
104 |
+
chooser.innerHTML = '';
|
105 |
+
},
|
106 |
+
|
107 |
+
showParamInputField: function (container, event) {
|
108 |
+
if (this.shownElement) {
|
109 |
+
this.hideParamInputField(this.shownElement, event);
|
110 |
+
}
|
111 |
+
|
112 |
+
Element.addClassName(container, 'product-param-edit');
|
113 |
+
var elemContainer = Element.down(container, '.element');
|
114 |
+
|
115 |
+
var elem = Element.down(elemContainer, 'input.input-text');
|
116 |
+
if (elem) {
|
117 |
+
elem.focus();
|
118 |
+
this.updateElement = elem;
|
119 |
+
}
|
120 |
+
|
121 |
+
var elem = Element.down(elemContainer, '.element-value-changer');
|
122 |
+
if (elem) {
|
123 |
+
elem.focus();
|
124 |
+
}
|
125 |
+
|
126 |
+
this.shownElement = container;
|
127 |
+
},
|
128 |
+
|
129 |
+
hideParamInputField: function (container, event) {
|
130 |
+
Element.removeClassName(container, 'product-param-edit');
|
131 |
+
var label = Element.down(container, '.label'), elem;
|
132 |
+
|
133 |
+
elem = Element.down(container, '.element-value-changer');
|
134 |
+
if (elem.value) {
|
135 |
+
this.addRuleNewChild(elem);
|
136 |
+
}
|
137 |
+
elem.value = '';
|
138 |
+
|
139 |
+
this.hideChooser(container, event);
|
140 |
+
this.updateElement = null;
|
141 |
+
|
142 |
+
this.shownElement = null;
|
143 |
+
},
|
144 |
+
|
145 |
+
_processSuccess : function(transport) {
|
146 |
+
if (transport.responseText.isJSON()) {
|
147 |
+
var response = transport.responseText.evalJSON()
|
148 |
+
if (response.error) {
|
149 |
+
alert(response.message);
|
150 |
+
}
|
151 |
+
if(response.ajaxExpired && response.ajaxRedirect) {
|
152 |
+
setLocation(response.ajaxRedirect);
|
153 |
+
}
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
return true;
|
157 |
+
},
|
158 |
+
|
159 |
+
_processFailure : function(transport) {
|
160 |
+
location.href = BASE_URL;
|
161 |
+
},
|
162 |
+
|
163 |
+
chooserGridRowInit: function (grid, row) {
|
164 |
+
if (!grid.reloadParams) {
|
165 |
+
grid.reloadParams = {'selected[]':this.chooserSelectedItems.keys()};
|
166 |
+
}
|
167 |
+
},
|
168 |
+
|
169 |
+
chooserGridRowClick: function (grid, event) {
|
170 |
+
var trElement = Event.findElement(event, 'tr');
|
171 |
+
var isInput = Event.element(event).tagName == 'INPUT';
|
172 |
+
if (trElement) {
|
173 |
+
var checkbox = Element.select(trElement, 'input');
|
174 |
+
if (checkbox[0]) {
|
175 |
+
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
|
176 |
+
grid.setCheckboxChecked(checkbox[0], checked);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
},
|
180 |
+
|
181 |
+
chooserGridCheckboxCheck: function (grid, element, checked) {
|
182 |
+
if (checked) {
|
183 |
+
if (!element.up('th')) {
|
184 |
+
this.chooserSelectedItems.set(element.value,1);
|
185 |
+
}
|
186 |
+
} else {
|
187 |
+
this.chooserSelectedItems.unset(element.value);
|
188 |
+
}
|
189 |
+
grid.reloadParams = {'selected[]':this.chooserSelectedItems.keys()};
|
190 |
+
this.updateElement.value = this.chooserSelectedItems.keys().join(', ');
|
191 |
+
}
|
192 |
+
|
193 |
+
};
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Responsive_Banner_Slider</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>show responsive banner slider on CMS pages, Category pages, Product View Pages based on selection you did from admin side.</summary>
|
10 |
+
<description>Responsive Banner Slider Extension is generally used to show responsive banner slider on any pages, CMS pages, Category pages, Product View pages based on selection you did from admin side. You can create group of responsive slider from admin side and show responsive slider as a group on frontend. 
|
11 |
+
This extension is easy to setup and give many options for settings from admin. You can set Enabled/Disabled responsive banner slider Extension in product view page, CMS page and category page, set include jquery library from admin.
|
12 |
+
</description>
|
13 |
+
<notes>Capacity Web Solutions - Responsive Banner Slider</notes>
|
14 |
+
<authors><author><name>Capacity Web Solutions</name><user>capacitywebsolutions</user><email>magento@capacitywebsolutions.com</email></author></authors>
|
15 |
+
<date>2015-05-11</date>
|
16 |
+
<time>04:15:33</time>
|
17 |
+
<contents><target name="mageetc"><dir name="modules"><file name="CapacityWebSolutions_Responsivebannerslider.xml" hash="2a99a1b776e46e0f263fd11bbf3734e6"/></dir></target><target name="magecommunity"><dir name="CapacityWebSolutions"><dir name="Responsivebannerslider"><dir name="Block"><dir name="Adminhtml"><dir name="Slider"><dir name="Edit"><file name="Form.php" hash="c693bcac807af9a09d440eb168eb3fe2"/><dir name="Tab"><file name="Form.php" hash="6663742076a36938f411db58de0514e5"/></dir><file name="Tabs.php" hash="8925bab36ab5c00e08c11550428f2779"/></dir><file name="Edit.php" hash="50a6189710bd2c95fe797dea961e2b25"/><file name="Grid.php" hash="5aacb488667b8992fb2af5d18570d355"/><dir name="Renderer"><file name="Groups.php" hash="64bf193cdbe365b53f740f42171f1264"/></dir></dir><file name="Slider.php" hash="f43c568cf9cdb2ab00cdcc5570be0124"/><dir name="Slidergroup"><dir name="Edit"><file name="Form.php" hash="15e4ceaab37f2fa892538a832697e72d"/><dir name="Tab"><file name="Categories.php" hash="d340ac103065e332355c25db225dce19"/><file name="Code.php" hash="bc6d2bfc008c7dc062d12f0b95d1b1bb"/><file name="Form.php" hash="1e1f0bec054bbe9ddc779a91e7f1d901"/><file name="Pages.php" hash="0334b4b413b08fad246b1e75a1295b02"/><file name="Product.php" hash="ba020e27a3f51a75d1532b4e93b12564"/><file name="Sliders.php" hash="76bad616a4aeb6038a9b93fe85ec9fe8"/></dir><file name="Tabs.php" hash="7d50ea95fc1b3d889a5f7bfaa0b50961"/></dir><file name="Edit.php" hash="53f1d1360409a52f6d145a449acd98c7"/><file name="Grid.php" hash="443805684f17f487242a12e16bd22415"/></dir><file name="Slidergroup.php" hash="991c32858debc3508cb9a3f4a10a23e6"/></dir><dir name="View"><file name="Bottom.php" hash="9789f6620c9b423fa0fd008ca8b891d6"/><file name="Top.php" hash="4e40ef544497f9ecf2a8475416a856eb"/></dir><file name="View.php" hash="4cb60d2f10505e4de132c7ac4a637593"/></dir><dir name="Helper"><file name="Data.php" hash="7ba54649e54da8b57b88806585a7df55"/></dir><dir name="Model"><file name="Categories.php" hash="8cac29d0e10ed8f42a9715ec171fe8a3"/><file name="Category.php" hash="aa800bbb91d4eed0172493aadb6278bb"/><dir name="Config"><file name="Effect.php" hash="49b86e04e38bd1757bf56d18503e1264"/><dir name="Source"><file name="Animationdirection.php" hash="9904f3f77ecc8f5def84b5f0ac147bca"/><file name="Animationtype.php" hash="eb4341a59f0ed657427cc2e847774553"/><file name="Effect.php" hash="365bfe3aaa0fa7e8235bd9131670ab91"/><file name="Navigation.php" hash="83af4ecbf1e4ab33261a9b5974db1d5d"/><file name="Navigationarrow.php" hash="78e6de8297d88504f0de352027076d76"/><file name="Navigationstyle.php" hash="84087644e9b439178d9a5eeb1a217cab"/><file name="Pages.php" hash="025071e0c33ec7fae54255f6309b60b8"/><file name="Paginationposition.php" hash="d672cc31fd6a35fcdae6b8658bde95a1"/><file name="Paginationstyle.php" hash="a8db3db4636afe540f5148bf4a0aab01"/><file name="Position.php" hash="0d221cdb4209f1dd469d2512d6a76e41"/><file name="Status.php" hash="1217aaf60bdb16c6e05236bbfc663b9a"/><file name="Theme.php" hash="50d77ffc3961aa7cab380d1ef13ccf0c"/><file name="Type.php" hash="249d3e740618010a249029a7bb9f2de1"/><file name="Urltarget.php" hash="f94e29c587735a3371ec951de478911c"/><file name="Video.php" hash="3aebf9b4033a31b8e795954909293ba9"/></dir></dir><dir name="Mysql4"><dir name="Categories"><file name="Collection.php" hash="a6f9741b66824a9fa833ade979a3a742"/></dir><file name="Categories.php" hash="af9c86a9f68ff02398e281f5f9ddbd8a"/><dir name="Page"><file name="Collection.php" hash="d5c87f75df5dba2ccb9f4c69a1ae01ca"/></dir><file name="Page.php" hash="6f9edf1be7105da0237dff5f1e64dc4e"/><dir name="Product"><file name="Collection.php" hash="a7205246e7aa75e22ea0d40efdc42595"/></dir><file name="Product.php" hash="6f4fe1a80df501a543efa6ddd044fa32"/><dir name="Responsivebannerslider"><file name="Collection.php" hash="9f2ded0948a1dd2c842e8636a4136c6b"/></dir><file name="Responsivebannerslider.php" hash="79d630dad9ce750cc53e0b5783927671"/><dir name="Slide"><file name="Collection.php" hash="10b7ee679e1c02de23000faf2146c38d"/></dir><file name="Slide.php" hash="63ed667457c4543861d8ae3ddb3784cf"/><dir name="Store"><file name="Collection.php" hash="83a4477b9ea24237b4aa151c223e3610"/></dir><file name="Store.php" hash="dc35d5d57d9aed5adcdd350df8e70468"/></dir><file name="Observer.php" hash="15a4bab058ed736878f0bde325c8049c"/><file name="Page.php" hash="ce06882b913b33fbdd20bb413004e8d1"/><file name="Product.php" hash="619f0b5ae7de3642fec5aa563e470640"/><file name="Responsivebannerslider.php" hash="308eb76b21f2cbf3403e2f9186213ca1"/><file name="Slide.php" hash="444dc63f5a09ed39bf94f3f1a19ccc07"/><file name="Status.php" hash="e06821c830b4e225d31035949ea117f1"/><file name="Store.php" hash="1828b5e27442c34c1b4faaa9121fcf99"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SliderController.php" hash="5c941255da5657c283dc493e60ab4a49"/><file name="SlidergroupController.php" hash="6b6f52173ca70cdd656c108cf94b1e8f"/></dir><file name="IndexController.php" hash="b9e855e216650c60383de700e844afa7"/></dir><dir name="etc"><file name="config.xml" hash="fa7d2faac0ac196f2e50371f3f2962e9"/><file name="system.xml" hash="0367eca766a9b9560a07692077dfc50b"/></dir><dir name="sql"><dir name="responsivebannerslider_setup"><file name="mysql4-install-1.0.0.php" hash="a3ff6eea114f0c77c308eab7ea8e6130"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="responsivebannerslider"><file name="slider.phtml" hash="199af5b770709a2697b4a24b6a7f7c2a"/></dir></dir><dir name="layout"><file name="responsivebannerslider.xml" hash="7d68272277e21dcda469e0f324bfae83"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="responsivebannerslider.xml" hash="0fd874a3c971f07fd6dc9c43d7298c74"/></dir><dir name="template"><dir name="responsivebannerslider"><dir name="category"><dir name="edit"><dir name="tab"><file name="categories.phtml" hash="95f4e5af33719a2543c73bc2eaae7395"/><file name="product.phtml" hash="8c289cbb0690fae8ea3819269bb369c1"/></dir></dir></dir><file name="code.phtml" hash="e2f283ad329cbb0be32d4bb10547b4f8"/><file name="group.phtml" hash="d61dc612ed18ad9d463dcce2b21149c2"/><file name="store.phtml" hash="9d96b0194b3a4863b44920fccc1db4d2"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="responsivebannerslider"><file name="froogaloop.js" hash="e743b8d812558184ec3d4cae1038d551"/><file name="jquery.easing.js" hash="7a5ecdcd9a7623fbe340b9ab87e87d74"/><file name="jquery.fitvid.js" hash="c6f6443bff74dd462b30e5445ed551f3"/><file name="jquery.flexslider.js" hash="b9f34e8a6cf9e4a5f07bf17dec695b2d"/><file name="jquery.lazy.js" hash="fc16f364749bfc6613f981e443512d44"/><file name="jquery.min.js" hash="8101d596b2b8fa35fe3a634ea342d7c3"/><dir name="jscolor"><file name="Thumbs.db" hash="32fb573f166c0f3a4556474b2be54a05"/><file name="arrow.gif" hash="5034704a76cd55c1cbcbc58ea6bf523f"/><file name="cross.gif" hash="ba9a274b9323753cd95bc3b1eb2f4e5f"/><file name="hs.png" hash="fefa1a03d92ebad25c88dca94a0b63db"/><file name="hv.png" hash="990d71cada17da100653636cf8490884"/><file name="jscolor.js" hash="1a38f74bda8ecffcc0130ae4c40259ec"/></dir><file name="product-selector.js" hash="18edba645290825072641d0c032b0a0f"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="responsivebannerslider"><file name="Thumbs.db" hash="a1f695472e3ad7ea9a28e3da71c9601c"/><file name="bottom-shadow.png" hash="5f1ff2657b5f90226685492cefa866f6"/><file name="default.css" hash="50332279bee1d28f8ebb72a76dc41ba4"/><dir name="fonts"><file name="cwsarw.eot" hash="41f04937f0acde47c88f749f001bb12f"/><file name="cwsarw.svg" hash="07131191014e36c08d6a67e34d74b709"/><file name="cwsarw.ttf" hash="4006f9d9fa6d69039f9c87bdc9b58c0f"/><file name="cwsarw.woff" hash="a9149ac28397ca3af9949933fb53fb60"/></dir><file name="loading.gif" hash="5d25806dac7cbee5f894b13144783866"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="responsivebannerslider"><file name="cwsarw.eot" hash="41f04937f0acde47c88f749f001bb12f"/><file name="cwsarw.svg" hash="07131191014e36c08d6a67e34d74b709"/><file name="cwsarw.ttf" hash="4006f9d9fa6d69039f9c87bdc9b58c0f"/><file name="cwsarw.woff" hash="a9149ac28397ca3af9949933fb53fb60"/><file name="responsivebannerslider.css" hash="e03584b7abd8cef4f16aab5ff20e809e"/></dir></dir></dir></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.0.0</min><max>5.6.6</max></php></required></dependencies>
|
20 |
+
</package>
|
skin/adminhtml/default/default/responsivebannerslider/cwsarw.eot
ADDED
Binary file
|
skin/adminhtml/default/default/responsivebannerslider/cwsarw.svg
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata>Generated by IcoMoon</metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="icomoon" horiz-adv-x="1024">
|
7 |
+
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
+
<missing-glyph horiz-adv-x="1024" />
|
9 |
+
<glyph unicode=" " d="" horiz-adv-x="512" />
|
10 |
+
<glyph unicode="!" d="M0 960v-1024h1024v1024h-1024zM631.008 800c16.064 0 29.28-5.296 40-16l34-34c10.704-10.704 15.984-23.92 16-40-0.016-16.080-5.296-29.296-16-40l-218-218 218-216c10.704-11.92 15.984-25.536 16-41.008-0.016-15.456-5.296-28.272-16-38.992l-34-34c-10.72-10.72-23.936-16-40-16-16.080 0-29.296 5.28-40 16l-293.008 290.992c-10.704 10.72-16 23.936-16 40 0 16.080 5.296 29.296 16 40l293.008 291.008c10.704 10.704 23.92 16 40 16z" />
|
11 |
+
<glyph unicode="#" d="M0 960v-1024h1024v1024h-1024zM405.008 802c16.656 0 29.456-6.096 38.992-18l293.008-291.008c10.704-10.704 15.984-23.52 16-38.992-0.016-15.472-5.296-29.104-16-41.008l-293.008-290.992c-10.72-10.72-23.536-16-38.992-16-15.472 0-29.28 5.28-40 16l-35.008 34c-10.704 11.92-16 25.52-16 40.992s5.296 28.288 16 39.008l218 218-218 216c-10.704 11.92-16 25.52-16 40.992 0 15.488 5.296 28.304 16 39.008l35.008 34c9.52 11.904 23.328 18 40 18z" />
|
12 |
+
<glyph unicode="0" d="M0 960v-1024h1024v1024h-1024zM453.008 760l300-300-300-300-120 120 180 180-180 180 120 120z" />
|
13 |
+
<glyph unicode="3" d="M512 960c-282.768 0-512-229.232-512-512s229.232-512 512-512c282.768 0 512 229.232 512 512s-229.232 512-512 512zM572 744l120-120-180-180 180-180-120-120-300 300 300 300z" />
|
14 |
+
<glyph unicode="4" d="M512 960c-282.768 0-512-229.232-512-512s229.232-512 512-512c282.768 0 512 229.232 512 512s-229.232 512-512 512zM456 744l300-300-300-300-120 120 180 180-180 180 120 120z" />
|
15 |
+
<glyph unicode="7" d="M512 960c-282.768 0-512-229.232-512-512s229.232-512 512-512c282.768 0 512 229.232 512 512s-229.232 512-512 512zM583.008 732c12.848 0 23.424-4.432 32-13.008l28-26.992c8.56-8.576 11.984-19.136 12-32-0.016-12.864-3.44-24.432-12-33.008l-175.008-174 175.008-172.992c8.56-9.536 11.984-20.624 12-33.008-0.016-12.368-3.44-22.416-12-30.992l-28-27.008c-8.576-8.576-19.152-12.992-32-12.992-12.864 0-23.44 4.416-32 12.992l-234 233.008c-8.576 8.56-13.008 19.136-13.008 32s4.432 23.44 13.008 32l234 232.992c8.56 8.576 19.136 13.008 32 13.008z" />
|
16 |
+
<glyph unicode="8" d="M512 960c-282.768 0-512-229.232-512-512s229.232-512 512-512c282.768 0 512 229.232 512 512s-229.232 512-512 512zM441.008 732.992c13.328 0 23.36-4.48 30.992-14l235.008-232.992c8.56-8.56 11.984-18.624 12-31.008-0.016-12.368-3.44-23.472-12-32.992l-235.008-233.008c-8.576-8.576-18.624-12.992-30.992-12.992-12.384 0-23.424 4.416-32 12.992l-28 27.008c-8.576 9.536-13.008 20.624-13.008 32.992 0 12.384 4.432 22.432 13.008 31.008l174 174.992-174 172c-8.576 9.536-13.008 20.624-13.008 33.008s4.432 23.424 13.008 32l28 26.992c7.616 9.52 18.656 14 32 14z" />
|
17 |
+
<glyph unicode="9" d="M0 960v-1024h1024v1024h-1024zM588 760l120-120-180-180 180-180-120-120-300 300 300 300z" />
|
18 |
+
<glyph unicode="e" d="M597.333 789.333l128-128-192-192 192-192-128-128-320 320z" />
|
19 |
+
<glyph unicode="f" d="M384 789.333l-128-128 192-192-192-192 128-128 320 320z" />
|
20 |
+
<glyph unicode="i" d="M737.23 68.199c13.721-13.874 13.721-36.249 0-50.126s-35.89-13.874-49.614 0l-400.896 404.839c-13.721 13.874-13.721 36.302 0 50.126l400.896 404.889c13.721 13.874 35.89 13.874 49.614 0s13.721-36.249 0-50.126l-365.568-379.801 365.568-379.801z" />
|
21 |
+
<glyph unicode="j" d="M286.704 68.199c-13.721-13.874-13.721-36.249 0-50.126s35.89-13.874 49.614 0l400.896 404.839c13.721 13.874 13.721 36.302 0 50.126l-400.896 404.889c-13.721 13.874-35.89 13.874-49.614 0s-13.721-36.249 0-50.126l365.568-379.801-365.568-379.801z" />
|
22 |
+
<glyph unicode="k" d="M877.714 448v-73.143q0-30.286-18.571-51.714t-48.286-21.429h-402.286l167.429-168q21.714-20.571 21.714-51.429t-21.714-51.429l-42.857-43.429q-21.143-21.143-51.429-21.143-29.714 0-52 21.143l-372 372.571q-21.143 21.143-21.143 51.429 0 29.714 21.143 52l372 371.429q21.714 21.714 52 21.714 29.714 0 51.429-21.714l42.857-42.286q21.714-21.714 21.714-52t-21.714-52l-167.429-167.429h402.286q29.714 0 48.286-21.429t18.571-51.714z" horiz-adv-x="878" />
|
23 |
+
<glyph unicode="l" d="M841.143 411.429q0-30.857-21.143-52l-372-372q-22.286-21.143-52-21.143-29.143 0-51.429 21.143l-42.857 42.857q-21.714 21.714-21.714 52t21.714 52l167.429 167.429h-402.286q-29.714 0-48.286 21.429t-18.571 51.714v73.143q0 30.286 18.571 51.714t48.286 21.429h402.286l-167.429 168q-21.714 20.571-21.714 51.429t21.714 51.429l42.857 42.857q21.714 21.714 51.429 21.714 30.286 0 52-21.714l372-372q21.143-20 21.143-51.429z" horiz-adv-x="878" />
|
24 |
+
<glyph unicode="m" d="M358.286 649.143q0-7.429-5.714-13.143l-224.571-224.571 224.571-224.571q5.714-5.714 5.714-13.143t-5.714-13.143l-28.571-28.571q-5.714-5.714-13.143-5.714t-13.143 5.714l-266.286 266.286q-5.714 5.714-5.714 13.143t5.714 13.143l266.286 266.286q5.714 5.714 13.143 5.714t13.143-5.714l28.571-28.571q5.714-5.714 5.714-13.143z" horiz-adv-x="366" />
|
25 |
+
<glyph unicode="n" d="M340 411.429q0-7.429-5.714-13.143l-266.286-266.286q-5.714-5.714-13.143-5.714t-13.143 5.714l-28.571 28.571q-5.714 5.714-5.714 13.143t5.714 13.143l224.571 224.571-224.571 224.571q-5.714 5.714-5.714 13.143t5.714 13.143l28.571 28.571q5.714 5.714 13.143 5.714t13.143-5.714l266.286-266.286q5.714-5.714 5.714-13.143z" horiz-adv-x="366" />
|
26 |
+
<glyph unicode="o" d="M731.429 411.429v73.143q0 14.857-10.857 25.714t-25.714 10.857h-286.857l108 108q10.857 10.857 10.857 25.714t-10.857 25.714l-52 52q-10.286 10.286-25.714 10.286t-25.714-10.286l-258.857-258.857q-10.286-10.286-10.286-25.714t10.286-25.714l258.857-258.857q10.286-10.286 25.714-10.286t25.714 10.286l52 52q10.286 10.286 10.286 25.714t-10.286 25.714l-108 108h286.857q14.857 0 25.714 10.857t10.857 25.714zM877.714 448q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
|
27 |
+
<glyph unicode="p" d="M734.286 448q0 15.429-10.286 25.714l-258.857 258.857q-10.286 10.286-25.714 10.286t-25.714-10.286l-52-52q-10.286-10.286-10.286-25.714t10.286-25.714l108-108h-286.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h286.857l-108-108q-10.857-10.857-10.857-25.714t10.857-25.714l52-52q10.286-10.286 25.714-10.286t25.714 10.286l258.857 258.857q10.286 10.286 10.286 25.714zM877.714 448q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
|
28 |
+
<glyph unicode="q" d="M424 61.143l-372.571 372q-21.143 21.143-21.143 51.714t21.143 51.714l372.571 372q21.143 21.143 51.714 21.143t51.714-21.143l42.857-42.857q21.143-21.143 21.143-51.714t-21.143-51.714l-277.714-277.714 277.714-277.143q21.143-21.714 21.143-52t-21.143-51.429l-42.857-42.857q-21.143-21.143-51.714-21.143t-51.714 21.143z" horiz-adv-x="658" />
|
29 |
+
<glyph unicode="r" d="M628 484.571q0-29.714-21.143-52l-372.571-372q-21.143-21.143-51.429-21.143t-51.429 21.143l-43.429 42.857q-21.143 22.286-21.143 52 0 30.286 21.143 51.429l277.714 277.714-277.714 277.143q-21.143 22.286-21.143 52 0 30.286 21.143 51.429l43.429 42.857q20.571 21.714 51.429 21.714t51.429-21.714l372.571-372q21.143-21.143 21.143-51.429z" horiz-adv-x="658" />
|
30 |
+
<glyph unicode="w" d="M832 128l-192-192-512 512 512 512 192-192-320-320 320-320z" />
|
31 |
+
<glyph unicode="x" d="M128 128l192-192 512 512-512 512-192-192 320-320-320-320z" />
|
32 |
+
</font></defs></svg>
|
skin/adminhtml/default/default/responsivebannerslider/cwsarw.ttf
ADDED
Binary file
|
skin/adminhtml/default/default/responsivebannerslider/cwsarw.woff
ADDED
Binary file
|
skin/adminhtml/default/default/responsivebannerslider/responsivebannerslider.css
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@font-face {
|
2 |
+
font-family:'cwsarrow';
|
3 |
+
src: url('cwsarw.eot?eywnut');
|
4 |
+
src: url('cwsarw.eot?#iefixeywnut') format('embedded-opentype'),
|
5 |
+
url('cwsarw.woff?eywnut') format('woff'),
|
6 |
+
url('cwsarw.ttf?eywnut') format('truetype'),
|
7 |
+
url('cwsarw.svg?eywnut#icomoon') format('svg');
|
8 |
+
font-weight: normal; font-style: normal;
|
9 |
+
}
|
10 |
+
i.cws { color:#333; font-family:'cwsarrow'; font-size:20px; speak:none; font-style:normal; font-weight:normal; font-variant:normal; text-transform:none; line-height:1; /* Better Font Rendering =========== */
|
11 |
+
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
12 |
+
display:inline-block; width:20px; height:20px; letter-spacing:10px; }
|
13 |
+
|
14 |
+
.angle:before { content: "\69"; }
|
15 |
+
.angle:after { content: "\6a"; }
|
16 |
+
.angle_small:before { content: "\6d"; }
|
17 |
+
.angle_small:after { content: "\6e"; }
|
18 |
+
.angle_circle:before { content: "\37"; }
|
19 |
+
.angle_circle:after { content: "\38"; }
|
20 |
+
.angle_square:before { content: "\21"; }
|
21 |
+
.angle_square:after { content: "\23"; }
|
22 |
+
.arrow:before { content: "\6b"; }
|
23 |
+
.arrow:after { content: "\6c"; }
|
24 |
+
.arrow_circle:before { content: "\6f"; }
|
25 |
+
.arrow_circle:after { content: "\70"; }
|
26 |
+
.caret:before { content: "\65"; }
|
27 |
+
.caret:after { content: "\66"; }
|
28 |
+
.chevron:before { content: "\77"; }
|
29 |
+
.chevron:after { content: "\78"; }
|
30 |
+
.chevron_smooth:before { content: "\71"; }
|
31 |
+
.chevron_smooth:after { content: "\72"; }
|
32 |
+
.chevron_circle:before { content: "\33"; }
|
33 |
+
.chevron_circle:after { content: "\34"; }
|
34 |
+
.chevron_square:before { content: "\39"; }
|
35 |
+
.chevron_square:after { content: "\30"; }
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
.cws-chevSquareLeft:before { content: "\39"; }
|
44 |
+
.cws-chevSquareRight:before { content: "\30"; }
|
45 |
+
|
skin/frontend/base/default/css/responsivebannerslider/Thumbs.db
ADDED
Binary file
|
skin/frontend/base/default/css/responsivebannerslider/bottom-shadow.png
ADDED
Binary file
|
skin/frontend/base/default/css/responsivebannerslider/default.css
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@font-face {
|
2 |
+
font-family: 'cws-arrow';
|
3 |
+
src:url('fonts/cwsarw.eot');
|
4 |
+
src:url('fonts/cwsarw.eot?#iefix') format('embedded-opentype'),
|
5 |
+
url('fonts/cwsarw.woff') format('woff'),
|
6 |
+
url('fonts/cwsarw.ttf') format('truetype'),
|
7 |
+
url('fonts/cwsarw.svg#cws-arrow') format('svg');
|
8 |
+
font-weight: normal;
|
9 |
+
font-style: normal;
|
10 |
+
}
|
11 |
+
|
12 |
+
.cwsSlider * { margin:0; padding:0; box-sizing:border-box; }
|
13 |
+
.cwsSlider img { max-width:100%; }
|
14 |
+
.cwsSlider a { text-decoration:none; cursor:pointer; outline:none; }
|
15 |
+
.cwsSlider ul, .cwsSlider ul li,
|
16 |
+
.cwsSlider ol, .cwsSlider ol li { list-style:none !important; }
|
17 |
+
.cwsSlider .slides { zoom:1; }
|
18 |
+
|
19 |
+
/* Clearfix for the .slides element */
|
20 |
+
.loading {min-height: 300px; background: url('loading.gif') no-repeat center center;}
|
21 |
+
.slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
|
22 |
+
html[xmlns] .slides {display: block;}
|
23 |
+
* html .slides {height: 1%;}
|
24 |
+
|
25 |
+
.cws-arw a, .cws-pager,
|
26 |
+
.cws-viewport, ul.slides li { -webkit-transition:all .3s ease; -moz-transition:all .3s ease; -o-transition:all .3s ease; transition:all .3s ease; }
|
27 |
+
.cwsSlider .loading { max-height:300px; overflow:hidden; }
|
28 |
+
|
29 |
+
/**** Theme styles ****/
|
30 |
+
.cwsSlider { position:relative; margin:0 auto 25px; }
|
31 |
+
|
32 |
+
.cwsRwdSlider { position:relative; }
|
33 |
+
.cwsRwdSlider .slides li { position:relative; }
|
34 |
+
.cwsRwdSlider .slides li.video iframe { width:100%; }
|
35 |
+
|
36 |
+
.sliderdecs { color:#fff; width:45%; position:absolute; top:30px; right:50px; padding:20px; border-left:5px solid rgba(255,255,255,0.50); }
|
37 |
+
.sliderdecs h3 { color:#fff; margin:0; }
|
38 |
+
|
39 |
+
/* Crousel style */
|
40 |
+
.rwdCarousel { position:relative; }
|
41 |
+
.rwdCarousel .cws-viewport { position:relative; overflow:hidden; }
|
42 |
+
.rwdCarousel ul.slides li { flex:left; margin-right:15px; }
|
43 |
+
|
44 |
+
.defaultTheme .rwdCarousel ul.slides li { width:100px; padding:7px; border:1px solid #ddd; }
|
45 |
+
.dropShadow .rwdCarousel ul.slides { padding:3px; }
|
46 |
+
.dropShadow .rwdCarousel ul.slides li { width:100px; padding:7px; box-shadow:2px 2px 4px 0 rgba(0,0,0,0.40); }
|
47 |
+
|
48 |
+
.emboss .rwdCarousel ul.slides { padding:4px 4px 20px; }
|
49 |
+
.emboss .rwdCarousel ul.slides li { position:relative; padding:2px; box-shadow:0px 0px 4px 0 rgba(0,0,0,0.40); }
|
50 |
+
.emboss .rwdCarousel ul.slides li:after { content:' '; display:block; width:100%; height:20px; position:absolute; bottom:-20px; left:0; overflow:hidden;
|
51 |
+
background:url(bottom-shadow.png) no-repeat 50% 95%/100% 30px; }
|
52 |
+
.emboss .rwdCarousel ul.slides li img { border:1px solid #ddd; padding:4px; box-shadow:inset 0 0 4px 0 rgba(0,0,0,0.20); }
|
53 |
+
|
54 |
+
/* Slider and Crousel style */
|
55 |
+
.rwdSlideCrousel ul.slides li { float:left; margin-right:10px; opacity:1; cursor:pointer; }
|
56 |
+
.rwdSlideCrousel ul.slides li:hover,
|
57 |
+
.rwdSlideCrousel ul.slides li.cws-active-slide { opacity:0.6; cursor:default; }
|
58 |
+
|
59 |
+
.blankTheme .cwsRwdSlider { margin-bottom:10px; }
|
60 |
+
|
61 |
+
.slideNcrosel .slider { position:relative; }
|
62 |
+
.slideNcrosel.defaultTheme .slider { padding:10px; border:2px solid #DDDDDD; }
|
63 |
+
.slideNcrosel.defaultTheme .slider:last-child { border-top:0 none; }
|
64 |
+
|
65 |
+
.slideNcrosel.dropShadow .cwsRwdSlider { margin-bottom:15px; box-shadow:1px 3px 6px 0 rgba(0,0,0,0.50); }
|
66 |
+
.slideNcrosel.dropShadow .rwdSlideCrousel ul.slides li { margin-right:15px; box-shadow:1px 2px 4px 0 rgba(0,0,0,0.50); }
|
67 |
+
|
68 |
+
.slideNcrosel.emboss { padding-bottom:35px; background:url(bottom-shadow.png) no-repeat 50% 100%/100% 36px; }
|
69 |
+
.slideNcrosel.emboss .slider { border:2px solid #fff; box-shadow:0 0 5px 0 rgba(0,0,0,0.30); }
|
70 |
+
.slideNcrosel.emboss .cwsRwdSlider,
|
71 |
+
.slideNcrosel.emboss .rwdSlideCrousel { padding:8px; background-color:#fff; box-shadow:inset 0 0 7px 0 rgba(0,0,0,0.25); }
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
/* Direction Nav */
|
76 |
+
.cws-arw { *height:0; }
|
77 |
+
.cws-arw a { display:block; width:35px; height:35px; margin-top:-17px; position:absolute; top:50%; z-index:10; overflow:hidden; opacity:0; cursor:pointer; text-shadow:1px 1px 0 rgba(255,255,255,0.3); }
|
78 |
+
.cws-arw .cws-prev { left:-50px; }
|
79 |
+
.cws-arw .cws-next { right:-50px; }
|
80 |
+
.cws-arw a:before { font-family:"cws-arrow"; font-size:34px; line-height:34px; text-align:center; height:34px; width:34px; display:inline-block; }
|
81 |
+
|
82 |
+
.cws-arw.angle a.cws-prev:before { content: "\69"; }
|
83 |
+
.cws-arw.angle a.cws-next:before { content: "\6a"; }
|
84 |
+
.cws-arw.angle_small a.cws-prev:before { content: "\6d"; }
|
85 |
+
.cws-arw.angle_small a.cws-next:before { content: "\6e"; }
|
86 |
+
.cws-arw.angle_circle a.cws-prev:before { content: "\37"; }
|
87 |
+
.cws-arw.angle_circle a.cws-next:before { content: "\38"; }
|
88 |
+
.cws-arw.angle_square a.cws-prev:before { content: "\21"; }
|
89 |
+
.cws-arw.angle_square a.cws-next:before { content: "\23"; }
|
90 |
+
.cws-arw.arrow a.cws-prev:before { content: "\6b"; }
|
91 |
+
.cws-arw.arrow a.cws-next:before { content: "\6c"; }
|
92 |
+
.cws-arw.arrow_circle a.cws-prev:before { content: "\6f"; }
|
93 |
+
.cws-arw.arrow_circle a.cws-next:before { content: "\70"; }
|
94 |
+
.cws-arw.caret a.cws-prev:before { content: "\65"; }
|
95 |
+
.cws-arw.caret a.cws-next:before { content: "\66"; }
|
96 |
+
.cws-arw.chevron a.cws-prev:before { content: "\77"; }
|
97 |
+
.cws-arw.chevron a.cws-next:before { content: "\78"; }
|
98 |
+
.cws-arw.chevron_smooth a.cws-prev:before { content: "\71"; }
|
99 |
+
.cws-arw.chevron_smooth a.cws-next:before { content: "\72"; }
|
100 |
+
.cws-arw.chevron_circle a.cws-prev:before { content: "\33"; }
|
101 |
+
.cws-arw.chevron_circle a.cws-next:before { content: "\34"; }
|
102 |
+
.cws-arw.chevron_square a.cws-prev:before { content: "\39"; }
|
103 |
+
.cws-arw.chevron_square a.cws-next:before { content: "\30"; }
|
104 |
+
|
105 |
+
|
106 |
+
.NavArwOnHover:hover .cws-arw .cws-prev,
|
107 |
+
.alwaysNavArw .cws-arw .cws-prev { opacity:0.6; left:10px; }
|
108 |
+
.NavArwOnHover:hover .cws-arw .cws-next,
|
109 |
+
.alwaysNavArw .cws-arw .cws-next { opacity:0.6; right:10px; }
|
110 |
+
|
111 |
+
.cwsRwdSlider:hover .cws-next:hover, .cwsRwdSlider:hover .cws-prev:hover { opacity:1; }
|
112 |
+
|
113 |
+
.navArwOutside.NavArwOnHover:hover .cws-arw .cws-prev,
|
114 |
+
.navArwOutside.alwaysNavArw .cws-arw .cws-prev { left:-40px; }
|
115 |
+
.navArwOutside.NavArwOnHover:hover .cws-arw .cws-next,
|
116 |
+
.navArwOutside.alwaysNavArw .cws-arw .cws-next { right:-40px; }
|
117 |
+
|
118 |
+
.navArwInLeft .cws-arw .cws-prev, .navArwInLeft .cws-arw .cws-next,
|
119 |
+
.navArwInRight .cws-arw .cws-prev, .navArwInRight .cws-arw .cws-next { bottom:10px; top:inherit; margin:0; }
|
120 |
+
.navArwInLeft .cws-arw .cws-prev { left:10px; }
|
121 |
+
.navArwInLeft .cws-arw .cws-next { left:50px; }
|
122 |
+
.navArwInRight .cws-arw .cws-prev,
|
123 |
+
.navArwInRight.NavArwOnHover:hover .cws-arw .cws-prev { left:inherit; right:50px; }
|
124 |
+
.navArwInRight .cws-arw .cws-next { right:10px; }
|
125 |
+
|
126 |
+
/* Pager style */
|
127 |
+
.cws-pager { position:absolute; z-index:99; opacity:0; }
|
128 |
+
.cws-pager li { float:left; margin:0 3px; }
|
129 |
+
.cws-pager li a { display:block; width:12px; height:12px; text-indent:-999em; border-radius:50%; border:2px solid #fff; box-shadow:0px 0px 1px rgba(0,0,0,0.40); }
|
130 |
+
|
131 |
+
.cws-pager.squared li a, .cws-pager.squ-bar li a { border-radius:0; }
|
132 |
+
.cws-pager.cir-bar, .cws-pager.squ-bar { padding:7px !important; border-radius:3px; border:2px solid #fff; box-shadow:0px 0px 2px rgba(0,0,0,0.30); }
|
133 |
+
|
134 |
+
.alwaysPaging .cws-pager,
|
135 |
+
.pagingOnHover:hover .cws-pager { opacity:1; }
|
136 |
+
.alwaysPaging:hover .cws-pager.cir-bar, .alwaysPaging:hover .cws-pager.squ-bar,
|
137 |
+
.pagingOnHover:hover .cws-pager.cir-bar, .pagingOnHover:hover .cws-pager.squ-bar { opacity:0.9; }
|
138 |
+
|
139 |
+
.pagerBelow .cws-pager { padding-top:15px; bottom:-20px; left:45%; }
|
140 |
+
.pagerBelow .cws-pager.cir-bar, .pagerBelow .cws-pager.squ-bar { bottom:-35px; }
|
141 |
+
.pagerAbove .cws-pager { top:-20px; left:45%; }
|
142 |
+
.pagerAbove .cws-pager.cir-bar, .pagerAbove .cws-pager.squ-bar { top:-35px; }
|
143 |
+
.pagerInTop .cws-pager { top:10px; left:45%; }
|
144 |
+
.pagerInBottom .cws-pager { bottom:10px; left:45%; }
|
145 |
+
.pagerInBottomleft .cws-pager { bottom:13px; left:10px; }
|
146 |
+
.pagerInBottomright .cws-pager { bottom:13px; right:10px; }
|
147 |
+
|
148 |
+
.navArwInLeft.pagerInBottomleft .cws-pager { bottom:22px; left:92px; }
|
149 |
+
.navArwInRight.pagerInBottomright .cws-pager { bottom:22px; right:92px; }
|
150 |
+
.navArwInLeft.pagerInBottomleft .cws-pager.cir-bar, .navArwInRight.pagerInBottomleft .cws-pager.cir-bar,
|
151 |
+
.navArwInLeft.pagerInBottomright .cws-pager.squ-bar, .navArwInRight.pagerInBottomright .cws-pager.squ-bar { bottom:13px; }
|
152 |
+
|
153 |
+
|
154 |
+
/****** Slider Theme setting style ******/
|
155 |
+
/* Default Theme */
|
156 |
+
.basSlider.defaultTheme { padding:10px; border:2px solid #DDDDDD; }
|
157 |
+
.defaultTheme .pagerBelow .cws-pager { bottom:-30px; }
|
158 |
+
.defaultTheme .pagerAbove .cws-pager { top:-30px; }
|
159 |
+
.defaultTheme .pagerBelow .cws-pager.cir-bar, .defaultTheme .pagerBelow .cws-pager.squ-bar { bottom:-45px; }
|
160 |
+
.defaultTheme .pagerAbove .cws-pager.cir-bar, .defaultTheme .pagerAbove .cws-pager.squ-bar { top:-45px; }
|
161 |
+
|
162 |
+
.basSlider.dropShadow { box-shadow:1px 3px 5px 0 rgba(0,0,0,0.50); }
|
163 |
+
.basSlider.emboss { padding-bottom:35px; background:url(bottom-shadow.png) no-repeat 50% 100%/100% 36px; }
|
164 |
+
.basSlider.emboss .slider { border:2px solid #fff; box-shadow:0 0 5px 0 rgba(0,0,0,0.30); }
|
165 |
+
.basSlider.emboss .cwsRwdSlider { padding:8px; background-color:#fff; box-shadow:inset 0 0 7px 0 rgba(0,0,0,0.25); }
|
166 |
+
|
167 |
+
|
168 |
+
.emboss .rwdCarousel ul.slides:after { content:" "; display:block; clear:both; height:0; width:0; overflow:hidden; }
|
skin/frontend/base/default/css/responsivebannerslider/fonts/cwsarw.eot
ADDED
Binary file
|
skin/frontend/base/default/css/responsivebannerslider/fonts/cwsarw.svg
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata>Generated by IcoMoon</metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="icomoon" horiz-adv-x="1024">
|
7 |
+
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
+
<missing-glyph horiz-adv-x="1024" />
|
9 |
+
<glyph unicode=" " d="" horiz-adv-x="512" />
|
10 |
+
<glyph unicode="!" d="M0 960v-1024h1024v1024h-1024zM631.008 800c16.064 0 29.28-5.296 40-16l34-34c10.704-10.704 15.984-23.92 16-40-0.016-16.080-5.296-29.296-16-40l-218-218 218-216c10.704-11.92 15.984-25.536 16-41.008-0.016-15.456-5.296-28.272-16-38.992l-34-34c-10.72-10.72-23.936-16-40-16-16.080 0-29.296 5.28-40 16l-293.008 290.992c-10.704 10.72-16 23.936-16 40 0 16.080 5.296 29.296 16 40l293.008 291.008c10.704 10.704 23.92 16 40 16z" />
|
11 |
+
<glyph unicode="#" d="M0 960v-1024h1024v1024h-1024zM405.008 802c16.656 0 29.456-6.096 38.992-18l293.008-291.008c10.704-10.704 15.984-23.52 16-38.992-0.016-15.472-5.296-29.104-16-41.008l-293.008-290.992c-10.72-10.72-23.536-16-38.992-16-15.472 0-29.28 5.28-40 16l-35.008 34c-10.704 11.92-16 25.52-16 40.992s5.296 28.288 16 39.008l218 218-218 216c-10.704 11.92-16 25.52-16 40.992 0 15.488 5.296 28.304 16 39.008l35.008 34c9.52 11.904 23.328 18 40 18z" />
|
12 |
+
<glyph unicode="0" d="M0 960v-1024h1024v1024h-1024zM453.008 760l300-300-300-300-120 120 180 180-180 180 120 120z" />
|
13 |
+
<glyph unicode="3" d="M512 960c-282.768 0-512-229.232-512-512s229.232-512 512-512c282.768 0 512 229.232 512 512s-229.232 512-512 512zM572 744l120-120-180-180 180-180-120-120-300 300 300 300z" />
|
14 |
+
<glyph unicode="4" d="M512 960c-282.768 0-512-229.232-512-512s229.232-512 512-512c282.768 0 512 229.232 512 512s-229.232 512-512 512zM456 744l300-300-300-300-120 120 180 180-180 180 120 120z" />
|
15 |
+
<glyph unicode="7" d="M512 960c-282.768 0-512-229.232-512-512s229.232-512 512-512c282.768 0 512 229.232 512 512s-229.232 512-512 512zM583.008 732c12.848 0 23.424-4.432 32-13.008l28-26.992c8.56-8.576 11.984-19.136 12-32-0.016-12.864-3.44-24.432-12-33.008l-175.008-174 175.008-172.992c8.56-9.536 11.984-20.624 12-33.008-0.016-12.368-3.44-22.416-12-30.992l-28-27.008c-8.576-8.576-19.152-12.992-32-12.992-12.864 0-23.44 4.416-32 12.992l-234 233.008c-8.576 8.56-13.008 19.136-13.008 32s4.432 23.44 13.008 32l234 232.992c8.56 8.576 19.136 13.008 32 13.008z" />
|
16 |
+
<glyph unicode="8" d="M512 960c-282.768 0-512-229.232-512-512s229.232-512 512-512c282.768 0 512 229.232 512 512s-229.232 512-512 512zM441.008 732.992c13.328 0 23.36-4.48 30.992-14l235.008-232.992c8.56-8.56 11.984-18.624 12-31.008-0.016-12.368-3.44-23.472-12-32.992l-235.008-233.008c-8.576-8.576-18.624-12.992-30.992-12.992-12.384 0-23.424 4.416-32 12.992l-28 27.008c-8.576 9.536-13.008 20.624-13.008 32.992 0 12.384 4.432 22.432 13.008 31.008l174 174.992-174 172c-8.576 9.536-13.008 20.624-13.008 33.008s4.432 23.424 13.008 32l28 26.992c7.616 9.52 18.656 14 32 14z" />
|
17 |
+
<glyph unicode="9" d="M0 960v-1024h1024v1024h-1024zM588 760l120-120-180-180 180-180-120-120-300 300 300 300z" />
|
18 |
+
<glyph unicode="e" d="M597.333 789.333l128-128-192-192 192-192-128-128-320 320z" />
|
19 |
+
<glyph unicode="f" d="M384 789.333l-128-128 192-192-192-192 128-128 320 320z" />
|
20 |
+
<glyph unicode="i" d="M737.23 68.199c13.721-13.874 13.721-36.249 0-50.126s-35.89-13.874-49.614 0l-400.896 404.839c-13.721 13.874-13.721 36.302 0 50.126l400.896 404.889c13.721 13.874 35.89 13.874 49.614 0s13.721-36.249 0-50.126l-365.568-379.801 365.568-379.801z" />
|
21 |
+
<glyph unicode="j" d="M286.704 68.199c-13.721-13.874-13.721-36.249 0-50.126s35.89-13.874 49.614 0l400.896 404.839c13.721 13.874 13.721 36.302 0 50.126l-400.896 404.889c-13.721 13.874-35.89 13.874-49.614 0s-13.721-36.249 0-50.126l365.568-379.801-365.568-379.801z" />
|
22 |
+
<glyph unicode="k" d="M877.714 448v-73.143q0-30.286-18.571-51.714t-48.286-21.429h-402.286l167.429-168q21.714-20.571 21.714-51.429t-21.714-51.429l-42.857-43.429q-21.143-21.143-51.429-21.143-29.714 0-52 21.143l-372 372.571q-21.143 21.143-21.143 51.429 0 29.714 21.143 52l372 371.429q21.714 21.714 52 21.714 29.714 0 51.429-21.714l42.857-42.286q21.714-21.714 21.714-52t-21.714-52l-167.429-167.429h402.286q29.714 0 48.286-21.429t18.571-51.714z" horiz-adv-x="878" />
|
23 |
+
<glyph unicode="l" d="M841.143 411.429q0-30.857-21.143-52l-372-372q-22.286-21.143-52-21.143-29.143 0-51.429 21.143l-42.857 42.857q-21.714 21.714-21.714 52t21.714 52l167.429 167.429h-402.286q-29.714 0-48.286 21.429t-18.571 51.714v73.143q0 30.286 18.571 51.714t48.286 21.429h402.286l-167.429 168q-21.714 20.571-21.714 51.429t21.714 51.429l42.857 42.857q21.714 21.714 51.429 21.714 30.286 0 52-21.714l372-372q21.143-20 21.143-51.429z" horiz-adv-x="878" />
|
24 |
+
<glyph unicode="m" d="M358.286 649.143q0-7.429-5.714-13.143l-224.571-224.571 224.571-224.571q5.714-5.714 5.714-13.143t-5.714-13.143l-28.571-28.571q-5.714-5.714-13.143-5.714t-13.143 5.714l-266.286 266.286q-5.714 5.714-5.714 13.143t5.714 13.143l266.286 266.286q5.714 5.714 13.143 5.714t13.143-5.714l28.571-28.571q5.714-5.714 5.714-13.143z" horiz-adv-x="366" />
|
25 |
+
<glyph unicode="n" d="M340 411.429q0-7.429-5.714-13.143l-266.286-266.286q-5.714-5.714-13.143-5.714t-13.143 5.714l-28.571 28.571q-5.714 5.714-5.714 13.143t5.714 13.143l224.571 224.571-224.571 224.571q-5.714 5.714-5.714 13.143t5.714 13.143l28.571 28.571q5.714 5.714 13.143 5.714t13.143-5.714l266.286-266.286q5.714-5.714 5.714-13.143z" horiz-adv-x="366" />
|
26 |
+
<glyph unicode="o" d="M731.429 411.429v73.143q0 14.857-10.857 25.714t-25.714 10.857h-286.857l108 108q10.857 10.857 10.857 25.714t-10.857 25.714l-52 52q-10.286 10.286-25.714 10.286t-25.714-10.286l-258.857-258.857q-10.286-10.286-10.286-25.714t10.286-25.714l258.857-258.857q10.286-10.286 25.714-10.286t25.714 10.286l52 52q10.286 10.286 10.286 25.714t-10.286 25.714l-108 108h286.857q14.857 0 25.714 10.857t10.857 25.714zM877.714 448q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
|
27 |
+
<glyph unicode="p" d="M734.286 448q0 15.429-10.286 25.714l-258.857 258.857q-10.286 10.286-25.714 10.286t-25.714-10.286l-52-52q-10.286-10.286-10.286-25.714t10.286-25.714l108-108h-286.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h286.857l-108-108q-10.857-10.857-10.857-25.714t10.857-25.714l52-52q10.286-10.286 25.714-10.286t25.714 10.286l258.857 258.857q10.286 10.286 10.286 25.714zM877.714 448q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
|
28 |
+
<glyph unicode="q" d="M424 61.143l-372.571 372q-21.143 21.143-21.143 51.714t21.143 51.714l372.571 372q21.143 21.143 51.714 21.143t51.714-21.143l42.857-42.857q21.143-21.143 21.143-51.714t-21.143-51.714l-277.714-277.714 277.714-277.143q21.143-21.714 21.143-52t-21.143-51.429l-42.857-42.857q-21.143-21.143-51.714-21.143t-51.714 21.143z" horiz-adv-x="658" />
|
29 |
+
<glyph unicode="r" d="M628 484.571q0-29.714-21.143-52l-372.571-372q-21.143-21.143-51.429-21.143t-51.429 21.143l-43.429 42.857q-21.143 22.286-21.143 52 0 30.286 21.143 51.429l277.714 277.714-277.714 277.143q-21.143 22.286-21.143 52 0 30.286 21.143 51.429l43.429 42.857q20.571 21.714 51.429 21.714t51.429-21.714l372.571-372q21.143-21.143 21.143-51.429z" horiz-adv-x="658" />
|
30 |
+
<glyph unicode="w" d="M832 128l-192-192-512 512 512 512 192-192-320-320 320-320z" />
|
31 |
+
<glyph unicode="x" d="M128 128l192-192 512 512-512 512-192-192 320-320-320-320z" />
|
32 |
+
</font></defs></svg>
|
skin/frontend/base/default/css/responsivebannerslider/fonts/cwsarw.ttf
ADDED
Binary file
|
skin/frontend/base/default/css/responsivebannerslider/fonts/cwsarw.woff
ADDED
Binary file
|
skin/frontend/base/default/css/responsivebannerslider/loading.gif
ADDED
Binary file
|