Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
e574814b
Commit
e574814b
authored
Apr 29, 2016
by
Евгений Мичкарев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправлена автозагрузка постов
parent
f7660e43
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
common/modules/blog/views/post/index.php
common/modules/blog/views/post/index.php
+1
-0
common/modules/blog/views/post/tag.php
common/modules/blog/views/post/tag.php
+1
-0
frontend/web/js/custom.js
frontend/web/js/custom.js
+7
-4
No files found.
common/modules/blog/views/post/index.php
View file @
e574814b
...
...
@@ -8,6 +8,7 @@ use common\modules\blog\models\Post;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\Post */
$this
->
registerJs
(
"initScrollPager()"
,
yii\web\View
::
POS_END
);
?>
<div
class=
"blog_container"
>
...
...
common/modules/blog/views/post/tag.php
View file @
e574814b
...
...
@@ -8,6 +8,7 @@ use common\modules\blog\models\Post;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\Post */
$this
->
registerJs
(
"initScrollPager()"
,
yii\web\View
::
POS_END
);
?>
<div
class=
"blog_container"
>
...
...
frontend/web/js/custom.js
View file @
e574814b
...
...
@@ -100,6 +100,12 @@ $(document).ready(function() {
return
false
;
});
});
var
loadProcess
=
false
;
var
allPostsLoaded
=
false
;
function
initScrollPager
()
{
var
maxPosition
=
$
(
window
).
scrollTop
();
$
(
window
).
scroll
(
function
()
{
var
position
=
$
(
window
).
scrollTop
()
+
$
(
window
).
height
();
...
...
@@ -108,10 +114,7 @@ $(document).ready(function() {
loadPosts
();
}
});
});
var
loadProcess
=
false
;
var
allPostsLoaded
=
false
;
}
function
loadPosts
()
{
var
button
=
$
(
'
a#load-post
'
),
loading
=
$
(
'
.loading-post
'
),
offset
=
button
.
data
(
'
offset
'
),
tag
=
button
.
data
(
'
tag
'
);
...
...
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