Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
www
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finnv
www
Commits
c2f2ba26
Commit
c2f2ba26
authored
Aug 22, 2023
by
Михаил Ливач
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix (js): ошибки в логике
parent
0fab9e94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
custom.js
bitrix/templates/aspro-scorp/js/custom.js
+6
-2
No files found.
bitrix/templates/aspro-scorp/js/custom.js
View file @
c2f2ba26
/* Add here all your JS customizations */
/* Add here all your JS customizations */
BX
.
addCustomEvent
(
"onSubmitForm"
,
BX
.
delegate
(
function
(
data
)
{
BX
.
addCustomEvent
(
"onSubmitForm"
,
BX
.
delegate
(
function
(
data
)
{
if
(
!
data
.
type
||
data
.
type
!==
'form_submit'
){
if
(
!
window
.
ym
||
!
data
.
type
||
data
.
type
!==
'form_submit'
){
return
;
return
;
}
}
if
(
data
.
form_name
&&
data
.
form_name
===
'aspro_scorp_callback'
)
{
if
(
data
.
form_name
&&
data
.
form_name
===
'aspro_scorp_callback'
)
{
...
@@ -16,11 +16,15 @@ BX.addCustomEvent("onSubmitForm", BX.delegate(function (data) {
...
@@ -16,11 +16,15 @@ BX.addCustomEvent("onSubmitForm", BX.delegate(function (data) {
document
.
addEventListener
(
'DOMContentLoaded'
,
readMore
);
document
.
addEventListener
(
'DOMContentLoaded'
,
readMore
);
function
readMore
(){
function
readMore
(){
const
block
=
document
.
querySelector
(
'[data-text=root]'
);
const
block
=
document
.
querySelector
(
'[data-text=root]'
);
if
(
block
===
null
)
{
return
;
}
const
content
=
block
.
querySelector
(
'[data-text=content]'
);
const
content
=
block
.
querySelector
(
'[data-text=content]'
);
const
button
=
block
.
querySelector
(
'[data-text=button]'
);
const
button
=
block
.
querySelector
(
'[data-text=button]'
);
const
maxHeightContent
=
160
;
const
maxHeightContent
=
160
;
if
(
!
block
||
!
content
||
!
button
){
if
(
!
content
||
!
button
){
return
;
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment