Pulsestorm_Launcher - Version 1.0.1

Version Notes

Typo fixes, properly aborts ajax requests.

Download this release

Release Info

Developer Alan Storm
Extension Pulsestorm_Launcher
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Pulsestorm/Launcher/README.md ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Pulse Storm Launcher
2
+ ==================================================
3
+
4
+ See: http://alanstorm.com/category/magento#magento_pulse_storm_launcher
5
+
6
+
7
+ Release Notes
8
+ --------------------------------------------------
9
+
10
+ ### 1.0.0
11
+
12
+ Initial release. Yay!
13
+
14
+ ### 1.0.1
15
+
16
+ Fix "default" typos.
17
+
18
+ Added transport.abort()
app/code/community/Pulsestorm/Launcher/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pulsestorm_Launcher>
5
- <version>0.1.1</version>
6
  </Pulsestorm_Launcher>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Pulsestorm_Launcher>
5
+ <version>1.0.1</version>
6
  </Pulsestorm_Launcher>
7
  </modules>
8
  <frontend>
app/code/community/Pulsestorm/Launcher/etc/system.xml CHANGED
@@ -19,7 +19,7 @@
19
  <fields>
20
  <shortcut_code_first>
21
  <label>Keyboard Shortcut First</label>
22
- <comment>The keycode of the first keyboard shortcut (defulats to "ctrl"/"17")</comment>
23
  <frontend_type>text</frontend_type>
24
  <sort_order>10</sort_order>
25
  <show_in_default>1</show_in_default>
@@ -29,7 +29,7 @@
29
 
30
  <shortcut_code_second>
31
  <label>Keyboard Shortcut Second</label>
32
- <comment>The keycode of the first keyboard shortcut (defulats to "m"/"77")</comment>
33
  <frontend_type>text</frontend_type>
34
  <sort_order>15</sort_order>
35
  <show_in_default>1</show_in_default>
19
  <fields>
20
  <shortcut_code_first>
21
  <label>Keyboard Shortcut First</label>
22
+ <comment>The keycode of the first keyboard shortcut (defaults to "ctrl"/"17")</comment>
23
  <frontend_type>text</frontend_type>
24
  <sort_order>10</sort_order>
25
  <show_in_default>1</show_in_default>
29
 
30
  <shortcut_code_second>
31
  <label>Keyboard Shortcut Second</label>
32
+ <comment>The keycode of the first keyboard shortcut (defaults to "m"/"77")</comment>
33
  <frontend_type>text</frontend_type>
34
  <sort_order>15</sort_order>
35
  <show_in_default>1</show_in_default>
app/design/adminhtml/default/default/template/pulsestorm_launcher/js-nav.phtml CHANGED
@@ -183,6 +183,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
183
  //test = new Autocompleter.Local('pulsestorm_launcher_input','pulsestorm_launcher_results',['foo','baz','bar'],{'updateElement':thing});
184
 
185
  var timeout_search=false;
 
