DeveloperToolbar - Version 1.2.1

Version Notes

Compatible with magento 1.2.x - 1.4.x

Download this release

Release Info

Developer Magento Core Team
Extension DeveloperToolbar
Version 1.2.1
Comparing to
See all releases


Code changes from version 1.2 to 1.2.1

app/code/community/HM/DeveloperToolbar/controllers/IndexController.php CHANGED
@@ -76,7 +76,7 @@ class HM_DeveloperToolbar_IndexController extends Mage_Core_Controller_Front_Act
76
  $scope = 'stores';
77
  $scope_id = Mage::app()->getStore()->getStoreId();
78
  $enabled = $this->getRequest()->getParam('enabled');
79
- Mage::getConfig()->saveConfig('dev/log/active', $enabled, $scope, $scope_id);
80
  $this->_redirectReferer();
81
  }
82
  }
@@ -91,8 +91,6 @@ class HM_DeveloperToolbar_IndexController extends Mage_Core_Controller_Front_Act
91
  $scope_id = Mage::app()->getStore()->getStoreId();
92
  $enabled = $this->getRequest()->getParam('enabled');
93
  Mage::getConfig()->saveConfig('dev/js/merge_files', $enabled, $scope, $scope_id);
94
- if(!Mage::getStoreConfig('dev/js/merge_files') || !Mage::getStoreConfig('dev/developertoolbar/enabled'))
95
- $this->_forward('noRoute');
96
  $this->_redirectReferer();
97
  }
98
  }
@@ -104,8 +102,6 @@ class HM_DeveloperToolbar_IndexController extends Mage_Core_Controller_Front_Act
104
  else{
105
  $enabled = $this->getRequest()->getParam('enabled');
106
  Mage::getConfig()->saveConfig('web/url/use_store', $enabled);
107
- if(!Mage::getStoreConfig('web/url/use_store') || !Mage::getStoreConfig('dev/developertoolbar/enabled'))
108
- $this->_forward('noRoute');
109
  $this->_redirectReferer();
110
  }
111
  }
@@ -117,8 +113,6 @@ class HM_DeveloperToolbar_IndexController extends Mage_Core_Controller_Front_Act
117
  else{
118
  $enabled = $this->getRequest()->getParam('enabled');
119
  Mage::getConfig()->saveConfig('web/seo/use_rewrites', $enabled);
120
- if(!Mage::getStoreConfig('web/seo/use_rewrites') || !Mage::getStoreConfig('dev/developertoolbar/enabled'))
121
- $this->_forward('noRoute');
122
  $this->_redirectReferer();
123
  }
124
  }
@@ -132,8 +126,6 @@ class HM_DeveloperToolbar_IndexController extends Mage_Core_Controller_Front_Act
132
  $scope_id = Mage::app()->getStore()->getStoreId();
133
  $enabled = $this->getRequest()->getParam('enabled');
134
  Mage::getConfig()->saveConfig('dev/translate_inline/active', $enabled, $scope, $scope_id);
135
- if(!Mage::getStoreConfig('dev/translate_inline/active') || !Mage::getStoreConfig('dev/developertoolbar/enabled'))
136
- $this->_forward('noRoute');
137
  $this->_redirectReferer();
138
  }
139
  }
@@ -149,9 +141,7 @@ class HM_DeveloperToolbar_IndexController extends Mage_Core_Controller_Front_Act
149
  foreach ($cacheTypes as $type) {
150
  $enable[$type] = 0;
151
  }
152
- Mage::app()->saveUseCache($enable);
153
- if(!Mage::getStoreConfig('dev/developertoolbar/enabled'))
154
- $this->_forward('noRoute');
155
  $this->_redirectReferer();
156
  }
157
  }
76
  $scope = 'stores';
77
  $scope_id = Mage::app()->getStore()->getStoreId();
78
  $enabled = $this->getRequest()->getParam('enabled');
