|
|
@@ -1,9 +1,6 @@
|
|
|
-
|
|
|
-
|
|
|
+// var search_output = {};
|
|
|
$(function() {
|
|
|
- $(".search-by-filter").on("click", function (e) {
|
|
|
- console.log($("#category_button").val());
|
|
|
- });
|
|
|
+
|
|
|
|
|
|
$(".selectBox").on("click", function (e) {
|
|
|
if(get_value_list_by_key(db_table["project"], "category_id", search_data["category"], "project_id").length) {
|
|
|
@@ -109,7 +106,7 @@ $(function() {
|
|
|
}
|
|
|
|
|
|
if(type_id == "any") {
|
|
|
- search_data["type"] = db_table["type"];
|
|
|
+ search_data["type"] = get_value_list_by_key(db_table["type"], null, [], "type_id");
|
|
|
} else {
|
|
|
search_data["type"] = [type_id];
|
|
|
}
|
|
|
@@ -186,14 +183,20 @@ function show_multi_checkbox(class_name, show_list) {
|
|
|
|
|
|
function show_select_option(select_id, show_list) {
|
|
|
$("#" + select_id + " option").hide();
|
|
|
+ $("#notes-button").prop("disabled", false);
|
|
|
|
|
|
- $("#" + select_id + " option[value=any]").show();
|
|
|
- show_list.forEach(element => {
|
|
|
- $("#" + select_id + " option[value=" + element + "]").show();
|
|
|
- });
|
|
|
+ if(show_list.length == 1 & show_list[0] == undefined) {
|
|
|
+ $('#notes-button').prop("value", "none");
|
|
|
+ $("#notes-button").prop("disabled", true);
|
|
|
+ } else {
|
|
|
+ $("#" + select_id + " option[value=any]").show();
|
|
|
+ show_list.forEach(element => {
|
|
|
+ $("#" + select_id + " option[value=" + element + "]").show();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
-//set multi_checkbox text
|
|
|
function set_multi_checkbox_text(checkbox_class, name_replace) {
|
|
|
check_list = get_multi_checkbox_check_list(checkbox_class, name_replace);
|
|
|
|
|
|
@@ -208,7 +211,6 @@ function set_multi_checkbox_text(checkbox_class, name_replace) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//get check_list
|
|
|
function get_multi_checkbox_check_list(checkbox_class, name_replace) {
|
|
|
output = [];
|
|
|
var $select_option = $("."+checkbox_class+":checked");
|