@foreach (var tab in Model.Tabs)
{
var dop = tab.Title == "Дополнительно" ? "asd" : "asd1";
<li id="tab@(tabIndex++)" class="tabs-header-item @dop" data-tab-header="" data-ng-hide="!tabHeader.isRender" data-ng-class="{'tabs-header-active cs-br-1' : tabHeader.selected}">
<a href="" class="tabs-header-item-link" data-ng-click="tabs.change(tabHeader)" data-ng-class="{'link-dotted-invert' : !tabHeader.selected, 'cs-l-2 link-dotted-invert link-dotted-none' : tabHeader.selected}">
@tab.Title
</a>
</li>
}
; (function (ng) {
'use strict';
ng.module('popupwithcallback', []);
})(window.angular);
; (function (ng) {
'use strict';
var PopupWithCallbackCtrl = function ($sce, popupwithcallbackService) {
var ctrl = this, isRender = false;
ctrl.currentForm = "main";
ctrl.send = function () {
//console.log(ctrl);
popupwithcallbackService.send(ctrl.name, ctrl.phone, ctrl.comment).then(function (result) {
//console.log(ctrl.name, ctrl.phone, ctrl.comment);
if (result == true) {
ctrl.currentForm = "final";
popupwithcallbackService.setVisibleFooter(false);
$(document).trigger("module_popupwithcallback");
popupwithcallbackService.dialogClose();
}
});
}
ctrl.dialogOpen = function () {
//console.log(ctrl);
if (ctrl.currentForm == "final") {
ctrl.currentForm = "main";
ctrl.name = "";
ctrl.phone = "";
ctrl.comment = "";
popupwithcallbackService.setVisibleFooter(true);
}
if (isRender) {
//popupwithcallbackService.dialogOpen();
} else {
popupwithcallbackService.getParams().then(function (result) {
ctrl.modalText = $sce.trustAsHtml(result.ModalText);
ctrl.showCommentField = result.ShowCommentField;
//popupwithcallbackService.dialogRender(result.Title, ctrl);
});
}
isRender = true;
}
};
ng.module('popupwithcallback')
.controller('PopupWithCallbackCtrl', PopupWithCallbackCtrl);
PopupWithCallbackCtrl.$inject = ['$sce', 'popupwithcallbackService'];
})(window.angular);
; (function (ng) {
'use strict';
ng.module('popupwithcallback')
.directive('popupwithcallbackStart', ['$compile', function ($compile) {
return {
restrict: 'A',
link: function (scope, element, attrs, ctrl) {
var popupwithcallbacks = document.querySelectorAll('[data-popupwithcallback]');
$compile(popupwithcallbacks)(scope);
}
};
}]);
ng.module('popupwithcallback')
.directive('popupwithcallback', function () {
return {
restrict: 'A',
scope: true,
controller: 'PopupWithCallbackCtrl',
controllerAs: 'popupwithcallback',
bindToController: true,
link: function (scope, element, attrs, ctrl) {
element.on('click', function (event) {
event.preventDefault();
ctrl.dialogOpen();
scope.$apply();
});
}
};
});
})(window.angular);
; (function (ng) {
'use strict';
var popupwithcallbackService = function ($http, modalService) {
var service = this;
service.send = function (name, phone, comment) {
return $http.post('PopupWithCallback/addcallback', { name: name, phone: phone, comment: comment, rnd: Math.random() }).then(function (response) {
return response.data;
});
};
service.getParams = function () {
return $http.get('PopupWithCallback/getparams').then(function (response) {
return response.data;
});
};
service.dialogRender = function (title, parentScope) {
var options = {
'modalClass': 'callback-dialog',
'isOpen': true
};
modalService.renderModal(
'modalCallback',
title,
'<div data-ng-include="\'/modules/PopupWithCallback/scripts/templates/modal.html\'"></div>',
'<input type="submit" class="btn btn-middle btn-action" value="Отправить" data-ng-click="callback.send()" data-ng-disabled="modalCallbackForm.$invalid" />',
options,
{ callback: parentScope });
};
service.dialogOpen = function () {
modalService.open('popupWithCallback');
};
service.dialogClose = function () {
//modalService.close('popupWithCallback');
modalService.close('popupWithCallback');
};
service.setVisibleFooter = function (visible) {
modalService.setVisibleFooter('modalCallback', visible);
};
};
ng.module('popupwithcallback')
.service('popupwithcallbackService', popupwithcallbackService);
popupwithcallbackService.$inject = ['$http', 'modalService'];
})(window.angular);
$(function () {
var siteheadHeight;
var menublockHeight;
$(window).load(function () {
siteheadHeight = $(".site-head").height();
menublockHeight = $(".menu-block").height();
});
$(window).scroll(function () {
if ($(window).scrollTop() > siteheadHeight) {
$(".site-head").css('height', siteheadHeight + menublockHeight);
$(".menu-block").addClass("stick");
} else {
$(".site-head").css('height', siteheadHeight);
$(".menu-block").removeClass("stick");
}
});
$('.products-view-item').on("click", function (event) {
event.stopPropagation();
var target = $(event.target);
if (target.closest(".compare-control").length > 0 || target.closest(".products-view-buy").length > 0 || target.closest(".products-view-photos-image").length > 0) {
return;
}
if ($(this).data('hreff')) window.location = $(this).data('hreff');
});
});
.products-view-tile-home .col-xs:last-child{
display:none;
}
<a href="/catalog" onclick="yaCounter23000269.reachGoal('SOB'); return true;">
? <?php
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/**
* @global CMain $APPLICATION
*/
global $APPLICATION;
//delayed function must return a string
if(empty($arResult))
return "";
$strReturn = '';
//we can't use $APPLICATION->SetAdditionalCSS() here because we are inside the buffered function GetNavChain()
$css = $APPLICATION->GetCSSArray();
if(!is_array($css) || !in_array("/bitrix/css/main/font-awesome.css", $css))
{
$strReturn .= '<link href="'.CUtil::GetAdditionalFileURL("/bitrix/css/main/font-awesome.css").'" type="text/css" rel="stylesheet" />'."\n";
}
$strReturn .= '<div class="bx-breadcrumb">';
$itemSize = count($arResult);
for($index = 0; $index < $itemSize; $index++)
{
$title = htmlspecialcharsex($arResult[$index]["TITLE"]);
$nextRef = ($index < $itemSize-2 && $arResult[$index+1]["LINK"] <> ""? ' itemref="bx_breadcrumb_'.($index+1).'"' : '');
$child = ($index > 0? ' itemprop="child"' : '');
$arrow = ($index > 0? '<i class="fa fa-angle-right"></i>' : '');
if($arResult[$index]["LINK"] <> "" && $index != $itemSize-1)
{
}
else if(empty($arResult[2]))
{
$strReturn .= '
<ul class="crumbs">
<li><a href="/index.php">Главная</a></li style="padding: 0 10px 0 3px;"><li style="padding: 0 10px 0 3px;"><a href="/catalog/">Каталог</a></li style="padding: 0 10px 0 3px;"><li style="padding: 0 10px 0 3px;"><a href="/catalog/new/">Вилочные погрузчики</a></li>
<li style="padding: 0 10px 0 3px;"><a href="'.$arResult[1]["LINK"].'">'.$arResult[1]["TITLE"].'</a></li>
</ul>';
} else
{
$strReturn .= '
<ul class="crumbs">
<li><a href="/index.php">Главная</a></li style="padding: 0 10px 0 3px;"><li style="padding: 0 10px 0 3px;"><a href="/catalog/">Каталог</a></li style="padding: 0 10px 0 3px;"><li style="padding: 0 10px 0 3px;"><a href="/catalog/new/">Вилочные погрузчики</a>
<ul class="sub-menu">'?>
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.section.list",
"4k2_section_breadcrumb",
array(
"ADD_SECTIONS_CHAIN" => "Y",
"CACHE_GROUPS" => "Y",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"COUNT_ELEMENTS" => "N",
"IBLOCK_ID" => "17",
"IBLOCK_TYPE" => "4k2_catalog",
"SECTION_CODE" => "",
"SECTION_FIELDS" => array(
0 => "NAME",
1 => "",
),
"SECTION_ID" => $_REQUEST["SECTION_ID"],
"SECTION_URL" => "#SITE_DIR#/catalog/new/#SECTION_ID#/",
"SECTION_USER_FIELDS" => array(
0 => "",
1 => "",
),
"SHOW_PARENT_NAME" => "Y",
"TOP_DEPTH" => "1",
"VIEW_MODE" => "LINE",
"COMPONENT_TEMPLATE" => ".default"
),
false
);?>
<?'</ul>
</li>
<li style="padding: 0 10px 0 3px;"><a href="'.$arResult[1]["LINK"].'">'.$arResult[1]["TITLE"].'</a></li>
<li style="padding: 0 10px 0 3px;"><a href="'.$arResult[2]["LINK"].'">'.$arResult[2]["TITLE"].'</a></li>
</ul>';
}
}
$strReturn .= '<div style="clear:both"></div></div>';
return $strReturn;
Array
(
[0] => Array
(
[TITLE] => Каталог
[LINK] => /catalog/
)
)
<?
ob_start();
?>
<label><?=$arQuestion["CAPTION"]?>
<?if ($arQuestion["REQUIRED"] == "Y"):?><?=$arResult["REQUIRED_SIGN"];?><?endif;?>
</label>
<?
$label = ob_get_contents();
ob_end_clean();
?>
<?
echo $str = str_replace("font color='red'", "span", $label);
echo $str = str_replace("/font", "/span", $str);
?>
<label>Как к вам обращаться? <span><span class='form-required starrequired'>*</span></font></label>
<label>Как к вам обращаться? <span><span class='form-required starrequired'>*</span></span></label>
<label>Как к вам обращаться?<span><span class='form-required starrequired'>*</span></span></label>