Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
张桐
/
xdykt-build
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
张桐
2017-03-04 12:41:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cad90985295ddc496232f6b5f21ec41fff0a3de6
cad90985
1 parent
37565d12
调整文档删除逻辑
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
30 行增加
和
13 行删除
src/main.js
src/main.js
查看文件 @
cad9098
...
...
@@ -24,7 +24,6 @@ var canvas ;
var
context
;
//蒙版
var
canvas_bak
;
var
context_bak
;
// 消息模板-老师
var
tpl_message_teacher
=
`
...
...
@@ -280,6 +279,8 @@ function showFile(_data){
}
}
}
...
...
@@ -288,6 +289,7 @@ function showFile(_data){
//切换文档
function
switchDoc
(
msg
)
{
$
(
".spinner"
).
css
(
"display"
,
"block"
);
$
(
".doc-headline-a"
).
trigger
(
"click"
);
var
paramInfo
=
{
"itemIdx"
:
msg
,
"visible"
:
true
...
...
@@ -416,6 +418,7 @@ function showInter(_data,isPage){
$
(
".docImage"
).
css
(
"display"
,
"none"
);
$
(
"#showImg"
).
css
(
"display"
,
"block"
);
$
(
".canvas_container"
).
scrollTop
(
0
);
$
(
".canvas_container"
).
css
(
"overflow"
,
"hidden"
);
...
...
@@ -479,6 +482,14 @@ function showTurnPage() {
}
function
hideTurnPage
(){
$
(
".next-page "
).
css
(
"display"
,
"none"
);
$
(
".total-page"
).
css
(
"display"
,
"none"
);
$
(
".bias"
).
css
(
"display"
,
"none"
);
$
(
".cur-page"
).
css
(
"display"
,
"none"
);
$
(
".prev"
).
css
(
"display"
,
"none"
);
}
...
...
@@ -487,12 +498,7 @@ function docDelete(callbackData){
console
.
log
(
"监听文档删除"
);
console
.
log
(
callbackData
);
updateDocList
(
callbackData
,
1
);
$
(
"#docImage"
).
attr
(
"src"
,
""
);
$
(
"#showImage"
).
attr
(
"src"
,
""
);
if
(
classAllInfo
.
userRole
==
"normal"
){
$
(
"#docImage"
).
attr
(
"src"
,
""
);
$
(
"#showImage"
).
attr
(
"src"
,
""
);
}
//操作页面
$
(
"li"
).
remove
(
".xin"
);
...
...
@@ -532,15 +538,26 @@ function updateDocList(_data,isAdd) {
for
(
var
i
=
0
;
i
<
fileFromArr
.
length
;
i
++
){
console
.
log
(
fileFromArr
);
if
(
fileFromArr
[
i
].
itemIdx
==
_data
){
$
(
"#docImage"
).
attr
(
"src"
,
""
);
$
(
"#showImg"
).
attr
(
"src"
,
""
);
$
(
".canvas_container"
).
css
(
"overflow-y"
,
"hidden"
);
hideTurnPage
();
if
(
classAllInfo
.
userRole
==
"normal"
){
$
(
"#docImage"
).
attr
(
"src"
,
""
);
$
(
"#showImg"
).
attr
(
"src"
,
""
);
$
(
".canvas_container"
).
css
(
"overflow-y"
,
"hidden"
);
}
fileFromArr
.
splice
(
i
,
1
);
}
}
if
(
fileFromArr
.
length
==
0
){
console
.
log
(
fileFromArr
);
$
(
"#docCanvas"
).
css
(
"display"
,
"none"
);
$
(
"#showImg"
).
css
(
"display"
,
"none"
);
showTurnPage
();
}
// if(fileFromArr.length==0){
// console.log(fileFromArr);
// $("#docImage").css("display","none");
// $("#showImg").css("display","none");
// showTurnPage();
// }
}
}
...
...
请
注册
或
登录
后发表评论