Completed
Push — dev5 ( 76b71a...013a5b )
by Ron
11:53
created

resources/js/template_files/file-upload.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 12
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 9
mnd 0
bc 0
fnc 4
dl 0
loc 12
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
1
(function($) {
2
  'use strict';
3
  $(function() {
4
    $('.file-upload-browse').on('click', function() {
5
      var file = $(this).parent().parent().parent().find('.file-upload-default');
6
      file.trigger('click');
7
    });
8
    $('.file-upload-default').on('change', function() {
9
      $(this).parent().find('.form-control').val($(this).val().replace(/C:\\fakepath\\/i, ''));
10
    });
11
  });
12
})(jQuery);