This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stp = "<?=SITE_TEMPLATE_PATH?>", | |
ids = [], | |
globalStop = false; | |
function collectId(){ | |
while(ids.length) { ids.pop(); } | |
$("ul.contacts-list").children("li").each(function(){ | |
ids.push($(this).attr("data-id")); | |
}); | |
return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
if (CModule::IncludeModule("iblock") && CModule::IncludeModule("catalog")){ | |
$arParams["IBLOCK_ID"] = IntVal(2); | |
$arResult = Array(); | |
$prices = CIBlockPriceTools::GetCatalogPrices($arParams["IBLOCK_ID"], Array(0=>"BASE")); | |
$arrk = array_keys($prices); | |
$res = CIBlockElement::GetList(Array("SORT"=>"ASC"), Array("IBLOCK_TYPE"=>"catalog", "IBLOCK_ID"=>$arParams["IBLOCK_ID"], "ACTIVE"=>"Y", "GLOBAL_ACTIVE" => "Y"), false, false, Array("ID", "NAME", "IBLOCK_ID", "IBLOCK_SECTION_ID", "XML_ID", "CATALOG_GROUP_".$prices[$arrk[0]]["ID"])); | |
while ($ob = $res->GetNextElement()) { | |
$arFields = $ob->GetFields(); | |
$arResult["ITEMS"][] = Array($arFields["XML_ID"], $arFields["CATALOG_PRICE_".$prices[$arrk[0]]["ID"]]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.decide = function(options){ | |
this.each(function(){ | |
var settings = $.extend({str: "default"}, options); | |
var decision = $(this); | |
var getdata = $.ajax(decision.attr('href'), { | |
type: 'POST', dataType: 'json', data: decision.data('params') | |
}); | |
decision.on('click', function(e){ | |
e.preventDefault(); | |
getdata.done(function(result){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var items = <?=CUtil::PhpToJSObject($arResult["ITEMS"])?>; | |
function Parser(formname) { | |
this.formname = formname; | |
this.init = function() { | |
var instarr = $("#"+this.formname).serializeArray(); | |
var base = {}; | |
for (var i in instarr) { | |
base[instarr[i].name] = instarr[i].value; | |
} | |
this.base = base; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function NewProto() {}; | |
NewProto.prototype = { | |
pull: function(data) { | |
return $.ajax("ajax.php", { | |
data: data, | |
type: "POST", | |
context: this.el, | |
}); | |
}, | |
fill: function(params) { |
NewerOlder