PageSourceSearch

https://djazz.se/apps/eqbeats/js/contents/search-result.js

js djazz.se collected 2026-10-03 20:42:12 UTC 1,408 bytes, 52 lines download raw bytes

1// Generated by CoffeeScript 1.6.3
2this.App.module('Search.Result', function(Result, App, Backbone, Marionette, $, _) {
3  'use strict';
4  return Result.Controller = App.Controllers.Base.extend({
5    initialize: function(options) {
6      var info, query, tracks,
7        _this = this;
8      query = options.query;
9      tracks = App.request("search:tracks:entities", query);
10      info = new Backbone.Model({
11        query: query
12      });
13      this.layout = this.getLayoutView();
14      this.listenTo(this.layout, 'show', function() {
15        _this.showInfoView(info);
16        return _this.showTracksView(tracks);
17      });
18      return this.show(this.layout, {
19        loading: {
20          entities: tracks
21        }
22      });
23    },
24    showInfoView: function(info) {
25      var infoView;
26      infoView = this.getInfoView(info);
27      return this.show(infoView, {
28        region: this.layout.info
29      });
30    },
31    showTracksView: function(tracks) {
32      var listView;
33      listView = this.getTracksView(tracks);
34      return this.show(listView, {
35        region: this.layout.result
36      });
37    },
38    getInfoView: function(info) {
39      return new Result.Info({
40        model: info
41      });
42    },
43    getTracksView: function(tracks) {
44      return new App.View.Playlist({
45        collection: tracks
46      });
47    },
48    getLayoutView: function() {
49      return new Result.Layout;
50    }
51  });
52});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.