Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
solo
Commits
c9216004
Commit
c9216004
authored
Jun 28, 2012
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c
parent
a6d5486c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1579 additions
and
1579 deletions
+1579
-1579
war/src/main/webapp/CHANGE_LOGS.html
war/src/main/webapp/CHANGE_LOGS.html
+337
-337
war/src/main/webapp/js/admin/admin.js
war/src/main/webapp/js/admin/admin.js
+254
-254
war/src/main/webapp/js/admin/editorKindEditor.js
war/src/main/webapp/js/admin/editorKindEditor.js
+96
-96
war/src/main/webapp/js/admin/editorTinyMCE.js
war/src/main/webapp/js/admin/editorTinyMCE.js
+123
-123
war/src/main/webapp/js/admin/pageList.js
war/src/main/webapp/js/admin/pageList.js
+435
-435
war/src/main/webapp/js/admin/preference.js
war/src/main/webapp/js/admin/preference.js
+222
-222
war/src/main/webapp/js/admin/tablePaginate.js
war/src/main/webapp/js/admin/tablePaginate.js
+112
-112
No files found.
war/src/main/webapp/CHANGE_LOGS.html
View file @
c9216004
This diff is collapsed.
Click to expand it.
war/src/main/webapp/js/admin/admin.js
View file @
c9216004
This diff is collapsed.
Click to expand it.
war/src/main/webapp/js/admin/editorKindEditor.js
View file @
c9216004
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview KindEditor
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.1, May 2, 2012
*/
admin
.
editors
.
KindEditor
=
{
/*
* @description 初始化编辑器
* @param conf 编辑器初始化参数
* @param conf.kind 编辑器类型
* @param conf.id 编辑器渲染元素 id
* @param conf.fun 编辑器首次加载完成后回调函数
*/
init
:
function
(
conf
)
{
var
language
=
"
zh_CN
"
;
if
(
"
en_US
"
===
Label
.
localeString
)
{
language
=
"
en
"
}
if
(
conf
.
kind
&&
conf
.
kind
===
"
simple
"
)
{
try
{
this
[
conf
.
id
]
=
KindEditor
.
create
(
'
#
'
+
conf
.
id
,
{
langType
:
language
,
resizeType
:
0
,
items
:
[
"
bold
"
,
"
italic
"
,
"
underline
"
,
"
strikethrough
"
,
"
|
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
insertunorderedlist
"
,
"
insertorderedlist
"
,
]
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
KindEditor load fail
"
);
}
}
else
{
try
{
this
[
conf
.
id
]
=
KindEditor
.
create
(
'
#
'
+
conf
.
id
,
{
langType
:
language
,
items
:
[
"
formatblock
"
,
"
fontname
"
,
"
fontsize
"
,
"
|
"
,
"
bold
"
,
"
italic
"
,
"
underline
"
,
"
strikethrough
"
,
"
forecolor
"
,
"
|
"
,
"
link
"
,
"
unlink
"
,
"
image
"
,
"
media
"
,
"
|
"
,
"
pagebreak
"
,
"
emoticons
"
,
"
code
"
,
"
/
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
insertunorderedlist
"
,
"
insertorderedlist
"
,
"
indent
"
,
"
outdent
"
,
"
|
"
,
"
justifyleft
"
,
"
justifycenter
"
,
"
justifyright
"
,
"
justifyfull
"
,
"
|
"
,
"
plainpaste
"
,
"
wordpaste
"
,
"
|
"
,
"
clearhtml
"
,
"
source
"
,
"
preview
"
],
afterCreate
:
function
()
{
if
(
typeof
(
conf
.
fun
)
===
"
function
"
)
{
conf
.
fun
();
}
}
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
KindEditor load fail
"
);
}
}
},
/*
* @description 获取编辑器值
* @param {string} id 编辑器id
* @returns {string} 编辑器值
*/
getContent
:
function
(
id
)
{
var
content
=
""
;
try
{
content
=
this
[
id
].
html
();
}
catch
(
e
)
{
content
=
$
(
"
#
"
+
id
).
val
();
}
return
content
;
},
/*
* @description 设置编辑器值
* @param {string} id 编辑器 id
* @param {string} content 设置编辑器值
*/
setContent
:
function
(
id
,
content
)
{
try
{
this
[
id
].
html
(
content
);
}
catch
(
e
)
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview KindEditor
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.1, May 2, 2012
*/
admin
.
editors
.
KindEditor
=
{
/*
* @description 初始化编辑器
* @param conf 编辑器初始化参数
* @param conf.kind 编辑器类型
* @param conf.id 编辑器渲染元素 id
* @param conf.fun 编辑器首次加载完成后回调函数
*/
init
:
function
(
conf
)
{
var
language
=
"
zh_CN
"
;
if
(
"
en_US
"
===
Label
.
localeString
)
{
language
=
"
en
"
}
if
(
conf
.
kind
&&
conf
.
kind
===
"
simple
"
)
{
try
{
this
[
conf
.
id
]
=
KindEditor
.
create
(
'
#
'
+
conf
.
id
,
{
langType
:
language
,
resizeType
:
0
,
items
:
[
"
bold
"
,
"
italic
"
,
"
underline
"
,
"
strikethrough
"
,
"
|
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
insertunorderedlist
"
,
"
insertorderedlist
"
,
]
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
KindEditor load fail
"
);
}
}
else
{
try
{
this
[
conf
.
id
]
=
KindEditor
.
create
(
'
#
'
+
conf
.
id
,
{
langType
:
language
,
items
:
[
"
formatblock
"
,
"
fontname
"
,
"
fontsize
"
,
"
|
"
,
"
bold
"
,
"
italic
"
,
"
underline
"
,
"
strikethrough
"
,
"
forecolor
"
,
"
|
"
,
"
link
"
,
"
unlink
"
,
"
image
"
,
"
media
"
,
"
|
"
,
"
pagebreak
"
,
"
emoticons
"
,
"
code
"
,
"
/
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
insertunorderedlist
"
,
"
insertorderedlist
"
,
"
indent
"
,
"
outdent
"
,
"
|
"
,
"
justifyleft
"
,
"
justifycenter
"
,
"
justifyright
"
,
"
justifyfull
"
,
"
|
"
,
"
plainpaste
"
,
"
wordpaste
"
,
"
|
"
,
"
clearhtml
"
,
"
source
"
,
"
preview
"
],
afterCreate
:
function
()
{
if
(
typeof
(
conf
.
fun
)
===
"
function
"
)
{
conf
.
fun
();
}
}
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
KindEditor load fail
"
);
}
}
},
/*
* @description 获取编辑器值
* @param {string} id 编辑器id
* @returns {string} 编辑器值
*/
getContent
:
function
(
id
)
{
var
content
=
""
;
try
{
content
=
this
[
id
].
html
();
}
catch
(
e
)
{
content
=
$
(
"
#
"
+
id
).
val
();
}
return
content
;
},
/*
* @description 设置编辑器值
* @param {string} id 编辑器 id
* @param {string} content 设置编辑器值
*/
setContent
:
function
(
id
,
content
)
{
try
{
this
[
id
].
html
(
content
);
}
catch
(
e
)
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
};
\ No newline at end of file
war/src/main/webapp/js/admin/editorTinyMCE.js
View file @
c9216004
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview tinyMCE editor
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.4, May 9, 2012
*/
admin
.
editors
.
tinyMCE
=
{
/*
* @description 初始化编辑器
* @param conf 编辑器初始化参数
* @param conf.kind 编辑器类型
* @param conf.id 编辑器渲染元素 id
* @param conf.fun 编辑器首次加载完成后回调函数
*/
init
:
function
(
conf
)
{
var
language
=
Label
.
localeString
.
substring
(
0
,
2
);
if
(
language
===
"
zh
"
)
{
language
=
"
zh-cn
"
;
}
if
(
conf
.
kind
&&
conf
.
kind
===
"
simple
"
)
{
try
{
tinyMCE
.
init
({
// General options
language
:
language
,
mode
:
"
exact
"
,
elements
:
conf
.
id
,
theme
:
"
advanced
"
,
// Theme options
theme_advanced_buttons1
:
"
bold,italic,underline,strikethrough,|,undo,redo,|,bullist,numlist
"
,
theme_advanced_buttons2
:
""
,
theme_advanced_buttons3
:
""
,
theme_advanced_toolbar_location
:
"
top
"
,
theme_advanced_toolbar_align
:
"
left
"
,
valid_children
:
"
+body[style]
"
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
TinyMCE load fail
"
);
}
}
else
{
try
{
tinyMCE
.
init
({
// General options
language
:
language
,
mode
:
"
exact
"
,
elements
:
conf
.
id
,
theme
:
"
advanced
"
,
plugins
:
"
autosave,style,advhr,advimage,advlink,preview,inlinepopups,media,paste,syntaxhl,wordcount
"
,
// Theme options
theme_advanced_buttons1
:
"
formatselect,fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,forecolor,|,advhr,blockquote,syntaxhl,
"
,
theme_advanced_buttons2
:
"
undo,redo,|,bullist,numlist,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,|,pastetext,pasteword,|,link,unlink,image,iespell,media,|,cleanup,code,preview,
"
,
theme_advanced_buttons3
:
""
,
theme_advanced_toolbar_location
:
"
top
"
,
theme_advanced_toolbar_align
:
"
left
"
,
theme_advanced_resizing
:
true
,
theme_advanced_statusbar_location
:
"
bottom
"
,
extended_valid_elements
:
"
link[type|rel|href|charset],pre[name|class],iframe[src|width|height|name|align],+a[*]
"
,
valid_children
:
"
+body[style]
"
,
relative_urls
:
false
,
remove_script_host
:
false
,
oninit
:
function
()
{
if
(
typeof
(
conf
.
fun
)
===
"
function
"
)
{
conf
.
fun
();
}
}
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
TinyMCE load fail
"
);
}
}
},
/*
* @description 获取编辑器值
* @param {string} id 编辑器id
* @returns {string} 编辑器值
*/
getContent
:
function
(
id
)
{
var
content
=
""
;
try
{
content
=
tinyMCE
.
get
(
id
).
getContent
();
}
catch
(
e
)
{
content
=
$
(
"
#
"
+
id
).
val
();
}
return
content
;
},
/*
* @description 设置编辑器值
* @param {string} id 编辑器 id
* @param {string} content 设置编辑器值
*/
setContent
:
function
(
id
,
content
)
{
try
{
if
(
tinyMCE
.
get
(
id
))
{
tinyMCE
.
get
(
id
).
setContent
(
content
);
}
else
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
catch
(
e
)
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview tinyMCE editor
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.4, May 9, 2012
*/
admin
.
editors
.
tinyMCE
=
{
/*
* @description 初始化编辑器
* @param conf 编辑器初始化参数
* @param conf.kind 编辑器类型
* @param conf.id 编辑器渲染元素 id
* @param conf.fun 编辑器首次加载完成后回调函数
*/
init
:
function
(
conf
)
{
var
language
=
Label
.
localeString
.
substring
(
0
,
2
);
if
(
language
===
"
zh
"
)
{
language
=
"
zh-cn
"
;
}
if
(
conf
.
kind
&&
conf
.
kind
===
"
simple
"
)
{
try
{
tinyMCE
.
init
({
// General options
language
:
language
,
mode
:
"
exact
"
,
elements
:
conf
.
id
,
theme
:
"
advanced
"
,
// Theme options
theme_advanced_buttons1
:
"
bold,italic,underline,strikethrough,|,undo,redo,|,bullist,numlist
"
,
theme_advanced_buttons2
:
""
,
theme_advanced_buttons3
:
""
,
theme_advanced_toolbar_location
:
"
top
"
,
theme_advanced_toolbar_align
:
"
left
"
,
valid_children
:
"
+body[style]
"
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
TinyMCE load fail
"
);
}
}
else
{
try
{
tinyMCE
.
init
({
// General options
language
:
language
,
mode
:
"
exact
"
,
elements
:
conf
.
id
,
theme
:
"
advanced
"
,
plugins
:
"
autosave,style,advhr,advimage,advlink,preview,inlinepopups,media,paste,syntaxhl,wordcount
"
,
// Theme options
theme_advanced_buttons1
:
"
formatselect,fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,forecolor,|,advhr,blockquote,syntaxhl,
"
,
theme_advanced_buttons2
:
"
undo,redo,|,bullist,numlist,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,|,pastetext,pasteword,|,link,unlink,image,iespell,media,|,cleanup,code,preview,
"
,
theme_advanced_buttons3
:
""
,
theme_advanced_toolbar_location
:
"
top
"
,
theme_advanced_toolbar_align
:
"
left
"
,
theme_advanced_resizing
:
true
,
theme_advanced_statusbar_location
:
"
bottom
"
,
extended_valid_elements
:
"
link[type|rel|href|charset],pre[name|class],iframe[src|width|height|name|align],+a[*]
"
,
valid_children
:
"
+body[style]
"
,
relative_urls
:
false
,
remove_script_host
:
false
,
oninit
:
function
()
{
if
(
typeof
(
conf
.
fun
)
===
"
function
"
)
{
conf
.
fun
();
}
}
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
TinyMCE load fail
"
);
}
}
},
/*
* @description 获取编辑器值
* @param {string} id 编辑器id
* @returns {string} 编辑器值
*/
getContent
:
function
(
id
)
{
var
content
=
""
;
try
{
content
=
tinyMCE
.
get
(
id
).
getContent
();
}
catch
(
e
)
{
content
=
$
(
"
#
"
+
id
).
val
();
}
return
content
;
},
/*
* @description 设置编辑器值
* @param {string} id 编辑器 id
* @param {string} content 设置编辑器值
*/
setContent
:
function
(
id
,
content
)
{
try
{
if
(
tinyMCE
.
get
(
id
))
{
tinyMCE
.
get
(
id
).
setContent
(
content
);
}
else
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
catch
(
e
)
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
};
\ No newline at end of file
war/src/main/webapp/js/admin/pageList.js
View file @
c9216004
This diff is collapsed.
Click to expand it.
war/src/main/webapp/js/admin/preference.js
View file @
c9216004
This diff is collapsed.
Click to expand it.
war/src/main/webapp/js/admin/tablePaginate.js
View file @
c9216004
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* table and paginate util
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.7, Nov 8, 2011
*/
var
TablePaginate
=
function
(
id
)
{
this
.
id
=
id
;
this
.
currentPage
=
1
;
};
$
.
extend
(
TablePaginate
.
prototype
,
{
/*
* 构建 table 框架
* @colModel table 列宽,标题等数据
*/
buildTable
:
function
(
colModel
,
noExpend
)
{
var
tableData
=
{
colModel
:
colModel
,
noDataTip
:
Label
.
noDataLabel
}
if
(
!
noExpend
)
{
tableData
.
expendRow
=
{
index
:
"
expendRow
"
}
}
$
(
"
#
"
+
this
.
id
+
"
Table
"
).
table
(
tableData
);
},
/*
* 初始化分页
*/
initPagination
:
function
()
{
var
id
=
this
.
id
;
$
(
"
#
"
+
id
+
"
Pagination
"
).
paginate
({
"
bind
"
:
function
(
currentPage
)
{
admin
.
setHashByPage
(
currentPage
);
return
true
;
},
"
currentPage
"
:
1
,
"
errorMessage
"
:
Label
.
inputErrorLabel
,
"
nextPageText
"
:
Label
.
nextPagePabel
,
"
previousPageText
"
:
Label
.
previousPageLabel
,
"
goText
"
:
Label
.
gotoLabel
,
"
type
"
:
"
custom
"
,
"
custom
"
:
[
1
],
"
pageCount
"
:
1
});
},
/*
* 初始化评论对话框
*/
initCommentsDialog
:
function
()
{
var
that
=
this
;
$
(
"
#
"
+
this
.
id
+
"
Comments
"
).
dialog
({
width
:
700
,
height
:
500
,
"
modal
"
:
true
,
"
hideFooter
"
:
true
,
"
close
"
:
function
()
{
admin
[
that
.
id
+
"
List
"
].
getList
(
that
.
currentPage
);
return
true
;
}
});
},
/*
* 更新 table & paginateion
*/
updateTablePagination
:
function
(
data
,
currentPage
,
pageInfo
)
{
currentPage
=
parseInt
(
currentPage
);
if
(
currentPage
>
pageInfo
.
paginationPageCount
&&
currentPage
>
1
)
{
$
(
"
#tipMsg
"
).
text
(
Label
.
pageLabel
+
"
:
"
+
currentPage
+
"
"
+
Label
.
noDataLable
);
$
(
"
#loadMsg
"
).
text
(
""
);
return
;
}
$
(
"
#
"
+
this
.
id
+
"
Table
"
).
table
(
"
update
"
,
{
data
:
[{
groupName
:
"
all
"
,
groupData
:
data
}]
});
if
(
pageInfo
.
paginationPageCount
===
0
)
{
pageInfo
.
paginationPageCount
=
1
;
}
$
(
"
#
"
+
this
.
id
+
"
Pagination
"
).
paginate
(
"
update
"
,
{
pageCount
:
pageInfo
.
paginationPageCount
,
currentPage
:
currentPage
,
custom
:
pageInfo
.
paginationPageNums
});
this
.
currentPage
=
currentPage
;
}
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* table and paginate util
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.7, Nov 8, 2011
*/
var
TablePaginate
=
function
(
id
)
{
this
.
id
=
id
;
this
.
currentPage
=
1
;
};
$
.
extend
(
TablePaginate
.
prototype
,
{
/*
* 构建 table 框架
* @colModel table 列宽,标题等数据
*/
buildTable
:
function
(
colModel
,
noExpend
)
{
var
tableData
=
{
colModel
:
colModel
,
noDataTip
:
Label
.
noDataLabel
}
if
(
!
noExpend
)
{
tableData
.
expendRow
=
{
index
:
"
expendRow
"
}
}
$
(
"
#
"
+
this
.
id
+
"
Table
"
).
table
(
tableData
);
},
/*
* 初始化分页
*/
initPagination
:
function
()
{
var
id
=
this
.
id
;
$
(
"
#
"
+
id
+
"
Pagination
"
).
paginate
({
"
bind
"
:
function
(
currentPage
)
{
admin
.
setHashByPage
(
currentPage
);
return
true
;
},
"
currentPage
"
:
1
,
"
errorMessage
"
:
Label
.
inputErrorLabel
,
"
nextPageText
"
:
Label
.
nextPagePabel
,
"
previousPageText
"
:
Label
.
previousPageLabel
,
"
goText
"
:
Label
.
gotoLabel
,
"
type
"
:
"
custom
"
,
"
custom
"
:
[
1
],
"
pageCount
"
:
1
});
},
/*
* 初始化评论对话框
*/
initCommentsDialog
:
function
()
{
var
that
=
this
;
$
(
"
#
"
+
this
.
id
+
"
Comments
"
).
dialog
({
width
:
700
,
height
:
500
,
"
modal
"
:
true
,
"
hideFooter
"
:
true
,
"
close
"
:
function
()
{
admin
[
that
.
id
+
"
List
"
].
getList
(
that
.
currentPage
);
return
true
;
}
});
},
/*
* 更新 table & paginateion
*/
updateTablePagination
:
function
(
data
,
currentPage
,
pageInfo
)
{
currentPage
=
parseInt
(
currentPage
);
if
(
currentPage
>
pageInfo
.
paginationPageCount
&&
currentPage
>
1
)
{
$
(
"
#tipMsg
"
).
text
(
Label
.
pageLabel
+
"
:
"
+
currentPage
+
"
"
+
Label
.
noDataLable
);
$
(
"
#loadMsg
"
).
text
(
""
);
return
;
}
$
(
"
#
"
+
this
.
id
+
"
Table
"
).
table
(
"
update
"
,
{
data
:
[{
groupName
:
"
all
"
,
groupData
:
data
}]
});
if
(
pageInfo
.
paginationPageCount
===
0
)
{
pageInfo
.
paginationPageCount
=
1
;
}
$
(
"
#
"
+
this
.
id
+
"
Pagination
"
).
paginate
(
"
update
"
,
{
pageCount
:
pageInfo
.
paginationPageCount
,
currentPage
:
currentPage
,
custom
:
pageInfo
.
paginationPageNums
});
this
.
currentPage
=
currentPage
;
}
});
\ No newline at end of file
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