1. JavaScript / Говнокод #17806

    +160

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    function displayFilterElements(typeList){
    	_filter.form.elements["name1"].closest("tr").hidden = (typeList === "Type1") ? false : true;
    	_filter.form.elements["name2"].closest("tr").hidden = (typeList === "Type1") ? false : true;
    	_filter.form.elements["nam3"].closest("tr").hidden = (typeList === "Type1") ? false : true;
    	_filter.form.elements["name4"].closest("tr").hidden = (typeList === "Type1") ? false : true;
    	_filter.form.elements["name5"].closest("tr").hidden = (typeList === "Type1") ? false : true;
    	_filter.form.elements["name6"].closest("tr").hidden = (typeList === "Type1") ? false : true;
    	_filter.form.elements["name7"].closest("tr").hidden = (typeList === "Type1") ? false : true;
    	_filter.form.elements["name8"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name9"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name10"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name11"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name12"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name13"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name14"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name15"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name16"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name17"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name18"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name19"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name20"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name21"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name22"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name23"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name24"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name25"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name26"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name27"].closest("tr").hidden = (typeList === "Type2") ? false : true;
    	_filter.form.elements["name28"].closest("tr").hidden = (typeList === "Type3") ? true : false;
    	_filter.form.elements["name29"].closest("tr").hidden = (typeList === "Type3") ? false : true;
    };
    	
    function stateFilterElements(){
    	let select = false;
    	["name1", "name2", "name3", "name4", "name5", "name6", "name7", "name8", "name9", "name10", "name11", "name12", "name13"].forEach(function(fieldName){
    		if ($.query.hashJSON.has(fieldName))
    			select = true;
    	});
    	return select;
    }

    Получил в доработку модуль сотрудника. Идентификаторы изменены для публикации, не в них суть.

    Запостил: torbasow, 17 Марта 2015

    Комментарии (2) RSS

    Добавить комментарий