Version Notes
no need of notes
Download this release
Release Info
Developer | Saurabh |
Extension | DSLPS |
Version | 1.0.1 |
Comparing to | |
See all releases |
Version 1.0.1
- app/code/local/Slider/Slider/Block/Mainslider.php +27 -0
- app/code/local/Slider/Slider/Block/Pager.php +592 -0
- app/code/local/Slider/Slider/Block/Product/List/Toolbar/Pager.php +380 -0
- app/code/local/Slider/Slider/Block/Slider.php +1 -0
- app/code/local/Slider/Slider/Block/Tool.php +815 -0
- app/code/local/Slider/Slider/Model/Slider.php +11 -0
- app/code/local/Slider/Slider/controllers/SliderController.php +28 -0
- app/code/local/Slider/Slider/etc/config.xml +35 -0
- app/design/frontend/default/default/layout/slider.xml +31 -0
- app/design/frontend/default/default/template/slider/pager.phtml +132 -0
- app/design/frontend/default/default/template/slider/slider.phtml +4 -0
- app/design/frontend/default/default/template/slider/slider1.phtml +145 -0
- app/design/frontend/default/default/template/slider/slider2.phtml +137 -0
- app/design/frontend/default/default/template/slider/slider3.phtml +13 -0
- app/design/frontend/default/default/template/slider/slider4.phtml +1 -0
- app/design/frontend/default/default/template/slider/view.phtml +107 -0
- app/etc/modules/Slider_Slider.xml +9 -0
- js/slider/jquery-ui-1.8rc1.custom.css +477 -0
- js/varien/jquery-1.4.1.min.js +152 -0
- js/varien/jquery-ui-1.8rc1.custom.min.js +71 -0
- package.xml +18 -0
- skin/frontend/default/default/images/loading.gif +0 -0
app/code/local/Slider/Slider/Block/Mainslider.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Slider_Slider_Block_Mainslider extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
|
5 |
+
public function IsRssCatalogEnable()
|
6 |
+
{
|
7 |
+
return Mage::getStoreConfig('rss/catalog/category');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function IsTopCategory()
|
11 |
+
{
|
12 |
+
return $this->getCurrentCategory()->getLevel()==2;
|
13 |
+
}
|
14 |
+
public function getCurrentCategory()
|
15 |
+
{ //echo "hihi";
|
16 |
+
if (!$this->hasData('current_category')) {
|
17 |
+
//echo "huhu";var_dump(Mage::registry('current_category'));die;
|
18 |
+
$this->setData('current_category', Mage::registry('current_category'));
|
19 |
+
}
|
20 |
+
return $this->getData('current_category');
|
21 |
+
}
|
22 |
+
public function getRssLink()
|
23 |
+
{
|
24 |
+
return Mage::getUrl('rss/catalog/category',array('cid' => $this->getCurrentCategory()->getId(), 'store_id' => Mage::app()->getStore()->getId()));
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
app/code/local/Slider/Slider/Block/Pager.php
ADDED
@@ -0,0 +1,592 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Page
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Html page block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Page
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*
|
34 |
+
* @todo separate order, mode and pager
|
35 |
+
*/
|
36 |
+
class Slider_Slider_Block_Pager extends Mage_Core_Block_Template
|
37 |
+
{
|
38 |
+
protected $_collection = null;
|
39 |
+
protected $_pageVarName = 'p';
|
40 |
+
protected $_limitVarName = 'limit';
|
41 |
+
protected $_availableLimit = array(10=>10,20=>20,50=>50);
|
42 |
+
protected $_dispersion = 3;
|
43 |
+
protected $_displayPages = 5;
|
44 |
+
protected $_showPerPage = true;
|
45 |
+
protected $_limit = null;
|
46 |
+
protected $_outputRequired = true;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Pages quantity per frame
|
50 |
+
* @var int
|
51 |
+
*/
|
52 |
+
protected $_frameLength = 5;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Next/previous page position relatively to the current frame
|
56 |
+
* @var int
|
57 |
+
*/
|
58 |
+
protected $_jump = 5;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Frame initialization flag
|
62 |
+
* @var bool
|
63 |
+
*/
|
64 |
+
protected $_frameInitialized = false;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Start page position in frame
|
68 |
+
* @var int
|
69 |
+
*/
|
70 |
+
protected $_frameStart;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Finish page position in frame
|
74 |
+
* @var int
|
75 |
+
*/
|
76 |
+
protected $_frameEnd;
|
77 |
+
|
78 |
+
protected function _construct()
|
79 |
+
{
|
80 |
+
parent::_construct();
|
81 |
+
$this->setData('show_amounts', true);
|
82 |
+
$this->setData('use_container', true);
|
83 |
+
$this->setTemplate('slider/pager.phtml');
|
84 |
+
}
|
85 |
+
|
86 |
+
public function getCurrentPage()
|
87 |
+
{
|
88 |
+
if ($page = (int) $this->getRequest()->getParam($this->getPageVarName())) {
|
89 |
+
return $page;
|
90 |
+
}
|
91 |
+
return 1;
|
92 |
+
}
|
93 |
+
|
94 |
+
public function getLimit()
|
95 |
+
{
|
96 |
+
if ($this->_limit !== null) {
|
97 |
+
return $this->_limit;
|
98 |
+
}
|
99 |
+
$limits = $this->getAvailableLimit();
|
100 |
+
if ($limit = $this->getRequest()->getParam($this->getLimitVarName())) {
|
101 |
+
if (isset($limits[$limit])) {
|
102 |
+
return $limit;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
$limits = array_keys($limits);
|
106 |
+
return $limits[0];
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Setter for limit items per page
|
111 |
+
*
|
112 |
+
* @param int $limit
|
113 |
+
* @return Mage_Page_Block_Html_Pager
|
114 |
+
*/
|
115 |
+
public function setLimit($limit)
|
116 |
+
{
|
117 |
+
$this->_limit = $limit;
|
118 |
+
return $this;
|
119 |
+
}
|
120 |
+
|
121 |
+
public function setCollection($collection)
|
122 |
+
{
|
123 |
+
$this->_collection = $collection
|
124 |
+
->setCurPage($this->getCurrentPage());
|
125 |
+
// If not int - then not limit
|
126 |
+
if ((int) $this->getLimit()) {
|
127 |
+
$this->_collection->setPageSize($this->getLimit());
|
128 |
+
}
|
129 |
+
|
130 |
+
$this->_setFrameInitialized(false);
|
131 |
+
|
132 |
+
return $this;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* @return Mage_Core_Model_Mysql4_Collection_Abstract
|
137 |
+
*/
|
138 |
+
public function getCollection()
|
139 |
+
{
|
140 |
+
return $this->_collection;
|
141 |
+
}
|
142 |
+
|
143 |
+
public function setPageVarName($varName)
|
144 |
+
{
|
145 |
+
$this->_pageVarName = $varName;
|
146 |
+
return $this;
|
147 |
+
}
|
148 |
+
|
149 |
+
public function getPageVarName()
|
150 |
+
{
|
151 |
+
return $this->_pageVarName;
|
152 |
+
}
|
153 |
+
|
154 |
+
public function setShowPerPage($varName)
|
155 |
+
{
|
156 |
+
$this->_showPerPage=$varName;
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
|
160 |
+
public function getShowPerPage()
|
161 |
+
{
|
162 |
+
if(sizeof($this->getAvailableLimit())<=1) {
|
163 |
+
return false;
|
164 |
+
}
|
165 |
+
return $this->_showPerPage;
|
166 |
+
}
|
167 |
+
|
168 |
+
public function setLimitVarName($varName)
|
169 |
+
{
|
170 |
+
$this->_limitVarName = $varName;
|
171 |
+
return $this;
|
172 |
+
}
|
173 |
+
|
174 |
+
public function getLimitVarName()
|
175 |
+
{
|
176 |
+
return $this->_limitVarName;
|
177 |
+
}
|
178 |
+
|
179 |
+
public function setAvailableLimit(array $limits)
|
180 |
+
{
|
181 |
+
$this->_availableLimit = $limits;
|
182 |
+
}
|
183 |
+
|
184 |
+
public function getAvailableLimit()
|
185 |
+
{
|
186 |
+
return $this->_availableLimit;
|
187 |
+
}
|
188 |
+
|
189 |
+
public function getFirstNum()
|
190 |
+
{
|
191 |
+
$collection = $this->getCollection();
|
192 |
+
return $collection->getPageSize()*($collection->getCurPage()-1)+1;
|
193 |
+
}
|
194 |
+
|
195 |
+
public function getLastNum()
|
196 |
+
{
|
197 |
+
$collection = $this->getCollection();
|
198 |
+
return $collection->getPageSize()*($collection->getCurPage()-1)+$collection->count();
|
199 |
+
}
|
200 |
+
|
201 |
+
public function getTotalNum()
|
202 |
+
{
|
203 |
+
return $this->getCollection()->getSize();
|
204 |
+
}
|
205 |
+
|
206 |
+
public function isFirstPage()
|
207 |
+
{
|
208 |
+
return $this->getCollection()->getCurPage() == 1;
|
209 |
+
}
|
210 |
+
|
211 |
+
public function getLastPageNum()
|
212 |
+
{
|
213 |
+
return $this->getCollection()->getLastPageNumber();
|
214 |
+
}
|
215 |
+
|
216 |
+
public function isLastPage()
|
217 |
+
{
|
218 |
+
return $this->getCollection()->getCurPage() >= $this->getLastPageNum();
|
219 |
+
}
|
220 |
+
|
221 |
+
public function isLimitCurrent($limit)
|
222 |
+
{
|
223 |
+
return $limit == $this->getLimit();
|
224 |
+
}
|
225 |
+
|
226 |
+
public function isPageCurrent($page)
|
227 |
+
{
|
228 |
+
return $page == $this->getCurrentPage();
|
229 |
+
}
|
230 |
+
|
231 |
+
public function getPages()
|
232 |
+
{
|
233 |
+
$collection = $this->getCollection();
|
234 |
+
|
235 |
+
$pages = array();
|
236 |
+
if ($collection->getLastPageNumber() <= $this->_displayPages) {
|
237 |
+
$pages = range(1, $collection->getLastPageNumber());
|
238 |
+
}
|
239 |
+
else {
|
240 |
+
$half = ceil($this->_displayPages / 2);
|
241 |
+
if ($collection->getCurPage() >= $half && $collection->getCurPage() <= $collection->getLastPageNumber() - $half) {
|
242 |
+
$start = ($collection->getCurPage() - $half) + 1;
|
243 |
+
$finish = ($start + $this->_displayPages) - 1;
|
244 |
+
}
|
245 |
+
elseif ($collection->getCurPage() < $half) {
|
246 |
+
$start = 1;
|
247 |
+
$finish = $this->_displayPages;
|
248 |
+
}
|
249 |
+
elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) {
|
250 |
+
$finish = $collection->getLastPageNumber();
|
251 |
+
$start = $finish - $this->_displayPages + 1;
|
252 |
+
}
|
253 |
+
|
254 |
+
$pages = range($start, $finish);
|
255 |
+
}
|
256 |
+
return $pages;
|
257 |
+
}
|
258 |
+
|
259 |
+
public function getFirstPageUrl()
|
260 |
+
{
|
261 |
+
return $this->getPageUrl(1);
|
262 |
+
}
|
263 |
+
|
264 |
+
public function getPreviousPageUrl()
|
265 |
+
{
|
266 |
+
return $this->getPageUrl($this->getCollection()->getCurPage(-1));
|
267 |
+
}
|
268 |
+
|
269 |
+
public function getNextPageUrl()
|
270 |
+
{
|
271 |
+
return $this->getPageUrl($this->getCollection()->getCurPage(+1));
|
272 |
+
}
|
273 |
+
|
274 |
+
public function getLastPageUrl()
|
275 |
+
{
|
276 |
+
return $this->getPageUrl($this->getCollection()->getLastPageNumber());
|
277 |
+
}
|
278 |
+
|
279 |
+
public function getPageUrl($page)
|
280 |
+
{
|
281 |
+
return $this->getPagerUrl(array($this->getPageVarName()=>$page));
|
282 |
+
}
|
283 |
+
|
284 |
+
public function getLimitUrl($limit)
|
285 |
+
{
|
286 |
+
return $this->getPagerUrl(array($this->getLimitVarName()=>$limit));
|
287 |
+
}
|
288 |
+
|
289 |
+
public function getPagerUrl($params=array())
|
290 |
+
{
|
291 |
+
$urlParams = array();
|
292 |
+
$urlParams['_current'] = true;
|
293 |
+
$urlParams['_escape'] = true;
|
294 |
+
$urlParams['_use_rewrite'] = true;
|
295 |
+
$urlParams['_query'] = $params;
|
296 |
+
return $this->getUrl('*/*/*', $urlParams);
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Getter for $_frameStart
|
301 |
+
*
|
302 |
+
* @return int
|
303 |
+
*/
|
304 |
+
public function getFrameStart()
|
305 |
+
{
|
306 |
+
$this->_initFrame();
|
307 |
+
return $this->_frameStart;
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Getter for $_frameEnd
|
312 |
+
*
|
313 |
+
* @return int
|
314 |
+
*/
|
315 |
+
public function getFrameEnd()
|
316 |
+
{
|
317 |
+
$this->_initFrame();
|
318 |
+
return $this->_frameEnd;
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Return array of pages in frame
|
323 |
+
*
|
324 |
+
* @return array
|
325 |
+
*/
|
326 |
+
public function getFramePages()
|
327 |
+
{
|
328 |
+
$start = $this->getFrameStart();
|
329 |
+
$end = $this->getFrameEnd();
|
330 |
+
return range($start, $end);
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Return page number of Previous jump
|
335 |
+
*
|
336 |
+
* @return int
|
337 |
+
*/
|
338 |
+
public function getPreviousJumpPage()
|
339 |
+
{
|
340 |
+
if (!$this->getJump()) {
|
341 |
+
return null;
|
342 |
+
}
|
343 |
+
$frameStart = $this->getFrameStart();
|
344 |
+
if ($frameStart - 1 > 1) {
|
345 |
+
return max(2, $frameStart - $this->getJump());
|
346 |
+
}
|
347 |
+
|
348 |
+
return null;
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Prepare URL for Previous Jump
|
353 |
+
*
|
354 |
+
* @return string
|
355 |
+
*/
|
356 |
+
public function getPreviousJumpUrl()
|
357 |
+
{
|
358 |
+
return $this->getPageUrl($this->getPreviousJumpPage());
|
359 |
+
}
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Return page number of Next jump
|
363 |
+
*
|
364 |
+
* @return int
|
365 |
+
*/
|
366 |
+
public function getNextJumpPage()
|
367 |
+
{
|
368 |
+
if (!$this->getJump()) {
|
369 |
+
return null;
|
370 |
+
}
|
371 |
+
$frameEnd = $this->getFrameEnd();
|
372 |
+
if ($this->getLastPageNum() - $frameEnd > 1) {
|
373 |
+
return min($this->getLastPageNum() - 1, $frameEnd + $this->getJump());
|
374 |
+
}
|
375 |
+
|
376 |
+
return null;
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Prepare URL for Next Jump
|
381 |
+
*
|
382 |
+
* @return string
|
383 |
+
*/
|
384 |
+
public function getNextJumpUrl()
|
385 |
+
{
|
386 |
+
return $this->getPageUrl($this->getNextJumpPage());
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Getter for $_frameLength
|
391 |
+
*
|
392 |
+
* @return int
|
393 |
+
*/
|
394 |
+
public function getFrameLength()
|
395 |
+
{
|
396 |
+
return $this->_frameLength;
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Getter for $_jump
|
401 |
+
*
|
402 |
+
* @return int
|
403 |
+
*/
|
404 |
+
public function getJump()
|
405 |
+
{
|
406 |
+
return $this->_jump;
|
407 |
+
}
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Setter for $_frameLength
|
411 |
+
*
|
412 |
+
* @param int $frame
|
413 |
+
* @return Mage_Page_Block_Html_Pager
|
414 |
+
*/
|
415 |
+
public function setFrameLength($frame)
|
416 |
+
{
|
417 |
+
$frame = abs(intval($frame));
|
418 |
+
if ($frame == 0) {
|
419 |
+
$frame = $this->_frameLength;
|
420 |
+
}
|
421 |
+
if ($this->getFrameLength() != $frame) {
|
422 |
+
$this->_setFrameInitialized(false);
|
423 |
+
$this->_frameLength = $frame;
|
424 |
+
}
|
425 |
+
|
426 |
+
return $this;
|
427 |
+
}
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Setter for $_jump
|
431 |
+
*
|
432 |
+
* @param int $jump
|
433 |
+
* @return Mage_Page_Block_Html_Pager
|
434 |
+
*/
|
435 |
+
public function setJump($jump)
|
436 |
+
{
|
437 |
+
$jump = abs(intval($jump));
|
438 |
+
if ($this->getJump() != $jump) {
|
439 |
+
$this->_setFrameInitialized(false);
|
440 |
+
$this->_jump = $jump;
|
441 |
+
}
|
442 |
+
|
443 |
+
return $this;
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Whether to show first page in pagination or not
|
448 |
+
*
|
449 |
+
* @return bool
|
450 |
+
*/
|
451 |
+
public function canShowFirst()
|
452 |
+
{
|
453 |
+
return $this->getJump() > 1 && $this->getFrameStart() > 1;
|
454 |
+
}
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Whether to show last page in pagination or not
|
458 |
+
*
|
459 |
+
* @return bool
|
460 |
+
*/
|
461 |
+
public function canShowLast()
|
462 |
+
{
|
463 |
+
return $this->getJump() > 1 && $this->getFrameEnd() < $this->getLastPageNum();
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Whether to show link to Previous Jump
|
468 |
+
*
|
469 |
+
* @return bool
|
470 |
+
*/
|
471 |
+
public function canShowPreviousJump()
|
472 |
+
{
|
473 |
+
return $this->getPreviousJumpPage() !== null;
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Whether to show link to Next Jump
|
478 |
+
*
|
479 |
+
* @return bool
|
480 |
+
*/
|
481 |
+
public function canShowNextJump()
|
482 |
+
{
|
483 |
+
return $this->getNextJumpPage() !== null;
|
484 |
+
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* Initialize frame data, such as frame start, frame start etc.
|
488 |
+
*
|
489 |
+
* @return Mage_Page_Block_Html_Pager
|
490 |
+
*/
|
491 |
+
protected function _initFrame()
|
492 |
+
{
|
493 |
+
if (!$this->isFrameInitialized()) {
|
494 |
+
$start = 0;
|
495 |
+
$end = 0;
|
496 |
+
|
497 |
+
$collection = $this->getCollection();
|
498 |
+
if ($collection->getLastPageNumber() <= $this->getFrameLength()) {
|
499 |
+
$start = 1;
|
500 |
+
$end = $collection->getLastPageNumber();
|
501 |
+
}
|
502 |
+
else {
|
503 |
+
$half = ceil($this->getFrameLength() / 2);
|
504 |
+
if ($collection->getCurPage() >= $half && $collection->getCurPage() <= $collection->getLastPageNumber() - $half) {
|
505 |
+
$start = ($collection->getCurPage() - $half) + 1;
|
506 |
+
$end = ($start + $this->getFrameLength()) - 1;
|
507 |
+
}
|
508 |
+
elseif ($collection->getCurPage() < $half) {
|
509 |
+
$start = 1;
|
510 |
+
$end = $this->getFrameLength();
|
511 |
+
}
|
512 |
+
elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) {
|
513 |
+
$end = $collection->getLastPageNumber();
|
514 |
+
$start = $end - $this->getFrameLength() + 1;
|
515 |
+
}
|
516 |
+
}
|
517 |
+
$this->_frameStart = $start;
|
518 |
+
$this->_frameEnd = $end;
|
519 |
+
|
520 |
+
$this->_setFrameInitialized(true);
|
521 |
+
}
|
522 |
+
|
523 |
+
return $this;
|
524 |
+
}
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Setter for flag _frameInitialized
|
528 |
+
*
|
529 |
+
* @param bool $flag
|
530 |
+
* @return Mage_Page_Block_Html_Pager
|
531 |
+
*/
|
532 |
+
protected function _setFrameInitialized($flag)
|
533 |
+
{
|
534 |
+
$this->_frameInitialized = (bool)$flag;
|
535 |
+
return $this;
|
536 |
+
}
|
537 |
+
|
538 |
+
/**
|
539 |
+
* Check if frame data was initialized
|
540 |
+
*
|
541 |
+
* @return Mage_Page_Block_Html_Pager
|
542 |
+
*/
|
543 |
+
public function isFrameInitialized()
|
544 |
+
{
|
545 |
+
return $this->_frameInitialized;
|
546 |
+
}
|
547 |
+
|
548 |
+
/**
|
549 |
+
* Getter for alternative text for Previous link in pagination frame
|
550 |
+
*
|
551 |
+
* @return string
|
552 |
+
*/
|
553 |
+
public function getAnchorTextForPrevious()
|
554 |
+
{
|
555 |
+
return Mage::getStoreConfig('design/pagination/anchor_text_for_previous');
|
556 |
+
}
|
557 |
+
|
558 |
+
/**
|
559 |
+
* Getter for alternative text for Next link in pagination frame
|
560 |
+
*
|
561 |
+
* @return string
|
562 |
+
*/
|
563 |
+
public function getAnchorTextForNext()
|
564 |
+
{
|
565 |
+
return Mage::getStoreConfig('design/pagination/anchor_text_for_next');
|
566 |
+
}
|
567 |
+
|
568 |
+
/**
|
569 |
+
* Set whether output of the pager is mandatory
|
570 |
+
*
|
571 |
+
* @param bool $isRequired
|
572 |
+
* @return Mage_Page_Block_Html_Pager
|
573 |
+
*/
|
574 |
+
public function setIsOutputRequired($isRequired)
|
575 |
+
{
|
576 |
+
$this->_outputRequired = (bool)$isRequired;
|
577 |
+
return $this;
|
578 |
+
}
|
579 |
+
|
580 |
+
/**
|
581 |
+
* Determine whether the pagination should be eventually rendered
|
582 |
+
*
|
583 |
+
* @return string
|
584 |
+
*/
|
585 |
+
protected function _toHtml()
|
586 |
+
{
|
587 |
+
if ($this->_outputRequired || $this->getTotalNum() > $this->getLimit()) {
|
588 |
+
return parent::_toHtml();
|
589 |
+
}
|
590 |
+
return '';
|
591 |
+
}
|
592 |
+
}
|
app/code/local/Slider/Slider/Block/Product/List/Toolbar/Pager.php
ADDED
@@ -0,0 +1,380 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Catalog
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Product list pagination
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Catalog
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Slider_Slider_Block_Product_List_Toolbar_Pager extends Mage_Page_Block_Html_Pager
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Pages quantity per frame
|
38 |
+
* @var int
|
39 |
+
*/
|
40 |
+
protected $_frameLength = 5;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Next/previous page position relatively to the current frame
|
44 |
+
* @var int
|
45 |
+
*/
|
46 |
+
protected $_jump = 5;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Frame initialization flag
|
50 |
+
* @var bool
|
51 |
+
*/
|
52 |
+
protected $_frameInitialized = false;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Start page position in frame
|
56 |
+
* @var int
|
57 |
+
*/
|
58 |
+
protected $_frameStart;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Finish page position in frame
|
62 |
+
* @var int
|
63 |
+
*/
|
64 |
+
protected $_frameEnd;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Custom limit
|
68 |
+
* @var int
|
69 |
+
*/
|
70 |
+
protected $_limit;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Define default template and settings
|
74 |
+
*/
|
75 |
+
protected function _construct()
|
76 |
+
{
|
77 |
+
parent::_construct();
|
78 |
+
$this->setTemplate('catalog/product/list/toolbar/pager.phtml');
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Getter for $_frameStart
|
83 |
+
*
|
84 |
+
* @return int
|
85 |
+
*/
|
86 |
+
|
87 |
+
public function getFrameStart()
|
88 |
+
{
|
89 |
+
$this->_initFrame();
|
90 |
+
return $this->_frameStart;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Getter for $_frameEnd
|
95 |
+
*
|
96 |
+
* @return int
|
97 |
+
*/
|
98 |
+
public function getFrameEnd()
|
99 |
+
{
|
100 |
+
$this->_initFrame();
|
101 |
+
return $this->_frameEnd;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Return array of pages in frame
|
106 |
+
*
|
107 |
+
* @return array
|
108 |
+
*/
|
109 |
+
public function getFramePages()
|
110 |
+
{
|
111 |
+
$start = $this->getFrameStart();
|
112 |
+
$end = $this->getFrameEnd();
|
113 |
+
return range($start, $end);
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Return page number of Previous jump
|
118 |
+
*
|
119 |
+
* @return int
|
120 |
+
*/
|
121 |
+
public function getPreviousJumpPage()
|
122 |
+
{
|
123 |
+
if (!$this->getJump()) {
|
124 |
+
return null;
|
125 |
+
}
|
126 |
+
$frameStart = $this->getFrameStart();
|
127 |
+
if ($frameStart - 1 > 1) {
|
128 |
+
return max(2, $frameStart - $this->getJump());
|
129 |
+
}
|
130 |
+
|
131 |
+
return null;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Prepare URL for Previous Jump
|
136 |
+
*
|
137 |
+
* @return string
|
138 |
+
*/
|
139 |
+
public function getPreviousJumpUrl()
|
140 |
+
{
|
141 |
+
return $this->getPageUrl($this->getPreviousJumpPage());
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Return page number of Next jump
|
146 |
+
*
|
147 |
+
* @return int
|
148 |
+
*/
|
149 |
+
public function getNextJumpPage()
|
150 |
+
{
|
151 |
+
if (!$this->getJump()) {
|
152 |
+
return null;
|
153 |
+
}
|
154 |
+
$frameEnd = $this->getFrameEnd();
|
155 |
+
if ($this->getLastPageNum() - $frameEnd > 1) {
|
156 |
+
return min($this->getLastPageNum() - 1, $frameEnd + $this->getJump());
|
157 |
+
}
|
158 |
+
|
159 |
+
return null;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Prepare URL for Next Jump
|
164 |
+
*
|
165 |
+
* @return string
|
166 |
+
*/
|
167 |
+
public function getNextJumpUrl()
|
168 |
+
{
|
169 |
+
return $this->getPageUrl($this->getNextJumpPage());
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Getter for $_frameLength
|
174 |
+
*
|
175 |
+
* @return int
|
176 |
+
*/
|
177 |
+
public function getFrameLength()
|
178 |
+
{
|
179 |
+
return $this->_frameLength;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Getter for $_jump
|
184 |
+
*
|
185 |
+
* @return int
|
186 |
+
*/
|
187 |
+
public function getJump()
|
188 |
+
{
|
189 |
+
return $this->_jump;
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Setter for $_frameLength
|
194 |
+
*
|
195 |
+
* @param int $frame
|
196 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar_Pager
|
197 |
+
*/
|
198 |
+
public function setFrameLength($frame)
|
199 |
+
{
|
200 |
+
$frame = abs(intval($frame));
|
201 |
+
if ($this->getFrameLength() != $frame) {
|
202 |
+
$this->_setFrameInitialized(false);
|
203 |
+
$this->_frameLength = $frame;
|
204 |
+
}
|
205 |
+
|
206 |
+
return $this;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Setter for $_jump
|
211 |
+
*
|
212 |
+
* @param int $jump
|
213 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar_Pager
|
214 |
+
*/
|
215 |
+
public function setJump($jump)
|
216 |
+
{
|
217 |
+
$jump = abs(intval($jump));
|
218 |
+
if ($this->getJump() != $jump) {
|
219 |
+
$this->_setFrameInitialized(false);
|
220 |
+
$this->_jump = $jump;
|
221 |
+
}
|
222 |
+
|
223 |
+
return $this;
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Setter for $_limit
|
228 |
+
*
|
229 |
+
* @param int $limit
|
230 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar_Pager
|
231 |
+
*/
|
232 |
+
public function setLimit($limit)
|
233 |
+
{
|
234 |
+
$this->_limit = abs(intval($limit));
|
235 |
+
return $this;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Return pager limitation from request or as assigned value
|
240 |
+
*
|
241 |
+
* @return int
|
242 |
+
*/
|
243 |
+
public function getLimit()
|
244 |
+
{
|
245 |
+
if ($this->_limit !== null) {
|
246 |
+
return $this->_limit;
|
247 |
+
}
|
248 |
+
return parent::getLimit();
|
249 |
+
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Custom setter for pager collection
|
253 |
+
*
|
254 |
+
* @param Varien_Data_Collection
|
255 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar_Pager
|
256 |
+
*/
|
257 |
+
public function setCollection($collection)
|
258 |
+
{
|
259 |
+
parent::setCollection($collection);
|
260 |
+
$this->_setFrameInitialized(false);
|
261 |
+
return $this;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Whether to show first page in pagination or not
|
266 |
+
*
|
267 |
+
* @return bool
|
268 |
+
*/
|
269 |
+
public function canShowFirst()
|
270 |
+
{
|
271 |
+
return $this->getJump() > 1 && $this->getFrameStart() > 1;
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Whether to show last page in pagination or not
|
276 |
+
*
|
277 |
+
* @return bool
|
278 |
+
*/
|
279 |
+
public function canShowLast()
|
280 |
+
{
|
281 |
+
return $this->getJump() > 1 && $this->getFrameEnd() < $this->getLastPageNum();
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Whether to show link to Previous Jump
|
286 |
+
*
|
287 |
+
* @return bool
|
288 |
+
*/
|
289 |
+
public function canShowPreviousJump()
|
290 |
+
{
|
291 |
+
return $this->getPreviousJumpPage() !== null;
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* Whether to show link to Next Jump
|
296 |
+
*
|
297 |
+
* @return bool
|
298 |
+
*/
|
299 |
+
public function canShowNextJump()
|
300 |
+
{
|
301 |
+
return $this->getNextJumpPage() !== null;
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Initialize frame data, such as frame start, frame start etc.
|
306 |
+
*
|
307 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar_Pager
|
308 |
+
*/
|
309 |
+
protected function _initFrame()
|
310 |
+
{
|
311 |
+
if (!$this->isFrameInitialized()) {
|
312 |
+
$start = 0;
|
313 |
+
$end = 0;
|
314 |
+
|
315 |
+
$collection = $this->getCollection();
|
316 |
+
if ($collection->getLastPageNumber() <= $this->getFrameLength()) {
|
317 |
+
$start = 1;
|
318 |
+
$end = $collection->getLastPageNumber();
|
319 |
+
}
|
320 |
+
else {
|
321 |
+
$half = ceil($this->getFrameLength() / 2);
|
322 |
+
if ($collection->getCurPage() >= $half && $collection->getCurPage() <= $collection->getLastPageNumber() - $half) {
|
323 |
+
$start = ($collection->getCurPage() - $half) + 1;
|
324 |
+
$end = ($start + $this->getFrameLength()) - 1;
|
325 |
+
}
|
326 |
+
elseif ($collection->getCurPage() < $half) {
|
327 |
+
$start = 1;
|
328 |
+
$end = $this->getFrameLength();
|
329 |
+
}
|
330 |
+
elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) {
|
331 |
+
$end = $collection->getLastPageNumber();
|
332 |
+
$start = $end - $this->getFrameLength() + 1;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
|
336 |
+
$this->_frameStart = $start;
|
337 |
+
$this->_frameEnd = $end;
|
338 |
+
|
339 |
+
$this->_setFrameInitialized(true);
|
340 |
+
}
|
341 |
+
|
342 |
+
return $this;
|
343 |
+
}
|
344 |
+
|
345 |
+
/**
|
346 |
+
* Setter for flag _frameInitialized
|
347 |
+
*
|
348 |
+
* @param bool $flag
|
349 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar_Pager
|
350 |
+
*/
|
351 |
+
protected function _setFrameInitialized($flag)
|
352 |
+
{
|
353 |
+
$this->_frameInitialized = (bool)$flag;
|
354 |
+
return $this;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Check if frame data was initialized
|
359 |
+
*
|
360 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar_Pager
|
361 |
+
*/
|
362 |
+
public function isFrameInitialized()
|
363 |
+
{
|
364 |
+
return $this->_frameInitialized;
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Render block HTML
|
369 |
+
*
|
370 |
+
* @return string
|
371 |
+
*/
|
372 |
+
protected function _toHtml()
|
373 |
+
{
|
374 |
+
if ($this->getLastPageNum() > 1) {
|
375 |
+
return parent::_toHtml();
|
376 |
+
} else {
|
377 |
+
return '';
|
378 |
+
}
|
379 |
+
}
|
380 |
+
}
|
app/code/local/Slider/Slider/Block/Slider.php
ADDED
@@ -0,0 +1 @@
|
|
|
|
0 |
/**
|
1 |
* Default toolbar block name
|
2 |
*
|
3 |
* @var string
|
4 |
*/
|
5 |
protected $_defaultToolbarBlock = 'slider/tool';
|
6 |
/**
|
7 |
* Product Collection
|
8 |
*
|
9 |
* @var Mage_Eav_Model_Entity_Collection_Abstract
|
10 |
*/
|
11 |
protected $_productCollection;
|
12 |
/**
|
13 |
* Retrieve loaded category collection
|
14 |
*
|
15 |
* @return Mage_Eav_Model_Entity_Collection_Abstract
|
16 |
*/
|
17 |
protected function _getProductCollection()
|
18 |
// if (is_null($this->_productCollection)) {
|
19 |
$layer = $this->getLayer();
|
20 |
/* @var $layer Mage_Catalog_Model_Layer */
|
21 |
/* if ($this->getShowRootCategory()) {
|
22 |
$this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
|
23 |
}*/
|
24 |
// if this is a product view page
|
25 |
/* if (Mage::registry('product')) {
|
26 |
// get collection of categories this product is associated with
|
27 |
$categories = Mage::registry('product')->getCategoryCollection()
|
28 |
->setPage(1, 1)
|
29 |
->load();
|
30 |
// if the product is associated with any category
|
31 |
if ($categories->count()) {
|
32 |
// show products from this category
|
33 |
$this->setCategoryId(current($categories->getIterator()));
|
34 |
}
|
35 |
}*/
|
36 |
/* $origCategory = null;
|
37 |
if ($this->getCategoryId()) {
|
38 |
$category = Mage::getModel('catalog/category')->load($this->getCategoryId());
|
39 |
if ($category->getId()) {
|
40 |
$origCategory = $layer->getCurrentCategory();
|
41 |
$layer->setCurrentCategory($category);
|
42 |
}
|
43 |
}*/
|
44 |
$this->_productCollection = $layer->getProductCollection()->addFieldToFilter('price',array('from'=>$urlVar['min'],'to'=>$urlVar['max']));
|
45 |
/*$this->prepareSortableFieldsByCategory($layer->getCurrentCategory());
|
46 |
if ($origCategory) {
|
47 |
$layer->setCurrentCategory($origCategory);
|
48 |
}
|
49 |
*/
|
50 |
}
|
51 |
/**
|
52 |
* Get catalog layer model
|
53 |
*
|
54 |
* @return Mage_Catalog_Model_Layer
|
55 |
*/
|
56 |
public function getLayer()
|
57 |
{
|
58 |
$layer = Mage::registry('current_layer');
|
59 |
if ($layer) {
|
60 |
return $layer;
|
61 |
}
|
62 |
return Mage::getSingleton('catalog/layer');
|
63 |
}
|
64 |
/**
|
65 |
* Retrieve loaded category collection
|
66 |
*
|
67 |
* @return Mage_Eav_Model_Entity_Collection_Abstract
|
68 |
*/
|
69 |
public function getLoadedProductCollection()
|
70 |
{
|
71 |
return $this->_getProductCollection();
|
72 |
}
|
73 |
/**
|
74 |
* Retrieve current view mode
|
75 |
*
|
76 |
* @return string
|
77 |
*/
|
78 |
public function getMode()
|
79 |
{
|
80 |
//echo "mode";
|
81 |
}
|
82 |
/**
|
83 |
* Need use as _prepareLayout - but problem in declaring collection from
|
84 |
* another block (was problem with search result)
|
85 |
*/
|
86 |
protected function _beforeToHtml()
|
87 |
{
|
88 |
/*$toolbar = $this->getLayout()->createBlock('catalog/product_list_toolbar', microtime());
|
89 |
if ($toolbarTemplate = $this->getToolbarTemplate()) {
|
90 |
$toolbar->setTemplate($toolbarTemplate);
|
91 |
}*/
|
92 |
$toolbar = $this->getToolbarBlock();
|
93 |
// called prepare sortable parameters
|
94 |
$collection = $this->_getProductCollection();
|
95 |
// use sortable parameters
|
96 |
if ($orders = $this->getAvailableOrders()) {
|
97 |
$toolbar->setAvailableOrders($orders);
|
98 |
}
|
99 |
if ($sort = $this->getSortBy()) {
|
100 |
$toolbar->setDefaultOrder($sort);
|
101 |
}
|
102 |
if ($dir = $this->getDefaultDirection()) {
|
103 |
$toolbar->setDefaultDirection($dir);
|
104 |
}
|
105 |
if ($modes = $this->getModes()) {
|
106 |
$toolbar->setModes($modes);
|
107 |
}
|
108 |
// set collection to toolbar and apply sort
|
109 |
$toolbar->setCollection($collection);
|
110 |
$this->setChild('toolbar', $toolbar);
|
111 |
Mage::dispatchEvent('catalog_block_product_list_collection', array(
|
112 |
'collection' => $this->_getProductCollection()
|
113 |
));
|
114 |
$this->_getProductCollection()->load();
|
115 |
Mage::getModel('review/review')->appendSummary($this->_getProductCollection());
|
116 |
return parent::_beforeToHtml();
|
117 |
}
|
118 |
/**
|
119 |
* Retrieve Toolbar block
|
120 |
*
|
121 |
* @return Mage_Catalog_Block_Product_List_Toolbar
|
122 |
*/
|
123 |
public function getToolbarBlock()
|
124 |
{
|
125 |
if ($blockName = $this->getToolbarBlockName()) {
|
126 |
if ($block = $this->getLayout()->getBlock($blockName)) {
|
127 |
return $block;
|
128 |
}
|
129 |
}
|
130 |
$block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
|
131 |
return $block;
|
132 |
}
|
133 |
/**
|
134 |
* Retrieve additional blocks html
|
135 |
*
|
136 |
* @return string
|
137 |
*/
|
138 |
public function getAdditionalHtml()
|
139 |
{
|
140 |
return $this->getChildHtml('additional');
|
141 |
}
|
142 |
/**
|
143 |
* Retrieve list toolbar HTML
|
144 |
*
|
145 |
* @return string
|
146 |
*/
|
147 |
public function getToolbarHtml()
|
148 |
{
|
149 |
return $this->getChildHtml('toolbar');
|
150 |
}
|
151 |
public function setCollection($collection)
|
152 |
{
|
153 |
$this->_productCollection = $collection;
|
154 |
return $this;
|
155 |
}
|
156 |
public function addAttribute($code)
|
157 |
{
|
158 |
$this->_getProductCollection()->addAttributeToSelect($code);
|
159 |
return $this;
|
160 |
}
|
161 |
public function getPriceBlockTemplate()
|
162 |
{
|
163 |
return $this->_getData('price_block_template');
|
164 |
}
|
165 |
/**
|
166 |
* Retrieve Catalog Config object
|
167 |
*
|
168 |
* @return Mage_Catalog_Model_Config
|
169 |
*/
|
170 |
protected function _getConfig()
|
171 |
{
|
172 |
return Mage::getSingleton('catalog/config');
|
173 |
}
|
174 |
/**
|
175 |
* Prepare Sort By fields from Category Data
|
176 |
*
|
177 |
* @param Mage_Catalog_Model_Category $category
|
178 |
* @return Mage_Catalog_Block_Product_List
|
179 |
*/
|
180 |
public function prepareSortableFieldsByCategory($category) {
|
181 |
if (!$this->getAvailableOrders()) {
|
182 |
$this->setAvailableOrders($category->getAvailableSortByOptions());
|
183 |
}
|
184 |
$availableOrders = $this->getAvailableOrders();
|
185 |
if (!$this->getSortBy()) {
|
186 |
if ($categorySortBy = $category->getDefaultSortBy()) {
|
187 |
if (!$availableOrders) {
|
188 |
$availableOrders = $this->_getConfig()->getAttributeUsedForSortByArray();
|
189 |
}
|
190 |
if (isset($availableOrders[$categorySortBy])) {
|
191 |
$this->setSortBy($categorySortBy);
|
192 |
}
|
193 |
}
|
194 |
}
|
195 |
return $this;
|
196 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Default toolbar block name
|
4 |
*
|
5 |
* @var string
|
6 |
*/
|
7 |
protected $_defaultToolbarBlock = 'slider/tool';
|
8 |
/**
|
9 |
* Product Collection
|
10 |
*
|
11 |
* @var Mage_Eav_Model_Entity_Collection_Abstract
|
12 |
*/
|
13 |
protected $_productCollection;
|
14 |
/**
|
15 |
* Retrieve loaded category collection
|
16 |
*
|
17 |
* @return Mage_Eav_Model_Entity_Collection_Abstract
|
18 |
*/
|
19 |
protected function _getProductCollection()
|
20 |
// if (is_null($this->_productCollection)) {
|
21 |
$layer = $this->getLayer();
|
22 |
/* @var $layer Mage_Catalog_Model_Layer */
|
23 |
/* if ($this->getShowRootCategory()) {
|
24 |
$this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
|
25 |
}*/
|
26 |
// if this is a product view page
|
27 |
/* if (Mage::registry('product')) {
|
28 |
// get collection of categories this product is associated with
|
29 |
$categories = Mage::registry('product')->getCategoryCollection()
|
30 |
->setPage(1, 1)
|
31 |
->load();
|
32 |
// if the product is associated with any category
|
33 |
if ($categories->count()) {
|
34 |
// show products from this category
|
35 |
$this->setCategoryId(current($categories->getIterator()));
|
36 |
}
|
37 |
}*/
|
38 |
/* $origCategory = null;
|
39 |
if ($this->getCategoryId()) {
|
40 |
$category = Mage::getModel('catalog/category')->load($this->getCategoryId());
|
41 |
if ($category->getId()) {
|
42 |
$origCategory = $layer->getCurrentCategory();
|
43 |
$layer->setCurrentCategory($category);
|
44 |
}
|
45 |
}*/
|
46 |
$this->_productCollection = $layer->getProductCollection()->addFieldToFilter('price',array('from'=>$urlVar['min'],'to'=>$urlVar['max']));
|
47 |
/*$this->prepareSortableFieldsByCategory($layer->getCurrentCategory());
|
48 |
if ($origCategory) {
|
49 |
$layer->setCurrentCategory($origCategory);
|
50 |
}
|
51 |
*/
|
52 |
}
|
53 |
/**
|
54 |
* Get catalog layer model
|
55 |
*
|
56 |
* @return Mage_Catalog_Model_Layer
|
57 |
*/
|
58 |
public function getLayer()
|
59 |
{
|
60 |
$layer = Mage::registry('current_layer');
|
61 |
if ($layer) {
|
62 |
return $layer;
|
63 |
}
|
64 |
return Mage::getSingleton('catalog/layer');
|
65 |
}
|
66 |
/**
|
67 |
* Retrieve loaded category collection
|
68 |
*
|
69 |
* @return Mage_Eav_Model_Entity_Collection_Abstract
|
70 |
*/
|
71 |
public function getLoadedProductCollection()
|
72 |
{
|
73 |
return $this->_getProductCollection();
|
74 |
}
|
75 |
/**
|
76 |
* Retrieve current view mode
|
77 |
*
|
78 |
* @return string
|
79 |
*/
|
80 |
public function getMode()
|
81 |
{
|
82 |
//echo "mode";
|
83 |
}
|
84 |
/**
|
85 |
* Need use as _prepareLayout - but problem in declaring collection from
|
86 |
* another block (was problem with search result)
|
87 |
*/
|
88 |
protected function _beforeToHtml()
|
89 |
{
|
90 |
/*$toolbar = $this->getLayout()->createBlock('catalog/product_list_toolbar', microtime());
|
91 |
if ($toolbarTemplate = $this->getToolbarTemplate()) {
|
92 |
$toolbar->setTemplate($toolbarTemplate);
|
93 |
}*/
|
94 |
$toolbar = $this->getToolbarBlock();
|
95 |
// called prepare sortable parameters
|
96 |
$collection = $this->_getProductCollection();
|
97 |
// use sortable parameters
|
98 |
if ($orders = $this->getAvailableOrders()) {
|
99 |
$toolbar->setAvailableOrders($orders);
|
100 |
}
|
101 |
if ($sort = $this->getSortBy()) {
|
102 |
$toolbar->setDefaultOrder($sort);
|
103 |
}
|
104 |
if ($dir = $this->getDefaultDirection()) {
|
105 |
$toolbar->setDefaultDirection($dir);
|
106 |
}
|
107 |
if ($modes = $this->getModes()) {
|
108 |
$toolbar->setModes($modes);
|
109 |
}
|
110 |
// set collection to toolbar and apply sort
|
111 |
$toolbar->setCollection($collection);
|
112 |
$this->setChild('toolbar', $toolbar);
|
113 |
Mage::dispatchEvent('catalog_block_product_list_collection', array(
|
114 |
'collection' => $this->_getProductCollection()
|
115 |
));
|
116 |
$this->_getProductCollection()->load();
|
117 |
Mage::getModel('review/review')->appendSummary($this->_getProductCollection());
|
118 |
return parent::_beforeToHtml();
|
119 |
}
|
120 |
/**
|
121 |
* Retrieve Toolbar block
|
122 |
*
|
123 |
* @return Mage_Catalog_Block_Product_List_Toolbar
|
124 |
*/
|
125 |
public function getToolbarBlock()
|
126 |
{
|
127 |
if ($blockName = $this->getToolbarBlockName()) {
|
128 |
if ($block = $this->getLayout()->getBlock($blockName)) {
|
129 |
return $block;
|
130 |
}
|
131 |
}
|
132 |
$block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
|
133 |
return $block;
|
134 |
}
|
135 |
/**
|
136 |
* Retrieve additional blocks html
|
137 |
*
|
138 |
* @return string
|
139 |
*/
|
140 |
public function getAdditionalHtml()
|
141 |
{
|
142 |
return $this->getChildHtml('additional');
|
143 |
}
|
144 |
/**
|
145 |
* Retrieve list toolbar HTML
|
146 |
*
|
147 |
* @return string
|
148 |
*/
|
149 |
public function getToolbarHtml()
|
150 |
{
|
151 |
return $this->getChildHtml('toolbar');
|
152 |
}
|
153 |
public function setCollection($collection)
|
154 |
{
|
155 |
$this->_productCollection = $collection;
|
156 |
return $this;
|
157 |
}
|
158 |
public function addAttribute($code)
|
159 |
{
|
160 |
$this->_getProductCollection()->addAttributeToSelect($code);
|
161 |
return $this;
|
162 |
}
|
163 |
public function getPriceBlockTemplate()
|
164 |
{
|
165 |
return $this->_getData('price_block_template');
|
166 |
}
|
167 |
/**
|
168 |
* Retrieve Catalog Config object
|
169 |
*
|
170 |
* @return Mage_Catalog_Model_Config
|
171 |
*/
|
172 |
protected function _getConfig()
|
173 |
{
|
174 |
return Mage::getSingleton('catalog/config');
|
175 |
}
|
176 |
/**
|
177 |
* Prepare Sort By fields from Category Data
|
178 |
*
|
179 |
* @param Mage_Catalog_Model_Category $category
|
180 |
* @return Mage_Catalog_Block_Product_List
|
181 |
*/
|
182 |
public function prepareSortableFieldsByCategory($category) {
|
183 |
if (!$this->getAvailableOrders()) {
|
184 |
$this->setAvailableOrders($category->getAvailableSortByOptions());
|
185 |
}
|
186 |
$availableOrders = $this->getAvailableOrders();
|
187 |
if (!$this->getSortBy()) {
|
188 |
if ($categorySortBy = $category->getDefaultSortBy()) {
|
189 |
if (!$availableOrders) {
|
190 |
$availableOrders = $this->_getConfig()->getAttributeUsedForSortByArray();
|
191 |
}
|
192 |
if (isset($availableOrders[$categorySortBy])) {
|
193 |
$this->setSortBy($categorySortBy);
|
194 |
}
|
195 |
}
|
196 |
}
|
197 |
return $this;
|
198 |
}
|
app/code/local/Slider/Slider/Block/Tool.php
ADDED
@@ -0,0 +1,815 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Slider_Slider_Block_Tool extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Products collection
|
8 |
+
*
|
9 |
+
* @var Mage_Core_Model_Mysql4_Collection_Abstract
|
10 |
+
*/
|
11 |
+
protected $_collection = null;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* GET parameter page variable
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
protected $_pageVarName = 'p';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* GET parameter order variable
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
protected $_orderVarName = 'order';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* GET parameter direction variable
|
29 |
+
*
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
protected $_directionVarName = 'dir';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* GET parameter mode variable
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
protected $_modeVarName = 'mode';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* GET parameter limit variable
|
43 |
+
*
|
44 |
+
* @var string
|
45 |
+
*/
|
46 |
+
protected $_limitVarName = 'limit';
|
47 |
+
|
48 |
+
/**
|
49 |
+
* List of available order fields
|
50 |
+
*
|
51 |
+
* @var array
|
52 |
+
*/
|
53 |
+
protected $_availableOrder = array();
|
54 |
+
|
55 |
+
/**
|
56 |
+
* List of available view types
|
57 |
+
*
|
58 |
+
* @var string
|
59 |
+
*/
|
60 |
+
protected $_availableMode = array();
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Is enable View switcher
|
64 |
+
*
|
65 |
+
* @var bool
|
66 |
+
*/
|
67 |
+
protected $_enableViewSwitcher = true;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Is Expanded
|
71 |
+
*
|
72 |
+
* @var bool
|
73 |
+
*/
|
74 |
+
protected $_isExpanded = true;
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Default Order field
|
78 |
+
*
|
79 |
+
* @var string
|
80 |
+
*/
|
81 |
+
protected $_orderField = null;
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Default direction
|
85 |
+
*
|
86 |
+
* @var string
|
87 |
+
*/
|
88 |
+
protected $_direction = 'asc';
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Default View mode
|
92 |
+
*
|
93 |
+
* @var string
|
94 |
+
*/
|
95 |
+
protected $_viewMode = null;
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Available page limits for different list modes
|
99 |
+
*
|
100 |
+
* @var array
|
101 |
+
*/
|
102 |
+
protected $_availableLimit = array();
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Default limits per page
|
106 |
+
*
|
107 |
+
* @var array
|
108 |
+
*/
|
109 |
+
protected $_defaultAvailableLimit = array(10=>10,20=>20,50=>50);
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @var bool $_paramsMemorizeAllowed
|
113 |
+
*/
|
114 |
+
protected $_paramsMemorizeAllowed = true;
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Retrieve Catalog Config object
|
118 |
+
*
|
119 |
+
* @return Mage_Catalog_Model_Config
|
120 |
+
*/
|
121 |
+
protected function _getConfig()
|
122 |
+
{
|
123 |
+
return Mage::getSingleton('catalog/config');
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Init Toolbar
|
128 |
+
*
|
129 |
+
*/
|
130 |
+
protected function _construct()
|
131 |
+
{
|
132 |
+
parent::_construct();
|
133 |
+
$this->_orderField = Mage::getStoreConfig(
|
134 |
+
Mage_Catalog_Model_Config::XML_PATH_LIST_DEFAULT_SORT_BY
|
135 |
+
);
|
136 |
+
|
137 |
+
$this->_availableOrder = $this->_getConfig()->getAttributeUsedForSortByArray();
|
138 |
+
|
139 |
+
switch (Mage::getStoreConfig('catalog/frontend/list_mode')) {
|
140 |
+
case 'grid':
|
141 |
+
$this->_availableMode = array('grid' => $this->__('Grid'));
|
142 |
+
break;
|
143 |
+
|
144 |
+
case 'list':
|
145 |
+
$this->_availableMode = array('list' => $this->__('List'));
|
146 |
+
break;
|
147 |
+
|
148 |
+
case 'grid-list':
|
149 |
+
$this->_availableMode = array('grid' => $this->__('Grid'), 'list' => $this->__('List'));
|
150 |
+
break;
|
151 |
+
|
152 |
+
case 'list-grid':
|
153 |
+
$this->_availableMode = array('list' => $this->__('List'), 'grid' => $this->__('Grid'));
|
154 |
+
break;
|
155 |
+
}
|
156 |
+
$this->setTemplate('slider/slider2.phtml');
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Disable list state params memorizing
|
161 |
+
*/
|
162 |
+
public function disableParamsMemorizing()
|
163 |
+
{
|
164 |
+
$this->_paramsMemorizeAllowed = false;
|
165 |
+
return $this;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Memorize parameter value for session
|
170 |
+
*
|
171 |
+
* @param string $param parameter name
|
172 |
+
* @param mixed $value parameter value
|
173 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
174 |
+
*/
|
175 |
+
protected function _memorizeParam($param, $value)
|
176 |
+
{
|
177 |
+
$session = Mage::getSingleton('catalog/session');
|
178 |
+
if ($this->_paramsMemorizeAllowed && !$session->getParamsMemorizeDisabled()) {
|
179 |
+
$session->setData($param, $value);
|
180 |
+
}
|
181 |
+
return $this;
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Set collection to pager
|
186 |
+
*
|
187 |
+
* @param Varien_Data_Collection $collection
|
188 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
189 |
+
*/
|
190 |
+
public function setCollection($collection)
|
191 |
+
{
|
192 |
+
|
193 |
+
echo $this->_collection;
|
194 |
+
$this->_collection = $collection;
|
195 |
+
///var_dump($this->_collection);die;
|
196 |
+
$this->_collection->setCurPage($this->getCurrentPage());
|
197 |
+
|
198 |
+
// we need to set pagination only if passed value integer and more that 0
|
199 |
+
$limit = (int)$this->getLimit();
|
200 |
+
if ($limit) {
|
201 |
+
$this->_collection->setPageSize($limit);
|
202 |
+
}
|
203 |
+
if ($this->getCurrentOrder()) {
|
204 |
+
$this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
|
205 |
+
}
|
206 |
+
return $this;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Return products collection instance
|
211 |
+
*
|
212 |
+
* @return Mage_Core_Model_Mysql4_Collection_Abstract
|
213 |
+
*/
|
214 |
+
public function getCollection()
|
215 |
+
{
|
216 |
+
|
217 |
+
return $this->_collection;
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Getter for $_pageVarName
|
222 |
+
*
|
223 |
+
* @return string
|
224 |
+
*/
|
225 |
+
public function getPageVarName()
|
226 |
+
{
|
227 |
+
return $this->_pageVarName;
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Retrieve order field GET var name
|
232 |
+
*
|
233 |
+
* @return string
|
234 |
+
*/
|
235 |
+
public function getOrderVarName()
|
236 |
+
{
|
237 |
+
return $this->_orderVarName;
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Retrieve sort direction GET var name
|
242 |
+
*
|
243 |
+
* @return string
|
244 |
+
*/
|
245 |
+
public function getDirectionVarName()
|
246 |
+
{
|
247 |
+
return $this->_directionVarName;
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Retrieve view mode GET var name
|
252 |
+
*
|
253 |
+
* @return string
|
254 |
+
*/
|
255 |
+
public function getModeVarName()
|
256 |
+
{
|
257 |
+
return $this->_modeVarName;
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Getter for $_limitVarName
|
262 |
+
*
|
263 |
+
* @return string
|
264 |
+
*/
|
265 |
+
public function getLimitVarName()
|
266 |
+
{
|
267 |
+
return $this->_limitVarName;
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Return current page from request
|
272 |
+
*
|
273 |
+
* @return int
|
274 |
+
*/
|
275 |
+
public function getCurrentPage()
|
276 |
+
{
|
277 |
+
//var_dump($this->getPageVarName());die;
|
278 |
+
if ($page = (int) $this->getRequest()->getParam($this->getPageVarName())) {
|
279 |
+
return $page;
|
280 |
+
}
|
281 |
+
return 1;
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Get grit products sort order field
|
286 |
+
*
|
287 |
+
* @return string
|
288 |
+
*/
|
289 |
+
public function getCurrentOrder()
|
290 |
+
{
|
291 |
+
$order = $this->_getData('_current_grid_order');
|
292 |
+
if ($order) {
|
293 |
+
return $order;
|
294 |
+
}
|
295 |
+
|
296 |
+
$orders = $this->getAvailableOrders();
|
297 |
+
$defaultOrder = $this->_orderField;
|
298 |
+
|
299 |
+
if (!isset($orders[$defaultOrder])) {
|
300 |
+
$keys = array_keys($orders);
|
301 |
+
$defaultOrder = $keys[0];
|
302 |
+
}
|
303 |
+
|
304 |
+
$order = $this->getRequest()->getParam($this->getOrderVarName());
|
305 |
+
if ($order && isset($orders[$order])) {
|
306 |
+
if ($order == $defaultOrder) {
|
307 |
+
Mage::getSingleton('catalog/session')->unsSortOrder();
|
308 |
+
} else {
|
309 |
+
$this->_memorizeParam('sort_order', $order);
|
310 |
+
}
|
311 |
+
} else {
|
312 |
+
$order = Mage::getSingleton('catalog/session')->getSortOrder();
|
313 |
+
}
|
314 |
+
// validate session value
|
315 |
+
if (!$order || !isset($orders[$order])) {
|
316 |
+
$order = $defaultOrder;
|
317 |
+
}
|
318 |
+
$this->setData('_current_grid_order', $order);
|
319 |
+
return $order;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Retrieve current direction
|
324 |
+
*
|
325 |
+
* @return string
|
326 |
+
*/
|
327 |
+
public function getCurrentDirection()
|
328 |
+
{
|
329 |
+
$dir = $this->_getData('_current_grid_direction');
|
330 |
+
if ($dir) {
|
331 |
+
return $dir;
|
332 |
+
}
|
333 |
+
|
334 |
+
$directions = array('asc', 'desc');
|
335 |
+
$dir = strtolower($this->getRequest()->getParam($this->getDirectionVarName()));
|
336 |
+
if ($dir && in_array($dir, $directions)) {
|
337 |
+
if ($dir == $this->_direction) {
|
338 |
+
Mage::getSingleton('catalog/session')->unsSortDirection();
|
339 |
+
} else {
|
340 |
+
$this->_memorizeParam('sort_direction', $dir);
|
341 |
+
}
|
342 |
+
} else {
|
343 |
+
$dir = Mage::getSingleton('catalog/session')->getSortDirection();
|
344 |
+
}
|
345 |
+
// validate direction
|
346 |
+
if (!$dir || !in_array($dir, $directions)) {
|
347 |
+
$dir = $this->_direction;
|
348 |
+
}
|
349 |
+
$this->setData('_current_grid_direction', $dir);
|
350 |
+
return $dir;
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Set default Order field
|
355 |
+
*
|
356 |
+
* @param string $field
|
357 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
358 |
+
*/
|
359 |
+
public function setDefaultOrder($field)
|
360 |
+
{
|
361 |
+
if (isset($this->_availableOrder[$field])) {
|
362 |
+
$this->_orderField = $field;
|
363 |
+
}
|
364 |
+
return $this;
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Set default sort direction
|
369 |
+
*
|
370 |
+
* @param string $dir
|
371 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
372 |
+
*/
|
373 |
+
public function setDefaultDirection($dir)
|
374 |
+
{
|
375 |
+
if (in_array(strtolower($dir), array('asc', 'desc'))) {
|
376 |
+
$this->_direction = strtolower($dir);
|
377 |
+
}
|
378 |
+
return $this;
|
379 |
+
}
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Retrieve available Order fields list
|
383 |
+
*
|
384 |
+
* @return array
|
385 |
+
*/
|
386 |
+
public function getAvailableOrders()
|
387 |
+
{
|
388 |
+
return $this->_availableOrder;
|
389 |
+
}
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Set Available order fields list
|
393 |
+
*
|
394 |
+
* @param array $orders
|
395 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
396 |
+
*/
|
397 |
+
public function setAvailableOrders($orders)
|
398 |
+
{
|
399 |
+
$this->_availableOrder = $orders;
|
400 |
+
return $this;
|
401 |
+
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Add order to available orders
|
405 |
+
*
|
406 |
+
* @param string $order
|
407 |
+
* @param string $value
|
408 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
409 |
+
*/
|
410 |
+
public function addOrderToAvailableOrders($order, $value)
|
411 |
+
{
|
412 |
+
$this->_availableOrder[$order] = $value;
|
413 |
+
return $this;
|
414 |
+
}
|
415 |
+
/**
|
416 |
+
* Remove order from available orders if exists
|
417 |
+
*
|
418 |
+
* @param string $order
|
419 |
+
* @param Mage_Catalog_Block_Product_List_Toolbar
|
420 |
+
*/
|
421 |
+
public function removeOrderFromAvailableOrders($order)
|
422 |
+
{
|
423 |
+
if (isset($this->_availableOrder[$order])) {
|
424 |
+
unset($this->_availableOrder[$order]);
|
425 |
+
}
|
426 |
+
return $this;
|
427 |
+
}
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Compare defined order field vith current order field
|
431 |
+
*
|
432 |
+
* @param string $order
|
433 |
+
* @return bool
|
434 |
+
*/
|
435 |
+
public function isOrderCurrent($order)
|
436 |
+
{
|
437 |
+
return ($order == $this->getCurrentOrder());
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Retrieve Pager URL
|
442 |
+
*
|
443 |
+
* @param string $order
|
444 |
+
* @param string $direction
|
445 |
+
* @return string
|
446 |
+
*/
|
447 |
+
public function getOrderUrl($order, $direction)
|
448 |
+
{
|
449 |
+
if (is_null($order)) {
|
450 |
+
$order = $this->getCurrentOrder() ? $this->getCurrentOrder() : $this->_availableOrder[0];
|
451 |
+
}
|
452 |
+
return $this->getPagerUrl(array(
|
453 |
+
$this->getOrderVarName()=>$order,
|
454 |
+
$this->getDirectionVarName()=>$direction,
|
455 |
+
$this->getPageVarName() => null
|
456 |
+
));
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Return current URL with rewrites and additional parameters
|
461 |
+
*
|
462 |
+
* @param array $params Query parameters
|
463 |
+
* @return string
|
464 |
+
*/
|
465 |
+
public function getPagerUrl($params=array())
|
466 |
+
{
|
467 |
+
$urlParams = array();
|
468 |
+
$urlParams['_current'] = true;
|
469 |
+
$urlParams['_escape'] = true;
|
470 |
+
$urlParams['_use_rewrite'] = true;
|
471 |
+
$urlParams['_query'] = $params;
|
472 |
+
return $this->getUrl('*/*/*', $urlParams);
|
473 |
+
}
|
474 |
+
|
475 |
+
/**
|
476 |
+
* Retrieve current View mode
|
477 |
+
*
|
478 |
+
* @return string
|
479 |
+
*/
|
480 |
+
public function getCurrentMode()
|
481 |
+
{
|
482 |
+
// echo "mode1";
|
483 |
+
$mode = $this->_getData('_current_grid_mode');
|
484 |
+
//echo $mode;
|
485 |
+
|
486 |
+
if ($mode) {
|
487 |
+
return $mode;
|
488 |
+
}
|
489 |
+
$modes = array_keys($this->_availableMode);
|
490 |
+
//var_dump( $modes);
|
491 |
+
$defaultMode = current($modes);
|
492 |
+
$mode = $this->getRequest()->getParam($this->getModeVarName());
|
493 |
+
//echo($mode);
|
494 |
+
if ($mode) {
|
495 |
+
if ($mode == $defaultMode) {
|
496 |
+
Mage::getSingleton('catalog/session')->unsDisplayMode();
|
497 |
+
} else {
|
498 |
+
$this->_memorizeParam('display_mode', $mode);
|
499 |
+
}
|
500 |
+
} else {
|
501 |
+
$mode = Mage::getSingleton('catalog/session')->getDisplayMode();
|
502 |
+
|
503 |
+
}
|
504 |
+
|
505 |
+
if (!$mode || !isset($this->_availableMode[$mode])) {
|
506 |
+
$mode = $defaultMode;
|
507 |
+
//echo($mode)."saurabh";
|
508 |
+
}
|
509 |
+
$this->setData('_current_grid_mode', $mode);
|
510 |
+
return $mode;
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Compare defined view mode with current active mode
|
515 |
+
*
|
516 |
+
* @param string $mode
|
517 |
+
* @return bool
|
518 |
+
*/
|
519 |
+
public function isModeActive($mode)
|
520 |
+
{ //echo "mode2";
|
521 |
+
return $this->getCurrentMode() == $mode;
|
522 |
+
}
|
523 |
+
|
524 |
+
/**
|
525 |
+
* Retrieve availables view modes
|
526 |
+
*
|
527 |
+
* @return array
|
528 |
+
*/
|
529 |
+
public function getModes()
|
530 |
+
{
|
531 |
+
return $this->_availableMode;
|
532 |
+
}
|
533 |
+
|
534 |
+
/**
|
535 |
+
* Set available view modes list
|
536 |
+
*
|
537 |
+
* @param array $modes
|
538 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
539 |
+
*/
|
540 |
+
public function setModes($modes)
|
541 |
+
{
|
542 |
+
if(!isset($this->_availableMode)){
|
543 |
+
$this->_availableMode = $modes;
|
544 |
+
}
|
545 |
+
return $this;
|
546 |
+
}
|
547 |
+
|
548 |
+
/**
|
549 |
+
* Retrive URL for view mode
|
550 |
+
*
|
551 |
+
* @param string $mode
|
552 |
+
* @return string
|
553 |
+
*/
|
554 |
+
public function getModeUrl($mode)
|
555 |
+
{
|
556 |
+
return $this->getPagerUrl( array($this->getModeVarName()=>$mode, $this->getPageVarName() => null) );
|
557 |
+
}
|
558 |
+
|
559 |
+
/**
|
560 |
+
* Disable view switcher
|
561 |
+
*
|
562 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
563 |
+
*/
|
564 |
+
public function disableViewSwitcher()
|
565 |
+
{
|
566 |
+
$this->_enableViewSwitcher = false;
|
567 |
+
return $this;
|
568 |
+
}
|
569 |
+
|
570 |
+
/**
|
571 |
+
* Enable view switcher
|
572 |
+
*
|
573 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
574 |
+
*/
|
575 |
+
public function enableViewSwitcher()
|
576 |
+
{
|
577 |
+
$this->_enableViewSwitcher = true;
|
578 |
+
return $this;
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Is a enabled view switcher
|
583 |
+
*
|
584 |
+
* @return bool
|
585 |
+
*/
|
586 |
+
public function isEnabledViewSwitcher()
|
587 |
+
{
|
588 |
+
return $this->_enableViewSwitcher;
|
589 |
+
}
|
590 |
+
|
591 |
+
/**
|
592 |
+
* Disable Expanded
|
593 |
+
*
|
594 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
595 |
+
*/
|
596 |
+
public function disableExpanded()
|
597 |
+
{
|
598 |
+
$this->_isExpanded = false;
|
599 |
+
return $this;
|
600 |
+
}
|
601 |
+
|
602 |
+
/**
|
603 |
+
* Enable Expanded
|
604 |
+
*
|
605 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
606 |
+
*/
|
607 |
+
public function enableExpanded()
|
608 |
+
{
|
609 |
+
$this->_isExpanded = true;
|
610 |
+
return $this;
|
611 |
+
}
|
612 |
+
|
613 |
+
/**
|
614 |
+
* Check is Expanded
|
615 |
+
*
|
616 |
+
* @return bool
|
617 |
+
*/
|
618 |
+
public function isExpanded()
|
619 |
+
{
|
620 |
+
return $this->_isExpanded;
|
621 |
+
}
|
622 |
+
|
623 |
+
/**
|
624 |
+
* Retrieve default per page values
|
625 |
+
*
|
626 |
+
* @return string (comma separated)
|
627 |
+
*/
|
628 |
+
public function getDefaultPerPageValue()
|
629 |
+
{ //echo "mode3";
|
630 |
+
if ($this->getCurrentMode() == 'list') {
|
631 |
+
if ($default = $this->getDefaultListPerPage()) {
|
632 |
+
return $default;
|
633 |
+
}
|
634 |
+
return Mage::getStoreConfig('catalog/frontend/list_per_page');
|
635 |
+
}
|
636 |
+
elseif ($this->getCurrentMode() == 'grid') {
|
637 |
+
if ($default = $this->getDefaultGridPerPage()) {
|
638 |
+
return $default;
|
639 |
+
}
|
640 |
+
return Mage::getStoreConfig('catalog/frontend/grid_per_page');
|
641 |
+
}
|
642 |
+
return 0;
|
643 |
+
}
|
644 |
+
|
645 |
+
/**
|
646 |
+
* Add new limit to pager for mode
|
647 |
+
*
|
648 |
+
* @param string $mode
|
649 |
+
* @param string $value
|
650 |
+
* @param string $label
|
651 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
652 |
+
*/
|
653 |
+
public function addPagerLimit($mode, $value, $label='')
|
654 |
+
{
|
655 |
+
if (!isset($this->_availableLimit[$mode])) {
|
656 |
+
$this->_availableLimit[$mode] = array();
|
657 |
+
}
|
658 |
+
$this->_availableLimit[$mode][$value] = empty($label) ? $value : $label;
|
659 |
+
return $this;
|
660 |
+
}
|
661 |
+
|
662 |
+
/**
|
663 |
+
* Retrieve available limits for current view mode
|
664 |
+
*
|
665 |
+
* @return array
|
666 |
+
*/
|
667 |
+
public function getAvailableLimit()
|
668 |
+
{ //echo "mode4";
|
669 |
+
$currentMode = $this->getCurrentMode();
|
670 |
+
//echo $currentMode;die;
|
671 |
+
if (in_array($currentMode, array('list', 'grid'))) {
|
672 |
+
//echo $currentMode;die;
|
673 |
+
return $this->_getAvailableLimit($currentMode);
|
674 |
+
} else {
|
675 |
+
//echo "hehahahahaha";die;
|
676 |
+
return $this->_defaultAvailableLimit;
|
677 |
+
|
678 |
+
}
|
679 |
+
}
|
680 |
+
|
681 |
+
/**
|
682 |
+
* Retrieve available limits for specified view mode
|
683 |
+
*
|
684 |
+
* @return array
|
685 |
+
*/
|
686 |
+
protected function _getAvailableLimit($mode)
|
687 |
+
{
|
688 |
+
if (isset($this->_availableLimit[$mode])) {
|
689 |
+
return $this->_availableLimit[$mode];
|
690 |
+
}
|
691 |
+
$perPageConfigKey = 'catalog/frontend/' . $mode . '_per_page_values';
|
692 |
+
$perPageValues = (string)Mage::getStoreConfig($perPageConfigKey);
|
693 |
+
$perPageValues = explode(',', $perPageValues);
|
694 |
+
$perPageValues = array_combine($perPageValues, $perPageValues);
|
695 |
+
if (Mage::getStoreConfigFlag('catalog/frontend/list_allow_all')) {
|
696 |
+
return ($perPageValues + array('all'=>$this->__('All')));
|
697 |
+
} else {
|
698 |
+
return $perPageValues;
|
699 |
+
}
|
700 |
+
}
|
701 |
+
|
702 |
+
/**
|
703 |
+
* Get specified products limit display per page
|
704 |
+
*
|
705 |
+
* @return string
|
706 |
+
*/
|
707 |
+
public function getLimit()
|
708 |
+
{
|
709 |
+
$limit = $this->_getData('_current_limit');
|
710 |
+
if ($limit) {
|
711 |
+
return $limit;
|
712 |
+
}
|
713 |
+
|
714 |
+
$limits = $this->getAvailableLimit();
|
715 |
+
$defaultLimit = $this->getDefaultPerPageValue();
|
716 |
+
if (!$defaultLimit || !isset($limits[$defaultLimit])) {
|
717 |
+
$keys = array_keys($limits);
|
718 |
+
$defaultLimit = $keys[0];
|
719 |
+
}
|
720 |
+
|
721 |
+
$limit = $this->getRequest()->getParam($this->getLimitVarName());
|
722 |
+
if ($limit && isset($limits[$limit])) {
|
723 |
+
if ($limit == $defaultLimit) {
|
724 |
+
Mage::getSingleton('catalog/session')->unsLimitPage();
|
725 |
+
} else {
|
726 |
+
$this->_memorizeParam('limit_page', $limit);
|
727 |
+
}
|
728 |
+
} else {
|
729 |
+
$limit = Mage::getSingleton('catalog/session')->getLimitPage();
|
730 |
+
}
|
731 |
+
if (!$limit || !isset($limits[$limit])) {
|
732 |
+
$limit = $defaultLimit;
|
733 |
+
}
|
734 |
+
|
735 |
+
$this->setData('_current_limit', $limit);
|
736 |
+
return $limit;
|
737 |
+
}
|
738 |
+
|
739 |
+
/**
|
740 |
+
* Retrieve Limit Pager URL
|
741 |
+
*
|
742 |
+
* @param int $limit
|
743 |
+
* @return string
|
744 |
+
*/
|
745 |
+
public function getLimitUrl($limit)
|
746 |
+
{
|
747 |
+
return $this->getPagerUrl(array(
|
748 |
+
$this->getLimitVarName() => $limit,
|
749 |
+
$this->getPageVarName() => null
|
750 |
+
));
|
751 |
+
}
|
752 |
+
|
753 |
+
public function isLimitCurrent($limit)
|
754 |
+
{
|
755 |
+
return $limit == $this->getLimit();
|
756 |
+
}
|
757 |
+
|
758 |
+
public function getFirstNum()
|
759 |
+
{
|
760 |
+
$collection = $this->getCollection();
|
761 |
+
return $collection->getPageSize()*($collection->getCurPage()-1)+1;
|
762 |
+
}
|
763 |
+
|
764 |
+
public function getLastNum()
|
765 |
+
{
|
766 |
+
$collection = $this->getCollection();
|
767 |
+
return $collection->getPageSize()*($collection->getCurPage()-1)+$collection->count();
|
768 |
+
}
|
769 |
+
|
770 |
+
public function getTotalNum()
|
771 |
+
{
|
772 |
+
return $this->getCollection()->getSize();
|
773 |
+
}
|
774 |
+
|
775 |
+
public function isFirstPage()
|
776 |
+
{
|
777 |
+
return $this->getCollection()->getCurPage() == 1;
|
778 |
+
}
|
779 |
+
|
780 |
+
public function getLastPageNum()
|
781 |
+
{
|
782 |
+
return $this->getCollection()->getLastPageNumber();
|
783 |
+
}
|
784 |
+
|
785 |
+
/**
|
786 |
+
* Render pagination HTML
|
787 |
+
*
|
788 |
+
* @return string
|
789 |
+
*/
|
790 |
+
public function getPagerHtml()
|
791 |
+
{ //var_dump($this);
|
792 |
+
$pagerBlock = $this->getLayout()->createBlock('slider/pager');
|
793 |
+
//var_dump($pagerBlock);die;
|
794 |
+
if ($pagerBlock instanceof Varien_Object) {
|
795 |
+
|
796 |
+
/* @var $pagerBlock Mage_Page_Block_Html_Pager */
|
797 |
+
//var_dump($this->getAvailableLimit());die;
|
798 |
+
$pagerBlock->setAvailableLimit($this->getAvailableLimit());
|
799 |
+
|
800 |
+
$pagerBlock->setUseContainer(false)
|
801 |
+
->setShowPerPage(false)
|
802 |
+
->setShowAmounts(false)
|
803 |
+
->setLimitVarName($this->getLimitVarName())
|
804 |
+
->setPageVarName($this->getPageVarName())
|
805 |
+
->setLimit($this->getLimit())
|
806 |
+
->setFrameLength(Mage::getStoreConfig('design/pagination/pagination_frame'))
|
807 |
+
->setJump(Mage::getStoreConfig('design/pagination/pagination_frame_skip'))
|
808 |
+
->setCollection($this->getCollection());
|
809 |
+
|
810 |
+
return $pagerBlock->toHtml();
|
811 |
+
}
|
812 |
+
echo 'okok';die;
|
813 |
+
return '';
|
814 |
+
}
|
815 |
+
}
|
app/code/local/Slider/Slider/Model/Slider.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Slider_Slider_Model_Slider extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('slider/slider');
|
9 |
+
}
|
10 |
+
|
11 |
+
}
|
app/code/local/Slider/Slider/controllers/SliderController.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Slider_Slider_SliderController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
|
6 |
+
|
7 |
+
public function viewAction()
|
8 |
+
{
|
9 |
+
$categoryId=(int) $this->getRequest()->getParam('id', false);
|
10 |
+
$category = Mage::getModel('catalog/category')
|
11 |
+
->setStoreId(Mage::app()->getStore()->getId())
|
12 |
+
->load($categoryId);
|
13 |
+
Mage::register('current_category', $category);
|
14 |
+
$this->loadLayout();
|
15 |
+
$this->renderLayout();
|
16 |
+
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
?>
|
app/code/local/Slider/Slider/etc/config.xml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Slider_Slider>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Slider_Slider>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
|
10 |
+
<global>
|
11 |
+
<blocks>
|
12 |
+
<slider>
|
13 |
+
<class>Slider_Slider_Block</class>
|
14 |
+
</slider>
|
15 |
+
</blocks>
|
16 |
+
</global>
|
17 |
+
<frontend>
|
18 |
+
<routers>
|
19 |
+
<slider>
|
20 |
+
<use>standard</use>
|
21 |
+
<args>
|
22 |
+
<module>Slider_Slider</module>
|
23 |
+
<frontName>slider</frontName>
|
24 |
+
</args>
|
25 |
+
</slider>
|
26 |
+
</routers>
|
27 |
+
<layout>
|
28 |
+
<updates>
|
29 |
+
<slider>
|
30 |
+
<file>slider.xml</file>
|
31 |
+
</slider>
|
32 |
+
</updates>
|
33 |
+
</layout>
|
34 |
+
</frontend>
|
35 |
+
</config>
|
app/design/frontend/default/default/layout/slider.xml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.2.0">
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addJs"><script>varien/jquery-1.4.1.min.js</script></action>
|
6 |
+
<action method="addJs"><script>varien/jquery-ui-1.8rc1.custom.min.js</script></action>
|
7 |
+
|
8 |
+
<action method="addItem"><type>js_css</type><name>slider/jquery-ui-1.8rc1.custom.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
|
9 |
+
</reference>
|
10 |
+
</default>
|
11 |
+
<slider_slider_view>
|
12 |
+
<reference name="root">
|
13 |
+
<action method="setTemplate"><template>slider/slider.phtml</template></action>
|
14 |
+
</reference>
|
15 |
+
<reference name="root">
|
16 |
+
<block type="slider/mainslider" name="main" template="slider/slider3.phtml">
|
17 |
+
<block type="slider/slider" name="content" as="content" template="slider/slider1.phtml">
|
18 |
+
<block type="slider/tool" name="toolbar" as="toolbar" template="slider/slider2.phtml">
|
19 |
+
<block type="slider/pager" name="slider_pager" as="slider_pager" template="slider/slider4.phtml" />
|
20 |
+
</block>
|
21 |
+
</block>
|
22 |
+
</block>
|
23 |
+
</reference>
|
24 |
+
</slider_slider_view>
|
25 |
+
<catalog_category_layered translate="label">
|
26 |
+
<label>Catalog Category (Anchor)</label>
|
27 |
+
<reference name="left">
|
28 |
+
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="slider/view.phtml"/>
|
29 |
+
</reference>
|
30 |
+
</catalog_category_layered>
|
31 |
+
</layout>
|
app/design/frontend/default/default/template/slider/pager.phtml
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Pager template
|
30 |
+
*
|
31 |
+
* @see Mage_Page_Block_Html_Pager
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php if($this->getCollection()->getSize()): ?>
|
35 |
+
|
36 |
+
<?php if($this->getUseContainer()): ?>
|
37 |
+
<div class="pager">
|
38 |
+
<?php endif ?>
|
39 |
+
|
40 |
+
<?php if($this->getShowAmounts()): ?>
|
41 |
+
<p class="amount">
|
42 |
+
<?php if($this->getLastPageNum()>1): ?>
|
43 |
+
<?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
|
44 |
+
<?php else: ?>
|
45 |
+
<strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
|
46 |
+
<?php endif; ?>
|
47 |
+
</p>
|
48 |
+
<?php endif ?>
|
49 |
+
|
50 |
+
<?php if($this->getShowPerPage()): ?>
|
51 |
+
<div class="limiter">
|
52 |
+
<label><?php echo $this->__('Show') ?></label>
|
53 |
+
<select onchange="setLocation(this.value)">
|
54 |
+
<?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
|
55 |
+
<option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
|
56 |
+
<?php echo $_limit ?>
|
57 |
+
</option>
|
58 |
+
<?php endforeach; ?>
|
59 |
+
</select> <?php echo $this->__('per page') ?>
|
60 |
+
</div>
|
61 |
+
<?php endif ?>
|
62 |
+
|
63 |
+
<?php if($this->getLastPageNum()>1): ?>
|
64 |
+
<div class="pages">
|
65 |
+
<strong><?php echo $this->__('Page:') ?></strong>
|
66 |
+
<ol>
|
67 |
+
<?php if (!$this->isFirstPage()): ?>
|
68 |
+
<li>
|
69 |
+
<a style="cursor:pointer" class="previous<?php if(!$this->getAnchorTextForPrevious()): ?> i-previous<?php endif;?>" onClick="pager('<?php echo $this->getPreviousPageUrl() ?>')" title="<?php echo $this->__('Previous') ?>">
|
70 |
+
<?php if(!$this->getAnchorTextForPrevious()): ?>
|
71 |
+
<img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="<?php echo $this->__('Previous') ?>" class="v-middle" />
|
72 |
+
<?php else: ?>
|
73 |
+
<?php echo $this->getAnchorTextForPrevious() ?>
|
74 |
+
<?php endif;?>
|
75 |
+
</a>
|
76 |
+
</li>
|
77 |
+
<?php endif;?>
|
78 |
+
|
79 |
+
<?php if ($this->canShowFirst()): ?>
|
80 |
+
<li><a class="first" style="cursor:pointer" onClick="pager('<?php echo $this->getFirstPageUrl() ?>')">1</a></li>
|
81 |
+
<?php endif;?>
|
82 |
+
|
83 |
+
<?php if ($this->canShowPreviousJump()): ?>
|
84 |
+
<li><a class="previous_jump" style="cursor:pointer" title="" onClick="pager('<?php echo $this->getPreviousJumpUrl() ?>')">...</a></li>
|
85 |
+
<?php endif;?>
|
86 |
+
|
87 |
+
<?php foreach ($this->getFramePages() as $_page): ?>
|
88 |
+
<?php if ($this->isPageCurrent($_page)): ?>
|
89 |
+
<li class="current"><?php echo $_page ?></li>
|
90 |
+
<?php else: ?>
|
91 |
+
<li><a style="cursor:pointer" onClick="pager('<?php echo $this->getPageUrl($_page) ?>')"><?php echo $_page ?></a></li>
|
92 |
+
<?php endif;?>
|
93 |
+
<?php endforeach;?>
|
94 |
+
|
95 |
+
|
96 |
+
<?php if ($this->canShowNextJump()): ?>
|
97 |
+
<li><a class="next_jump" style="cursor:pointer" title="" onClick="pager('<?php echo $this->getNextJumpUrl() ?>')">...</a></li>
|
98 |
+
<?php endif;?>
|
99 |
+
|
100 |
+
<?php if ($this->canShowLast()): ?>
|
101 |
+
<li><a class="last" style="cursor:pointer" onClick="pager('<?php echo $this->getLastPageUrl() ?>')"><?php echo $this->getLastPageNum() ?></a></li>
|
102 |
+
<?php endif;?>
|
103 |
+
|
104 |
+
<?php if (!$this->isLastPage()): ?>
|
105 |
+
<li>
|
106 |
+
<a style="cursor:pointer" class="next<?php if(!$this->getAnchorTextForNext()): ?> i-next<?php endif; ?>" onClick="pager('<?php echo $this->getNextPageUrl() ?>')" title="<?php echo $this->__('Next') ?>">
|
107 |
+
<?php if(!$this->getAnchorTextForNext()): ?>
|
108 |
+
<img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="<?php echo $this->__('Next') ?>" class="v-middle" />
|
109 |
+
<?php else: ?>
|
110 |
+
<?php echo $this->getAnchorTextForNext() ?>
|
111 |
+
<?php endif;?>
|
112 |
+
</a>
|
113 |
+
</li>
|
114 |
+
<?php endif;?>
|
115 |
+
</ol>
|
116 |
+
|
117 |
+
</div>
|
118 |
+
<?php endif; ?>
|
119 |
+
|
120 |
+
<?php if($this->getUseContainer()): ?>
|
121 |
+
</div>
|
122 |
+
<?php endif ?>
|
123 |
+
|
124 |
+
<?php endif ?>
|
125 |
+
|
126 |
+
<script type="text/javascript">
|
127 |
+
function pager(value){
|
128 |
+
|
129 |
+
|
130 |
+
$('.col-main').first().load(value);
|
131 |
+
}
|
132 |
+
</script>
|
app/design/frontend/default/default/template/slider/slider.phtml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<?php echo $this->getChildHtml('main') ?>
|
3 |
+
|
4 |
+
|
app/design/frontend/default/default/template/slider/slider1.phtml
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Product list template
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Product_List
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php
|
35 |
+
$_productCollection=$this->getLoadedProductCollection();
|
36 |
+
$_helper = $this->helper('catalog/output');
|
37 |
+
?>
|
38 |
+
|
39 |
+
<?php
|
40 |
+
|
41 |
+
?>
|
42 |
+
<?php //$this->getMode(); die; ?>
|
43 |
+
<?php if(!$_productCollection->count()): ?>
|
44 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
45 |
+
<?php else: ?>
|
46 |
+
<div class="category-products">
|
47 |
+
<?php //echo sizeof($_productCollection);die;?>
|
48 |
+
<?php //echo "sdfgfdfs12";die; ?>
|
49 |
+
<?php echo $this->getChildHtml('toolbar');?>
|
50 |
+
<?php //echo "gfdfs";die; ?>
|
51 |
+
<?php // List mode ?>
|
52 |
+
|
53 |
+
<?php if($this->getMode()!='grid'): ?>
|
54 |
+
<?php //echo "i m in list view"; die;?>
|
55 |
+
<?php $_iterator = 0; ?>
|
56 |
+
<ol class="products-list" id="products-list">
|
57 |
+
<?php $urlVar=$this->getRequest()->getParams();$model= Mage::getModel('catalog/product'); ?>
|
58 |
+
<?php foreach ($_productCollection as $_product): ?>
|
59 |
+
|
60 |
+
|
61 |
+
<li class="item<?php if( ++$_iterator == 2 ): ?> last<?php endif; ?>">
|
62 |
+
<?php // Product Image ?>
|
63 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
64 |
+
<?php // Product description ?>
|
65 |
+
<div class="product-shop">
|
66 |
+
<div class="f-fix">
|
67 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
68 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
69 |
+
<?php if($_product->getRatingSummary()): ?>
|
70 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
71 |
+
<?php endif; ?>
|
72 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
73 |
+
<?php if($_product->isSaleable()): ?>
|
74 |
+
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
75 |
+
<?php else: ?>
|
76 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
77 |
+
<?php endif; ?>
|
78 |
+
<div class="desc std">
|
79 |
+
<?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
80 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
81 |
+
</div>
|
82 |
+
<ul class="add-to-links">
|
83 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
84 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
85 |
+
<?php endif; ?>
|
86 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
87 |
+
<li><span class="separator">|</span> <a href="#" style="cursor:pointer" onClick="toCompare('<?php echo $_compareUrl ?>')" class="link-compare"><?php echo $this->__('Add to Compare') ?><?php //echo $_compareUrl ?></a></li>
|
88 |
+
<?php endif; ?>
|
89 |
+
</ul>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
</li>
|
93 |
+
|
94 |
+
<?php endforeach; ?>
|
95 |
+
</ol>
|
96 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
97 |
+
|
98 |
+
<?php else: ?>
|
99 |
+
|
100 |
+
<?php $_collectionSize = $_productCollection->count() ?>
|
101 |
+
<?php $_columnCount = $this->getColumnCount(); ?>
|
102 |
+
<?php $i=0; foreach ($_productCollection as $_product): ?>
|
103 |
+
<?php $urlVar=$this->getRequest()->getParams();$model= Mage::getModel('catalog/product'); ?>
|
104 |
+
|
105 |
+
<?php if ($i++%$_columnCount==0): ?>
|
106 |
+
<ul class="products-grid">
|
107 |
+
<?php endif ?>
|
108 |
+
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
109 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
110 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
111 |
+
<?php if($_product->getRatingSummary()): ?>
|
112 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
|
113 |
+
<?php endif; ?>
|
114 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
115 |
+
<div class="actions">
|
116 |
+
<?php if($_product->isSaleable()): ?>
|
117 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
118 |
+
<?php else: ?>
|
119 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
120 |
+
<?php endif; ?>
|
121 |
+
<ul class="add-to-links">
|
122 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
123 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
124 |
+
<?php endif; ?>
|
125 |
+
<?php //echo $this->getAddToCompareUrl($_product) ;die;?>
|
126 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
127 |
+
<li><span class="separator">|</span> <a href="#" style="cursor:pointer" onClick="toCompare('<?php echo $_compareUrl ?>')" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
128 |
+
<?php endif; ?>
|
129 |
+
</ul>
|
130 |
+
</div>
|
131 |
+
</li>
|
132 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
133 |
+
</ul>
|
134 |
+
<?php endif; ?>
|
135 |
+
|
136 |
+
<?php endforeach ?>
|
137 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
138 |
+
<?php endif; ?>
|
139 |
+
|
140 |
+
|
141 |
+
</div>
|
142 |
+
<div class="toolbar-bottom">
|
143 |
+
<?php echo $this->getChildHtml('toolbar'); ?>
|
144 |
+
</div>
|
145 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/slider/slider2.phtml
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Product list toolbar
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Product_List_Toolbar
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php if($this->getCollection()->getSize()): ?>
|
35 |
+
<div class="toolbar">
|
36 |
+
<div class="pager">
|
37 |
+
<p class="amount">
|
38 |
+
<?php if($this->getLastPageNum()<1): ?>
|
39 |
+
<?php //echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
|
40 |
+
<?php else: ?>
|
41 |
+
<strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
|
42 |
+
<?php endif; ?>
|
43 |
+
</p>
|
44 |
+
|
45 |
+
<div class="limiter">
|
46 |
+
<label><?php echo $this->__('Show') ?></label>
|
47 |
+
<select onchange="showPerPage(this.value)">
|
48 |
+
<?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
|
49 |
+
<option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
|
50 |
+
<?php echo $_limit ?>
|
51 |
+
</option>
|
52 |
+
<?php endforeach; ?>
|
53 |
+
</select> <?php echo $this->__('per page') ?>
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<?php echo $this->getPagerHtml(); ?>
|
57 |
+
|
58 |
+
</div>
|
59 |
+
<script type="text/javascript">
|
60 |
+
function modeSystem(mode)
|
61 |
+
{ //alert("hello");
|
62 |
+
var slidervalue=$('#price-filter').val()||[];
|
63 |
+
var pos=slidervalue.indexOf(',');
|
64 |
+
var minprice=slidervalue.substring(0,pos);
|
65 |
+
var maxprice=slidervalue.substring(pos+1);
|
66 |
+
var ids = $("#category").val();
|
67 |
+
//alert(pos+ 'haha' + pos + 'hihi' + minprice + 'hoho' + maxprice + 'hyhy' +ids);
|
68 |
+
var baseurl= $('#price-filterF').val();
|
69 |
+
var remainurl='slider/slider/view?min='+ minprice +'&max='+ maxprice +'&id='+ids + '&mode=' + mode;
|
70 |
+
var correctbaseurl=baseurl + remainurl;
|
71 |
+
//alert(correctbaseurl);
|
72 |
+
|
73 |
+
$('.col-main').first().load(correctbaseurl);
|
74 |
+
|
75 |
+
}
|
76 |
+
function sortSystem(value)
|
77 |
+
{
|
78 |
+
$('.col-main').first().load(value);
|
79 |
+
}
|
80 |
+
function showPerPage(value)
|
81 |
+
{
|
82 |
+
$('.col-main').first().load(value);
|
83 |
+
}
|
84 |
+
function direction(value)
|
85 |
+
{
|
86 |
+
$('.col-main').first().load(value);
|
87 |
+
}
|
88 |
+
function toCompare(value)
|
89 |
+
{
|
90 |
+
|
91 |
+
$('.col-main').first().load(value);
|
92 |
+
$('.addtocompare').first().load('http://192.168.0.75/testingMagento/index.php/men.html?compare=1');
|
93 |
+
|
94 |
+
}
|
95 |
+
</script>
|
96 |
+
<?php if( $this->isExpanded() ): ?>
|
97 |
+
<div class="sorter">
|
98 |
+
<?php if( $this->isEnabledViewSwitcher() ): ?>
|
99 |
+
<p class="view-mode">
|
100 |
+
<?php $_modes = $this->getModes(); ?>
|
101 |
+
<?php //var_dump($_modes);?>
|
102 |
+
<?php if($_modes && count($_modes)>1): ?>
|
103 |
+
<label><?php echo $this->__('View as') ?>:</label>
|
104 |
+
<?php foreach ($this->getModes() as $_code=>$_label): ?>
|
105 |
+
|
106 |
+
<?php if($this->isModeActive($_code)): ?>
|
107 |
+
<strong title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></strong>
|
108 |
+
<?php else: ?>
|
109 |
+
<?php //echo $this->getModeUrl($_code); ?>
|
110 |
+
<a title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>" style="cursor:pointer" onClick="modeSystem('<?php echo $_code; ?>')" ><?php echo $_label ?></a>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php endforeach; ?>
|
113 |
+
<?php endif; ?>
|
114 |
+
</p>
|
115 |
+
|
116 |
+
|
117 |
+
<?php endif; ?>
|
118 |
+
|
119 |
+
<div class="sort-by">
|
120 |
+
<label><?php echo $this->__('Sort By') ?></label>
|
121 |
+
<select onchange="sortSystem(this.value)">
|
122 |
+
<?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
|
123 |
+
<option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
|
124 |
+
<?php echo $this->__($_order) ?>
|
125 |
+
</option>
|
126 |
+
<?php endforeach; ?>
|
127 |
+
</select>
|
128 |
+
<?php if($this->getCurrentDirection() == 'desc'): ?>
|
129 |
+
<a onClick="direction('<?php echo $this->getOrderUrl(null, 'asc') ?>')" title="<?php echo $this->__('Set Ascending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_desc_arrow.gif') ?>" alt="<?php echo $this->__('Set Ascending Direction') ?>" class="v-middle" /></a>
|
130 |
+
<?php else: ?>
|
131 |
+
<a onClick="direction('<?php echo $this->getOrderUrl(null, 'desc') ?>')" title="<?php echo $this->__('Set Descending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_asc_arrow.gif') ?>" alt="<?php echo $this->__('Set Descending Direction') ?>" class="v-middle" /></a>
|
132 |
+
<?php endif; ?>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
<?php endif; ?>
|
136 |
+
</div>
|
137 |
+
<?php endif ?>
|
app/design/frontend/default/default/template/slider/slider3.phtml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $_helper= Mage::helper('catalog/output');
|
2 |
+
|
3 |
+
$_category = $this->getCurrentCategory();
|
4 |
+
//var_dump($_category);die;
|
5 |
+
?>
|
6 |
+
<div class="page-title category-title">
|
7 |
+
<?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
|
8 |
+
<a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
|
9 |
+
<?php endif; ?>
|
10 |
+
<h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
|
11 |
+
</div>
|
12 |
+
<?php $this->getLayout()->createBlock('catalog/category/view');echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
13 |
+
<?php echo $this->getChildHtml('content'); ?>
|
app/design/frontend/default/default/template/slider/slider4.phtml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<h1>hello</h1>
|
app/design/frontend/default/default/template/slider/view.phtml
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Category layered navigation
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Layer_View
|
32 |
+
*/
|
33 |
+
|
34 |
+
|
35 |
+
?>
|
36 |
+
<?php if($this->canShowBlock()): ?>
|
37 |
+
<div class="block block-layered-nav">
|
38 |
+
<div class="block-title">
|
39 |
+
<strong><span><?php echo $this->__('Shop By') ?></span></strong>
|
40 |
+
</div>
|
41 |
+
<script type="text/javascript">
|
42 |
+
|
43 |
+
$(document).ready(function(){ $('#simplediv').hide();});
|
44 |
+
|
45 |
+
$(function()
|
46 |
+
{
|
47 |
+
<?php $max=Mage::getModel('catalog/layer_filter_price');
|
48 |
+
$maxPrice=$max->getMaxPriceInt();
|
49 |
+
?>
|
50 |
+
$("#slider").slider({range:true,
|
51 |
+
min:0,
|
52 |
+
max:$("#max-price").val(),
|
53 |
+
values:[0,300],
|
54 |
+
slide: function( event, ui ) {
|
55 |
+
$( "#price-filter" ).val(ui.values[ 0 ] + "," + ui.values[ 1 ] );
|
56 |
+
} ,
|
57 |
+
stop: function(event, ui){
|
58 |
+
var ids = $("#category").val();
|
59 |
+
|
60 |
+
var baseurl= $('#price-filterF').val();
|
61 |
+
|
62 |
+
var remainurl='slider/slider/view?min='+ ui.values[ 0 ] +'&max='+ui.values[ 1] +'&id='+ids ;
|
63 |
+
|
64 |
+
var correctbaseurl=baseurl + remainurl;
|
65 |
+
$('#simplediv').show(1000);
|
66 |
+
$('.col-main').first().load(correctbaseurl, function(){ $('#simplediv').hide(500);} );
|
67 |
+
}
|
68 |
+
});
|
69 |
+
});
|
70 |
+
</script>
|
71 |
+
<div class="block-content">
|
72 |
+
<?php echo $this->getStateHtml() ?>
|
73 |
+
<?php if($this->canShowOptions()): ?>
|
74 |
+
<p class="block-subtitle"><?php echo $this->__('Shopping Options') ?></p>
|
75 |
+
<dl id="narrow-by-list">
|
76 |
+
<?php $_filters = $this->getFilters() ?>
|
77 |
+
<?php foreach ($_filters as $_filter): ?>
|
78 |
+
<?php //var_dump($_filter); ?>
|
79 |
+
<?php if($_filter->getItemsCount()): ?>
|
80 |
+
<dt><?php echo $this->__($_filter->getName()) ?></dt>
|
81 |
+
<dd><?php echo $_filter->getHtml() ?></dd>
|
82 |
+
<?php endif; ?>
|
83 |
+
<?php endforeach; ?>
|
84 |
+
<dt>Price Slider:</dt>
|
85 |
+
<dd id="slider" style="height:1px"></dd>
|
86 |
+
<dd><input id="price-filter" type="text" name="price-filter" value=""></dd>
|
87 |
+
</dl>
|
88 |
+
<script type="text/javascript">decorateDataList('narrow-by-list')</script>
|
89 |
+
<?php endif; ?>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<?php $max=Mage::getModel('catalog/layer_filter_price');
|
93 |
+
$maxPrice=$max->getMaxPriceInt();
|
94 |
+
$maxPrice++;
|
95 |
+
?>
|
96 |
+
|
97 |
+
<input id="max-price" type="hidden" name="max-price" value="<?php echo $maxPrice; ?>">
|
98 |
+
<?php $url=Mage::getBaseUrl(); $pos=strpos($url,'index.php'); ?>
|
99 |
+
<input id="price-filterF" type="hidden" name="price-filterF" value="<?php echo $url;?>">
|
100 |
+
|
101 |
+
<div id="simplediv" style="border:1px solid black;width:200px;height:200px;">
|
102 |
+
<img src="<?php echo $this->getSkinUrl('images/loading.gif')?>" height="200" width="200"/>
|
103 |
+
</div>
|
104 |
+
|
105 |
+
|
106 |
+
<input id="category" type="hidden" value="<?php $arr=$this->getRequest()->getParams(id,false); echo $arr['id']; ?>">
|
107 |
+
<?php endif; ?>
|
app/etc/modules/Slider_Slider.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Slider_Slider>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Slider_Slider>
|
8 |
+
</modules>
|
9 |
+
</config>
|
js/slider/jquery-ui-1.8rc1.custom.css
ADDED
@@ -0,0 +1,477 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework
|
3 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
4 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
5 |
+
*/
|
6 |
+
|
7 |
+
/* Layout helpers
|
8 |
+
----------------------------------*/
|
9 |
+
.ui-helper-hidden { display: none; }
|
10 |
+
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
|
11 |
+
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
12 |
+
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
13 |
+
.ui-helper-clearfix { display: inline-block; }
|
14 |
+
/* required comment for clearfix to work in Opera \*/
|
15 |
+
* html .ui-helper-clearfix { height:1%; }
|
16 |
+
.ui-helper-clearfix { display:block; }
|
17 |
+
/* end clearfix */
|
18 |
+
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
19 |
+
|
20 |
+
|
21 |
+
/* Interaction Cues
|
22 |
+
----------------------------------*/
|
23 |
+
.ui-state-disabled { cursor: default !important; }
|
24 |
+
|
25 |
+
|
26 |
+
/* Icons
|
27 |
+
----------------------------------*/
|
28 |
+
|
29 |
+
/* states and images */
|
30 |
+
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
31 |
+
|
32 |
+
|
33 |
+
/* Misc visuals
|
34 |
+
----------------------------------*/
|
35 |
+
|
36 |
+
/* Overlays */
|
37 |
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
38 |
+
|
39 |
+
|
40 |
+
/*
|
41 |
+
* jQuery UI CSS Framework
|
42 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
43 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
44 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
|
45 |
+
*/
|
46 |
+
|
47 |
+
|
48 |
+
/* Component containers
|
49 |
+
----------------------------------*/
|
50 |
+
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
51 |
+
.ui-widget .ui-widget { font-size: 1em; }
|
52 |
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
53 |
+
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_75_ffffff_1x400.png) 50% 50% repeat-x; color: #222222; }
|
54 |
+
.ui-widget-content a { color: #222222; }
|
55 |
+
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
56 |
+
.ui-widget-header a { color: #222222; }
|
57 |
+
|
58 |
+
/* Interaction states
|
59 |
+
----------------------------------*/
|
60 |
+
.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
61 |
+
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
62 |
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
63 |
+
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
|
64 |
+
.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
65 |
+
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
66 |
+
.ui-widget :active { outline: none; }
|
67 |
+
|
68 |
+
/* Interaction Cues
|
69 |
+
----------------------------------*/
|
70 |
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
71 |
+
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
|
72 |
+
.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_inset-soft_95_fef1ec_1x100.png) 50% bottom repeat-x; color: #cd0a0a; }
|
73 |
+
.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; }
|
74 |
+
.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; }
|
75 |
+
.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
|
76 |
+
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
77 |
+
.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
78 |
+
|
79 |
+
/* Icons
|
80 |
+
----------------------------------*/
|
81 |
+
|
82 |
+
/* states and images */
|
83 |
+
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
|
84 |
+
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
85 |
+
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
86 |
+
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
|
87 |
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
88 |
+
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
89 |
+
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
|
90 |
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
|
91 |
+
|
92 |
+
/* positioning */
|
93 |
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
94 |
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
95 |
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
96 |
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
97 |
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
98 |
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
99 |
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
100 |
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
101 |
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
102 |
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
103 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
104 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
105 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
106 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
107 |
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
108 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
109 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
110 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
111 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
112 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
113 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
114 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
115 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
116 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
117 |
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
118 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
119 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
120 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
121 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
122 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
123 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
124 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
125 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
126 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
127 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
128 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
129 |
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
130 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
131 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
132 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
133 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
134 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
135 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
136 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
137 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
138 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
139 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
140 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
141 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
142 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
143 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
144 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
145 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
146 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
147 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
148 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
149 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
150 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
151 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
152 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
153 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
154 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
155 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
156 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
157 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
158 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
159 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
160 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
161 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
162 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
163 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
164 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
165 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
166 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
167 |
+
.ui-icon-document { background-position: -32px -96px; }
|
168 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
169 |
+
.ui-icon-note { background-position: -64px -96px; }
|
170 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
171 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
172 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
173 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
174 |
+
.ui-icon-person { background-position: -144px -96px; }
|
175 |
+
.ui-icon-print { background-position: -160px -96px; }
|
176 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
177 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
178 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
179 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
180 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
181 |
+
.ui-icon-home { background-position: 0 -112px; }
|
182 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
183 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
184 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
185 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
186 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
187 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
188 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
189 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
190 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
191 |
+
.ui-icon-search { background-position: -160px -112px; }
|
192 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
193 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
194 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
195 |
+
.ui-icon-star { background-position: -224px -112px; }
|
196 |
+
.ui-icon-link { background-position: -240px -112px; }
|
197 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
198 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
199 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
200 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
201 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
202 |
+
.ui-icon-close { background-position: -80px -128px; }
|
203 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
204 |
+
.ui-icon-key { background-position: -112px -128px; }
|
205 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
206 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
207 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
208 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
209 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
210 |
+
.ui-icon-image { background-position: -208px -128px; }
|
211 |
+
.ui-icon-video { background-position: -224px -128px; }
|
212 |
+
.ui-icon-script { background-position: -240px -128px; }
|
213 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
214 |
+
.ui-icon-info { background-position: -16px -144px; }
|
215 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
216 |
+
.ui-icon-help { background-position: -48px -144px; }
|
217 |
+
.ui-icon-check { background-position: -64px -144px; }
|
218 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
219 |
+
.ui-icon-radio-off { background-position: -96px -144px; }
|
220 |
+
.ui-icon-radio-on { background-position: -112px -144px; }
|
221 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
222 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
223 |
+
.ui-icon-play { background-position: 0 -160px; }
|
224 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
225 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
226 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
227 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
228 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
229 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
230 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
231 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
232 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
233 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
234 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
235 |
+
.ui-icon-power { background-position: 0 -176px; }
|
236 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
237 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
238 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
239 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
240 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
241 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
242 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
243 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
244 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
245 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
246 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
247 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
248 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
249 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
250 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
251 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
252 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
253 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
254 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
255 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
256 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
257 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
258 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
259 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
260 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
261 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
262 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
263 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
264 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
265 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
266 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
267 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
268 |
+
|
269 |
+
|
270 |
+
/* Misc visuals
|
271 |
+
----------------------------------*/
|
272 |
+
|
273 |
+
/* Corner radius */
|
274 |
+
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
275 |
+
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
276 |
+
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
277 |
+
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
278 |
+
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
279 |
+
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
280 |
+
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
281 |
+
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
282 |
+
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
|
283 |
+
|
284 |
+
/* Overlays */
|
285 |
+
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
286 |
+
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* Accordion
|
287 |
+
----------------------------------*/
|
288 |
+
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
289 |
+
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
290 |
+
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
291 |
+
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
292 |
+
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
293 |
+
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
294 |
+
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
295 |
+
.ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete
|
296 |
+
----------------------------------*/
|
297 |
+
.ui-autocomplete-menu { position: absolute; cursor: default; }
|
298 |
+
|
299 |
+
.ui-autocomplete-loading { background: white url('images/ui-anim.basic.16x16.gif') right center no-repeat; }
|
300 |
+
.ui-autocomplete-over { background-color: #0A246A; color: white; }
|
301 |
+
|
302 |
+
/* Menu
|
303 |
+
----------------------------------*/
|
304 |
+
.ui-menu {
|
305 |
+
list-style:none;
|
306 |
+
padding: 2px;
|
307 |
+
margin: 0;
|
308 |
+
display:block;
|
309 |
+
}
|
310 |
+
.ui-menu .ui-menu {
|
311 |
+
margin-top: -3px;
|
312 |
+
}
|
313 |
+
.ui-menu .ui-menu-item {
|
314 |
+
margin:0;
|
315 |
+
padding: 0;
|
316 |
+
width: 100%;
|
317 |
+
}
|
318 |
+
.ui-menu .ui-menu-item a {
|
319 |
+
text-decoration:none;
|
320 |
+
display:block;
|
321 |
+
padding:.2em .4em;
|
322 |
+
line-height:1.5;
|
323 |
+
}
|
324 |
+
.ui-menu .ui-menu-item a.ui-state-hover,
|
325 |
+
.ui-menu .ui-menu-item a.ui-state-active {
|
326 |
+
margin: -1px;
|
327 |
+
}
|
328 |
+
/* Button
|
329 |
+
----------------------------------*/
|
330 |
+
|
331 |
+
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
332 |
+
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
333 |
+
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
334 |
+
.ui-button-icons-only { width: 3em; }
|
335 |
+
button.ui-button-icons-only { width: 3.2em; }
|
336 |
+
|
337 |
+
/*button text element */
|
338 |
+
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
339 |
+
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
340 |
+
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
341 |
+
.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 1.8em; }
|
342 |
+
.ui-button-text-icons .ui-button-text { padding-right: 1.8em; }
|
343 |
+
/* no icon support for input elements, provide padding by default */
|
344 |
+
input.ui-button { padding: .4em 1em; }
|
345 |
+
|
346 |
+
/*button icon element(s) */
|
347 |
+
.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
348 |
+
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
349 |
+
.ui-button-text-icon .ui-icon-primary, .ui-button-text-icons .ui-icon-primary, .ui-button-icons-only .ui-icon-primary { left: .5em; }
|
350 |
+
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
351 |
+
|
352 |
+
/*button sets*/
|
353 |
+
.ui-button-set { margin-right: 7px; }
|
354 |
+
.ui-button-set .ui-button { margin-left: 0; margin-right: -.3em; }
|
355 |
+
|
356 |
+
/* workarounds */
|
357 |
+
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
358 |
+
|
359 |
+
|
360 |
+
|
361 |
+
|
362 |
+
|
363 |
+
/* Datepicker
|
364 |
+
----------------------------------*/
|
365 |
+
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
|
366 |
+
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
367 |
+
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
368 |
+
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
369 |
+
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
370 |
+
.ui-datepicker .ui-datepicker-next { right:2px; }
|
371 |
+
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
372 |
+
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
373 |
+
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
374 |
+
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
375 |
+
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
376 |
+
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
377 |
+
.ui-datepicker select.ui-datepicker-month,
|
378 |
+
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
379 |
+
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
380 |
+
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
381 |
+
.ui-datepicker td { border: 0; padding: 1px; }
|
382 |
+
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
383 |
+
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
384 |
+
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
385 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
386 |
+
|
387 |
+
/* with multiple calendars */
|
388 |
+
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
389 |
+
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
390 |
+
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
391 |
+
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
392 |
+
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
393 |
+
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
394 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
395 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
396 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
397 |
+
.ui-datepicker-row-break { clear:both; width:100%; }
|
398 |
+
|
399 |
+
/* RTL support */
|
400 |
+
.ui-datepicker-rtl { direction: rtl; }
|
401 |
+
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
402 |
+
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
403 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
404 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
405 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
406 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
407 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
408 |
+
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
409 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
410 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
411 |
+
|
412 |
+
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
413 |
+
.ui-datepicker-cover {
|
414 |
+
display: none; /*sorry for IE5*/
|
415 |
+
display/**/: block; /*sorry for IE5*/
|
416 |
+
position: absolute; /*must have*/
|
417 |
+
z-index: -1; /*must have*/
|
418 |
+
filter: mask(); /*must have*/
|
419 |
+
top: -4px; /*must have*/
|
420 |
+
left: -4px; /*must have*/
|
421 |
+
width: 200px; /*must have*/
|
422 |
+
height: 200px; /*must have*/
|
423 |
+
}/* Dialog
|
424 |
+
----------------------------------*/
|
425 |
+
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
426 |
+
.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
|
427 |
+
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
|
428 |
+
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
429 |
+
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
430 |
+
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
431 |
+
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
432 |
+
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
433 |
+
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
|
434 |
+
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
435 |
+
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
436 |
+
/* Progressbar
|
437 |
+
----------------------------------*/
|
438 |
+
.ui-progressbar { height:2em; text-align: left; }
|
439 |
+
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
|
440 |
+
----------------------------------*/
|
441 |
+
.ui-resizable { position: relative;}
|
442 |
+
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
|
443 |
+
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
444 |
+
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
445 |
+
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
446 |
+
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
447 |
+
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
448 |
+
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
449 |
+
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
450 |
+
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
451 |
+
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
|
452 |
+
----------------------------------*/
|
453 |
+
.ui-slider { position: relative; text-align: left; }
|
454 |
+
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
455 |
+
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
456 |
+
|
457 |
+
.ui-slider-horizontal { height: .8em; }
|
458 |
+
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
459 |
+
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
460 |
+
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
461 |
+
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
462 |
+
|
463 |
+
.ui-slider-vertical { width: .8em; height: 100px; }
|
464 |
+
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
465 |
+
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
466 |
+
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
467 |
+
.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
|
468 |
+
----------------------------------*/
|
469 |
+
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
470 |
+
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
471 |
+
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
472 |
+
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
473 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
474 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
475 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
476 |
+
.ui-tabs .ui-tabs-panel { display: block; border: 0; padding: 1em 1.4em; background: none; }
|
477 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
js/varien/jquery-1.4.1.min.js
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery JavaScript Library v1.4.1
|
3 |
+
* http://jquery.com/
|
4 |
+
*
|
5 |
+
* Copyright 2010, John Resig
|
6 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7 |
+
* http://jquery.org/license
|
8 |
+
*
|
9 |
+
* Includes Sizzle.js
|
10 |
+
* http://sizzlejs.com/
|
11 |
+
* Copyright 2010, The Dojo Foundation
|
12 |
+
* Released under the MIT, BSD, and GPL Licenses.
|
13 |
+
*
|
14 |
+
* Date: Mon Jan 25 19:43:33 2010 -0500
|
15 |
+
*/
|
16 |
+
(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n<j;n++)e(a[n],b,f?d.call(a[n],n,e(a[n],b)):d,i);return a}return j?
|
17 |
+
e(a[0],b):null}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function ma(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function na(a){var b,d=[],f=[],e=arguments,i,j,n,o,m,s,x=c.extend({},c.data(this,"events").live);if(!(a.button&&a.type==="click")){for(o in x){j=x[o];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f,
|
18 |
+
a.currentTarget);m=0;for(s=i.length;m<s;m++)for(o in x){j=x[o];n=i[m].elem;f=null;if(i[m].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==n)d.push({elem:n,fn:j})}}m=0;for(s=d.length;m<s;m++){i=d[m];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}}function oa(a,b){return"live."+(a?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&")}function pa(a){return!a||!a.parentNode||a.parentNode.nodeType===
|
19 |
+
11}function qa(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ra(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0&&(c.support.checkClone||!sa.test(a[0]))){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:r;f=b.createDocumentFragment();
|
20 |
+
c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=i?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(ta.concat.apply([],ta.slice(0,b)),function(){d[this]=a});return d}function ua(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Na=z.jQuery,Oa=z.$,r=z.document,S,Pa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent,
|
21 |
+
va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]],
|
22 |
+
[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,
|
23 |
+
this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this,
|
24 |
+
a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};
|
25 |
+
c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];n=e[i];if(a!==n)if(f&&n&&(c.isPlainObject(n)||c.isArray(n))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(n)?[]:{};a[i]=c.extend(f,j,n)}else if(n!==v)a[i]=n}return a};c.extend({noConflict:function(a){z.$=
|
26 |
+
Oa;if(a)z.jQuery=Na;return c},isReady:false,ready:function(){if(!c.isReady){if(!r.body)return setTimeout(c.ready,13);c.isReady=true;if(P){for(var a,b=0;a=P[b++];)a.call(r,c);P=null}c.fn.triggerHandler&&c(r).triggerHandler("ready")}},bindReady:function(){if(!va){va=true;if(r.readyState==="complete")return c.ready();if(r.addEventListener){r.addEventListener("DOMContentLoaded",L,false);z.addEventListener("load",c.ready,false)}else if(r.attachEvent){r.attachEvent("onreadystatechange",L);z.attachEvent("onload",
|
27 |
+
c.ready);var a=false;try{a=z.frameElement==null}catch(b){}r.documentElement.doScroll&&a&&la()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===v||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;
|
28 |
+
return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return z.JSON&&z.JSON.parse?z.JSON.parse(a):(new Function("return "+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Ra.test(a)){var b=r.getElementsByTagName("head")[0]||
|
29 |
+
r.documentElement,d=r.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(r.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===v||c.isFunction(a);if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=
|
30 |
+
a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Sa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==
|
31 |
+
v;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=v}else if(b&&!c.isFunction(b)){d=b;b=v}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},
|
32 |
+
uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});O=c.uaMatch(O);if(O.browser){c.browser[O.browser]=true;c.browser.version=O.version}if(c.browser.webkit)c.browser.safari=true;if(wa)c.inArray=function(a,b){return wa.call(b,a)};S=c(r);if(r.addEventListener)L=function(){r.removeEventListener("DOMContentLoaded",
|
33 |
+
L,false);c.ready()};else if(r.attachEvent)L=function(){if(r.readyState==="complete"){r.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=r.documentElement,b=r.createElement("script"),d=r.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support=
|
34 |
+
{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};
|
35 |
+
b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=r.createDocumentFragment();a.appendChild(d.firstChild);
|
36 |
+
c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props=
|
37 |
+
{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true,
|
38 |
+
{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,
|
39 |
+
a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);
|
40 |
+
return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||
|
41 |
+
a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=
|
42 |
+
c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,n=b.length;j<n;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=c(this);m.removeClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string"||a===v)for(var b=(a||"").split(ca),
|
43 |
+
d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(ya," "),j=0,n=b.length;j<n;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),n=b,o=
|
44 |
+
a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||
|
45 |
+
{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val());
|
46 |
+
if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d);
|
47 |
+
f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=
|
48 |
+
""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=
|
49 |
+
function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a,
|
50 |
+
d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+
|
51 |
+
s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a,
|
52 |
+
"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,
|
53 |
+
b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b,
|
54 |
+
d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
|
55 |
+
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
|
56 |
+
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b=
|
57 |
+
0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};
|
58 |
+
c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b=
|
59 |
+
a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!==
|
60 |
+
"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,
|
61 |
+
"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"||
|
62 |
+
d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a=
|
63 |
+
a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,
|
64 |
+
f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,
|
65 |
+
b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+
|
66 |
+
a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e){var i,j=0;if(c.isFunction(f)){e=f;f=v}for(d=(d||"").split(/\s+/);(i=d[j++])!=null;){i=i==="focus"?"focusin":i==="blur"?"focusout":i==="hover"?d.push("mouseleave")&&"mouseenter":i;b==="live"?c(this.context).bind(oa(i,this.selector),{data:f,selector:this.selector,
|
67 |
+
live:i},e):c(this.context).unbind(oa(i,this.selector),e?{guid:e.guid+this.selector+i}:null)}return this}});c.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".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});z.attachEvent&&!z.addEventListener&&z.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
|
68 |
+
(function(){function a(g){for(var h="",k,l=0;g[l];l++){k=g[l];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===k){y=l[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=k;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}l[q]=y}}}function d(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===
|
69 |
+
k){y=l[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=k;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(o.filter(h,[t]).length>0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||
|
70 |
+
typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u=
|
71 |
+
l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&
|
72 |
+
y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q,
|
73 |
+
h,k);if(l!=null){g=g.replace(m.match[t],"");break}}}}l||(l=h.getElementsByTagName("*"));return{set:l,expr:g}};o.filter=function(g,h,k,l){for(var q=g,p=[],u=h,t,y,R=h&&h[0]&&w(h[0]);g&&h.length;){for(var H in m.filter)if((t=m.leftMatch[H].exec(g))!=null&&t[2]){var M=m.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(u===p)p=[];if(m.preFilter[H])if(t=m.preFilter[H](t,u,k,p,l,R)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=u[U])!=null;U++)if(D){I=M(D,t,U,u);var Da=
|
74 |
+
l^!!I;if(k&&I!=null)if(Da)y=true;else u[U]=false;else if(Da){p.push(D);y=true}}if(I!==v){k||(u=p);g=g.replace(m.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)o.error(g);else break;q=g}return u};o.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var m=o.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
|
75 |
+
TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,h){var k=typeof h==="string",l=k&&!/\W/.test(h);k=k&&!l;if(l)h=h.toLowerCase();l=0;for(var q=g.length,
|
76 |
+
p;l<q;l++)if(p=g[l]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[l]=k||p&&p.nodeName.toLowerCase()===h?p||false:p===h}k&&o.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l<q;l++){var p=g[l];if(p){k=p.parentNode;g[l]=k.nodeName.toLowerCase()===h?k:false}}}else{l=0;for(q=g.length;l<q;l++)if(p=g[l])g[l]=k?p.parentNode:p.parentNode===h;k&&o.filter(h,g,true)}},"":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=
|
77 |
+
h=h.toLowerCase();q=b}q("parentNode",h,l,g,p,k)},"~":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,l,g,p,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];h=h.getElementsByName(g[1]);for(var l=0,q=h.length;l<q;l++)h[l].getAttribute("name")===g[1]&&k.push(h[l]);return k.length===0?null:k}},
|
78 |
+
TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&
|
79 |
+
"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
|
80 |
+
return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
|
81 |
+
g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2===
|
82 |
+
0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k<l;k++)if(h[k]===g)return false;return true}else o.error("Syntax error, unrecognized expression: "+
|
83 |
+
q)},CHILD:function(g,h){var k=h[1],l=g;switch(k){case "only":case "first":for(;l=l.previousSibling;)if(l.nodeType===1)return false;if(k==="first")return true;l=g;case "last":for(;l=l.nextSibling;)if(l.nodeType===1)return false;return true;case "nth":k=h[2];var q=h[3];if(k===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var u=0;for(l=p.firstChild;l;l=l.nextSibling)if(l.nodeType===1)l.nodeIndex=++u;p.sizcache=h}g=g.nodeIndex-q;return k===0?g===0:g%k===0&&g/k>=
|
84 |
+
0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="?
|
85 |
+
k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};
|
86 |
+
try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k<l;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var C;if(r.documentElement.compareDocumentPosition)C=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===
|
87 |
+
h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in r.documentElement)C=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(r.createRange)C=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),l=h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);l.setStart(h,0);l.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,
|
88 |
+
l);if(g===0)j=true;return g};(function(){var g=r.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id");
|
89 |
+
return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href",
|
90 |
+
2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===
|
91 |
+
0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[],
|
92 |
+
l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)o(g,h[q],k);return o.filter(l,k)};c.find=o;c.expr=o.selectors;c.expr[":"]=c.expr.filters;c.unique=o.uniqueSort;c.getText=a;c.isXMLDoc=w;c.contains=E})();var bb=/Until$/,cb=/^(?:parents|prevUntil|prevAll)/,db=/,/;Q=Array.prototype.slice;var Ea=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,
|
93 |
+
function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Qa.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=
|
94 |
+
0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ea(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ea(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e<n;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>
|
95 |
+
-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),
|
96 |
+
a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},
|
97 |
+
nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):
|
98 |
+
e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==
|
99 |
+
b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,sa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ia=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
|
100 |
+
col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)},
|
101 |
+
wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?
|
102 |
+
d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
|
103 |
+
false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&
|
104 |
+
!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(Ha.exec(a)||
|
105 |
+
["",""])[1].toLowerCase()]){a=a.replace(Ga,Ia);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,
|
106 |
+
b,f))});else a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(s){return c.nodeName(s,"table")?s.getElementsByTagName("tbody")[0]||s.appendChild(s.ownerDocument.createElement("tbody")):s}var e,i,j=a[0],n=[];if(!c.support.checkClone&&arguments.length===3&&typeof j===
|
107 |
+
"string"&&sa.test(j))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(j))return this.each(function(s){var x=c(this);a[0]=j.call(this,s,b?x.html():v);x.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ra(a,this,n);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var o=0,m=this.length;o<m;o++)d.call(b?f(this[o],i):this[o],e.cacheable||this.length>1||o>0?e.fragment.cloneNode(true):e.fragment)}n&&c.each(n,
|
108 |
+
Ma)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){c.cleanData(this.getElementsByTagName("*"));c.cleanData([this])}this.parentNode&&
|
109 |
+
this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&c.cleanData(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||r;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||r;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j===
|
110 |
+
"string"){j=j.replace(Ga,Ia);var n=(Ha.exec(j)||["",""])[1].toLowerCase(),o=F[n]||F._default,m=o[0];i=b.createElement("div");for(i.innerHTML=o[1]+j+o[2];m--;)i=i.lastChild;if(!c.support.tbody){m=fb.test(j);n=n==="table"&&!m?i.firstChild&&i.firstChild.childNodes:o[1]==="<table>"&&!m?i.childNodes:[];for(o=n.length-1;o>=0;--o)c.nodeName(n[o],"tbody")&&!n[o].childNodes.length&&n[o].parentNode.removeChild(n[o])}!c.support.leadingWhitespace&&V.test(j)&&i.insertBefore(b.createTextNode(V.exec(j)[0]),i.firstChild);
|
111 |
+
j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()==="text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e},cleanData:function(a){for(var b=0,d;(d=a[b])!=null;b++){c.event.remove(d);c.removeData(d)}}});var hb=/z-?index|font-?weight|opacity|zoom|line-?height/i,
|
112 |
+
Ja=/alpha\([^)]*\)/,Ka=/opacity=([^)]*)/,ga=/float/i,ha=/-([a-z])/ig,ib=/([A-Z])/g,jb=/^-?\d+(?:px)?$/i,kb=/^-?\d/,lb={position:"absolute",visibility:"hidden",display:"block"},mb=["Left","Right"],nb=["Top","Bottom"],ob=r.defaultView&&r.defaultView.getComputedStyle,La=c.support.cssFloat?"cssFloat":"styleFloat",ia=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===v)return c.curCSS(d,f);if(typeof e==="number"&&!hb.test(f))e+="px";c.style(d,f,e)})};
|
113 |
+
c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return v;if((b==="width"||b==="height")&&parseFloat(d)<0)d=v;var f=a.style||a,e=d!==v;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ja.test(a)?a.replace(Ja,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ka.exec(f.filter)[1])/100+"":""}if(ga.test(b))b=La;b=b.replace(ha,ia);if(e)f[b]=d;return f[b]},css:function(a,
|
114 |
+
b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?mb:nb;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,lb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&
|
115 |
+
a.currentStyle){f=Ka.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ga.test(b))b=La;if(!d&&e&&e[b])f=e[b];else if(ob){if(ga.test(b))b="float";b=b.replace(ib,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ha,ia);f=a.currentStyle[b]||a.currentStyle[d];if(!jb.test(f)&&kb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=
|
116 |
+
a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var pb=
|
117 |
+
J(),qb=/<script(.|\s)*?\/script>/gi,rb=/select|textarea/i,sb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ja=/\?/,tb=/(\?|&)_=.*?(&|$)/,ub=/^(\w+:)?\/\/([^\/?#]+)/,vb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=
|
118 |
+
c.param(b,c.ajaxSettings.traditional);f="POST"}var i=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(j,n){if(n==="success"||n==="notmodified")i.html(e?c("<div />").append(j.responseText.replace(qb,"")).find(e):j.responseText);d&&i.each(d,[j.responseText,n,j])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&
|
119 |
+
(this.checked||rb.test(this.nodeName)||sb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,
|
120 |
+
b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:z.XMLHttpRequest&&(z.location.protocol!=="file:"||!z.ActiveXObject)?function(){return new z.XMLHttpRequest}:
|
121 |
+
function(){try{return new z.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(o,n,j,w);e.global&&f("ajaxSuccess",[w,e])}function d(){e.complete&&e.complete.call(o,w,j);e.global&&f("ajaxComplete",[w,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}
|
122 |
+
function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,n,o=a&&a.context||e,m=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(m==="GET")N.test(e.url)||(e.url+=(ja.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||
|
123 |
+
N.test(e.url))){i=e.jsonpCallback||"jsonp"+pb++;if(e.data)e.data=(e.data+"").replace(N,"="+i+"$1");e.url=e.url.replace(N,"="+i+"$1");e.dataType="script";z[i]=z[i]||function(q){n=q;b();d();z[i]=v;try{delete z[i]}catch(p){}A&&A.removeChild(B)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&m==="GET"){var s=J(),x=e.url.replace(tb,"$1_="+s+"$2");e.url=x+(x===e.url?(ja.test(e.url)?"&":"?")+"_="+s:"")}if(e.data&&m==="GET")e.url+=(ja.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&
|
124 |
+
c.event.trigger("ajaxStart");s=(s=ub.exec(e.url))&&(s[1]&&s[1]!==location.protocol||s[2]!==location.host);if(e.dataType==="script"&&m==="GET"&&s){var A=r.getElementsByTagName("head")[0]||r.documentElement,B=r.createElement("script");B.src=e.url;if(e.scriptCharset)B.charset=e.scriptCharset;if(!i){var C=false;B.onload=B.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;b();d();B.onload=B.onreadystatechange=null;A&&B.parentNode&&
|
125 |
+
A.removeChild(B)}}}A.insertBefore(B,A.firstChild);return v}var E=false,w=e.xhr();if(w){e.username?w.open(m,e.url,e.async,e.username,e.password):w.open(m,e.url,e.async);try{if(e.data||a&&a.contentType)w.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&w.setRequestHeader("If-None-Match",c.etag[e.url])}s||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",
|
126 |
+
e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(fa){}if(e.beforeSend&&e.beforeSend.call(o,w,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");w.abort();return false}e.global&&f("ajaxSend",[w,e]);var g=w.onreadystatechange=function(q){if(!w||w.readyState===0||q==="abort"){E||d();E=true;if(w)w.onreadystatechange=c.noop}else if(!E&&w&&(w.readyState===4||q==="timeout")){E=true;w.onreadystatechange=c.noop;j=q==="timeout"?"timeout":!c.httpSuccess(w)?
|
127 |
+
"error":e.ifModified&&c.httpNotModified(w,e.url)?"notmodified":"success";var p;if(j==="success")try{n=c.httpData(w,e.dataType,e)}catch(u){j="parsererror";p=u}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,w,j,p);d();q==="timeout"&&w.abort();if(e.async)w=null}};try{var h=w.abort;w.abort=function(){w&&h.call(w);g("abort")}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){w&&!E&&g("timeout")},e.timeout);try{w.send(m==="POST"||m==="PUT"||m==="DELETE"?e.data:null)}catch(l){c.handleError(e,
|
128 |
+
w,null,l);d()}e.async||g();return w}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=
|
129 |
+
f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(j,n){if(c.isArray(n))c.each(n,
|
130 |
+
function(o,m){b?f(j,m):d(j+"["+(typeof m==="object"||c.isArray(m)?o:"")+"]",m)});else!b&&n!=null&&typeof n==="object"?c.each(n,function(o,m){d(j+"["+o+"]",m)}):f(j,n)}function f(j,n){n=c.isFunction(n)?n():n;e[e.length]=encodeURIComponent(j)+"="+encodeURIComponent(n)}var e=[];if(b===v)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var i in a)d(i,a[i]);return e.join("&").replace(vb,"+")}});var ka={},wb=/toggle|show|hide/,xb=/^([+-]=)?([\d+-.]+)(.*)$/,
|
131 |
+
W,ta=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(ka[d])f=ka[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
|
132 |
+
ka[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
|
133 |
+
c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,n=this.nodeType===1&&c(this).is(":hidden"),
|
134 |
+
o=this;for(j in a){var m=j.replace(ha,ia);if(j!==m){a[m]=a[j];delete a[j];j=m}if(a[j]==="hide"&&n||a[j]==="show"&&!n)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(s,x){var A=new c.fx(o,i,s);if(wb.test(x))A[x==="toggle"?n?"show":"hide":x](a);
|
135 |
+
else{var B=xb.exec(x),C=A.cur(true)||0;if(B){x=parseFloat(B[2]);var E=B[3]||"px";if(E!=="px"){o.style[s]=(x||1)+E;C=(x||1)/A.cur(true)*C;o.style[s]=C+E}if(B[1])x=(B[1]==="-="?-1:1)*x+C;A.custom(C,x,E)}else A.custom(C,x,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",
|
136 |
+
1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
|
137 |
+
b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==
|
138 |
+
null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
|
139 |
+
"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
|
140 |
+
this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
|
141 |
+
c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
|
142 |
+
null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in r.documentElement?function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
|
143 |
+
f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
|
144 |
+
b,e=b.ownerDocument,i,j=e.documentElement,n=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var o=b.offsetTop,m=b.offsetLeft;(b=b.parentNode)&&b!==n&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;o-=b.scrollTop;m-=b.scrollLeft;if(b===d){o+=b.offsetTop;m+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){o+=parseFloat(i.borderTopWidth)||
|
145 |
+
0;m+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){o+=parseFloat(i.borderTopWidth)||0;m+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){o+=n.offsetTop;m+=n.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){o+=Math.max(j.scrollTop,n.scrollTop);m+=Math.max(j.scrollLeft,n.scrollLeft)}return{top:o,left:m}};c.offset={initialize:function(){var a=r.body,b=r.createElement("div"),
|
146 |
+
d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
|
147 |
+
d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
|
148 |
+
bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
|
149 |
+
e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
|
150 |
+
this.offsetParent||r.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==v)return this.each(function(){if(i=ua(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=ua(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
|
151 |
+
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(i){var j=c(this);j[d](f.call(this,i,j[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||
|
152 |
+
e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===v?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});z.jQuery=z.$=c})(window);
|
js/varien/jquery-ui-1.8rc1.custom.min.js
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery UI 1.8rc1
|
3 |
+
*
|
4 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI
|
9 |
+
*/
|
10 |
+
* jQuery UI 1.8rc1
|
11 |
+
*
|
12 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
13 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
14 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
15 |
+
*
|
16 |
+
* http://docs.jquery.com/UI
|
17 |
+
*/
|
18 |
+
jQuery.ui||(function(b){var a=b.browser.mozilla&&(parseFloat(b.browser.version)<1.9);b.ui={version:"1.8rc1",plugin:{add:function(d,e,g){var f=b.ui[d].prototype;for(var c in g){f.plugins[c]=f.plugins[c]||[];f.plugins[c].push([e,g[c]])}},call:function(c,e,d){var g=c.plugins[e];if(!g||!c.element[0].parentNode){return}for(var f=0;f<g.length;f++){if(c.options[g[f][0]]){g[f][1].apply(c.element,d)}}}},contains:function(d,c){return document.compareDocumentPosition?d.compareDocumentPosition(c)&16:d!==c&&d.contains(c)},hasScroll:function(f,d){if(b(f).css("overflow")=="hidden"){return false}var c=(d&&d=="left")?"scrollLeft":"scrollTop",e=false;if(f[c]>0){return true}f[c]=1;e=(f[c]>0);f[c]=0;return e},isOverAxis:function(d,c,e){return(d>c)&&(d<(c+e))},isOver:function(h,d,g,f,c,e){return b.ui.isOverAxis(h,g,c)&&b.ui.isOverAxis(d,f,e)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};b.fn.extend({_focus:b.fn.focus,focus:function(c,d){return typeof c==="number"?this.each(function(){var e=this;setTimeout(function(){b(e).focus();(d&&d.call(e))},c)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var c;if((b.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){c=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(b.curCSS(this,"position",1))&&(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}else{c=this.parents().filter(function(){return(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!c.length?b(document):c},zIndex:function(d){if(d!==undefined){return this.css("zIndex",d)}var c=this[0];while(c&&c.style){if(c.style.zIndex!==""&&c.style.zIndex!==0){return +c.style.zIndex}c=c.parentNode}return 0}});b.extend(b.expr[":"],{data:function(e,d,c){return !!b.data(e,c[3])},focusable:function(d){var e=d.nodeName.toLowerCase(),c=b.attr(d,"tabindex");return(/input|select|textarea|button|object/.test(e)?!d.disabled:"a"==e||"area"==e?d.href||!isNaN(c):!isNaN(c))&&!b(d)["area"==e?"parents":"closest"](":hidden").length},tabbable:function(d){var c=b.attr(d,"tabindex");return(isNaN(c)||c>=0)&&b(d).is(":focusable")}})})(jQuery);;/*!
|
19 |
+
* jQuery UI Widget 1.8rc1
|
20 |
+
*
|
21 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
22 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
23 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
24 |
+
*
|
25 |
+
* http://docs.jquery.com/UI/Widget
|
26 |
+
*/
|
27 |
+
* jQuery UI Widget 1.8rc1
|
28 |
+
*
|
29 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
30 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
31 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
32 |
+
*
|
33 |
+
* http://docs.jquery.com/UI/Widget
|
34 |
+
*/
|
35 |
+
(function(b){var a=b.fn.remove;b.fn.remove=function(c,d){if(!d){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")})}return a.apply(this,arguments)};b.widget=function(d,f,c){var e=d.split(".")[0],h;d=d.split(".")[1];h=e+"-"+d;if(!c){c=f;f=b.Widget}b.expr[":"][h]=function(i){return !!b.data(i,d)};b[e]=b[e]||{};b[e][d]=function(i,j){if(arguments.length){this._createWidget(i,j)}};var g=new f();g.options=b.extend({},g.options);b[e][d].prototype=b.extend(true,g,{namespace:e,widgetName:d,widgetEventPrefix:b[e][d].prototype.widgetEventPrefix||d,widgetBaseClass:h},c);b.widget.bridge(d,b[e][d])};b.widget.bridge=function(d,c){b.fn[d]=function(g){var e=typeof g==="string",f=Array.prototype.slice.call(arguments,1),h=this;g=!e&&f.length?b.extend.apply(null,[true,g].concat(f)):g;if(e&&g.substring(0,1)==="_"){return h}if(e){this.each(function(){var i=b.data(this,d),j=i&&b.isFunction(i[g])?i[g].apply(i,f):i;if(j!==i&&j!==undefined){h=j;return false}})}else{this.each(function(){var i=b.data(this,d);if(i){if(g){i.option(g)}i._init()}else{b.data(this,d,new c(g,this))}})}return h}};b.Widget=function(c,d){if(arguments.length){this._createWidget(c,d)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(d,e){this.element=b(e).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(e)[this.widgetName],d);var c=this;this.element.bind("remove."+this.widgetName,function(){c.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled")},widget:function(){return this.element},option:function(e,f){var d=e,c=this;if(arguments.length===0){return b.extend({},c.options)}if(typeof e==="string"){if(f===undefined){return this.options[e]}d={};d[e]=f}b.each(d,function(g,h){c._setOption(g,h)});return c},_setOption:function(c,d){this.options[c]=d;if(c==="disabled"){this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",d)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(d,e,f){var h=this.options[d];e=b.Event(e);e.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();f=f||{};if(e.originalEvent){for(var c=b.event.props.length,g;c;){g=b.event.props[--c];e[g]=e.originalEvent[g]}}this.element.trigger(e,f);return !(b.isFunction(h)&&h.call(this.element[0],e,f)===false||e.isDefaultPrevented())}}})(jQuery);;/*!
|
36 |
+
* jQuery UI Mouse 1.8rc1
|
37 |
+
*
|
38 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
39 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
40 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
41 |
+
*
|
42 |
+
* http://docs.jquery.com/UI/Mouse
|
43 |
+
*
|
44 |
+
* Depends:
|
45 |
+
* jquery.ui.widget.js
|
46 |
+
*/
|
47 |
+
* jQuery UI Mouse 1.8rc1
|
48 |
+
*
|
49 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
50 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
51 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
52 |
+
*
|
53 |
+
* http://docs.jquery.com/UI/Mouse
|
54 |
+
*
|
55 |
+
* Depends:
|
56 |
+
* jquery.ui.widget.js
|
57 |
+
*/
|
58 |
+
(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=d.originalEvent||{};if(d.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(d));this._mouseDownEvent=d;var c=this,e=(d.which==1),b=(typeof this.options.cancel=="string"?a(d.target).parents().add(d.target).filter(this.options.cancel).length:false);if(!e||b||!this._mouseCapture(d)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(d)!==false);if(!this._mouseStarted){d.preventDefault();return true}}this._mouseMoveDelegate=function(f){return c._mouseMove(f)};this._mouseUpDelegate=function(f){return c._mouseUp(f)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(a.browser.safari||d.preventDefault());d.originalEvent.mouseHandled=true;return true},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,b)!==false);(this._mouseStarted?this._mouseDrag(b):this._mouseUp(b))}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(b.target==this._mouseDownEvent.target);this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return(Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance)},_mouseDelayMet:function(b){return this.mouseDelayMet},_mouseStart:function(b){},_mouseDrag:function(b){},_mouseStop:function(b){},_mouseCapture:function(b){return true}})})(jQuery);;/*
|
59 |
+
* jQuery UI Slider 1.8rc1
|
60 |
+
*
|
61 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
62 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
63 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
64 |
+
*
|
65 |
+
* http://docs.jquery.com/UI/Slider
|
66 |
+
*
|
67 |
+
* Depends:
|
68 |
+
* jquery.ui.core.js
|
69 |
+
* jquery.ui.mouse.js
|
70 |
+
* jquery.ui.widget.js
|
71 |
+
*/
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>DSLPS</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>GPL 1.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>this is a good slider module</summary>
|
10 |
+
<description>you can use this and make your website more beautiful</description>
|
11 |
+
<notes>no need of notes</notes>
|
12 |
+
<authors><author><name>Saurabh</name><user>saurabh_005</user><email>saurabh.chaudhry@daffodilsw.com</email></author></authors>
|
13 |
+
<date>2011-11-02</date>
|
14 |
+
<time>11:52:09</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Slider"><dir name="Slider"><dir name="Block"><file name="Mainslider.php" hash="57790cc20361a23deb1880e2ba2f6b5a"/><file name="Pager.php" hash="ce62dc3a95722cc6d99dc142cb42e0b2"/><dir name="Product"><dir name="List"><dir name="Toolbar"><file name="Pager.php" hash="36234920c974d768ca9ca74893496e21"/></dir></dir></dir><file name="Slider.php" hash="9d6f7246cf96d6e27f0332b37161a7c3"/><file name="Tool.php" hash="24769cabf15f831376c6d7f21b4fd7a3"/></dir><dir name="Model"><file name="Slider.php" hash="fff62a0f9ee7a7c9317ba8ba00bf4cdf"/></dir><dir name="controllers"><file name="SliderController.php" hash="508b2df98082fdc0f7219aac59fb0221"/></dir><dir name="etc"><file name="config.xml" hash="78614286991d94db46df494d82446e14"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Slider_Slider.xml" hash="a27af6c7f740e3eb57e300c3b7ea3b84"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="slider.xml" hash="9f0660328ad5abffd1f52430898d8211"/></dir><dir name="template"><dir name="slider"><file name="pager.phtml" hash="bd9ed0a4bf6fc58f911b2a57ee461085"/><file name="slider.phtml" hash="d085ab6ac9830939c5fa38413cfa9f64"/><file name="slider1.phtml" hash="51285b8e397fa73bd8b258a1ccc4f2fd"/><file name="slider2.phtml" hash="f6bc439b00eecfe5acd584547bee331b"/><file name="slider3.phtml" hash="daf33080383f1d44f3a5022556d544c1"/><file name="slider4.phtml" hash="a01618fc9b714c0e530f525e1bd6b123"/><file name="view.phtml" hash="adc1568182101958ed4b30ac451e3b82"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><file name="loading.gif" hash="0cfc308d500d051be5445d239282702e"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="slider"><file name="jquery-ui-1.8rc1.custom.css" hash="9ada875eff0cb29aff9122c8c90b2378"/></dir><dir name="varien"><file name="jquery-1.4.1.min.js" hash="9eb33df93b21325142088527103882d2"/><file name="jquery-ui-1.8rc1.custom.min.js" hash="ee62db43b991411f7e64c31d19c850f6"/></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|
skin/frontend/default/default/images/loading.gif
ADDED
Binary file
|