Version Notes
- Enhancements :
Manage News by Category
Add Related News for particular News Item
Add news section in left and right column,
Add news link in top links.
Display News Ticker
Share News on social Media
Download this release
Release Info
Developer | Biztech |
Extension | news_module |
Version | 0.1.3 |
Comparing to | |
See all releases |
Code changes from version 0.1.2 to 0.1.3
- app/code/local/Biztech/News/Block/Adminhtml/Category.php +48 -0
- app/code/local/Biztech/News/Block/Adminhtml/Category/Edit.php +67 -0
- app/code/local/Biztech/News/Block/Adminhtml/Category/Edit/Form.php +19 -0
- app/code/local/Biztech/News/Block/Adminhtml/Category/Edit/Tab/Form.php +98 -0
- app/code/local/Biztech/News/Block/Adminhtml/Category/Edit/Tabs.php +22 -0
- app/code/local/Biztech/News/Block/Adminhtml/Category/Grid.php +116 -0
- app/code/local/Biztech/News/Block/Adminhtml/News.php +7 -1
- app/code/local/Biztech/News/Block/Adminhtml/News/Edit/Tab/Form.php +105 -67
- app/code/local/Biztech/News/Block/Adminhtml/News/Edit/Tab/Product.php +109 -0
- app/code/local/Biztech/News/Block/Adminhtml/News/Edit/Tab/Related.php +141 -0
- app/code/local/Biztech/News/Block/Adminhtml/News/Edit/Tabs.php +39 -33
- app/code/local/Biztech/News/Block/Adminhtml/News/Grid.php +5 -3
- app/code/local/Biztech/News/Block/Category.php +34 -0
- app/code/local/Biztech/News/Block/News.php +82 -62
- app/code/local/Biztech/News/Helper/Data.php +24 -12
- app/code/local/Biztech/News/Helper/Toolbar.php +2 -2
- app/code/local/Biztech/News/Model/Mysql4/Newscategory.php +9 -0
- app/code/local/Biztech/News/Model/Mysql4/Newscategory.php~ +9 -0
- app/code/local/Biztech/News/Model/Mysql4/Newscategory/Collection.php +9 -0
- app/code/local/Biztech/News/Model/Mysql4/Newscategorydata.php +9 -0
- app/code/local/Biztech/News/Model/Mysql4/Newscategorydata/Collection.php +10 -0
- app/code/local/Biztech/News/Model/Mysql4/Newsdata.php +1 -1
- app/code/local/Biztech/News/Model/Mysql4/Newsdata.php~ +9 -0
- app/code/local/Biztech/News/Model/Newscategory.php +10 -0
- app/code/local/Biztech/News/Model/Newscategorydata.php +10 -0
- app/code/local/Biztech/News/controllers/Adminhtml/CategoryController.php +281 -0
- app/code/local/Biztech/News/controllers/Adminhtml/NewsController.php +147 -76
- app/code/local/Biztech/News/controllers/IndexController.php +1 -6
- app/code/local/Biztech/News/etc/config.xml +12 -1
- app/code/local/Biztech/News/etc/system.xml +19 -26
- app/code/local/Biztech/News/sql/news_setup/mysql4-data-upgrade-0.1.1-0.1.2.php +1 -0
- app/code/local/Biztech/News/sql/news_setup/mysql4-data-upgrade-0.1.2-0.1.3.php +41 -0
- app/design/adminhtml/default/default/layout/news.xml +40 -2
- app/design/frontend/default/default/layout/news.xml +65 -8
- app/design/frontend/default/default/template/news/category_column.phtml +43 -0
- app/design/frontend/default/default/template/news/news.phtml +54 -14
- app/design/frontend/default/default/template/news/news_column.phtml +17 -30
- app/design/frontend/default/default/template/news/news_ticker.phtml +36 -0
- app/design/frontend/default/default/template/news/newslist.phtml +42 -15
- app/etc/modules/Biztech_News.xml +1 -1
- app/locale/de_DE/Biztech_News.csv +22 -0
- app/locale/en_GB/Biztech_News.csv +22 -0
- app/locale/en_US/Biztech_News.csv +23 -0
- app/locale/fr_FR/Biztech_News.csv +22 -0
- app/locale/it_IT/Biztech_News.csv +22 -0
- app/locale/nl_NL/Biztech_News.csv +22 -0
- package.xml +25 -18
- skin/frontend/default/default/news/css/news.css +19 -22
- skin/frontend/default/default/news/css/ticker-style.css +146 -0
- skin/frontend/default/default/news/images/Thumbs.db +0 -0
- skin/frontend/default/default/news/images/controls.png +0 -0
- skin/frontend/default/default/news/images/dl-arr.png +0 -0
- skin/frontend/default/default/news/images/down-arr.gif +0 -0
- skin/frontend/default/default/news/images/forkme.png +0 -0
- skin/frontend/default/default/news/images/main-red-bg.gif +0 -0
- skin/frontend/default/default/news/js/jquery-1.6.4.min.js +4 -0
- skin/frontend/default/default/news/js/jquery-1.9.1.min.js +5 -0
- skin/frontend/default/default/news/js/jquery.ticker.js +429 -0
- skin/frontend/default/default/news/js/site.js +36 -0
app/code/local/Biztech/News/Block/Adminhtml/Category.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Biztech_News_Block_Adminhtml_Category extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
$this->_controller = 'adminhtml_category';
|
7 |
+
$this->_blockGroup = 'news';
|
8 |
+
$this->_headerText = Mage::helper('news')->__('Category Manager');
|
9 |
+
$this->_addButtonLabel = Mage::helper('news')->__('Add Category');
|
10 |
+
if(Mage::getStoreConfig('news/news_general/enabled') == 1){
|
11 |
+
parent::__construct();
|
12 |
+
}
|
13 |
+
else{
|
14 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('news')->__('News extension is not enabled. Please enable it from System > Configuration.'));
|
15 |
+
}
|
16 |
+
}
|
17 |
+
public function _prepareLayout()
|
18 |
+
{
|
19 |
+
return parent::_prepareLayout();
|
20 |
+
}
|
21 |
+
|
22 |
+
public function getNewsCategory()
|
23 |
+
{
|
24 |
+
if (!$this->hasData('newscategory')) {
|
25 |
+
$this->setData('newscategory', Mage::registry('newscategory'));
|
26 |
+
}
|
27 |
+
return $this->getData('newscategory');
|
28 |
+
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getPreparedCollection()
|
32 |
+
{
|
33 |
+
return $this->_prepareCollection();
|
34 |
+
}
|
35 |
+
protected function _prepareCollection()
|
36 |
+
{
|
37 |
+
$collection=Mage::getModel('news/newscategory')->getCollection()->addFieldToFilter("status",array("eq"=>1));
|
38 |
+
|
39 |
+
$collection->setPageSize(10);
|
40 |
+
|
41 |
+
if ($this->getRequest()->getParam('p') > 0)
|
42 |
+
$collection->setCurPage($this->getRequest()->getParam('p'));
|
43 |
+
|
44 |
+
$this->setData('cached_collection', $collection);
|
45 |
+
|
46 |
+
return $this->getData('cached_collection');
|
47 |
+
}
|
48 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/Category/Edit.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Block_Adminhtml_Category_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
|
9 |
+
$this->_objectId = 'id';
|
10 |
+
$this->_blockGroup = 'news';
|
11 |
+
$this->_controller = 'adminhtml_category';
|
12 |
+
|
13 |
+
$this->_updateButton('save', 'label', Mage::helper('news')->__('Save Category'));
|
14 |
+
$this->_updateButton('delete', 'label', Mage::helper('news')->__('Delete Category'));
|
15 |
+
$this->_removeButton('delete');
|
16 |
+
$this->_removeButton('back');
|
17 |
+
|
18 |
+
$id = $this->getRequest()->getParam('store', 0);
|
19 |
+
$this->_addButton('delete', array(
|
20 |
+
'label' => Mage::helper('news')->__('Delete Category'),
|
21 |
+
'onclick' => 'confirmSetLocation(\''.Mage::helper('news')->__('Are you sure?').'\', \''.$this->getUrl('*/*/delete', array('id'=>$this->getRequest()->getParam('id'), 'store'=>$id)).'\')',
|
22 |
+
'class' => 'delete',
|
23 |
+
));
|
24 |
+
$this->_addButton('back', array(
|
25 |
+
'label' => Mage::helper('news')->__('Back'),
|
26 |
+
'onclick' => 'setLocation(\''.$this->getUrl('*/*/', array('store'=>$id)).'\')',
|
27 |
+
'class' => 'back',
|
28 |
+
),-1,1);
|
29 |
+
|
30 |
+
$this->_addButton('saveandcontinue', array(
|
31 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
32 |
+
'onclick' => 'saveAndContinueEdit()',
|
33 |
+
'class' => 'save',
|
34 |
+
), -100);
|
35 |
+
|
36 |
+
$this->_formScripts[] = "
|
37 |
+
function toggleEditor() {
|
38 |
+
if (tinyMCE.getInstanceById('news_content') == null) {
|
39 |
+
tinyMCE.execCommand('mceAddControl', false, 'news_content');
|
40 |
+
} else {
|
41 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'news_content');
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
function saveAndContinueEdit(){
|
46 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
47 |
+
}
|
48 |
+
";
|
49 |
+
}
|
50 |
+
|
51 |
+
public function getHeaderText()
|
52 |
+
{
|
53 |
+
if( Mage::registry('news_category_data') && Mage::registry('news_category_data')->getId() ) {
|
54 |
+
return Mage::helper('news')->__("Edit Category '%s'", $this->htmlEscape(Mage::registry('news_category_data')->getName()));
|
55 |
+
} else {
|
56 |
+
return Mage::helper('news')->__('Add Category');
|
57 |
+
}
|
58 |
+
}
|
59 |
+
protected function _prepareLayout()
|
60 |
+
{
|
61 |
+
parent::_prepareLayout();
|
62 |
+
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
63 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/Category/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Block_Adminhtml_Category_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form(array(
|
8 |
+
'id' => 'edit_form',
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/Category/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Block_Adminhtml_Category_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
4 |
+
|
5 |
+
protected function _prepareForm() {
|
6 |
+
$form = new Varien_Data_Form();
|
7 |
+
$this->setForm($form);
|
8 |
+
$fieldset = $form->addFieldset('category_form', array('legend' => Mage::helper('news')->__('Category information')));
|
9 |
+
$store = Mage::registry('news_category_data')->getData('store_id') ? Mage::registry('news_category_data')->getData('store_id') : 0;
|
10 |
+
|
11 |
+
$fieldset->addField('name', 'text', array(
|
12 |
+
'label' => Mage::helper('news')->__('Name'),
|
13 |
+
'class' => 'required-entry',
|
14 |
+
'required' => true,
|
15 |
+
'name' => 'name',
|
16 |
+
));
|
17 |
+
|
18 |
+
$fieldset->addField('status', 'select', array(
|
19 |
+
'label' => Mage::helper('news')->__('Enabled'),
|
20 |
+
'name' => 'status',
|
21 |
+
'values' => array(
|
22 |
+
array(
|
23 |
+
'value' => 1,
|
24 |
+
'label' => Mage::helper('news')->__('Yes'),
|
25 |
+
),
|
26 |
+
array(
|
27 |
+
'value' => 2,
|
28 |
+
'label' => Mage::helper('news')->__('No'),
|
29 |
+
),
|
30 |
+
),
|
31 |
+
));
|
32 |
+
|
33 |
+
$enable_ticker = $fieldset->addField('enable_ticker', 'select', array(
|
34 |
+
'label' => Mage::helper('news')->__('Enable For News Ticker'),
|
35 |
+
'name' => 'enable_ticker',
|
36 |
+
'values' => array(
|
37 |
+
array(
|
38 |
+
'value' => 0,
|
39 |
+
'label' => Mage::helper('news')->__('No'),
|
40 |
+
),
|
41 |
+
array(
|
42 |
+
'value' => 1,
|
43 |
+
'label' => Mage::helper('news')->__('Yes'),
|
44 |
+
),
|
45 |
+
),
|
46 |
+
'after_element_html' => '<p class="note">Set Yes to enable News Ticker.</p>'
|
47 |
+
));
|
48 |
+
|
49 |
+
$addToPages = $fieldset->addField('add_to_pages', 'multiselect', array(
|
50 |
+
'label' => Mage::helper('news')->__('Add To Pages'),
|
51 |
+
'class' => 'required-entry',
|
52 |
+
'required' => true,
|
53 |
+
'name' => 'add_to_pages[]',
|
54 |
+
'values'=> Mage::getModel('adminhtml/system_config_source_cms_page')->toOptionArray(),
|
55 |
+
'after_element_html' => '<p class="note">Select CMS Pages where you want to add News Ticker.</p>'
|
56 |
+
));
|
57 |
+
|
58 |
+
$fieldset->addField('store_id', 'hidden', array(
|
59 |
+
'label' => Mage::helper('news')->__('Store Id'),
|
60 |
+
'required' => false,
|
61 |
+
'value' => $store,
|
62 |
+
'name' => 'store_id'
|
63 |
+
));
|
64 |
+
|
65 |
+
if (Mage::getSingleton('adminhtml/session')->getNewscategoryData()) {
|
66 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getNewscategoryData());
|
67 |
+
Mage::getSingleton('adminhtml/session')->setNewscategoryData(null);
|
68 |
+
} elseif (Mage::registry('news_category_data')) {
|
69 |
+
Mage::registry('news_category_data')->setData('store_id', $store);
|
70 |
+
$form->setValues(Mage::registry('news_category_data')->getData());
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
$this->setForm($form);
|
75 |
+
$this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
|
76 |
+
->addFieldMap($enable_ticker->getHtmlId(), $enable_ticker->getName())
|
77 |
+
->addFieldMap($addToPages->getHtmlId(), $addToPages->getName())
|
78 |
+
->addFieldDependence($addToPages->getName(), $enable_ticker->getName(), 1));
|
79 |
+
|
80 |
+
return parent::_prepareForm();
|
81 |
+
}
|
82 |
+
|
83 |
+
/* protected function toOptionArray() {
|
84 |
+
$store_id = $this->getRequest()->getParam('store' , 0);
|
85 |
+
$_pages = Mage::getModel('cms/page')->getCollection()
|
86 |
+
->addStoreFilter($store_id)
|
87 |
+
->addFieldToFilter('is_active', 1);
|
88 |
+
|
89 |
+
$resultArray = array();
|
90 |
+
foreach ($_pages as $page) {
|
91 |
+
$tempResult[] = array('value' => $page->getIdentifier(),
|
92 |
+
'label' => $page->getTitle());
|
93 |
+
}
|
94 |
+
$resultArray = $tempResult;
|
95 |
+
return $resultArray;
|
96 |
+
}*/
|
97 |
+
|
98 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/Category/Edit/Tabs.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Block_Adminhtml_Category_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
parent::__construct();
|
7 |
+
$this->setId('category_tabs');
|
8 |
+
$this->setDestElementId('edit_form');
|
9 |
+
$this->setTitle(Mage::helper('news')->__('Category Information'));
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _beforeToHtml() {
|
13 |
+
$this->addTab('form_section', array(
|
14 |
+
'label' => Mage::helper('news')->__('Category Information'),
|
15 |
+
'title' => Mage::helper('news')->__('Category Information'),
|
16 |
+
'content' => $this->getLayout()->createBlock('news/adminhtml_category_edit_tab_form')->toHtml(),
|
17 |
+
));
|
18 |
+
|
19 |
+
return parent::_beforeToHtml();
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/Category/Grid.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Block_Adminhtml_Category_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('newsCategoryGrid');
|
9 |
+
$this->setDefaultSort('category_id');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _prepareCollection()
|
15 |
+
{
|
16 |
+
$store = $this->getRequest()->getParam('store', 0);
|
17 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
18 |
+
|
19 |
+
$collection = Mage::getModel('news/newscategory')->getCollection();
|
20 |
+
$collection->getSelect()->joinLeft($prefix.'news_category_data',
|
21 |
+
'main_table.category_id ='.$prefix.'news_category_data.category_id AND '.$prefix.'news_category_data.store_id = '.$store,
|
22 |
+
array('name','store_id','status'));
|
23 |
+
|
24 |
+
$this->setCollection($collection);
|
25 |
+
return parent::_prepareCollection();
|
26 |
+
}
|
27 |
+
|
28 |
+
protected function _prepareColumns()
|
29 |
+
{
|
30 |
+
$this->addColumn('category_id', array(
|
31 |
+
'header' => Mage::helper('news')->__('ID'),
|
32 |
+
'align' =>'right',
|
33 |
+
'width' => '50px',
|
34 |
+
'index' => 'category_id',
|
35 |
+
'filter_index' => 'main_table.category_id',
|
36 |
+
));
|
37 |
+
|
38 |
+
$this->addColumn('name', array(
|
39 |
+
'header' => Mage::helper('news')->__('Name'),
|
40 |
+
'align' =>'left',
|
41 |
+
'index' => 'name',
|
42 |
+
));
|
43 |
+
|
44 |
+
$this->addColumn('status', array(
|
45 |
+
'header' => Mage::helper('news')->__('Status'),
|
46 |
+
'align' => 'left',
|
47 |
+
'width' => '80px',
|
48 |
+
'index' => 'status',
|
49 |
+
'type' => 'options',
|
50 |
+
'options' => array(
|
51 |
+
1 => 'Enabled',
|
52 |
+
2 => 'Disabled',
|
53 |
+
),
|
54 |
+
));
|
55 |
+
|
56 |
+
$this->addColumn('action',
|
57 |
+
array(
|
58 |
+
'header' => Mage::helper('news')->__('Action'),
|
59 |
+
'width' => '100',
|
60 |
+
'type' => 'action',
|
61 |
+
'getter' => 'getId',
|
62 |
+
'actions' => array(
|
63 |
+
array(
|
64 |
+
'caption' => Mage::helper('news')->__('Edit'),
|
65 |
+
'url' => array('base'=> '*/*/edit','params' => array('store' => $this->getRequest()->getParam('store', 0))),
|
66 |
+
'field' => 'id'
|
67 |
+
)
|
68 |
+
),
|
69 |
+
'filter' => false,
|
70 |
+
'sortable' => false,
|
71 |
+
'index' => 'stores',
|
72 |
+
'is_system' => true,
|
73 |
+
));
|
74 |
+
|
75 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('news')->__('CSV'));
|
76 |
+
$this->addExportType('*/*/exportXml', Mage::helper('news')->__('XML'));
|
77 |
+
|
78 |
+
return parent::_prepareColumns();
|
79 |
+
}
|
80 |
+
|
81 |
+
protected function _prepareMassaction()
|
82 |
+
{
|
83 |
+
$this->setMassactionIdField('category_id');
|
84 |
+
$this->getMassactionBlock()->setFormFieldName('category');
|
85 |
+
|
86 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
87 |
+
'label' => Mage::helper('news')->__('Delete'),
|
88 |
+
'url' => $this->getUrl('*/*/massDelete', array('store'=>$this->getRequest()->getParam('store', 0))),
|
89 |
+
'confirm' => Mage::helper('news')->__('Are you sure?')
|
90 |
+
));
|
91 |
+
|
92 |
+
$statuses = Mage::getSingleton('news/status')->getOptionArray();
|
93 |
+
|
94 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
95 |
+
$this->getMassactionBlock()->addItem('status', array(
|
96 |
+
'label'=> Mage::helper('news')->__('Change status'),
|
97 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true,'store'=>$this->getRequest()->getParam('store', 0))),
|
98 |
+
'additional' => array(
|
99 |
+
'visibility' => array(
|
100 |
+
'name' => 'status',
|
101 |
+
'type' => 'select',
|
102 |
+
'class' => 'required-entry',
|
103 |
+
'label' => Mage::helper('news')->__('Status'),
|
104 |
+
'values' => $statuses
|
105 |
+
)
|
106 |
+
)
|
107 |
+
));
|
108 |
+
return $this;
|
109 |
+
}
|
110 |
+
|
111 |
+
public function getRowUrl($row)
|
112 |
+
{
|
113 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId(),'store'=>$this->getRequest()->getParam('store', 0)));
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/News.php
CHANGED
@@ -7,7 +7,13 @@ class Biztech_News_Block_Adminhtml_News extends Mage_Adminhtml_Block_Widget_Grid
|
|
7 |
$this->_blockGroup = 'news';
|
8 |
$this->_headerText = Mage::helper('news')->__('News Manager');
|
9 |
$this->_addButtonLabel = Mage::helper('news')->__('Add News');
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
}
|
12 |
public function _prepareLayout()
|
13 |
{
|
7 |
$this->_blockGroup = 'news';
|
8 |
$this->_headerText = Mage::helper('news')->__('News Manager');
|
9 |
$this->_addButtonLabel = Mage::helper('news')->__('Add News');
|
10 |
+
|
11 |
+
if(Mage::getStoreConfig('news/news_general/enabled') == 1){
|
12 |
+
parent::__construct();
|
13 |
+
}
|
14 |
+
else{
|
15 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('news')->__('News extension is not enabled. Please enable it from System > Configuration.'));
|
16 |
+
}
|
17 |
}
|
18 |
public function _prepareLayout()
|
19 |
{
|
app/code/local/Biztech/News/Block/Adminhtml/News/Edit/Tab/Form.php
CHANGED
@@ -1,71 +1,109 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class Biztech_News_Block_Adminhtml_News_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
-
{
|
5 |
-
protected function _prepareForm()
|
6 |
-
{
|
7 |
-
$form = new Varien_Data_Form();
|
8 |
-
$this->setForm($form);
|
9 |
-
$store = $this->getRequest()->getParam('store', 0);
|
10 |
-
$fieldset = $form->addFieldset('news_form', array('legend'=>Mage::helper('news')->__('News information')));
|
11 |
-
|
12 |
-
$fieldset->addField('title', 'text', array(
|
13 |
-
'label' => Mage::helper('news')->__('Title'),
|
14 |
-
'class' => 'required-entry',
|
15 |
-
'required' => true,
|
16 |
-
'name' => 'title',
|
17 |
-
));
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
class Biztech_News_Block_Adminhtml_News_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
+
protected function _prepareForm() {
|
6 |
+
$form = new Varien_Data_Form();
|
7 |
+
$this->setForm($form);
|
8 |
+
$fieldset = $form->addFieldset('news_form', array('legend' => Mage::helper('news')->__('News information')));
|
9 |
+
$store = Mage::registry('news_data')->getData('store_id');
|
10 |
+
|
11 |
+
$fieldset->addField('category_id', 'multiselect', array(
|
12 |
+
'name' => 'category_id[]',
|
13 |
+
'label' => Mage::helper('news')->__('News Category'),
|
14 |
+
'title' => Mage::helper('news')->__('News Category'),
|
15 |
+
'required' => true,
|
16 |
+
'values' => $this->toOptionArray(),
|
17 |
+
));
|
18 |
+
|
19 |
+
$fieldset->addField('title', 'text', array(
|
20 |
+
'label' => Mage::helper('news')->__('Title'),
|
21 |
+
'class' => 'required-entry',
|
22 |
+
'required' => true,
|
23 |
+
'name' => 'title',
|
24 |
+
));
|
25 |
|
26 |
+
$fieldset->addField('status', 'select', array(
|
27 |
+
'label' => Mage::helper('news')->__('Published?'),
|
28 |
+
'name' => 'status',
|
29 |
+
'values' => array(
|
30 |
+
array(
|
31 |
+
'value' => 1,
|
32 |
+
'label' => Mage::helper('news')->__('Yes'),
|
33 |
+
),
|
34 |
+
array(
|
35 |
+
'value' => 2,
|
36 |
+
'label' => Mage::helper('news')->__('No'),
|
37 |
+
),
|
38 |
+
),
|
39 |
+
));
|
40 |
+
|
41 |
+
$fieldset->addField('enable_ticker', 'select', array(
|
42 |
+
'label' => Mage::helper('news')->__('Enable For News Ticker'),
|
43 |
+
'name' => 'enable_ticker',
|
44 |
+
'values' => array(
|
45 |
+
array(
|
46 |
+
'value' => 0,
|
47 |
+
'label' => Mage::helper('news')->__('No'),
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
'value' => 1,
|
51 |
+
'label' => Mage::helper('news')->__('Yes'),
|
52 |
+
),
|
53 |
+
),
|
54 |
+
'after_element_html' => '<p class="note">Set Yes to enable News in News Ticker.</p>'
|
55 |
+
));
|
56 |
+
|
57 |
+
$fieldset->addField('intro', 'editor', array(
|
58 |
+
'name' => 'intro',
|
59 |
+
'label' => Mage::helper('news')->__('Intro'),
|
60 |
+
'title' => Mage::helper('news')->__('Intro'),
|
61 |
+
'style' => 'width:700px; height:500px;',
|
62 |
+
'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('files_browser_window_url' => $this->getBaseUrl() . 'admin/cms_wysiwyg_images/index/',)),
|
63 |
+
'wysiwyg' => true,
|
64 |
+
'required' => true,
|
65 |
+
));
|
66 |
+
|
67 |
+
|
68 |
+
$fieldset->addField('news_content', 'editor', array(
|
69 |
+
'name' => 'news_content',
|
70 |
+
'label' => Mage::helper('news')->__('Content'),
|
71 |
+
'title' => Mage::helper('news')->__('Content'),
|
72 |
+
'style' => 'width:700px; height:500px;',
|
73 |
+
'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('files_browser_window_url' => $this->getBaseUrl() . 'admin/cms_wysiwyg_images/index/',)),
|
74 |
+
'wysiwyg' => true,
|
75 |
+
'required' => true,
|
76 |
+
));
|
77 |
+
$fieldset->addField('store_id', 'hidden', array(
|
78 |
+
'label' => Mage::helper('news')->__('Store Id'),
|
79 |
+
'required' => false,
|
80 |
+
'name' => 'store_id'
|
81 |
+
));
|
82 |
+
|
83 |
+
if (Mage::getSingleton('adminhtml/session')->getNewsData()) {
|
84 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getNewsData());
|
85 |
+
Mage::getSingleton('adminhtml/session')->setNewsData(null);
|
86 |
+
} elseif (Mage::registry('news_data')) {
|
87 |
+
Mage::registry('news_data')->setData('store_id', $store);
|
88 |
+
$form->setValues(Mage::registry('news_data')->getData());
|
89 |
+
}
|
90 |
+
return parent::_prepareForm();
|
91 |
+
}
|
92 |
+
|
93 |
+
protected function toOptionArray()
|
94 |
+
{
|
95 |
+
|
96 |
+
$store_id = Mage::app()->getStore()->getStoreId();
|
97 |
+
$collection = Mage::getModel('news/newscategorydata')->getCollection()->addFieldToFilter('store_id' , $store_id);
|
98 |
+
$resultArray = array();
|
99 |
+
foreach($collection as $category)
|
100 |
+
{
|
101 |
+
$tempResult[] = array('value' => $category->getCategoryId(),
|
102 |
+
'label' => $category->getName());
|
103 |
+
}
|
104 |
+
|
105 |
+
$resultArray = $tempResult;
|
106 |
+
return $resultArray;
|
107 |
+
}
|
108 |
+
|
109 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/News/Edit/Tab/Product.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Biztech_News_Block_Adminhtml_News_Edit_Tab_Product extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('news_news_products');
|
7 |
+
$this->setDefaultSort('news_id');
|
8 |
+
$this->setUseAjax(true);
|
9 |
+
}
|
10 |
+
|
11 |
+
public function getFile() {
|
12 |
+
|
13 |
+
if (Mage::registry('news'))
|
14 |
+
return Mage::registry('news');
|
15 |
+
else
|
16 |
+
return Mage::getModel('news/news')->load((int) $this->getRequest()->getParam('id', 0));
|
17 |
+
}
|
18 |
+
|
19 |
+
protected function _addColumnFilterToCollection($column) {
|
20 |
+
|
21 |
+
// Set custom filter for in category flag
|
22 |
+
if ($column->getId() == 'in_file') {
|
23 |
+
$newsIds = $this->_getSelectedNews();
|
24 |
+
if (empty($newsIds)) {
|
25 |
+
$newsIds = 0;
|
26 |
+
}
|
27 |
+
if ($column->getFilter()->getValue()) {
|
28 |
+
$this->getCollection()->addFieldToFilter('news_id', array('in' => $newsIds));
|
29 |
+
} elseif (!empty($newsIds)) {
|
30 |
+
$this->getCollection()->addFieldToFilter('news_id', array('nin' => $newsIds));
|
31 |
+
}
|
32 |
+
} else {
|
33 |
+
parent::_addColumnFilterToCollection($column);
|
34 |
+
}
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _prepareCollection() {
|
39 |
+
|
40 |
+
$store = $this->getRequest()->getParam('store', 0);
|
41 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
42 |
+
$collection = Mage::getModel('news/newsdata')->getCollection();
|
43 |
+
$collection->addFieldToFilter('news_id' , array("neq" => $this->getRequest()->getParam('id')));
|
44 |
+
$collection->addFieldToFilter('store_id' , $store);
|
45 |
+
$this->setCollection($collection);
|
46 |
+
|
47 |
+
if (!Mage::registry('news')) {
|
48 |
+
$newsIds = $this->_getSelectedNews();
|
49 |
+
if (empty($newsIds)) {
|
50 |
+
$newsIds = 0;
|
51 |
+
}
|
52 |
+
$collection->addFieldToFilter('news_id', array('in' => $newsIds));
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
return parent::_prepareCollection();
|
57 |
+
}
|
58 |
+
|
59 |
+
protected function _prepareColumns() {
|
60 |
+
|
61 |
+
if ($this->getFile()->getId()) {
|
62 |
+
$this->setDefaultFilter(array('in_file' => 1));
|
63 |
+
}
|
64 |
+
$this->addColumn('in_file', array(
|
65 |
+
'header_css_class' => 'a-center',
|
66 |
+
'type' => 'checkbox',
|
67 |
+
'name' => 'in_file',
|
68 |
+
'values' => $this->_getSelectedNews(),
|
69 |
+
'align' => 'center',
|
70 |
+
'index' => 'news_id',
|
71 |
+
'filter_index' => 'news_id'
|
72 |
+
));
|
73 |
+
|
74 |
+
$this->addColumn('news_id', array(
|
75 |
+
'header' => Mage::helper('news')->__('ID'),
|
76 |
+
'sortable' => true,
|
77 |
+
'width' => '60px',
|
78 |
+
'index' => 'news_id',
|
79 |
+
));
|
80 |
+
|
81 |
+
$this->addColumn('relatednews_title', array(
|
82 |
+
'header' => Mage::helper('news')->__('Title'),
|
83 |
+
'index' => 'title',
|
84 |
+
'sortable' => true
|
85 |
+
));
|
86 |
+
|
87 |
+
return parent::_prepareColumns();
|
88 |
+
}
|
89 |
+
|
90 |
+
public function getGridUrl() {
|
91 |
+
|
92 |
+
return $this->getUrl('*/*/grid', array('_current' => true));
|
93 |
+
}
|
94 |
+
|
95 |
+
protected function _getSelectedNews() {
|
96 |
+
|
97 |
+
$news = $this->getRequest()->getPost('selected_news');
|
98 |
+
$files = Mage::getSingleton('core/resource')->getConnection('core_read')->query('SELECT news_id FROM ' .
|
99 |
+
Mage::getSingleton('core/resource')->getTableName('newsdata') .
|
100 |
+
' WHERE news_id="' . (int) $this->getRequest()->getParam('id', 0) . '"
|
101 |
+
AND store_id="'.(int) $this->getRequest()->getParam('store', 0).'" ');
|
102 |
+
$array = array();
|
103 |
+
foreach ($files as $file) {
|
104 |
+
$array[] = $file['related_news'];
|
105 |
+
}
|
106 |
+
return $array;
|
107 |
+
}
|
108 |
+
|
109 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/News/Edit/Tab/Related.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Block_Adminhtml_News_Edit_Tab_Related extends Mage_Adminhtml_Block_Widget_Grid {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
parent::__construct();
|
7 |
+
$this->setId('relatedGrid');
|
8 |
+
$this->setUseAjax(true);
|
9 |
+
$this->setDefaultSort('news_id');
|
10 |
+
$this->setDefaultFilter(array('related_news' => 1));
|
11 |
+
$this->setDefaultDir('DESC');
|
12 |
+
$this->setSaveParametersInSession(false);
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
protected function _addColumnFilterToCollection($column) {
|
17 |
+
if ($column->getId() == 'related_news') {
|
18 |
+
|
19 |
+
$newsIds = $this->_getSelectedNews();
|
20 |
+
if (empty($newsIds)) {
|
21 |
+
$newsIds = 0;
|
22 |
+
}
|
23 |
+
if ($column->getFilter()->getValue()) {
|
24 |
+
$this->getCollection()->addFieldToFilter('news_id', array('in' => $newsIds));
|
25 |
+
} elseif (!empty($newsIds)) {
|
26 |
+
$this->getCollection()->addFieldToFilter('news_id', array('nin' => $newsIds));
|
27 |
+
}
|
28 |
+
} else {
|
29 |
+
parent::_addColumnFilterToCollection($column);
|
30 |
+
}
|
31 |
+
return $this;
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function _prepareCollection() {
|
35 |
+
|
36 |
+
$news = $this->_getSelectedNews();
|
37 |
+
$store = $this->getRequest()->getParam('store', 0);
|
38 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
39 |
+
$collection = Mage::getModel('news/newsdata')->getCollection()
|
40 |
+
->addFieldToSelect('title')
|
41 |
+
->addFieldToSelect('news_id')
|
42 |
+
->addFieldToFilter('news_id' , array("neq" => $this->getRequest()->getParam('id')))
|
43 |
+
->addFieldToFilter('store_id' , $store);
|
44 |
+
|
45 |
+
$this->setCollection($collection);
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
if (!Mage::registry('news')) {
|
51 |
+
$newsIds = $this->_getSelectedNews();
|
52 |
+
if (empty($newsIds)) {
|
53 |
+
$newsIds = 0;
|
54 |
+
}
|
55 |
+
$collection->addFieldToFilter('news_id', array('in' => $newsIds));
|
56 |
+
}
|
57 |
+
|
58 |
+
return parent::_prepareCollection();
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
protected function _prepareColumns() {
|
63 |
+
|
64 |
+
$this->addColumn('related_news', array(
|
65 |
+
'header_css_class' => 'a-center',
|
66 |
+
'type' => 'checkbox',
|
67 |
+
'name' => 'related_news[]',
|
68 |
+
'onclick' => 'test_news()',
|
69 |
+
'values' => $this->_getSelectedNews(),
|
70 |
+
'align' => 'center',
|
71 |
+
'index' => 'news_id',
|
72 |
+
'field_name' => 'related_news[]',
|
73 |
+
|
74 |
+
));
|
75 |
+
|
76 |
+
|
77 |
+
$this->addColumn('news_id', array(
|
78 |
+
'header' => Mage::helper('news')->__('ID'),
|
79 |
+
'sortable' => true,
|
80 |
+
'width' => '60px',
|
81 |
+
'index' => 'news_id'
|
82 |
+
));
|
83 |
+
$this->addColumn('relatednews_title', array(
|
84 |
+
'header' => Mage::helper('news')->__('Title'),
|
85 |
+
'index' => 'title',
|
86 |
+
'sortable' => true
|
87 |
+
));
|
88 |
+
|
89 |
+
return parent::_prepareColumns();
|
90 |
+
}
|
91 |
+
|
92 |
+
public function getGridUrl() {
|
93 |
+
return $this->getUrl('*/*/grid', array('_current' => true));
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
protected function _getNews() {
|
98 |
+
return Mage::registry('news_data');
|
99 |
+
}
|
100 |
+
|
101 |
+
protected function _getSelectedNews() {
|
102 |
+
|
103 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
104 |
+
$news = $this->getRequest()->getPost('related_news');
|
105 |
+
$related_news = Mage::getModel('news/newsdata')->getCollection()
|
106 |
+
->addFieldToFilter('news_id', (int) $this->getRequest()->getParam('id'))
|
107 |
+
->addFieldToFilter('store_id', (int) $this->getRequest()->getParam('store'))
|
108 |
+
->getFirstItem()
|
109 |
+
->getData();
|
110 |
+
|
111 |
+
$sel_news = explode(",", $related_news['related_news']);
|
112 |
+
if (!is_null($news)) {
|
113 |
+
$sel_news = array_merge($news, $sel_news);
|
114 |
+
}
|
115 |
+
return $sel_news;
|
116 |
+
}
|
117 |
+
|
118 |
+
public function getRelNews() {
|
119 |
+
|
120 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
121 |
+
$news = $this->getRequest()->getPost('related_news');
|
122 |
+
|
123 |
+
$sel_news = '';
|
124 |
+
$related_news = Mage::getModel('news/newsdata')->getCollection()
|
125 |
+
->addFieldToFilter('news_id', (int) $this->getRequest()->getParam('id'))
|
126 |
+
->addFieldToFilter('store_id', (int) $this->getRequest()->getParam('store'))
|
127 |
+
->getFirstItem()
|
128 |
+
->getData();
|
129 |
+
|
130 |
+
|
131 |
+
$sel_news = explode(",", $related_news['related_news']);
|
132 |
+
if (!is_null($news)) {
|
133 |
+
$sel_news = array_merge($news, $sel_news);
|
134 |
+
}
|
135 |
+
return $sel_news;
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
}
|
140 |
+
|
141 |
+
?>
|
app/code/local/Biztech/News/Block/Adminhtml/News/Edit/Tabs.php
CHANGED
@@ -1,36 +1,42 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class Biztech_News_Block_Adminhtml_News_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
'content' => $this->getLayout()->createBlock('news/adminhtml_news_edit_tab_publishingoptions')->toHtml(),
|
26 |
-
));
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
class Biztech_News_Block_Adminhtml_News_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
parent::__construct();
|
7 |
+
$this->setId('news_tabs');
|
8 |
+
$this->setDestElementId('edit_form');
|
9 |
+
$this->setTitle(Mage::helper('news')->__('News Information'));
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _beforeToHtml() {
|
13 |
+
$this->addTab('form_section', array(
|
14 |
+
'label' => Mage::helper('news')->__('News Information'),
|
15 |
+
'title' => Mage::helper('news')->__('News Information'),
|
16 |
+
'content' => $this->getLayout()->createBlock('news/adminhtml_news_edit_tab_form')->toHtml(),
|
17 |
+
));
|
18 |
+
|
19 |
+
$this->addTab('publishing_options', array(
|
20 |
+
'label' => Mage::helper('news')->__('Publishing Options'),
|
21 |
+
'title' => Mage::helper('news')->__('Publishing Options'),
|
22 |
+
'content' => $this->getLayout()->createBlock('news/adminhtml_news_edit_tab_publishingoptions')->toHtml(),
|
23 |
+
));
|
24 |
+
|
|
|
|
|
25 |
|
26 |
+
|
27 |
+
$this->addTab('seo', array(
|
28 |
+
'label' => Mage::helper('news')->__('SEO Options'),
|
29 |
+
'title' => Mage::helper('news')->__('SEO Options'),
|
30 |
+
'content' => $this->getLayout()->createBlock('news/adminhtml_news_edit_tab_seo')->toHtml(),
|
31 |
+
));
|
32 |
+
|
33 |
+
$this->addTab('relatednews', array(
|
34 |
+
'label' => Mage::helper('news')->__('Related News'),
|
35 |
+
'title' => Mage::helper('news')->__('Related News'),
|
36 |
+
'url' => $this->getUrl('*/*/product', array('_current' => true)),
|
37 |
+
'class' => 'ajax',
|
38 |
+
));
|
39 |
+
return parent::_beforeToHtml();
|
40 |
+
}
|
41 |
+
|
42 |
+
}
|
app/code/local/Biztech/News/Block/Adminhtml/News/Grid.php
CHANGED
@@ -13,13 +13,14 @@ class Biztech_News_Block_Adminhtml_News_Grid extends Mage_Adminhtml_Block_Widget
|
|
13 |
|
14 |
protected function _prepareCollection()
|
15 |
{
|
16 |
-
|
17 |
|
18 |
-
|
19 |
|
20 |
$collection = Mage::getModel('news/news')->getCollection();
|
21 |
|
22 |
-
$collection->getSelect()->joinLeft($prefix.'news_data', 'main_table.news_id ='.$prefix.'news_data.news_id AND '.$prefix.'news_data.store_id = '.$store,
|
|
|
23 |
$this->setCollection($collection);
|
24 |
return parent::_prepareCollection();
|
25 |
}
|
@@ -31,6 +32,7 @@ class Biztech_News_Block_Adminhtml_News_Grid extends Mage_Adminhtml_Block_Widget
|
|
31 |
'align' =>'right',
|
32 |
'width' => '50px',
|
33 |
'index' => 'news_id',
|
|
|
34 |
));
|
35 |
|
36 |
$this->addColumn('title', array(
|
13 |
|
14 |
protected function _prepareCollection()
|
15 |
{
|
16 |
+
$store = $this->getRequest()->getParam('store', 0);
|
17 |
|
18 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
19 |
|
20 |
$collection = Mage::getModel('news/news')->getCollection();
|
21 |
|
22 |
+
$collection->getSelect()->joinLeft($prefix.'news_data', 'main_table.news_id ='.$prefix.'news_data.news_id AND '.$prefix.'news_data.store_id = '.$store,
|
23 |
+
array('status','title','news_content','intro','date_to_publish','date_to_unpublish',));
|
24 |
$this->setCollection($collection);
|
25 |
return parent::_prepareCollection();
|
26 |
}
|
32 |
'align' =>'right',
|
33 |
'width' => '50px',
|
34 |
'index' => 'news_id',
|
35 |
+
'filter_index' => 'main_table.news_id',
|
36 |
));
|
37 |
|
38 |
$this->addColumn('title', array(
|
app/code/local/Biztech/News/Block/Category.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Block_Category extends Mage_Core_Block_Template {
|
4 |
+
|
5 |
+
public function _prepareLayout() {
|
6 |
+
|
7 |
+
return parent::_prepareLayout();
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getCategory() { // returns all categories
|
11 |
+
$store = Mage::app()->getStore()->getId();
|
12 |
+
$collection = Mage::getModel('news/newscategory')->getCollection();
|
13 |
+
$collection->getSelect()->join($prefix . 'news_category_data', 'main_table.category_id =' . $prefix . 'news_category_data.category_id AND ' . $prefix . 'news_category_data.store_id = ' . $store .' AND ' . $prefix . 'news_category_data.status = 1'
|
14 |
+
,array('name', 'store_id', 'status'));
|
15 |
+
|
16 |
+
$newsCategory = $collection->getData();
|
17 |
+
return $newsCategory;
|
18 |
+
}
|
19 |
+
|
20 |
+
public function getCategorisedNews($id) //returns news count for single category
|
21 |
+
{
|
22 |
+
$store = Mage::app()->getStore()->getId();
|
23 |
+
$newsCategory = Mage::getModel("news/newscategory");
|
24 |
+
$categoryId = $id;
|
25 |
+
$newsCategory->load($categoryId,"category_id");
|
26 |
+
|
27 |
+
$catgorisedNews = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('store_id',$store)
|
28 |
+
->addFieldToFilter('category_id',array('finset' => $categoryId))->addFieldToFilter('status' , array('eq' => 1));
|
29 |
+
|
30 |
+
$catgorisedNews->addFieldToFilter("date_to_unpublish",array("gteq"=>date('Y-m-d 00:00:00')))->addFieldToFilter("date_to_publish",array("lt"=>date('Y-m-d 23:59:59')))->getData();
|
31 |
+
|
32 |
+
return count($catgorisedNews);
|
33 |
+
}
|
34 |
+
}
|
app/code/local/Biztech/News/Block/News.php
CHANGED
@@ -1,71 +1,91 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
{
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
'dir' => 'asc',
|
44 |
-
'limits' => Mage::helper('news')->commentsPerPage(),
|
45 |
)
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
49 |
-
}
|
50 |
|
51 |
-
public function getPreparedCollection()
|
52 |
-
{
|
53 |
-
return $this->_prepareCollection();
|
54 |
-
}
|
55 |
-
protected function _prepareCollection()
|
56 |
-
{
|
57 |
-
|
58 |
-
|
59 |
-
$collection = Mage::helper('news')->getNewsCollection();
|
60 |
-
$collection->setPageSize(10);
|
61 |
|
62 |
-
|
63 |
-
|
64 |
|
65 |
-
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
}
|
1 |
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Block_News extends Mage_Core_Block_Template {
|
4 |
+
|
5 |
+
public function _prepareLayout() {
|
6 |
+
|
7 |
+
return parent::_prepareLayout();
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getNews() {
|
11 |
+
$store = Mage::app()->getStore()->getId();
|
12 |
+
$news = Mage::getModel("news/news");
|
13 |
+
$newsId = $this->getRequest()->getParam("id");
|
14 |
+
$news->load($newsId, "news_id");
|
15 |
+
|
16 |
+
$model_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('store_id', $store)->addFieldToFilter('news_id', $newsId)
|
17 |
+
->getData();
|
18 |
+
|
19 |
+
|
20 |
+
$text_data = $model_text[0];
|
21 |
+
$news = $news->setTitle($text_data['title'])
|
22 |
+
->setNewsContent($text_data['news_content'])
|
23 |
+
->setStatus($text_data['status'])
|
24 |
+
->setIntro($text_data['intro'])
|
25 |
+
->setDateToPublish($text_data['date_to_publish'])
|
26 |
+
->setDateToUnpublish($text_data['date_to_unpublish'])
|
27 |
+
->setBrowserTitle($text_data['browser_title'])
|
28 |
+
->setSeoKeywords($text_data['seo_keywords'])
|
29 |
+
->setSeoDescription($text_data['seo_description'])
|
30 |
+
->setRelatedNews($text_data['related_news'])
|
31 |
+
->setCategoryId($text_data['category_id']);
|
32 |
+
|
33 |
+
$this->setData('news', $news);
|
34 |
+
|
35 |
+
return $news;
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _beforeToHtml() {
|
39 |
+
Mage::helper('news/toolbar')->create($this, array(
|
40 |
+
'default_order' => 'created_time',
|
41 |
+
'dir' => 'asc',
|
42 |
+
'limits' => Mage::helper('news')->commentsPerPage(),
|
|
|
|
|
43 |
)
|
44 |
+
);
|
45 |
+
|
46 |
+
return $this;
|
47 |
+
}
|
48 |
+
|
49 |
+
public function getPreparedCollection() {
|
50 |
+
return $this->_prepareCollection();
|
51 |
+
}
|
52 |
+
|
53 |
+
protected function _prepareCollection() {
|
54 |
+
|
55 |
+
$cid = $this->getRequest()->getParam('cid');
|
56 |
+
$collection = Mage::helper('news')->getNewsCollection($cid);
|
57 |
+
$collection->setPageSize(10);
|
58 |
+
|
59 |
+
if ($this->getRequest()->getParam('p') > 0)
|
60 |
+
$collection->setCurPage($this->getRequest()->getParam('p'));
|
61 |
|
62 |
+
$this->setData('cached_collection', $collection);
|
|
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
+
return $this->getData('cached_collection');
|
66 |
+
}
|
67 |
|
68 |
+
protected function getTickerCollection($pageIdentifier, $store) {
|
69 |
|
70 |
+
$collection = Mage::getModel('news/newscategorydata')->getCollection()
|
71 |
+
->addFieldToFilter('add_to_pages', array('finset' => $pageIdentifier))
|
72 |
+
->addFieldToFilter('main_table.store_id', array('eq' => $store))
|
73 |
+
->addFieldToFilter('main_table.enable_ticker', array('eq' => 1));
|
74 |
+
|
75 |
+
foreach ($collection as $_collection):
|
76 |
+
$catIds.= (strlen($catIds) > 0 ? '|' . $_collection->getCategoryId() : $_collection->getCategoryId()) ;
|
77 |
+
endforeach;
|
78 |
|
79 |
+
$collection->getSelect()->joinLeft('news_data', 'news_data.store_id=' . $store . '
|
80 |
+
AND news_data.enable_ticker = 1
|
81 |
+
AND news_data.status = 1
|
82 |
+
AND news_data.category_id REGEXP "[[:<:]](' . $catIds . ')[[:>:]]"',
|
83 |
+
array('intro', 'title', 'news_id'));
|
84 |
+
|
85 |
+
$collection->addFieldToFilter("date_to_unpublish",array("gteq"=>date('Y-m-d 00:00:00')))->addFieldToFilter("date_to_publish",array("lt"=>date('Y-m-d 23:59:59')));
|
86 |
+
$collection->getSelect()->distinct(true);
|
87 |
+
|
88 |
+
return $collection;
|
89 |
+
}
|
90 |
|
91 |
+
}
|
app/code/local/Biztech/News/Helper/Data.php
CHANGED
@@ -5,24 +5,26 @@
|
|
5 |
public function getNewsUrl(){
|
6 |
return $this->_getUrl('news/index');
|
7 |
}
|
8 |
-
|
9 |
-
{
|
10 |
-
|
11 |
-
|
12 |
if (!$count) {
|
13 |
return self::DEFAULT_PAGE_COUNT;
|
14 |
}
|
15 |
|
16 |
return $count;
|
17 |
}
|
18 |
-
|
19 |
-
{
|
20 |
return "ASC";
|
21 |
}
|
22 |
-
|
23 |
-
{
|
24 |
return true;
|
25 |
}
|
|
|
|
|
26 |
public function filterWYS($text)
|
27 |
{
|
28 |
$processorModelName = version_compare(Mage::getVersion(), '1.3.3.0', '>') ? 'widget/template_filter' : 'core/email_template_filter';
|
@@ -33,15 +35,25 @@
|
|
33 |
return $text;
|
34 |
}
|
35 |
|
36 |
-
public function getNewsCollection()
|
37 |
{
|
|
|
38 |
$store = Mage::app()->getStore()->getId();
|
39 |
$prefix = Mage::getConfig()->getTablePrefix();
|
40 |
$collection = Mage::getModel('news/news')->getCollection();
|
41 |
-
$collection->getSelect()->join($prefix.'news_data', 'main_table.news_id ='.$prefix.'news_data.news_id AND '.$prefix.'news_data.store_id = '.$store.' AND '.$prefix.'news_data.status = 1',array('status','title','news_content','intro','store_id','date_to_publish','date_to_unpublish','browser_title','seo_keywords','seo_description'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
$collection->addFieldToFilter("date_to_unpublish",array("gteq"=>date('Y-m-d 00:00:00')))->addFieldToFilter("date_to_publish",array("lt"=>date('Y-m-d 23:59:59')));
|
44 |
-
|
45 |
return $collection;
|
46 |
}
|
|
|
47 |
}
|
5 |
public function getNewsUrl(){
|
6 |
return $this->_getUrl('news/index');
|
7 |
}
|
8 |
+
|
9 |
+
public function commentsPerPage($store = null){
|
10 |
+
|
11 |
+
$count = '10,20,30,50';
|
12 |
if (!$count) {
|
13 |
return self::DEFAULT_PAGE_COUNT;
|
14 |
}
|
15 |
|
16 |
return $count;
|
17 |
}
|
18 |
+
|
19 |
+
public function defaultPostSort($store = null){
|
20 |
return "ASC";
|
21 |
}
|
22 |
+
|
23 |
+
public function getEnabled(){
|
24 |
return true;
|
25 |
}
|
26 |
+
|
27 |
+
|
28 |
public function filterWYS($text)
|
29 |
{
|
30 |
$processorModelName = version_compare(Mage::getVersion(), '1.3.3.0', '>') ? 'widget/template_filter' : 'core/email_template_filter';
|
35 |
return $text;
|
36 |
}
|
37 |
|
38 |
+
public function getNewsCollection($cid)
|
39 |
{
|
40 |
+
|
41 |
$store = Mage::app()->getStore()->getId();
|
42 |
$prefix = Mage::getConfig()->getTablePrefix();
|
43 |
$collection = Mage::getModel('news/news')->getCollection();
|
44 |
+
$collection->getSelect()->join($prefix.'news_data', 'main_table.news_id ='.$prefix.'news_data.news_id AND '.$prefix.'news_data.store_id = '.$store.' AND '.$prefix.'news_data.status = 1',array('status','title','news_content','intro','store_id','date_to_publish','date_to_unpublish','browser_title','seo_keywords','seo_description','category_id'));
|
45 |
+
|
46 |
+
$collection->getSelect()->join($prefix.'news_category_data', $prefix.'news_category_data.category_id IN ('.$prefix.'news_data.category_id) AND '.$prefix.'news_category_data.store_id = '.$store.' AND '.$prefix.'news_category_data.status = 1');
|
47 |
+
|
48 |
+
if($cid)
|
49 |
+
{
|
50 |
+
$collection->addFieldToFilter($prefix.'news_data.category_id' , array('finset'=> $cid));
|
51 |
+
}
|
52 |
+
|
53 |
+
$collection->addFieldToFilter("date_to_unpublish",array("gteq"=>date('Y-m-d 00:00:00')))
|
54 |
+
->addFieldToFilter("date_to_publish",array("lt"=>date('Y-m-d 23:59:59')));
|
55 |
|
|
|
|
|
56 |
return $collection;
|
57 |
}
|
58 |
+
|
59 |
}
|
app/code/local/Biztech/News/Helper/Toolbar.php
CHANGED
@@ -29,6 +29,7 @@
|
|
29 |
|
30 |
public function getAvailLimits()
|
31 |
{
|
|
|
32 |
$params = $this->getToolbarParams();
|
33 |
|
34 |
$limits = array();
|
@@ -50,11 +51,10 @@
|
|
50 |
public function getToolbarBlock()
|
51 |
{
|
52 |
$block = $this->getToolbarParentBlock()->getLayout()->getBlock('Biztech_news_list_toolbar');
|
53 |
-
|
54 |
if (!$block) {
|
55 |
return $this->getToolbarParentBlock()->getLayout()->createBlock('news/product_toolbar', microtime());
|
56 |
}
|
57 |
-
|
58 |
return $block;
|
59 |
}
|
60 |
|
29 |
|
30 |
public function getAvailLimits()
|
31 |
{
|
32 |
+
|
33 |
$params = $this->getToolbarParams();
|
34 |
|
35 |
$limits = array();
|
51 |
public function getToolbarBlock()
|
52 |
{
|
53 |
$block = $this->getToolbarParentBlock()->getLayout()->getBlock('Biztech_news_list_toolbar');
|
54 |
+
|
55 |
if (!$block) {
|
56 |
return $this->getToolbarParentBlock()->getLayout()->createBlock('news/product_toolbar', microtime());
|
57 |
}
|
|
|
58 |
return $block;
|
59 |
}
|
60 |
|
app/code/local/Biztech/News/Model/Mysql4/Newscategory.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Model_Mysql4_Newscategory extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('news/newscategory', 'category_id');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Biztech/News/Model/Mysql4/Newscategory.php~
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Model_Mysql4_Newscategory extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('news/newsdata', 'category_id');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Biztech/News/Model/Mysql4/Newscategory/Collection.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Biztech_News_Model_Mysql4_Newscategory_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('news/newscategory');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Biztech/News/Model/Mysql4/Newscategorydata.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Model_Mysql4_Newscategorydata extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('news/newscategorydata', 'data_id');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Biztech/News/Model/Mysql4/Newscategorydata/Collection.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Model_Mysql4_Newscategorydata_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('news/newscategorydata');
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Biztech/News/Model/Mysql4/Newsdata.php
CHANGED
@@ -6,4 +6,4 @@ class Biztech_News_Model_Mysql4_Newsdata extends Mage_Core_Model_Mysql4_Abstract
|
|
6 |
{
|
7 |
$this->_init('news/newsdata', 'text_id');
|
8 |
}
|
9 |
-
}
|
6 |
{
|
7 |
$this->_init('news/newsdata', 'text_id');
|
8 |
}
|
9 |
+
}
|
app/code/local/Biztech/News/Model/Mysql4/Newsdata.php~
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Model_Mysql4_Newsdata extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('news/newsdata', 'text_id');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Biztech/News/Model/Newscategory.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Model_Newscategory extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('news/newscategory');
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Biztech/News/Model/Newscategorydata.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Model_Newscategorydata extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('news/newscategorydata');
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Biztech/News/controllers/Adminhtml/CategoryController.php
ADDED
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Biztech_News_Adminhtml_CategoryController extends Mage_Adminhtml_Controller_action {
|
4 |
+
|
5 |
+
protected function _initAction() {
|
6 |
+
$this->loadLayout()
|
7 |
+
->_setActiveMenu('news/category')
|
8 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Category Manager'), Mage::helper('adminhtml')->__('Category Manager'));
|
9 |
+
|
10 |
+
return $this;
|
11 |
+
}
|
12 |
+
|
13 |
+
public function indexAction() {
|
14 |
+
$this->_initAction()
|
15 |
+
->renderLayout();
|
16 |
+
}
|
17 |
+
|
18 |
+
public function editAction() {
|
19 |
+
|
20 |
+
$store = $this->getRequest()->getParam('store', 0);
|
21 |
+
$id = $this->getRequest()->getParam('id');
|
22 |
+
$model = Mage::getModel('news/newscategory')->load($id);
|
23 |
+
|
24 |
+
$model_text = Mage::getModel('news/newscategorydata')->getCollection()->addFieldToFilter('store_id', $store)->addFieldToFilter('category_id', $model->getCategoryId())->getData();
|
25 |
+
|
26 |
+
if (count($model_text) == 0) {
|
27 |
+
$model_text = Mage::getModel('news/newscategorydata')->getCollection()->addFieldToFilter('store_id', 0)->addFieldToFilter('category_id', $model->getCategoryId())->getData();
|
28 |
+
}
|
29 |
+
|
30 |
+
$text_data = $model_text[0];
|
31 |
+
$model = $model->setName($text_data['name'])
|
32 |
+
->setStoreId($text_data['store_id'])
|
33 |
+
->setEnableTicker($text_data['enable_ticker'])
|
34 |
+
->setAddToPages($text_data['add_to_pages'])
|
35 |
+
->setStatus($text_data['status']);
|
36 |
+
|
37 |
+
if ($model->getId() || $id == 0) {
|
38 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
39 |
+
if (!empty($data)) {
|
40 |
+
$model->setData($data);
|
41 |
+
$model_text->setData($data);
|
42 |
+
}
|
43 |
+
|
44 |
+
Mage::register('news_category_data', $model);
|
45 |
+
|
46 |
+
$this->loadLayout();
|
47 |
+
$this->_setActiveMenu('news/category');
|
48 |
+
|
49 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Category Manager'), Mage::helper('adminhtml')->__('Category Manager'));
|
50 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Category'), Mage::helper('adminhtml')->__('Item Category'));
|
51 |
+
|
52 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
53 |
+
|
54 |
+
$this->_addContent($this->getLayout()->createBlock('news/adminhtml_category_edit'))
|
55 |
+
->_addLeft($this->getLayout()->createBlock('adminhtml/store_switcher'))
|
56 |
+
->_addLeft($this->getLayout()->createBlock('news/adminhtml_category_edit_tabs'));
|
57 |
+
|
58 |
+
$this->renderLayout();
|
59 |
+
} else {
|
60 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('news')->__('Category does not exist'));
|
61 |
+
$this->_redirect('*/*/', array('store' => $store));
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
public function newAction() {
|
66 |
+
$this->_forward('edit');
|
67 |
+
}
|
68 |
+
|
69 |
+
public function saveAction() {
|
70 |
+
if ($data = $this->getRequest()->getPost()) {
|
71 |
+
$model = Mage::getModel('news/newscategory');
|
72 |
+
$model_text = Mage::getModel('news/newscategorydata');
|
73 |
+
try {
|
74 |
+
if (!$this->getRequest()->getParam('id')) {
|
75 |
+
|
76 |
+
$model->setId();
|
77 |
+
$model->save();
|
78 |
+
|
79 |
+
$category_id = $model->getId();
|
80 |
+
|
81 |
+
$model_text = Mage::getModel('news/newscategorydata');
|
82 |
+
|
83 |
+
if (isset($data['add_to_pages'])) {
|
84 |
+
$pages = implode(",", array_unique($data['add_to_pages']));
|
85 |
+
}
|
86 |
+
|
87 |
+
$model_text->setData($data)->setCategoryId($category_id)->setStoreId(0);
|
88 |
+
$model_text->save();
|
89 |
+
|
90 |
+
foreach (Mage::app()->getWebsites() as $website) {
|
91 |
+
foreach ($website->getGroups() as $group) {
|
92 |
+
$stores = $group->getStores();
|
93 |
+
foreach ($stores as $store) {
|
94 |
+
$model_text->setData($data)->setCategoryId($category_id)->setStoreId($store->getId())->setEnableTicker($data['enable_ticker'])->setAddToPages($pages);
|
95 |
+
$model_text->save();
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
} else {
|
100 |
+
|
101 |
+
$category_id = $this->getRequest()->getParam('id');
|
102 |
+
if ($data['store_id'] == 0) {
|
103 |
+
|
104 |
+
$text_data = Mage::getModel('news/newscategorydata')->getCollection()->addFieldToFilter('category_id', $category_id)->addFieldToFilter('store_id', $data['store_id'])->getData();
|
105 |
+
|
106 |
+
if (isset($data['add_to_pages'])) {
|
107 |
+
$pages = implode(",", array_unique($data['add_to_pages']));
|
108 |
+
} else {
|
109 |
+
$pages = $text_data[0]['add_to_pages'];
|
110 |
+
}
|
111 |
+
|
112 |
+
$model_text->setData($data)->setCategoryId($text_data[0]['category_id'])->setId($text_data[0]['data_id'])->setStoreId(0)->setAddToPages($pages);
|
113 |
+
$model_text->save();
|
114 |
+
|
115 |
+
foreach (Mage::app()->getWebsites() as $website) {
|
116 |
+
foreach ($website->getGroups() as $group) {
|
117 |
+
$stores = $group->getStores();
|
118 |
+
foreach ($stores as $store) {
|
119 |
+
|
120 |
+
$text_data = '';
|
121 |
+
$text_data = Mage::getModel('news/newscategorydata')->getCollection()->addFieldToFilter('category_id', $category_id)->addFieldToFilter('store_id', $store->getId())->getData();
|
122 |
+
$model_text->setData($data)->setCategoryId($text_data[0]['category_id'])->setId($text_data[0]['data_id'])->setStoreId($store->getId())->setEnableTicker($data['enable_ticker'])->setAddToPages($pages);
|
123 |
+
$model_text->save();
|
124 |
+
}
|
125 |
+
}
|
126 |
+
}
|
127 |
+
} else {
|
128 |
+
|
129 |
+
$text_data = '';
|
130 |
+
$text_data = Mage::getModel('news/newscategorydata')->getCollection()->addFieldToFilter('category_id', $category_id)->addFieldToFilter('store_id', $data['store_id'])->getData();
|
131 |
+
if (isset($data['add_to_pages'])) {
|
132 |
+
$pages = implode(",", array_unique($data['add_to_pages']));
|
133 |
+
} else {
|
134 |
+
$pages = $text_data[0]['add_to_pages'];
|
135 |
+
}
|
136 |
+
|
137 |
+
$model_text->setData($data)->setCategoryId($text_data[0]['category_id'])->setId($text_data[0]['data_id'])->setStoreId($data['store_id'])->setEnableTicker($data['enable_ticker'])->setAddToPages($pages);
|
138 |
+
$model_text->save();
|
139 |
+
}
|
140 |
+
}
|
141 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('news')->__('Category was successfully saved'));
|
142 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
143 |
+
|
144 |
+
if ($this->getRequest()->getParam('back')) {
|
145 |
+
$this->_redirect('*/*/edit', array('id' => $category_id, 'store' => $data['store_id']));
|
146 |
+
return;
|
147 |
+
}
|
148 |
+
$this->_redirect('*/*/', array('store' => $data['store_id']));
|
149 |
+
return;
|
150 |
+
} catch (Exception $e) {
|
151 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
152 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
153 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'), 'store' => $data['store_id']));
|
154 |
+
return;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('news')->__('Unable to find item to save'));
|
158 |
+
$this->_redirect('*/*/');
|
159 |
+
}
|
160 |
+
|
161 |
+
public function deleteAction() {
|
162 |
+
if ($this->getRequest()->getParam('id') > 0) {
|
163 |
+
try {
|
164 |
+
$model = Mage::getModel('news/newscategory');
|
165 |
+
|
166 |
+
$model->setId($this->getRequest()->getParam('id'))
|
167 |
+
->delete();
|
168 |
+
|
169 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Category was successfully deleted'));
|
170 |
+
$this->_redirect('*/*/');
|
171 |
+
} catch (Exception $e) {
|
172 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
173 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
174 |
+
}
|
175 |
+
}
|
176 |
+
$this->_redirect('*/*/');
|
177 |
+
}
|
178 |
+
|
179 |
+
public function massDeleteAction() {
|
180 |
+
$categoryIds = $this->getRequest()->getParam('category');
|
181 |
+
if (!is_array($categoryIds)) {
|
182 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
183 |
+
} else {
|
184 |
+
try {
|
185 |
+
foreach ($categoryIds as $categoryId) {
|
186 |
+
$newscategory = Mage::getModel('news/newscategory')->load($categoryId);
|
187 |
+
$newscategory->delete();
|
188 |
+
}
|
189 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
190 |
+
Mage::helper('adminhtml')->__(
|
191 |
+
'Total of %d record(s) were successfully deleted', count($categoryIds)
|
192 |
+
)
|
193 |
+
);
|
194 |
+
} catch (Exception $e) {
|
195 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
196 |
+
}
|
197 |
+
}
|
198 |
+
$this->_redirect('*/*/index');
|
199 |
+
}
|
200 |
+
|
201 |
+
public function massStatusAction() {
|
202 |
+
|
203 |
+
$store_id = $this->getRequest()->getParam('store', 0);
|
204 |
+
$categoryIds = $this->getRequest()->getParam('category');
|
205 |
+
if (!is_array($categoryIds)) {
|
206 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
207 |
+
} else {
|
208 |
+
try {
|
209 |
+
foreach ($categoryIds as $categoryId) {
|
210 |
+
$model_text = Mage::getModel('news/newscategorydata');
|
211 |
+
$collection_text = Mage::getModel('news/newscategorydata')->getCollection()->addFieldToFilter('category_id', $categoryId);
|
212 |
+
if ($store_id != 0) {
|
213 |
+
$text_data = $collection_text->addFieldToFilter('store_id', $store_id)->getData();
|
214 |
+
$model_text->setId($text_data[0]['data_id'])->setStoreId($store_id)
|
215 |
+
->setStatus($this->getRequest()->getParam('status'))
|
216 |
+
->setIsMassupdate(true)
|
217 |
+
->save();
|
218 |
+
} else {
|
219 |
+
$text_data = $collection_text->addFieldToFilter('store_id', 0)->getData();
|
220 |
+
$model_text->setId($text_data[0]['data_id'])->setStoreId(0)
|
221 |
+
->setStatus($this->getRequest()->getParam('status'))
|
222 |
+
->setIsMassupdate(true)
|
223 |
+
->save();
|
224 |
+
foreach (Mage::app()->getWebsites() as $website) {
|
225 |
+
foreach ($website->getGroups() as $group) {
|
226 |
+
$stores = $group->getStores();
|
227 |
+
foreach ($stores as $store) {
|
228 |
+
$collection_text = '';
|
229 |
+
$collection_text = Mage::getModel('news/newscategorydata')->getCollection()->addFieldToFilter('category_id', $categoryId);
|
230 |
+
$text_data = $collection_text->addFieldToFilter('store_id', $store->getId())->getData();
|
231 |
+
$model_text->setId($text_data[0]['data_id'])->setStoreId($store->getId())
|
232 |
+
->setStatus($this->getRequest()->getParam('status'))
|
233 |
+
->setIsMassupdate(true)
|
234 |
+
->save();
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
}
|
239 |
+
}
|
240 |
+
$this->_getSession()->addSuccess(
|
241 |
+
$this->__('Total of %d record(s) were successfully updated', count($categoryIds))
|
242 |
+
);
|
243 |
+
} catch (Exception $e) {
|
244 |
+
$this->_getSession()->addError($e->getMessage());
|
245 |
+
}
|
246 |
+
}
|
247 |
+
$this->_redirect('*/*/index', array('store' => $store_id));
|
248 |
+
}
|
249 |
+
|
250 |
+
public function exportCsvAction() {
|
251 |
+
$fileName = 'category.csv';
|
252 |
+
$content = $this->getLayout()->createBlock('news/adminhtml_category_grid')
|
253 |
+
->getCsv();
|
254 |
+
|
255 |
+
$this->_sendUploadResponse($fileName, $content);
|
256 |
+
}
|
257 |
+
|
258 |
+
public function exportXmlAction() {
|
259 |
+
$fileName = 'category.xml';
|
260 |
+
$content = $this->getLayout()->createBlock('news/adminhtml_category_grid')
|
261 |
+
->getXml();
|
262 |
+
|
263 |
+
$this->_sendUploadResponse($fileName, $content);
|
264 |
+
}
|
265 |
+
|
266 |
+
protected function _sendUploadResponse($fileName, $content, $contentType = 'application/octet-stream') {
|
267 |
+
$response = $this->getResponse();
|
268 |
+
$response->setHeader('HTTP/1.1 200 OK', '');
|
269 |
+
$response->setHeader('Pragma', 'public', true);
|
270 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
271 |
+
$response->setHeader('Content-Disposition', 'attachment; filename=' . $fileName);
|
272 |
+
$response->setHeader('Last-Modified', date('r'));
|
273 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
274 |
+
$response->setHeader('Content-Length', strlen($content));
|
275 |
+
$response->setHeader('Content-type', $contentType);
|
276 |
+
$response->setBody($content);
|
277 |
+
$response->sendResponse();
|
278 |
+
die;
|
279 |
+
}
|
280 |
+
|
281 |
+
}
|
app/code/local/Biztech/News/controllers/Adminhtml/NewsController.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class Biztech_News_Adminhtml_NewsController extends Mage_Adminhtml_Controller_action
|
4 |
-
{
|
5 |
|
6 |
protected function _initAction() {
|
7 |
$this->loadLayout()
|
@@ -9,7 +8,7 @@
|
|
9 |
->_addBreadcrumb(Mage::helper('adminhtml')->__('News Manager'), Mage::helper('adminhtml')->__('News Manager'));
|
10 |
|
11 |
return $this;
|
12 |
-
}
|
13 |
|
14 |
public function indexAction() {
|
15 |
$this->_initAction()
|
@@ -18,27 +17,28 @@
|
|
18 |
|
19 |
public function editAction() {
|
20 |
|
21 |
-
$store
|
22 |
-
$id
|
23 |
-
$model
|
24 |
|
25 |
-
$model_text
|
26 |
|
27 |
-
if(count($model_text) == 0)
|
28 |
-
|
29 |
-
$model_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('store_id',0)->addFieldToFilter('news_id',$model->getNewsId())->getData();
|
30 |
}
|
31 |
|
32 |
$text_data = $model_text[0];
|
33 |
$model = $model->setTitle($text_data['title'])
|
34 |
->setNewsContent($text_data['news_content'])
|
35 |
->setStatus($text_data['status'])
|
|
|
36 |
->setIntro($text_data['intro'])
|
37 |
->setDateToPublish($text_data['date_to_publish'])
|
38 |
->setDateToUnpublish($text_data['date_to_unpublish'])
|
39 |
->setBrowserTitle($text_data['browser_title'])
|
40 |
->setSeoKeywords($text_data['seo_keywords'])
|
41 |
-
->setSeoDescription($text_data['seo_description'])
|
|
|
42 |
|
43 |
|
44 |
if ($model->getId() || $id == 0) {
|
@@ -65,7 +65,7 @@
|
|
65 |
$this->renderLayout();
|
66 |
} else {
|
67 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('news')->__('News does not exist'));
|
68 |
-
$this->_redirect('*/*/',array('store'
|
69 |
}
|
70 |
}
|
71 |
|
@@ -76,20 +76,19 @@
|
|
76 |
public function saveAction() {
|
77 |
if ($data = $this->getRequest()->getPost()) {
|
78 |
|
79 |
-
if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
|
80 |
-
try {
|
81 |
|
82 |
$uploader = new Varien_File_Uploader('filename');
|
83 |
|
84 |
-
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
85 |
$uploader->setAllowRenameFiles(false);
|
86 |
|
87 |
|
88 |
$uploader->setFilesDispersion(false);
|
89 |
|
90 |
-
$path = Mage::getBaseDir('media') . DS
|
91 |
-
$uploader->save($path, $_FILES['filename']['name']
|
92 |
-
|
93 |
} catch (Exception $e) {
|
94 |
|
95 |
}
|
@@ -100,21 +99,19 @@
|
|
100 |
try {
|
101 |
$publish_date = Mage::app()->getLocale()->date($data['date_to_publish'], $format, null, false);
|
102 |
$unpublish_date = Mage::app()->getLocale()->date($data['date_to_unpublish'], $format, null, false);
|
103 |
-
}
|
104 |
-
catch (Exception $e)
|
105 |
-
{
|
106 |
Mage::getSingleton('adminhtml/session')->addError("Invalid Date");
|
107 |
-
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'),'store'
|
108 |
-
return;
|
109 |
}
|
110 |
|
111 |
-
|
112 |
$data['date_to_unpublish'] = date('Y-m-d H:i:s', strtotime($data['date_to_unpublish']));
|
113 |
-
$model = Mage::getModel('news/news');
|
114 |
$model->setData($data)
|
115 |
->setId($this->getRequest()->getParam('id'));
|
116 |
-
|
117 |
-
|
118 |
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
119 |
$model->setCreatedTime(now())
|
120 |
->setUpdateTime(now());
|
@@ -122,34 +119,60 @@
|
|
122 |
$model->setUpdateTime(now());
|
123 |
}
|
124 |
|
125 |
-
|
126 |
$model->save();
|
127 |
|
128 |
$model_text = Mage::getModel('news/newsdata');
|
129 |
|
130 |
-
$collection_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id'
|
|
|
|
|
131 |
|
132 |
-
|
|
|
|
|
|
|
|
|
133 |
|
134 |
-
|
|
|
|
|
|
|
|
|
135 |
$model_text->save();
|
136 |
foreach (Mage::app()->getWebsites() as $website) {
|
137 |
foreach ($website->getGroups() as $group) {
|
138 |
$stores = $group->getStores();
|
139 |
foreach ($stores as $store) {
|
140 |
-
$model_text->setData($data)->setNewsId($model->getNewsId())->setStoreId($store->getId());
|
141 |
$model_text->save();
|
142 |
-
|
143 |
}
|
144 |
}
|
145 |
}
|
146 |
-
}else{
|
147 |
|
148 |
-
if($data['store_id'] == 0){
|
149 |
-
$text_data = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id'
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
-
$model_text->setData($data)->setNewsId($model->getNewsId())->setTextId($text_data[0]['text_id'])->setStoreId($data['store_id']);
|
153 |
$model_text->save();
|
154 |
foreach (Mage::app()->getWebsites() as $website) {
|
155 |
foreach ($website->getGroups() as $group) {
|
@@ -157,17 +180,27 @@
|
|
157 |
foreach ($stores as $store) {
|
158 |
$collection_text = '';
|
159 |
$text_data = '';
|
160 |
-
$collection_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id'
|
161 |
-
$text_data = $collection_text->addFieldToFilter('store_id'
|
162 |
-
$model_text->setData($data)->setNewsId($model->getNewsId())->setTextId($text_data[0]['text_id'])->setStoreId($store->getId());
|
163 |
$model_text->save();
|
164 |
}
|
165 |
}
|
166 |
}
|
|
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
$model_text->save();
|
172 |
}
|
173 |
}
|
@@ -179,22 +212,22 @@
|
|
179 |
->setUpdateTime(now());
|
180 |
} else {
|
181 |
$model->setUpdateTime(now());
|
182 |
-
}
|
183 |
|
184 |
$model->save();
|
185 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('news')->__('News was successfully saved'));
|
186 |
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
187 |
|
188 |
if ($this->getRequest()->getParam('back')) {
|
189 |
-
$this->_redirect('*/*/edit', array('id' => $model->getId(),'store'
|
190 |
return;
|
191 |
}
|
192 |
-
$this->_redirect('*/*/',array('store'
|
193 |
return;
|
194 |
} catch (Exception $e) {
|
195 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
196 |
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
197 |
-
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'),'store'
|
198 |
return;
|
199 |
}
|
200 |
}
|
@@ -203,7 +236,7 @@
|
|
203 |
}
|
204 |
|
205 |
public function deleteAction() {
|
206 |
-
if(
|
207 |
try {
|
208 |
$model = Mage::getModel('news/news');
|
209 |
|
@@ -222,7 +255,7 @@
|
|
222 |
|
223 |
public function massDeleteAction() {
|
224 |
$newsIds = $this->getRequest()->getParam('news');
|
225 |
-
if(!is_array($newsIds)) {
|
226 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
227 |
} else {
|
228 |
try {
|
@@ -242,26 +275,24 @@
|
|
242 |
$this->_redirect('*/*/index');
|
243 |
}
|
244 |
|
245 |
-
public function massStatusAction()
|
246 |
-
|
247 |
-
$store_id = $this->getRequest()->getParam('store', 0);
|
248 |
$newsIds = $this->getRequest()->getParam('news');
|
249 |
-
if(!is_array($newsIds)) {
|
250 |
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
251 |
} else {
|
252 |
try {
|
253 |
foreach ($newsIds as $newsId) {
|
254 |
$model_text = Mage::getModel('news/newsdata');
|
255 |
-
$collection_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id'
|
256 |
-
if($store_id != 0){
|
257 |
-
$text_data = $collection_text->addFieldToFilter('store_id'
|
258 |
$model_text->setTextId($text_data[0]['text_id'])->setStoreId($store_id)
|
259 |
->setStatus($this->getRequest()->getParam('status'))
|
260 |
->setIsMassupdate(true)
|
261 |
->save();
|
262 |
-
}else
|
263 |
-
|
264 |
-
$text_data = $collection_text->addFieldToFilter('store_id',0)->getData();
|
265 |
$model_text->setTextId($text_data[0]['text_id'])->setStoreId(0)
|
266 |
->setStatus($this->getRequest()->getParam('status'))
|
267 |
->setIsMassupdate(true)
|
@@ -271,8 +302,8 @@
|
|
271 |
$stores = $group->getStores();
|
272 |
foreach ($stores as $store) {
|
273 |
$collection_text = '';
|
274 |
-
$collection_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id'
|
275 |
-
$text_data = $collection_text->addFieldToFilter('store_id'
|
276 |
$model_text->setTextId($text_data[0]['text_id'])->setStoreId($store->getId())
|
277 |
->setStatus($this->getRequest()->getParam('status'))
|
278 |
->setIsMassupdate(true)
|
@@ -281,7 +312,6 @@
|
|
281 |
}
|
282 |
}
|
283 |
}
|
284 |
-
|
285 |
}
|
286 |
$this->_getSession()->addSuccess(
|
287 |
$this->__('Total of %d record(s) were successfully updated', count($newsIds))
|
@@ -290,34 +320,31 @@
|
|
290 |
$this->_getSession()->addError($e->getMessage());
|
291 |
}
|
292 |
}
|
293 |
-
$this->_redirect('*/*/index',array('store'
|
294 |
}
|
295 |
|
296 |
-
public function exportCsvAction()
|
297 |
-
|
298 |
-
$
|
299 |
-
$content = $this->getLayout()->createBlock('news/adminhtml_news_grid')
|
300 |
->getCsv();
|
301 |
|
302 |
$this->_sendUploadResponse($fileName, $content);
|
303 |
}
|
304 |
|
305 |
-
public function exportXmlAction()
|
306 |
-
|
307 |
-
$
|
308 |
-
$content = $this->getLayout()->createBlock('news/adminhtml_news_grid')
|
309 |
->getXml();
|
310 |
|
311 |
$this->_sendUploadResponse($fileName, $content);
|
312 |
}
|
313 |
|
314 |
-
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
|
315 |
-
{
|
316 |
$response = $this->getResponse();
|
317 |
-
$response->setHeader('HTTP/1.1 200 OK','');
|
318 |
$response->setHeader('Pragma', 'public', true);
|
319 |
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
320 |
-
$response->setHeader('Content-Disposition', 'attachment; filename='
|
321 |
$response->setHeader('Last-Modified', date('r'));
|
322 |
$response->setHeader('Accept-Ranges', 'bytes');
|
323 |
$response->setHeader('Content-Length', strlen($content));
|
@@ -326,4 +353,48 @@
|
|
326 |
$response->sendResponse();
|
327 |
die;
|
328 |
}
|
329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
class Biztech_News_Adminhtml_NewsController extends Mage_Adminhtml_Controller_action {
|
|
|
4 |
|
5 |
protected function _initAction() {
|
6 |
$this->loadLayout()
|
8 |
->_addBreadcrumb(Mage::helper('adminhtml')->__('News Manager'), Mage::helper('adminhtml')->__('News Manager'));
|
9 |
|
10 |
return $this;
|
11 |
+
}
|
12 |
|
13 |
public function indexAction() {
|
14 |
$this->_initAction()
|
17 |
|
18 |
public function editAction() {
|
19 |
|
20 |
+
$store = $this->getRequest()->getParam('store', 0);
|
21 |
+
$id = $this->getRequest()->getParam('id');
|
22 |
+
$model = Mage::getModel('news/news')->load($id);
|
23 |
|
24 |
+
$model_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('store_id', $store)->addFieldToFilter('news_id', $model->getNewsId())->getData();
|
25 |
|
26 |
+
if (count($model_text) == 0) {
|
27 |
+
$model_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('store_id', 0)->addFieldToFilter('news_id', $model->getNewsId())->getData();
|
|
|
28 |
}
|
29 |
|
30 |
$text_data = $model_text[0];
|
31 |
$model = $model->setTitle($text_data['title'])
|
32 |
->setNewsContent($text_data['news_content'])
|
33 |
->setStatus($text_data['status'])
|
34 |
+
->setEnableTicker($text_data['enable_ticker'])
|
35 |
->setIntro($text_data['intro'])
|
36 |
->setDateToPublish($text_data['date_to_publish'])
|
37 |
->setDateToUnpublish($text_data['date_to_unpublish'])
|
38 |
->setBrowserTitle($text_data['browser_title'])
|
39 |
->setSeoKeywords($text_data['seo_keywords'])
|
40 |
+
->setSeoDescription($text_data['seo_description'])
|
41 |
+
->setCategoryId($text_data['category_id']);
|
42 |
|
43 |
|
44 |
if ($model->getId() || $id == 0) {
|
65 |
$this->renderLayout();
|
66 |
} else {
|
67 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('news')->__('News does not exist'));
|
68 |
+
$this->_redirect('*/*/', array('store' => $store));
|
69 |
}
|
70 |
}
|
71 |
|
76 |
public function saveAction() {
|
77 |
if ($data = $this->getRequest()->getPost()) {
|
78 |
|
79 |
+
if (isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
|
80 |
+
try {
|
81 |
|
82 |
$uploader = new Varien_File_Uploader('filename');
|
83 |
|
84 |
+
$uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png'));
|
85 |
$uploader->setAllowRenameFiles(false);
|
86 |
|
87 |
|
88 |
$uploader->setFilesDispersion(false);
|
89 |
|
90 |
+
$path = Mage::getBaseDir('media') . DS;
|
91 |
+
$uploader->save($path, $_FILES['filename']['name']);
|
|
|
92 |
} catch (Exception $e) {
|
93 |
|
94 |
}
|
99 |
try {
|
100 |
$publish_date = Mage::app()->getLocale()->date($data['date_to_publish'], $format, null, false);
|
101 |
$unpublish_date = Mage::app()->getLocale()->date($data['date_to_unpublish'], $format, null, false);
|
102 |
+
} catch (Exception $e) {
|
|
|
|
|
103 |
Mage::getSingleton('adminhtml/session')->addError("Invalid Date");
|
104 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'), 'store' => $data['store_id']));
|
105 |
+
return;
|
106 |
}
|
107 |
|
108 |
+
$data['date_to_publish'] = date('Y-m-d H:i:s', strtotime($data['date_to_publish']));
|
109 |
$data['date_to_unpublish'] = date('Y-m-d H:i:s', strtotime($data['date_to_unpublish']));
|
110 |
+
$model = Mage::getModel('news/news');
|
111 |
$model->setData($data)
|
112 |
->setId($this->getRequest()->getParam('id'));
|
113 |
+
|
114 |
+
|
115 |
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
116 |
$model->setCreatedTime(now())
|
117 |
->setUpdateTime(now());
|
119 |
$model->setUpdateTime(now());
|
120 |
}
|
121 |
|
122 |
+
|
123 |
$model->save();
|
124 |
|
125 |
$model_text = Mage::getModel('news/newsdata');
|
126 |
|
127 |
+
$collection_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id', $model->getNewsId());
|
128 |
+
|
129 |
+
if (!$this->getRequest()->getParam('id')) {
|
130 |
|
131 |
+
|
132 |
+
if (!empty($data['links']['related_news'])) {
|
133 |
+
$related_news= Mage::helper('adminhtml/js')->decodeGridSerializedInput($data['links']['related_news']);
|
134 |
+
$related_news = implode(",", array_unique($related_news));
|
135 |
+
}
|
136 |
|
137 |
+
if(isset($data['category_id']))
|
138 |
+
{
|
139 |
+
$category_id = implode(",", array_unique($data['category_id']));
|
140 |
+
}
|
141 |
+
$model_text->setData($data)->setNewsId($model->getNewsId())->setStoreId(0)->setRelatedNews($related_news)->setCategoryId($category_id)->setEnableTicker($data['enable_ticker']);
|
142 |
$model_text->save();
|
143 |
foreach (Mage::app()->getWebsites() as $website) {
|
144 |
foreach ($website->getGroups() as $group) {
|
145 |
$stores = $group->getStores();
|
146 |
foreach ($stores as $store) {
|
147 |
+
$model_text->setData($data)->setNewsId($model->getNewsId())->setStoreId($store->getId())->setRelatedNews($related_news)->setCategoryId($category_id)->setEnableTicker($data['enable_ticker']);
|
148 |
$model_text->save();
|
|
|
149 |
}
|
150 |
}
|
151 |
}
|
152 |
+
} else {
|
153 |
|
154 |
+
if ($data['store_id'] == 0) {
|
155 |
+
$text_data = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id', $model->getNewsId())->addFieldToFilter('store_id', $data['store_id'])->getData();
|
156 |
|
157 |
+
|
158 |
+
if (isset($data['links'])) {
|
159 |
+
$related_news = Mage::helper('adminhtml/js')->decodeGridSerializedInput($data['links']['related_news']);
|
160 |
+
}
|
161 |
+
$related_news = implode(",", array_unique($related_news));
|
162 |
+
if (count($related_news) < 1) {
|
163 |
+
$related_news = $text_data[0]['related_news'];
|
164 |
+
}
|
165 |
+
|
166 |
+
if(isset($data['category_id']))
|
167 |
+
{
|
168 |
+
$category_id = implode(",", array_unique($data['category_id']));
|
169 |
+
}
|
170 |
+
else
|
171 |
+
{
|
172 |
+
$category_id = $text_data[0]['category_id'];
|
173 |
+
}
|
174 |
|
175 |
+
$model_text->setData($data)->setNewsId($model->getNewsId())->setTextId($text_data[0]['text_id'])->setStoreId($data['store_id'])->setRelatedNews($related_news)->setCategoryId($category_id)->setEnableTicker($data['enable_ticker']);
|
176 |
$model_text->save();
|
177 |
foreach (Mage::app()->getWebsites() as $website) {
|
178 |
foreach ($website->getGroups() as $group) {
|
180 |
foreach ($stores as $store) {
|
181 |
$collection_text = '';
|
182 |
$text_data = '';
|
183 |
+
$collection_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id', $model->getNewsId());
|
184 |
+
$text_data = $collection_text->addFieldToFilter('store_id', $store->getId())->getData();
|
185 |
+
$model_text->setData($data)->setNewsId($model->getNewsId())->setTextId($text_data[0]['text_id'])->setStoreId($store->getId())->setRelatedNews($related_news)->setCategoryId($category_id)->setEnableTicker($data['enable_ticker']);
|
186 |
$model_text->save();
|
187 |
}
|
188 |
}
|
189 |
}
|
190 |
+
} else {
|
191 |
|
192 |
+
if (isset($data['related_news'])) {
|
193 |
+
if (is_array($data['related_news'])) {
|
194 |
+
$related_news = implode(",", array_unique($data['related_news']));
|
195 |
+
} else {
|
196 |
+
$related_news = '';
|
197 |
+
}
|
198 |
+
} else {
|
199 |
+
$related_news = $text_data[0]['related_news'];
|
200 |
+
}
|
201 |
+
|
202 |
+
$text_data = $collection_text->addFieldToFilter('store_id', $data['store_id'])->getData();
|
203 |
+
$model_text->setData($data)->setNewsId($model->getNewsId())->setTextId($text_data[0]['text_id'])->setStoreId($data['store_id'])->setRelatedNews($related_news)->setCategoryId($category_id)->setEnableTicker($data['enable_ticker']);
|
204 |
$model_text->save();
|
205 |
}
|
206 |
}
|
212 |
->setUpdateTime(now());
|
213 |
} else {
|
214 |
$model->setUpdateTime(now());
|
215 |
+
}
|
216 |
|
217 |
$model->save();
|
218 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('news')->__('News was successfully saved'));
|
219 |
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
220 |
|
221 |
if ($this->getRequest()->getParam('back')) {
|
222 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId(), 'store' => $data['store_id']));
|
223 |
return;
|
224 |
}
|
225 |
+
$this->_redirect('*/*/', array('store' => $data['store_id']));
|
226 |
return;
|
227 |
} catch (Exception $e) {
|
228 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
229 |
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
230 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'), 'store' => $data['store_id']));
|
231 |
return;
|
232 |
}
|
233 |
}
|
236 |
}
|
237 |
|
238 |
public function deleteAction() {
|
239 |
+
if ($this->getRequest()->getParam('id') > 0) {
|
240 |
try {
|
241 |
$model = Mage::getModel('news/news');
|
242 |
|
255 |
|
256 |
public function massDeleteAction() {
|
257 |
$newsIds = $this->getRequest()->getParam('news');
|
258 |
+
if (!is_array($newsIds)) {
|
259 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
260 |
} else {
|
261 |
try {
|
275 |
$this->_redirect('*/*/index');
|
276 |
}
|
277 |
|
278 |
+
public function massStatusAction() {
|
279 |
+
$store_id = $this->getRequest()->getParam('store', 0);
|
|
|
280 |
$newsIds = $this->getRequest()->getParam('news');
|
281 |
+
if (!is_array($newsIds)) {
|
282 |
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
283 |
} else {
|
284 |
try {
|
285 |
foreach ($newsIds as $newsId) {
|
286 |
$model_text = Mage::getModel('news/newsdata');
|
287 |
+
$collection_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id', $newsId);
|
288 |
+
if ($store_id != 0) {
|
289 |
+
$text_data = $collection_text->addFieldToFilter('store_id', $store_id)->getData();
|
290 |
$model_text->setTextId($text_data[0]['text_id'])->setStoreId($store_id)
|
291 |
->setStatus($this->getRequest()->getParam('status'))
|
292 |
->setIsMassupdate(true)
|
293 |
->save();
|
294 |
+
} else {
|
295 |
+
$text_data = $collection_text->addFieldToFilter('store_id', 0)->getData();
|
|
|
296 |
$model_text->setTextId($text_data[0]['text_id'])->setStoreId(0)
|
297 |
->setStatus($this->getRequest()->getParam('status'))
|
298 |
->setIsMassupdate(true)
|
302 |
$stores = $group->getStores();
|
303 |
foreach ($stores as $store) {
|
304 |
$collection_text = '';
|
305 |
+
$collection_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('news_id', $newsId);
|
306 |
+
$text_data = $collection_text->addFieldToFilter('store_id', $store->getId())->getData();
|
307 |
$model_text->setTextId($text_data[0]['text_id'])->setStoreId($store->getId())
|
308 |
->setStatus($this->getRequest()->getParam('status'))
|
309 |
->setIsMassupdate(true)
|
312 |
}
|
313 |
}
|
314 |
}
|
|
|
315 |
}
|
316 |
$this->_getSession()->addSuccess(
|
317 |
$this->__('Total of %d record(s) were successfully updated', count($newsIds))
|
320 |
$this->_getSession()->addError($e->getMessage());
|
321 |
}
|
322 |
}
|
323 |
+
$this->_redirect('*/*/index', array('store' => $store_id));
|
324 |
}
|
325 |
|
326 |
+
public function exportCsvAction() {
|
327 |
+
$fileName = 'news.csv';
|
328 |
+
$content = $this->getLayout()->createBlock('news/adminhtml_news_grid')
|
|
|
329 |
->getCsv();
|
330 |
|
331 |
$this->_sendUploadResponse($fileName, $content);
|
332 |
}
|
333 |
|
334 |
+
public function exportXmlAction() {
|
335 |
+
$fileName = 'news.xml';
|
336 |
+
$content = $this->getLayout()->createBlock('news/adminhtml_news_grid')
|
|
|
337 |
->getXml();
|
338 |
|
339 |
$this->_sendUploadResponse($fileName, $content);
|
340 |
}
|
341 |
|
342 |
+
protected function _sendUploadResponse($fileName, $content, $contentType = 'application/octet-stream') {
|
|
|
343 |
$response = $this->getResponse();
|
344 |
+
$response->setHeader('HTTP/1.1 200 OK', '');
|
345 |
$response->setHeader('Pragma', 'public', true);
|
346 |
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
347 |
+
$response->setHeader('Content-Disposition', 'attachment; filename=' . $fileName);
|
348 |
$response->setHeader('Last-Modified', date('r'));
|
349 |
$response->setHeader('Accept-Ranges', 'bytes');
|
350 |
$response->setHeader('Content-Length', strlen($content));
|
353 |
$response->sendResponse();
|
354 |
die;
|
355 |
}
|
356 |
+
|
357 |
+
protected function _initNews($getRootInstead = false) {
|
358 |
+
$newsId = (int) $this->getRequest()->getParam('id', false);
|
359 |
+
$news = Mage::getModel('news/news');
|
360 |
+
|
361 |
+
if ($newsId) {
|
362 |
+
$news->load($newsId);
|
363 |
+
}
|
364 |
+
Mage::register('news', $news);
|
365 |
+
Mage::register('current_news', $news);
|
366 |
+
return $news;
|
367 |
+
|
368 |
+
}
|
369 |
+
public function gridAction() {
|
370 |
+
|
371 |
+
if (!$category = $this->_initNews(true)) {
|
372 |
+
return;
|
373 |
+
}
|
374 |
+
|
375 |
+
$this->loadLayout();
|
376 |
+
$news = $this->getRequest()->getPost('related_news');
|
377 |
+
$related_news = Mage::getModel('news/newsdata')->getCollection()
|
378 |
+
->addFieldToFilter('news_id', (int) $this->getRequest()->getParam('id'))
|
379 |
+
->addFieldToFilter('store_id', (int) $this->getRequest()->getParam('store'))
|
380 |
+
->getFirstItem()
|
381 |
+
->getData();
|
382 |
+
|
383 |
+
|
384 |
+
$sel_news = explode(",", $related_news['related_news']);
|
385 |
+
if (!is_null($news)) {
|
386 |
+
$sel_news = array_merge($news, $sel_news);
|
387 |
+
}
|
388 |
+
|
389 |
+
$this->getLayout()->getBlock('related.grid')
|
390 |
+
->setRelatedNews($sel_news);
|
391 |
+
$this->renderLayout();
|
392 |
+
}
|
393 |
+
public function productAction() {
|
394 |
+
|
395 |
+
$this->loadLayout();
|
396 |
+
$this->getLayout()->getBlock('related.grid')->setRelatedNews($this->getRequest()->getPost('related_news', null));
|
397 |
+
$this->renderLayout();
|
398 |
+
}
|
399 |
+
|
400 |
+
}
|
app/code/local/Biztech/News/controllers/IndexController.php
CHANGED
@@ -4,11 +4,6 @@
|
|
4 |
public function indexAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
-
|
8 |
-
$root = $this->getLayout()->getBlock('root');
|
9 |
-
$template = Mage::getStoreConfig('news/news_general/news_list_page_layout');
|
10 |
-
$root->setTemplate($template);
|
11 |
-
|
12 |
$this->renderLayout();
|
13 |
}
|
14 |
|
@@ -26,7 +21,7 @@
|
|
26 |
$root->setTemplate($template);
|
27 |
|
28 |
$store = Mage::app()->getStore()->getId();
|
29 |
-
|
30 |
|
31 |
if($news[0]['browser_title'] != "")
|
32 |
$this->getLayout()->getBlock('head')->setTitle($news[0]['browser_title']);
|
4 |
public function indexAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
|
|
|
|
|
|
|
|
|
|
7 |
$this->renderLayout();
|
8 |
}
|
9 |
|
21 |
$root->setTemplate($template);
|
22 |
|
23 |
$store = Mage::app()->getStore()->getId();
|
24 |
+
$news = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('store_id',$store)->addFieldToFilter('news_id',$id)->getData();
|
25 |
|
26 |
if($news[0]['browser_title'] != "")
|
27 |
$this->getLayout()->getBlock('head')->setTitle($news[0]['browser_title']);
|
app/code/local/Biztech/News/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Biztech_News>
|
5 |
-
<version>0.1.
|
6 |
</Biztech_News>
|
7 |
</modules>
|
8 |
<frontend>
|
@@ -54,6 +54,11 @@
|
|
54 |
<sort_order>0</sort_order>
|
55 |
<action>news/adminhtml_news</action>
|
56 |
</items>
|
|
|
|
|
|
|
|
|
|
|
57 |
</children>
|
58 |
</news>
|
59 |
</menu>
|
@@ -115,6 +120,12 @@
|
|
115 |
<newsdata>
|
116 |
<table>news_data</table>
|
117 |
</newsdata>
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
</entities>
|
119 |
</news_mysql4>
|
120 |
</models>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Biztech_News>
|
5 |
+
<version>0.1.3</version>
|
6 |
</Biztech_News>
|
7 |
</modules>
|
8 |
<frontend>
|
54 |
<sort_order>0</sort_order>
|
55 |
<action>news/adminhtml_news</action>
|
56 |
</items>
|
57 |
+
<category module="news">
|
58 |
+
<title>Manage Category</title>
|
59 |
+
<sort_order>1</sort_order>
|
60 |
+
<action>news/adminhtml_category</action>
|
61 |
+
</category>
|
62 |
</children>
|
63 |
</news>
|
64 |
</menu>
|
120 |
<newsdata>
|
121 |
<table>news_data</table>
|
122 |
</newsdata>
|
123 |
+
<newscategory>
|
124 |
+
<table>news_category</table>
|
125 |
+
</newscategory>
|
126 |
+
<newscategorydata>
|
127 |
+
<table>news_category_data</table>
|
128 |
+
</newscategorydata>
|
129 |
</entities>
|
130 |
</news_mysql4>
|
131 |
</models>
|
app/code/local/Biztech/News/etc/system.xml
CHANGED
@@ -34,35 +34,18 @@
|
|
34 |
<show_in_store>1</show_in_store>
|
35 |
<comment>Select Yes to enable this feature.</comment>
|
36 |
</enabled>
|
37 |
-
|
38 |
-
|
39 |
-
<frontend_type>select</frontend_type>
|
40 |
-
<source_model>Biztech_News_Block_Adminhtml_Model_System_Config_Source_PageLayout</source_model>
|
41 |
-
<sort_order>2</sort_order>
|
42 |
-
<show_in_default>1</show_in_default>
|
43 |
-
<show_in_website>1</show_in_website>
|
44 |
-
<show_in_store>1</show_in_store>
|
45 |
-
<comment>Choose page layout for news list page.</comment>
|
46 |
-
</news_list_page_layout>
|
47 |
-
<news_detail_page_layout translate="label">
|
48 |
<label>Page Layout for detail page</label>
|
49 |
<frontend_type>select</frontend_type>
|
50 |
<source_model>Biztech_News_Block_Adminhtml_Model_System_Config_Source_PageLayout</source_model>
|
51 |
-
<sort_order>
|
52 |
<show_in_default>1</show_in_default>
|
53 |
<show_in_website>1</show_in_website>
|
54 |
<show_in_store>1</show_in_store>
|
55 |
<comment>Choose page layout for news detail page.</comment>
|
56 |
</news_detail_page_layout>
|
57 |
-
|
58 |
-
<label>Show link in Top-links</label>
|
59 |
-
<frontend_type>select</frontend_type>
|
60 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
61 |
-
<sort_order>4</sort_order>
|
62 |
-
<show_in_default>1</show_in_default>
|
63 |
-
<show_in_website>1</show_in_website>
|
64 |
-
<show_in_store>1</show_in_store>
|
65 |
-
</news_show_toplink>
|
66 |
<news_show_left_column translate="label">
|
67 |
<label>Show News in Left Column</label>
|
68 |
<frontend_type>select</frontend_type>
|
@@ -82,15 +65,25 @@
|
|
82 |
<show_in_website>1</show_in_website>
|
83 |
<show_in_store>1</show_in_store>
|
84 |
</news_show_right_column>
|
85 |
-
<
|
86 |
-
<label>News
|
87 |
-
<frontend_type>
|
|
|
88 |
<sort_order>7</sort_order>
|
89 |
<show_in_default>1</show_in_default>
|
90 |
<show_in_website>1</show_in_website>
|
91 |
<show_in_store>1</show_in_store>
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
</fields>
|
95 |
</news_general>
|
96 |
</groups>
|
34 |
<show_in_store>1</show_in_store>
|
35 |
<comment>Select Yes to enable this feature.</comment>
|
36 |
</enabled>
|
37 |
+
|
38 |
+
<news_detail_page_layout translate="label">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
<label>Page Layout for detail page</label>
|
40 |
<frontend_type>select</frontend_type>
|
41 |
<source_model>Biztech_News_Block_Adminhtml_Model_System_Config_Source_PageLayout</source_model>
|
42 |
+
<sort_order>4</sort_order>
|
43 |
<show_in_default>1</show_in_default>
|
44 |
<show_in_website>1</show_in_website>
|
45 |
<show_in_store>1</show_in_store>
|
46 |
<comment>Choose page layout for news detail page.</comment>
|
47 |
</news_detail_page_layout>
|
48 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
<news_show_left_column translate="label">
|
50 |
<label>Show News in Left Column</label>
|
51 |
<frontend_type>select</frontend_type>
|
65 |
<show_in_website>1</show_in_website>
|
66 |
<show_in_store>1</show_in_store>
|
67 |
</news_show_right_column>
|
68 |
+
<share_on_socialmedia translate="label">
|
69 |
+
<label>Share News On Social Media</label>
|
70 |
+
<frontend_type>select</frontend_type>
|
71 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
72 |
<sort_order>7</sort_order>
|
73 |
<show_in_default>1</show_in_default>
|
74 |
<show_in_website>1</show_in_website>
|
75 |
<show_in_store>1</show_in_store>
|
76 |
+
</share_on_socialmedia>
|
77 |
+
<enabled_ticker translate="label">
|
78 |
+
<label>Enable News Ticker</label>
|
79 |
+
<frontend_type>select</frontend_type>
|
80 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
81 |
+
<sort_order>9</sort_order>
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<show_in_store>1</show_in_store>
|
85 |
+
<comment>Select Yes to enable this feature.</comment>
|
86 |
+
</enabled_ticker>
|
87 |
</fields>
|
88 |
</news_general>
|
89 |
</groups>
|
app/code/local/Biztech/News/sql/news_setup/mysql4-data-upgrade-0.1.1-0.1.2.php
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
`title` varchar(255) NOT NULL default '',
|
15 |
`news_content` text NOT NULL default '',
|
16 |
`status` smallint(6) NOT NULL default '0',
|
|
|
17 |
`intro` text NOT NULL default '',
|
18 |
`date_to_publish` datetime NULL,
|
19 |
`date_to_unpublish` datetime NULL,
|
14 |
`title` varchar(255) NOT NULL default '',
|
15 |
`news_content` text NOT NULL default '',
|
16 |
`status` smallint(6) NOT NULL default '0',
|
17 |
+
`enable_ticker` smallint(6) NOT NULL default '0',
|
18 |
`intro` text NOT NULL default '',
|
19 |
`date_to_publish` datetime NULL,
|
20 |
`date_to_unpublish` datetime NULL,
|
app/code/local/Biztech/News/sql/news_setup/mysql4-data-upgrade-0.1.2-0.1.3.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
|
9 |
+
ALTER TABLE `{$this->getTable('news_data')}` ADD `related_news` VARCHAR(255) NOT NULL default '';
|
10 |
+
|
11 |
+
ALTER TABLE `{$this->getTable('news_data')}` ADD `category_id` VARCHAR(255) NOT NULL default '';
|
12 |
+
|
13 |
+
|
14 |
+
-- DROP TABLE IF EXISTS {$this->getTable('news_category')};
|
15 |
+
CREATE TABLE {$this->getTable('news_category')} (
|
16 |
+
`category_id` int(11) unsigned NOT NULL auto_increment,
|
17 |
+
PRIMARY KEY (`category_id`)
|
18 |
+
) ENGINE=InnoDB;
|
19 |
+
|
20 |
+
|
21 |
+
-- DROP TABLE IF EXISTS {$this->getTable('news_category_data')};
|
22 |
+
CREATE TABLE {$this->getTable('news_category_data')} (
|
23 |
+
`data_id` int(11) unsigned NOT NULL auto_increment,
|
24 |
+
`category_id` int(11) unsigned NOT NULL ,
|
25 |
+
`store_id` int(11) NOT NULL default '0',
|
26 |
+
`name` varchar(255) NOT NULL default '',
|
27 |
+
`enable_ticker` smallint(6) NOT NULL default '0',
|
28 |
+
`add_to_pages` varchar(255) NOT NULL default '',
|
29 |
+
`status` smallint(6) NOT NULL default '0',
|
30 |
+
PRIMARY KEY (`data_id`)
|
31 |
+
) ENGINE=InnoDB;
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
ALTER TABLE `{$this->getTable('news_category_data')}` ADD INDEX ( `category_id` );
|
36 |
+
|
37 |
+
ALTER TABLE `{$this->getTable('news_category_data')}` ADD FOREIGN KEY ( `category_id` ) REFERENCES `{$this->getTable('news_category')}` (`category_id`) ON DELETE CASCADE ON UPDATE CASCADE ;
|
38 |
+
|
39 |
+
");
|
40 |
+
|
41 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/news.xml
CHANGED
@@ -1,14 +1,52 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
|
|
3 |
<news_adminhtml_news_index>
|
4 |
<reference name="content">
|
5 |
-
|
6 |
-
<action method="setUseConfirm"
|
|
|
|
|
7 |
</block>
|
8 |
<block type="news/adminhtml_news" name="news" />
|
9 |
</reference>
|
10 |
</news_adminhtml_news_index>
|
|
|
11 |
<news_adminhtml_news_edit>
|
12 |
<update handle="editor" />
|
13 |
</news_adminhtml_news_edit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</layout>
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
+
|
4 |
<news_adminhtml_news_index>
|
5 |
<reference name="content">
|
6 |
+
<block type="adminhtml/store_switcher" name="store_switcher" as="store_switcher">
|
7 |
+
<action method="setUseConfirm">
|
8 |
+
<params>0</params>
|
9 |
+
</action>
|
10 |
</block>
|
11 |
<block type="news/adminhtml_news" name="news" />
|
12 |
</reference>
|
13 |
</news_adminhtml_news_index>
|
14 |
+
|
15 |
<news_adminhtml_news_edit>
|
16 |
<update handle="editor" />
|
17 |
</news_adminhtml_news_edit>
|
18 |
+
|
19 |
+
|
20 |
+
<news_adminhtml_category_index>
|
21 |
+
<reference name="content">
|
22 |
+
<block type="adminhtml/store_switcher" name="store_switcher" as="store_switcher">
|
23 |
+
<action method="setUseConfirm">
|
24 |
+
<params>0</params>
|
25 |
+
</action>
|
26 |
+
</block>
|
27 |
+
<block type="news/adminhtml_category" name="category" />
|
28 |
+
</reference>
|
29 |
+
</news_adminhtml_category_index>
|
30 |
+
|
31 |
+
<news_adminhtml_news_product>
|
32 |
+
<block type="core/text_list" name="root" output="toHtml">
|
33 |
+
<block type="news/adminhtml_news_edit_tab_related" name="related.grid"/>
|
34 |
+
<block type="adminhtml/widget_grid_serializer" name="grid_serializer">
|
35 |
+
<reference name="grid_serializer">
|
36 |
+
<action method="initSerializerBlock">
|
37 |
+
<grid_block_name>related.grid</grid_block_name>
|
38 |
+
<data_callback>getRelNews</data_callback>
|
39 |
+
<hidden_input_name>links[related_news]</hidden_input_name>
|
40 |
+
<reload_param_name>related_news</reload_param_name>
|
41 |
+
</action>
|
42 |
+
</reference>
|
43 |
+
</block>
|
44 |
+
</block>
|
45 |
+
</news_adminhtml_news_product>
|
46 |
+
|
47 |
+
<news_adminhtml_news_grid>
|
48 |
+
<block type="core/text_list" name="root" output="toHtml">
|
49 |
+
<block type="news/adminhtml_news_edit_tab_related" name="related.grid"/>
|
50 |
+
</block>
|
51 |
+
</news_adminhtml_news_grid>
|
52 |
</layout>
|
app/design/frontend/default/default/layout/news.xml
CHANGED
@@ -3,17 +3,28 @@
|
|
3 |
|
4 |
<default>
|
5 |
<reference name="head">
|
6 |
-
<action method="addItem"
|
|
|
|
|
|
|
|
|
7 |
</reference>
|
8 |
<reference name="top.links">
|
9 |
-
<action method="addLink" translate="label title" module="news" ifconfig="news/news_general/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
</reference>
|
11 |
<reference name="left">
|
12 |
<block type="news/news" name="news_left_column" after="-" >
|
13 |
<action method="setTemplate" ifconfig="news/news_general/news_show_left_column">
|
14 |
<template>news/news_column.phtml</template>
|
15 |
</action>
|
16 |
-
</block>
|
17 |
</reference>
|
18 |
<reference name="right">
|
19 |
<block type="news/news" name="news_right_column" after="-" >
|
@@ -23,28 +34,74 @@
|
|
23 |
</block>
|
24 |
</reference>
|
25 |
</default>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
<news_index_index>
|
27 |
<reference name="root">
|
28 |
-
<action method="setTemplate"
|
|
|
|
|
29 |
</reference>
|
30 |
-
<reference name="
|
31 |
-
<
|
|
|
|
|
32 |
</reference>
|
33 |
<reference name="left">
|
34 |
<remove name="news_left_column"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
</reference>
|
36 |
<reference name="right">
|
37 |
<remove name="news_right_column"/>
|
38 |
</reference>
|
39 |
-
|
|
|
|
|
40 |
</news_index_index>
|
41 |
|
42 |
<news_index_view>
|
43 |
<reference name="root">
|
44 |
-
<action method="setTemplate"
|
|
|
|
|
45 |
</reference>
|
46 |
<reference name="content">
|
47 |
<block type="news/news" name="news.view" template="news/news.phtml"/>
|
48 |
</reference>
|
49 |
</news_index_view>
|
|
|
50 |
</layout>
|
3 |
|
4 |
<default>
|
5 |
<reference name="head">
|
6 |
+
<action method="addItem" ifconfig="news/news_general/enabled">
|
7 |
+
<type>skin_css</type>
|
8 |
+
<name>news/css/news.css</name>
|
9 |
+
<params/>
|
10 |
+
</action>
|
11 |
</reference>
|
12 |
<reference name="top.links">
|
13 |
+
<action method="addLink" translate="label title" module="news" ifconfig="news/news_general/enabled" >
|
14 |
+
<label>News</label>
|
15 |
+
<url helper="news/getNewsUrl"/>
|
16 |
+
<title>News</title>
|
17 |
+
<prepare/>
|
18 |
+
<urlParams/>
|
19 |
+
<position>20</position>
|
20 |
+
</action>
|
21 |
</reference>
|
22 |
<reference name="left">
|
23 |
<block type="news/news" name="news_left_column" after="-" >
|
24 |
<action method="setTemplate" ifconfig="news/news_general/news_show_left_column">
|
25 |
<template>news/news_column.phtml</template>
|
26 |
</action>
|
27 |
+
</block>
|
28 |
</reference>
|
29 |
<reference name="right">
|
30 |
<block type="news/news" name="news_right_column" after="-" >
|
34 |
</block>
|
35 |
</reference>
|
36 |
</default>
|
37 |
+
|
38 |
+
<cms_page>
|
39 |
+
<reference name="head">
|
40 |
+
<action method="addItem" ifconfig="news/news_general/enabled_ticker">
|
41 |
+
<type>skin_js</type>
|
42 |
+
<name>news/js/jquery-1.6.4.min.js</name>
|
43 |
+
</action>
|
44 |
+
<action method="addItem" ifconfig="news/news_general/enabled_ticker">
|
45 |
+
<type>skin_js</type>
|
46 |
+
<name>news/js/jquery.ticker.js</name>
|
47 |
+
</action>
|
48 |
+
<action method="addItem" ifconfig="news/news_general/enabled_ticker">
|
49 |
+
<type>skin_js</type>
|
50 |
+
<name>news/js/site.js</name>
|
51 |
+
</action>
|
52 |
+
<action method="addItem" ifconfig="news/news_general/enabled_ticker">
|
53 |
+
<type>skin_css</type>
|
54 |
+
<name>news/css/ticker-style.css</name>
|
55 |
+
</action>
|
56 |
+
</reference>
|
57 |
+
|
58 |
+
<reference name="content">
|
59 |
+
<block type="news/news" name="news.ticker" before="-">
|
60 |
+
<action method="setTemplate" ifconfig="news/news_general/enabled">
|
61 |
+
<template>news/news_ticker.phtml</template>
|
62 |
+
</action>
|
63 |
+
</block>
|
64 |
+
</reference>
|
65 |
+
</cms_page>
|
66 |
+
|
67 |
<news_index_index>
|
68 |
<reference name="root">
|
69 |
+
<action method="setTemplate">
|
70 |
+
<template>page/2columns-left.phtml</template>
|
71 |
+
</action>
|
72 |
</reference>
|
73 |
+
<reference name="head">
|
74 |
+
<action method="setTitle" news="title">
|
75 |
+
<title>News</title>
|
76 |
+
</action>
|
77 |
</reference>
|
78 |
<reference name="left">
|
79 |
<remove name="news_left_column"/>
|
80 |
+
<remove name="left.newsletter"/>
|
81 |
+
<remove name="left.permanent.callout"/>
|
82 |
+
<block type="news/category" name="category_left_column" before="-" >
|
83 |
+
<action method="setTemplate" ifconfig="news/news_general/enabled">
|
84 |
+
<template>news/category_column.phtml</template>
|
85 |
+
</action>
|
86 |
+
</block>
|
87 |
</reference>
|
88 |
<reference name="right">
|
89 |
<remove name="news_right_column"/>
|
90 |
</reference>
|
91 |
+
<reference name="content">
|
92 |
+
<block type="news/news" name="news" template="news/newslist.phtml" />
|
93 |
+
</reference>
|
94 |
</news_index_index>
|
95 |
|
96 |
<news_index_view>
|
97 |
<reference name="root">
|
98 |
+
<action method="setTemplate">
|
99 |
+
<template>page/1column.phtml</template>
|
100 |
+
</action>
|
101 |
</reference>
|
102 |
<reference name="content">
|
103 |
<block type="news/news" name="news.view" template="news/news.phtml"/>
|
104 |
</reference>
|
105 |
</news_index_view>
|
106 |
+
|
107 |
</layout>
|
app/design/frontend/default/default/template/news/category_column.phtml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (Mage::getStoreConfig('news/news_general/enabled') == 1):
|
4 |
+
$cid = $this->getRequest()->getParam('cid');
|
5 |
+
$i = 0;
|
6 |
+
|
7 |
+
$collection = $this->getCategory();
|
8 |
+
$count = count($collection);
|
9 |
+
if ($count !== 0):
|
10 |
+
?>
|
11 |
+
|
12 |
+
<div class="block block-poll news-extra-block ">
|
13 |
+
<div class="block-title">
|
14 |
+
<strong><span><?php echo $this->__('News Category');?></span></strong>
|
15 |
+
|
16 |
+
</div>
|
17 |
+
<div class="block-content">
|
18 |
+
|
19 |
+
<ul class="news-list">
|
20 |
+
<?php foreach ($collection as $category_item):
|
21 |
+
if($category_item['status'] == 1) {
|
22 |
+
?>
|
23 |
+
<li<?php if($cid == $category_item['category_id']) { echo ' class="active"'; }?>>
|
24 |
+
<label> <a href="<?php echo $this->getUrl('news/index').'?cid='.$category_item['category_id']; ?>">
|
25 |
+
<?php echo $category_item['name'].' ('.$this->getCategorisedNews($category_item['category_id']).')'; ?></a></label>
|
26 |
+
</li>
|
27 |
+
<?php
|
28 |
+
}
|
29 |
+
endforeach; ?>
|
30 |
+
</ul>
|
31 |
+
<div class="actions" >
|
32 |
+
<a href="<?php echo $this->getUrl('news/index') ?>" style="float: right;"><?php echo $this->__("View All"); ?></a>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
<script type="text/javascript">decorateGeneric($$('ul.news-list li'), ['odd', 'even', 'first', 'last'])</script>
|
37 |
+
<?php endif; ?>
|
38 |
+
<?php
|
39 |
+
else:
|
40 |
+
$url = Mage::getBaseUrl();
|
41 |
+
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
|
42 |
+
endif;
|
43 |
+
?>
|
app/design/frontend/default/default/template/news/news.phtml
CHANGED
@@ -1,16 +1,56 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
?>
|
4 |
-
|
5 |
-
<?php
|
6 |
-
<div class="page-title"><h1><?php echo $news['title']
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
<?php
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
?>
|
1 |
+
|
2 |
+
<?php if (Mage::getStoreConfig('news/news_general/enabled') == 1): ?>
|
3 |
+
<?php
|
4 |
+
$news = $this->getNews();
|
5 |
+
$relatednews = $news['related_news'];
|
6 |
+
|
7 |
+
if (strlen($relatednews) != 0) {
|
8 |
+
$relatednewsdata = explode(",", $relatednews);
|
9 |
+
}
|
10 |
?>
|
11 |
+
|
12 |
+
<?php if (($news->getDateToUnpublish() >= date('Y-m-d 00:00:00')) && ($news->getDateToPublish() < date('Y-m-d 23:59:59'))) { ?>
|
13 |
+
<div class="page-title"><h1><?php echo $news['title']; ?></h1></div>
|
14 |
+
|
15 |
+
<div class="desc">
|
16 |
+
|
17 |
+
<?php
|
18 |
+
$msg = $news['news_content'];
|
19 |
+
$helper = Mage::helper('cms');
|
20 |
+
if ($helper) {
|
21 |
+
$processor = $helper->getBlockTemplateProcessor();
|
22 |
+
if ($processor) {
|
23 |
+
echo $content = $processor->filter($msg);
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
?>
|
28 |
+
|
29 |
+
</div>
|
30 |
+
|
31 |
+
|
32 |
+
<?php if (count($relatednewsdata) != 0) : ?>
|
33 |
+
<div class="divider"></div>
|
34 |
+
<div class="news-related-title"><h3><?php echo $this->__('Related News'); ?></h3></div>
|
35 |
+
<?php
|
36 |
+
foreach ($relatednewsdata as $newsId):
|
37 |
+
$news = Mage::getModel('news/news')->load($newsId, "news_id");
|
38 |
+
$model_text = Mage::getModel('news/newsdata')->getCollection()->addFieldToFilter('store_id', $store)->addFieldToFilter('news_id', $newsId)->getData();
|
39 |
+
$text_data = $model_text[0];
|
40 |
+
?>
|
41 |
+
<div class="block news-block">
|
42 |
+
<div class="block-title"><strong><span><?php echo $text_data['title']; ?> </span></strong></div>
|
43 |
+
<div class="block-content"><a href="<?php echo $this->getUrl('*/*/view') . '?id=' . $news->getNewsId(); ?>" class="read-more"><?php echo $this->__('Read more') ?></a></div>
|
44 |
+
</div>
|
45 |
+
<?php endforeach;
|
46 |
+
endif; ?>
|
47 |
+
|
48 |
+
<?php }else { ?>
|
49 |
+
<ul class="message"><li class="notice-msg"><span><?php echo $this->__('No News Found.'); ?></span></li></ul>
|
50 |
+
<?php } ?>
|
51 |
+
<?php
|
52 |
+
else:
|
53 |
+
$url = Mage::getBaseUrl();
|
54 |
+
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
|
55 |
+
endif;
|
56 |
?>
|
app/design/frontend/default/default/template/news/news_column.phtml
CHANGED
@@ -1,44 +1,31 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
$i = 0;
|
5 |
$collection = $this->getCachedCollection();
|
6 |
-
$count = count($collection);
|
7 |
-
if($count !==
|
8 |
?>
|
9 |
<div class="block block-poll news-extra-block ">
|
10 |
<div class="block-title">
|
11 |
-
<strong><span
|
12 |
</div>
|
13 |
<div class="block-content">
|
14 |
-
<
|
15 |
-
|
16 |
-
<?php
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
?>
|
21 |
-
<li>
|
22 |
-
<label><a href="<?php echo $this->getUrl('news/index/view').'?id='.$news_item->getNewsId(); ?>"><?php echo $news_item->getTitle(); ?></a></label>
|
23 |
</li>
|
24 |
-
<?php
|
25 |
-
|
26 |
-
|
27 |
-
?>
|
28 |
-
<?php endforeach; ?>
|
29 |
-
</ul>
|
30 |
<div class="actions" >
|
31 |
<a href="<?php echo $this->getUrl('news/index') ?>" style="float: right;"><?php echo $this->__("View All"); ?></a>
|
32 |
</div>
|
33 |
</div>
|
34 |
</div>
|
35 |
-
<script type="text/javascript">decorateGeneric($$('ul.news-list li'), ['odd','even','first','last'])</script>
|
36 |
-
<?php
|
37 |
-
<div><h4><?php echo $this->__('No News to publish.'); ?></h4></div>
|
38 |
-
<?php endif; ?>
|
39 |
-
<?php
|
40 |
-
else:
|
41 |
-
$url = Mage::getBaseUrl();
|
42 |
-
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
|
43 |
endif;
|
44 |
?>
|
1 |
+
<?php
|
2 |
+
if (Mage::getStoreConfig('news/news_general/enabled') == 1):
|
3 |
+
$i = 0;
|
|
|
4 |
$collection = $this->getCachedCollection();
|
5 |
+
$count = count($collection);
|
6 |
+
if ($count !== 0):
|
7 |
?>
|
8 |
<div class="block block-poll news-extra-block ">
|
9 |
<div class="block-title">
|
10 |
+
<strong><span><?php echo $this->__('Latest News');?></span></strong>
|
11 |
</div>
|
12 |
<div class="block-content">
|
13 |
+
<marquee direction="up" id="scroll_news" scrollamount="2" height="80">
|
14 |
+
<ul class="news-list">
|
15 |
+
<?php foreach ($collection as $news_item): ?>
|
16 |
+
<li onMouseOver="document.getElementById('scroll_news').setAttribute('scrollamount', 0, 0);" OnMouseOut="document.getElementById('scroll_news').setAttribute('scrollamount', 2, 0);">
|
17 |
+
<label><a href="<?php echo $this->getUrl('news/index/view') . '?id=' . $news_item->getNewsId(); ?>">
|
18 |
+
<?php echo $news_item->getTitle(); ?></a></label>
|
|
|
|
|
|
|
19 |
</li>
|
20 |
+
<?php endforeach; ?>
|
21 |
+
</ul>
|
22 |
+
</marquee>
|
|
|
|
|
|
|
23 |
<div class="actions" >
|
24 |
<a href="<?php echo $this->getUrl('news/index') ?>" style="float: right;"><?php echo $this->__("View All"); ?></a>
|
25 |
</div>
|
26 |
</div>
|
27 |
</div>
|
28 |
+
<script type="text/javascript">decorateGeneric($$('ul.news-list li'), ['odd', 'even', 'first', 'last'])</script>
|
29 |
+
<?php endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
endif;
|
31 |
?>
|
app/design/frontend/default/default/template/news/news_ticker.phtml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$data = $this->getRequest()->getParams();
|
4 |
+
$pageIdentifier = Mage::getSingleton('cms/page')->getIdentifier();
|
5 |
+
$store = Mage::app()->getStore()->getStoreId();
|
6 |
+
|
7 |
+
$tickerCollection = $this->getTickerCollection($pageIdentifier,$store)->getData();
|
8 |
+
|
9 |
+
if (Mage::getStoreConfig('news/news_general/enabled') && Mage::getStoreConfig('news/news_general/enabled_ticker') && count($tickerCollection) > 0): ?>
|
10 |
+
<ul id="js-news" class="js-hidden">
|
11 |
+
<?php foreach($tickerCollection as $ticker): ?>
|
12 |
+
<li class="news-item"><a href="#"><?php echo $ticker['title'];?></a></li>
|
13 |
+
<?php endforeach; ?>
|
14 |
+
</ul>
|
15 |
+
|
16 |
+
<script type="text/javascript">
|
17 |
+
|
18 |
+
var $jquey = jQuery.noConflict();
|
19 |
+
$jquey.fn.ticker.defaults = {
|
20 |
+
speed: 0.10,
|
21 |
+
ajaxFeed: false,
|
22 |
+
feedUrl: '',
|
23 |
+
feedType: 'xml',
|
24 |
+
displayType: 'reveal',
|
25 |
+
htmlFeed: true,
|
26 |
+
debugMode: true,
|
27 |
+
controls: true,
|
28 |
+
titleText: '<?php echo $this->__('Latest News'); ?>',
|
29 |
+
direction: 'ltr',
|
30 |
+
pauseOnItems: 3000,
|
31 |
+
fadeInSpeed: 600,
|
32 |
+
fadeOutSpeed: 300};
|
33 |
+
$jquey('#js-news').ticker();
|
34 |
+
|
35 |
+
</script>
|
36 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/news/newslist.phtml
CHANGED
@@ -1,28 +1,55 @@
|
|
|
|
1 |
<?php
|
2 |
-
if(Mage::getStoreConfig('news/news_general/enabled')
|
3 |
-
$i = 0;
|
4 |
$collection = $this->getCachedCollection();
|
5 |
-
|
6 |
-
|
|
|
7 |
?>
|
8 |
<?php
|
9 |
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
|
10 |
-
$breadcrumbs->addCrumb('home',array('label'=>Mage::helper('cms')->__('Home'), 'title'=>Mage::helper('cms')->__('Home Page'),'link'=>Mage::getBaseUrl()));
|
11 |
-
$breadcrumbs->addCrumb('News', array('label'=>'News','title'=>'News'));
|
12 |
echo $this->getLayout()->getBlock('breadcrumbs')->toHtml();
|
13 |
?>
|
14 |
-
|
15 |
-
|
16 |
-
<div class="
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
20 |
</div>
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
<?php echo $this->getChildHtml('Biztech_news_toolbar'); ?>
|
24 |
<?php else: ?>
|
25 |
-
<
|
26 |
<?php endif; ?>
|
27 |
<?php
|
28 |
else:
|
1 |
+
|
2 |
<?php
|
3 |
+
if (Mage::getStoreConfig('news/news_general/enabled')):
|
4 |
+
$i = 0;
|
5 |
$collection = $this->getCachedCollection();
|
6 |
+
|
7 |
+
$count = count($collection);
|
8 |
+
if ($count !== 0):
|
9 |
?>
|
10 |
<?php
|
11 |
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
|
12 |
+
$breadcrumbs->addCrumb('home', array('label' => Mage::helper('cms')->__('Home'), 'title' => Mage::helper('cms')->__('Home Page'), 'link' => Mage::getBaseUrl()));
|
13 |
+
$breadcrumbs->addCrumb('News', array('label' => 'News', 'title' => 'News'));
|
14 |
echo $this->getLayout()->getBlock('breadcrumbs')->toHtml();
|
15 |
?>
|
16 |
+
<?php foreach ($collection as $news_item): ?>
|
17 |
+
<div class="block news-block">
|
18 |
+
<div class="block-title"><strong><span><?php echo $news_item->getTitle(); ?></span></strong></div>
|
19 |
+
<div class="block-content">
|
20 |
+
<?php echo $news_item->getIntro(); ?>
|
21 |
+
<a href="<?php echo $this->getUrl('*/*/view') . '?id=' . $news_item->getNewsId(); ?>" class="read-more"><?php echo $this->__('Read more') ?></a>
|
22 |
+
<div class="divider"></div>
|
23 |
+
|
24 |
+
<div class="publish-date">
|
25 |
+
<h5> <?php echo $this->__('Publish Date:'); ?></h5>
|
26 |
+
<p><?php echo date("F j, Y", strtotime($news_item->getDateToPublish())); ?></p>
|
27 |
</div>
|
28 |
+
|
29 |
+
|
30 |
+
<?php if (Mage::getStoreConfig('news/news_general/share_on_socialmedia') == 1) : ?>
|
31 |
+
<div class="social-links">
|
32 |
+
|
33 |
+
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
|
34 |
+
<script type="text/javascript">stLight.options({publisher: "8453cbb3-3515-47cc-9e48-57c726813928", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>
|
35 |
+
|
36 |
+
<span class='st_facebook_hcount' displayText='Facebook' st_url="<?php echo $this->getUrl('*/*/view') . '?id=' . $news_item->getNewsId(); ?>"></span>
|
37 |
+
<span class='st_twitter_hcount' displayText='Tweet' st_url="<?php echo $this->getUrl('*/*/view') . '?id=' . $news_item->getNewsId(); ?>"></span>
|
38 |
+
<span class='st_linkedin_hcount' displayText='LinkedIn' st_url="<?php echo $this->getUrl('*/*/view') . '?id=' . $news_item->getNewsId(); ?>"></span>
|
39 |
+
<span class='st_googleplus_hcount' displayText='Google +' st_url="<?php echo $this->getUrl('*/*/view') . '?id=' . $news_item->getNewsId(); ?>"></span>
|
40 |
+
<span class='st_fblike_hcount' displayText='Facebook Like' st_url="<?php echo $this->getUrl('*/*/view') . '?id=' . $news_item->getNewsId(); ?>"></span>
|
41 |
+
|
42 |
+
|
43 |
+
</div>
|
44 |
+
<?php endif; ?>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
</div>
|
48 |
+
<?php endforeach; ?>
|
49 |
+
|
50 |
<?php echo $this->getChildHtml('Biztech_news_toolbar'); ?>
|
51 |
<?php else: ?>
|
52 |
+
<ul class="message"><li class="notice-msg"><span><?php echo $this->__('No News to publish.'); ?></span></li></ul>
|
53 |
<?php endif; ?>
|
54 |
<?php
|
55 |
else:
|
app/etc/modules/Biztech_News.xml
CHANGED
@@ -14,4 +14,4 @@
|
|
14 |
<codePool>local</codePool>
|
15 |
</Biztech_News>
|
16 |
</modules>
|
17 |
-
</config>
|
14 |
<codePool>local</codePool>
|
15 |
</Biztech_News>
|
16 |
</modules>
|
17 |
+
</config>
|
app/locale/de_DE/Biztech_News.csv
CHANGED
@@ -26,3 +26,25 @@ Save News,Speichern Nachrichten
|
|
26 |
Delete News,löschen Nachrichten
|
27 |
Edit News,Bearbeiten Nachrichten
|
28 |
News information,News information
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
Delete News,löschen Nachrichten
|
27 |
Edit News,Bearbeiten Nachrichten
|
28 |
News information,News information
|
29 |
+
Show link in Top-links,Zeige Link in Top-Links
|
30 |
+
Show News in Left Column,Neuigkeiten in der linken Spalte
|
31 |
+
Share News On Social Media,Empfehlen News auf Social Media
|
32 |
+
Enable Ticker,Ticker aktivieren
|
33 |
+
Select Yes to enable this feature.,"W�hlen Sie Ja, um diese Funktion zu aktivieren."
|
34 |
+
Related News,In Verbindung stehende Artikel
|
35 |
+
News Category,News Kategorie
|
36 |
+
Add Category,Kategorie hinzuf�gen
|
37 |
+
Name,Name
|
38 |
+
Add To Pages,Um Seiten
|
39 |
+
Select CMS Pages where you want to add News Ticker.,"Wählen CMS Seiten, wo Sie News Ticker hinzufügen möchten."
|
40 |
+
Set Yes to enable News Ticker.,"Stellen Sie auf Ja, um News Ticker zu ermöglichen."
|
41 |
+
Category Information,Kategorie Information
|
42 |
+
Save Category,Speichern Sie Kategorie
|
43 |
+
Edit Category,Kategorie bearbeiten
|
44 |
+
Delete Category,Kategorie löschen
|
45 |
+
Latest News,Neueste Nachrichten
|
46 |
+
News Category,News Kategorie
|
47 |
+
View All,Alle anzeigen
|
48 |
+
Read More,Weiterlesen
|
49 |
+
Publish Date,Veröffentlichungsdatum
|
50 |
+
No News Found.,Keine News gefunden.
|
app/locale/en_GB/Biztech_News.csv
CHANGED
@@ -26,3 +26,25 @@ Save News,Save tidings
|
|
26 |
Delete News,Delete tidings
|
27 |
Edit News,Edit tidings
|
28 |
News information,tidings information
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
Delete News,Delete tidings
|
27 |
Edit News,Edit tidings
|
28 |
News information,tidings information
|
29 |
+
Show link in Top-links,Show link in Top-links
|
30 |
+
Show News in Left Column,Show tidings in Left Column
|
31 |
+
Share News On Social Media,Share tidings On Social Media
|
32 |
+
Enable Ticker,Enable Ticker
|
33 |
+
Select Yes to enable this feature.,Select Yes to enable this feature.
|
34 |
+
Related News,Related tidings
|
35 |
+
News Category,tidings Category
|
36 |
+
Add Category,Add Category
|
37 |
+
Name,Name
|
38 |
+
Add To Pages,Add To Pages
|
39 |
+
Select CMS Pages where you want to add News Ticker.,Select CMS Pages where yeh want to add tidings Ticker.
|
40 |
+
Set Yes to enable News Ticker.,Set Yes to enable tidings Ticker.
|
41 |
+
Category Information,Category Information
|
42 |
+
Save Category,Save Category
|
43 |
+
Edit Category,Edit Category
|
44 |
+
Delete Category,Delete Category
|
45 |
+
Latest News,Latest tidings
|
46 |
+
News Category,tidings Category
|
47 |
+
View All,View All
|
48 |
+
Read More,Read More
|
49 |
+
Publish Date,Publish Date
|
50 |
+
No News Found.,No News Found.
|
app/locale/en_US/Biztech_News.csv
CHANGED
@@ -25,3 +25,26 @@ Description,Description
|
|
25 |
Save News,Save News
|
26 |
Delete News,Delete News
|
27 |
Edit News,Edit News
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
Save News,Save News
|
26 |
Delete News,Delete News
|
27 |
Edit News,Edit News
|
28 |
+
News information,News information
|
29 |
+
Show link in Top-links,Show link in Top-links
|
30 |
+
Show News in Left Column,Show News in Left Column
|
31 |
+
Share News On Social Media,Share News On Social Media
|
32 |
+
Enable Ticker,Enable Ticker
|
33 |
+
Select Yes to enable this feature.,Select Yes to enable this feature.
|
34 |
+
Related News,Related News
|
35 |
+
News Category,News Category
|
36 |
+
Add Category,Add Category
|
37 |
+
Name,Name
|
38 |
+
Add To Pages,Add To Pages
|
39 |
+
Select CMS Pages where you want to add News Ticker.,Select CMS Pages where you want to add News Ticker.
|
40 |
+
Set Yes to enable News Ticker.,Set Yes to enable News Ticker.
|
41 |
+
Category Information,Category Information
|
42 |
+
Save Category,Save Category
|
43 |
+
Edit Category,Edit Category
|
44 |
+
Delete Category,Delete Category
|
45 |
+
Latest News,Latest News
|
46 |
+
News Category,News Category
|
47 |
+
View All,View All
|
48 |
+
Read More,Read More
|
49 |
+
Publish Date,Publish Date
|
50 |
+
No News Found.,No News Found.
|
app/locale/fr_FR/Biztech_News.csv
CHANGED
@@ -26,3 +26,25 @@ Save News,Enregistrer Nouvelles
|
|
26 |
Delete News,supprimer Nouvelles
|
27 |
Edit News,Modifier Nouvelles
|
28 |
News information,Nouvelles informations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
Delete News,supprimer Nouvelles
|
27 |
Edit News,Modifier Nouvelles
|
28 |
News information,Nouvelles informations
|
29 |
+
Show link in Top-links,Afficher le lien dans les Top-liens
|
30 |
+
Show News in Left Column,Afficher Nouvelles dans la colonne de gauche
|
31 |
+
Share News On Social Media,Partager Nouvelles sur les médias sociaux
|
32 |
+
Enable Ticker,activer Ticker
|
33 |
+
Select Yes to enable this feature.,Sélectionnez Oui pour activer cette fonction.
|
34 |
+
Related News,Nouvelles connexes
|
35 |
+
News Category,Nouvelles Catégorie
|
36 |
+
Add Category,Ajouter Catégorie
|
37 |
+
Name,nom
|
38 |
+
Add To Pages,Ajouter des pages
|
39 |
+
Select CMS Pages where you want to add News Ticker.,Sélectionnez CMS Pages où vous voulez ajouter Nouvelles Ticker.
|
40 |
+
Set Yes to enable News Ticker.,Réglez Oui pour activer Nouvelles Ticker.
|
41 |
+
Category Information,catégorie information
|
42 |
+
Save Category,Sauvegarder Catégorie
|
43 |
+
Edit Category,Modifier une catégorie
|
44 |
+
Delete Category,supprimer Catégorie
|
45 |
+
Latest News,Derniéres Nouvelles
|
46 |
+
News Category,Nouvelles Catégorie
|
47 |
+
View All,Tout Voir
|
48 |
+
Read More,En Savoir Plus
|
49 |
+
Publish Date,date de publication
|
50 |
+
No News Found.,Non Nouvelles Trouvé.
|
app/locale/it_IT/Biztech_News.csv
CHANGED
@@ -26,3 +26,25 @@ Save News,Salva Notizie
|
|
26 |
Delete News,Elimina Notizie
|
27 |
Edit News,Modifica le news
|
28 |
News information,informazioni Notizie
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
Delete News,Elimina Notizie
|
27 |
Edit News,Modifica le news
|
28 |
News information,informazioni Notizie
|
29 |
+
Show link in Top-links,Mostra link in Top-link
|
30 |
+
Show News in Left Column,Mostra Notizie nella colonna di sinistra
|
31 |
+
Share News On Social Media,Condividi Notizie sui social media
|
32 |
+
Enable Ticker,Abilita Ticker
|
33 |
+
Select Yes to enable this feature.,Selezionare Sì per attivare questa funzione.
|
34 |
+
Related News,Notizie correlate
|
35 |
+
News Category,News Categoria
|
36 |
+
Add Category,Aggiungi categoria
|
37 |
+
Name,nome
|
38 |
+
Add To Pages,Aggiungi a pagine
|
39 |
+
Select CMS Pages where you want to add News Ticker.,Selezionare CMS pagine dove si desidera aggiungere News Ticker.
|
40 |
+
Set Yes to enable News Ticker.,Impostare Sì per abilitare News Ticker.
|
41 |
+
Category Information,Categoria Informazioni
|
42 |
+
Save Category,Salva Categoria
|
43 |
+
Edit Category,Modifica categoria
|
44 |
+
Delete Category,Elimina Categoria
|
45 |
+
Latest News,Ultime Notizie
|
46 |
+
News Category,News Categoria
|
47 |
+
View All,Guarda Tutto
|
48 |
+
Read More,Per Saperne Di Più
|
49 |
+
Publish Date,Data di pubblicazione
|
50 |
+
No News Found.,Nessuna notizia trovata.
|
app/locale/nl_NL/Biztech_News.csv
CHANGED
@@ -26,3 +26,25 @@ Save News,Opslaan Nieuws
|
|
26 |
Delete News,Delete Nieuws
|
27 |
Edit News,Bewerken Nieuws
|
28 |
News information,Nieuws informatie
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
Delete News,Delete Nieuws
|
27 |
Edit News,Bewerken Nieuws
|
28 |
News information,Nieuws informatie
|
29 |
+
Show link in Top-links,Toon schakel in Top-koppelingen
|
30 |
+
Show News in Left Column,Show Nieuws in Left Column
|
31 |
+
Share News On Social Media,Nieuws On Social Media
|
32 |
+
Enable Ticker,inschakelen Ticker
|
33 |
+
Select Yes to enable this feature.,Selecteer Ja om deze functie in te schakelen.
|
34 |
+
Related News,Gerelateerd nieuws
|
35 |
+
News Category,Nieuws Categorie
|
36 |
+
Add Category,Categorie toevoegen
|
37 |
+
Name,naam
|
38 |
+
Add To Pages,Toevoegen aan Pages
|
39 |
+
Select CMS Pages where you want to add News Ticker.,Selecteer CMS pagina's waar u wilt News Ticker toe te voegen.
|
40 |
+
Set Yes to enable News Ticker.,Stel Ja om News Ticker schakelen.
|
41 |
+
Category Information,categorie Informatie
|
42 |
+
Save Category,Onthouden Categorie
|
43 |
+
Edit Category,Categorie bewerken
|
44 |
+
Delete Category,Verwijder Categorie
|
45 |
+
Latest News,Laatste Nieuws
|
46 |
+
News Category,Nieuws Categorie
|
47 |
+
View All,Bekijk Alles
|
48 |
+
Read More,Lees Meer
|
49 |
+
Publish Date,Publicatiedatum
|
50 |
+
No News Found.,Geen nieuws gevonden.
|
package.xml
CHANGED
@@ -1,29 +1,36 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>news_module</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>The News Module Extension allows you to display news on your website for viewers</summary>
|
10 |
-
<description>The News Module Extension allows you to display news on your website for viewers. News can be anything like if there is any update in your products, if you have included any new product in your e-store, if you are providing any special offers in any of your products etc all can be displayed in the news section
|
11 |
-
A separate section for news helps your client to easily get through recent happenings in your online store. The extension is very easy to install, configure and use. It allows you to manage news from the admin panel. You can easily add and edit any news entries. It helps you to display various ads, products and news on your website effortlessly
|
12 |
-
Features of News Module Extension
|
13 |
-
• After installing this extension a separate menu will be created for News on your website that will help viewers to easily go to the News section of your website
|
14 |
-
• News page will show latest ten updates and the details of the updates can be viewed by clicking on the read more link that will redirect the customers to the details page of that particular news
|
15 |
-
• You can create news and it is up to you when you want to publish it. There is provision for this facility in the admin side, go to News->Manage News->News information, there specify yes/no in the published attribute as needed
|
16 |
-
• Possibility for publishing a particular news for given period of time is also available. This can be set from News->Manage News->Publishing Options. Here set the start and end data for the news has to be published
|
17 |
-
• The extension also allows you optimize your news page by allowing you to set the page title, keywords and description.
|
18 |
-
• Page layout can be set both for the news list pages and news detail page as desired. The layouts that this extension provides are 1 column, 2columns-right, 2columns-left and 3columns
|
19 |
-
|
20 |
-
|
21 |
This extension can also be used as a blog on your website. Magento News Extension will help you make your store more interactive and will keep your visitors familiar with the latest business updates and developments.</description>
|
22 |
-
<notes>- Enhancements :
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
<compatible/>
|
28 |
-
<dependencies
|
29 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>news_module</name>
|
4 |
+
<version>0.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>The News Module Extension allows you to display news on your website for viewers</summary>
|
10 |
+
<description>The News Module Extension allows you to display news on your website for viewers. News can be anything like if there is any update in your products, if you have included any new product in your e-store, if you are providing any special offers in any of your products etc all can be displayed in the news section.
|
11 |
+
A separate section for news helps your client to easily get through recent happenings in your online store. The extension is very easy to install, configure and use. It allows you to manage news from the admin panel. You can easily add and edit any news entries. It helps you to display various ads, products and news on your website effortlessly.
|
12 |
+
Features of News Module Extension.
|
13 |
+
• After installing this extension a separate menu will be created for News on your website that will help viewers to easily go to the News section of your website.
|
14 |
+
• News page will show latest ten updates and the details of the updates can be viewed by clicking on the read more link that will redirect the customers to the details page of that particular news.
|
15 |
+
• You can create news and it is up to you when you want to publish it. There is provision for this facility in the admin side, go to News->Manage News->News information, there specify yes/no in the published attribute as needed.
|
16 |
+
• Possibility for publishing a particular news for given period of time is also available. This can be set from News->Manage News->Publishing Options. Here set the start and end data for the news has to be published.
|
17 |
+
• The extension also allows you optimize your news page by allowing you to set the page title, keywords and description. 
|
18 |
+
• Page layout can be set both for the news list pages and news detail page as desired. The layouts that this extension provides are 1 column, 2columns-right, 2columns-left and 3columns
|
19 |
+

|
20 |
+

|
21 |
This extension can also be used as a blog on your website. Magento News Extension will help you make your store more interactive and will keep your visitors familiar with the latest business updates and developments.</description>
|
22 |
+
<notes>- Enhancements : 
|
23 |
+
Manage News by Category
|
24 |
+
Add Related News for particular News Item
|
25 |
+
Add news section in left and right column,
|
26 |
+
Add news link in top links.
|
27 |
+
Display News Ticker
|
28 |
+
Share News on social Media
|
29 |
+
</notes>
|
30 |
+
<authors><author><name>Biztech</name><user>biztechcon</user><email>sales@biztechconsultancy.com</email></author></authors>
|
31 |
+
<date>2015-07-13</date>
|
32 |
+
<time>06:02:58</time>
|
33 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Biztech_News.xml" hash="dbefe2b324b75748c56e28fa26f7b8d0"/></dir></target><target name="magelocal"><dir name="Biztech"><dir name="News"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="Edit"><file name="Form.php" hash="51624edb75f5e431d1367f4f8dae56d9"/><dir name="Tab"><file name="Form.php" hash="193c68961f51b588405672aa530115c3"/></dir><file name="Tabs.php" hash="444a48335c9ba17463a6163f65ea8cd0"/></dir><file name="Edit.php" hash="0dee7a7e029e4b39513685ff1d80e0c7"/><file name="Grid.php" hash="fe088bf632023e415bcef7af814ad196"/></dir><file name="Category.php" hash="7a0eeb7383b7aee500c2e880af6f9f9d"/><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="PageLayout.php" hash="cb053c3354269872be9355a36f0bd7ca"/></dir></dir></dir></dir><dir name="News"><dir name="Edit"><file name="Form.php" hash="e11cccad6ab78db02c0572a87095c2ce"/><dir name="Tab"><file name="Form.php" hash="2b4278e035aeae8ef8230e529fadec60"/><file name="Product.php" hash="3ee6007896c7809bc7083b38a142477f"/><file name="Publishingoptions.php" hash="66581d748b118a6a071d380096b8acfc"/><file name="Related.php" hash="c653e2489c3937ebc4abed3883e43e6d"/><file name="Seo.php" hash="6783a433b07c65cd39b50b6593eb82cc"/></dir><file name="Tabs.php" hash="a31112c2f7c4821287b3aeafc60ea142"/></dir><file name="Edit.php" hash="de0a846c4282f23cba46dddbf339ed5c"/><file name="Grid.php" hash="5e7ddc0029864fd8f68d2b803e57fdb5"/></dir><file name="News.php" hash="d8e83cccedc0d4a2fc1cc6957a38ae7d"/></dir><file name="Category.php" hash="57bec78ba65b2d30fa4f51ffdcd9c8f8"/><file name="News.php" hash="cf9c2518731bf6f88a87717e55cf5f73"/><dir name="Product"><file name="Toolbar.php" hash="5ea2be422632936d999f2feb662c5efb"/></dir></dir><dir name="Helper"><file name="Data.php" hash="11e7f2ca758e28d169980c2ef58ca1bc"/><file name="Toolbar.php" hash="14159408015e75a92b500f3331e7afea"/></dir><dir name="Model"><dir name="Mysql4"><dir name="News"><file name="Collection.php" hash="e3c39884261fde3c7432eb0517bfc3b1"/></dir><file name="News.php" hash="e0bbfff96aa96114103ab7a1b24d287e"/><dir name="Newscategory"><file name="Collection.php" hash="56a1ce8d255e51afec8e5431a7180fb0"/></dir><file name="Newscategory.php" hash="51da75bb886b3194f464135cf5840146"/><file name="Newscategory.php~" hash="14214581f8a213ea6bcddc5a1ceb37cb"/><dir name="Newscategorydata"><file name="Collection.php" hash="bdd1763c686b53a2656da55745d7100b"/></dir><file name="Newscategorydata.php" hash="e9b6d05db01f302414461f73cad10353"/><dir name="Newsdata"><file name="Collection.php" hash="4fd9ec9ed7cd8b0449dfbcebcd8515c9"/></dir><file name="Newsdata.php" hash="cb924f6abccf0341723152d0825664bc"/><file name="Newsdata.php~" hash="cb924f6abccf0341723152d0825664bc"/></dir><file name="News.php" hash="a696eb4c7834e76c88c0fbd19ec8bb32"/><file name="Newscategory.php" hash="e4e4e1b3b1b5a5e5d7d9c39ea576b79c"/><file name="Newscategorydata.php" hash="d1c85a4edecc667b25c8509aabafd98f"/><file name="Newsdata.php" hash="63f5c9a9676a0bb5777c63cfc5b4a854"/><file name="Status.php" hash="fddbc75ce090257b57a1c6ca4e6c6f08"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategoryController.php" hash="a25716b54f5b4e534b9b3e93152f7529"/><file name="NewsController.php" hash="8a2977f5748887c167cc4bb4e8bc2e9e"/></dir><file name="IndexController.php" hash="f7841c4fa35d43b22ecc68a58985bf64"/></dir><dir name="etc"><file name="config.xml" hash="f0e130c8e6a41f381a47eb0095421efd"/><file name="system.xml" hash="380f1935f01dc3155727117881bc7fa8"/></dir><dir name="sql"><dir name="news_setup"><file name="mysql4-data-upgrade-0.1.1-0.1.2.php" hash="8d0f54ad738960b40e51bf641c2224f1"/><file name="mysql4-data-upgrade-0.1.2-0.1.3.php" hash="46b5b4545ddf84548ee5d8eb9cd3d106"/><file name="mysql4-install-0.1.0-0.1.1.php" hash="1fc1c2bb4f2d4613c60b11853727b26c"/><file name="mysql4-install-0.1.0.php" hash="1fc1c2bb4f2d4613c60b11853727b26c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="news.xml" hash="dc0f4312c97ae89ec8d73bfdec3fe5c7"/></dir><dir name="template"><dir name="news"><file name="category_column.phtml" hash="fa5c4a5c2eb73b3d8630664d4b707474"/><file name="news.phtml" hash="1af0661b5bad6be903e75b537900a3aa"/><file name="news_column.phtml" hash="282df389f7d0c3335016fc0f00da943a"/><file name="news_ticker.phtml" hash="285cf2e038734dcf5f04ac80c9f2fa5e"/><file name="newslist.phtml" hash="0d387acecc404584786bc589e4ce72fb"/><file name="toolbar.phtml" hash="0de79f32306c8132f346ec129a6677f3"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="news.xml" hash="cfaf846645bcfb6148eb87fc02b777b1"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Biztech_News.csv" hash="67b2c0a0d57e157111017b001fc5bf6a"/></dir><dir name="de_DE"><file name="Biztech_News.csv" hash="0ccfe0cf1c5cfbb4bc2ce44e8ae1f19f"/></dir><dir name="it_IT"><file name="Biztech_News.csv" hash="850d3a4028427880e9d9213700f3c961"/></dir><dir name="fr_FR"><file name="Biztech_News.csv" hash="9c8d206119af9ab09b38b81c9c1cf0ac"/></dir><dir name="nl_NL"><file name="Biztech_News.csv" hash="3b9b1f0c6a303a11e45b7e8be15eda33"/></dir><dir name="en_GB"><file name="Biztech_News.csv" hash="ef1bc3144084f27998c500c0f0c73843"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="news"><dir name="css"><file name="news.css" hash="e817c6a01ebbb048b760c8bf368abd29"/><file name="ticker-style.css" hash="681605a66c563cc983b8ad6a0dfdab9f"/></dir><dir name="images"><file name="Thumbs.db" hash="c70ae454e77f096854fdf2dc107bb480"/><file name="controls.png" hash="8e4022835e8da247197e2df8fc230044"/><file name="dl-arr.png" hash="19ebfa90651cf72e9118380bd46f8b27"/><file name="down-arr.gif" hash="92aa01572b20dbb45a713f60784f4008"/><file name="forkme.png" hash="5330c88f5cea3a396d4ba8fc90ac6c31"/><file name="main-red-bg.gif" hash="7d1db840ca16b765a1a117f7e82e14b0"/></dir><dir name="js"><file name="jquery-1.6.4.min.js" hash="9118381924c51c89d9414a311ec9c97f"/><file name="jquery-1.9.1.min.js" hash="397754ba49e9e0cf4e7c190da78dda05"/><file name="jquery.ticker.js" hash="b7389c825a1c18607c940384b3645d17"/><file name="site.js" hash="e5f78efb590ec4356b26a7c1964f3402"/></dir></dir></dir></dir></dir></target></contents>
|
34 |
<compatible/>
|
35 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
36 |
</package>
|
skin/frontend/default/default/news/css/news.css
CHANGED
@@ -1,25 +1,22 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
}
|
4 |
-
.news-block .
|
5 |
-
|
6 |
-
}
|
7 |
-
.news-block .
|
8 |
-
|
9 |
-
}
|
10 |
-
.news-block a, .news-block p{
|
11 |
-
display: inline;
|
12 |
-
}
|
13 |
-
.news-block a{color: #E26703; padding-left: 5px; font-weight: bold; text-decoration: none;
|
14 |
-
}
|
15 |
|
16 |
-
|
|
|
|
|
17 |
|
18 |
-
|
|
|
|
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
}
|
23 |
-
.
|
24 |
-
|
25 |
-
}
|
1 |
+
/* News Block
|
2 |
+
*******************************************************************/
|
3 |
+
.news-block.block .block-content { padding: 8px; }
|
4 |
+
.news-block.block .block-content p{ display: inline;}
|
5 |
+
.read-more{display: inline; margin-left: 4px;}
|
6 |
+
.news-block.block h5{ display: inline;}
|
7 |
+
.news-block.block .publish-date { display: inline;}
|
8 |
+
.news-block.block .social-links{ border-left: 1px solid #ccc; display: inline; margin-left: 10px; padding-left: 10px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
/* Related title
|
11 |
+
*******************************************************************/
|
12 |
+
.news-related-title h3{ font-weight: normal; padding-bottom: 5px; padding-top: 5px;}
|
13 |
|
14 |
+
/* message
|
15 |
+
*******************************************************************/
|
16 |
+
.notice-msg{ margin-bottom: 1em;}
|
17 |
|
18 |
+
/* right and left panel block
|
19 |
+
*******************************************************************/
|
20 |
+
.block-news .news-list{ padding: 3px 9px;}
|
21 |
+
.block-poll .news-list label{font-weight: normal;}
|
22 |
+
.block-poll .news-list .active label{font-weight: bold;}
|
|
skin/frontend/default/default/news/css/ticker-style.css
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ticker Styling */
|
2 |
+
.ticker-wrapper.has-js {
|
3 |
+
margin: 10px 0px 10px 0px;
|
4 |
+
padding: 0px 15px;
|
5 |
+
width: 96%;
|
6 |
+
height: 32px;
|
7 |
+
display: block;
|
8 |
+
-webkit-border-radius: 15px;
|
9 |
+
-moz-border-radius: 15px;
|
10 |
+
background-color: #618499;
|
11 |
+
}
|
12 |
+
.ticker-wrapper.left{float: none !important;}
|
13 |
+
|
14 |
+
.ticker {
|
15 |
+
width: 84%;
|
16 |
+
height: 23px;
|
17 |
+
display: block;
|
18 |
+
position: relative;
|
19 |
+
overflow: hidden;
|
20 |
+
background-color: #618499;
|
21 |
+
}
|
22 |
+
.ticker-title {
|
23 |
+
padding-top: 7px;
|
24 |
+
color: #ebbc58;
|
25 |
+
font-weight: bold;
|
26 |
+
background-color: #618499;
|
27 |
+
text-transform: uppercase;
|
28 |
+
}
|
29 |
+
.ticker-content {
|
30 |
+
margin: 0px;
|
31 |
+
padding-top: 10px;
|
32 |
+
position: absolute;
|
33 |
+
color: #ffffff;
|
34 |
+
font-weight: bold;
|
35 |
+
background-color: #618499;
|
36 |
+
overflow: hidden;
|
37 |
+
white-space: nowrap;
|
38 |
+
line-height: 1.2em;
|
39 |
+
}
|
40 |
+
.ticker-content:focus {
|
41 |
+
none;
|
42 |
+
}
|
43 |
+
.ticker-content a {
|
44 |
+
text-decoration: none;
|
45 |
+
color: #ffffff;
|
46 |
+
}
|
47 |
+
.ticker-content a:hover {
|
48 |
+
text-decoration: underline;
|
49 |
+
color: #a7c6dd;
|
50 |
+
}
|
51 |
+
.ticker-swipe {
|
52 |
+
padding-top: 9px;
|
53 |
+
position: absolute;
|
54 |
+
top: 0px;
|
55 |
+
background-color: #618499;
|
56 |
+
display: block;
|
57 |
+
width: 100%;
|
58 |
+
height: 23px;
|
59 |
+
}
|
60 |
+
.ticker-swipe span {
|
61 |
+
margin-left: 1px;
|
62 |
+
background-color: #618499;
|
63 |
+
border-bottom: 1px solid #ffffff;
|
64 |
+
height: 12px;
|
65 |
+
width: 7px;
|
66 |
+
display: block;
|
67 |
+
}
|
68 |
+
.ticker-controls {
|
69 |
+
padding: 8px 0px 0px 0px;
|
70 |
+
list-style-type: none;
|
71 |
+
float: left;
|
72 |
+
}
|
73 |
+
.ticker-controls li {
|
74 |
+
padding: 0px;
|
75 |
+
margin-left: 5px;
|
76 |
+
float: left;
|
77 |
+
cursor: pointer;
|
78 |
+
height: 16px;
|
79 |
+
width: 16px;
|
80 |
+
display: block;
|
81 |
+
}
|
82 |
+
.ticker-controls li.jnt-play-pause {
|
83 |
+
background-image: url('../images/controls.png');
|
84 |
+
background-position: 32px 16px;
|
85 |
+
}
|
86 |
+
.ticker-controls li.jnt-play-pause.over {
|
87 |
+
background-position: 32px 32px;
|
88 |
+
}
|
89 |
+
.ticker-controls li.jnt-play-pause.down {
|
90 |
+
background-position: 32px 0px;
|
91 |
+
}
|
92 |
+
.ticker-controls li.jnt-play-pause.paused {
|
93 |
+
background-image: url('../images/controls.png');
|
94 |
+
background-position: 48px 16px;
|
95 |
+
}
|
96 |
+
.ticker-controls li.jnt-play-pause.paused.over {
|
97 |
+
background-position: 48px 32px;
|
98 |
+
}
|
99 |
+
.ticker-controls li.jnt-play-pause.paused.down {
|
100 |
+
background-position: 48px 0px;
|
101 |
+
}
|
102 |
+
.ticker-controls li.jnt-prev {
|
103 |
+
background-image: url('../images/controls.png');
|
104 |
+
background-position: 0px 16px;
|
105 |
+
}
|
106 |
+
.ticker-controls li.jnt-prev.over {
|
107 |
+
background-position: 0px 32px;
|
108 |
+
}
|
109 |
+
.ticker-controls li.jnt-prev.down {
|
110 |
+
background-position: 0px 0px;
|
111 |
+
}
|
112 |
+
.ticker-controls li.jnt-next {
|
113 |
+
background-image: url('../images/controls.png');
|
114 |
+
background-position: 16px 16px;
|
115 |
+
}
|
116 |
+
.ticker-controls li.jnt-next.over {
|
117 |
+
background-position: 16px 32px;
|
118 |
+
}
|
119 |
+
.ticker-controls li.jnt-next.down {
|
120 |
+
background-position: 16px 0px;
|
121 |
+
}
|
122 |
+
.js-hidden {
|
123 |
+
display: none;
|
124 |
+
}
|
125 |
+
.no-js-news {
|
126 |
+
padding: 10px 0px 0px 45px;
|
127 |
+
color: #ffffff;
|
128 |
+
}
|
129 |
+
.left .ticker-swipe {
|
130 |
+
/*left: 80px;*/
|
131 |
+
}
|
132 |
+
.left .ticker-controls, .left .ticker-content, .left .ticker-title, .left .ticker {
|
133 |
+
float: left;
|
134 |
+
}
|
135 |
+
.left .ticker-controls {
|
136 |
+
padding-left: 6px;
|
137 |
+
}
|
138 |
+
.right .ticker-swipe {
|
139 |
+
/*right: 80px;*/
|
140 |
+
}
|
141 |
+
.right .ticker-controls, .right .ticker-content, .right .ticker-title, .right .ticker {
|
142 |
+
float: right;
|
143 |
+
}
|
144 |
+
.right .ticker-controls {
|
145 |
+
padding-right: 6px;
|
146 |
+
}
|
skin/frontend/default/default/news/images/Thumbs.db
ADDED
Binary file
|
skin/frontend/default/default/news/images/controls.png
ADDED
Binary file
|
skin/frontend/default/default/news/images/dl-arr.png
ADDED
Binary file
|
skin/frontend/default/default/news/images/down-arr.gif
ADDED
Binary file
|
skin/frontend/default/default/news/images/forkme.png
ADDED
Binary file
|
skin/frontend/default/default/news/images/main-red-bg.gif
ADDED
Binary file
|
skin/frontend/default/default/news/js/jquery-1.6.4.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
|
2 |
+
(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(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(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete
|
3 |
+
t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.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){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(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,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean
|
4 |
+
(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<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>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
|
skin/frontend/default/default/news/js/jquery-1.9.1.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
|
2 |
+
//@ sourceMappingURL=jquery.min.map
|
3 |
+
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
|
4 |
+
return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
|
5 |
+
}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
|
skin/frontend/default/default/news/js/jquery.ticker.js
ADDED
@@ -0,0 +1,429 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
jQuery News Ticker is free software: you can redistribute it and/or modify
|
3 |
+
it under the terms of the GNU General Public License as published by
|
4 |
+
the Free Software Foundation, version 2 of the License.
|
5 |
+
|
6 |
+
jQuery News Ticker is distributed in the hope that it will be useful,
|
7 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
8 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
9 |
+
GNU General Public License for more details.
|
10 |
+
|
11 |
+
You should have received a copy of the GNU General Public License
|
12 |
+
along with jQuery News Ticker. If not, see <http://www.gnu.org/licenses/>.
|
13 |
+
*/
|
14 |
+
(function($){
|
15 |
+
$.fn.ticker = function(options) {
|
16 |
+
// Extend our default options with those provided.
|
17 |
+
// Note that the first arg to extend is an empty object -
|
18 |
+
// this is to keep from overriding our "defaults" object.
|
19 |
+
var opts = $.extend({}, $.fn.ticker.defaults, options);
|
20 |
+
|
21 |
+
// check that the passed element is actually in the DOM
|
22 |
+
if ($(this).length == 0) {
|
23 |
+
if (window.console && window.console.log) {
|
24 |
+
window.console.log('Element does not exist in DOM!');
|
25 |
+
}
|
26 |
+
else {
|
27 |
+
alert('Element does not exist in DOM!');
|
28 |
+
}
|
29 |
+
return false;
|
30 |
+
}
|
31 |
+
|
32 |
+
/* Get the id of the UL to get our news content from */
|
33 |
+
var newsID = '#' + $(this).attr('id');
|
34 |
+
|
35 |
+
/* Get the tag type - we will check this later to makde sure it is a UL tag */
|
36 |
+
var tagType = $(this).get(0).tagName;
|
37 |
+
|
38 |
+
return this.each(function() {
|
39 |
+
// get a unique id for this ticker
|
40 |
+
var uniqID = getUniqID();
|
41 |
+
|
42 |
+
/* Internal vars */
|
43 |
+
var settings = {
|
44 |
+
position: 0,
|
45 |
+
time: 0,
|
46 |
+
distance: 0,
|
47 |
+
newsArr: {},
|
48 |
+
play: true,
|
49 |
+
paused: false,
|
50 |
+
contentLoaded: false,
|
51 |
+
dom: {
|
52 |
+
contentID: '#ticker-content-' + uniqID,
|
53 |
+
titleID: '#ticker-title-' + uniqID,
|
54 |
+
titleElem: '#ticker-title-' + uniqID + ' SPAN',
|
55 |
+
tickerID : '#ticker-' + uniqID,
|
56 |
+
wrapperID: '#ticker-wrapper-' + uniqID,
|
57 |
+
revealID: '#ticker-swipe-' + uniqID,
|
58 |
+
revealElem: '#ticker-swipe-' + uniqID + ' SPAN',
|
59 |
+
controlsID: '#ticker-controls-' + uniqID,
|
60 |
+
prevID: '#prev-' + uniqID,
|
61 |
+
nextID: '#next-' + uniqID,
|
62 |
+
playPauseID: '#play-pause-' + uniqID
|
63 |
+
}
|
64 |
+
};
|
65 |
+
|
66 |
+
// if we are not using a UL, display an error message and stop any further execution
|
67 |
+
if (tagType != 'UL' && tagType != 'OL' && opts.htmlFeed === true) {
|
68 |
+
debugError('Cannot use <' + tagType.toLowerCase() + '> type of element for this plugin - must of type <ul> or <ol>');
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
|
72 |
+
// set the ticker direction
|
73 |
+
opts.direction == 'rtl' ? opts.direction = 'right' : opts.direction = 'left';
|
74 |
+
|
75 |
+
// lets go...
|
76 |
+
initialisePage();
|
77 |
+
/* Function to get the size of an Object*/
|
78 |
+
function countSize(obj) {
|
79 |
+
var size = 0, key;
|
80 |
+
for (key in obj) {
|
81 |
+
if (obj.hasOwnProperty(key)) size++;
|
82 |
+
}
|
83 |
+
return size;
|
84 |
+
};
|
85 |
+
|
86 |
+
function getUniqID() {
|
87 |
+
var newDate = new Date;
|
88 |
+
return newDate.getTime();
|
89 |
+
}
|
90 |
+
|
91 |
+
/* Function for handling debug and error messages */
|
92 |
+
function debugError(obj) {
|
93 |
+
if (opts.debugMode) {
|
94 |
+
if (window.console && window.console.log) {
|
95 |
+
window.console.log(obj);
|
96 |
+
}
|
97 |
+
else {
|
98 |
+
alert(obj);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
/* Function to setup the page */
|
104 |
+
function initialisePage() {
|
105 |
+
// process the content for this ticker
|
106 |
+
processContent();
|
107 |
+
|
108 |
+
// add our HTML structure for the ticker to the DOM
|
109 |
+
$(newsID).wrap('<div id="' + settings.dom.wrapperID.replace('#', '') + '"></div>');
|
110 |
+
|
111 |
+
// remove any current content inside this ticker
|
112 |
+
$(settings.dom.wrapperID).children().remove();
|
113 |
+
|
114 |
+
$(settings.dom.wrapperID).append('<div id="' + settings.dom.tickerID.replace('#', '') + '" class="ticker"><div id="' + settings.dom.titleID.replace('#', '') + '" class="ticker-title"><span><!-- --></span></div><p id="' + settings.dom.contentID.replace('#', '') + '" class="ticker-content"></p><div id="' + settings.dom.revealID.replace('#', '') + '" class="ticker-swipe"><span><!-- --></span></div></div>');
|
115 |
+
$(settings.dom.wrapperID).removeClass('no-js').addClass('ticker-wrapper has-js ' + opts.direction);
|
116 |
+
// hide the ticker
|
117 |
+
$(settings.dom.tickerElem + ',' + settings.dom.contentID).hide();
|
118 |
+
// add the controls to the DOM if required
|
119 |
+
if (opts.controls) {
|
120 |
+
// add related events - set functions to run on given event
|
121 |
+
$(settings.dom.controlsID).live('click mouseover mousedown mouseout mouseup', function (e) {
|
122 |
+
var button = e.target.id;
|
123 |
+
if (e.type == 'click') {
|
124 |
+
switch (button) {
|
125 |
+
case settings.dom.prevID.replace('#', ''):
|
126 |
+
// show previous item
|
127 |
+
settings.paused = true;
|
128 |
+
$(settings.dom.playPauseID).addClass('paused');
|
129 |
+
manualChangeContent('prev');
|
130 |
+
break;
|
131 |
+
case settings.dom.nextID.replace('#', ''):
|
132 |
+
// show next item
|
133 |
+
settings.paused = true;
|
134 |
+
$(settings.dom.playPauseID).addClass('paused');
|
135 |
+
manualChangeContent('next');
|
136 |
+
break;
|
137 |
+
case settings.dom.playPauseID.replace('#', ''):
|
138 |
+
// play or pause the ticker
|
139 |
+
if (settings.play == true) {
|
140 |
+
settings.paused = true;
|
141 |
+
$(settings.dom.playPauseID).addClass('paused');
|
142 |
+
pauseTicker();
|
143 |
+
}
|
144 |
+
else {
|
145 |
+
settings.paused = false;
|
146 |
+
$(settings.dom.playPauseID).removeClass('paused');
|
147 |
+
restartTicker();
|
148 |
+
}
|
149 |
+
break;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
else if (e.type == 'mouseover' && $('#' + button).hasClass('controls')) {
|
153 |
+
$('#' + button).addClass('over');
|
154 |
+
}
|
155 |
+
else if (e.type == 'mousedown' && $('#' + button).hasClass('controls')) {
|
156 |
+
$('#' + button).addClass('down');
|
157 |
+
}
|
158 |
+
else if (e.type == 'mouseup' && $('#' + button).hasClass('controls')) {
|
159 |
+
$('#' + button).removeClass('down');
|
160 |
+
}
|
161 |
+
else if (e.type == 'mouseout' && $('#' + button).hasClass('controls')) {
|
162 |
+
$('#' + button).removeClass('over');
|
163 |
+
}
|
164 |
+
});
|
165 |
+
// add controls HTML to DOM
|
166 |
+
$(settings.dom.wrapperID).append('<ul id="' + settings.dom.controlsID.replace('#', '') + '" class="ticker-controls"><li id="' + settings.dom.playPauseID.replace('#', '') + '" class="jnt-play-pause controls"><a href=""><!-- --></a></li><li id="' + settings.dom.prevID.replace('#', '') + '" class="jnt-prev controls"><a href=""><!-- --></a></li><li id="' + settings.dom.nextID.replace('#', '') + '" class="jnt-next controls"><a href=""><!-- --></a></li></ul>');
|
167 |
+
}
|
168 |
+
if (opts.displayType != 'fade') {
|
169 |
+
// add mouse over on the content
|
170 |
+
$(settings.dom.contentID).mouseover(function () {
|
171 |
+
if (settings.paused == false) {
|
172 |
+
pauseTicker();
|
173 |
+
}
|
174 |
+
}).mouseout(function () {
|
175 |
+
if (settings.paused == false) {
|
176 |
+
restartTicker();
|
177 |
+
}
|
178 |
+
});
|
179 |
+
}
|
180 |
+
// we may have to wait for the ajax call to finish here
|
181 |
+
if (!opts.ajaxFeed) {
|
182 |
+
setupContentAndTriggerDisplay();
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
/* Start to process the content for this ticker */
|
187 |
+
function processContent() {
|
188 |
+
|
189 |
+
// check to see if we need to load content
|
190 |
+
if (settings.contentLoaded == false) {
|
191 |
+
// construct content
|
192 |
+
if (opts.ajaxFeed) {
|
193 |
+
if (opts.feedType == 'xml') {
|
194 |
+
$.ajax({
|
195 |
+
url: opts.feedUrl,
|
196 |
+
cache: false,
|
197 |
+
dataType: opts.feedType,
|
198 |
+
async: true,
|
199 |
+
success: function(data){
|
200 |
+
count = 0;
|
201 |
+
// get the 'root' node
|
202 |
+
for (var a = 0; a < data.childNodes.length; a++) {
|
203 |
+
if (data.childNodes[a].nodeName == 'rss') {
|
204 |
+
xmlContent = data.childNodes[a];
|
205 |
+
}
|
206 |
+
}
|
207 |
+
// find the channel node
|
208 |
+
for (var i = 0; i < xmlContent.childNodes.length; i++) {
|
209 |
+
if (xmlContent.childNodes[i].nodeName == 'channel') {
|
210 |
+
xmlChannel = xmlContent.childNodes[i];
|
211 |
+
}
|
212 |
+
}
|
213 |
+
// for each item create a link and add the article title as the link text
|
214 |
+
for (var x = 0; x < xmlChannel.childNodes.length; x++) {
|
215 |
+
if (xmlChannel.childNodes[x].nodeName == 'item') {
|
216 |
+
xmlItems = xmlChannel.childNodes[x];
|
217 |
+
var title, link = false;
|
218 |
+
for (var y = 0; y < xmlItems.childNodes.length; y++) {
|
219 |
+
if (xmlItems.childNodes[y].nodeName == 'title') {
|
220 |
+
title = xmlItems.childNodes[y].lastChild.nodeValue;
|
221 |
+
}
|
222 |
+
else if (xmlItems.childNodes[y].nodeName == 'link') {
|
223 |
+
link = xmlItems.childNodes[y].lastChild.nodeValue;
|
224 |
+
}
|
225 |
+
if ((title !== false && title != '') && link !== false) {
|
226 |
+
settings.newsArr['item-' + count] = { type: opts.titleText, content: '<a href="' + link + '">' + title + '</a>' }; count++; title = false; link = false;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
}
|
230 |
+
}
|
231 |
+
// quick check here to see if we actually have any content - log error if not
|
232 |
+
if (countSize(settings.newsArr < 1)) {
|
233 |
+
debugError('Couldn\'t find any content from the XML feed for the ticker to use!');
|
234 |
+
return false;
|
235 |
+
}
|
236 |
+
settings.contentLoaded = true;
|
237 |
+
setupContentAndTriggerDisplay();
|
238 |
+
}
|
239 |
+
});
|
240 |
+
}
|
241 |
+
else {
|
242 |
+
debugError('Code Me!');
|
243 |
+
}
|
244 |
+
}
|
245 |
+
|
246 |
+
else if (opts.htmlFeed) {
|
247 |
+
if($(newsID + ' LI').length > 0) {
|
248 |
+
$(newsID + ' LI').each(function (i) {
|
249 |
+
// maybe this could be one whole object and not an array of objects?
|
250 |
+
settings.newsArr['item-' + i] = { type: opts.titleText, content: $(this).html()};
|
251 |
+
});
|
252 |
+
}
|
253 |
+
else {
|
254 |
+
debugError('Couldn\'t find HTML any content for the ticker to use!');
|
255 |
+
return false;
|
256 |
+
}
|
257 |
+
}
|
258 |
+
else {
|
259 |
+
debugError('The ticker is set to not use any types of content! Check the settings for the ticker.');
|
260 |
+
return false;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
function setupContentAndTriggerDisplay() {
|
266 |
+
|
267 |
+
settings.contentLoaded = true;
|
268 |
+
|
269 |
+
// update the ticker content with the correct item
|
270 |
+
// insert news content into DOM
|
271 |
+
$(settings.dom.titleElem).html(settings.newsArr['item-' + settings.position].type);
|
272 |
+
$(settings.dom.contentID).html(settings.newsArr['item-' + settings.position].content);
|
273 |
+
|
274 |
+
// set the next content item to be used - loop round if we are at the end of the content
|
275 |
+
if (settings.position == (countSize(settings.newsArr) -1)) {
|
276 |
+
settings.position = 0;
|
277 |
+
}
|
278 |
+
else {
|
279 |
+
settings.position++;
|
280 |
+
}
|
281 |
+
|
282 |
+
// get the values of content and set the time of the reveal (so all reveals have the same speed regardless of content size)
|
283 |
+
distance = $(settings.dom.contentID).width();
|
284 |
+
time = distance / opts.speed;
|
285 |
+
|
286 |
+
// start the ticker animation
|
287 |
+
revealContent();
|
288 |
+
}
|
289 |
+
|
290 |
+
// slide back cover or fade in content
|
291 |
+
function revealContent() {
|
292 |
+
$(settings.dom.contentID).css('opacity', '1');
|
293 |
+
if(settings.play) {
|
294 |
+
// get the width of the title element to offset the content and reveal
|
295 |
+
var offset = $(settings.dom.titleID).width() + 20;
|
296 |
+
|
297 |
+
$(settings.dom.revealID).css(opts.direction, offset + 'px');
|
298 |
+
// show the reveal element and start the animation
|
299 |
+
if (opts.displayType == 'fade') {
|
300 |
+
// fade in effect ticker
|
301 |
+
$(settings.dom.revealID).hide(0, function () {
|
302 |
+
$(settings.dom.contentID).css(opts.direction, offset + 'px').fadeIn(opts.fadeInSpeed, postReveal);
|
303 |
+
});
|
304 |
+
}
|
305 |
+
else if (opts.displayType == 'scroll') {
|
306 |
+
// to code
|
307 |
+
}
|
308 |
+
else {
|
309 |
+
// default bbc scroll effect
|
310 |
+
$(settings.dom.revealElem).show(0, function () {
|
311 |
+
$(settings.dom.contentID).css(opts.direction, offset + 'px').show();
|
312 |
+
// set our animation direction
|
313 |
+
animationAction = opts.direction == 'right' ? { marginRight: distance + 'px'} : { marginLeft: distance + 'px' };
|
314 |
+
$(settings.dom.revealID).css('margin-' + opts.direction, '0px').delay(20).animate(animationAction, time, 'linear', postReveal);
|
315 |
+
});
|
316 |
+
}
|
317 |
+
}
|
318 |
+
else {
|
319 |
+
return false;
|
320 |
+
}
|
321 |
+
};
|
322 |
+
|
323 |
+
// here we hide the current content and reset the ticker elements to a default state ready for the next ticker item
|
324 |
+
function postReveal() {
|
325 |
+
if(settings.play) {
|
326 |
+
// we have to separately fade the content out here to get around an IE bug - needs further investigation
|
327 |
+
$(settings.dom.contentID).delay(opts.pauseOnItems).fadeOut(opts.fadeOutSpeed);
|
328 |
+
// deal with the rest of the content, prepare the DOM and trigger the next ticker
|
329 |
+
if (opts.displayType == 'fade') {
|
330 |
+
$(settings.dom.contentID).fadeOut(opts.fadeOutSpeed, function () {
|
331 |
+
$(settings.dom.wrapperID)
|
332 |
+
.find(settings.dom.revealElem + ',' + settings.dom.contentID)
|
333 |
+
.hide()
|
334 |
+
.end().find(settings.dom.tickerID + ',' + settings.dom.revealID)
|
335 |
+
.show()
|
336 |
+
.end().find(settings.dom.tickerID + ',' + settings.dom.revealID)
|
337 |
+
.removeAttr('style');
|
338 |
+
setupContentAndTriggerDisplay();
|
339 |
+
});
|
340 |
+
}
|
341 |
+
else {
|
342 |
+
$(settings.dom.revealID).hide(0, function () {
|
343 |
+
$(settings.dom.contentID).fadeOut(opts.fadeOutSpeed, function () {
|
344 |
+
$(settings.dom.wrapperID)
|
345 |
+
.find(settings.dom.revealElem + ',' + settings.dom.contentID)
|
346 |
+
.hide()
|
347 |
+
.end().find(settings.dom.tickerID + ',' + settings.dom.revealID)
|
348 |
+
.show()
|
349 |
+
.end().find(settings.dom.tickerID + ',' + settings.dom.revealID)
|
350 |
+
.removeAttr('style');
|
351 |
+
setupContentAndTriggerDisplay();
|
352 |
+
});
|
353 |
+
});
|
354 |
+
}
|
355 |
+
}
|
356 |
+
else {
|
357 |
+
$(settings.dom.revealElem).hide();
|
358 |
+
}
|
359 |
+
}
|
360 |
+
|
361 |
+
// pause ticker
|
362 |
+
function pauseTicker() {
|
363 |
+
settings.play = false;
|
364 |
+
// stop animation and show content - must pass "true, true" to the stop function, or we can get some funky behaviour
|
365 |
+
$(settings.dom.tickerID + ',' + settings.dom.revealID + ',' + settings.dom.titleID + ',' + settings.dom.titleElem + ',' + settings.dom.revealElem + ',' + settings.dom.contentID).stop(true, true);
|
366 |
+
$(settings.dom.revealID + ',' + settings.dom.revealElem).hide();
|
367 |
+
$(settings.dom.wrapperID)
|
368 |
+
.find(settings.dom.titleID + ',' + settings.dom.titleElem).show()
|
369 |
+
.end().find(settings.dom.contentID).show();
|
370 |
+
}
|
371 |
+
|
372 |
+
// play ticker
|
373 |
+
function restartTicker() {
|
374 |
+
settings.play = true;
|
375 |
+
settings.paused = false;
|
376 |
+
// start the ticker again
|
377 |
+
postReveal();
|
378 |
+
}
|
379 |
+
|
380 |
+
// change the content on user input
|
381 |
+
function manualChangeContent(direction) {
|
382 |
+
pauseTicker();
|
383 |
+
switch (direction) {
|
384 |
+
case 'prev':
|
385 |
+
if (settings.position == 0) {
|
386 |
+
settings.position = countSize(settings.newsArr) -2;
|
387 |
+
}
|
388 |
+
else if (settings.position == 1) {
|
389 |
+
settings.position = countSize(settings.newsArr) -1;
|
390 |
+
}
|
391 |
+
else {
|
392 |
+
settings.position = settings.position - 2;
|
393 |
+
}
|
394 |
+
$(settings.dom.titleElem).html(settings.newsArr['item-' + settings.position].type);
|
395 |
+
$(settings.dom.contentID).html(settings.newsArr['item-' + settings.position].content);
|
396 |
+
break;
|
397 |
+
case 'next':
|
398 |
+
$(settings.dom.titleElem).html(settings.newsArr['item-' + settings.position].type);
|
399 |
+
$(settings.dom.contentID).html(settings.newsArr['item-' + settings.position].content);
|
400 |
+
break;
|
401 |
+
}
|
402 |
+
// set the next content item to be used - loop round if we are at the end of the content
|
403 |
+
if (settings.position == (countSize(settings.newsArr) -1)) {
|
404 |
+
settings.position = 0;
|
405 |
+
}
|
406 |
+
else {
|
407 |
+
settings.position++;
|
408 |
+
}
|
409 |
+
}
|
410 |
+
});
|
411 |
+
};
|
412 |
+
|
413 |
+
// plugin defaults - added as a property on our plugin function
|
414 |
+
$.fn.ticker.defaults = {
|
415 |
+
speed: 0.10,
|
416 |
+
ajaxFeed: false,
|
417 |
+
feedUrl: '',
|
418 |
+
feedType: 'xml',
|
419 |
+
displayType: 'reveal',
|
420 |
+
htmlFeed: true,
|
421 |
+
debugMode: true,
|
422 |
+
controls: true,
|
423 |
+
titleText: 'Latest',
|
424 |
+
direction: 'ltr',
|
425 |
+
pauseOnItems: 3000,
|
426 |
+
fadeInSpeed: 600,
|
427 |
+
fadeOutSpeed: 300
|
428 |
+
};
|
429 |
+
})(jQuery);
|
skin/frontend/default/default/news/js/site.js
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var $jquey = jQuery.noConflict();
|
2 |
+
|
3 |
+
$jquey(function () {
|
4 |
+
// start the ticker
|
5 |
+
$jquey('#js-news').ticker();
|
6 |
+
|
7 |
+
// hide the release history when the page loads
|
8 |
+
$jquey('#release-wrapper').css('margin-top', '-' + ($jquey('#release-wrapper').height() + 20) + 'px');
|
9 |
+
|
10 |
+
// show/hide the release history on click
|
11 |
+
$jquey('a[href="#release-history"]').toggle(function () {
|
12 |
+
$jquey('#release-wrapper').animate({
|
13 |
+
marginTop: '0px'
|
14 |
+
}, 600, 'linear');
|
15 |
+
}, function () {
|
16 |
+
$jquey('#release-wrapper').animate({
|
17 |
+
marginTop: '-' + ($jquey('#release-wrapper').height() + 20) + 'px'
|
18 |
+
}, 600, 'linear');
|
19 |
+
});
|
20 |
+
|
21 |
+
$jquey('#download a').mousedown(function () {
|
22 |
+
_gaq.push(['_trackEvent', 'download-button', 'clicked'])
|
23 |
+
});
|
24 |
+
});
|
25 |
+
|
26 |
+
// google analytics code
|
27 |
+
var _gaq = _gaq || [];
|
28 |
+
_gaq.push(['_setAccount', 'UA-6132309-2']);
|
29 |
+
_gaq.push(['_setDomainName', 'www.jquerynewsticker.com']);
|
30 |
+
_gaq.push(['_trackPageview']);
|
31 |
+
|
32 |
+
(function() {
|
33 |
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
34 |
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
35 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
36 |
+
})();
|