Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Alto
/
fenixconsulting
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 8bb160d5
authored
2022-09-26 15:37:03 +0300
by
Скуратович Александр
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Фильтр ввода и удаление картинки
1 parent
0537ecd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
wp-content/themes/fenixmedica/assets/js/script.js
wp-content/themes/fenixmedica/inc/calc.php
wp-content/themes/fenixmedica/assets/js/script.js
View file @
8bb160d
...
@@ -204,6 +204,8 @@ $(document).ready(
...
@@ -204,6 +204,8 @@ $(document).ready(
rows
.
push
(
'<tr>'
+
cols
.
join
(
''
)
+
'</tr>'
);
rows
.
push
(
'<tr>'
+
cols
.
join
(
''
)
+
'</tr>'
);
}
}
el_table
.
html
(
'<tbody>'
+
rows
.
join
(
''
)
+
'</tbody>'
);
el_table
.
html
(
'<tbody>'
+
rows
.
join
(
''
)
+
'</tbody>'
);
$
(
el_wrap
).
find
(
'.img-calc'
).
remove
();
}
}
}
}
...
@@ -215,6 +217,22 @@ $(document).ready(
...
@@ -215,6 +217,22 @@ $(document).ready(
{
{
fenix_calc
(
$
(
this
).
closest
(
'.fenix_calc'
));
fenix_calc
(
$
(
this
).
closest
(
'.fenix_calc'
));
}
}
).
on
(
'change.fenix'
,
'.fenix_calc input[type="number"][min][max]'
,
function
()
{
var
inp_val
=
$
(
this
).
val
();
var
inp_val_int
=
inp_val
|
0
;
var
inp_min
=
$
(
this
).
attr
(
'min'
)
|
0
;
var
inp_max
=
$
(
this
).
attr
(
'max'
)
|
0
;
if
(
inp_val_int
<
inp_min
)
inp_val_int
=
inp_min
;
if
(
inp_val_int
>
inp_max
)
inp_val_int
=
inp_max
;
if
((
inp_val
).
toString
()
!=
(
inp_val_int
).
toString
())
$
(
this
).
val
(
inp_val_int
);
}
);
);
}
}
);
);
\ No newline at end of file
\ No newline at end of file
wp-content/themes/fenixmedica/inc/calc.php
View file @
8bb160d
...
@@ -42,7 +42,7 @@ function fenix_calc ($atts, $content)
...
@@ -42,7 +42,7 @@ function fenix_calc ($atts, $content)
'<table class="table table-striped table-hover table-bordered table_result"></table>'
.
'<table class="table table-striped table-hover table-bordered table_result"></table>'
.
(
(
has_post_thumbnail
(
$post
->
ID
)
?
has_post_thumbnail
(
$post
->
ID
)
?
'<img src="'
.
get_the_post_thumbnail_url
(
$post
->
ID
,
'full'
)
.
'" class="img-fluid mb-4 mb-md-0"/>'
:
'<img src="'
.
get_the_post_thumbnail_url
(
$post
->
ID
,
'full'
)
.
'" class="img-fluid mb-4 mb-md-0
img-calc
"/>'
:
''
''
)
.
)
.
'</div>'
.
'</div>'
.
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment