张桐

修改文档模块,增加文档已存在提示

... ... @@ -267,103 +267,7 @@ height: 1080px;
width: 40px;
height: 20px;
}
/*直播中*/
.cur-status {
float: left;
width: 100px;
position: relative;
}
.cur-status a{
float: right;
color: #333333;
font-size: 14px;
text-align: left;
}
.live {
position: absolute;
width: 26%;
height: 34%;
margin-left: 25%;
bottom: 39%;
display: none;
}
.live i {
width: 4%;
height: 10%;
position: absolute;
bottom: 0;
background-color: red;
}
.live i:nth-of-type(1) {
left: 0;
}
.live i:nth-of-type(2) {
left: 6px;
}
.live i:nth-of-type(3) {
left: 12px;
}
.live i:nth-of-type(4) {
left: 18px;
}
.live.active i:nth-of-type(1) {
-webkit-animation: wave 0.9s linear infinite;
animation: wave 0.9s linear infinite;
}
.live.active i:nth-of-type(2) {
-webkit-animation: wave 0.7s linear infinite;
animation: wave 0.7s linear infinite;
}
.live.active i:nth-of-type(3) {
-webkit-animation: wave 0.8s linear infinite;
animation: wave 0.8s linear infinite;
}
.live.active i:nth-of-type(4) {
-webkit-animation: wave 0.6s linear infinite;
animation: wave 0.6s linear infinite;
}
@-webkit-keyframes wave {
0% {
height: 6px
}
50% {
height: 20px
}
100% {
height: 12px
}
}
@keyframes wave {
0% {
height: 8px
}
50% {
height: 20px
}
100% {
height: 12px
}
}
.no-start{
position: absolute;
left: 30px;
}
/*修改amazeui.min.css*/
.am-btn-primary.am-active, .am-btn-primary:active, .am-dropdown.am-active .am-btn-primary.am-dropdown-toggle{
... ... @@ -1834,7 +1738,7 @@ textarea{
cursor: pointer;
list-style: none;
border-radius: 0;
background: url("../images/color-n.png") no-repeat;
background: url("../images/color6-n.png") no-repeat;
-webkit-transition: background-color 0.2s ease-in-out;
}
... ... @@ -1902,7 +1806,7 @@ textarea{
cursor: pointer;
list-style: none;
margin: 8px 8px 0 10px;
background: url("../images/color1-n.png") no-repeat;
background: url("../images/color6-n.png") no-repeat;
}
.tool-color .Color2{
... ... @@ -3194,7 +3098,7 @@ canvas {
cursor: pointer;
list-style: none;
border-radius: 0;
background: url("../images/color-n.png") no-repeat;
background: url("../images/color6-n.png") no-repeat;
-webkit-transition: background-color 0.2s ease-in-out;
}
... ... @@ -3262,7 +3166,7 @@ canvas {
cursor: pointer;
list-style: none;
margin: 8px 8px 0 10px;
background: url("../images/color1-n.png") no-repeat;
background: url("../images/color6-n.png") no-repeat;
}
.tool-color .Color2{
... ... @@ -4164,7 +4068,7 @@ canvas {
cursor: pointer;
list-style: none;
border-radius: 0;
background: url("../images/color-n.png") no-repeat;
background: url("../images/color6-n.png") no-repeat;
-webkit-transition: background-color 0.2s ease-in-out;
}
... ... @@ -4214,7 +4118,7 @@ canvas {
display: none;
position: absolute;
width: 330px;
width: 190px;
height: 44px;
line-height: 44px;
background: #cccccc;
... ... @@ -4231,7 +4135,7 @@ canvas {
cursor: pointer;
list-style: none;
margin: 8px 8px 0 10px;
background: url("../images/color1-n.png") no-repeat;
background: url("../images/color6-n.png") no-repeat;
}
.tool-color .Color2{
... ... @@ -4261,36 +4165,8 @@ canvas {
margin: 8px 8px 0 10px;
background: url("../images/color4-n.png") no-repeat;
}
.tool-color .Color5{
float: left;
height: 28px;
width: 28px;
cursor: pointer;
list-style: none;
margin: 8px 8px 0 10px;
background: url("../images/color5-n.png") no-repeat;
}
.tool-color .Color6{
float: left;
height: 28px;
width: 28px;
cursor: pointer;
list-style: none;
margin: 8px 8px 0 10px;
background: url("../images/color6-n.png") no-repeat;
}
.tool-color .Color7{
float: left;
height: 28px;
width: 28px;
cursor: pointer;
list-style: none;
margin: 8px 8px 0 10px;
background: url("../images/color1-n.png") no-repeat;
}
.tool-color .draw_controller {
width: 330px;
width: 190px;
height: 44px;
background: #f2f2f2;
border: 2px solid #e0e0e0;
... ...
... ... @@ -42,11 +42,12 @@
</button>
<div class="am-modal am-modal-alert am-modal-active popheight" tabindex="-1" id="my-alert">
<div class="am-modal-dialog ">
<div class="am-modal-bd">
error1:失败了!请重新点击!
<div class="am-modal-bd popTxt">
</div>
<div class="am-modal-footer">
<span class="am-modal-btn popBtn">确定</span>
<span class="am-modal-btn" data-am-modal-cancel>取消</span>
<span class="am-modal-btn popBtn" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0, width: 398, height: 288}">确定</span>
</div>
</div>
</div>
... ... @@ -71,15 +72,15 @@
<!--头部-->
<div class="header clear">
<li class="cur-status">
<span id="no-start" class="no-start iconfont">&#xe62b;</span>
<div id='live' class="live active">
<i></i>
<i></i>
<i></i>
<i></i>
</div>
<a id="a-status" href="javascript: void(0)">未开始</a></li>
<!--<li class="cur-status">-->
<!--<span id="no-start" class="no-start iconfont">&#xe62b;</span>-->
<!--<div id='live' class="live active">-->
<!--<i></i>-->
<!--<i></i>-->
<!--<i></i>-->
<!--<i></i>-->
<!--</div>-->
<!--<a id="a-status" href="javascript: void(0)">未开始</a></li>-->
<li class="classroom"><a id="classCurName" href="javascript: void(0)"></a></li>
<li class="classCurId"><a id="classCurId" href="javascript: void(0)"></a></li>
... ... @@ -228,9 +229,7 @@
<div class="content clear">
<!--左侧-->
<div id="left" class="left">
<!--<div class="am-tabs" data-am-tabs>-->
<!--<div id="tab-box" class="am-tabs-bd">-->
<!--<div class="am-tab-panel am-fade am-in am-active" id="tab1">-->
<div class="spinner1">
<div class="bounce1"></div>
<div class="bounce2"></div>
... ... @@ -243,16 +242,12 @@
<canvas id="canvas">
浏览器不支持
</canvas>
<!--<div id="docOuter" class="docOuter">-->
<img class="showImg" id="showImg"/>
<!--文档层-->
<img id="docImage" class="docImage">
</img>
<canvas id="canvas_bak"></canvas>
<!--</div>-->
</div>
<!--画板的工具栏-->
... ... @@ -263,20 +258,20 @@
<!--颜色板-->
<div id="tool-color" class="tool-color">
<ul class="draw_controller cf">
<li id="li-Color1" class="Color1" title="#4fbd92" value="#4fbd92"
<!--红色-->
<li id="li-Color1" class="Color1" title="#b8242a" value="#b8242a"
onclick="choose(1)"></li>
<!--蓝色-->
<li id="li-Color2" class="Color2" title="#0071bc" value="#0071bc"
onclick="choose(2)"></li>
<!--紫色-->
<li id="li-Color3" class="Color3" title="#6a0db2" value="#6a0db2"
onclick="choose(3)"></li>
<!--黄色-->
<li id="li-Color4" class="Color4" title="#fae81b" value="#fae81b"
onclick="choose(4)"></li>
<li id="li-Color5" class="Color5" title="#f7751e" value="#f7751e"
onclick="choose(5)"></li>
<li id="li-Color6" class="Color6" title="#b8242a" value="#b8242a"
onclick="choose(6)"></li>
<li id="li-Color7" class="Color7" title="#4fbd92" value="#4fbd92"
onclick="choose(7)"></li>
</ul>
</div>
... ... @@ -285,7 +280,6 @@
<li class="rescind" title="撤销上一步操作"></li>
<!--<li class="square" title="方形"></li>-->
<!--<li class="drawLine" title="画直线"></li>-->
<!--<li class="circle" title="圆"></li>-->
<!--<li class="laserPen" title="激光笔"></li>-->
<!--<li class="canvasText" title="文字"></li>-->
... ... @@ -297,12 +291,7 @@
</div>
<!--</div>-->
<!--</div>-->
<!--</div>-->
... ... @@ -337,19 +326,6 @@
<!--文档和视频切换,视频控制区域-->
<div class="control">
<ul class="clear">
<!--<li class="voice-on-off iconfont">&#xe623;</li>-->
<!--<li class="voice-progress">-->
<!--<div id="Demo">-->
<!--<div id="Main">-->
<!--<div id="scrollBar">-->
<!--<div id="scroll_Track"></div>-->
<!--<div id="scroll_Thumb"></div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</li>-->
<li class="fileUpload iconfont" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0, width: 398, height: 288}">&#xe620;</li>
<li class="next-page "><a id="nextPage" href="javascript:void(0)"></a></li>
... ... @@ -384,7 +360,6 @@
<div id="stuVideo-voiceBg" class="stuVideo-voiceBg iconfont"></div>
<div id="stuVideo-voiceNotClick" class="stuVideo-voiceNotClick iconfont" title="当前不能点击">&#xe62d;</div>
<!--<span>lucy</span>-->
</div>
<div class="teacherVideo">
<div class="publish" style="position:absolute;top: 0; width:240px;height:180px">
... ... @@ -586,7 +561,7 @@
<div class="fourParamsOut">
<ul class="fourParams clear">
<li><span>classId:</span><input class="classId" type="text" value="1215295269"></li>
<li><span>classId:</span><input class="classId" type="text" value="1357644520"></li>
<!--<li><span>userRole:</span><input class="userRole" type="text" value=""></li>-->
<!--<li><span>portal:</span><input class="portal" type="text" value=""></li>-->
<li><span>userId:</span><input class="userId" type="text" value=""></li>
... ... @@ -657,8 +632,6 @@
ScrollBar.maxValue = 100;
//初始化
ScrollBar.Initialize();
});
var ScrollBar = {
value: 20,
... ... @@ -806,89 +779,6 @@
}
</script>
<!--开始上课/正在录制-->
<script type="text/javascript">
var flag = 0;
// 正在上课
var classnow = document.getElementById('class-now');
//弹出层上的文字
var ptext = document.getElementById('p-text');
var ptext1 = document.getElementById('p-text-1');
// 确定按钮
var confirm = document.getElementById('confirm');
var confirm1 = document.getElementById('confirm-1');
// 正在上课前的iconfont
var spaniconfont = document.getElementById('span-iconfont');
// 左侧 未开始 直播中
var aStatus = document.getElementById('a-status');
// 左侧跳动
var oLive = document.getElementById('live');
// 左侧的iconfont
var noStart = document.getElementById('no-start');
var end = document.getElementById('end');
var endNoexit = document.getElementById('end-no-exit');
// 第一个下拉的第一个
var classesStatus1 = document.getElementById('classes-status-1');
// 第一个下拉的第二个
var classesStatus2 = document.getElementById('classes-status-2');
var amDrospanIcon = document.getElementById('am-dropdown-content-span-1');
// confirm.onclick = function changeStatus() {
// if (flag == '0') {
// flag++;
// console.log(flag);
// spaniconfont.innerHTML = '&#xe609;';
// classnow.innerHTML = '直播中';
// aStatus.innerHTML = '直播中';
// aStatus.style.color = '#d95136';
// ptext.innerHTML = '确定暂停录制吗'
// noStart.style.display = 'none';
// oLive.style.display = 'block';
// amDrospanIcon.innerHTML = "&#xe60a;";
// classesStatus1.innerHTML = '课间休息';
// console.log(classesStatus1.innerHTML);
// classesStatus2.innerHTML = '结束课堂';
// console.log(classesStatus2.innerHTML);
//
//
// }
// else if (flag == '1') {
// console.log(flag);
// ptext.innerHTML = '确定继续上课吗'
// spaniconfont.innerHTML = '&#xe60a;';
// classnow.innerHTML = '休息';
// aStatus.innerHTML = '休息';
// aStatus.style.color = '#333333';
// noStart.style.display = 'block';
// oLive.style.display = 'none';
// amDrospanIcon.innerHTML = "&#xe61d;";
// classesStatus1.innerHTML = '继续上课';
// console.log(classesStatus1.innerHTML);
// classesStatus2.innerHTML = '结束课堂';
// console.log(classesStatus2.innerHTML);
// flag--;
// }
//
//
// }
// end.onclick = function endStatus() {
// spaniconfont.innerHTML = '&#xe609;';
// classnow.innerHTML = '结束';
// aStatus.innerHTML = '结束';
// oLive.style.display = 'none';
// spaniconfont.innerHTML = '&#xe607;';
// noStart.innerHTML = "&#xe62b;";
// noStart.style.display = 'block';
// aStatus.style.color = '#333333';
// }
</script>
<!--色板-->
<script type="text/javascript">
... ... @@ -896,16 +786,6 @@
var toolColor = document.getElementById('tool-color');
var chooseColor = document.getElementById('chooseColor');
var liColor1 = document.getElementById('li-Color1');
var liColor2 = document.getElementById('li-Color2');
var liColor3 = document.getElementById('li-Color3');
var liColor4 = document.getElementById('li-Color4');
var liColor5 = document.getElementById('li-Color5');
var liColor6 = document.getElementById('li-Color6');
var liColor7 = document.getElementById('li-Color7');
chooseColor.onmouseenter = function () {
toolColor.style.display = "block";
};
... ... @@ -913,18 +793,11 @@
chooseColor.onmouseleave = function () {
toolColor.style.display = "none";
};
/* for(var i=0;i<oLis.length;i++){
oLis[i].index=i;
oLis[i].onlick=function () {
oLis[this.index].style.width="";
}
}*/
function choose(agrs) {
switch (agrs) {
case 1:
chooseColor.style.background = 'url("images/color1-n.png") no-repeat';
chooseColor.title = "#4fbd92";
chooseColor.title = "#b8242a";
break;
case 2:
chooseColor.style.background = 'url("images/color2-n.png") no-repeat';
... ... @@ -939,18 +812,7 @@
chooseColor.style.background = 'url("images/color4-n.png") no-repeat';
chooseColor.title = "#fae81b";
break;
case 5:
chooseColor.style.background = 'url("images/color5-n.png") no-repeat';
chooseColor.title = "#f7751e";
break;
case 6:
chooseColor.style.background = 'url("images/color6-n.png") no-repeat';
chooseColor.title = "#b8242a";
break;
case 7:
chooseColor.style.background = 'url("images/color1-n.png") no-repeat';
chooseColor.title = "#4fbd92";
break;
default:break;
}
}
... ...
... ... @@ -19,6 +19,7 @@ var curPageNum;
var pageNum;
var fileItemIdx;
//画布
var canvas ;
var context ;
... ... @@ -178,6 +179,7 @@ function importFile() {
data:fd,
success: function(data) {
console.log("文档服务器返回的",data);
uploadFile(data);
},
error: function(data){
... ... @@ -302,24 +304,47 @@ function switchDoc(msg) {
//将上传文件的信息,传递给底层
function uploadFile(msg){
console.log("服务器返回的文件信息");
console.log(msg);
for (var i=0;i<fileFromArr.length;i++){
var fileObj=fileFromArr[i];
if(msg.docId==fileObj.docId){
$(".spinner").css("display","none");
$(".doc-headline-a").trigger("click");
$(".pop").trigger("click");
$(".popTxt").html("文件已存在,不用上传!是否上传其他文件?");
}else{
// fileInfo.fileName=msg.fileName;//文档名字
fileInfo.pageNum=msg.imgSize;// 文档的总页数
fileInfo.fileName=msg.fileName;//文档名字
fileInfo.fileType=msg.fileType; // 文档的原始类型(上传时的类型)
fileInfo.relativeUrl=msg.relativeLocation; //文档相对地址
fileInfo.url=msg.filePath; //文档绝对地址 默认值: null
fileInfo.docId=msg.docId; //文档在数据库中的唯一id标识 默认值: null
fileInfo.visible=false; // 是否显示 默认值: false
fileInfo.dynamicTS=msg.dynamicTransferStatic //是否动态转换 //文档上传后返回值中的字段dynamicTransferStatic 默认值: 0
console.log(fileInfo);
client.sendDocumentUpload(fileInfo);
}
}
if (fileFromArr.length==0) {
// fileInfo.fileName=msg.fileName;//文档名字
fileInfo.pageNum = msg.imgSize;// 文档的总页数
fileInfo.fileName = msg.fileName;//文档名字
fileInfo.fileType = msg.fileType; // 文档的原始类型(上传时的类型)
fileInfo.relativeUrl = msg.relativeLocation; //文档相对地址
fileInfo.url = msg.filePath; //文档绝对地址 默认值: null
fileInfo.docId = msg.docId; //文档在数据库中的唯一id标识 默认值: null
fileInfo.visible = false; // 是否显示 默认值: false
fileInfo.dynamicTS = msg.dynamicTransferStatic //是否动态转换 //文档上传后返回值中的字段dynamicTransferStatic 默认值: 0
console.log(fileInfo);
client.sendDocumentUpload(fileInfo);
}
console.log("服务器返回的文件信息");
console.log(msg);
// fileInfo.fileName=msg.fileName;//文档名字
fileInfo.pageNum=msg.imgSize;// 文档的总页数
fileInfo.fileName=msg.fileName;//文档名字
fileInfo.fileType=msg.fileType; // 文档的原始类型(上传时的类型)
fileInfo.relativeUrl=msg.relativeLocation; //文档相对地址
fileInfo.url=msg.filePath; //文档绝对地址 默认值: null
fileInfo.docId=msg.docId; //文档在数据库中的唯一id标识 默认值: null
fileInfo.visible=false; // 是否显示 默认值: false
fileInfo.dynamicTS=msg.dynamicTransferStatic //是否动态转换 //文档上传后返回值中的字段dynamicTransferStatic 默认值: 0
console.log(fileInfo);
client.sendDocumentUpload(fileInfo);
}
... ... @@ -332,7 +357,6 @@ function docUpdate(callbackData){
return;
}
if (callbackData.visible===true){
showInter(callbackData,2);
}
//操作数据
... ... @@ -418,7 +442,7 @@ function showInter(_data,isPage){
$(".docImage").css("display","none");
$("#showImg").css("display","block");
$(".canvas_container").scrollTop(0);
$(".canvas_container").scrollTop(0);
$(".canvas_container").css("overflow","hidden");
... ...