79
+ Mage::getConfig()->saveConfig('dev/log/active', $enabled, $scope, $scope_id);
80
  $this->_redirectReferer();
81
  }
82
  }
91
  $scope_id = Mage::app()->getStore()->getStoreId();
92
  $enabled = $this->getRequest()->getParam('enabled');
93
  Mage::getConfig()->saveConfig('dev/js/merge_files', $enabled, $scope, $scope_id);
 
 
94
  $this->_redirectReferer();
95
  }
96
  }
102
  else{
103
  $enabled = $this->getRequest()->getParam('enabled');
104
  Mage::getConfig()->saveConfig('web/url/use_store', $enabled);
 
 
105
  $this->_redirectReferer();
106
  }
107
  }
113
  else{
114
  $enabled = $this->getRequest()->getParam('enabled');
115
  Mage::getConfig()->saveConfig('web/seo/use_rewrites', $enabled);
 
 
116
  $this->_redirectReferer();
117
  }
118
  }
126
  $scope_id = Mage::app()->getStore()->getStoreId();
127
  $enabled = $this->getRequest()->getParam('enabled');
128
  Mage::getConfig()->saveConfig('dev/translate_inline/active', $enabled, $scope, $scope_id);
 
 
129
  $this->_redirectReferer();
130
  }
131
  }
141
  foreach ($cacheTypes as $type) {
142
  $enable[$type] = 0;
143
  }
144
+ Mage::app()->saveUseCache($enable);
 
 
145
  $this->_redirectReferer();
146
  }
147
  }
app/design/frontend/default/default/layout/developertoolbar.xml CHANGED
@@ -2,6 +2,11 @@
2
  <layout version="0.1.0">
3
 
4
  <default>
 
 
 
 
 
5
  <reference name="before_body_end">
6
  <block type="core/template" name="developertoolbar" template="developertoolbar/toolbar.phtml">
7
  </block>
2
  <layout version="0.1.0">
3
 
4
  <default>
5
+ <reference name="head">
6
+ <action method="addCss"><stylesheet>css/developertoolbar/theme/tinyTips.css</stylesheet></action>
7
+ <action method="addItem"><type>skin_js</type><script>js/developertoolbar/jquery-1.3.1.min.js</script></action>
8
+ <action method="addItem"><type>skin_js</type><script>js/developertoolbar/jquery.tinyTips.js</script></action>
9
+ </reference>
10
  <reference name="before_body_end">
11
  <block type="core/template" name="developertoolbar" template="developertoolbar/toolbar.phtml">
12
  </block>
app/design/frontend/default/default/template/developertoolbar/toolbar.phtml CHANGED
@@ -47,10 +47,13 @@
47
 
