| Server IP : 51.222.109.124 / Your IP : 216.73.217.148 Web Server : Apache System : Linux scl07net.netdom.salvador.br 3.10.0-962.3.2.lve1.5.44.3.el7.x86_64 #1 SMP Mon Feb 22 04:35:33 EST 2021 x86_64 User : vertra94 ( 1153) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/vertra94/public_html/loja/app/js/jquery/ |
Upload File : |
/*!
* Copyright (c) 2010 Andrew Watts
*
* Dual licensed under the MIT (MIT_LICENSE.txt)
* and GPL (GPL_LICENSE.txt) licenses
*
* http://github.com/andrewwatts/ui.tabs.closable
*/
(function() {
var ui_tabs_tabify = $.ui.tabs.prototype._tabify;
$.extend($.ui.tabs.prototype, {
_tabify: function() {
var self = this;
ui_tabs_tabify.apply(this, arguments);
// if closable tabs are enable, add a close button
if (self.options.closable === true) {
var unclosable_lis = this.lis.filter(function() {
// return the lis that do not have a close button
return $('span.ui-icon-circle-close', this).length === 0;
});
// append the close button and associated events
unclosable_lis.each(function() {
if($(this).hasClass('no-close') == false){
$(this)
.append('<a href="javscript:void(0)"><span class="ui-icon ui-icon-circle-close"></span></a>')
.find('a:last')
.hover(
function() {
$(this).css('cursor', 'pointer');
},
function() {
$(this).css('cursor', 'default');
}
)
.click(function() {
var index = self.lis.index($(this).parent());
if (index > -1) {
// call _trigger to see if remove is allowed
if (false === self._trigger("closableClick", null, self._ui( $(self.lis[index]).find( "a" )[ 0 ], self.panels[index] ))) return;
// remove this tab
self.remove(index)
}
// don't follow the link
return false;
})
.end();
}
else
{
$(this)
.append('<a href="javscript:void(0)"><span class="ui-icon ui-icon-transfer-e-w"></span></a>')
.end();
}
})
}
}
});
})(jQuery);