function setModuleMatchmakerLightProfileInput(element, itemID, inputTyp, forceValue, isIFrame) { if ($(element).length > 0) { blockScreen(true); var vorgaengerID = 0; if (inputTyp == "TMP_MEMO") { var value = $(element).val(); } else { var value = $(element).is(":checked")?1:0; } if (inputTyp == "TMP_RADIO") { vorgaengerID = itemID; itemID = $(element).val(); value = forceValue; } $.post( "http://www.it-matchmaker.com.tr/core/modules/matchmaker_light/ajax/ajax.php?app_language=tr&PHPSESSID=abb3019286c3dea32cd11f59601b39b1", { full_path: "NVkzNENoeWMoUmQ1aGFGPUZgcnRvelhISD0rPktLMG0sYzJEOmlZN3ktKj5kOW9WPG5KS1phRH5HQz5aemBzbnMpbl93QjRyViYrZEBiPVpHaig3", ajax_type: "SET_PROFILE_INPUT", inputTyp: inputTyp, itemID: itemID, value: value, vorgaengerID: vorgaengerID }, function(data) { if ((data == 1) || (data == 0)) { getModuleMatchmakerLightResultCount(); if (inputTyp != "TMP_MEMO") { if (data == 1) { $(element).each(function(){ this.checked = true; }); } else { $(element).each(function(){ this.checked = false; }); } } unblockScreen(true); } else { unblockScreen(true); var position = getIFramePosition(isIFrame); infoDialog("HATA", data, null,600, null, position); } }); } } function getModuleMatchmakerLightResultCount() { blockScreen(true); $.post( "http://www.it-matchmaker.com.tr/core/modules/matchmaker_light/ajax/ajax.php?app_language=tr&PHPSESSID=abb3019286c3dea32cd11f59601b39b1", { full_path: "NVkzNENoeWMoUmQ1aGFGPUZgcnRvelhISD0rPktLMG0sYzJEOmlZN3ktKj5kOW9WPG5KS1phRH5HQz5aemBzbnMpbl93QjRyViYrZEBiPVpHaig3", ajax_type: "GET_RESULT_COUNT" }, function(data) { $(".trv_module_matchmaker_light_profile_count").text(data); unblockScreen(true); }); } function openSelectLanguageDialog(isIFrame) { if ($("#trv_module_dialog_select_language").length == 0) { blockScreen(); isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); $("body").append(""); $("#trv_module_dialog_select_language").load("http://www.it-matchmaker.com.tr/core/modules/matchmaker_light/components/dialog_select_language.php?full_path=NVkzNENoeWMoUmQ1aGFGPUZgcnRvelhISD0rPktLMG0sYzJEOmlZN3ktKj5kOW9WPG5KS1phRH5HQz5aemBzbnMpbl93QjRyViYrZEBiPVpHaig3&app_language=tr&PHPSESSID=abb3019286c3dea32cd11f59601b39b1").dialog({ close: function(event, ui) { $(this).dialog('destroy'); $("#trv_module_dialog_select_language").remove(); }, closeOnEscape: true, resizable: false, position: position, minHeight: 240, height: 'auto', width: 250, modal: true, bgiframe: true, title: "Ülke / dil değiştir" }); } } function trvToggleFavorit(companyID, productID, isIFrame) { $.post( "http://www.it-matchmaker.com.tr/core/ajax/ajax.php?app_language=tr&PHPSESSID=abb3019286c3dea32cd11f59601b39b1", { full_path: "NVkzNENoeWMoUmQ1aGFGPUZgcnRvelhISD0rPktLMG0sYzJEOmlZN3ktKj5kOW9WPG5KS1phRH5HQz5aemBzbnMpbl93QjRyViYrZEBiPVpHaig3", ajax_type: "TOGGLE_ITM_FAVORITE", productID: productID, companyID: companyID }, function(data) { if ((data == 1) || (data == 0)) { if (data == 1) { $("#trv_favorite_"+companyID+"_"+productID).attr("src","/homepage/themes/tr_it-matchmaker-2014/core/images/icons/star.png"); } else { $("#trv_favorite_"+companyID+"_"+productID).attr("src","/homepage/themes/tr_it-matchmaker-2014/core/images/icons/star_off.png"); } trvSetFavoriteCount(isIFrame); } else { var position = getIFramePosition(isIFrame); infoDialog("HATA", data, null,600, null, position); } }); } function trvSetFavoriteCount(isIFrame) { $.post( "http://www.it-matchmaker.com.tr/core/ajax/ajax.php?app_language=tr&PHPSESSID=abb3019286c3dea32cd11f59601b39b1", { full_path: "NVkzNENoeWMoUmQ1aGFGPUZgcnRvelhISD0rPktLMG0sYzJEOmlZN3ktKj5kOW9WPG5KS1phRH5HQz5aemBzbnMpbl93QjRyViYrZEBiPVpHaig3", ajax_type: "GET_ITM_FAVORITE_COUNT" }, function(data) { if (isNaN(data)) { var position = getIFramePosition(isIFrame); infoDialog("HATA", data, null,600, null, position); } else { if ($(".trv_module_product_list_button_order_report").length > 0) { if ((data == 0) && ($(".trv_module_product_list_button_order_report .trv_itm_favcount").length > 0)) { $(".trv_module_product_list_button_order_report").replaceWith("Hiçbir ürün seçilmedi!"); $(".trv_module_matchmaker_light_search_button").attr("href","#"); } else if ((data > 0) && ($(".trv_module_product_list_button_order_report .trv_itm_favcount").length == 0)) { $(".trv_module_product_list_button_order_report").replaceWith("Raporu talep edin [{$favcount}]"); $(".trv_module_matchmaker_light_search_button").attr("href",trvSavedReportOrderLink); } } $(".trv_itm_favcount").text(data); if(0) { changeNaviIconFavorite(data); } } }); } var trvSavedReportOrderLink = "#"; $(document).ready( function() { if ($(".trv_module_product_list_button_order_report").length > 0) { trvSavedReportOrderLink = $(".trv_module_matchmaker_light_search_button").attr("href"); } }); function changeNaviIconFavorite(anzFav) { if(anzFav > 0) { $(".trv_module_matchmaker_light_navi_icon").attr("src", "/homepage/themes/tr_it-matchmaker-2014/core/images/icons/star.png"); } else { $(".trv_module_matchmaker_light_navi_icon").attr("src","/homepage/themes/tr_it-matchmaker-2014/core/images/icons/star_off.png"); } }