 
     #根据关键字搜索包
     searchPackage: (keyword, done)->
-
       return done @serverPackages, keyword if @serverPackages
 
-      return if @isFetching
-      @isFetching = yes
-      @fetchAllPackageFormServer().then (result)=>
-        console.log "fetch all packages info finished,total:#{result.length}"
-        @isFetching = no
-        @serverPackages = result
-        done @serverPackages, keyword
-      .catch (error)=>
-        @showTip "Sorry, can not connect to chameleon puzzle's server temporary."
 
     #从服务器拉取所有安装包信息
     fetchAllPackageFormServer:() ->
         Q.promise (resolve, reject, notify) =>
-          r = request.get "#{PuzzleServer}/api/packages?access_token=#{PuzzleAccessToken}&sequence=1", (err, res, body) =>
+          r = request.get "#{PuzzleServer}/api/packages?access_token=#{PuzzleAccessToken}&sequence=rating", (err, res, body) =>
             reject err if err
             data = JSON.parse(body)
             resolve data.packages


        @packageList.append cell

    showTip: (text)->
      @searchTip.text text
      @searchTip.css 'display', 'block'

    @title.attr 'href', @data.home_url
    @author.text @data.author or 'no package author'
    @description.text @data.description or 'no package description'
    @rating.text @data.rating.toString().substring(0,3)
    @callback = params.callback

  onInstallButtonClick: ->
