[extensions-web] js: Force loading the first page when changing the search query



commit d47fbc37fde57b61e335ea2e0a05111429d30b68
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Apr 29 16:54:49 2012 -0400

    js: Force loading the first page when changing the search query

 sweettooth/static/js/main.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/static/js/main.js b/sweettooth/static/js/main.js
index 5be41f1..7db21e2 100644
--- a/sweettooth/static/js/main.js
+++ b/sweettooth/static/js/main.js
@@ -1,10 +1,10 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
-define(['jquery', 'messages', 'modal',
+define(['jquery', 'messages', 'modal', 'hashParamUtils',
         'extensions', 'uploader', 'fsui',
         'jquery.cookie', 'jquery.jeditable',
         'jquery.timeago', 'jquery.raty'],
-function($, messages, modal) {
+function($, messages, modal, hashParamUtils) {
     "use strict";
 
     if (!$.ajaxSettings.headers)
@@ -127,6 +127,7 @@ function($, messages, modal) {
 
             if (newTerm != term) {
                 term = newTerm;
+                hashParamUtils.setHashParam('page', undefined);
                 $extensionsList.trigger('load-page');
             }
         }).trigger('keyup');



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]