Passed
Push — master ( 998e10...1efe83 )
by Marcel
06:10
created

js/viewer/search.js (1 issue)

1
'use strict';
0 ignored issues
show
Use the function form of "use strict".
Loading history...
2
3
(function() {
4
    /**
5
     * Construct a new FileActions instance
6
     * @constructs Files
7
     */
8
    var Audiplayer = function() {
9
        this.initialize();
10
    };
11
    /**
12
     * @memberof OCA.Search
13
     */
14
    Audiplayer.prototype = {
15
        initialize: function() {
16
            var self = this;
17
            OC.Plugins.register('OCA.Search.Core', this);
18
        },
19
        attach: function(search) {
20
            search.setRenderer('audioplayer', this.renderResult.bind(this));
21
        },
22
        renderResult: function($row, item) {
23
            $row.find('td.icon')
24
                .css('background-image', 'url(' + OC.imagePath('audioplayer', 'app-dark') + ')')
25
                .css('opacity', '.4');
26
            return $row;
27
        }
28
    };
29
    OCA.Search.Audiplayer = Audiplayer;
30
    OCA.Search.audiplayer = new Audiplayer();
31
})();