48
  if(!$case){
49
  exit;
50
- }else{
 
 
51
 
52
  ?>
53
- <style>
 
54
  .developertoolbar {
55
  position: fixed;
56
  left: 0px;
@@ -98,6 +101,8 @@
98
  .developertoolbar .disabled {
99
  color: #666;
100
  }
 
 
101
  </style>
102
 
103
  <script language="javascript">
@@ -110,35 +115,99 @@ function hide_developer_toolbar(){
110
  document.getElementById('developertoolbar').style.width = "100px";
111
  }
112
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  </script>
114
-
115
  <div class="developertoolbar" id="developertoolbar">
116
  <a href="" onclick="hide_developer_toolbar(); return false;"><span class="bar_name">Developer Toolbar</span></a>
117
 
118
 
119
  <span id="bar_content">
120
- <a <?php if (Mage::getStoreConfig('dev/debug/template_hints') != '1') echo ' class="disabled "'; ?> href="<?php echo $this->getUrl('developertoolbar/index/hints/enabled/'.(Mage::getStoreConfig('dev/debug/template_hints')!='1'?1:0).'/type/front') ?>">Frontend Hints</a>
121
-
122
  <span class="seperate"></span>
123
- <a <?php if (Mage::getStoreConfig('dev/debug/template_hints', 0) != '1') echo ' class="disabled "'; ?> href="<?php echo $this->getUrl('developertoolbar/index/hints/enabled/'.(Mage::getStoreConfig('dev/debug/template_hints', 0)!='1'?1:0).'/type/back') ?>">Backend Hints</a>
124
 
125
  <span class="seperate"></span>
126
- <a <?php if (Mage::getStoreConfig('dev/log/active') != '1') echo ' class="disabled "'; ?> href="<?php echo $this->getUrl('developertoolbar/index/log/enabled/'.(Mage::getStoreConfig('dev/log/active')!='1'?1:0)) ?>">Logs</a>
127
 
128
  <span class="seperate"></span>
129
- <a <?php if (Mage::getStoreConfig('dev/js/merge_files') != '1') echo ' class="disabled "'; ?> href="<?php echo $this->getUrl('developertoolbar/index/js/enabled/'.(Mage::getStoreConfig('dev/js/merge_files')!='1'?1:0)) ?>">Merge JS</a>
130
 
131
  <span class="seperate"></span>
132
- <a <?php if (Mage::getStoreConfig('web/url/use_store') != '1') echo ' class="disabled "'; ?> href="<?php echo $this->getUrl('developertoolbar/index/url/enabled/'.(Mage::getStoreConfig('web/url/use_store')!='1'?1:0)) ?>">Store Code in Urls</a>
133
 
134
  <span class="seperate"></span>
135
- <a <?php if (Mage::getStoreConfig('web/seo/use_rewrites') != '1') echo ' class="disabled "'; ?> href="<?php echo $this->getUrl('developertoolbar/index/seo/enabled/'.(Mage::getStoreConfig('web/seo/use_rewrites')!='1'?1:0)) ?>">SEO Rewrites</a>
136
 
137
  <span class="seperate"></span>
138
- <a <?php if (Mage::getStoreConfig('dev/translate_inline/active') != '1') echo ' class="disabled "'; ?> href="<?php echo $this->getUrl('developertoolbar/index/translate/enabled/'.(Mage::getStoreConfig('dev/translate_inline/active')!='1'?1:0)) ?>">Translate Inline</a>
139
 
140
  <span class="seperate"></span>
141
- <a style="color:#FF0000;" href="<?php echo $this->getUrl('developertoolbar/index/cache/') ?>">Clean & Disable All Cache</a>
142
  </span>
143
  </div>
144
- <?php } ?>
 
 
 
 
 
47
 
48
  if(!$case){
49
  exit;
50
+ }else{
51
+ $show_enable = "disable";
52
+ $show_disable = "enable";
53
 
54
  ?>
55
+ <style>
56
+
57
  .developertoolbar {
58
  position: fixed;
59
  left: 0px;
101
  .developertoolbar .disabled {
102
  color: #666;
103
  }
104
+ #cloud1 {top: 93px; left: 230px;}
105
+ .tTip { cursor: pointer; color: #666; font-weight: bold;}
106
  </style>
107
 
108
  <script language="javascript">
115
  document.getElementById('developertoolbar').style.width = "100px";
116
  }
117
  }
118
+ </script>
119
+ <script type="text/javascript"><!--
120
+ var check = true;
121
+ processKeyEvent = function(eventType, event)
122
+ {
123
+ if(event.ctrlKey && event.altKey)
124
+ {
125
+ switch(event.which){
126
+ case 49:
127
+ if(check==true)
128
+ {
129
+ document.getElementById("developertoolbar").style.display = "none";
130
+ check = false;
131
+ }
132
+ else
133
+ {
134
+ document.getElementById("developertoolbar").style.display = "block";
135
+ check = true;
136
+ }
137
+
138
+ break;
139
+
140
+ case 50:
141
+ window.location = document.getElementById("template_hints");
142
+ break;
143
+ case 51:
144
+ window.location = document.getElementById("template_hints_");
145
+ break;
146
+ case 52:
147
+ window.location = document.getElementById("log");
148
+ break;
149
+ case 53:
150
+ window.location = document.getElementById("merge_files");
151
+ break;
152
+ case 54:
153
+ window.location = document.getElementById("use_store");
154
+ break;
155
+ case 55:
156
+ window.location = document.getElementById("use_rewrites");
157
+ break;
158
+ case 56:
159
+ window.location = document.getElementById("translate_inline");
160
+ break;
161
+ case 57:
162
+ window.location = document.getElementById("cache");
163
+ break;
164
+ }
165
+
166
+ }
167
+ };
168
+
169
+ processKeyDown = function(event)
170
+ {
171
+
172
+ processKeyEvent("onkeydown", event);
173
+ };
174
+ window.onkeydown=processKeyDown;
175
+
176
+
177
+
178
  </script>
 
179
  <div class="developertoolbar" id="developertoolbar">
180
  <a href="" onclick="hide_developer_toolbar(); return false;"><span class="bar_name">Developer Toolbar</span></a>
181
 
182
 
183
  <span id="bar_content">
184
+
185
+ <a id="template_hints" <?php if (Mage::getStoreConfig('dev/debug/template_hints') != '1') {echo 'class="show_info disabled"'; echo 'title="'.$show_enable.'"';} else {echo 'class="show_info"';echo 'title="'.$show_disable.'"';} ?> href="<?php echo $this->getUrl('developertoolbar/index/hints/enabled/'.(Mage::getStoreConfig('dev/debug/template_hints')!='1'?1:0).'/type/front') ?>">Frontend Hints</a>
186
  <span class="seperate"></span>
187
+ <a id="template_hints_" <?php if (Mage::getStoreConfig('dev/debug/template_hints', 0) != '1'){echo 'class="show_info disabled"'; echo 'title="'.$show_enable.'"';} else {echo 'class="show_info"';echo 'title="'.$show_disable.'"';} ?> href="<?php echo $this->getUrl('developertoolbar/index/hints/enabled/'.(Mage::getStoreConfig('dev/debug/template_hints', 0)!='1'?1:0).'/type/back') ?>">Backend Hints</a>
188
 
189
  <span class="seperate"></span>
190
+ <a id="log" <?php if (Mage::getStoreConfig('dev/log/active') != '1'){echo 'class="show_info disabled"'; echo 'title="'.$show_enable.'"';} else {echo 'class="show_info"';echo 'title="'.$show_disable.'"';} ?> href="<?php echo $this->getUrl('developertoolbar/index/log/enabled/'.(Mage::getStoreConfig('dev/log/active')!='1'?1:0)) ?>">Logs</a>
191
 
192
  <span class="seperate"></span>
193
+ <a id="merge_files" <?php if (Mage::getStoreConfig('dev/js/merge_files') != '1'){echo 'class="show_info disabled"'; echo 'title="'.$show_enable.'"';} else {echo 'class="show_info"';echo 'title="'.$show_disable.'"';} ?> href="<?php echo $this->getUrl('developertoolbar/index/js/enabled/'.(Mage::getStoreConfig('dev/js/merge_files')!='1'?1:0)) ?>">Merge JS</a>
194
 
195
  <span class="seperate"></span>
196
+ <a id="use_store" <?php if (Mage::getStoreConfig('web/url/use_store') != '1'){echo 'class="show_info disabled"'; echo 'title="'.$show_enable.'"';} else {echo 'class="show_info"';echo 'title="'.$show_disable.'"';} ?> href="<?php echo $this->getUrl('developertoolbar/index/url/enabled/'.(Mage::getStoreConfig('web/url/use_store')!='1'?1:0)) ?>">Store Code in Urls</a>
197
 
198
  <span class="seperate"></span>
199
+ <a id="use_rewrites" <?php if (Mage::getStoreConfig('web/seo/use_rewrites') != '1'){echo 'class="show_info disabled"'; echo 'title="'.$show_enable.'"';} else {echo 'class="show_info"';echo 'title="'.$show_disable.'"';} ?> href="<?php echo $this->getUrl('developertoolbar/index/seo/enabled/'.(Mage::getStoreConfig('web/seo/use_rewrites')!='1'?1:0)) ?>">SEO Rewrites</a>
200
 
201
  <span class="seperate"></span>
202
+ <a id="translate_inline" <?php if (Mage::getStoreConfig('dev/translate_inline/active') != '1'){echo 'class="show_info disabled"'; echo 'title="'.$show_enable.'"';} else {echo 'class="show_info"';echo 'title="'.$show_disable.'"';} ?> href="<?php echo $this->getUrl('developertoolbar/index/translate/enabled/'.(Mage::getStoreConfig('dev/translate_inline/active')!='1'?1:0)) ?>">Translate Inline</a>
203
 
204
  <span class="seperate"></span>
205
+ <a id="cache" title="Clean & Disable All Cache" class="show_info" style="color:#FF0000;" href="<?php echo $this->getUrl('developertoolbar/index/cache/') ?>">Clean & Disable All Cache</a>
206
  </span>
207
  </div>
208
+ <?php } ?>
209
+ <script type="text/javascript">
210
+ $(document).ready(function() {
211
+ $('.show_info').tinyTips('title');
212
+ });
213
+ </script>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DeveloperToolbar</name>
4
- <version>1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Developer Toolbar is an useful tool for magento developer. It allow you access quickly to regular used functions without logging in to admin.</description>
11
  <notes>Compatible with magento 1.2.x - 1.4.x</notes>
12
  <authors><author><name>Hai NGUYEN</name><user>auto-converted</user><email>haint@mage-world.com</email></author></authors>
13
- <date>2010-04-10</date>
14
- <time>14:41:58</time>
15
- <contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="developertoolbar.xml" hash="ce223c8b7ebcb02b94001298493a538d"/></dir><dir name="template"><dir name="developertoolbar"><file name="toolbar.phtml" hash="c1b37de01864a10a6ca2e87a2ae5cf51"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="HM"><dir name="DeveloperToolbar"><dir name="controllers"><file name="IndexController.php" hash="1ec8252b57d58fdb48b479dced5d0519"/></dir><dir name="etc"><file name="config.xml" hash="88dccd6de1a371868366e88d2b46e457"/><file name="system.xml" hash="4fa690d966befea2c4605983306ec8c5"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="HM_DeveloperToolbar.xml" hash="08f56679bb2ba0892395f48520b0c09a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DeveloperToolbar</name>
4
+ <version>1.2.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
10
  <description>Developer Toolbar is an useful tool for magento developer. It allow you access quickly to regular used functions without logging in to admin.</description>
11
  <notes>Compatible with magento 1.2.x - 1.4.x</notes>
12
  <authors><author><name>Hai NGUYEN</name><user>auto-converted</user><email>haint@mage-world.com</email></author></authors>
13
+ <date>2010-04-14</date>
14
+ <time>09:54:07</time>
15
+ <contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="developertoolbar.xml" hash="6135ad91671b495ba8e41266c93b573b"/></dir><dir name="template"><dir name="developertoolbar"><file name="toolbar.phtml" hash="141f676f85498ebd89da31b530dc2ab0"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="HM"><dir name="DeveloperToolbar"><dir name="controllers"><file name="IndexController.php" hash="48c62efffa81658bd85c0508e2bbc156"/></dir><dir name="etc"><file name="config.xml" hash="88dccd6de1a371868366e88d2b46e457"/><file name="system.xml" hash="4fa690d966befea2c4605983306ec8c5"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="HM_DeveloperToolbar.xml" hash="08f56679bb2ba0892395f48520b0c09a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>