186
  $('pulsestorm_launcher_input').observe('keyup', function(e){
187
  if(e.which == 40 || e.which == 38)
188
  {
@@ -204,6 +205,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
204
  if($F('pulsestorm_launcher_input') && $F('pulsestorm_launcher_input').length > 2)
205
  {
206
  timeout_search = setTimeout(function(){
 
 
 
 
 
 
 
 
 
 
 
207
  var url = pulsestorm_launcher_search_url.url;
208
  url += ('?query='+$F('pulsestorm_launcher_input'));
209
  // var url = 'http://magento1point7pointzeropoint1.dev/index.php/admin/index/globalSearch/key/ac3d62400d96f06be161863f7e4470d3/?query=nokia';
@@ -215,7 +227,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
215
  p.id = 'pulsestorm_launcher_throbber';
216
  $('pulsestorm_launcher_results').insert(p);
217
 
218
- new Ajax.Request(url, {
219
  method: 'get',
220
  onSuccess: function(transport) {
221
  var container = new Element('div');
@@ -236,6 +248,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
236
  }
237
  });
238
 
 
 
239
  }, 100);
240
  }
241
 
183
  //test = new Autocompleter.Local('pulsestorm_launcher_input','pulsestorm_launcher_results',['foo','baz','bar'],{'updateElement':thing});
184
 
185
  var timeout_search=false;
186
+ var search_requests = [];
187
  $('pulsestorm_launcher_input').observe('keyup', function(e){
188
  if(e.which == 40 || e.which == 38)
189
  {
205
  if($F('pulsestorm_launcher_input') && $F('pulsestorm_launcher_input').length > 2)
206
  {
207
  timeout_search = setTimeout(function(){
208
+ //abort other pending requests
209
+ if(search_requests.length > 0)
210
+ {
211
+ var old_search;
212
+ while(old_search = search_requests.pop())
213
+ {
214
+ old_search.transport.abort();
215
+ console.log("aborting");
216
+ }
217
+ }
218
+
219
  var url = pulsestorm_launcher_search_url.url;
220
  url += ('?query='+$F('pulsestorm_launcher_input'));
221
  // var url = 'http://magento1point7pointzeropoint1.dev/index.php/admin/index/globalSearch/key/ac3d62400d96f06be161863f7e4470d3/?query=nokia';
227
  p.id = 'pulsestorm_launcher_throbber';
228
  $('pulsestorm_launcher_results').insert(p);
229
 
230
+ var search_request = new Ajax.Request(url, {
231
  method: 'get',
232
  onSuccess: function(transport) {
233
  var container = new Element('div');
248
  }
249
  });
250
 
251
+ search_requests.push(search_request);
252
+
253
  }, 100);
254
  }
255
 
package.xml CHANGED
@@ -1,2 +1,2 @@
1
  <?xml version="1.0"?>
2
- <package><name>Pulsestorm_Launcher</name><version>1.0.0</version><stability>stable</stability><license>MIT</license><channel>community</channel><extends></extends><summary>Provides navigation shortcuts for the admin console's navigation and gloal search</summary><description>This extension provides Magento admin console users with an "application launcher". This application launcher provides instant access to the admin console's navigation, every system configuration search section, as well as the Magento global search. The Pulse Storm launcher is a free, open source, must have extension for anyone working with Magento. </description><notes>Initial Release</notes><authors><author><name>Alan Storm</name><user>alanstorm</user><email>astorm@alanstorm.com</email></author></authors><date>2012-10-02</date><time>15:32:15</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Pulsestorm"><dir name="Launcher"><dir name="Block"><dir name="Page"><file name="Menu.php" hash="9e2086c0e2f7b7d1f47d3bc071d75da1"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="10ad3abbcfed784a909080b735d7a7fc"/><file name="config.xml" hash="2d8255f7ac85c60dbb1d8ded0a04a5af"/><file name="system.xml" hash="3a3766421a909ad48dc65811e78118e5"/></dir><dir name="Helper"><file name="Data.php" hash="1fc4917e3807911e9d7b6601aeeda82d"/></dir><dir name="Model"><file name="Links.php" hash="d0f545b5e5a1c1fb17ef0046a3d53bb7"/><file name="Observer.php" hash="8f50290cab348cd4261fed6fbe16191a"/></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="pulsestorm_launcher"><file name="hook.phtml" hash="448893b714d310dc1a573dcdc262d650"/><file name="js-nav.phtml" hash="fbf607976241b47454061602e25e4688"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Pulsestorm_Launcher.xml" hash="39d02d974ef2ad1d970e9fcb83ccdff8"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="pulsestorm_launcher"><file name="main.css" hash="a6c225a68bc2a6e61b2d7b8e1e0220bd"/></dir></dir></dir></dir></dir></target></contents></package>
1
  <?xml version="1.0"?>
2
+ <package><name>Pulsestorm_Launcher</name><version>1.0.1</version><stability>stable</stability><license>MIT</license><channel>community</channel><extends></extends><summary>Provides navigation shortcuts for the admin console's navigation and gloal search</summary><description>This extension provides Magento admin console users with an "application launcher". This application launcher provides instant access to the admin console's navigation, every system configuration search section, as well as the Magento global search. The Pulse Storm launcher is a free, open source, must have extension for anyone working with Magento. </description><notes>Typo fixes, properly aborts ajax requests.</notes><authors><author><name>Alan Storm</name><user>alanstorm</user><email>astorm@alanstorm.com</email></author></authors><date>2012-10-04</date><time>10:43:33</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Pulsestorm"><dir name="Launcher"><file name="README.md" hash="6593ef7d7685f05fd806828a9a0593ce"/><dir name="Block"><dir name="Page"><file name="Menu.php" hash="9e2086c0e2f7b7d1f47d3bc071d75da1"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="10ad3abbcfed784a909080b735d7a7fc"/><file name="config.xml" hash="0f14ec5f504973b2312d4b4355829b99"/><file name="system.xml" hash="261397226ae84a63f1cfb64a925715ee"/></dir><dir name="Helper"><file name="Data.php" hash="1fc4917e3807911e9d7b6601aeeda82d"/></dir><dir name="Model"><file name="Links.php" hash="d0f545b5e5a1c1fb17ef0046a3d53bb7"/><file name="Observer.php" hash="8f50290cab348cd4261fed6fbe16191a"/></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="pulsestorm_launcher"><file name="hook.phtml" hash="448893b714d310dc1a573dcdc262d650"/><file name="js-nav.phtml" hash="7f21fea3a44b22f2a6830503fcb0c4d5"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Pulsestorm_Launcher.xml" hash="39d02d974ef2ad1d970e9fcb83ccdff8"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="pulsestorm_launcher"><file name="main.css" hash="a6c225a68bc2a6e61b2d7b8e1e0220bd"/></dir></dir></dir></dir></dir></target></contents></package>