Version Notes
Version number: 1.0.3
Stability: Stable
Compatibility: 1.4, 1.5, 1.6, 1.7
Download this release
Release Info
Developer | Magento Core Team |
Extension | CommerceLab_News |
Version | 1.0.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.3.1
app/code/community/CommerceLab/News/Block/Adminhtml/News/Edit.php
CHANGED
@@ -36,17 +36,27 @@ class CommerceLab_News_Block_Adminhtml_News_Edit extends Mage_Adminhtml_Block_Wi
|
|
36 |
|
37 |
$this->_formScripts[] = "
|
38 |
function toggleEditor() {
|
39 |
-
tinyMCE.
|
40 |
-
|
41 |
-
tinyMCE.execCommand('mceAddControl', false, 'block_content');
|
42 |
} else {
|
43 |
-
tinyMCE.execCommand('mceRemoveControl', false, '
|
44 |
}
|
45 |
}
|
46 |
|
47 |
function saveAndContinueEdit(){
|
48 |
editForm.submit($('edit_form').action+'back/edit/');
|
49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
";
|
51 |
}
|
52 |
|
36 |
|
37 |
$this->_formScripts[] = "
|
38 |
function toggleEditor() {
|
39 |
+
if (tinyMCE.getInstanceById('clnews_content') == null) {
|
40 |
+
tinyMCE.execCommand('mceAddControl', false, 'clnews_content');
|
|
|
41 |
} else {
|
42 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'clnews_content');
|
43 |
}
|
44 |
}
|
45 |
|
46 |
function saveAndContinueEdit(){
|
47 |
editForm.submit($('edit_form').action+'back/edit/');
|
48 |
}
|
49 |
+
|
50 |
+
function checkboxSwitch(){
|
51 |
+
if (jQuery('#use_full_img').is(':checked')) {
|
52 |
+
jQuery('#image_short_content').parent().parent().css('display','none');
|
53 |
+
} else {
|
54 |
+
jQuery('#image_short_content').parent().parent().css('display', 'table-row');
|
55 |
+
jQuery('#image_short_content').siblings('a').css('float', 'left');
|
56 |
+
jQuery('#image_short_content').siblings('a').css('margin-right', '4px');
|
57 |
+
jQuery('#image_short_content').parent().parent().css('width','155px');
|
58 |
+
}
|
59 |
+
}
|
60 |
";
|
61 |
}
|
62 |
|
app/code/community/CommerceLab/News/Block/Adminhtml/News/Edit/Tab/Info.php
CHANGED
@@ -19,7 +19,6 @@ class CommerceLab_News_Block_Adminhtml_News_Edit_Tab_Info extends Mage_Adminhtml
|
|
19 |
{
|
20 |
public function initForm()
|
21 |
{
|
22 |
-
|
23 |
$form = new Varien_Data_Form();
|
24 |
|
25 |
$fieldset = $form->addFieldset('news_form', array('legend'=>Mage::helper('clnews')->__('News information')));
|
@@ -152,35 +151,36 @@ class CommerceLab_News_Block_Adminhtml_News_Edit_Tab_Info extends Mage_Adminhtml
|
|
152 |
'value' => $tag,
|
153 |
'after_element_html' => '<div class="hint"><p class="note">'.$this->__('Use comma for multiple words').'</p></div>',
|
154 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
-
|
157 |
-
'
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
$fieldset->addField('image_short_content', 'image', array(
|
165 |
-
'label' => Mage::helper('clnews')->__('Image for Short Description'),
|
166 |
-
'required' => false,
|
167 |
-
'name' => 'image_short_content',
|
168 |
-
'after_element_html' => '<script type="text/javascript">
|
169 |
-
if (!document.getElementById("use_full_img").checked) {
|
170 |
-
document.getElementById("image_short_content").disabled=0;
|
171 |
-
} else {
|
172 |
-
document.getElementById("image_short_content").disabled=1;
|
173 |
-
}
|
174 |
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
};
|
182 |
-
</script>',
|
183 |
-
));
|
184 |
|
185 |
$fieldset->addField('short_height_resize', 'text', array(
|
186 |
'label' => Mage::helper('clnews')->__('Resize Image Height'),
|
@@ -219,7 +219,8 @@ class CommerceLab_News_Block_Adminhtml_News_Edit_Tab_Info extends Mage_Adminhtml
|
|
219 |
'name' => 'short_content',
|
220 |
'label' => Mage::helper('clnews')->__('Short Description'),
|
221 |
'title' => Mage::helper('clnews')->__('Short Description'),
|
222 |
-
'config' => Mage::getSingleton('clnews/wysiwyg_config')->getConfig()
|
|
|
223 |
));
|
224 |
|
225 |
$fieldset->addField('image_full_content', 'image', array(
|
@@ -267,7 +268,8 @@ class CommerceLab_News_Block_Adminhtml_News_Edit_Tab_Info extends Mage_Adminhtml
|
|
267 |
'label' => Mage::helper('clnews')->__('Full Description'),
|
268 |
'title' => Mage::helper('clnews')->__('Full Description'),
|
269 |
'style' => 'height:36em',
|
270 |
-
'config' => Mage::getSingleton('clnews/wysiwyg_config')->getConfig()
|
|
|
271 |
));
|
272 |
|
273 |
|
@@ -275,7 +277,11 @@ class CommerceLab_News_Block_Adminhtml_News_Edit_Tab_Info extends Mage_Adminhtml
|
|
275 |
$form->setValues(Mage::getSingleton('adminhtml/session')->getNewsData());
|
276 |
Mage::getSingleton('adminhtml/session')->setNewsData(null);
|
277 |
} elseif ( Mage::registry('clnews_data') ) {
|
278 |
-
$
|
|
|
|
|
|
|
|
|
279 |
}
|
280 |
$this->setForm($form);
|
281 |
return $this;
|
19 |
{
|
20 |
public function initForm()
|
21 |
{
|
|
|
22 |
$form = new Varien_Data_Form();
|
23 |
|
24 |
$fieldset = $form->addFieldset('news_form', array('legend'=>Mage::helper('clnews')->__('News information')));
|
151 |
'value' => $tag,
|
152 |
'after_element_html' => '<div class="hint"><p class="note">'.$this->__('Use comma for multiple words').'</p></div>',
|
153 |
));
|
154 |
+
$data = Mage::registry('clnews_data');
|
155 |
+
if ($data && (($data->getImageShortContent() == $data->getImageFullContent()) || $data->getImageShortContent() == '' || !$data->getImageShortContent())) {
|
156 |
+
$fieldset->addField('use_full_img', 'checkbox', array(
|
157 |
+
'label' => Mage::helper('clnews')->__('Use Full Description Image'),
|
158 |
+
'required' => false,
|
159 |
+
'name' => 'use_full_img',
|
160 |
+
'onclick' => 'checkboxSwitch();',
|
161 |
+
'checked' => true,
|
162 |
+
));
|
163 |
+
$fieldset->addField('image_short_content', 'image', array(
|
164 |
+
'label' => Mage::helper('clnews')->__('Image for Short Description'),
|
165 |
+
'required' => false,
|
166 |
+
'name' => 'image_short_content',
|
167 |
+
'after_element_html' => '<script type="text/javascript">jQuery("#image_short_content").parent().parent().css("display","none");</script>',
|
168 |
+
));
|
169 |
|
170 |
+
} else {
|
171 |
+
$fieldset->addField('use_full_img', 'checkbox', array(
|
172 |
+
'label' => Mage::helper('clnews')->__('Use Full Description Image'),
|
173 |
+
'required' => false,
|
174 |
+
'name' => 'use_full_img',
|
175 |
+
'onclick' => 'checkboxSwitch();'
|
176 |
+
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
+
$fieldset->addField('image_short_content', 'image', array(
|
179 |
+
'label' => Mage::helper('clnews')->__('Image for Short Description'),
|
180 |
+
'required' => false,
|
181 |
+
'name' => 'image_short_content',
|
182 |
+
));
|
183 |
+
}
|
|
|
|
|
|
|
184 |
|
185 |
$fieldset->addField('short_height_resize', 'text', array(
|
186 |
'label' => Mage::helper('clnews')->__('Resize Image Height'),
|
219 |
'name' => 'short_content',
|
220 |
'label' => Mage::helper('clnews')->__('Short Description'),
|
221 |
'title' => Mage::helper('clnews')->__('Short Description'),
|
222 |
+
'config' => Mage::getSingleton('clnews/wysiwyg_config')->getConfig(),
|
223 |
+
'wysiwyg' => true
|
224 |
));
|
225 |
|
226 |
$fieldset->addField('image_full_content', 'image', array(
|
268 |
'label' => Mage::helper('clnews')->__('Full Description'),
|
269 |
'title' => Mage::helper('clnews')->__('Full Description'),
|
270 |
'style' => 'height:36em',
|
271 |
+
'config' => Mage::getSingleton('clnews/wysiwyg_config')->getConfig(),
|
272 |
+
'wysiwyg' => true
|
273 |
));
|
274 |
|
275 |
|
277 |
$form->setValues(Mage::getSingleton('adminhtml/session')->getNewsData());
|
278 |
Mage::getSingleton('adminhtml/session')->setNewsData(null);
|
279 |
} elseif ( Mage::registry('clnews_data') ) {
|
280 |
+
$data = Mage::registry('clnews_data');
|
281 |
+
if (($data->getImageShortContent() == $data->getImageFullContent()) || $data->getImageShortContent() == '' || !$data->getImageShortContent()) {
|
282 |
+
$data->setUseFullImg(1);
|
283 |
+
}
|
284 |
+
$form->setValues($data->getData());
|
285 |
}
|
286 |
$this->setForm($form);
|
287 |
return $this;
|
app/design/adminhtml/default/default/layout/clnews.xml
CHANGED
@@ -32,6 +32,8 @@
|
|
32 |
<action method="addJs"><script>prototype/window.js</script></action>
|
33 |
<action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
|
34 |
<action method="addItem"><type>js_css</type><name>prototype/windows/themes/commercelab/magento.css</name></action>
|
|
|
|
|
35 |
</reference>
|
36 |
</default>
|
37 |
</layout>
|
32 |
<action method="addJs"><script>prototype/window.js</script></action>
|
33 |
<action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
|
34 |
<action method="addItem"><type>js_css</type><name>prototype/windows/themes/commercelab/magento.css</name></action>
|
35 |
+
<action method="addJs"><script>commercelab/jquery-1.4.2.min.js</script></action>
|
36 |
+
<action method="addJs"><script>commercelab/noconflict.js</script></action>
|
37 |
</reference>
|
38 |
</default>
|
39 |
</layout>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>CommerceLab_News</name>
|
4 |
-
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -39,9 +39,9 @@
|
|
39 |
Stability: Stable
|
40 |
Compatibility: 1.4, 1.5, 1.6, 1.7</notes>
|
41 |
<authors><author><name>CommerceLab</name><user>auto-converted</user><email>support@commerce-lab.com</email></author></authors>
|
42 |
-
<date>2013-02-
|
43 |
-
<time>
|
44 |
-
<contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="CommerceLab"><dir name="News"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="Edit"><file name="Form.php" hash="9f656f81ee3e8a7ec275bfd7818f2b2e"/></dir><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Action.php" hash="768aa10696beb070c5fc9eec9f0141c2"/><file name="SubCategories.php" hash="cc1eac066648cee1cabe3667625a5662"/></dir></dir></dir><file name="Edit.php" hash="5352d9211733adeb9c1c9b463d229fb4"/><file name="Grid.php" hash="fe20f872e49926e54fa91d9b616eccd2"/></dir><dir name="Comment"><dir name="Edit"><file name="Form.php" hash="8d52c5840c93dc462ab7d07a21d875e4"/></dir><file name="Edit.php" hash="44647da407fffe74595a7787d99addca"/><file name="Grid.php" hash="8ae3a0eb316e5ea705408e04f1d8d227"/></dir><dir name="News"><dir name="Edit"><dir name="Tab"><file name="Additional.php" hash="48b6bca5f84a413a7c2abc188aa7f7d7"/><file name="Info.php" hash="
|
45 |
<compatible/>
|
46 |
<dependencies/>
|
47 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>CommerceLab_News</name>
|
4 |
+
<version>1.0.3.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
39 |
Stability: Stable
|
40 |
Compatibility: 1.4, 1.5, 1.6, 1.7</notes>
|
41 |
<authors><author><name>CommerceLab</name><user>auto-converted</user><email>support@commerce-lab.com</email></author></authors>
|
42 |
+
<date>2013-02-05</date>
|
43 |
+
<time>10:58:34</time>
|
44 |
+
<contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="CommerceLab"><dir name="News"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="Edit"><file name="Form.php" hash="9f656f81ee3e8a7ec275bfd7818f2b2e"/></dir><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Action.php" hash="768aa10696beb070c5fc9eec9f0141c2"/><file name="SubCategories.php" hash="cc1eac066648cee1cabe3667625a5662"/></dir></dir></dir><file name="Edit.php" hash="5352d9211733adeb9c1c9b463d229fb4"/><file name="Grid.php" hash="fe20f872e49926e54fa91d9b616eccd2"/></dir><dir name="Comment"><dir name="Edit"><file name="Form.php" hash="8d52c5840c93dc462ab7d07a21d875e4"/></dir><file name="Edit.php" hash="44647da407fffe74595a7787d99addca"/><file name="Grid.php" hash="8ae3a0eb316e5ea705408e04f1d8d227"/></dir><dir name="News"><dir name="Edit"><dir name="Tab"><file name="Additional.php" hash="48b6bca5f84a413a7c2abc188aa7f7d7"/><file name="Info.php" hash="7625c507b3b537ae683418e1c8111039"/></dir><file name="Form.php" hash="c137eca6d32e407cc6313b943ec3ef13"/><file name="Tabs.php" hash="2a24e69b73d59b1e6e8b8aca166b27e9"/></dir><file name="Edit.php" hash="ad5e3b0e2911d187b5a489ab826fcea4"/><file name="Grid.php" hash="aa23af27b5944362d4279d95c75765f2"/></dir><file name="Category.php" hash="39f20ab1d793ab32a9cc1fcebdd6f9ac"/><file name="Comment.php" hash="1d652f6c740eaa2a1b28edb2cb03cc01"/><file name="News.php" hash="5a4483a050582fc9738582988439fea2"/></dir><file name="News.php" hash="94de5b2bdc71f68ce3e0eb4a30349253"/><file name="Newsitem.php" hash="26d96559a3bf62e03ea5b3f15716a374"/><file name="Rss.php" hash="70d3ffe74cbb107893782f5c8f40ab65"/></dir><dir name="Controller"><file name="Router.php" hash="b24028480568dbc4b1e4ff4a7902a4ba"/></dir><dir name="Helper"><file name="Data.php" hash="050b83a714d594dffa8885936a8e3191"/><file name="Versions.php" hash="1a57f869d355cf167f64eb7e9070294b"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="d38fe5d97a94566ea9a764e0a22616c1"/></dir><dir name="Comment"><file name="Collection.php" hash="2c7ce498edac7667c17ecdefb1e01ce3"/></dir><dir name="News"><file name="Collection.php" hash="6476e44afa6eb8b4e75fa937ff5bcb53"/></dir><file name="Category.php" hash="b5d406f334591f2c17148c1a2beb57b2"/><file name="Comment.php" hash="95c98f86dd1a056ad1d81d9f09040d64"/><file name="News.php" hash="43a2482fbb9fd3c38c39c0aeb75d7698"/></dir><dir name="Wysiwyg"><file name="Config.php" hash="6eead5875889bfb7d3d8aabd635a3754"/></dir><file name="Category.php" hash="c38405d019b51fa9670909c40560a9f8"/><file name="Check.php" hash="1ad77d86702648a3149cce1de6cacb84"/><file name="Comment.php" hash="2dbdccefbe89486e952b0c9ccbc74ad1"/><file name="News.php" hash="8b2ae4315e499a9e510df1c6149b10cc"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategoryController.php" hash="672617c54b396226e00dee879734a829"/><file name="CommentController.php" hash="cebc87be1b0ae7365c986c2f508b0b06"/><file name="NewsController.php" hash="f87a09573a8b13e5f643487f88296fae"/></dir><file name="IndexController.php" hash="b6caf5dce8e69ca0bccb4f741676245d"/><file name="NewsitemController.php" hash="de645790d618a1bc7bc9e150c72420a6"/><file name="RssController.php" hash="f829908e5558e2d2b92422a51e54f0a3"/></dir><dir name="etc"><file name="config.xml" hash="cc2675f1c40cc9780ecaf009a2819ffa"/><file name="system.xml" hash="c29ed6e0c278127d5a4651af0246bcca"/></dir><dir name="sql"><dir name="clnews_setup"><file name="mysql4-install-1.0.0.php" hash="1ac289b76f5999eb73839252c26185fa"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="3efb7204344043f03de7287073b310a8"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="clnews.xml" hash="49d8f85ce4e3a80829439d9fe43d4cb8"/></dir><dir name="template"><dir name="clnews"><file name="latest.phtml" hash="c469069d2d68a260fa95adf4b2dc0c92"/><file name="list.phtml" hash="9c7cc5f4daf24b91478dba2770488dad"/><file name="menu.phtml" hash="e940cc1614de26e74d0001b6711cc319"/><file name="news_print.phtml" hash="9218f004a53461cf619db384b3d12ea1"/><file name="newsitem.phtml" hash="226d0869b3dd821aa875c0b08e408503"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="clnews.xml" hash="f15b74649d6bd46af20a6cc4dd2aade4"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="CommerceLab_News.xml" hash="8da22cde4606bb3f8a30d40c4dbda6ee"/></dir></dir><dir name="locale"><dir name="en_US"><file name="CommerceLab_News.csv" hash="19738af0c851c532ca1f035d8ef8924d"/></dir><dir name="it_IT"><file name="CommerceLab_News.csv" hash="c1a45f82e5330c45b26c7c2fc4260dfc"/></dir><dir name="de_DE"><file name="CommerceLab_News.csv" hash="512af432844a180e2f619510c2cbe68a"/></dir></dir></dir><dir name="js"><dir name="commercelab"><dir name="treeview"><file name="jquery.treeview.pack.js" hash="d1acfe09a5cb97d93ab167952c550a7d"/></dir><dir name="clnews"><file name="news.js" hash="063c7018b7b4f7895d78a63b5a58448f"/></dir><file name="noconflict.js" hash="22e97cd4bf445c956c7ccee56fa433c2"/><file name="category_tree.js" hash="2369a2d52e678de6f5fc0669492d2fda"/></dir><dir name="jquery"><file name="jquery-1.4.4.js" hash="1e2ef16563c5939f247626c6147045aa"/><file name="jquery-1.7.1-min.js" hash="de56dbfca517764d9d056e82068f8d39"/></dir><dir name="prototype"><dir name="windows"><dir name="themes"><dir name="commercelab"><dir name="magento"><file name="btn_bg.gif" hash="37c51a4d48a92da9648dcd3ca011039f"/><file name="content_bg.gif" hash="21278ea0da2d4256f4ced96b6080ba2e"/><file name="top_bg.gif" hash="26f28090de87d64f9b01bf624f89bfe2"/><file name="window_close.png" hash="3af14f053f360bf31f8ba2df73ec7f1e"/></dir><file name="magento.css" hash="a0b153cee7655dad31ee2923657cc08a"/></dir></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="clnews"><dir name="images"><file name="i-tags.gif" hash="d8acce70b98a2c5827ba8bd6ee166d6d"/><file name="i_attached.gif" hash="4e277173b6372b1a90b0f19e0388ad54"/><file name="i_print.gif" hash="0aed138181495642e9ab29e55d194d40"/><file name="rss.gif" hash="d17678b5dab15949ed62bea2b602090f"/></dir><file name="style.css" hash="02684062443683d8310010a2b73d1c92"/></dir><dir name="commercelab"><dir name="treeview"><dir name="images"><file name="file.gif" hash="9ab0e28d85d8ab5eb954fc28f6ac1e80"/><file name="folder-closed.gif" hash="262d69b7ca267be1994fca2aba46be32"/><file name="folder.gif" hash="9f41e1454905fd7416f89aa4380a65e1"/><file name="minus.gif" hash="e009322a00011359f76cf7ae59b4d33d"/><file name="plus.gif" hash="6c46b98e0c60e6dc2ef14f9d4a6607b8"/><file name="treeview-black-line.gif" hash="0cdd968bdb2f2852ec71e0264b3292cc"/><file name="treeview-black.gif" hash="a3ffb8abd978b0464f7b5b508fcfdef0"/><file name="treeview-default-line.gif" hash="5e3c0e0c48f48c23c45aef7b72c739c0"/><file name="treeview-default.gif" hash="46878a9b3ede269c4e234550c9c89cd0"/><file name="treeview-famfamfam-line.gif" hash="18b3e43abad26bdac6f4cea944777b62"/><file name="treeview-famfamfam.gif" hash="dc335e786863262f594737e26198009c"/><file name="treeview-gray-line.gif" hash="9c2613b4de53f939bc770983976f66cd"/><file name="treeview-gray.gif" hash="02b42894653cfd82e52aac669ad078ed"/><file name="treeview-red-line.gif" hash="feda280e7bffb057ca4c87491aab6943"/><file name="treeview-red.gif" hash="c94a07253c14c98fe69dffafb59228a5"/></dir><file name="jquery.treeview.css" hash="81ec9c30fb5b30b8811d8e182c065f16"/></dir></dir></dir><dir name="images"><dir name="clnews"><file name="ajax-loader.gif" hash="7b9776076d5fceef4993b55c9383dedd"/></dir></dir></dir></dir></dir></dir><dir name="."><file name="EULA.pdf" hash="11b09816c8f293f077309b2abd85da66"/><file name="News 2.2 - User Guide.pdf" hash="5b056cef63db21bd262c46076cb05a65"/></dir></target></contents>
|
45 |
<compatible/>
|
46 |
<dependencies/>
|
47 |
</package>
|