Version Notes
The possibility to change the notification position to be at the top or at the bottom (individually for Magento Frontend and Backend) was added.
Download this release
Release Info
Developer | Magento Core Team |
Extension | AddInMage_ToastNotifications |
Version | 1.1.0 |
Comparing to | |
See all releases |
Version 1.1.0
- app/code/local/AddInMage/ToastNotifications/Block/Description.php +52 -0
- app/code/local/AddInMage/ToastNotifications/Block/Messages.php +158 -0
- app/code/local/AddInMage/ToastNotifications/Helper/Data.php +40 -0
- app/code/local/AddInMage/ToastNotifications/Helper/Setup.php +54 -0
- app/code/local/AddInMage/ToastNotifications/Model/Configuration/Modes.php +53 -0
- app/code/local/AddInMage/ToastNotifications/Model/Configuration/Opacity.php +85 -0
- app/code/local/AddInMage/ToastNotifications/Model/Configuration/Position.php +53 -0
- app/code/local/AddInMage/ToastNotifications/Model/Mysql4/Setup.php +40 -0
- app/code/local/AddInMage/ToastNotifications/etc/adminhtml.xml +67 -0
- app/code/local/AddInMage/ToastNotifications/etc/config.xml +139 -0
- app/code/local/AddInMage/ToastNotifications/etc/system.xml +264 -0
- app/code/local/AddInMage/ToastNotifications/sql/toastnotifications_setup/mysql4-install-1.1.0.php +42 -0
- app/design/adminhtml/default/default/layout/addinmage/toastnotifications.xml +54 -0
- app/design/adminhtml/default/default/template/addinmage/toastnotifications/description.phtml +41 -0
- app/design/frontend/base/default/layout/addinmage/toastnotifications.xml +54 -0
- app/etc/modules/AddInMage_ToastNotifications.xml +44 -0
- app/locale/en_US/AddInMage_ToastNotifications.csv +32 -0
- js/addinmage/toastnotifications/toastnotifications.js +218 -0
- package.xml +18 -0
- skin/adminhtml/default/default/addinmage/toastnotifications/add-in-mage-tab-bg.png +0 -0
- skin/adminhtml/default/default/addinmage/toastnotifications/config-styles.css +38 -0
- skin/adminhtml/default/default/addinmage/toastnotifications/toastnotifications.css +78 -0
- skin/frontend/base/default/css/addinmage/toastnotifications/toastnotifications.css +110 -0
app/code/local/AddInMage/ToastNotifications/Block/Description.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
class AddInMage_ToastNotifications_Block_Description extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
|
38 |
+
{
|
39 |
+
protected $_template = 'addinmage/toastnotifications/description.phtml';
|
40 |
+
|
41 |
+
protected function _prepareLayout()
|
42 |
+
{
|
43 |
+
$headBlock = $this->getLayout()->getBlock('head');
|
44 |
+
$headBlock->addCss('addinmage/toastnotifications/config-styles.css');
|
45 |
+
}
|
46 |
+
|
47 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
48 |
+
{
|
49 |
+
return $this->toHtml();
|
50 |
+
}
|
51 |
+
|
52 |
+
}
|
app/code/local/AddInMage/ToastNotifications/Block/Messages.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
class AddInMage_ToastNotifications_Block_Messages extends Mage_Core_Block_Messages
|
38 |
+
{
|
39 |
+
|
40 |
+
const XML_PATH_TOAST_NOTIFICATIONS_ENABLED = 'addinmage_toastnotifications/general/use_in_';
|
41 |
+
|
42 |
+
protected $_tmp_queue = null;
|
43 |
+
|
44 |
+
|
45 |
+
public function getGroupedHtml()
|
46 |
+
{
|
47 |
+
$area = Mage::getDesign()->getArea();
|
48 |
+
$store = Mage::app()->getStore();
|
49 |
+
|
50 |
+
$types = array(
|
51 |
+
Mage_Core_Model_Message::SUCCESS,
|
52 |
+
Mage_Core_Model_Message::NOTICE,
|
53 |
+
Mage_Core_Model_Message::ERROR,
|
54 |
+
Mage_Core_Model_Message::WARNING
|
55 |
+
);
|
56 |
+
|
57 |
+
$html = '';
|
58 |
+
|
59 |
+
if(Mage::getStoreConfig(self::XML_PATH_TOAST_NOTIFICATIONS_ENABLED.$area, $store)) {
|
60 |
+
|
61 |
+
$mode = Mage::getStoreConfig('addinmage_toastnotifications/'.$area.'_settings/hiding_mode', $store);
|
62 |
+
$delay_before = Mage::getStoreConfig('addinmage_toastnotifications/'.$area.'_settings/delay_before', $store);
|
63 |
+
$position = Mage::getStoreConfig('addinmage_toastnotifications/'.$area.'_settings/position', $store);
|
64 |
+
|
65 |
+
|
66 |
+
$options = array();
|
67 |
+
|
68 |
+
if($mode !== 'auto')
|
69 |
+
$options['useClose'] = true;
|
70 |
+
else {
|
71 |
+
$options['appearance'] = Mage::getStoreConfig('addinmage_toastnotifications/'.$area.'_settings/appearance', $store);
|
72 |
+
$options['disappearance'] = Mage::getStoreConfig('addinmage_toastnotifications/'.$area.'_settings/disappearance', $store);
|
73 |
+
$options['delay'] = Mage::getStoreConfig('addinmage_toastnotifications/'.$area.'_settings/delay', $store);
|
74 |
+
}
|
75 |
+
$options['position'] = $position;
|
76 |
+
$options['opacity'] = Mage::getStoreConfig('addinmage_toastnotifications/'.$area.'_settings/opacity', $store);
|
77 |
+
|
78 |
+
$empty_stack = true;
|
79 |
+
$one_message = false;
|
80 |
+
$msg_count = count($this->getMessages());
|
81 |
+
if($msg_count == 1)
|
82 |
+
$one_message = true;
|
83 |
+
|
84 |
+
$js = '';
|
85 |
+
$js = '<script type="text/javascript">';
|
86 |
+
$js .= "document.observe('dom:loaded', function(){";
|
87 |
+
$js .= 'var nbar = new ToastNotification();';
|
88 |
+
|
89 |
+
if($delay_before)
|
90 |
+
$js .= 'setTimeout(function(){';
|
91 |
+
|
92 |
+
$i=0;
|
93 |
+
|
94 |
+
foreach (array_reverse($types,true) as $type) {
|
95 |
+
$messages = $this->getMessages($type);
|
96 |
+
foreach (array_reverse($messages,true) as $message) {
|
97 |
+
$empty_stack = false;
|
98 |
+
$nb_message = ($this->_escapeMessageFlag) ? $this->htmlEscape($message->getText()) : $message->getText();
|
99 |
+
|
100 |
+
$options['className'] = 'nb-'.$type.'-msg';
|
101 |
+
|
102 |
+
if($one_message)
|
103 |
+
$js .= 'nbar.showNotification("'.addslashes($nb_message).'",'.Zend_Json_Encoder::encode($options).');';
|
104 |
+
|
105 |
+
else {
|
106 |
+
|
107 |
+
if($i==0)
|
108 |
+
$this->_tmp_queue = 'nbar.showNotification("'.addslashes($nb_message).'",'.Zend_Json::encode($options).')';
|
109 |
+
else if ($i !== $msg_count-1) {
|
110 |
+
$options['destroyed'] = new Zend_Json_Expr('function(){'.$this->_tmp_queue.'}');
|
111 |
+
$this->_tmp_queue = 'nbar.showNotification("'.addslashes($nb_message).'",'.Zend_Json::encode($options,false,array('enableJsonExprFinder' => true)).')';
|
112 |
+
}
|
113 |
+
else {
|
114 |
+
$options['destroyed'] = new Zend_Json_Expr('function(){'.$this->_tmp_queue.'}');
|
115 |
+
$js .= 'nbar.showNotification("'.addslashes($nb_message).'",'.Zend_Json::encode($options,false,array('enableJsonExprFinder' => true)).');';
|
116 |
+
}
|
117 |
+
$i++;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
|
123 |
+
if($delay_before)
|
124 |
+
$js .= '},'.($delay_before*1000).');';
|
125 |
+
$js .= '});';
|
126 |
+
$js .= '</script>';
|
127 |
+
$html = (!$empty_stack) ? $js : '';
|
128 |
+
}
|
129 |
+
|
130 |
+
else {
|
131 |
+
|
132 |
+
foreach ($types as $type) {
|
133 |
+
if ( $messages = $this->getMessages($type) ) {
|
134 |
+
if ( !$html ) {
|
135 |
+
$html .= '<' . $this->_messagesFirstLevelTagName . ' class="messages">';
|
136 |
+
}
|
137 |
+
$html .= '<' . $this->_messagesSecondLevelTagName . ' class="' . $type . '-msg">';
|
138 |
+
$html .= '<' . $this->_messagesFirstLevelTagName . '>';
|
139 |
+
|
140 |
+
foreach ( $messages as $message ) {
|
141 |
+
$html.= '<' . $this->_messagesSecondLevelTagName . '>';
|
142 |
+
$html.= '<' . $this->_messagesContentWrapperTagName . '>';
|
143 |
+
$html.= ($this->_escapeMessageFlag) ? $this->htmlEscape($message->getText()) : $message->getText();
|
144 |
+
$html.= '</' . $this->_messagesContentWrapperTagName . '>';
|
145 |
+
$html.= '</' . $this->_messagesSecondLevelTagName . '>';
|
146 |
+
}
|
147 |
+
$html .= '</' . $this->_messagesFirstLevelTagName . '>';
|
148 |
+
$html .= '</' . $this->_messagesSecondLevelTagName . '>';
|
149 |
+
}
|
150 |
+
}
|
151 |
+
if ( $html) {
|
152 |
+
$html .= '</' . $this->_messagesFirstLevelTagName . '>';
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
return $html;
|
157 |
+
}
|
158 |
+
}
|
app/code/local/AddInMage/ToastNotifications/Helper/Data.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
class AddInMage_ToastNotifications_Helper_Data extends Mage_Core_Helper_Abstract
|
38 |
+
{
|
39 |
+
|
40 |
+
}
|
app/code/local/AddInMage/ToastNotifications/Helper/Setup.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
class AddInMage_ToastNotifications_Helper_Setup extends Mage_Core_Helper_Abstract
|
38 |
+
{
|
39 |
+
|
40 |
+
public function notifyAdminUser()
|
41 |
+
{
|
42 |
+
Mage::getModel('adminnotification/inbox')->setSeverity(Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE)
|
43 |
+
->setTitle($this->__('Toast Notifications extension is installed successfully.'))
|
44 |
+
->setDateAdded(gmdate('Y-m-d H:i:s'))
|
45 |
+
->setUrl($this->getDocUrl())
|
46 |
+
->setDescription($this->__('You have just installed Toast Notifications extension. Please see the user guide for information about configuration.'))
|
47 |
+
->save();
|
48 |
+
}
|
49 |
+
|
50 |
+
public function getDocUrl()
|
51 |
+
{
|
52 |
+
return 'http://add-in-mage.com/resources/toast-notifications/user-guide/';
|
53 |
+
}
|
54 |
+
}
|
app/code/local/AddInMage/ToastNotifications/Model/Configuration/Modes.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
class AddInMage_ToastNotifications_Model_Configuration_Modes
|
38 |
+
{
|
39 |
+
|
40 |
+
public function toOptionArray()
|
41 |
+
{
|
42 |
+
return array(
|
43 |
+
array(
|
44 |
+
'value' => 'auto',
|
45 |
+
'label' => Mage::helper('toastnotifications')->__('Automatic')
|
46 |
+
),
|
47 |
+
array(
|
48 |
+
'value' => 'manually',
|
49 |
+
'label' => Mage::helper('toastnotifications')->__('Manual')
|
50 |
+
)
|
51 |
+
);
|
52 |
+
}
|
53 |
+
}
|
app/code/local/AddInMage/ToastNotifications/Model/Configuration/Opacity.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
class AddInMage_ToastNotifications_Model_Configuration_Opacity
|
38 |
+
{
|
39 |
+
|
40 |
+
public function toOptionArray()
|
41 |
+
{
|
42 |
+
return array(
|
43 |
+
array(
|
44 |
+
'value' => '0.1',
|
45 |
+
'label' => '0.1'
|
46 |
+
),
|
47 |
+
array(
|
48 |
+
'value' => '0.2',
|
49 |
+
'label' => '0.2'
|
50 |
+
),
|
51 |
+
array(
|
52 |
+
'value' => '0.3',
|
53 |
+
'label' => '0.3'
|
54 |
+
),
|
55 |
+
array(
|
56 |
+
'value' => '0.4',
|
57 |
+
'label' => '0.4'
|
58 |
+
),
|
59 |
+
array(
|
60 |
+
'value' => '0.5',
|
61 |
+
'label' => '0.5'
|
62 |
+
),
|
63 |
+
array(
|
64 |
+
'value' => '0.6',
|
65 |
+
'label' => '0.6'
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'value' => '0.7',
|
69 |
+
'label' => '0.7'
|
70 |
+
),
|
71 |
+
array(
|
72 |
+
'value' => '0.8',
|
73 |
+
'label' => '0.8'
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'value' => '0.9',
|
77 |
+
'label' => '0.9'
|
78 |
+
),
|
79 |
+
array(
|
80 |
+
'value' => '1',
|
81 |
+
'label' => Mage::helper('toastnotifications')->__('1 (not transparent)')
|
82 |
+
)
|
83 |
+
);
|
84 |
+
}
|
85 |
+
}
|
app/code/local/AddInMage/ToastNotifications/Model/Configuration/Position.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
class AddInMage_ToastNotifications_Model_Configuration_Position
|
38 |
+
{
|
39 |
+
|
40 |
+
public function toOptionArray()
|
41 |
+
{
|
42 |
+
return array(
|
43 |
+
array(
|
44 |
+
'value' => 'top',
|
45 |
+
'label' => Mage::helper('toastnotifications')->__('Top')
|
46 |
+
),
|
47 |
+
array(
|
48 |
+
'value' => 'bottom',
|
49 |
+
'label' => Mage::helper('toastnotifications')->__('Bottom')
|
50 |
+
)
|
51 |
+
);
|
52 |
+
}
|
53 |
+
}
|
app/code/local/AddInMage/ToastNotifications/Model/Mysql4/Setup.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
class AddInMage_ToastNotifications_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
|
38 |
+
{
|
39 |
+
|
40 |
+
}
|
app/code/local/AddInMage/ToastNotifications/etc/adminhtml.xml
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
-->
|
37 |
+
<config>
|
38 |
+
<acl>
|
39 |
+
<resources>
|
40 |
+
<admin>
|
41 |
+
<children>
|
42 |
+
<system>
|
43 |
+
<children>
|
44 |
+
<config>
|
45 |
+
<children>
|
46 |
+
<addinmage_toastnotifications translate="title" module="toastnotifications">
|
47 |
+
<title>Add In Mage:: Toast Notifications</title>
|
48 |
+
<sort_order>80</sort_order>
|
49 |
+
</addinmage_toastnotifications>
|
50 |
+
</children>
|
51 |
+
</config>
|
52 |
+
</children>
|
53 |
+
</system>
|
54 |
+
</children>
|
55 |
+
</admin>
|
56 |
+
</resources>
|
57 |
+
</acl>
|
58 |
+
<translate>
|
59 |
+
<modules>
|
60 |
+
<toastnotifications>
|
61 |
+
<files>
|
62 |
+
<default>AddInMage_ToastNotifications.csv</default>
|
63 |
+
</files>
|
64 |
+
</toastnotifications>
|
65 |
+
</modules>
|
66 |
+
</translate>
|
67 |
+
</config>
|
app/code/local/AddInMage/ToastNotifications/etc/config.xml
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
-->
|
37 |
+
<config>
|
38 |
+
<modules>
|
39 |
+
<AddInMage_ToastNotifications>
|
40 |
+
<version>1.1.0</version>
|
41 |
+
</AddInMage_ToastNotifications>
|
42 |
+
</modules>
|
43 |
+
<default>
|
44 |
+
<addinmage_toastnotifications>
|
45 |
+
<general>
|
46 |
+
<use_in_frontend>0</use_in_frontend>
|
47 |
+
<use_in_adminhtml>0</use_in_adminhtml>
|
48 |
+
</general>
|
49 |
+
<frontend_settings>
|
50 |
+
<hiding_mode>auto</hiding_mode>
|
51 |
+
<delay>5</delay>
|
52 |
+
<appearance>0.3</appearance>
|
53 |
+
<disappearance>0.5</disappearance>
|
54 |
+
<delay_before>1.25</delay_before>
|
55 |
+
<opacity>0.9</opacity>
|
56 |
+
<position>top</position>
|
57 |
+
</frontend_settings>
|
58 |
+
<adminhtml_settings>
|
59 |
+
<hiding_mode>auto</hiding_mode>
|
60 |
+
<delay>5</delay>
|
61 |
+
<appearance>0.3</appearance>
|
62 |
+
<disappearance>0.5</disappearance>
|
63 |
+
<delay_before>1.25</delay_before>
|
64 |
+
<opacity>0.9</opacity>
|
65 |
+
<position>top</position>
|
66 |
+
</adminhtml_settings>
|
67 |
+
</addinmage_toastnotifications>
|
68 |
+
</default>
|
69 |
+
<global>
|
70 |
+
<blocks>
|
71 |
+
<core>
|
72 |
+
<rewrite>
|
73 |
+
<messages>AddInMage_ToastNotifications_Block_Messages</messages>
|
74 |
+
</rewrite>
|
75 |
+
</core>
|
76 |
+
<toastnotifications>
|
77 |
+
<class>AddInMage_ToastNotifications_Block</class>
|
78 |
+
</toastnotifications>
|
79 |
+
</blocks>
|
80 |
+
<models>
|
81 |
+
<toastnotifications>
|
82 |
+
<class>AddInMage_ToastNotifications_Model</class>
|
83 |
+
<resourceModel>toastnotifications_mysql4</resourceModel>
|
84 |
+
</toastnotifications>
|
85 |
+
</models>
|
86 |
+
<helpers>
|
87 |
+
<toastnotifications>
|
88 |
+
<class>AddInMage_ToastNotifications_Helper</class>
|
89 |
+
</toastnotifications>
|
90 |
+
</helpers>
|
91 |
+
<resources>
|
92 |
+
<toastnotifications_setup>
|
93 |
+
<setup>
|
94 |
+
<module>AddInMage_ToastNotifications</module>
|
95 |
+
<class>AddInMage_ToastNotifications_Model_Mysql4_Setup</class>
|
96 |
+
</setup>
|
97 |
+
<connection>
|
98 |
+
<use>core_setup</use>
|
99 |
+
</connection>
|
100 |
+
</toastnotifications_setup>
|
101 |
+
</resources>
|
102 |
+
</global>
|
103 |
+
<frontend>
|
104 |
+
<layout>
|
105 |
+
<updates>
|
106 |
+
<toastnotifications>
|
107 |
+
<file>addinmage/toastnotifications.xml</file>
|
108 |
+
</toastnotifications>
|
109 |
+
</updates>
|
110 |
+
</layout>
|
111 |
+
<translate>
|
112 |
+
<modules>
|
113 |
+
<toastnotifications>
|
114 |
+
<files>
|
115 |
+
<default>AddInMage_ToastNotifications.csv</default>
|
116 |
+
</files>
|
117 |
+
</toastnotifications>
|
118 |
+
</modules>
|
119 |
+
</translate>
|
120 |
+
</frontend>
|
121 |
+
<adminhtml>
|
122 |
+
<layout>
|
123 |
+
<updates>
|
124 |
+
<toastnotifications>
|
125 |
+
<file>addinmage/toastnotifications.xml</file>
|
126 |
+
</toastnotifications>
|
127 |
+
</updates>
|
128 |
+
</layout>
|
129 |
+
<translate>
|
130 |
+
<modules>
|
131 |
+
<toastnotifications>
|
132 |
+
<files>
|
133 |
+
<default>AddInMage_ToastNotifications.csv</default>
|
134 |
+
</files>
|
135 |
+
</toastnotifications>
|
136 |
+
</modules>
|
137 |
+
</translate>
|
138 |
+
</adminhtml>
|
139 |
+
</config>
|
app/code/local/AddInMage/ToastNotifications/etc/system.xml
ADDED
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
-->
|
37 |
+
<config>
|
38 |
+
<tabs>
|
39 |
+
<addinmage translate="label" module="toastnotifications">
|
40 |
+
<label>Add In Mage:: Extensions</label>
|
41 |
+
<sort_order>1</sort_order>
|
42 |
+
<class>add-in-mage-tab</class>
|
43 |
+
</addinmage>
|
44 |
+
</tabs>
|
45 |
+
<sections>
|
46 |
+
<addinmage_toastnotifications translate="label" module="toastnotifications">
|
47 |
+
<label>Toast Notifications</label>
|
48 |
+
<tab>addinmage</tab>
|
49 |
+
<sort_order>4</sort_order>
|
50 |
+
<show_in_default>1</show_in_default>
|
51 |
+
<show_in_website>1</show_in_website>
|
52 |
+
<show_in_store>1</show_in_store>
|
53 |
+
<groups>
|
54 |
+
<general translate="label">
|
55 |
+
<label>Toast Notifications Settings</label>
|
56 |
+
<frontend_type>text</frontend_type>
|
57 |
+
<sort_order>1</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>1</show_in_store>
|
61 |
+
<fields>
|
62 |
+
<use_in_frontend translate="label comment">
|
63 |
+
<label>Use on Frontend</label>
|
64 |
+
<frontend_type>select</frontend_type>
|
65 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
66 |
+
<sort_order>1</sort_order>
|
67 |
+
<show_in_default>1</show_in_default>
|
68 |
+
<show_in_website>1</show_in_website>
|
69 |
+
<show_in_store>1</show_in_store>
|
70 |
+
<comment>Override Magento built-in messages with toast notifications in the store.</comment>
|
71 |
+
</use_in_frontend>
|
72 |
+
<use_in_adminhtml translate="label comment">
|
73 |
+
<label>Use on Backend</label>
|
74 |
+
<frontend_type>select</frontend_type>
|
75 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
76 |
+
<sort_order>2</sort_order>
|
77 |
+
<show_in_default>1</show_in_default>
|
78 |
+
<show_in_website>1</show_in_website>
|
79 |
+
<show_in_store>1</show_in_store>
|
80 |
+
<comment>Override Magento built-in messages with toast notifications in the Admin Panel.</comment>
|
81 |
+
</use_in_adminhtml>
|
82 |
+
</fields>
|
83 |
+
</general>
|
84 |
+
<frontend_settings translate="label">
|
85 |
+
<label>Frontend Settings</label>
|
86 |
+
<frontend_type>text</frontend_type>
|
87 |
+
<sort_order>2</sort_order>
|
88 |
+
<show_in_default>1</show_in_default>
|
89 |
+
<show_in_website>1</show_in_website>
|
90 |
+
<show_in_store>1</show_in_store>
|
91 |
+
<fields>
|
92 |
+
<hiding_mode translate="label comment">
|
93 |
+
<label>Hiding Mode</label>
|
94 |
+
<frontend_type>select</frontend_type>
|
95 |
+
<source_model>toastnotifications/configuration_modes</source_model>
|
96 |
+
<sort_order>1</sort_order>
|
97 |
+
<show_in_default>1</show_in_default>
|
98 |
+
<show_in_website>1</show_in_website>
|
99 |
+
<show_in_store>1</show_in_store>
|
100 |
+
<comment>Notifications can disappear automatically or after customers click Close.</comment>
|
101 |
+
</hiding_mode>
|
102 |
+
<delay translate="label comment">
|
103 |
+
<label>Display Duration</label>
|
104 |
+
<frontend_type>text</frontend_type>
|
105 |
+
<sort_order>2</sort_order>
|
106 |
+
<show_in_default>1</show_in_default>
|
107 |
+
<show_in_website>1</show_in_website>
|
108 |
+
<show_in_store>1</show_in_store>
|
109 |
+
<depends>
|
110 |
+
<hiding_mode>auto</hiding_mode>
|
111 |
+
</depends>
|
112 |
+
<comment>The amount of time customers will see the toast notification (sec).</comment>
|
113 |
+
</delay>
|
114 |
+
<appearance translate="label comment">
|
115 |
+
<label>Appearance Speed</label>
|
116 |
+
<frontend_type>text</frontend_type>
|
117 |
+
<sort_order>3</sort_order>
|
118 |
+
<show_in_default>1</show_in_default>
|
119 |
+
<show_in_website>1</show_in_website>
|
120 |
+
<show_in_store>1</show_in_store>
|
121 |
+
<depends>
|
122 |
+
<hiding_mode>auto</hiding_mode>
|
123 |
+
</depends>
|
124 |
+
<comment>Specify appearance animation speed (sec).</comment>
|
125 |
+
</appearance>
|
126 |
+
<disappearance translate="label comment">
|
127 |
+
<label>Disappearance Speed</label>
|
128 |
+
<frontend_type>text</frontend_type>
|
129 |
+
<sort_order>4</sort_order>
|
130 |
+
<show_in_default>1</show_in_default>
|
131 |
+
<show_in_website>1</show_in_website>
|
132 |
+
<show_in_store>1</show_in_store>
|
133 |
+
<depends>
|
134 |
+
<hiding_mode>auto</hiding_mode>
|
135 |
+
</depends>
|
136 |
+
<comment>Specify disappearance animation speed (sec).</comment>
|
137 |
+
</disappearance>
|
138 |
+
<delay_before translate="label comment">
|
139 |
+
<label>Delay Before Appearance</label>
|
140 |
+
<frontend_type>text</frontend_type>
|
141 |
+
<sort_order>5</sort_order>
|
142 |
+
<show_in_default>1</show_in_default>
|
143 |
+
<show_in_website>1</show_in_website>
|
144 |
+
<show_in_store>1</show_in_store>
|
145 |
+
<comment>Make a pause before showing the toast notification (sec).</comment>
|
146 |
+
</delay_before>
|
147 |
+
<opacity translate="label comment">
|
148 |
+
<label>Toast Notification Opacity</label>
|
149 |
+
<frontend_type>select</frontend_type>
|
150 |
+
<source_model>toastnotifications/configuration_opacity</source_model>
|
151 |
+
<sort_order>6</sort_order>
|
152 |
+
<show_in_default>1</show_in_default>
|
153 |
+
<show_in_website>1</show_in_website>
|
154 |
+
<show_in_store>1</show_in_store>
|
155 |
+
<comment>Choose the degree of toast notification transparency.</comment>
|
156 |
+
</opacity>
|
157 |
+
<position translate="label comment">
|
158 |
+
<label>Position</label>
|
159 |
+
<frontend_type>select</frontend_type>
|
160 |
+
<source_model>toastnotifications/configuration_position</source_model>
|
161 |
+
<sort_order>7</sort_order>
|
162 |
+
<show_in_default>1</show_in_default>
|
163 |
+
<show_in_website>1</show_in_website>
|
164 |
+
<show_in_store>1</show_in_store>
|
165 |
+
<comment>Choose where you'd like the toast notification to appear.</comment>
|
166 |
+
</position>
|
167 |
+
</fields>
|
168 |
+
</frontend_settings>
|
169 |
+
<adminhtml_settings translate="label">
|
170 |
+
<label>Backend Settings</label>
|
171 |
+
<frontend_type>text</frontend_type>
|
172 |
+
<sort_order>3</sort_order>
|
173 |
+
<show_in_default>1</show_in_default>
|
174 |
+
<show_in_website>1</show_in_website>
|
175 |
+
<show_in_store>1</show_in_store>
|
176 |
+
<fields>
|
177 |
+
<hiding_mode translate="label comment">
|
178 |
+
<label>Hiding Mode</label>
|
179 |
+
<frontend_type>select</frontend_type>
|
180 |
+
<source_model>toastnotifications/configuration_modes</source_model>
|
181 |
+
<sort_order>1</sort_order>
|
182 |
+
<show_in_default>1</show_in_default>
|
183 |
+
<show_in_website>1</show_in_website>
|
184 |
+
<show_in_store>1</show_in_store>
|
185 |
+
<comment>Notifications can disappear automatically or after customers click Close.</comment>
|
186 |
+
</hiding_mode>
|
187 |
+
<delay translate="label comment">
|
188 |
+
<label>Display Duration</label>
|
189 |
+
<frontend_type>text</frontend_type>
|
190 |
+
<sort_order>2</sort_order>
|
191 |
+
<show_in_default>1</show_in_default>
|
192 |
+
<show_in_website>1</show_in_website>
|
193 |
+
<show_in_store>1</show_in_store>
|
194 |
+
<depends>
|
195 |
+
<hiding_mode>auto</hiding_mode>
|
196 |
+
</depends>
|
197 |
+
<comment>The amount of time customers will see the toast notification (sec).</comment>
|
198 |
+
</delay>
|
199 |
+
<appearance translate="label comment">
|
200 |
+
<label>Appearance Speed</label>
|
201 |
+
<frontend_type>text</frontend_type>
|
202 |
+
<sort_order>3</sort_order>
|
203 |
+
<show_in_default>1</show_in_default>
|
204 |
+
<show_in_website>1</show_in_website>
|
205 |
+
<show_in_store>1</show_in_store>
|
206 |
+
<depends>
|
207 |
+
<hiding_mode>auto</hiding_mode>
|
208 |
+
</depends>
|
209 |
+
<comment>Specify appearance animation speed (sec).</comment>
|
210 |
+
</appearance>
|
211 |
+
<disappearance translate="label comment">
|
212 |
+
<label>Disappearance Speed</label>
|
213 |
+
<frontend_type>text</frontend_type>
|
214 |
+
<sort_order>4</sort_order>
|
215 |
+
<show_in_default>1</show_in_default>
|
216 |
+
<show_in_website>1</show_in_website>
|
217 |
+
<show_in_store>1</show_in_store>
|
218 |
+
<depends>
|
219 |
+
<hiding_mode>auto</hiding_mode>
|
220 |
+
</depends>
|
221 |
+
<comment>Specify disappearance animation speed (sec).</comment>
|
222 |
+
</disappearance>
|
223 |
+
<delay_before translate="label comment">
|
224 |
+
<label>Delay Before Appearance</label>
|
225 |
+
<frontend_type>text</frontend_type>
|
226 |
+
<sort_order>5</sort_order>
|
227 |
+
<show_in_default>1</show_in_default>
|
228 |
+
<show_in_website>1</show_in_website>
|
229 |
+
<show_in_store>1</show_in_store>
|
230 |
+
<comment>Make a pause before showing the toast notification (sec).</comment>
|
231 |
+
</delay_before>
|
232 |
+
<opacity translate="label comment">
|
233 |
+
<label>Toast Notification Opacity</label>
|
234 |
+
<frontend_type>select</frontend_type>
|
235 |
+
<source_model>toastnotifications/configuration_opacity</source_model>
|
236 |
+
<sort_order>6</sort_order>
|
237 |
+
<show_in_default>1</show_in_default>
|
238 |
+
<show_in_website>1</show_in_website>
|
239 |
+
<show_in_store>1</show_in_store>
|
240 |
+
<comment>Choose the degree of toast notification transparency.</comment>
|
241 |
+
</opacity>
|
242 |
+
<position translate="label comment">
|
243 |
+
<label>Position</label>
|
244 |
+
<frontend_type>select</frontend_type>
|
245 |
+
<source_model>toastnotifications/configuration_position</source_model>
|
246 |
+
<sort_order>7</sort_order>
|
247 |
+
<show_in_default>1</show_in_default>
|
248 |
+
<show_in_website>1</show_in_website>
|
249 |
+
<show_in_store>1</show_in_store>
|
250 |
+
<comment>Choose where you'd like the toast notification to appear.</comment>
|
251 |
+
</position>
|
252 |
+
</fields>
|
253 |
+
</adminhtml_settings>
|
254 |
+
<hint>
|
255 |
+
<frontend_model>toastnotifications/description</frontend_model>
|
256 |
+
<sort_order>0</sort_order>
|
257 |
+
<show_in_default>1</show_in_default>
|
258 |
+
<show_in_website>1</show_in_website>
|
259 |
+
<show_in_store>1</show_in_store>
|
260 |
+
</hint>
|
261 |
+
</groups>
|
262 |
+
</addinmage_toastnotifications>
|
263 |
+
</sections>
|
264 |
+
</config>
|
app/code/local/AddInMage/ToastNotifications/sql/toastnotifications_setup/mysql4-install-1.1.0.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
$installer = $this;
|
38 |
+
|
39 |
+
$installer->startSetup();
|
40 |
+
$installer->endSetup();
|
41 |
+
|
42 |
+
Mage::helper('toastnotifications/setup')->notifyAdminUser();
|
app/design/adminhtml/default/default/layout/addinmage/toastnotifications.xml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category design
|
31 |
+
* @package default_default
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
-->
|
37 |
+
<layout>
|
38 |
+
<default>
|
39 |
+
<reference name="head">
|
40 |
+
<action ifconfig="addinmage_toastnotifications/general/use_in_adminhtml" method="addCss">
|
41 |
+
<name>addinmage/toastnotifications/toastnotifications.css</name>
|
42 |
+
</action>
|
43 |
+
<action ifconfig="addinmage_toastnotifications/general/use_in_adminhtml" method="addJs">
|
44 |
+
<script>scriptaculous/builder.js</script>
|
45 |
+
</action>
|
46 |
+
<action ifconfig="addinmage_toastnotifications/general/use_in_adminhtml" method="addJs">
|
47 |
+
<script>scriptaculous/effects.js</script>
|
48 |
+
</action>
|
49 |
+
<action ifconfig="addinmage_toastnotifications/general/use_in_adminhtml" method="addJs">
|
50 |
+
<script>addinmage/toastnotifications/toastnotifications.js</script>
|
51 |
+
</action>
|
52 |
+
</reference>
|
53 |
+
</default>
|
54 |
+
</layout>
|
app/design/adminhtml/default/default/template/addinmage/toastnotifications/description.phtml
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category design
|
31 |
+
* @package default_default
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
|
37 |
+
?>
|
38 |
+
<div class="addinmage-message">
|
39 |
+
<h4><?php echo Mage::helper('toastnotifications')->__('Thank you for choosing Add In Mage:: Toast Notifications extension.')?></h4>
|
40 |
+
<p><?php echo Mage::helper('toastnotifications')->__('Toast Notifications extension for Magento offers a new way of showing system notifications in Magento.')?></p>
|
41 |
+
</div>
|
app/design/frontend/base/default/layout/addinmage/toastnotifications.xml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category design
|
31 |
+
* @package base_default
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
-->
|
37 |
+
<layout>
|
38 |
+
<default>
|
39 |
+
<reference name="head">
|
40 |
+
<action ifconfig="addinmage_toastnotifications/general/use_in_frontend" method="addCss">
|
41 |
+
<stylesheet>css/addinmage/toastnotifications/toastnotifications.css</stylesheet>
|
42 |
+
</action>
|
43 |
+
<action ifconfig="addinmage_toastnotifications/general/use_in_frontend" method="addJs">
|
44 |
+
<script>scriptaculous/builder.js</script>
|
45 |
+
</action>
|
46 |
+
<action ifconfig="addinmage_toastnotifications/general/use_in_frontend" method="addJs">
|
47 |
+
<script>scriptaculous/effects.js</script>
|
48 |
+
</action>
|
49 |
+
<action ifconfig="addinmage_toastnotifications/general/use_in_frontend" method="addJs">
|
50 |
+
<script>addinmage/toastnotifications/toastnotifications.js</script>
|
51 |
+
</action>
|
52 |
+
</reference>
|
53 |
+
</default>
|
54 |
+
</layout>
|
app/etc/modules/AddInMage_ToastNotifications.xml
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Add In Mage::
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
9 |
+
*
|
10 |
+
*
|
11 |
+
* PROPRIETARY DATA
|
12 |
+
*
|
13 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
18 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
19 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
20 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* MAGENTO EDITION NOTICE
|
24 |
+
*
|
25 |
+
* This software is designed for Magento Community edition.
|
26 |
+
* Add In Mage:: Ltd. does not guarantee correct work of this extension on any other Magento edition.
|
27 |
+
* Add In Mage:: Ltd. does not provide extension support in case of using a different Magento edition.
|
28 |
+
*
|
29 |
+
*
|
30 |
+
* @category AddInMage
|
31 |
+
* @package AddInMage_ToastNotifications
|
32 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
33 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
34 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
35 |
+
*/
|
36 |
+
-->
|
37 |
+
<config>
|
38 |
+
<modules>
|
39 |
+
<AddInMage_ToastNotifications>
|
40 |
+
<active>true</active>
|
41 |
+
<codePool>local</codePool>
|
42 |
+
</AddInMage_ToastNotifications>
|
43 |
+
</modules>
|
44 |
+
</config>
|
app/locale/en_US/AddInMage_ToastNotifications.csv
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"1 (not transparent)","1 (not transparent)"
|
2 |
+
"Add-In Mage:: Extensions","Add-In Mage:: Extensions"
|
3 |
+
"Add-In Mage:: Toast Notifications","Add-In Mage:: Toast Notifications"
|
4 |
+
"Appearance Speed","Appearance Speed"
|
5 |
+
"Automatic","Automatic"
|
6 |
+
"Choose the degree of toast notification transparency.","Choose the degree of toast notification transparency."
|
7 |
+
"Delay Before Appearance","Delay Before Appearance"
|
8 |
+
"Disappearance Speed","Disappearance Speed"
|
9 |
+
"Display Duration","Display Duration"
|
10 |
+
"Frontend Settings","Frontend Settings"
|
11 |
+
"Hiding Mode","Hiding Mode"
|
12 |
+
"Make a pause before showing the toast notification (sec).","Make a pause before showing the toast notification (sec)."
|
13 |
+
"Manual","Manual"
|
14 |
+
"Notifications can disappear automatically or after customers click Close.","Notifications can disappear automatically or after customers click Close."
|
15 |
+
"Override Magento built-in messages with toast notifications in the Admin Panel.","Override Magento built-in messages with toast notifications in the Admin Panel."
|
16 |
+
"Override Magento built-in messages with toast notifications in the store.","Override Magento built-in messages with toast notifications in the store."
|
17 |
+
"Specify appearance animation speed (sec).","Specify appearance animation speed (sec)."
|
18 |
+
"Specify disappearance animation speed (sec).","Specify disappearance animation speed (sec)."
|
19 |
+
"Thank you for choosing Add In Mage:: Toast Notifications extension.","Thank you for choosing Add In Mage:: Toast Notifications extension."
|
20 |
+
"The amount of time customers will see the toast notification (sec).","The amount of time customers will see the toast notification (sec)."
|
21 |
+
"Toast Notification Opacity","Toast Notification Opacity"
|
22 |
+
"Backend Settings","Backend Settings"
|
23 |
+
"Toast Notifications extension for Magento offers a new way of showing system notifications in Magento.","Toast Notifications extension for Magento offers a new way of showing system notifications in Magento."
|
24 |
+
"Toast Notifications extension is installed successfully.","Toast Notifications extension is installed successfully."
|
25 |
+
"Toast Notifications Settings","Toast Notifications Settings"
|
26 |
+
"Use on Backend","Use on Backend"
|
27 |
+
"Use on Frontend","Use on Frontend"
|
28 |
+
"You have just installed Toast Notifications extension. Please see the user guide for information about configuration.","You have just installed Toast Notifications extension. Please see the user guide for information about configuration."
|
29 |
+
"Position","Position"
|
30 |
+
"Top","Top"
|
31 |
+
"Bottom","Bottom"
|
32 |
+
"Choose where you'd like the toast notification to appear.","Choose where you'd like the toast notification to appear."
|
js/addinmage/toastnotifications/toastnotifications.js
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Add In Mage::
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
7 |
+
*
|
8 |
+
*
|
9 |
+
* PROPRIETARY DATA
|
10 |
+
*
|
11 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
12 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
13 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
14 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
15 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
16 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
17 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
18 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
19 |
+
*
|
20 |
+
*
|
21 |
+
* @category AddInMage
|
22 |
+
* @package js
|
23 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
24 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
25 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
26 |
+
*/
|
27 |
+
|
28 |
+
Effect.MoveUp = Class.create();
|
29 |
+
Object.extend(Object.extend(Effect.MoveUp.prototype, Effect.Base.prototype), {
|
30 |
+
initialize: function(element) {
|
31 |
+
this.element = $(element);
|
32 |
+
if(!this.element) throw(Effect._elementDoesNotExistError);
|
33 |
+
var options = Object.extend({
|
34 |
+
x: 0,
|
35 |
+
y: 0,
|
36 |
+
mode: 'relative'
|
37 |
+
}, arguments[1] || {});
|
38 |
+
this.start(options);
|
39 |
+
},
|
40 |
+
setup: function() {
|
41 |
+
this.element.makePositioned();
|
42 |
+
this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
|
43 |
+
this.originalBottom = parseFloat(this.element.getStyle('bottom') || '0');
|
44 |
+
if(this.options.mode == 'absolute') {
|
45 |
+
this.options.x = this.options.x - this.originalLeft;
|
46 |
+
this.options.y = this.options.y - this.originalBottom;
|
47 |
+
}
|
48 |
+
},
|
49 |
+
update: function(position) {
|
50 |
+
this.element.setStyle({
|
51 |
+
left: Math.round(this.options.x * position + this.originalLeft) + 'px',
|
52 |
+
bottom: Math.round(this.options.y * position + this.originalBottom) + 'px'
|
53 |
+
});
|
54 |
+
}
|
55 |
+
});
|
56 |
+
|
57 |
+
///////////////////////////////////////////////////////////////////////////////////////
|
58 |
+
|
59 |
+
|
60 |
+
(function(){
|
61 |
+
var toastNotificationsOptions = {};
|
62 |
+
var notificationOptions = {
|
63 |
+
position: top,
|
64 |
+
useClose: false,
|
65 |
+
delay: 5,
|
66 |
+
appearance: 0.4,
|
67 |
+
disappearance: 0.5,
|
68 |
+
appearanceShift: {y:+40},
|
69 |
+
disappearanceShift: {y:-40},
|
70 |
+
opacity: 0.85,
|
71 |
+
className: ""
|
72 |
+
};
|
73 |
+
|
74 |
+
|
75 |
+
function getTnApShift(options){
|
76 |
+
|
77 |
+
switch(options.position){
|
78 |
+
case "top":
|
79 |
+
return {y:+40};
|
80 |
+
case "bottom":
|
81 |
+
return {y:+71};
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
function getTnDesapShift(options){
|
86 |
+
|
87 |
+
switch(options.position){
|
88 |
+
case "top":
|
89 |
+
return {y:-40};
|
90 |
+
case "bottom":
|
91 |
+
return {y:-71};
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
function removeNotification(nb, o){
|
96 |
+
o = o || notificationOptions;
|
97 |
+
|
98 |
+
switch(o.position){
|
99 |
+
case "top":
|
100 |
+
new Effect.Parallel([
|
101 |
+
new Effect.Move(nb, Object.extend({ sync: true, mode: 'relative' }, getTnDesapShift(o))),
|
102 |
+
new Effect.Opacity(nb, { sync: true, to: 0 })
|
103 |
+
], {
|
104 |
+
duration: o.disappearance,
|
105 |
+
afterFinish: function(){
|
106 |
+
try {
|
107 |
+
var ne = nb.down("div.notification-bar-close");
|
108 |
+
if(ne != undefined){
|
109 |
+
ne.stopObserving("click", removeNotification);
|
110 |
+
}
|
111 |
+
if(o.created && Object.isFunction(o.created)){
|
112 |
+
nb.stopObserving("notification:created", o.created);
|
113 |
+
}
|
114 |
+
if(o.destroyed && Object.isFunction(o.destroyed)){
|
115 |
+
nb.fire("notification:destroyed");
|
116 |
+
nb.stopObserving("notification:destroyed", o.destroyed);
|
117 |
+
}
|
118 |
+
} catch(e){}
|
119 |
+
try {
|
120 |
+
nb.remove();
|
121 |
+
} catch(e){}
|
122 |
+
}
|
123 |
+
});
|
124 |
+
break;
|
125 |
+
case "bottom":
|
126 |
+
new Effect.Parallel([
|
127 |
+
new Effect.MoveUp(nb, Object.extend({ sync: true, mode: 'relative' }, getTnDesapShift(o))),
|
128 |
+
new Effect.Opacity(nb, { sync: true, to: 0 })
|
129 |
+
], {
|
130 |
+
duration: o.disappearance,
|
131 |
+
afterFinish: function(){
|
132 |
+
try {
|
133 |
+
var ne = nb.down("div.notification-bar-close");
|
134 |
+
if(ne != undefined){
|
135 |
+
ne.stopObserving("click", removeNotification);
|
136 |
+
}
|
137 |
+
if(o.created && Object.isFunction(o.created)){
|
138 |
+
nb.stopObserving("notification:created", o.created);
|
139 |
+
}
|
140 |
+
if(o.destroyed && Object.isFunction(o.destroyed)){
|
141 |
+
nb.fire("notification:destroyed");
|
142 |
+
nb.stopObserving("notification:destroyed", o.destroyed);
|
143 |
+
}
|
144 |
+
} catch(e){}
|
145 |
+
try {
|
146 |
+
nb.remove();
|
147 |
+
} catch(e){}
|
148 |
+
}
|
149 |
+
});
|
150 |
+
break;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
function createNotification(toastNotification, msg, options){
|
154 |
+
var opt = Object.clone(notificationOptions);
|
155 |
+
options = options || {};
|
156 |
+
Object.extend(opt, options);
|
157 |
+
var notification;
|
158 |
+
|
159 |
+
notification = new Element("div").addClassName('notification-bar-wrapper').setStyle({display: "block", opacity: 0});
|
160 |
+
if (opt.className != ""){
|
161 |
+
notification.addClassName(opt.className);
|
162 |
+
}
|
163 |
+
|
164 |
+
notification.addClassName('tn-position-' + opt.position);
|
165 |
+
|
166 |
+
if(opt.created && Object.isFunction(opt.created)){
|
167 |
+
notification.observe("notification:created", opt.created);
|
168 |
+
}
|
169 |
+
if(opt.destroyed && Object.isFunction(opt.destroyed)){
|
170 |
+
notification.observe("notification:destroyed", opt.destroyed);
|
171 |
+
}
|
172 |
+
|
173 |
+
if (opt.useClose){
|
174 |
+
var notificationClose = new Element("div").addClassName('notification-bar-close').update("×");
|
175 |
+
notificationClose.observe("click", function(){ removeNotification(notification, opt); });
|
176 |
+
notification.insert(notificationClose);
|
177 |
+
}
|
178 |
+
notification.insert(new Element("div").addClassName('notification-bar-notice').update(msg));
|
179 |
+
toastNotification.insert(notification);
|
180 |
+
|
181 |
+
switch(opt.position){
|
182 |
+
case "top":
|
183 |
+
new Effect.Parallel([
|
184 |
+
new Effect.Move(notification, Object.extend({ sync: true, mode: 'relative' }, getTnApShift(opt))),
|
185 |
+
new Effect.Opacity(notification, {sync: true, to: opt.opacity})
|
186 |
+
], {duration: opt.appearance});
|
187 |
+
break;
|
188 |
+
case "bottom":
|
189 |
+
new Effect.Parallel([
|
190 |
+
new Effect.MoveUp(notification, Object.extend({ sync: true, mode: 'relative' }, getTnApShift(opt))),
|
191 |
+
new Effect.Opacity(notification, {sync: true, to: opt.opacity})
|
192 |
+
], {duration: opt.appearance});
|
193 |
+
break;
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
+
if (!opt.useClose){
|
198 |
+
removeNotification.delay(opt.delay, notification, opt);
|
199 |
+
}
|
200 |
+
notification.fire("notification:created");
|
201 |
+
return notification;
|
202 |
+
}
|
203 |
+
ToastNotification = Class.create({
|
204 |
+
initialize: function(options){
|
205 |
+
var opt = Object.clone(toastNotificationsOptions);
|
206 |
+
options = options || {};
|
207 |
+
Object.extend(opt, options);
|
208 |
+
this.toastNotification = new Element("div", {"id": "notification-bar"}).addClassName('notification-bar');
|
209 |
+
this.toastNotification.wrap( document.body );
|
210 |
+
},
|
211 |
+
showNotification: function(msg, options) {
|
212 |
+
return createNotification(this.toastNotification, msg, options);
|
213 |
+
},
|
214 |
+
hideNotification: function(n, o){
|
215 |
+
removeNotification(n, o);
|
216 |
+
}
|
217 |
+
});
|
218 |
+
})();
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>AddInMage_ToastNotifications</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://add-in-mage.com/support/presales/eula-community/">End User License Agreement (EULA) - Community</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>New way of showing Magento global messages in your Frontend</summary>
|
10 |
+
<description>Toast Notification extension shows your customers Magento global system messages in a nice new way! Now instead of regular error or Magento success messages right in the middle of the page with the content, your customers will see Toast Notifications. Their light and pretty appearance effect won't annoy your customers. On the contrary, they will add products to the shopping cart to see the complete new way the message "Something was added to your shopping cart" comes...</description>
|
11 |
+
<notes>The possibility to change the notification position to be at the top or at the bottom (individually for Magento Frontend and Backend) was added.</notes>
|
12 |
+
<authors><author><name>Sergey Rahmanchook</name><user>auto-converted</user><email>contact@add-in-mage.com</email></author></authors>
|
13 |
+
<date>2013-03-19</date>
|
14 |
+
<time>15:29:40</time>
|
15 |
+
<contents><target name="magelocal"><dir name="AddInMage"><dir name="ToastNotifications"><dir name="Block"><file name="Description.php" hash="ed1a5785887f9178c72d4b28fb3da6ae"/><file name="Messages.php" hash="6b1ad07661082ef79276aa60a18931de"/></dir><dir name="Helper"><file name="Data.php" hash="b0af239b7c8aa93ee90a3ab69d0a2776"/><file name="Setup.php" hash="08b6f69d692b474ee840c0d74fbfbeed"/></dir><dir name="Model"><dir name="Configuration"><file name="Modes.php" hash="027e6712160cd507380e6d4e3503e6f9"/><file name="Opacity.php" hash="30e8cdfdf0b8300b50fcab8e60940210"/><file name="Position.php" hash="488050ea0c4a32a7d1f7e879cd09d836"/></dir><dir name="Mysql4"><file name="Setup.php" hash="5a11d9df403248061e0f78acae95735a"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="0981f33e69d622361f58b6eed895a10d"/><file name="config.xml" hash="0bfad9c722f83890e60c4f5fe3988167"/><file name="system.xml" hash="a6a35808090b30de701b75cc217b0393"/></dir><dir name="sql"><dir name="toastnotifications_setup"><file name="mysql4-install-1.1.0.php" hash="b1954d611fb7438d7df1f89ef356a2f9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="addinmage"><file name="toastnotifications.xml" hash="725ba44609a7449cc911de40c1ae0839"/></dir></dir><dir name="template"><dir name="addinmage"><dir name="toastnotifications"><file name="description.phtml" hash="0bbae97bb524fade0476ee3842e02142"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="addinmage"><file name="toastnotifications.xml" hash="7683b120e76e6c77b10fd76830beae58"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="AddInMage_ToastNotifications.xml" hash="73fa1d8fdfaaf9fdc740bf8ebef1a9e3"/></dir></target><target name="magelocale"><dir name="en_US"><file name="AddInMage_ToastNotifications.csv" hash="88af8a9d43231c18b3cc2766e30c7988"/></dir></target><target name="mageweb"><dir name="js"><dir name="addinmage"><dir name="toastnotifications"><file name="toastnotifications.js" hash="59d06868bc1c17c973b967cdce087c29"/></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="addinmage"><dir name="toastnotifications"><file name="add-in-mage-tab-bg.png" hash="9d914f0f219dc5204a4c81384d23d5b3"/><file name="config-styles.css" hash="e871384eda94537de0694dac6e0008ac"/><file name="toastnotifications.css" hash="4b160eeff7267c8e631b12f6c19dfac5"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="addinmage"><dir name="toastnotifications"><file name="toastnotifications.css" hash="0e99a10131c4f4d329c86bbf742dc87f"/></dir></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
+
</package>
|
skin/adminhtml/default/default/addinmage/toastnotifications/add-in-mage-tab-bg.png
ADDED
Binary file
|
skin/adminhtml/default/default/addinmage/toastnotifications/config-styles.css
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Add In Mage::
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
7 |
+
*
|
8 |
+
*
|
9 |
+
* PROPRIETARY DATA
|
10 |
+
*
|
11 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
12 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
13 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
14 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
15 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
16 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
17 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
18 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
19 |
+
*
|
20 |
+
*
|
21 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
22 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
23 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
24 |
+
*/
|
25 |
+
|
26 |
+
.addinmage-message {
|
27 |
+
background: url("http://add-in-mage.com/support/tn-logo.png") no-repeat scroll 5px center #EAF0EE;
|
28 |
+
border: 1px solid #CCC;
|
29 |
+
margin-bottom: 10px;
|
30 |
+
padding: 10px 5px 5px 225px
|
31 |
+
}
|
32 |
+
.addinmage-message h4,.addinmage-message p {
|
33 |
+
margin: 0
|
34 |
+
}
|
35 |
+
li.add-in-mage-tab dt {
|
36 |
+
background: #D1DEDF url("add-in-mage-tab-bg.png") no-repeat 7px 7px;
|
37 |
+
padding: 7px 32px;
|
38 |
+
}
|
skin/adminhtml/default/default/addinmage/toastnotifications/toastnotifications.css
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Add In Mage::
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the EULA that is bundled with this package in the file LICENSE.txt.
|
7 |
+
* It is also available through the world-wide-web at this URL: http://add-in-mage.com/support/presales/eula/
|
8 |
+
*
|
9 |
+
*
|
10 |
+
* PROPRIETARY DATA
|
11 |
+
*
|
12 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
13 |
+
* This file is submitted to recipient in confidence.
|
14 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
15 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
16 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
17 |
+
*
|
18 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
19 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
20 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
21 |
+
*/
|
22 |
+
|
23 |
+
/** The style rules for toast notification container. **/
|
24 |
+
|
25 |
+
div.notification-bar-wrapper {
|
26 |
+
background-color: #FAF8B0; /** You can change the background color here. The format of the color is HEX. **/
|
27 |
+
color: #333; /** You can change the color of notification text here. The format of the color is HEX. **/
|
28 |
+
zoom: 1;
|
29 |
+
width: 100%;
|
30 |
+
padding: 33px 0;
|
31 |
+
font-family: Arial,Verdana,sans-serif;
|
32 |
+
font-size: 16px;
|
33 |
+
text-align: center;
|
34 |
+
display: none;
|
35 |
+
position:fixed;
|
36 |
+
left:0;
|
37 |
+
z-index: 999;
|
38 |
+
}
|
39 |
+
|
40 |
+
/** The style rules for toast notification container. Position - top (defaul position). **/
|
41 |
+
|
42 |
+
div.notification-bar-wrapper.tn-position-top {
|
43 |
+
top:-40px;
|
44 |
+
border-bottom:1px solid #ccc;
|
45 |
+
}
|
46 |
+
|
47 |
+
/** The style rules for toast notification container. Position - bottom. **/
|
48 |
+
|
49 |
+
div.notification-bar-wrapper.tn-position-bottom {
|
50 |
+
bottom: -71px;
|
51 |
+
border-top:1px solid #ccc;
|
52 |
+
}
|
53 |
+
|
54 |
+
div.notification-bar-close {
|
55 |
+
color: #555;
|
56 |
+
cursor: pointer;
|
57 |
+
font: bold 13px/18px Tahoma,sans-serif;
|
58 |
+
position: absolute;
|
59 |
+
right: 31px;
|
60 |
+
top: 31px;
|
61 |
+
}
|
62 |
+
|
63 |
+
/** Toast Notifications Success Message **/
|
64 |
+
#notification-bar .nb-success-msg {}
|
65 |
+
.nb-success-msg .notification-bar-notice {}
|
66 |
+
|
67 |
+
/** Toast Notifications Notice Message **/
|
68 |
+
#notification-bar .nb-notice-msg {}
|
69 |
+
.nb-notice-msg .notification-bar-notice {}
|
70 |
+
|
71 |
+
/** Toast Notifications Error Message **/
|
72 |
+
#notification-bar .nb-error-msg {}
|
73 |
+
.nb-error-msg .notification-bar-notice {}
|
74 |
+
|
75 |
+
/** Toast Notifications Warning Message **/
|
76 |
+
#notification-bar .nb-warning-msg {}
|
77 |
+
.nb-warning-msg .notification-bar-notice {}
|
78 |
+
|
skin/frontend/base/default/css/addinmage/toastnotifications/toastnotifications.css
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Add In Mage::
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the EULA at http://add-in-mage.com/support/presales/eula-community/
|
7 |
+
*
|
8 |
+
*
|
9 |
+
* PROPRIETARY DATA
|
10 |
+
*
|
11 |
+
* This file contains trade secret data which is the property of Add In Mage:: Ltd.
|
12 |
+
* Information and source code contained herein may not be used, copied, sold, distributed,
|
13 |
+
* sub-licensed, rented, leased or disclosed in whole or in part to anyone except as permitted by written
|
14 |
+
* agreement signed by an officer of Add In Mage:: Ltd.
|
15 |
+
* A separate installation package must be downloaded for each new Magento installation from Add In Mage web site.
|
16 |
+
* You may modify the source code of the software to get the functionality you need for your store.
|
17 |
+
* You must retain, in the source code of any Derivative Works that You create,
|
18 |
+
* all copyright, patent, or trademark notices from the source code of the Original Work.
|
19 |
+
*
|
20 |
+
*
|
21 |
+
* @copyright Copyright (c) 2012 Add In Mage:: Ltd. (http://www.add-in-mage.com)
|
22 |
+
* @license http://add-in-mage.com/support/presales/eula-community/ End User License Agreement (EULA)
|
23 |
+
* @author Add In Mage:: Team <team@add-in-mage.com>
|
24 |
+
*/
|
25 |
+
|
26 |
+
/** The style rules for toast notification container. **/
|
27 |
+
|
28 |
+
div.notification-bar-wrapper {
|
29 |
+
background-color: #fff; /** You can change the background color here. The format of the color is HEX. **/
|
30 |
+
color: #333; /** You can change the color of notification text here. The format of the color is HEX. **/
|
31 |
+
zoom: 1;
|
32 |
+
width: 100%;
|
33 |
+
padding: 23px 0;
|
34 |
+
font-family: Arial, Verdana, sans-serif;
|
35 |
+
font-size: 16px;
|
36 |
+
text-align: center;
|
37 |
+
display: none;
|
38 |
+
position:fixed;
|
39 |
+
left:0;
|
40 |
+
z-index: 999;
|
41 |
+
}
|
42 |
+
|
43 |
+
/** The style rules for toast notification container. Position - top (defaul position). **/
|
44 |
+
|
45 |
+
div.notification-bar-wrapper.tn-position-top {
|
46 |
+
top:-40px;
|
47 |
+
border-bottom:1px solid #ccc;
|
48 |
+
}
|
49 |
+
|
50 |
+
/** The style rules for toast notification container. Position - bottom. **/
|
51 |
+
|
52 |
+
div.notification-bar-wrapper.tn-position-bottom {
|
53 |
+
bottom: -71px;
|
54 |
+
border-top:1px solid #ccc;
|
55 |
+
}
|
56 |
+
|
57 |
+
/** The style rules for the close button of toast notification **/
|
58 |
+
|
59 |
+
div.notification-bar-close {
|
60 |
+
color: #555; /** You can change the button color here. The format of the color is HEX. **/
|
61 |
+
cursor: pointer;
|
62 |
+
font: bold 16px/18px Tahoma, sans-serif;
|
63 |
+
position: absolute;
|
64 |
+
right: 31px;
|
65 |
+
top: 25px;
|
66 |
+
}
|
67 |
+
/** The style rules for notifications of the "success" type **/
|
68 |
+
|
69 |
+
#notification-bar .nb-success-msg {
|
70 |
+
background: #9CCB28; /** You can change the background color here. The format of the color is HEX. **/
|
71 |
+
}
|
72 |
+
.nb-success-msg .notification-bar-notice {
|
73 |
+
color: #fff; /** You can change the text color here. The format of the color is HEX. **/
|
74 |
+
}
|
75 |
+
.nb-success-msg .notification-bar-close {
|
76 |
+
color:#fff; /** You can change the close button color here. The format of the color is HEX. **/
|
77 |
+
}
|
78 |
+
/** The style rules for notifications of the "notice" type **/
|
79 |
+
|
80 |
+
#notification-bar .nb-notice-msg {
|
81 |
+
background: #169AC2; /** You can change the background color here. The format of the color is HEX. **/
|
82 |
+
}
|
83 |
+
.nb-notice-msg .notification-bar-notice {
|
84 |
+
color: #fff; /** You can change the text color here. The format of the color is HEX. **/
|
85 |
+
}
|
86 |
+
.nb-notice-msg .notification-bar-close {
|
87 |
+
color: #fff; /** You can change the close button color here. The format of the color is HEX. **/
|
88 |
+
}
|
89 |
+
/** The style rules for notifications of the "error" type **/
|
90 |
+
|
91 |
+
#notification-bar .nb-error-msg {
|
92 |
+
background: #E45837; /** You can change the background color here. The format of the color is HEX. **/
|
93 |
+
}
|
94 |
+
.nb-error-msg .notification-bar-notice {
|
95 |
+
color: #fff; /** You can change the text color here. The format of the color is HEX. **/
|
96 |
+
}
|
97 |
+
.nb-error-msg .notification-bar-close {
|
98 |
+
color: #fff; /** You can change the background color here. The format of the color is HEX. **/
|
99 |
+
}
|
100 |
+
/** The style rules for notifications of the "warning" type **/
|
101 |
+
|
102 |
+
#notification-bar .nb-warning-msg {
|
103 |
+
background: #FFA600; /** You can change the background color here. The format of the color is HEX. **/
|
104 |
+
}
|
105 |
+
.nb-warning-msg .notification-bar-notice {
|
106 |
+
color: #000; /** You can change the text color here. The format of the color is HEX. **/
|
107 |
+
}
|
108 |
+
.nb-warning-msg .notification-bar-close {
|
109 |
+
color: #000; /** You can change the background color here. The format of the color is HEX. **/
|
110 |
+
}
|