Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/antonellaServer/assets/grocery_crud/js/jquery_plugins/ drwxr-xr-x | |
| Viewing file: Select action/file-type: (function() {
(function($) {
var my_timer = null;
var my_timer2 = null;
return $.fn.ajaxChosen = function(options, callback) {
var select;
select = this;
this.chosen({allow_single_deselect:true});
this.next('.chzn-container').find(".search-field > input").bind('keyup', function() {
var field, val;
val = $.trim($(this).attr('value'));
if (val.length < 2 || val === $(this).data('prevVal')) return false;
if (this.timer) clearTimeout(this.timer);
$(this).data('prevVal', val);
field = $(this);
options.data = {
term: val,
field_name: select.attr('name') //Inserted for grocery CRUD
};
if (typeof success === "undefined" || success === null) {
success = options.success;
}
options.success = function(data) {
var items;
if (!(data != null)) return;
select.find('option').each(function() {
if (!$(this).is(":selected")) return $(this).remove();
});
items = callback(data);
$.each(items, function(value, text) {
return $("<option />").attr('value', value).html(text).appendTo(select);
});
select.trigger("liszt:updated");
field.attr('value', val);
if (typeof success !== "undefined" && success !== null) return success();
};
if(my_timer !== null) clearTimeout(my_timer);
my_timer = setTimeout(function() {
return $.ajax(options);
}, 800);
return my_timer;
});
return this.next('.chzn-container').find(".chzn-search > input").bind('keyup', function() {
var field, val;
val = $.trim($(this).attr('value'));
if (val.length < 2 || val === $(this).data('prevVal')) return false;
field = $(this);
options.data = {
term: val,
field_name: select.attr('name') //Inserted for grocery CRUD
};
if (typeof success === "undefined" || success === null) {
success = options.success;
}
options.success = function(data) {
var items;
if (!(data != null)) return;
select.find('option').each(function() {
return $(this).remove();
});
items = callback(data);
$.each(items, function(value, text) {
return $("<option />").attr('value', value).html(text).appendTo(select);
});
select.trigger("liszt:updated");
field.attr('value', val);
if (typeof success !== "undefined" && success !== null) return success();
};
if(my_timer2 !== null) clearTimeout(my_timer2);
my_timer2 = setTimeout(function() {
return $.ajax(options);
}, 800);
return my_timer2;
});
};
})(jQuery);
}).call(this);
|
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0051 ]-- |