grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026/** * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ /** * Field user */ ;(function($){ 'use strict'; $.fieldUser = function(container, options){ // Merge options with defaults this.options = $.extend({}, $.fieldUser.defaults, options); // Set up elements this.$container = $(container); this.$modal = this.$container.find(this.options.modal); this.$modalBody = this.$modal.children('.modal-body'); this.$input = this.$container.find(this.options.input); this.$inputName = this.$container.find(this.options.inputName); this.$buttonSelect = this.$container.find(this.options.buttonSelect); // Bind events this.$buttonSelect.on('click', this.modalOpen.bind(this)); this.$modal.on('hide', this.removeIframe.bind(this)); // Check for onchange callback, var onchangeStr = this.$input.attr('data-onchange'), onchangeCallback; if(onchangeStr) { onchangeCallback = new Function(onchangeStr); this.$input.on('change', onchangeCallback.bind(this.$input)); } }; // display modal for select the file $.fieldUser.prototype.modalOpen = function() { var $iframe = $('