Test Setup Failed
Push — master ( 982d9a...a2862f )
by
unknown
03:40
created

place-order-view.js ➔ ... ➔ PlaceOrderView   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
define(function(require) {
2
    'use strict';
3
4
    var PlaceOrderView;
5
    var BaseView = require('oroui/js/app/views/base/view');
6
7
    PlaceOrderView = BaseView.extend({
8
        events: {
9
            load: 'onFrameLoad'
10
        },
11
12
        /**
13
         * @inheritDoc
14
         */
15
        constructor: function PlaceOrderView() {
16
            PlaceOrderView.__super__.constructor.apply(this, arguments);
17
        },
18
19
        /**
20
         * @inheritDoc
21
         */
22
        initialize: function() {
23
            BaseView.__super__.initialize.apply(this, arguments);
24
25
            var $frame = this.$el;
26
27
            $frame.attr('src', $frame.data('src').replace(/^https?:/gi, ''));
28
        },
29
30
        onFrameLoad: function(e) {
0 ignored issues
show
Unused Code introduced by
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
31
            var $frame = this.$el;
32
            var offset = $frame.closest('.ui-dialog').find('.ui-dialog-titlebar').outerHeight() || 0;
33
34
            $frame.addClass('loaded').parent().css({top: offset});
35
36
            this.trigger('frameLoaded');
37
        }
38
    });
39
40
    return PlaceOrderView;
41
});
42