Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
街头小贩
Jforum2
提交
8f4a186b
J
Jforum2
项目概览
街头小贩
/
Jforum2
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
Jforum2
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8f4a186b
编写于
10月 28, 2020
作者:
街头小贩
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修正动态分页错误
上级
826ba1f1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
19 deletion
+23
-19
thrones/src/main/webapp/static/lib/forum/jForum.js
thrones/src/main/webapp/static/lib/forum/jForum.js
+16
-18
thrones/src/main/webapp/static/lib/forum/jForum.pagination.js
...nes/src/main/webapp/static/lib/forum/jForum.pagination.js
+7
-1
未找到文件。
thrones/src/main/webapp/static/lib/forum/jForum.js
浏览文件 @
8f4a186b
...
@@ -44,26 +44,24 @@ define('jForum', [
...
@@ -44,26 +44,24 @@ define('jForum', [
var
extEle
=
$
(
'
#page_another_navigation
'
);
var
extEle
=
$
(
'
#page_another_navigation
'
);
extEle
.
find
(
pnSelector
).
remove
();
extEle
.
find
(
pnSelector
).
remove
();
extEle
.
append
(
pageHtmlStruct
);
extEle
.
append
(
pageHtmlStruct
);
},
jsonCallback
:
function
(
jsonArray
)
{
if
(
$
.
isEmptyObject
(
jsonArray
))
{
return
;
}
var
fn
=
template
[
rawdata
.
callFun
];
if
(
typeof
fn
===
"
function
"
)
{
fn
.
call
(
this
,
jsonArray
);
}
},
deferCallback
:
function
(){
var
deferFun
=
xhrDefer
[
rawdata
.
defFun
];
if
(
typeof
deferFun
===
"
function
"
)
{
deferFun
.
call
(
this
,
xhr
,
template
);
}
}
}
};
};
paginationFunction
(
_pn
,
option
).
done
(
function
(
jsonArray
)
{
paginationFunction
(
_pn
,
option
).
fail
(
function
()
{
if
(
jQuery
.
isEmptyObject
(
jsonArray
))
{
return
;
}
var
jsonCallFun
=
template
[
rawdata
.
callFun
];
if
(
typeof
jsonCallFun
===
"
function
"
)
{
jsonCallFun
.
call
(
this
,
jsonArray
);
}
else
{
console
.
log
(
'
[page_navigation]json callback function:
'
+
jsonCallFun
+
'
is not function or jForumXhrDefer not module
'
);
}
}).
done
(
function
()
{
var
deferFun
=
xhrDefer
[
rawdata
.
defFun
];
if
(
typeof
deferFun
===
"
function
"
)
{
deferFun
.
call
(
this
,
xhr
,
template
);
}
else
{
console
.
log
(
'
[page_navigation]defer callback function:
'
+
deferFun
+
'
is not function or jForumXhrDefer not module
'
);
}
}).
fail
(
function
()
{
console
.
log
(
'
[page_navigation] execute fail
'
);
console
.
log
(
'
[page_navigation] execute fail
'
);
});
});
}).
trigger
(
'
initDataEvent
'
);
}).
trigger
(
'
initDataEvent
'
);
...
...
thrones/src/main/webapp/static/lib/forum/jForum.pagination.js
浏览文件 @
8f4a186b
...
@@ -63,6 +63,9 @@ define('jForumPagination', [
...
@@ -63,6 +63,9 @@ define('jForumPagination', [
// a=总页数
// a=总页数
var
b
=
_curIns
.
_calc
(
response
.
page
,
a
);
var
b
=
_curIns
.
_calc
(
response
.
page
,
a
);
_curIns
.
render
(
b
.
start
,
b
.
end
,
response
.
page
,
a
,
jqEle
);
_curIns
.
render
(
b
.
start
,
b
.
end
,
response
.
page
,
a
,
jqEle
);
if
(
$
.
isFunction
(
_curIns
.
config
.
jsonCallback
))
{
_curIns
.
config
.
jsonCallback
(
response
.
result
);
}
//滚动到顶部
//滚动到顶部
$
(
'
html, body
'
).
animate
({
scrollTop
:
0
},
500
);
$
(
'
html, body
'
).
animate
({
scrollTop
:
0
},
500
);
_curIns
.
defer
.
resolve
(
response
.
result
);
_curIns
.
defer
.
resolve
(
response
.
result
);
...
@@ -84,6 +87,9 @@ define('jForumPagination', [
...
@@ -84,6 +87,9 @@ define('jForumPagination', [
}
}
//记入历史
//记入历史
recordHistory
(
page
,
postData
.
pageSize
);
recordHistory
(
page
,
postData
.
pageSize
);
if
(
$
.
isFunction
(
_curIns
.
config
.
deferCallback
))
{
_curIns
.
config
.
deferCallback
();
}
console
.
log
(
'
[pagination] ajax is complete
'
);
console
.
log
(
'
[pagination] ajax is complete
'
);
};
};
$
.
ajax
(
formatAjaxParams
);
$
.
ajax
(
formatAjaxParams
);
...
@@ -242,4 +248,4 @@ define('jForumPagination', [
...
@@ -242,4 +248,4 @@ define('jForumPagination', [
return
Page
;
return
Page
;
})();
})();
return
jForumPagination
;
return
jForumPagination
;
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录