New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

px-jquery-filter-box

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

px-jquery-filter-box - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15

2

package.json
{
"name": "px-jquery-filter-box",
"version": "1.0.14",
"version": "1.0.15",
"description": "Used to group objects used jquery-filter-box filter. When the filtering objects are many, up to 2 or more lines, jquery-filter-box allows you to group these objects as many times as you want. For example, you can use Filter 1, Filter 2, Filter 3, Filter 4, Filter 5 ... objects as a single object with jquery-filter-box[Filter 1, Filter 2, Filter 3, Filter 4, Filter 5]",

@@ -5,0 +5,0 @@ "main": "px-filter-box.js",

@@ -20,3 +20,2 @@ (function ($) {

let _filterobjectshtml = $(this).html();

@@ -34,2 +33,3 @@ let _parent = $(this).parent();

select_add_default_option: true,
select_default_value: "-999",
select_default_text: "Seçiniz",

@@ -87,4 +87,4 @@

$(_objtag).each(function () {
if (_options.select_add_default_option && $("option[value='-999']", $(this)).length == 0) {
$(this).prepend('<option value="-999">' + _options.select_default_text + '</option>').val("-999");
if (_options.select_add_default_option && $("option[value='" + _options.select_default_value + "']", $(this)).length == 0) {
$(this).prepend('<option value="' + _options.select_default_value + '">' + _options.select_default_text + '</option>').val(_options.select_default_value);
}

@@ -208,7 +208,7 @@

if (vl.length > 0) {
vl = vl.toString().replace('-999,', '').trim();
vl = vl.toString().replace(_options.select_default_value + ',', '').trim();
}
}
if (vl == "") {
vl = "-999";
vl = _options.select_default_value;
}

@@ -219,7 +219,7 @@ } else {

if (vl == "") {
vl = "-999";
vl = _options.select_default_value;
}
}
if (vl == '-999')
if (vl == _options.select_default_value)
vl = null;

@@ -233,8 +233,10 @@ else

function clean_selected_values(_obj, _callback) {
$(_obj).parents(".px-filter-box").addClass("clearing");
$(".my-flt-control", $(_obj).parents(".px-filter-box")).each(function () {
if ($(this).prop("tagName") === "SELECT") {
if ($(this).parent().hasClass("bootstrap-select")) {
$(this).selectpicker("val", "-999");
$(this).selectpicker("val", _options.select_default_value);
} else {
$(this).val("-999");
$(this).val(_options.select_default_value);
}

@@ -252,12 +254,24 @@ } else {

const el = select2_list[i];
el.select2.val("-999").trigger("change");
el.select2.val(_options.select_default_value).trigger("change");
}
}
if (_callback !== undefined && _callback !== null)
_callback(null);
if (_callback !== undefined && _callback !== null) {
let _data = $(".my-flt-objects .my-flt-container", $(_obj).parents(".px-filter-box")).attr("data-json");
if (_data && _data != "") {
_data = JSON.parse(_data);
} else {
_data = null;
}
_callback(_data);
}
$(_obj).parents(".px-filter-box").removeClass("clearing");
}
function send_selected_params(_id, _callback) {
let _objcls = "#" + _id + " .my-flt-objects .my-flt-container";
let data = '';
let data = {};
let selectedCount = 0;

@@ -276,8 +290,2 @@

if (vl != null) {
data += (data != '' ? ', ' : '') + objname + " : '" + vl.replace("'", '') + "'";
} else {
data += (data != '' ? ', ' : '') + objname + " : null";
}
if (vl != null) {
if ($("#" + _id + " [data-member-name='" + objname + "']").length > 0) {

@@ -291,13 +299,25 @@ $("#" + _id + " [data-member-name='" + objname + "']").addClass("my-fltr-selected-value");

}
try {
let newData = "";
if (vl != null) {
newData = '{ "' + objname + '": "' + vl.replaceAll("'", "").replaceAll('"', '') + '" }';
} else {
newData = '{ "' + objname + '": null }';
}
newData = JSON.parse(newData);
data = { ...data, ...newData };
} catch (err) { }
});
if (data != '') {
data = JSON.parse('{' + data + '}');
}
$("#" + _id + " .my-flt-selected-count").html(selectedCount);
if (_callback !== undefined && _callback !== null)
if (!$(_objcls).parents(".px-filter-box").hasClass("clearing") && _callback !== undefined && _callback !== null) {
$(_objcls).attr("data-json", JSON.stringify(data));
_callback(data);
else
} else
return data;

@@ -317,2 +337,10 @@ }

}
String.prototype.replaceAll = function (search, replacement) {
// if((typeof this)!=='string')
//
// return this;
var target = this;
return target.split(search).join(replacement);
};
})(jQuery);

@@ -45,2 +45,3 @@ ## description

> button_caption: "Filtreyi Uygula",<br>
> select_add_default_option: true,
> select_default_text: "Seçiniz",<br>

@@ -47,0 +48,0 @@ > selected_info_text: "Filtre Seçildi",<br>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc