%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/projetos/suporte.iigd.com.br.old/js/modules/Search/
Upload File :
Create Path :
Current File : /var/www/projetos/suporte.iigd.com.br.old/js/modules/Search/GenericView.min.js

/**
 * ---------------------------------------------------------------------
 *
 * GLPI - Gestionnaire Libre de Parc Informatique
 *
 * http://glpi-project.org
 *
 * @copyright 2015-2022 Teclib' and contributors.
 * @copyright 2003-2014 by the INDEPNET Development Team.
 * @licence   https://www.gnu.org/licenses/gpl-3.0.html
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 * ---------------------------------------------------------------------
 */
window.GLPI=window.GLPI||{};window.GLPI.Search=window.GLPI.Search||{};window.GLPI.Search.GenericView=class e{constructor(e){this.element_id=e;if(this.getElement()){this.registerListeners()}}postInit(){}getElement(){return $("#"+this.element_id)}getResultsView(){return this.getElement().closest(".ajax-container.search-display-data").data("js_class")}showLoadingSpinner(){const e=this.getElement();const s=e.parent();let n=s.find("div.spinner-overlay");if(n.length===0){s.append(`\n            <div class="spinner-overlay text-center">\n                <div class="spinner-border" role="status">\n                    <span class="sr-only">${__("Loading...")}</span>\n                </div>\n            </div>`);n=s.find("div.spinner-overlay")}else{n.css("visibility","visible")}}hideLoadingSpinner(){const e=this.getElement().parent().find("div.spinner-overlay");e.css("visibility","hidden")}registerListeners(){const e=this.getResultsView().getAJAXContainer();const s=e.closest(".search-container");$(s).on("click","a.bookmark_record.save",(()=>{const e=$("#savedsearch-modal");e.appendTo("body");e.empty();e.html(`\n            <div class="modal-dialog modal-lg">\n                <div class="modal-content">\n                    <div class="modal-header"><h5 class="modal-title">${__("Save current search")}</h5>\n                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="${__("Close")}"></button>\n                    </div>\n                    <div class="modal-body"></div>\n                </div>\n            </div>\n            `);const s=new bootstrap.Modal(e.get(0),{show:false});e.on("show.bs.modal",(()=>{const s=e.attr("data-url")+"&url="+encodeURIComponent(window.location.pathname+window.location.search);e.find(".modal-body").load(s,{})}));s.show()}))}onSearch(){this.refreshResults()}refreshResults(){}};export default window.GLPI.Search.GenericView;

Zerion Mini Shell 1.0