odoo.define('kyb_portal_web.tour', function(require) {
"use strict";
 
var core = require('web.core');
var tour = require('web_tour.tour');
var base = require("web_editor.base");
 
var _t = core._t;
 
tour.register('kyb_portal_web_tour', {
    url: "/",
    wait_for: base.ready(),
}, [tour.STEPS.MENU_MORE, {
    trigger: 'a[class=dropdown-toggle]',
    content: _t('Ingresar a mi cuenta'),
    position: 'bottom',
}]);
});



//----------------------------------------------------
$(document).on('change','.btn-file :file',function(){
  var input = $(this);
  var numFiles = input.get(0).files ? input.get(0).files.length : 1;
  var label = input.val().replace(/\\/g,'/').replace(/.*\//,'');
  input.trigger('fileselect',[numFiles,label]);
});
$(document).ready(function(){
  $('.btn-file :file').on('fileselect',function(event,numFiles,label){
    var input = $(this).parents('.input-group').find(':text');
    var log = numFiles > 1 ? numFiles + ' files selected' : label;
    if(input.length){ input.val(log); }else{ if (log) alert(log); }
  });
});