This commit is contained in:
ChuXun
2025-10-11 18:15:20 +08:00
parent 98c6e4b11a
commit cf8f4c5c3a
283 changed files with 105716 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,133 @@
/**
* 镜像js中只需修改这个文件
*/
window.splitDomainConfig = function(num,domainHost){
var arr = domainHost.split("."),
len = arr.length,
array = [];
if(num>len) return;
for(var i = 0;i < num; i++){
array.push(arr[len-(i+1)]);
}
return array.reverse().join('.');
};
window.getDomain = function(){
domainHost=window.location.host;
if(!domainHost) return ;
var domain = domainHost.substring(domainHost.lastIndexOf(".")+1, domainHost.length);
if(!domain) return;
var arr = domainHost.split(".");
var len = arr.length;
if (domainHost.indexOf("mooc1.mooc") == 0){
return splitDomainConfig(len - 1, domainHost);
} else if(domain == 'cn'){
return splitDomainConfig(3,domainHost);
} else {
return splitDomainConfig(2,domainHost);
}
};
window.getCookie = function(name) {
var oRegExp = new RegExp("(^|)" + name + "=([^;]*)(;|$)","gi").exec(document.cookie), aCookie;
if(aCookie = oRegExp) {
var e=unescape(aCookie[2]);
if(e!=null && typeof(e) != "undefined"){
return e;
}
return "";
}
return "";
};
window.ServerHost={
host:location.host,
pathMap: {},
moocDomain: window.location.protocol + "//" + window.location.host,
purl: "https://p.ananas.chaoxing.com",
purlNew: "https://p.cldisk.com",
dayaDomain: "https://dsa.dayainfo.com",
passporturl: "http://passport2." + getDomain(),
passporturlNew:"http://detect."+getDomain(),
fanyaurl: "http://course.fanya." + getDomain(),
photoDomain: "http://photo.fanya.chaoxing.com",
domainurl_old: "http://fanya.chaoxing.com",
cloudDomain: "http://cloud.ananas.chaoxing.com",
groupDomain: "https://groupweb.chaoxing.com",
uploadDomain: window.location.protocol + "//mooc-upload-ans.chaoxing.com",
newCloudDomain: location.protocol + "//pan-yz.chaoxing.com",
xueyinonlineDomain: location.protocol + "//www.xueyinonline.com",
xueyinonlineChaoXingDomain: location.protocol + "//xueyinonline.chaoxing.com",
pananas: "http\:\/\/p.ananas\.chaoxing\.com\/star\/origin\/",
schoollist: "http://www.fanya." + getDomain() + "/school/schoollist.html",
moocTJDomain: "https://fystat-ans.chaoxing.com",
ztDomain: "https://special.rhky.com",
xChaoXingDomain : "http://x.chaoxing.com",
xChaoXingDomainS : "https://x.chaoxing.com",
jcxyglDomain: "https://jcxygl.chaoxing.com",
widgetCourseDomain: "https://widget-course.chaoxing.com",
panDomain: location.protocol + "//pan-yz." + getDomain(),
noteydDomain: "https://noteyd.chaoxing.com",
mooc2Domain: "https://mooc2-ans.chaoxing.com",
mobilelearnDomain: window.location.protocol + "//mobilelearn." + getDomain(),
aiCreationTextbookDomain: "https://ai-creation-textbook.chaoxing.com",
noteExportydDomain: window.location.protocol + '//exportyd.chaoxing.com',
authenDomain: window.location.protocol + '//authen.chaoxing.com',
mobilelearnDomain: window.location.protocol + '//mobilelearn.chaoxing.com',
liveDomain: window.location.protocol + '//live.chaoxing.com',
appcdDomain: window.location.protocol + '//appcd.chaoxing.com',
mobile3Domain: window.location.protocol + '//mobile3.chaoxing.com',
zhiboDomain : window.location.protocol + "//zhibo.chaoxing.com",
feDomain: window.location.protocol + "//fe.chaoxing.com",
qikanDomain: window.location.protocol + '//qikan.chaoxing.com',
ssDomain : window.location.protocol + "//ss.chaoxing.com",
cvpDomain: window.location.protocol + "//cv-p" + getDomain(),
svideoDomain: window.location.protocol + "//svideo.chaoxing.com",
init: function() {
var defaultPathObj ={
"mooc2-ans":"",
};
this.pathMap["www.mooc.whu.edu.cn"] = defaultPathObj;
this.hostPathObj = this.pathMap[this.host];
if(typeof this.hostPathObj != 'undefined'){
this.groupDomain = this.getDomain("groupweb");
this.noteDomain = this.getDomain("noteyd");
this.noteDomain1 = this.noteDomain;
this.mooc2Domain = this.getDomain("mooc2-ans");
if(this.mooc2Domain.endsWith("/mooc2-ans")){
this.mooc2Domain = this.mooc2Domain.substr(0,this.mooc2Domain.length - "/mooc2-ans".length);
}
}
},
createScript: function (srcUrl) {
var oScript = document.createElement('script');
oScript.type = 'text/javascript';
oScript.src = srcUrl;
var oHead = document.getElementsByTagName("head")[0];
try {
oHead = oHead || document.documentElement;
oHead.appendChild(oScript);
} catch (e) {
}
},
getDomain: function (pathKey) {
var pathValue = this.hostPathObj[pathKey];
if(typeof pathValue != 'undefined'){
if(pathValue.indexOf('.')>-1){
pathValue = pathValue.replace("http://",'').replace("https://",'');
return location.protocol + '//' + pathValue;
}
if(pathValue.length > 0){
pathValue = "/" + pathValue;
}
return location.protocol + '//' + this.host + pathValue;
} else {
return location.protocol + '//' + this.host + "/" + pathKey;
}
}
};
ServerHost.init();

View File

@@ -0,0 +1,120 @@
/**
* 镜像中只需要修改这个文件中的host,其它不用动
*/
window.ServerHosts={
host:location.host,
pathMap: {},
domain: document.domain,
MASTER_HOST: "",
PARENT_HOST: "",
P_HOST:location.protocol + '//p.ananas.chaoxing.com',
s1_HOST: location.protocol + '//s1.ananas.chaoxing.com',
s2_HOST:location.protocol + '//s2.ananas.chaoxing.com',
CLOUD_HOST :'http://cloud.ananas.' + document.domain,
NEW_CLOUD_HOST :location.protocol + '//pan-yz.chaoxing.com',
CS_HOST :location.protocol + '//cs.ananas.' + document.domain,
FANYA_HOST :'http://course.fanya.' + document.domain,
PAN_HOST :'http://pan.ananas.' + document.domain,
CXLIVE_HOST :'http://cxlive.' + document.domain,
ERYA_TSK_HOST :'http://erya.tsk.' + document.domain,
QUESTIONNAIRE_HOST : 'http://surveyapp.fy.' + document.domain,
FX_HOST :'http://www.' + document.domain,
PHONE_ZT_HOST :"https://special.rhky.com",
CHAOXING_CLASS_HOST :"https://k.chaoxing.com",
LIVE_HOST : location.protocol + "//live.chaoxing.com",
APPCD_HOST : location.protocol + "//appcd.chaoxing.com",
ZHIBO_HOST : "https://zhibo.chaoxing.com",
CXCLASSTASL_HOST : location.protocol + "//noteyd.chaoxing.com",
UPLOADDOMAIN : "https://mooc-upload-ans.chaoxing.com",
MOOC2_HOST : location.protocol + '//mooc2-ans.' + document.domain,
FANYALUBO : location.protocol + "//fanyalubodata.fanya.chaoxing.com",
FANYALUBO_DOMAIN : location.protocol + "//fanyalubodata." + document.domain,
ZHIBO_HOST2 : location.protocol + "//zhibo." + document.domain,
LIVE_HOST2 : location.protocol + "//live." + document.domain,
MOBILE3 : location.protocol + "//mobile3.chaoxing.com",
APPCD_HOST2 : location.protocol + "//appcd." + document.domain,
GROUPWEB : location.protocol + "//groupweb." + document.domain,
MOOC_UPLOAD_ANS : location.protocol + "//mooc-upload-ans.chaoxing.com",
SS_HOST : location.protocol + "//ss.chaoxing.com",
SS_ZHEXUEZJ : location.protocol + "//ss.zhexuezj.cn",
AUTHEN_HOST : "https://authen.chaoxing.com",
DATA_XXT : location.protocol + "//data-xxt.aichaoxing.com",
DATAXXT : "http://data.xxt.aichaoxing.com",
PAN_HOST1 : "http://pan.chaoxing.com",
HOMEWH_HOST : "https://homewh.chaoxing.com",
MOBILELEARN : location.protocol + "//mobilelearn." + document.domain,
MOBILEWX: location.protocol + "//mobilewx." + document.domain,
QIKAN : location.protocol + "//qikan.chaoxing.com",
SHAREWH : location.protocol + "//sharewh.chaoxing.com",
SURVEYAPP_FY : "https://surveyapp-fy.chaoxing.com",
SURVEYAPP_FY_ZHEZUEZJ : location.protocol + "//surveyapp-fy.zhexuezj.cn",
CONVERTSERVICE : location.protocol + "//convertservice.chaoxing.com",
HLS_ANS_HOST : "http://hls-ans.chaoxing.com",
MOOC_API_HOST : location.protocol + "//mooc1-api.chaoxing.com",
FANYA_HOST2 : "http://fanya.chaoxing.com",
FANYA_ZYK2_HOST : location.protocol + "//fanyazyk2.chaoxing.com",
SUPER_FY_HOST : "http://super.fy.chaoxing.com",
SVIDEO_HOST : location.protocol + "//svideo.chaoxing.com",
ECUST_FANYA_HOST: location.protocol + "//ecust.fanya." + document.domain,
CVP_HOST: location.protocol + "//cv-p." + document.domain,
init : function(){
var defaultPathObj ={
// 定制路径,没有时采用默认路径
"mooc2-ans":"www.mooc.whu.edu.cn"
};
this.pathMap["www.mooc.whu.edu.cn"] = defaultPathObj;
this.hostPathObj = this.pathMap[this.host];
if(typeof this.hostPathObj != 'undefined'){
this.NEW_CLOUD_HOST = this.getDomain("pan");
this.CXCLASSTASL_HOST = this.getDomain("noteyd");
this.GROUPWEB = this.getDomain("groupweb");
this.MOBILELEARN = this.getDomain("ketang-mobilelearn");
this.FANYA_ZYK2_HOST = this.getDomain("fanyazyk2");
this.MOOC2_HOST = this.getDomain("mooc2-ans");
this.MOOC_API_HOST = this.getDomain("mooc-ans");
if(this.MOOC2_HOST.endsWith("/mooc2-ans")){
this.MOOC2_HOST = this.MOOC2_HOST.substr(0,this.MOOC2_HOST.length - "/mooc2-ans".length);
}
}
if (document.domain.indexOf('xueyinonline.com') >= 0) {
this.QUESTIONNAIRE_HOST = location.protocol + "//surveyapp.xueyinonline.com";
}
if (document.domain.indexOf('xueyinonline.com') >= 0) {
this.NEW_CLOUD_HOST = location.protocol + "//pan-yz.xueyinonline.com";
}
this.MASTER_HOST = this.getMasterHost();
this.PARENT_HOST = this.getParentHost();
},
getDomain: function (pathKey) {
var pathValue = this.hostPathObj[pathKey];
if(typeof pathValue != 'undefined'){
if(pathValue.indexOf('.')>-1){
pathValue = pathValue.replace("http://",'').replace("https://",'');
return location.protocol + '//' + pathValue;
}
if(pathValue.length > 0){
pathValue = "/" + pathValue;
}
return location.protocol + '//' + this.host + pathValue;
} else {
return location.protocol + '//' + this.host + "/" + pathKey;
}
},
getMasterHost: function() {
try{
return location.protocol + '//'+ top.location.host;
}catch(e){
return location.protocol + '//'+ location.host;
}
},
getParentHost: function() {
try {
return parent.location.host !== "" ? location.protocol + '//'+ parent.location.host : this.MASTER_HOST;
} catch(e) {
return location.protocol + '//'+ location.host;
}
}
}
ServerHosts.init();

View File

@@ -0,0 +1,67 @@
window.safefilter = (function () {
var doc = document,
iframe,
me = {
cls: "sf-box",
defaultStyle: "border:none;position: absolute;top: 0;left: 0; width: 100%; height: 100%; z-index:9999",
showVerify: function (host) {
if (iframe) {
return;
}
var body = document.body;
iframe = doc.createElement("iframe");
//bug
//iframe.src = host?host:"" + "/antispiderShowVerify.ac?app=1";
iframe.src = (host ? host : "") + "/antispiderShowVerify.ac?app=1";
iframe.className = me.cls;
iframe.style = me.defaultStyle;
body.append(iframe);
},
showVerify2: function (contextPath) {
if (iframe) {
return;
}
var body = document.body;
iframe = doc.createElement("iframe");
var path = contextPath || '';
iframe.src = path + "/antispiderShowVerify.ac?app=1";
iframe.className = me.cls;
iframe.style = me.defaultStyle;
body.append(iframe);
},
close: function () {
if (iframe && iframe.parentNode) {
iframe.parentNode.removeChild(iframe);
iframe = null;
}
}
};
window.addEventListener && window.addEventListener("message", function (event) {
if (!event || !event.data) {
return;
}
var msgJson = {};
if (typeof (event.data) === 'string') {
try {
msgJson = JSON.parse(event.data)
} catch (e) {
}
} else {
msgJson = event.data;
}
if (msgJson == null) {
return;
}
if (msgJson.cmd == "closeVerifyIframe") {
me.close();
}
});
return me;
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,30 @@
var setting = parent.AttachmentSetting;
var appKey = "";
var defalutJs = "https://d.alicdn.com/alilog/mlog/aplus/204458013.js";
if (setting && setting.aplusJs) {
defalutJs = setting.aplusJs;
}
if (setting) {
if (setting.pid == "26091" || setting.pid == "781" || setting.pid == "332791" || setting.pid == "105388" || setting.pid == "47903") {
appKey = setting.aplusKey;
(function(e, a, u, t) {
e[t] = e[t] || [];
var s = a.getElementsByTagName(u)[0],
n = a.createElement(u);
n.async = !0, n.id = "beacon-aplus", n.src = defalutJs, s.parentNode.insertBefore(n, s)
})(window, document, "script", "aplus_queue")
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["appKey", appKey]
}),
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["aplus-rhost-v", "qtedu.om.moe.edu.cn"]
}),
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["DEBUG", !0]
});
}
}

View File

@@ -0,0 +1,955 @@
/**
* 处理附件点击事件
*/
RichtextAttachmentClickUtils = {
clickEvent : function(){},
customAttachmentType : '', // 自己处理点击事件的附件类型
customClickEvent: function(){}, // 自己处理点击事件的方法
}
//获取js当前路径
RichtextAttachmentClickUtils.mctx = function () {
var jsPath = document.currentScript && document.currentScript.src ? document.currentScript.src : function () {
var js = document.scripts
, last = js.length - 1
, src;
for (var i = last; i > 0; i--) {
if (js[i].readyState === 'interactive') {
src = js[i].src;
break;
}
if (js[i].src.indexOf('attachment_click_util.js') > -1) {
src = js[i].src;
break;
}
}
return src || js[last].src;
}();
return jsPath.substring(0, jsPath.indexOf('/res/'));
}();
var AttachmentType = {
Topic:1,//话题
Note:2,//笔记
Special:3,//专题
Newspaper:4,//报纸
SpecialDomain:5,//专题域
Periodical:6,//期刊
Group:7,//小组
Notice:8,//通知
Notifications:30,//通知提醒
Message:9,//消息
Notebook:10,//笔记文件夹
StudyFolder:11,//书房文件夹
Courses:{ //15课程相关
Value:15,
subType:{
test : 42, // 测验
score : 23, // 评分
vote : 14, // 投票/问卷
signin:2,//签到
liveVideo:0//直播
}
},
ResourcesDomain:16,//资源域
CourseChapter:17,//课程章节
CloudDisk:18,//云盘
RedPacket:19,//红包
UserInfo:20,//人员信息
Course:21,//课程
BookRoom:22,//书房
GroupChat:23,//群聊
DownloadApp:24,//APP下载
Web:25,//网页
Voice:26,//录音
Video:29,//录制视频
Link:31, //外链
mapLocation:33,//地图
CloudFolder:38, // 云盘文件夹
microCourse:41, //速课
courseqrCode:44,//班级课程,(从新建课程和新建班级完成页面转发的)
TopicFolder:47, // 话题文件夹
GroupDatafolder:48, // 资料文件夹
localFolder:49, // 本地文件夹
CourseVideo:54,//课程视频打点
};
var host = window.location.href;
if (host) {
host = host.toLocaleLowerCase();
}
//是否是分享页,分享页点击附件时是打开分享页地址,课程那边在微信里面使用时也走分享页逻辑
var isShare = host.indexOf("sharewh") != -1 || host.indexOf("mobilewx.chaoxing.com") != -1;
// 是否是投屏页
var isScreen = window.location.pathname.indexOf("screen") != -1;
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf('android') > -1 || ua.indexOf('adr') > -1; //android终端
var isIOS = ua.indexOf('iphone') >= 0 || ua.indexOf('ipad') >= 0 || ua.indexOf('ipod') >= 0; //ios终端
var isHarmony = navigator.userAgent.indexOf('harmony') > -1 //鸿蒙终端
// 是否在学习通里面
var isXXT = ua && ua.indexOf("chaoxingstudy")!=-1 && ua.indexOf('_pc_') == -1;
// 是否在手机端
var isPhone = isAndroid || isIOS || isHarmony;
// 是否是微信端
var isWeiXin = ua.match(/MicroMessenger/i) == 'micromessenger';
var isIosQQ = ( /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent) && /\sQQ/i.test(navigator.userAgent));
var isAndroidQQ = ( /(Android)/i.test(navigator.userAgent) && /MQQBrowser/i.test(navigator.userAgent) && /\sQQ/i.test((navigator.userAgent).split('MQQBrowser')));
var isQQ = isIosQQ || isAndroidQQ;
// 2话题3笔记4 通知6小组7专题 这几种类型走接口获取分享页地址
var strJson = {};
strJson[AttachmentType.Topic] = 2;
strJson[AttachmentType.Note] = 3;
strJson[AttachmentType.Notice] = 4;
strJson[AttachmentType.Group] = 6;
// strJson[AttachmentType.Special] = 7;
// 获取客户端版本号
RichtextAttachmentClickUtils.getClientVersion = function(){
var ua = navigator.userAgent.toLowerCase();
if(ua.indexOf("chaoxingstudy") > -1){
ua = ua.substring(ua.indexOf("chaoxingstudy"));
ua = ua.substring(ua.indexOf("_")+1);
ua = ua.substring(ua.indexOf("_")+1);
ua = ua.substring(0,ua.indexOf("_"));
return ua;
}
return '0';
}
//获取客户端API版本号
RichtextAttachmentClickUtils.getClientApiVersion = function () {
var userAgent = navigator.userAgent;
if (userAgent.indexOf("ChaoXingStudy_") == -1) {
return 0;
}
var versionArray = userAgent.match(".*ChaoXingStudy_(\\d+)_(\\d+[^_]*)_([^_]*)_([^_]*)_([^ ]*)?( \\([^)]*\\))?.*_(.*[-]?\\w+).*");
if (!!versionArray && versionArray != "undefined" && versionArray.length > 6) {
var ApiVersion = versionArray[5].split("_")[1];
return parseInt(ApiVersion);
}
return 0;
}
/**
* 获取附件 isOriginal 是否走原来的逻辑获取地址 0不是 1
*/
RichtextAttachmentClickUtils.clickEvent = function(attachment, operationType, isOriginal) {
if (!attachment) {
return;
}
var open_url = "";
var attachmentType = attachment.attachmentType;
if (undefined == attachmentType || attachmentType == "") {
return;
}
attachmentType = parseInt(attachmentType);
if (typeof RichtextAttachmentClickUtils.customAttachmentType != 'undefined'
&& RichtextAttachmentClickUtils.customAttachmentType
&& typeof RichtextAttachmentClickUtils.customClickEvent == 'function') {
var attTypeArr = RichtextAttachmentClickUtils.customAttachmentType.split(',');
if (attTypeArr && attTypeArr.length > 0) {
var isContains = false;
$.each(attTypeArr, function(idx, val) {
if (parseInt(val) == attachmentType) {
// 定义了自己处理的附件,直接调用的对应的方法
RichtextAttachmentClickUtils.customClickEvent(attachment, attachmentType);
isContains = true;
return false;
}
})
if (isContains) {
return;
}
}
}
if (typeof RichTextUitl != "undefined" && RichTextUitl.intranetMode) {
var url = '';
if (attachmentType == AttachmentType.CloudDisk
&& attachment.att_clouddisk && !attachment.att_clouddisk.fileId
&& attachment.att_clouddisk.downPath) {
// 有一些镜像数据是从线上迁移到本地的线上的云盘附件里面有fileId如果有这个就走线上的下载逻辑
url = attachment.att_clouddisk.downPath;
}else if (attachmentType == AttachmentType.Web) {
url = attachment.att_web.url;
}
if (url) {
if(isPhone){
$('body').append('<a style="display:none;" id="open_attachment" target="_blank" href="'+url+'"></a>');
var el=document.getElementById('open_attachment');
el.click();//触发打开事件
$(el).remove();
}else{
window.location.href = url;
}
return;
}
}
if (operationType == 'preview') {
// 云盘文件的预览
if (attachment && attachment.att_clouddisk && attachment.att_clouddisk.fileId) {
var url = "https://previewyd.chaoxing.com/res/view/view.html?opentype=full&objectid="
+ attachment.att_clouddisk.fileId;
if(window.obj && window.obj.mirrorDomain && window.obj.mirrorDomain.previewDomainHttps){
url = window.obj.mirrorDomain.previewDomainHttps + "/res/view/view.html?opentype=full&objectid="
+ attachment.att_clouddisk.fileId;
}
if(!RichTextUitl.isGetVideoDataFromCenter){
resid = attachment.att_clouddisk.resid
url += '&resid=' + resid;
}
if(isPhone) {
$('body').append('<a style="display:none;" id="open_attachment" target="_blank" href="' + url + '"></a>');
var el = document.getElementById('open_attachment');
el.click();//触发打开事件
$(el).remove();
}else{
window.location.href = url;
}
}
return;
}
//可预览可下载文件
var isFile = attachment.attachmentType == 18 && (attachment.att_clouddisk.suffix.indexOf('doc') > -1 || attachment.att_clouddisk.suffix.indexOf('xls') > -1 || attachment.att_clouddisk.suffix.indexOf('pdf') > -1);
if (isXXT && RichtextAttachmentClickUtils.getClientApiVersion() >= 38 && window.self == window.top) {
// 4.357 才有 CLIENT_OPEN_ATTACHMENT 协议
// 非分享页,且是在学习通里面打开的,通过客户端协议展示附件,现在改为分享页在学习通里面打开时也使用协议
// 门户那边反馈有视频在学习通里面查看时会提示文件不存在查询发现是视频附件里面的resid对应的数据已经不存在了
// 可能是用户把文件传到云盘后又删除了文件,由于门户都是定制域名,为了先解决播放问题,
// 添加判断课程域名的才使用协议门户的使用网页播放网页播放是用的objectid查的可以正常查到数据
if (window.location.host.indexOf('mobilelearn') > -1 || window.location.host.indexOf('sharewh') > -1
|| attachment.attachmentType != 29) {
try {
jsBridge.postNotification('CLIENT_OPEN_ATTACHMENT', attachment);
}
catch(e) {
}
} else {
attachment.att_video.name = attachment.att_video.fileTitle;
attachment.att_video.fileId = attachment.att_video.objectId2;
AttachmentListener.mediaPlay('video', attachment.att_video);
}
return;
} else if(isXXT && window.top != window.self) {
// 学习通里面iframe嵌套的用顶层协议打开
try {
if(top.jsBridge){
top.jsBridge.postNotification('CLIENT_OPEN_ATTACHMENT', attachment);
return;
}
}catch(e) {
console.log(e);
}
}
// 2话题3笔记4 通知6小组7专题 这几种类型走接口获取分享页地址
if (strJson[attachmentType] && isShare && !isOriginal){
getAttShareUrl(strJson[attachmentType],attachmentType,attachment);
return;
}
switch (attachmentType) {
case AttachmentType.Topic:
//话题
var att_topic=attachment.att_topic;
var att_topic_id = att_topic.id;
if($.trim(att_topic.shareUrl||"")!=""){//尝试获取加密的话题id
var reg4GetDesNoteId = new RegExp("//sharewh.chaoxing.com/share/topic/([^/]+)/getTopic", "ig");
var regResultArr = reg4GetDesNoteId.exec(att_topic.shareUrl||"");
att_topic_id = regResultArr && regResultArr.length>1?regResultArr[1]:att_topic_id;
}
if(isShare){
open_url = att_topic.shareUrl.replace('sharewh.chaoxing.com', 'sharewh3.xuexi365.com');
}else if(isScreen){
// 投屏页,打开对应的话题投屏页面
open_url = "https://groupyd.chaoxing.com/screen/screenProjection/topic/"+ att_topic.uuid +"/detail";
} else {
// open_url = "http://group.yd.chaoxing.com/pc/topic/bbs/"+ att_topic.att_group.bbsId +"/"+att_topic_id+"/replysList";
open_url = "https://groupweb.chaoxing.com/pc/topic/jumpToTopicDetail?bbsid="+ att_topic.att_group.bbsId +"&uuid=" + att_topic.uuid;
}
break;
case AttachmentType.Note:
//笔记
var att_note = attachment.att_note;
var att_note_url = 'https://noteyd.chaoxing.com/pc/' + att_note.cid;
if(isShare){
open_url = att_note.shareUrl.replace('sharewh.chaoxing.com', 'sharewh3.xuexi365.com');
} else if(isScreen){
// 投屏页,打开对应的笔记投屏页面
open_url = "https://noteyd.chaoxing.com/screen/note_note/noteDetail/" + att_note.cid;
} else{
open_url = att_note_url;
}
if(typeof Notice_Detail != 'undefined' && typeof Notice_Detail.openNoticeCard == 'function'){
Notice_Detail.openNoticeCard(att_note.title, att_note_url);
return;
}
break;
case AttachmentType.Notebook:
// 笔记本
var att_notebook = attachment.att_notebook;
if (att_notebook.cid) {
open_url = 'https://noteyd.chaoxing.com/pc/note_notebook/otherNotebooksLatest/'+att_notebook.cid;
}
break;
case AttachmentType.Special:
//专题
var att_subject = attachment.att_subject;
var category = att_subject.category;
if(category == "0"){//专题
var subjectLink = att_subject.subjectLink;//链接
var courseId = subjectLink.substring(subjectLink.lastIndexOf("/")+1);
var askCharIndex = courseId.indexOf("?");
if (askCharIndex >-1) {
courseId = courseId.substring(0,askCharIndex);
}
if(isShare){
if (isPhone) {
open_url = subjectLink;
} else {
open_url = "http://mooc1.chaoxing.com/course/"+ courseId +".html";
}
}else{
if (isScreen) {
open_url = 'http://special.chaoxing.com/special/screen/'+courseId;
} else {
open_url = 'http://mooc1.chaoxing.com/course/'+courseId+'.html';
}
}
}else if(category == "1"){//专题章节
//专题章节
var chapterLink = att_subject.chapterLink;//章节链接
var askCharIndex = chapterLink.indexOf("?");
var openUrl = "";
if(chapterLink.indexOf("http://group.yd.chaoxing.com")!=-1){
//一键专题对应的专题章节
openUrl = chapterLink;
} else if (chapterLink.indexOf('courseId') == -1) {
// 不包含 courseId 直接使用 chapterLink
openUrl = chapterLink;
} else{
var courseId = '';
var chapterId = '';
if (askCharIndex > -1) {
// 专题中的某一章,为一个具体的章节
courseId = chapterLink.split("?")[1].split("&")[0].split("=")[1];
chapterId = chapterLink.substring(chapterLink.lastIndexOf("/")+1,askCharIndex);
} else {
// 套专题中的某一章,是一个单独的专题
courseId = chapterLink.substring(chapterLink.lastIndexOf("/")+1);
}
if (chapterId) {
if (isScreen) {
openUrl = 'http://special.chaoxing.com/special/screen/tocard/'+ chapterId +'?courseId='+ courseId;
} else {
openUrl = 'http://mooc1-3.chaoxing.com/nodedetailcontroller/visitnodedetail?courseId='+courseId+'&knowledgeId='+chapterId+'&courseType=0';
}
} else {
if (isScreen) {
openUrl = 'http://special.chaoxing.com/special/screen/'+courseId;
} else {
openUrl = 'http://mooc1.chaoxing.com/course/'+courseId+'.html';
}
}
}
if(isShare && isPhone){
openUrl = chapterLink;
}
open_url = openUrl;
}
break;
case AttachmentType.Newspaper:
//报纸
var done = false;
var att_subject = attachment.att_subject;
var category = att_subject.category;
if(category == "0"){
//报纸
var open_url = att_subject.subjectLink;//链接
var paperId = subjectLogo.substring(subjectLogo.lastIndexOf("/")+1);
if (!isScreen && paperId&&$.trim(paperId||"")!=""){
open_url = "http://apps.ananas.chaoxing.com/paper/"+paperId.substring(0,paperId.indexOf("."));
}
} else if (category=="1") {
//报纸章节
var open_url = att_subject.chapterLink;//章节链接
if (!isScreen) {
var transferKey = att_subject.transferKey || '';
// transferKey 结构: "300000006_320700000014-100059093733"
var paperId = transferKey.substring(transferKey.indexOf('_')+1, transferKey.indexOf('-'));
var chapterId = transferKey.substring(transferKey.indexOf('-')+1, transferKey.length);
if (paperId && chapterId) {
var currentDate = getNowFormatDate('.');
open_url = 'http://apps.ananas.chaoxing.com/paper/content/'+ currentDate +'/'+ paperId +'/'+ chapterId +'/0';
}
}
}
break;
case AttachmentType.Group:
//小组
var att_group = attachment.att_group || "";
if (att_group != "") {
if(isShare){
open_url = att_group.shareUrl;
}else{
var bbsId = att_group.bbsId || "";
if (bbsId != "") {
open_url = "https://groupweb.chaoxing.com/pc/topic/topiclist/index?bbsid=" + bbsId;
}
}
}
break;
case AttachmentType.Notice:
//通知
var att_notice = attachment.att_notice;
var noticeId = att_notice.idCode;
if (isShare){
if (!att_notice.shareUrl) {
open_url = "//sharewh.chaoxing.com/share/notice?sn="+ noticeId +"&sharebacktype=4&s_noticeId="+noticeId;
} else {
open_url = att_notice.shareUrl.replace('sharewh.chaoxing.com', 'sharewh3.xuexi365.com');;
}
} else if (isScreen){
open_url = 'https://notice.chaoxing.com/screen/screenProjection/notice/detail?idCode='+noticeId;
} else {
open_url = 'http://notice.chaoxing.com/pc/notice/'+noticeId+'/detail';
}
break;
case AttachmentType.Notifications:
//通知提醒
var att_notice = attachment.att_mission;
var noticeId = att_notice.aid || 0;
if(isShare){
openUrl = att_notice.shareUrl;
}else{
open_url = 'https://notice.chaoxing.com/pc/notice/'+noticeId+'/detail';
}
break;
case AttachmentType.Courses.Value://课程附件
var att_course = attachment.att_chat_course||{};
if(att_course && att_course.type>-1){//格式完好,分类处理,没有处理的显示默认提示
switch (att_course.atype) {
case AttachmentType.Courses.subType.liveVideo:
//直播
var att_livevideo = att_course;
if(!att_livevideo.description||!att_livevideo.description.liveId){
break;
}
var liveId = att_livevideo.description.liveId || '';
open_url = "https://zhibo.chaoxing.com/"+liveId;
break;
case AttachmentType.Courses.subType.signin:
// 签到
if(att_course.id){
if (isScreen) {
open_url = 'https://mobilelearn.chaoxing.com/widget/sign/pcTeaSignController/showSignInfoForQunliao?activeId='+att_course.id;
} else {
open_url = 'https://mobilelearn.chaoxing.com/widget/sign/group/pcStuSignGroupController/preSign?activeId='+att_course.id;
}
}
break;
case AttachmentType.Courses.subType.test:
// 测验
if (isScreen) {
open_url = 'https://mobilelearn.chaoxing.com/widget/newvotescreen/goPCNewStatisticScreen?activeId='+att_course.id;
} else {
open_url = 'https://mobilelearn.chaoxing.com/widget/pcvote/goPCVoteStatistic?quessequence=1&activePrimaryId='+ att_course.id;
}
break;
case AttachmentType.Courses.subType.score:
// 评分
if((att_course.id||0)>0){
open_url = 'https://mobilelearn.chaoxing.com/widget/score/pc/queryGrade?activeId='+att_course.id;
}
break;
case AttachmentType.Courses.subType.vote:
// 投票/问卷
if ((att_course.id||0)>0){
if (isScreen) {
open_url = 'https://mobilelearn.chaoxing.com/widget/newvotescreen/goPCNewStatisticScreen?activeId=' +att_course.id;
} else {
open_url = 'https://mobilelearn.chaoxing.com/widget/pcgroup/goPCGroupVotePage?activeId='+att_course.id+'&quessequence=1';
}
}
break;
default:
open_url = att_course.url;
}
if (!att_course.atype) {
// 没有 atype则根据type判断
if (att_course.type == 4) {
// 直播
var att_livevideo = att_course;
if(!att_livevideo.description||!att_livevideo.description.liveId){
break;
}
var liveId = att_livevideo.description.liveId || '';
open_url = "https://zhibo.chaoxing.com/"+liveId;
}
}
if(isShare && isPhone && att_course.atype != AttachmentType.Courses.subType.liveVideo){
open_url = att_course.url;
}
}
break;
case AttachmentType.CourseChapter:
// 课程章节
var att_course_chapter = attachment.att_course;
if (isScreen) {
var forwardCourse = attachment.att_course.forwardCourse;
var courseId = '';
var chapterId = '';
try {
courseId = forwardCourse.course.data[0].id;
chapterId = forwardCourse.chapterid;
} catch(e) {
}
if (courseId && chapterId) {
openChapterScreenUrl(courseId,chapterId);
} else {
open_url = att_course_chapter.knowledgeUrl || '';
}
} else {
open_url = att_course_chapter.knowledgeUrl || '';
}
break;
case AttachmentType.CloudDisk:
// 云盘、音视频的播放有单独的逻辑处理,这里统一走下载逻辑
var isVideo = false;
var att_cloud = attachment.att_clouddisk;
if(att_cloud&&att_cloud.fileId){
if(isShare && isVideo) {
// 分享页面下视频类型附件直接播放
open_url = "https://sharewh3.xuexi365.com/share/"+ att_cloud.fileId +"/playVideo?url="+encodeURIComponent(window.location.href);
}
if((isWeiXin || isQQ || isXXT) && isPhone){
// 微信、QQ、学习通里不支持下载提示用户通过中间页去浏览器里面访问
// var id = att_cloud.resid || att_cloud.objectId;
if(!RichTextUitl.intranetMode){
url = window.location.protocol + '//noteyd.chaoxing.com/res/plugin/mnote/attachInterface.html?fileId='+att_cloud.fileId+'&fileName=' + encodeURIComponent(att_cloud.name)
+'&allowDownload=true&fileSize='+att_cloud.fileSize + '&originUrl=' + encodeURIComponent(window.location.href);
if(isXXT && window.top != window.self && window.top.location){
window.top.location.href = RichTextUitl.convertUrl(url)
}else {
window.location.href = RichTextUitl.convertUrl(url)
}
}else{
//镜像
var url = RichTextUitl.prefix + 'attachment/attachInterface.html?fileId='+att_cloud.fileId+
'&fileName=' + encodeURIComponent(att_cloud.name) + '&isIntranetMode=' + RichTextUitl.intranetMode
+ '&allowDownload=true&fileSize=' + att_cloud.fileSize
+ '&originUrl=' + encodeURIComponent(window.location.href);
if(att_cloud.previewUrl){
url += '&previewUrl='+att_cloud.previewUrl;
}
if(att_cloud.downloadUrl){
url += '&downloadUrl='+att_cloud.downloadUrl;
}
window.location.href = url;
}
} else {
YunFileUtil.downloadYunFile(attachment, att_cloud.fileId);
}
}
break;
case AttachmentType.Video:
//视频
var att_video = attachment.att_video;
if(att_video&&att_video.objectId2){
if(isShare) {
// 分享页面下直接播放
open_url = "https://sharewh3.xuexi365.com/share/"+ att_video.objectId2 +"/playVideo?url="+encodeURIComponent(window.location.href);
} else {
YunFileUtil.downloadYunFile(attachment, att_video.objectId2);
}
}
break;
case AttachmentType.Voice:
var att_voice = attachment.att_voice;
if(att_voice&&att_voice.objectId2){
YunFileUtil.downloadYunFile(attachment, att_video.objectId2);
}
break;
case AttachmentType.Web:
var att_web=attachment.att_web;
open_url = att_web.url;
//题目编辑器打开教师批阅附件,调用课程那边的方法去打开附件
if(att_web.data1 && att_web.data2 && typeof 'openTeacherCommentAttach' != 'undefined'){
openTeacherCommentAttach(att_web.data1,att_web.data2);
return;
}
openLinkUrl(open_url)
return
break;
case AttachmentType.Link:
var att_linker=attachment.att_linker;
open_url = att_linker.url;
break;
case AttachmentType.microCourse:
var att_micro_course=attachment.att_micro_course;
open_url = att_micro_course.url;
break;
case AttachmentType.mapLocation:
var att_map_location=attachment.att_map_location;
//open_url = 'http://map.baidu.com/?newmap=1&ie=utf-8&s=s%26wd%3D'+att_map_location.name;
open_url = 'https://api.map.baidu.com/geocoder?title='+att_map_location.name+'&content='+att_map_location.address+'&location='+att_map_location.latitude+','+att_map_location.longitude+'&coord_type=bd09ll&output=html&src=webapp.baidu.openAPIdemo';
break;
case AttachmentType.StudyFolder:
// 收藏文件夹
var att_folder = attachment.att_resource;
var creatorId = att_folder.content.puid || "";
var name = att_folder.content.folderName;//文件夹名称
var cfid = att_folder.content.cfid;//书房文件夹cfid
if(cfid && name){
open_url = 'http://pc.chaoxing.com/subscribe/getSubscribeByUidFolder?cfid='+cfid+'&puid='+creatorId+'&type=mobile';
}
break;
case AttachmentType.Periodical:
// 期刊
var att_subject = attachment.att_subject;
if(att_subject && att_subject.settings) {
//category=0时用subjectLogo0是期刊category=1时用chapterLogo1是期刊章节
let category = att_subject.category;
if(category == 0){
if (att_subject.subjectLink) {
open_url = att_subject.subjectLink
}
}else if (category == 1){
if (att_subject.chapterLink) {
open_url = att_subject.chapterLink
}
}
var aid;
if(att_subject.settings.aid) {
aid = att_subject.settings.aid;
} else if(att_subject.settings.sourceConfig && att_subject.settings.sourceConfig.aidEncKey){
aid = att_subject.settings.sourceConfig.aidEncKey;
}
if (!open_url) {
open_url = "http://m.chaoxing.com/mqk/list?mags="+ aid +"&from=space";
}
}
break;
case AttachmentType.CloudFolder:
// 云盘文件夹
var att_cloudFolder = attachment.att_cloudFolder;
if (!att_cloudFolder) {
break;
}
var resid = att_cloudFolder.resid;
var sharerPuid = att_cloudFolder.puid;
if(att_cloudFolder.encryptedId){
//调接口获取地址
$.ajax({
url: RichtextAttachmentClickUtils.mctx + '/pc/resource/getCloudFolderDetailUrl?resid=' + att_cloudFolder.encryptedId + '&folderPuid=' + sharerPuid,
type: 'GET',
async: false,
xhrFields: {
withCredentials: true
},
success: function (res) {
if (res.result == 1 && res.data && res.data.cloudFolderDetailUrl) {
open_url = res.data.cloudFolderDetailUrl;
}else if(att_cloudFolder.shareInfo && att_cloudFolder.shareInfo.weburl){
open_url = att_cloudFolder.shareInfo.weburl;
}
}
})
}else if(att_cloudFolder.shareInfo && att_cloudFolder.shareInfo.weburl) {
open_url = att_cloudFolder.shareInfo.weburl;
}
if(!open_url){
RichTextUitl.showTips('暂不支持打开')
}
break;
case AttachmentType.courseqrCode:
var info = attachment.att_class_qrcode_info;
open_url = 'http://mooc1.chaoxing.com/addcourse/pcqrcodemiddleview?inviteCode=' + info.invitecode;
break;
case AttachmentType.TopicFolder:
// 话题文件夹
var att_folder = attachment.att_topicfolder;
var folder_uuid = att_folder.folder_uuid || '';//文件夹uuid
var bbsid = att_folder.groupInfo.bbsId||'';//小组bbsid
if(folder_uuid && bbsid) {
//open_url = "http://group.yd.chaoxing.com/pc/topic/"+bbsid+"/topicList?isAttachment=1&folder_uuid="+folder_uuid;
open_url = "https://groupweb.chaoxing.com/pc/topic/topiclist/index?bbsid="+ bbsid +"&folder_uuid="+folder_uuid;
}
break;
case AttachmentType.GroupDatafolder:
// 小组资料文件夹
var att_folder = attachment.att_datafolder;
var folderId = att_folder.folderId || '';//文件夹标识
var bbsid = att_folder.groupInfo.bbsId||'';//小组bbsid
if(folderId && bbsid) {
// open_url = "http://group.yd.chaoxing.com/pc/resource/"+bbsid+"/resourceList?isAttachment=1&folderId="+folderId;
open_url = "https://groupweb.chaoxing.com/pc/resource/jumpToResourceList?bbsid="+bbsid+"&folderId="+folderId;
}
break;
case AttachmentType.localFolder:
// 本地文件夹
var att_folder = attachment.att_localFolder;
var cloudArray = new Array();
if (att_folder.resids && att_folder.resids.length > 0) {
$.each(att_folder.resids, function (idx, val){
cloudArray.push({'puid':att_folder.puid, 'resid':val});
})
}
open_url = 'https://ypdownload.chaoxing.com/download/downloadFilePackage?_token='
+ RichTextUitl.yunToken + '&puid='+ RichTextUitl.puid
+'&fileArray=' + encodeURIComponent(JSON.stringify(cloudArray))
+ '&downloadFileName=' + encodeURIComponent(att_folder.name);
break;
case AttachmentType.CourseVideo:
//课程视频打点
var att_course_video = attachment.att_course_video;
open_url = att_course_video.transferLink + '&host=' + window.location.hostname;
break;
case AttachmentType.GroupChat:
// 群聊
var att_chat = attachment.att_chat_group;
var groupId = att_chat.groupId || '';
var ua = navigator.userAgent.toLowerCase();
if(groupId && ua.indexOf("chaoxingstudy") != -1 && ua.indexOf('_pc_') != -1 && typeof jsBridge != 'undefined'){
jsBridge.postNotification('CLIENT_OPEN_CHAT', {"groupId": groupId});
}
break;
default:
break;
}
// if($.trim(append_className) == ''){
// //直接返回
// return open_url;
// }
if($.trim(open_url) != ''){
$("#open_attachment").remove();
var ua = navigator.userAgent.toLowerCase();
if(isShare && ua && ua.indexOf("chaoxingstudy")!=-1 && ua.indexOf('_pc_') == -1){
// 在客户端打开时通过openurl协议打开pc客户端不走协议
// if(window.parent) {
// window.parent.postMessage({'url': open_url, 'msgType':'openUrl'}, 'https://sharewh.chaoxing.com')
// return;
// }
if (typeof AppUtils != 'undefined') {
AppUtils.openUrl({
toolbarType:1,
loadType: 1,
webUrl:open_url
});
return;
}
}
// if (open_url && open_url.indexOf('note') > -1 || open_url.indexOf('notice') > -1
// || open_url.indexOf('group') > -1 || open_url.indexOf('mobilelearn') > -1) {
// 笔记,通知,小组,课堂活动可能做了域名隐射,将地址换成对应的域名
if(typeof RichTextUitl != "undefined"){
open_url = RichTextUitl.convertUrl(open_url);
}
// }
openLinkUrl(open_url)
}
};
//打开url
function openLinkUrl(open_url) {
var target_val = '_blank';
if(isScreen) {
// 投屏页通过协议打开网页链接
var content = {"openInCurrent":0,"opt":1,"urls":[open_url],"type":2}
var data = {"cmd":"resourceToScreen","content":content};
var body={'body':JSON.stringify(data)};
parent.parent.postMessage(JSON.stringify({'cmd':'resourceToScreen','body':body}),'*');
} else if(isIOS) {
//IOS分享页打开新窗口有问题只能在当前页面打开
try {
//记录要跳转的地址,用于话题打点记录链接使用
RichTextUitl.open_url = open_url;
if(window.top.location.href){
window.top.location.href = open_url;
}else{
window.location.href = open_url;
}
}catch (e) {
window.location.href = open_url;
}
} else {
$('body').append('<a style="display:none;" id="open_attachment" target="'+target_val+'" href="'+open_url+'"></a>');
var el=document.getElementById('open_attachment');
//el.target = '_new'; //指定在新窗口打开
el.click();//触发打开事件
$(el).remove()
}
}
function getNowFormatDate() {
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
if(!seperator) {
seperator = '-';
}
var currentdate = year + seperator + month + seperator + strDate;
return currentdate;
}
var openChapterScreenUrl = function(courseId, chapterId) {
if (!courseId || !chapterId) {
return '';
}
$.ajax({
url : 'https://noteyd.chaoxing.com/screen/note_note/getChapterScreenUrl',
data : {courseId:courseId, chapterId:chapterId, num:1},
type : "get",
xhrFields: {
withCredentials: true
},
success : function(resultData) {
if (!resultData || (resultData.status && !resultData.msg))
return;
var content = {"openInCurrent":0,"opt":1,"urls":[resultData.msg],"type":2}
var data = {"cmd":"resourceToScreen","content":content};
var body={'body':JSON.stringify(data)};
parent.parent.postMessage(JSON.stringify({'cmd':'resourceToScreen','body':body}),'*');
},
error : function() {
}
});
};
/**
* 获取附件分享页地址
* @param type 附件类型 2话题3笔记4 通知6小组
* @param attachmentType
* @param attachment
*/
var getAttShareUrl = function(type, attachmentType, attachment) {
var dataId;
var dataId2;
var sourcePuid = 0;
switch (attachmentType) {
case AttachmentType.Topic:
//话题
var att_topic = attachment.att_topic;
dataId = att_topic.uuid;
dataId2 = att_topic.att_group.bbsId;
sourcePuid = att_topic.creatorPId;
break;
case AttachmentType.Note:
//笔记
var att_note = attachment.att_note;
dataId = att_note.cid;
sourcePuid = att_note.createrPuid;
break;
case AttachmentType.Group:
//小组
var att_group = attachment.att_group || "";
if (att_group != "") {
dataId = att_group.bbsId;
}
break;
case AttachmentType.Notice:
//通知
var att_notice = attachment.att_notice;
dataId = att_notice.idCode;
sourcePuid = att_notice.createrPuid;
break;
default:
break;
}
//调接口获取附件分享页地址
$.ajax({
url : 'https://noteyd.chaoxing.com/screen/note_note/getShareUrl',
data : {
type: type,
dataId: dataId,
dataId2: dataId2,
sourcePuid: sourcePuid
},
type : "get",
xhrFields: {
withCredentials: true
},
success : function(resultData) {
if (!resultData || !resultData.result || !resultData.msg){
//调接口失败还走原来的逻辑,避免出现附件点击没反应的情况
RichtextAttachmentClickUtils.clickEvent(attachment, '', 1);
return;
}
var open_url = resultData.msg.shareUrl;
openAttShareUrl(open_url);
},
error : function() {
//调接口失败还走原来的逻辑,避免出现附件点击没反应的情况
RichtextAttachmentClickUtils.clickEvent(attachment, '', 1);
}
});
};
/**
* 打开附件分享页地址
* @param courseId
* @param chapterId
*/
var openAttShareUrl = function(open_url) {
if($.trim(open_url) != ''){
$("#open_attachment").remove();
var target_val = '_blank';
var ua = navigator.userAgent.toLowerCase();
if(isShare && ua && ua.indexOf("chaoxingstudy")!=-1 && ua.indexOf('_pc_') == -1){
if (typeof AppUtils != 'undefined') {
AppUtils.openUrl({
toolbarType:1,
loadType: 1,
webUrl:open_url
});
return;
}
}
// if (open_url && open_url.indexOf('note') > -1 || open_url.indexOf('notice') > -1
// || open_url.indexOf('group') > -1 || open_url.indexOf('mobilelearn') > -1) {
// 笔记,通知,小组,课堂活动可能做了域名隐射,将地址换成对应的域名
open_url = RichTextUitl.convertUrl(open_url);
// }
if(isScreen) {
// 投屏页通过协议打开网页链接
var content = {"openInCurrent":0,"opt":1,"urls":[open_url],"type":2}
var data = {"cmd":"resourceToScreen","content":content};
var body={'body':JSON.stringify(data)};
parent.parent.postMessage(JSON.stringify({'cmd':'resourceToScreen','body':body}),'*');
} else if(isIOS) {
//IOS分享页打开新窗口有问题只能在当前页面打开
if(window.top.location.href){
window.top.location.href = open_url;
}else{
window.location.href = open_url;
}
}else{
$('body').append('<a style="display:none;" id="open_attachment" target="'+target_val+'" href="'+open_url+'" rel="noopener noreferrer"></a>');
var el=document.getElementById('open_attachment');
//el.target = '_new'; //指定在新窗口打开
el.click();//触发打开事件
$(el).remove()
}
}
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
/*!
* baguetteBox.js
* @author feimosi
* @version 1.1.1
* @url
*/#baguetteBox-overlay{display:none;opacity:0;position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:1000000;background-color:#222;background-color:rgba(0,0,0,.8);-webkit-transition:opacity .5s ease;transition:opacity .5s ease}#baguetteBox-overlay.visible{opacity:1}#baguetteBox-overlay .full-image{display:inline-block;position:relative;width:100%;height:100%;text-align:center}#baguetteBox-overlay .full-image figure{display:inline;margin:0;height:100%}#baguetteBox-overlay .full-image img{display:inline-block;width:auto;height:auto;max-height:100%;max-width:100%;vertical-align:middle;-webkit-box-shadow:0 0 8px rgba(0,0,0,.6);-moz-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6)}#baguetteBox-overlay .full-image figcaption{display:block;position:absolute;bottom:0;width:100%;text-align:center;line-height:1.8;color:#ccc;background-color:#000;background-color:rgba(0,0,0,.6);font-family:sans-serif}#baguetteBox-overlay .full-image:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#baguetteBox-slider{position:absolute;left:0;top:0;height:100%;width:100%;white-space:nowrap;-webkit-transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,-moz-transform .4s ease;transition:left .4s ease,transform .4s ease}#baguetteBox-slider.bounce-from-right{-webkit-animation:bounceFromRight .4s ease-out;animation:bounceFromRight .4s ease-out}#baguetteBox-slider.bounce-from-left{-webkit-animation:bounceFromLeft .4s ease-out;animation:bounceFromLeft .4s ease-out}.baguetteBox-button#next-button,.baguetteBox-button#previous-button{top:50%;top:calc(50% - 30px);width:44px;height:60px}.baguetteBox-button{position:absolute;cursor:pointer;outline:0;padding:0;margin:0;border:0;-moz-border-radius:15%;border-radius:15%;background-color:#323232;background-color:rgba(50,50,50,.5);color:#ddd;font:1.6em sans-serif;-webkit-transition:background-color .4s ease;transition:background-color .4s ease}.baguetteBox-button:hover{background-color:rgba(50,50,50,.9)}.baguetteBox-button#next-button{right:2%}.baguetteBox-button#previous-button{left:2%}.baguetteBox-button#close-button{top:20px;right:2%;right:calc(2% + 6px);width:30px;height:30px}.baguetteBox-button svg{position:absolute;left:0;top:0}.spinner{width:40px;height:40px;display:inline-block;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px}.double-bounce1,.double-bounce2{width:100%;height:100%;-moz-border-radius:50%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounceFromRight{0%{margin-left:0}50%{margin-left:-30px}100%{margin-left:0}}@keyframes bounceFromRight{0%{margin-left:0}50%{margin-left:-30px}100%{margin-left:0}}@-webkit-keyframes bounceFromLeft{0%{margin-left:0}50%{margin-left:30px}100%{margin-left:0}}@keyframes bounceFromLeft{0%{margin-left:0}50%{margin-left:30px}100%{margin-left:0}}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounce{0%,100%{-webkit-transform:scale(0);-moz-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);-moz-transform:scale(1);transform:scale(1)}}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,150 @@
var supportType = [".pdf",".doc",".docx"];
var fileStatusArray = [];
var initBrainMap = false;
var supportAiBrainMap = $("#supportAiBrainMap").val();
var useBigModelAnalysis = $("#useBigModelAnalysis").val();
var aiVideoInterpret = $("#aiVideoInterpret").val();
var documentInfo = {};
var docType = {};
$(function() {
if(supportAiBrainMap == "true") {
if (useBigModelAnalysis == "true" && aiVideoInterpret == "1") {
loadAiFileStatusNew();
} else {
loadAiFileStatus();
}
} else {
initBrainMap = true;
}
});
function loadAiFileStatusNew() {
try {
var objectIdStr = getObjectIds();
if (objectIdStr == "") {
initBrainMap = true;
return;
}
var courseId = $("#curCourseId").val();
var clazzId = $("#clazzId").val();
var ut = $("#ut").val();
$.ajax({
type: "post",
url: _HOST_CP2_ + '/mycourse/query-brain-map-model',
data: {
courseId: courseId,
objectIds: objectIdStr,
clazzId: clazzId,
ut: ut
},
dataType: "json",
success: function (data) {
initBrainMap = true;
var list = data.data;
if (typeof list == "undefined") {
return
}
for (var i = 0; i < list.length; i++) {
var objId = list[i].objectId;
var objData = list[i].data;
if (!objData) {
continue;
}
var summary = objData.summary;
var mindMap = objData.mindmap;
var wordcloud = objData.wordcloud;
// 文档如果摘要和思维导图和词云mark都为2则显示否则不显示
if (!(summary["mark"] == 2 && mindMap["mark"] == 2 && wordcloud["mark"] == 2)) {
continue;
}
documentInfo[objId] = objData;
}
},
error: function () {
initBrainMap = true;
}
});
} catch (e) {
}
};
function getObjectIds(){
try {
if(typeof mArg == "undefined" || mArg == "") {
return "";
}
var array = mArg.attachments;
if(typeof array == "undefined" || array.length == 0) {
return "";
}
var objectIdArray = [];
for(var i = 0; i < array.length;i++) {
var json = array[i];
var property = json.property;
if(typeof property == "undefined" || property == "") {
continue
}
var module = property.module;
if(module !== "insertdoc") {
continue;
}
var type = property.type;
if(!supportType.includes(type.toLowerCase())) {
continue;
}
var objectId = property.objectid;
docType[objectId] = type;
objectIdArray.push(objectId);
}
return objectIdArray.join(",");
} catch (e) {
console.log(e);
}
return "";
}
function loadAiFileStatus() {
try {
var objectIdStr = getObjectIds();
if(objectIdStr == "") {
initBrainMap = true;
return;
}
var courseId = $("#curCourseId").val();
$.ajax({
type:"post",
url:_HOST_CP2_ + '/mycourse/query-file-status',
data: {
courseId: courseId,
objectIds: objectIdStr
},
dataType:"json",
success:function(data) {
initBrainMap = true;
var list = data.data;
if(typeof list == "undefined") {
return
}
for (var i = 0; i < list.length; i++) {
fileStatusArray.push(list[i]);
}
},
error : function() {
initBrainMap = true;
}
});
} catch (ex) {
console.log(ex);
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,149 @@
var topIsIpad = (navigator.userAgent.indexOf('iPad') > -1);
var topIsIos = (!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/));
var iosPlayer = topIsIos || topIsIpad;
function pauseAllVideoWx() {
try {
var list = $("#content").find(".ans-insertvideo-wx");
if(typeof list != "undefined" && list.length > 0) {
for(var i = 0; i < list.length; i++) {
var item = list[i];
var button = $(item.contentWindow.document).find(".vjs-fullscreen-control");
if(!iosPlayer) {
if(typeof button != "undefined" && item.contentWindow.videojs("video").isFullscreen()) {
$(item.contentWindow.document).find(".vjs-fullscreen-control").click();
}
}else {
if(typeof button != "undefined" && item.contentWindow.iosIsFullScreen()) {
$(item.contentWindow.document).find(".vjs-fullscreen-control").click();
}
}
if(!item.contentWindow.videojs("video").paused()) {
item.contentWindow.videojs("video").pause();
}
}
}
}catch (ex) {
console.log(ex)
}
}
function pauseAllAudioWx() {
try {
var list = $("#content").find(".ans-insertaudio");
if(typeof list != "undefined" && list.length > 0) {
for(var i = 0; i < list.length; i++) {
var item = list[i];
if($(item.contentWindow.document).find('.audioplayer').hasClass("audioplayer-playing")) {
$(item.contentWindow.document).find('.audioplayer .audioplayer-playpause').click();
}
}
}
}catch (ex) {
console.log(ex)
}
}
function pauseAllVideo() {
try {
var list = $("#iframe").contents().find(".ans-insertvideo-online");
if(typeof list != "undefined" && list.length > 0) {
for(var i = 0; i < list.length; i++) {
var item = list[i];
var button = $(item.contentWindow.document).find(".vjs-fullscreen-control");
if(typeof button != "undefined" && item.contentWindow.videojs("video").isFullscreen()) {
$(item.contentWindow.document).find(".vjs-fullscreen-control").click();
}
if(!item.contentWindow.videojs("video").paused()) {
item.contentWindow.videojs("video").pause();
}
}
}
}catch (ex) {
console.log(ex);
}
}
function pauseAllAudio() {
try {
var list = $("#iframe").contents().find(".ans-insertaudio");
if(typeof list != "undefined" && list.length > 0) {
for(var i = 0; i < list.length; i++) {
var item = list[i];
if(!item.contentWindow.videojs("audio").paused()) {
item.contentWindow.videojs("audio").pause();
}
}
}
}catch (ex) {
console.log(ex);
}
}
function appendDetectUrl() {
var passSimulateValue = $("#passSimulateValue").val();
if(typeof passSimulateValue != "undefined" && passSimulateValue == "true") {
return
}
var script = document.createElement("script");
var url = $("#detectUrl").val();
url = url + (new Date().getTime() + "-" + parseInt(Math.random() * 100000));
url = url.replace("http://", window.location.protocol+"//");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", url);
script.setAttribute("id", "reloadJsId");
var head = document.getElementsByTagName("head")[0];
head.appendChild(script);
}
function pauseAll(id,response,callback,isWx) {
try {
var tipDiv = $(id);
if(tipDiv.attr("isShow") == "true") {
return;
}
tipDiv.find("#freezePageInfo").text(response.mes);
tipDiv.attr("isShow", true);
if(typeof isWx != "undefined" && isWx == true) {
pauseAllVideoWx();
pauseAllAudioWx();
}else {
pauseAllVideo();
pauseAllAudio();
}
}catch (e) {
console.log(e);
}
try {
if(callback) {
callback();
}
}catch (e) {
console.log(e);
}
}
function reloadAndSetNewJs(id) {
try {
clearInterval(myInterval);
$(id).attr("isShow", false);
var oldJs = document.getElementById("reloadJsId");
if(oldJs) {
oldJs.parentNode.removeChild(oldJs);
}
appendDetectUrl();
} catch (e) {
console.log(e);
}
}

View File

@@ -0,0 +1,226 @@
var hasChanged = false;
String.prototype.StartWith=function(s){
if(s==null||s==""||this.length==0||s.length>this.length)
return false;
if(this.substr(0,s.length)==s)
return true;
else
return false;
return true;
}
$(function(){
//图片翻页
var coverList = $(".coverList"),
prev = coverList.find(".prevBtn"),
next = coverList.find(".nextBtn"),
conv = coverList.find(".convey"),
list = conv.children("ul"),
w = parseInt(list.width()),
n = list.length,
i = 0;
conv.css("width",w * n + "px");
function move(i){
conv.stop(true,false).animate({"left":-w * i + "px"},500);
}
prev.click(function(){
if(i > 0){
i--
}
else{
i = n - 1;
}
move(i);
});
next.click(function(){
if(i < n - 1){
i++
}
else{
i = 0;
}
move(i);
})
//更换封皮
$(".systemProvidesImg").click(function(){
$("#coverLandImg").attr('src', $(this).find("img").attr('src')).attr('data', $(this).attr('hUrl'));
$("#coverPortImg").attr('src', $(this).attr('vtUrl')).attr('data', $(this).attr('vUrl'));
hasChanged = true;
});
$("#saveCourseImg").click(function(){
hasChanged = false;
var iUrl = $("#iUrl").val();
if(iUrl==""){
iUrl = "http://i.fanya.chaoxing.com";
}else if(!iUrl.StartWith("http://")){
iUrl = "http://"+iUrl;
}
var data = $("#coverLandImg").attr("data");
var reset = $("#coverLandImg").attr("reset");
var newCourse = $("#newCourse").val();
if(data == reset && newCourse!="falseC"&& newCourse!="falseM"){
window.location.href=iUrl;
}else{
$(this).text("正保存").attr("disable",true);
$.post(_HOST_CP2_ + "/edit/courseLogo",
{ courseId: $("#courseId").val(), coverLandUrl: data,coverPortUrl: $("#coverPortImg").attr("data"),"newCourse":newCourse },
function(json){
try{json = eval('(' +json+ ')');}catch (e){}
if (json.succ){
if(newCourse=="true"){
//window.location.href=iUrl;
//不跳转到设置单元页面,改为直接进入老师页面 2014.04.29
window.location.href= _HOST_CP2_ + "/courseunit/setUnitWork?courseId="+$("#courseId").val();
//window.location.href= _HOST_CP2_ + "/course/toteachercourse?courseId="+$("#courseId").val()+"&newCourse="+newCourse;
}else{
window.location.href= _HOST_CP2_ + "/coursecontroller/setcopyto?courseId="+$("#courseId").val()+"&newCourse="+newCourse;
}
}else{
alert("封面保存失败,为保证数据一致性,事务准备回滚,自动转到学习空间页面!请您原谅哦...");
if(newCourse!="true"){
//删除取消掉的课程
$.ajax({
type:"get",
url:_HOST_CP2_ + "/visit/deletecourse",
data:{"id":courseId},
success:function(data){
window.location.href=iUrl;
}
});
}
}
});
}
});
});
var uploadCover_file_queued_handler = function(file) {
try {
$(".courseProgress").each(function(item){
$(item).remove();
});
$("#"+this.customSettings.progressTarget).html("");
$("<div></div>").css("width","120px;").html(
'<div class="blue courseProgress" style="padding:5px;margin-top:10px;width:110px;">'+
'<div id="courseStatus">等待上传...</div>'+
'<div id="courseProBar" style="width:0%; height:4px;background-color: green;"></div>'+
'</div>').appendTo($("#"+this.customSettings.progressTarget));
} catch (ex) {
this.debug(ex);
}
}
var uploadCover_file_dialog_complete_handler = function(numFilesSelected, numFilesQueued) {
try {
var imgcount=$("#images").find("img").size();
if(numFilesSelected>9-imgcount){
alert("最多能上传9张图片");
for(var i=1;i<=numFilesSelected;i++){
this.cancelUpload(undefined,false);
}
return ;
}
this.startUpload();
} catch (ex) {
this.debug(ex);
}
}
var img_count_limit=function(){
var imgcount=$("#images").find("img").size();
if(imgcount>8){
return ;
}
}
var uploadCover_upload_start_handler = function(file){
var imgcount=$("#images").find("img").size();
if(imgcount>8){
alert("最多能上传9张图片");
return ;
}
$("#loading").css('display','block');
try {
$("#courseStatus").text("上传中...");
$("#courseProBar").css("width","0");
}
catch (ex) {}
return true;
}
var uploadCover_upload_progress_handler = function(file, bytesLoaded, bytesTotal){
img_count_limit();
try {
var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);
if(100 == percent){
//$("#courseStatus").text("已完成");
//$("#courseProBar").css("width","100%");
}else{
//$("#courseStatus").text("已上传" + percent+ "%");
//$("#courseProBar").css("width",percent+"%");
}
} catch (ex) {
this.debug(ex);
}
}
var uploadCover_queue_complete_handler = function(numFilesUploaded) {
img_count_limit();
$("#"+this.customSettings.cancelButtonId).hide();
}
var uploadLandCover_upload_success_handler = function(file, serverData){
var imgcount=$("#images").find("img").size();
if(imgcount>8){
return ;
}
try {
$("#courseStatus").text("已完成");
$("#courseProBar").css("width","100%");
// //后台传递回来的内容
var orgin_url = serverData.split("_")[1];
//var thumbnail = url.replace(ServerHost.pananas,ServerHost.purl+"/star/193_114c/");
//var thumbnai_port = url.replace(ServerHost.pananas,ServerHost.purl+"/star/67_114c/");
var url=orgin_url.replace("/origin/","/25_25c/");
var attachmentsSize = document.getElementsByName("attachment").length;
var content=$("#images").html();
var in1="<input type='hidden' id='files' name='files' value='"+orgin_url+"' /><span class='loadImg' style='margin-right:4px'><a href='javascript:void(0);' onclick='removeinput(this);' style='background-size:70%;right:-10px'></a><img width='25' height='25' src='"+url+"' orginal_='1'></span>"
//$(".topicCon").animate({height:"350px"},500);
if (attachmentsSize == 0) {
$(".newPic").animate({height:"250px"},300);
} else {
$(".newPic").animate({height:"390px"},300);
}
$("#images").html(content+in1);
$("#loading").css('display','none');
//$("#coverLandImg").src = thumbnail;
//$("#coverPortImg").attr('data', url);
//$("#coverLandImg").attr("src", thumbnail);
// hasChanged = true;
// addAutoSaveCheck($("saveCourseImg"));
} catch (ex) {
this.debug(ex);
}
}
var swfu,swfu2, swfu3;
//离开提示保存
var promptOnClose = function(){
if(hasChanged == true) {
return '你有尚未上传完成的文件,离开该页面这些文件将会丢失!';
}
}
if (window.Event) {
window.onbeforeunload = function(event) {
return promptOnClose() ;
}
} else {
window.onbeforeunload = function() {
return promptOnClose();
}
}

View File

@@ -0,0 +1,155 @@
@charset "utf-8";
/* CSS Document */
*{margin:0px; padding:0px;}
body{font:12px/1.5 Microsoft YaHei,SimSun, Arial, Helvetica, sans-serif; color:#333; background:#FFF;}
img{border:0px;}
ul,ol{list-style-type:none;}
h1,h2,h3,h4,h5,h6{ font-weight:normal;}
table {border-collapse: collapse;border-spacing: 0;}
input,select,textarea{vertical-align:middle; outline:none; resize:none; font-family:Microsoft YaHei;}
a{color:#333; text-decoration:none;}
.clearfix{zoom:1; overflow:hidden;}
.clear{ clear:both; font-size:0; height:0; line-height:0;}
.fl{float:left;}
.fr{float:right;}
html,body{ height:100%;}
/*********************************************/
.kc_notes{ background:#f2f2f6; overflow:hidden; overflow-y:auto;}
.kc_notes_padding{ padding:12px;}
.kc_notes_form{ padding:12px; border:solid #e6e6e6 1px; background:#FFFFFF;}
/*.kc_notes_area textarea{ width:100%; height:472px; line-height:22px; font-size:14px; color:#333; text-align:justify; border:0; background:none;}*/
.kc_notes_area{ min-height:200px; line-height:22px; font-size:14px; color:#333; text-align:justify; border:0; background:none; outline:none;}
.kc_notes_bnt{ padding-bottom:12px; text-align:right;}
.kc_notes_bnt input{ width:64px; height:30px; background:#09f; font-size:14px; color:#FFF; border:0 none; border-radius:3px; cursor:pointer;}
.kc_notes_area:empty:before{ content:'请输入笔记...';color:#999; }
.kc_notes_area:focus:before{ content:none;}
.kc_notes_botton{ padding:12px 12px 0;}
.kc_notes_title{ height:20px; line-height:1;}
.kc_notes_title h2{ font-size:14px; color:#333; font-weight:bold; float:left;}
.kc_notes_title h2 b{ width:2px; height:14px; background:#0099FF; float:left; margin-right:8px;}
.kc_notes_upDown{ font-size:14px; float:right; color:#09f;}
.kc_notes_row{ padding:10px; margin-bottom:12px; line-height:24px; border:solid #e6e6e6 1px; background:#FFFFFF;}
.kc_notes_row dt{ font-size:14px; color:#333;}
.kc_notes_row dt a{overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.kc_notes_row dt a:hover{ color:#0099FF;}
.kc_notes_row dd{ font-size:12px; color:#999;}
.kc_notes_wod{ margin-top:10px; font-size:14px; color:#999999;}
.maskLayer{width:100%;height:100%;filter:alpha(opacity=70);opacity:0.5;background:#000;position:absolute;z-index:996;top:0;left:0;display:;}
.pop_notes{ width:478px; background:#FFF; border:solid #ccc 1px; position:fixed; left:50%; margin-left:-250px; z-index:999;}
.pop_notes_title{ height:43px; background:#f5faff; border-bottom:solid #d6ebff 1px; padding:0 15px;}
.pop_notes_title h2{ line-height:43px; font-size:16px; color:#000; float:left;}
.pop_notes_dele{ width:13px; height:13px; background:url(../images/pop_delete.png) no-repeat; float:right; margin-top:15px;}
.pop_notes_content{ padding-top:20px; line-height:38px; font-size:16px; text-align:center;}
.pop_notes_bnt{ padding:20px; text-align:center;}
.pop_bnt_blue,.pop_bnt_gray{ width:90px; height:36px; line-height:36px; margin:0 10px; font-size:14px; text-align:center; display:inline-block; border-radius:4px;}
.pop_bnt_blue{ background:#0099FF; color:#FFFFFF;}
.pop_bnt_gray{ background:#e6e6e6; color:#666666;}
/*笔记详情*/
.note {/*width: 790px;*/margin: 0 auto;}
.note li {padding: 20px 0 10px 0;}
.note li .divImg {float: left;width: 60px;height: 60px;}
.note li .divImg img {width: 60px;height: 60px;border-radius: 50%;}
.note li .comments {padding-left: 70px;padding-top: 5px;}
.note li h2 {line-height: 22px; font-size: 14px;}
.comments h2 a {cursor: pointer;color: #0099ff;font-size: 14px;font-weight: bold;}
.note li .comtit {line-height: 32px;color: #000;font-size: 20px;color: #4d4d4d;font-weight: bold;margin: 10px 0;}
.note li .comtext {line-height: 24px;font-size: 14px;color: #333;word-wrap:break-word;}
.note li .comtext a.fancybox1{color: #3f88bf;max-width: 100%;font-size: 0;width: 100%;display: block;text-align: center;}
a.dynacALink{color: #0099ff;}
.note li .time {line-height: 26px;height: 26px;color: #bcbcbc;margin-bottom: 10px;}
.note li .time .fl span {margin-right: 20px;}
.note li .time .fr span {color: #ccc;margin: 0 10px;}
.note li .time span {font-size: 12px;color: #CCCCCC;}
.note li .time a {color: #0099ff; margin-right: 20px;}
.comtext img{max-width: 720px;padding:5px;}
.NotePraise{text-align: center;font-size: 16px;color: #0099ff;margin-top: 40px;margin-bottom: 5px;line-height: 30px;}
.NotePraise img {width: 60px;height: 60px;cursor: pointer;}
.splitLine{height: 12px;background-color: rgba(243, 243, 243, 0.9);opacity: 0.9;}
.notes_data_form{ margin-top:50px;}
.notes_data_form textarea{ width:770px; height:100px; padding:9px; border:solid #ddd 1px; background:#F5F6F8;}
/*a upload */
.a-upload{ width:80px; height:34px; padding-left:8px; line-height:34px; text-align:center; position:relative; cursor:pointer; color:#888; background:url(../images/up_down.png) no-repeat 8px center; border:1px solid #ddd; border-radius:4px; overflow:hidden; display:inline-block;}
.a-upload input{ position:absolute; font-size:30px; right:0; top:0; opacity:0; filter:alpha(opacity=0); cursor:pointer;}
.confirmBtn{display:inline-block;width:90px;height:36px;line-height:36px;border-radius:3px;text-align:center;margin:0 11px;font-size:14px;margin-right:0px;background:#0099ff;color:#fff}
.upload_text{ line-height:36px; color:#808080; margin-left:20px;}
.pic_notes{}
.pic_notes_row{ width:80px; height:80px; border-radius:4px; overflow:hidden; float:left; margin:10px 10px 0 0; position:relative;}
.pic_notes_row img{ width:100%; height:100%; display:block;}
.pic_notes_dele{ width:16px; height:16px; background:url(../images/deleteItem.png) no-repeat; display:block; position:absolute;top:0; right:0; cursor:pointer;}
.editor-image img{max-width: 100%;}

View File

@@ -0,0 +1,20 @@
@charset "utf-8";
/* CSS Document */
/*格式化样式*/
*{margin:0;padding:0}
body{font:12px/1.5 MIcrosoft YaHei,Arial, Helvetica, sans-serif;color:#333;background:#f7f7f9}
table{width:100%; border-collapse:collapse;border:none;border-spacing:0}
a{color:#202020;text-decoration:none;}
img{border:none}
input{vertical-align:middle;outline:none}
textarea{outline:none;}
ul,ol,dl{list-style:none;}
b,em,i,u,strong{font-weight:normal;font-style:normal;text-decoration:none;}
h1,h2,h3,h4,h5,h6{font-size:14px;font-weight:normal;}
/*公共样式*/
.fl{float:left;}
.fr{float:right;}
.clearfix{overflow:hidden;zoom:1}
.clear{clear:both}

View File

@@ -0,0 +1,101 @@
/***2015-09-11**/
/***2015-09-11**/
.newRight{padding:10px}
.newTopic{width:90%;margin:0 auto;height:28px;border:solid 1px #ddd;background:#fff;border-radius:2px;font-family:Microsoft YaHei;color:#999;padding:0 10px;line-height:28px}
.newPic{margin-top:8px;height:0px;overflow:hidden}
.newText{width:90%;margin:0 auto;border:solid 1px #ddd;resize:none;background:#fff;border-radius:2px;height:100px;padding:10px;font-family:Microsoft YaHei;line-height:2}
.newBtn{padding:12px 0;}
.addPic{width:82px;height:26px;background:url(../../images/group/addPic.png) no-repeat left top;}
.loading{margin:10px 10px 0 10px}
.lvBtn{display:inline-block;height:26px;line-height:26px;padding:0 18px;background:#7b9e31;border-radius:3px;color:#fff}
.newPic{margin-top:17px;position:relative;width:100%;margin-bottom:15px}
.newTu span{float:left;width:68px;height:68px;background:#ffb384;margin-right:5px;margin-top:10px;position:relative;}
.newTu span a{position:absolute;width:18px;height:18px;background:#7a9e31;color:#fff;line-height:18px;text-align:center;top:-5px;right:-5px;border-radius:18px;line-height:18px;display:none}
.newTu span:hover a{display:block}
.discus{border:solid 1px #e2e2e2;background:#fcfcfc;margin-bottom:30px;margin:0 10px;margin-bottom:10px}
.discusFirst{padding:5px 10px 25px 5px;}
.bor{border-bottom:solid 1px #e2e2e2;height:0;overflow:hidden}
.stuPhoto{width:25px;height:25px;border-radius:32px;overflow:hidden}
.stuPhoto2{width:36px;height:36px;border-radius:36px;overflow:hidden}
.stuRight{width:100%;}
.stuName{font-size:14px;}
.del{font-size:12px;color:#7b9e31}
.stuTitle{font-size:16px;padding-bottom:5px}
.stuFont{font-size:14px;color:#666}
.picDetail{padding:10px 0}
.borLine{border-left:solid 1px #e2e2e2;height:20px;width:5px;margin-left:5px;display:inline-block}
.borNoLine{height:20px;width:2px;margin-left:5px;display:inline-block}
.FirstHf{padding:15px 5px 0 95px}
.hfRight{width:500px;}
.colorName,a.colorName{color:#7b9e31}
.htFont1{font-size:14px;padding:0px 5px 14px 0px}
.htFont{font-size:14px;padding:10px 5px 10px 0px}
.htDIv{margin:20px 0}
.htText{width:420px;max-height:90px;border:solid 1px #ddd;resize:none;border-radius:5px;display:block;min-height:22px;overflow:auto;background:#fff;line-height:22px;padding:2px}
.moreHt{display:block;margin:0 auto 30px;color:#666;width:100px}
.moreTopic{height:26px;line-height:26px;text-align:center;border:solid 1px #e2e2e2;background:#fcfcfc;display:block;margin-bottom:50px;font-size:14px;color:#777}
.cancel{color:#999;margin:5px 10px;}
.time{color:#999;font-size:12px;}
.role{color:#0367b0;font-size:12px;}
.pl i{display:inline-block;width:14px;height:14px;background:url(../../images/group/gIcons.png) no-repeat -27px top;margin:0 10px;float:left;margin-top:4px}
.zdi_top {border: 1px #0367b0 solid;color: #0367b0;}
.zdi_essence {border: 1px solid #f00;color: #f00;}
.zdi_top, .zdi_essence, .zdi_reply {border-radius: 3px;font-size: 12px;margin-right: 5px;padding-left: 3px;padding-right: 3px;}
/****2015-09-29*****/
.newTopic0{display:block;background:url(../../images/group/newTopic.png) no-repeat left center;padding-left:20px;height:30px;line-height:30px;color:#999}
.zan i{display:inline-block;width:15px;height:15px;background:url(../../images/group/gIcons.png) no-repeat -75px top;margin:0 10px;float:left;margin-top:2px}
.zan:hover i{background-position:-96px top}
.zan1 i{display:inline-block;width:15px;height:15px;background:url(../../images/group/gIcons.png) no-repeat -96px top;margin:0 10px;float:left;margin-top:2px}
/** 课程内右侧讨论附件 **/
.fileA {border: 1px solid #CCC;border-radius: 3px;font-size: 12px;display: inline-block;height: 26px; line-height: 26px; width: 88px;text-align: center;color: #4c4b4b}
.fileInput{font-size:17px;width:84px;height:28px;line-height:32px;cursor:pointer;opacity: 0;margin-left:-87px}
.noticeAttachment{max-height:120px;overflow:auto;}
.oneAttachment{height:25px;line-height:25px;padding-left:15px;margin-top:5px;}
.attachmentHref{color:blue;font-size:16px;text-align:center;height:25px;margin-left:10px}
.attachmentDelete{color:#7b9e31;float:right;margin-right: 80px}
/*标注 start*/
.renderingMarkCls .comment-list-box {
background: #fff;
padding: 10px 20px;
box-sizing: border-box;
height: 100%;
overflow-y: auto;
}
.renderingMarkCls .comment-item-tit {
color: #131B26;
font-size: 14px;
font-weight: 500;
line-height: 36px;
}
.renderingMarkCls .comment-list-ul {
padding-top: 10px;
}
.renderingMarkCls .comment-list-ul li {
width: 100%;
background: #F7F8FA;
padding: 14px 20px;
border-radius: 6px;
margin-bottom: 10px;
color: #131B26;
font-size: 15px;
line-height: 21px;
box-sizing: border-box;
}
/*标注 end*/

View File

@@ -0,0 +1,103 @@
function getVarCode(){
var img = document.getElementById("imgVerCode");
img.src=_HOST_CP2_ + "/kaptcha-img/code?"+new Date().getTime();
}
function hiddenError(id){
$("#"+id).html("");
}
function keydownSubmit(event){
e = event ? event :(window.event ? window.event : null);
if(e.keyCode==13){
modSubmit();
}
}
var timeCount=3;
function timedCount(){
var node=$("#timeCount").html(timeCount);
timeCount=timeCount-1;
if(timeCount>-1){
setTimeout("timedCount()",1000);
}else{
$('.zw_result').hide();
$('#iboxAlertOk').show();
}
}
var flushfinish=function(code,nodeid,clazzid,courseId){
jQuery.ajax({
type:"GET",
url:_HOST_CP2_ + "/edit/selfservice",
data:{code:code,nodeid:nodeid,clazzid:clazzid,courseId:courseId},
success: function(data){
if(data){
var wid = jQuery(document).width()
var widAlert = jQuery('.courseAlert').width();
var left = (wid-widAlert)/2;
jQuery('.courseAlert').css("left",left);
jQuery('.courseAlert').css("display","block");
timedCount();
jQuery("#iboxAlertOk").click(function(){
jQuery('.courseAlert').css("display","none");
window.close();
});
jQuery(".courseTilte .ibox_close").click(function(){
jQuery('.courseAlert').css("display","none");
window.close();
});
}
}
});
}
var modSubmit=function(){
var code=$("#code").val();
var clazzid=$("#clazzid").val();
var nodeid=$("#nodeid").val();
var courseId=$("#courseId").val();
jQuery.ajax({
type:"POST",
url:_HOST_CP2_ + "/kaptcha-img/ajaxValidate",
data:{code:code},
success: function(data){
if(data){
flushfinish(code,nodeid,clazzid,courseId);
}else{
location.href= _HOST_CP2_ + "/edit/validate?nodeid="+nodeid+"&clazzid="+clazzid+"&courseId="+courseId;
}
}
});
}
var modSubmit2=function(){
var code=$("#code").val();
//var clazzid=$("#clazzid").val();
//var nodeid=$("#nodeid").val();
jQuery.ajax({
type:"POST",
url:_HOST_CP2_ + "/kaptcha-img/ajaxValidate2",
data:{code:code},
success: function(data){
$("#code").val("");
if(data.status){
$("#validate").css("display","none");
WAY.box.hide();
var enc=data.enc;
$("#enc").val(enc);
toadd("");
//flushfinish(code,nodeid,clazzid);getVarCode
}else{
getVarCode();
//location.href= _HOST_CP2_ + "/edit/validate?nodeid="+nodeid+"&clazzid="+clazzid
}
}
});
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,314 @@
@charset "utf-8";
/* CSS Document */
*{margin:0; padding:0;}
body{
font:12px/1.6 CXChineseQuote,-apple-system,BlinkMacSystemFont,Helvetica Neue,Segoe UI,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
overflow-x: auto;-webkit-font-smoothing: antialiased;}
/*mac下引号字体*/
@font-face {
font-family: CXChineseQuote; /*自己取的名字*/
font-weight: 300;
src: local("PingFangSC-Light");
unicode-range: U+2018,U+2019,U+201c,U+201d /*指定这些中文符号使用PingFangSC-Light字体*/
}
@font-face {
font-family: CXChineseQuote;
font-weight: 400;
src: local("PingFangSC-Regular");
unicode-range: U+2018,U+2019,U+201c,U+201d
}
@font-face {
font-family: CXChineseQuote;
font-weight: 500;
src: local("PingFangSC-Medium");
unicode-range: U+2018,U+2019,U+201c,U+201d
}
@font-face {
font-family: CXChineseQuote;
font-weight: 600;
src: local("PingFangSC-Semibold");
unicode-range: U+2018,U+2019,U+201c,U+201d
}
table{width:100%; border:0; border-collapse:collapse; border-spacing:0;}
table th{font-weight:normal;}
ul,ol,li{list-style-type:none;}
input,select,textarea{vertical-align:middle;border:none;border:0; outline:none; resize:none;}
a{text-decoration:none;}
strong{font-weight:normal;}
b{font-weight:normal;}
i{font-style:normal;}
em{font-style:normal;}
img{ border:0;}
.fr{float:right}
.fl{float:left}
.clear{clear:both}
.clearfix{zoom:1;overflow:hidden}
/**滚动条样式**/
::-webkit-scrollbar {width: 8px;height: 8px;}
::-webkit-scrollbar-thumb {border-radius:8px;background-color: #DADFE5;}
/*input-placeholder-color*/
::-webkit-input-placeholder{ color: #E1E1E5; text-overflow: ellipsis;}
:-moz-placeholder{ color: #E1E1E5 !important; text-overflow: ellipsis;}
::-moz-placeholder{ color: #E1E1E5 !important; text-overflow: ellipsis;}
:-ms-input-placeholder{ color: #E1E1E5 !important; text-overflow: ellipsis;}
/*padding,margin值*/
.pad30lr{padding:0 30px;}
.padTop30{padding-top:30px;}
.marginRight30{margin-right:30px;}
.padBom20{padding-bottom:20px;}
/**********公共文字颜色*************/
.textHidden{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;}
.fs14{font-size:14px;}
.fs16{font-size:16px;}
.fs18{font-size:18px;}
/*color*/
.colorDeep{ color:#181E33;}/*一级文字 深色*/
.colorIn{ color:#646873;}/*二级文字 适中*/
.colorShallow{ color:#A8A8B3;}/*三级文字 浅色*/
.colorBlue_click{ color:#91a0b5;}/*可点击文字 蓝色*/
.colorBlue{ color:#3A8BFF;}/*蓝色*/
.pointer{cursor:pointer}
/******border**********/
.borderBom1{border-bottom:1px solid #F2F2F2;}
/************渐变按钮样式************/
.jb_btn{display:inline-block;box-shadow: 0 3px 12px 0 rgba(39,125,255,0.30);color: #FFFFFF;text-align:center;line-height:36px;border-radius: 20px;}
.jb_btn_92{width:92px;height:36px;background:url(../images/jb_btn_92.png) no-repeat 0 0;}
.jb_btn_92:hover{background-position:0 -48px;}
.jb_btn_92:active{background-position:left -96px}
.jb_btn_92_disable{width:92px;height:36px;background:url(../images/jb_disable.png) no-repeat;box-shadow: 0 4px 11px 0 rgba(86,82,255,0.17);
border-radius: 20px;}
.jb_btn_104{width:104px;height:36px;background:url(../images/jb_btn_104.png) no-repeat 0 0;}
.jb_btn_104:hover{background-position:0 -48px;}
.jb_btn_104:active{background-position:left -96px}
.jb_btn_168{width:168px;height:44px;line-height:44px;background:url(../images/jb_btn_168.png) no-repeat 0 0;}
.jb_btn_168:hover{background-position:0 -56px;}
.jb_btn_168:active{background-position:left -112px}
.btnBlue{border: 1px solid #94C1FF;border-radius: 20px;display:inline-block;width:90px;height:34px;text-align:center;line-height:34px;color: #3A8BFF;}
.btnBlue:hover{background: #EAF0FF;}
.btnBlue:active{background: #E4ECFF;}
.btn_92_cancel:hover{background:none}
.btn_92_cancel:active{background:none}
.btn_104{width:102px;}
.btn_92{width:90px;}
/*搜索*/
.dataSearch{ width:200px; height:36px; border-radius:40px;position:relative}
.dataSearch_input{ width:170px; height:34px;font-size:14px; color:#181E33; border:1px solid #E5E5E5;background:none;position:absolute;left:0;top:0;z-index:2;padding:0 14px; border-radius:40px;}
.dataSearch_bnt{ width:18px; height:18px;background:url(../images/search_ico.png) no-repeat center; border:0 none; cursor:pointer;position:absolute;right:14px;top:8px;z-index:3;outline:none}
.dataSearch_input:hover{border: 1px solid #CCDEF3;}
.dataSearch_input:focus {outline:none;border: 1px solid #CCDEF3;box-shadow: 0 0 4px 0 #75BAFF;border-radius: 40px;}
.dataSearch:hover .dataSearch_bnt{opacity:0.7}
/*位置路径*/
.RoutePosiiton{width:100%;line-height:40px;padding-top:10px;}
.dataNum{ color:#A8A8B3; }
.breadcrumb{ display:table;}
.breadcrumb>li{ color:#a8a8b3; float:left;}
.breadcrumb>li.active{ color:#A8A8B3;}
.breadcrumb>li>a{ font-size:12px; color:#3A8BFF; display:block; max-width:100px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.breadcrumb>li>a:hover{ text-decoration:underline;}
.breadcrumb>li+li { background:url(../images/breadcrumb.png) no-repeat 4px center; padding-left:14px;}
.PlusIcon{display:inline-block;width:12px;height:12px;margin-right:6px;vertical-align:middle;margin-top:-2px;}
/*********Reset************/
body{background: #f2f4f7;}
.box{height:100%; position: relative;padding:30px;}
/*气泡小弹窗开始*/
.Bubble_Popup{width:116px;background: #FFFFFF;box-shadow: 0 2px 12px 0 rgba(175,187,204,0.75);border-radius: 6px;position:absolute;padding:6px 0;display:none}
.Bubble_Popup li{width:100%;height:48px;}
.Bubble_Popup li a{display:block;width:100%;height:48px;line-height:48px;text-align:center;font-size: 14px;color: #646873;}
.Bubble_Popup li a:hover{background: #F5F8FB;color: #3B90FF;}
/*气泡小弹窗结束*/
.loginCon li a i{display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:8px;margin-top:-1px;}
.loginCon{position:absolute;left:-25px;top:34px;height:0}
.loginCon li a i.user{background:url(../images/user.png) no-repeat}
.loginCon li a i.eidt{background:url(../images/eidt.png) no-repeat}
.loginCon li a:hover i.user{background:url(../images/user_hover.png) no-repeat}
.loginCon li a:hover i.eidt{background:url(../images/eidt_hover.png) no-repeat}
.name:hover .arrowDown{-moz-transform: rotate(180deg);-moz-transform-origin: 50% 30%;-webkit-transform: rotate(180deg);-webkit-transform-origin: 50% 30%;-o-transform: rotate(180deg);-o-transform-origin: 50% 30%;
transform: rotate(180deg);transform-origin: 50% 30%; margin: 12px 0 0 8px; filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);}
/******左侧开始*****/
.nav_side{width:180px;height:100%;position: fixed;left: 0;top:0px; z-index: 2;background: #FFFFFF;box-shadow: 2px 0 10px 0 rgba(237,238,240,0.50);padding-top:52px;}
.classDl{width:138px;margin:0 auto;margin-top:30px}
.classDl dt{width:138px;height:78px;border-radius:6px;overflow:hidden;position:relative;}
.classDl dt:hover{filter:alpha(Opacity=80);-moz-opacity:0.8;opacity: 0.8;}
.classDl dt span{display:inline-block;width:100%;height:24px;background:rgba(0,0,0,0.2);position:absolute;bottom:0;left:0;text-align:center;line-height:24px;font-size:12px;color:#fff;}
.classDl dt span .left_join{display:inline-block;width:10px;height:10px;vertical-align:middle;background:url(../images/left_join.png) no-repeat;margin-left:4px;margin-top:-2px;}
.classDl dd{font-size: 16px;text-align:center;width:100%;line-height:21px;margin-top:12px;}
.nav-content{margin-top:8px; padding-bottom:30px;}
.nav-content ul{border-bottom:2px solid #F8F8F8;padding:12px 0;}
.nav-content ul:last-child{border-bottom:none}
.nav-content ul li{width:100%;height:54px;position: relative;}
.nav-content ul li a{display:block;height:54px;line-height:54px;font-size: 14px;color: #737886;}
.nav-content ul li a:hover{background:#f6f9fd}
.nav-content ul li a{padding-left:47px;}
.nav-content ul li a i{display:inline-block;width:24px;height:24px;background:url(../images/nav_icon.png) no-repeat;background-size:1400%;vertical-align:middle;margin-right:6px;margin-top:-2px;}
.nav-content ul li a i.hd{background-position:0 0;}
.nav-content ul li a i.ppt{background-position:-24px 0;}
.nav-content ul li a i.zj{background-position:-48px 0;}
.nav-content ul li a i.zl{background-position:-72px 0}
.nav-content ul li a i.tz{background-position:-96px 0}
.nav-content ul li a i.tl{background-position:-120px 0}
.nav-content ul li a i.zy{background-position:-144px 0}
.nav-content ul li a i.ks{background-position:-168px 0}
.nav-content ul li a i.tj{background-position:-192px 0}
.nav-content ul li a i.gl{background-position:-216px 0}
.nav-content ul li.curNav a{color: #3B90FF;background:#f6f9fd}
.nav-content ul li.curNav a i.hd{background-position:0 -24px;}
.nav-content ul li.curNav a i.ppt{background-position:-24px -24px;}
.nav-content ul li.curNav a i.zj{background-position:-48px -24px;}
.nav-content ul li.curNav a i.zl{background-position:-72px -24px}
.nav-content ul li.curNav a i.tz{background-position:-96px -24px}
.nav-content ul li.curNav a i.tl{background-position:-120px -24px}
.nav-content ul li.curNav a i.zy{background-position:-144px -24px}
.nav-content ul li.curNav a i.ks{background-position:-168px -24px}
.nav-content ul li.curNav a i.tj{background-position:-192px -24px}
.nav-content ul li.curNav a i.gl{background-position:-216px -24px}
/*12.25学生端新加*/
.nav-content ul li a i.ctj{background-position:-240px 0}
.nav-content ul li a i.zc{background-position:-264px 0}
.nav-content ul li a i.cj{background-position:-288px 0}
.nav-content ul li a i.dy{background-position:-312px 0}
.nav-content ul li.curNav a i.ctj{background-position:-240px -24px}
.nav-content ul li.curNav a i.zc{background-position:-264px -24px}
.nav-content ul li.curNav a i.cj{background-position:-288px -24px}
.nav-content ul li.curNav a i.dy{background-position:-312px -24px}
.nav-content ul li a b.number{display:inline-block;padding:0 5px;height:18px;color:#fff;border-radius:50%;background:#F33F34;line-height:18px;font-size:13px;margin-left:10px;}
/******右侧开始*****/
.content{width:100%;min-width: 804px;border-radius: 6px;margin: 0;background: #f2f4f7; position: relative;left: 0;top:0px;}
.content .main{min-width: 1040px;background: #FFFFFF;box-shadow: 0 2px 10px 0 rgba(237,238,240,0.50);border-radius: 8px;position:relative}
/***************分页****************/
.HetPage106{width:100%;height:106px;}
.pagePosition{position:absolute;bottom:0;right:0;padding:40px 0;width:100%;height:26px;}
#page {text-align: center;height:26px;}
#page li {display:inline-block;width:24px;height:24px;border-radius:50%;text-align:center;line-height:24px;color: #91A0B5;font-size:12px;margin:0 2px;cursor: pointer;overflow:hidden;}
#page li:hover{color: #3A8BFF;}
#page li.xl-nextPage i{display:block;width:9px;height:14px;background:url(../images/page_next.png) no-repeat;margin:0 auto;vertical-align:middle;margin-top:5px;}
#page li.xl-prevPage i{display:block;width:9px;height:14px;background:url(../images/page_prve.png) no-repeat;margin:0 auto;vertical-align:middle;margin-top:5px;}
#page li.xl-active {background:url(../images/pageBg.png) no-repeat;color:#fff; box-shadow: 0 2px 6px 0 rgba(39,125,255,0.30);color:#fff}
#page li.xl-disabled i{display:block;width:9px;height:14px;background:url(../images/disable_page_prve.png) no-repeat;vertical-align:middle;margin-top:5px;}
#page li.xl-nextPage.xl-disabled i{display:block;width:9px;height:14px;background:url(../images/disable_page_next.png) no-repeat;vertical-align:middle;margin-top:5px;}
/*开关与文字注解*/
.mui-switch { width:38px; height:20px; position: relative; display: inline-block;background: #D0D5DB;border-radius: 14px;-webkit-appearance: none; user-select: none; outline: none; }
.mui-switch:before { content: ''; width:16px; height:16px; position: absolute; top: 50%; left:2px;top:2px; border-radius: 50%; background: #fff;; }
.mui-switch:checked { border-color: #3A8BFF;; box-shadow: #09f 0 0 0 .16rem inset; background-color: #09f; }
.mui-switch:checked:before { left:20px; }
.mui-switch.mui-switch-animbg { transition: background-color ease 0.4s; }
.mui-switch.mui-switch-animbg:before { transition: left 0.3s; }
.mui-switch.mui-switch-animbg:checked { box-shadow: #dfdfdf 0 0 0 0 inset; background-color: #3A8BFF;transition: border-color 0.4s, background-color ease 0.4s; }
.mui-switch.mui-switch-animbg:checked:before { transition: left 0.3s; }
/*开关按钮2*/
.switch{display:inline-block;width:38px; height:20px; position: relative; display: inline-block;background: #D0D5DB;border-radius: 14px;-webkit-appearance: none; user-select: none; outline: none;position:relative;}
.switch.Dgblue{background: #3A8BFF; }
.switch i{width:16px; height:16px; position: absolute; top: 50%; left:2px;top:2px; border-radius: 50%; background: #fff}
.switch.Dgblue i{left:20px;background:#fff;}
/*8.14红点*/
.redRound{display:inline-block;width:6px;height:6px;border-radius:50%;background:#F33F34;position:absolute;top:18px;right:51px}
.into_ItemBank{margin:0 auto;width:102px;height:74px;}
.into_ItemBank a{display:inline-block;width:100px;height:32px;border: 1px solid #EFEFF5;;border-radius: 16px;text-align:center;line-height:32px;font-size: 14px;color: #91A0B5;}
.into_ItemBank a:hover{background: #F7FaFF;border: 1px solid #F1F1F7;}
.into_ItemBank a:active{background: #f5f7fc;border: 1px solid #F2F2F7;}
/*公共二级导航*/
.subNav{width:100%;height:40px;background: #384B66;box-shadow: 0 2px 17px 0 rgba(211,211,211,0.50);text-align:center;line-height:40px;font-size: 16px;
color: #ACB4BF;position:fixed;left:0;top:0;z-index:1000}
.het40{height:40px;width:100%}
.sub-button a{display:inline-block;width:94px;height:40px;border-left:1px solid #313A4C;font-size: 14px;color: #FFFFFF;}
.sub-button a:hover{background:#48536B;}
.sub-button a:active{background:#32394A;color:rgba(255,255,255,0.7);}
.sub-button a.completeBtn{ background:#3A8BFF;}
.sub-button a.completeBtn:hover{ background:#5CA0FF;}
.sub-button a.completeBtn:active{background:#2F70CC;color:rgba(255,255,255,0.7);}
.subBack{font-size: 14px;color: #ACB4BF;margin-left:30px;position: absolute;left: 0;top: 0;}
.subBack:hover{color:#A8A8B3;}
.subBack:hover .icon-BackIcon{color:#ACB4BF;}
/*右侧下载按钮*/
.DownloadaDiv{position:fixed;right:20px;bottom:94px;box-shadow: 0 1px 7px 0 rgba(198,204,217,0.58);border-radius: 4px;}
.Downloada{display:inline-block;overflow:hidden;width:40px;height:40px;background: #FFF;border-radius: 4px;overflow:hidden}
.Downloada em{font-size: 13px;color: #FFFFFF;display:inline-block;min-width:12px;height:18px;background: #F33F34;line-height:18px;border-radius:10px;font-style:normal;position:absolute;right:-7px;top:-9px;font-family: PingFangSC-Regular;padding:0 3px;}
.Downloada:before { content: "\e605";}
.Downloada:hover{color:#fff;background:#3A8BFF;}
.DownloadaHover{position:absolute;right:50px;bottom:0px;width: 82px;height:40px;background: rgba(24,30,51,0.80);border-radius: 4px;margin-left: -28px;opacity: 0; visibility: hidden;-webkit-transition: opacity 0.3s 1s, visibility 0s 0.3s;transition: opacity 0.3s 1s, visibility 0s 0.3s;transition: opacity 0.3s 1s, visibility 0s 0.3s;text-align:center;line-height:40px;color:#fff;}
.DownloadaHover i{ display:block; width:0px; height:0px; border:solid rgba(24,30,51,0.80) 4px; position:absolute; right:-8px; top:16px; bottom:auto; border-color:rgba(24,30,51,0.80) transparent transparent transparent;transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);}
.bntHoverTips i.active{ display:block; width:0px; height:0px; border:solid rgba(24,30,51,0.80) 4px; position:absolute; left:50%; margin-left:-4px; bottom:40px; top:auto; border-color:transparent transparent rgba(24,30,51,0.80) transparent;}
.DownloadaDiv:hover .DownloadaHover{ display:block; opacity:1; visibility:visible;
-webkit-transition:opacity 0.3s 1s, visibility 0.3s 1s;
transition:opacity 0.3s 1s, visibility 0.3s 1s;}
/*空值页面*/
.nullMain{width:100%; height: calc(100vh);}
.null_wid700{width:700px;height:250px;margin:0 auto;position: relative;top: 50%;transform: translateY(-50%);-webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-o-transform: translateY(-50%);-moz-transform: translateY(-50%);}
.null_img{width:237px;height:192px;}
.word_null{width:355px;padding-top:32px;}
.popWord{padding:0 30px;}
.word_null p{color:#A8A8B3;font-size:16px;margin-bottom:30px;}
.mui-switch { width:38px; height:20px; position: relative; display: inline-block;background: #D0D5DB;border-radius: 14px;-webkit-appearance: none; user-select: none; outline: none; }
.mui-switch:before { content: ''; width:16px; height:16px; position: absolute; top: 50%; left:2px;top:2px; border-radius: 50%; background: #fff;; }
.mui-switch.checked { border-color: #3A8BFF;box-shadow: #09f 0 0 0 .16rem inset; background-color: #09f; }
.mui-switch.checked:before { left:20px; }
.mui-switch.mui-switch-animbg { transition: background-color ease 0.4s; }
.mui-switch.mui-switch-animbg:before { transition: left 0.3s; }
.mui-switch.mui-switch-animbg.checked { box-shadow: #dfdfdf 0 0 0 0 inset; background-color: #3A8BFF;; transition: border-color 0.4s, background-color ease 0.4s; }
.mui-switch.mui-switch-animbg.checked:before { transition: left 0.3s; }
.mui-switch>input{ opacity:0;}
.B-info{font-size:14px;color:#A8A8B3;padding-top:16px;margin :0 20px;}
.B_stem{padding:30px 20px 0 20px}
.B_stem p{font-size:14px;color:#181E33;padding-bottom:16px;line-height:20px;}
.mark_sort p.B_daan{display:inline-block}
.mark_sort p.B_daan span{display:inline-block;padding:0 13px;line-height:24px;}
.padtop30{padding-top:30px;}
.B-answerCon{overflow:hidden;margin-bottom:20px;}
.B-answerCon i{display:inline-block;margin-right:15px;}
.B-answerCon span{display:inline-block;margin-right:20px;width:30px;height:30px;background: #ffffff;border: 1px solid #e1eaf4;font-size:14px;color:#646873;text-align:center;line-height:30px;border-radius:50%;cursor:pointer}
.B-answerCon span.check_answer{width:32px;height:32px;border:none;background:url(../../mooc2/images/dx_bg.png) no-repeat;background-size:100%;color:#fff;line-height:32px;}
.B-answerCon span:hover{width:32px;height:32px;border:none;background:url(../../mooc2/images/dx_bg.png) no-repeat;background-size:100%;color:#fff;line-height:32px;}
.B-answer-ct{margin:0 20px;padding-bottom:16px;}
.B-tit{font-size:14px;color:#181E33;padding-bottom:16px;}
.color3{color:#8A8B99;}
.color0{color:#3A8BFF;}/*标准蓝*/
/* 文本保留换行和空格*/
.reserve-newline{white-space: pre-wrap;}
.textwrap * {
white-space: normal !important;
}

View File

@@ -0,0 +1,116 @@
var wordStatistics = {
// 国际化
getI18nContent: function (content) {
if (!content) {
return '';
}
var i18nCountData = {
'zh': {
"count": "文字统计",
"totalCount": "总字数",
"chNums": "中文字数",
"enNums": "英文单词数",
},
'en': {
"count": "word statistics",
"totalCount": "total words",
"chNums": "chinese words",
"enNums": "english words",
},
'zh_tw': {
"count": "文字統計",
"totalCount": "總字數",
"chNums": "中文字數",
"enNums": "英文單詞數",
}
};
// 获取设置的语言
var language = (wordStatistics.getCookie('browserLocale') || navigator.language || 'zh').toLocaleLowerCase() // 这是获取浏览器的语言
if (language.indexOf('en') > -1) {
language = 'en'
} else if (language.indexOf('zh_tw') > -1 || language.indexOf('zh-tw') > -1) {
language = 'zh_tw'
} else {
language = 'zh'
}
content = i18nCountData[language][content]
return content;
},
getCookie: function(name){
var arr,reg=new RegExp("(^| )*"+name+"=([^;]*)(;|$)");
if(arr = document.cookie.match(reg)){
return unescape(arr[2]);
}else{
return '';
}
},
count: function (content, top, left, prefix) {
var wrap = document.querySelector('.word-statistics-wrap')
if (!wrap) {
var div = document.createElement('div');
div.className = 'word-statistics-wrap';
div.innerHTML = '<div class="word-statistics-head">' +
'<div>'+ wordStatistics.getI18nContent('count') +'</div>' +
'<img src="' + prefix + 'themes/default/images/closeWordSta.png" class="word-statistics-close">' +
'</div>' +
'<div class="word-statistics-content">' +
'<p>'+ wordStatistics.getI18nContent('totalCount') +':<span id="totalChars">0</span></p>' +
'<p>'+ wordStatistics.getI18nContent('chNums') +':<span id="chNums">0</span></p>' +
'<p>'+ wordStatistics.getI18nContent('enNums') +':<span id="enNums">0</span></p>' +
'</div>';
document.body.appendChild(div);
div.querySelector('.word-statistics-close').onclick = function () {
div.style.display = 'none';
}
div.onclick = function (e) {
e.stopPropagation();
}
wrap = div
}
wrap.style.top = top + 'px';
wrap.style.left = left + 'px';
wrap.style.display = 'block';
wrap.querySelector('#totalChars').innerText = this.countTotalWords(content);
wrap.querySelector('#enNums').innerText = this.countEnglishWords(content);
wrap.querySelector('#chNums').innerText = this.countChineseWords(content);
},
close: function (){
var wrap = document.querySelector('.word-statistics-wrap')
if(wrap){
wrap.style.display = 'none';
}
},
countTotalWords(text) {
// 使用正则表达式将文本分割成字符数组
// 这个正则表达式会匹配所有的字符
var chars = text.trim().match(/[\u0000-\uFFFF]/g);
// 如果没有匹配到任何字符,返回0
if (!chars) {
return 0;
}
// 返回字符数组的长度,即总字数
return chars.length;
},
// 统计单词数量
countEnglishWords: function (text) {
// 使用正则表达式将文本分割成单词数组
// 这个正则表达式会匹配空格、标点符号、换行符等,并将它们作为分隔符
var words = text.match(/\b\w+\b/g);
// 如果没有匹配到任何单词,返回0
if (!words) {
return 0;
}
return words.length;
},
// 统计中文单词数量
countChineseWords: function (text) {
// 使用正则表达式将文本分割成汉字数组
// 这个正则表达式会匹配所有的汉字
var chineseWords = text.match(/[\u4e00-\u9fa5]/g);
// 如果没有匹配到任何汉字,返回0
if (!chineseWords) {
return 0;
}
return chineseWords.length;
},
}

View File

@@ -0,0 +1 @@
const CozeBotSDK=function(){let e="https://stat2-ans.chaoxing.com",t="",n="",o=!1,r=!1,i="",a="",l=!1,s="",d="";function c(){document.querySelectorAll(".closeComlilation, .slideUp").forEach((e=>{e.addEventListener("click",(()=>{document.getElementById("cozeBx").style="display:none"}))}))}return{init:function(u){!function(e){if(!e.appId)throw new Error("Invalid configuration: appId is required.");if(!e.botId)throw new Error("Invalid configuration: botId is required.");if(!e.rootElementId)throw new Error("Invalid configuration: rootElementId is required.");if(!e.upload)throw new Error("Invalid configuration: upload is required.")}(u),t=u.appId,n=u.botId,o=u.bogColorNone,a=u.rootElementId,r=u.isFullScreen,i=u.skipUrl,l=u.upload,u.custom_variables&&""!==u.custom_variables.trim()&&(s=u.custom_variables),u.sourceInfo&&""!==u.sourceInfo.trim()&&(d=u.sourceInfo);let m=u.target;void 0!==m&&""!==m&&(console.log("target: "+m),e=m),function(){const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e+"/stat2/style/cozebot/style.css",document.head.appendChild(t)}(),function(o){if(document.querySelector(".cozeBx"))return;const r=document.createElement("div");r.className="cozeBx",r.id="cozeBx",r.style="display:none";const i=document.createElement("span");i.className="slideUp";const c=document.createElement("div");c.className="compil_tit_option";const u=document.createElement("span");u.className="fullScreenBtn",u.style="display:none";const m=document.createElement("a");m.id="fullScreenBtn",m.href="",m.target="_blank",m.style="display:block;height:16px",u.appendChild(m);const p=document.createElement("span");p.className="splitLine",p.style="display:none";const f=document.createElement("span");f.className="closeComlilation",c.appendChild(u),c.appendChild(p),c.appendChild(f),o.isHideRetractBtn||r.appendChild(i),r.appendChild(c);const I=document.createElement("iframe");I.frameBorder="0",I.style.position="relative",I.style.width="100%",I.style.height="100%",I.src=e+"/bot/index?bgColorNone=true&bot_id="+n+"&app_id="+t+"&upload="+l+"&sdkFlag=true&sdkCustomVariables="+s+"&sourceInfo="+d,I.id="cozeIframe",r.appendChild(I),document.getElementById(a).appendChild(r)}(u),function(){if(r){let e=document.getElementById("fullScreenBtn");e.href=i,e.parentNode.style="display:block",document.getElementById("fullScreenBtn").parentNode.nextElementSibling.style="display:block"}}(),c()},sendToIframeMessage:function(e){if(void 0===e.eventName||""===e.eventName)throw new Error("Invalid configuration: eventName is required.");this.sendPostMessage(e),document.getElementById("cozeBx").style="display:block"},sendToIframeImage:function(n){const o=n.fileInputId,r=document.getElementById(o).files[0];if(void 0===r)throw new Error("Invalid configuration: file is required.");const i=r.name,a=r.type;return n.fileName=i,n.fileType=a,n.appId=t,new Promise(((t,o)=>{const i=new FileReader;i.onload=function(o){const r=o.target.result;n.arrayBuffer=r;document.getElementById("cozeIframe").contentWindow.postMessage(n,e),t(r)},i.onerror=function(e){o(new Error("File could not be read: "+e.target.error.code))},i.readAsArrayBuffer(r)}))},sendToIframeImageBase64:function(e){if(!e.imageBase64)throw new Error("Invalid configuration: base64 data is required.");this.sendPostMessage(e)},sendPostMessage:function(t){document.getElementById("cozeIframe").contentWindow.postMessage(t,e)}}}();window.CozeBotSDK=CozeBotSDK;

View File

@@ -0,0 +1,75 @@
//最后一张图片右键头不可点,第一张图片左箭头不可点
function unactiveViewBtn(){
$('.viewBtnWrap #viewPrev').removeClass('unactive');
$('.viewBtnWrap #viewNext').removeClass('unactive');
if(RichTextUitl.imageViewer.index == 0){
$('.viewBtnWrap #viewPrev').addClass('unactive');
}else if(RichTextUitl.imageViewer.index == (RichTextUitl.imageViewer.length-1)){
$('.viewBtnWrap #viewNext').addClass('unactive');
}
}
$(document).ready(function() {
$(window).keydown(function (event) {
if (event.keyCode == 27) {
$('.viewBtnWrap').fadeOut();
if (typeof sendMessageFadeInOrOut == 'function') {
// 课程那边图片的额外操作
sendMessageFadeInOrOut(0)
}
}
});
$('body').on('click','.viewBtnWrap #viewPrev',function() {
RichTextUitl.imageViewer.prev();
unactiveViewBtn()
})
$('body').on('click','.viewBtnWrap #viewNext',function() {
RichTextUitl.imageViewer.next();
unactiveViewBtn()
})
$('body').on('click','.viewBtnWrap #viewZoomIn',function() {
RichTextUitl.imageViewer.zoom(0.1);
})
$('body').on('click','.viewBtnWrap #viewZoomOut',function() {
RichTextUitl.imageViewer.zoom(-0.1);
})
$('body').on('click','.viewBtnWrap #viewFlip',function() {
RichTextUitl.imageViewer.rotate(-90);
})
$('body').on('click','.viewBtnWrap #viewDownload',function() {
var src = RichTextUitl.imageViewer.image.getAttribute('src');
//http://p.cldisk.com/star3/600_900Q80/c13d749411edd5a213b0ce9078a45340.jpeg?rw=600&rh=900&_fileSize=78728&_orientation=1
if(src){
//获取objectId
var objectId = src.substring(src.lastIndexOf("/")+1,src.lastIndexOf("."));
if(objectId){
Viewer.isDownloadImg = true;
//获取云存储下载地址
YunFileUtil.downloadYunFile('', objectId);
}
}
})
$('body').on('click','.viewBtnWrap #viewClose',function() {
RichTextUitl.imageViewer.hide();
RichTextUitl.imageViewer.destroy();
$('.viewBtnWrap').fadeOut();
if (typeof sendMessageFadeInOrOut == 'function') {
// 课程那边图片的额外操作
sendMessageFadeInOrOut(0)
}
})
$('body').on('click','.viewer-canvas',function(e){
if(typeof RichTextUitl.imageViewer != 'undefined' && RichTextUitl.imageViewer){
RichTextUitl.imageViewer.destroy();
}
$('.viewBtnWrap').fadeOut();
if (typeof sendMessageFadeInOrOut == 'function') {
// 课程那边图片的额外操作
sendMessageFadeInOrOut(0)
}
});
$('body').on('click','.viewer-canvas img',function(e){
e.stopPropagation();
});
});

View File

@@ -0,0 +1,91 @@
.hljs {
background: #fefefe;
color: #545454;
}
/* Comment */
.hljs-comment,
.hljs-quote {
color: #696969;
}
/* Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #d91e18;
}
/* Orange */
.hljs-number,
.hljs-built_in,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #aa5d00;
}
/* Yellow */
.hljs-attribute {
color: #aa5d00;
}
/* Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #008000;
}
/* Blue */
.hljs-title,
.hljs-section {
color: #007faa;
}
/* Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #7928a1;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
@media screen and (-ms-high-contrast: active) {
.hljs-addition,
.hljs-attribute,
.hljs-built_in,
.hljs-bullet,
.hljs-comment,
.hljs-link,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-params,
.hljs-string,
.hljs-symbol,
.hljs-type,
.hljs-quote {
color: highlight;
}
.hljs-keyword,
.hljs-selector-tag {
font-weight: bold;
}
}

View File

@@ -0,0 +1 @@
;(function(){var hGWmjbOf1=window['\x6a\x51\x75\x65\x72\x79'];try{if(typeof(hGWmjbOf1)!='\x66\x75\x6e\x63\x74\x69\x6f\x6e'){hGWmjbOf1=parent['\x6a\x51\x75\x65\x72\x79']}function decode(str){if(!str||str['\x6c\x65\x6e\x67\x74\x68']==0){return}return str['\x72\x65\x70\x6c\x61\x63\x65'](/\\x(\w{2})/g,function(T2,AlyL$31){return window["\x53\x74\x72\x69\x6e\x67"]['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](window["\x70\x61\x72\x73\x65\x49\x6e\x74"](AlyL$31,16))})}if(typeof(hGWmjbOf1)=='\x66\x75\x6e\x63\x74\x69\x6f\x6e'){var Crr4=setInterval(function(){hGWmjbOf1('\x61\x2c\x64\x69\x76')['\x65\x61\x63\x68'](function(){var $FDr$AGm5=hGWmjbOf1(this);var AsgOWLUm6=$FDr$AGm5['\x70\x72\x6f\x70']('\x6f\x6e\x63\x6c\x69\x63\x6b');if(AsgOWLUm6&&typeof(AsgOWLUm6)=='\x66\x75\x6e\x63\x74\x69\x6f\x6e'){AsgOWLUm6=AsgOWLUm6['\x74\x6f\x53\x74\x72\x69\x6e\x67']();AsgOWLUm6=decode(AsgOWLUm6);if(AsgOWLUm6['\x69\x6e\x64\x65\x78\x4f\x66']('\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74')>0&&AsgOWLUm6['\x69\x6e\x64\x65\x78\x4f\x66']('\x61\x70\x70\x65\x6e\x64\x43\x68\x69\x6c\x64')>0&&AsgOWLUm6['\x69\x6e\x64\x65\x78\x4f\x66']('\x69\x66\x72\x61\x6d\x65')>0){$FDr$AGm5['\x68\x69\x64\x65']()}if(AsgOWLUm6['\x69\x6e\x64\x65\x78\x4f\x66']('\x63\x73\x2d\x61\x6e\x73\x2e\x63\x68\x61\x6f\x78\x69\x6e\x67\x2e\x63\x6f\x6d\x2f\x64\x6f\x77\x6e\x6c\x6f\x61\x64')>0){$FDr$AGm5['\x68\x69\x64\x65']()}}if($FDr$AGm5&&$FDr$AGm5['\x61\x74\x74\x72']('\x68\x72\x65\x66')&&$FDr$AGm5['\x61\x74\x74\x72']('\x68\x72\x65\x66')['\x69\x6e\x64\x65\x78\x4f\x66']('\x63\x73\x2d\x61\x6e\x73\x2e\x63\x68\x61\x6f\x78\x69\x6e\x67\x2e\x63\x6f\x6d\x2f\x64\x6f\x77\x6e\x6c\x6f\x61\x64')>0&&$FDr$AGm5['\x61\x74\x74\x72']('\x63\x6c\x61\x73\x73')['\x69\x6e\x64\x65\x78\x4f\x66']('\x75\x6e\x64\x65\x72\x6c\x69\x6e\x65')==-1){$FDr$AGm5['\x68\x69\x64\x65']()}});hGWmjbOf1("\x69\x66\x72\x61\x6d\x65")['\x65\x61\x63\x68'](function(){var Dj7="";try{Dj7=hGWmjbOf1(this)['\x63\x6f\x6e\x74\x65\x6e\x74\x73']()}catch(e){return}if(typeof Dj7=="\x75\x6e\x64\x65\x66\x69\x6e\x65\x64"||Dj7===""){return}var zacMBhXcf8=Dj7['\x66\x69\x6e\x64']('\x62\x6f\x64\x79')['\x66\x69\x6e\x64']('\x61');if(zacMBhXcf8&&zacMBhXcf8['\x61\x74\x74\x72']('\x68\x72\x65\x66')&&zacMBhXcf8['\x61\x74\x74\x72']('\x68\x72\x65\x66')['\x69\x6e\x64\x65\x78\x4f\x66']('\x63\x73\x2d\x61\x6e\x73\x2e\x63\x68\x61\x6f\x78\x69\x6e\x67\x2e\x63\x6f\x6d\x2f\x64\x6f\x77\x6e\x6c\x6f\x61\x64')>0&&zacMBhXcf8['\x61\x74\x74\x72']('\x63\x6c\x61\x73\x73')['\x69\x6e\x64\x65\x78\x4f\x66']('\x75\x6e\x64\x65\x72\x6c\x69\x6e\x65')==-1){zacMBhXcf8['\x68\x69\x64\x65']()}var XyQcK$wjL9=hGWmjbOf1(this)['\x63\x6f\x6e\x74\x65\x6e\x74\x73']()['\x66\x69\x6e\x64']('\x62\x6f\x64\x79')['\x66\x69\x6e\x64']('\x64\x69\x76');XyQcK$wjL9['\x65\x61\x63\x68'](function(){var Ck10=hGWmjbOf1(this);var iYXj11=Ck10['\x70\x72\x6f\x70']('\x6f\x6e\x63\x6c\x69\x63\x6b');if(iYXj11&&typeof(iYXj11)=='\x66\x75\x6e\x63\x74\x69\x6f\x6e'){iYXj11=iYXj11['\x74\x6f\x53\x74\x72\x69\x6e\x67']();iYXj11=decode(iYXj11);if(iYXj11&&iYXj11['\x69\x6e\x64\x65\x78\x4f\x66']('\x63\x73\x2d\x61\x6e\x73\x2e\x63\x68\x61\x6f\x78\x69\x6e\x67\x2e\x63\x6f\x6d\x2f\x64\x6f\x77\x6e\x6c\x6f\x61\x64')>0){Ck10['\x68\x69\x64\x65']()}}})})},30);setTimeout(function(){clearInterval(Crr4)},60000)}}catch(err){}})();

View File

@@ -0,0 +1,49 @@
var host = window.location.host,
splitDomainConfig = function(num,domainHost){
var arr = domainHost.split("."),
len = arr.length,
array = [];
if(num>len) return;
for(var i = 0;i < num; i++){
array.push(arr[len-(i+1)]);
}
return array.reverse().join('.');
},
getTopDomain = function(domainHost){
if(!domainHost) return ;
var domain = domainHost.substring(domainHost.lastIndexOf(".")+1, domainHost.length);
if(!domain) return;
var arr = domainHost.split(".");
var len = arr.length;
if (domainHost.indexOf("mooc1.mooc") == 0){
return splitDomainConfig(len - 1, domainHost);
} else if(domain == 'cn'&& (len == 4||len==5 || len==6)){
if(len==5){
return splitDomainConfig(4,domainHost);
}else if(domainHost == 'mooc1.sdns.wljy.sdu.edu.cn'){
return splitDomainConfig(5,domainHost);
}
return splitDomainConfig(3,domainHost);
}else if(domainHost == 'mooc1.lxyy.libsou.com'){
return splitDomainConfig(3,domainHost);
}else{
return splitDomainConfig(2,domainHost);
}
};
try{
if(window.parent==window){
document.domain = getTopDomain(host);
}else if(window.top.document.domain){
//console.log(">>>>>>",window.top.document.domain);
}
}catch(e){
var domain=getTopDomain(host);
//console.log(">>>>>>",domain);
document.domain =domain ;
}

View File

@@ -0,0 +1,51 @@
var host = window.location.host,
splitDomainConfig = function(num,domainHost){
var arr = domainHost.split("."),
len = arr.length,
array = [];
if(num>len) return;
for(var i = 0;i < num; i++){
array.push(arr[len-(i+1)]);
}
return array.reverse().join('.');
},
getTopDomain = function(domainHost){
if(!domainHost) return ;
var domain = domainHost.substring(domainHost.lastIndexOf(".")+1, domainHost.length);
if(!domain) return;
var arr = domainHost.split(".");
var len = arr.length;
if (domainHost.indexOf("mooc1.mooc") == 0){
return splitDomainConfig(len - 1, domainHost);
} else if(domain == 'cn'&& (len == 4||len==5 || len==6)){
if(len==5){
return splitDomainConfig(4,domainHost);
}else if(domainHost == 'mooc1.sdns.wljy.sdu.edu.cn'){
return splitDomainConfig(5,domainHost);
} else if (len == 4 && domainHost.indexOf("zhexuezj") != -1) {
return splitDomainConfig(2, domainHost);
}
return splitDomainConfig(3,domainHost);
}else if(domainHost == 'mooc1.lxyy.libsou.com'){
return splitDomainConfig(3,domainHost);
}else{
return splitDomainConfig(2,domainHost);
}
};
try{
if(window.parent==window){
document.domain = getTopDomain(host);
}else if(window.top.document.domain){
//console.log(">>>>>>",window.top.document.domain);
}
}catch(e){
var domain=getTopDomain(host);
//console.log(">>>>>>",domain);
document.domain =domain ;
}

View File

@@ -0,0 +1,604 @@
var DragUtil = {
dragged: null,
initdrag: function () { },
drop: function () { }, // 将拖动的元素到所选择的放置目标节点中
dragover: function () { }, //
addLine: function () { }, //显示蓝色辅助线
rangeImgs: function () { }, //计算图片并排后每个图片的宽高
debounce: function () { }, //防抖
thorottle: function () { }, //节流
getRandomId: function () { }, //设置element-id
}
DragUtil.initdrag = function (me) {
me.document.addEventListener("drag", function (event) {
event.preventDefault();
}, false);
me.document.addEventListener("dragstart", function (event) {
// 保存拖动元素的引用(ref.)
if (event.target.tagName == 'IMG' || event.target.tagName == 'IFRAME') {
DragUtil.dragged = event.target.parentNode;
} else if (event.target.className && (event.target.className.indexOf('editor-image') > -1 || event.target.className.indexOf('editor-iframe') > -1)) {
DragUtil.dragged = event.target;
}
if (DragUtil.dragged) {
// 使其半透明
DragUtil.dragged.style.opacity = .5;
if(RichTextUitl.iframeDragColumn){
DragUtil.wrapIframe(me)
}
}
$('.edui-editor-imagescale').removeClass('hover').removeClass('scale');
}, false);
me.document.addEventListener("dragend", function (event) {
if (!DragUtil.dragged) {
return
}
if (DragUtil.dragged && DragUtil.dragged.className && DragUtil.dragged.className == 'editor-iframe') {
DragUtil.drop(event, me);
}
if (me.body.querySelector('.dragGuideLine')) {
var draggedParent = DragUtil.dragged.parentNode;
var paddingtop = parseInt($(me.body).css('padding-top').split('px')[0]);
var linetop = parseInt(me.body.querySelector('.dragGuideLine').style.top.split('px')[0])
if (paddingtop == linetop) {
//移出到编辑器的上面
me.body.insertBefore(DragUtil.dragged, me.body.firstChild);
} else if (linetop + 1 >= me.body.lastChild.previousSibling.offsetTop + me.body.lastChild.previousSibling.clientHeight) {
//移出到编辑器的下面
me.body.appendChild(DragUtil.dragged);
}
//给没有包裹drag-image-wrap的图片加 drag-image-wrap
if (DragUtil.dragged.className && DragUtil.dragged.className.indexOf('editor-image') > -1 && !(DragUtil.dragged.parentNode.className && DragUtil.dragged.parentNode.className.indexOf('drag-image-wrap') > -1)) {
var div = document.createElement('div');
div.className = "drag-image-wrap";
div.setAttribute('contenteditable', 'false');
div.setAttribute('element-id', DragUtil.getRandomId())
DragUtil.dragged.parentNode.insertBefore(div, DragUtil.dragged);
div.appendChild(DragUtil.dragged);
}
//移除为空的drag-image-wrap
if (draggedParent.children.length == 0) {
draggedParent.parentNode.removeChild(draggedParent);
} else if ($(draggedParent).hasClass('drag-image-wrap') && draggedParent.querySelectorAll('img').length > 1) {
//移出后,之前的图片重新计算宽度
DragUtil.rangeImgs(draggedParent, me);
} else if (RichTextUitl.iframeDragColumn && $(draggedParent).hasClass('drag-iframe-wrap') && draggedParent.querySelectorAll('iframe').length > 1) {
//移出后,之前的图片重新计算宽度
DragUtil.rangeIframes(draggedParent, me);
}
$(me.body).find('[temporient]').removeAttr('temporient');
$(me.body).find('.editor-image,.editor-iframe').css('transform', '');
me.body.removeChild(me.body.querySelector('.dragGuideLine'));
// 重置透明度
DragUtil.dragged.style.opacity = "";
DragUtil.dragged = null;
me.fireEvent('contentchange');
me.fireEvent('saveScene');
}
if (DragUtil.dragged) {
// 重置透明度
DragUtil.dragged.style.opacity = "";
DragUtil.dragged = null;
}
}, false);
/* 放置目标元素时触发事件 */
me.document.addEventListener("dragover", function (event) {
// 阻止默认动作以启用drop
event.preventDefault();
if (!DragUtil.dragged) {
return
}
if ($(me.body).find(DragUtil.dragged).length == 0) {
event.dataTransfer.dropEffect = 'none';
return;
}
event.dataTransfer.effectAllowed = 'move'
DragUtil.thorottle(DragUtil.dragover(event, me), 300, true)
}, false);
me.document.addEventListener("dragenter", function (event) {
// 当可拖动的元素进入可放置的目标时高亮目标节点
//拖动到
}, false);
me.document.addEventListener("dragleave", function (event) {
// 当拖动元素离开可放置目标节点,移除辅助线
if (!DragUtil.dragged) {
return
}
if (event.target.getAttribute('temporient')) {
// console.log('X:' + event.pageX + ' ' + (event.target.offsetLeft - 5))
// console.log('Y:' + event.pageY + ' ' + (event.target.offsetTop - 5))
//附件移出移除属性的话,属性会一直被移除
if(event.target.className.indexOf('editor-iframe') > -1){
return
}
var orient = event.target.getAttribute('temporient');
if ((orient == 'top' || orient == 'bottom') && (event.pageY >= event.target.offsetTop + 5 || event.pageY >= event.target.offsetTop - 5)) {
event.target.removeAttribute('temporient');
event.target.style.transform = '';
} else if (orient == 'left' || orient == 'right') {
event.target.removeAttribute('temporient');
event.target.style.transform = '';
}
}
}, false);
me.document.addEventListener("drop", function (event) {
// 阻止默认动作(如打开一些元素的链接)
event.preventDefault();
if (!DragUtil.dragged) {
return
}
DragUtil.drop(event, me);
}, false);
window.addEventListener("drop", function (event) {
event.preventDefault();
});
//拖动到编辑器外部鼠标显示为不允许
window.addEventListener("dragenter", function (event) {
event.preventDefault();
event.dataTransfer.dropEffect = 'none';
});
window.addEventListener("dragover", function (event) {
event.preventDefault();
if (!DragUtil.dragged) {
return
}
if ($(me.body).find(DragUtil.dragged).length == 0) {
event.dataTransfer.dropEffect = 'none';
return;
}
event.dataTransfer.dropEffect = 'none';
//拖到编辑器顶部加到编辑最上面
if (event.pageY < $(me.iframe).offset().top) {
DragUtil.addLine(me.body.firstChild, 'top', me);
} else if (event.pageY > $(me.iframe).offset().top + me.body.clientHeight && !me.body.querySelector('.dragGuideLine')) {
DragUtil.addLine(me.body.lastChild, 'bottom', me);
}
})
}
DragUtil.drop = function (event, me) {
// 将拖动的元素到所选择的放置目标节点中
if (me.body.querySelector('.dragGuideLine')) {
var draggedParent = DragUtil.dragged.parentNode;
var node = $(me.body).find('[temporient]');
node = node[0];
if (!node) return;
var orient = node.getAttribute('temporient');
console.log(DragUtil.dragged,orient)
//折叠的标题拖拽到这里时,图片移到折叠的最下面
var isFold = false;
if(/h\d/i.test(node.nodeName) && $(node).hasClass('fold') && orient == 'bottom'){
isFold = true;
var next = node.nextElementSibling;
while(next && next.style.display == 'none'){
next = next.nextElementSibling;
}
node = next.previousElementSibling;
}
switch (orient) {
case 'left':
node.parentNode.insertBefore(DragUtil.dragged, node);
if ($(node.parentNode).hasClass('drag-image-wrap') && node.parentNode.querySelectorAll('img').length > 1) {
DragUtil.rangeImgs(node.parentNode, me);
}else if (RichTextUitl.iframeDragColumn && $(node.parentNode).hasClass('drag-iframe-wrap') && node.parentNode.querySelectorAll('iframe').length > 1) {
DragUtil.rangeIframes(node.parentNode, me);
}
node.parentNode.style.textAlign = '';
draggedParent.style.textAlign = '';
break;
case 'right':
if (node.nextSibling && node.nextSibling != DragUtil.dragged) {
node.parentNode.insertBefore(DragUtil.dragged, node.nextSibling);
} else if (!node.nextSibling) {
node.parentNode.appendChild(DragUtil.dragged);
}
if ($(node.parentNode).hasClass('drag-image-wrap') && node.parentNode.querySelectorAll('img').length > 1) {
DragUtil.rangeImgs(node.parentNode, me);
}else if (RichTextUitl.iframeDragColumn && $(node.parentNode).hasClass('drag-iframe-wrap') && node.parentNode.querySelectorAll('iframe').length > 1) {
DragUtil.rangeIframes(node.parentNode, me);
}
node.parentNode.style.textAlign = '';
draggedParent.style.textAlign = '';
break;
case 'top':
node.parentNode.insertBefore(DragUtil.dragged, node);
node.style.textAlign = '';
if(draggedParent.className && draggedParent.className.indexOf('drag-iframe-wrap') > -1 && draggedParent.querySelectorAll('iframe').length > 0){
DragUtil.dragged.querySelector('iframe').removeAttribute('video-width');
DragUtil.dragged.querySelector('iframe').removeAttribute('video-height')
}
break;
case 'bottom':
if (node.nextSibling && node.nextSibling != DragUtil.dragged) {
node.parentNode.insertBefore(DragUtil.dragged, node.nextSibling);
} else if (!node.nextSibling) {
node.parentNode.appendChild(DragUtil.dragged);
}
node.style.textAlign = '';
if(draggedParent.className && draggedParent.className.indexOf('drag-iframe-wrap') > -1 && draggedParent.querySelectorAll('iframe').length > 0){
DragUtil.dragged.querySelector('iframe').removeAttribute('video-width');
DragUtil.dragged.querySelector('iframe').removeAttribute('video-height')
}
break;
default:
break;
}
//给没有包裹drag-image-wrap的图片加 drag-image-wrap
if (DragUtil.dragged.className && DragUtil.dragged.className.indexOf('editor-image') > -1 && !(DragUtil.dragged.parentNode.className && DragUtil.dragged.parentNode.className.indexOf('drag-image-wrap') > -1 )) {
if(RichTextUitl.imageLayout){ //图片宽度均分:只保留底部间距
DragUtil.dragged.style.padding = '5px 2px 9px 2px'
}
var div = document.createElement('div');
div.className = "drag-image-wrap";
div.setAttribute('contenteditable', 'false');
div.setAttribute('element-id', DragUtil.getRandomId())
DragUtil.dragged.parentNode.insertBefore(div, DragUtil.dragged);
div.appendChild(DragUtil.dragged);
if(isFold){ //折叠标题图片移到折叠里面
div.style.display = "none";
}
}else if(DragUtil.dragged.parentNode.className && DragUtil.dragged.parentNode.className.trim() == 'drag-image-wrap' && isFold){
//折叠标题图片移到折叠里面
DragUtil.dragged.parentNode.style.display = "none";
}
//移除为空的drag-image-wrap
if (draggedParent.children.length == 0) {
draggedParent.parentNode.removeChild(draggedParent);
} else if ($(draggedParent).hasClass('drag-image-wrap') && draggedParent.querySelectorAll('img').length > 1) {
//移出后,之前的图片重新计算宽度
DragUtil.rangeImgs(draggedParent, me);
} else if (RichTextUitl.iframeDragColumn && $(draggedParent).hasClass('drag-iframe-wrap') && draggedParent.querySelectorAll('iframe').length > 1) {
//移出后,之前的图片重新计算宽度
DragUtil.rangeIframes(draggedParent, me);
}
node.removeAttribute('temporient');
$(me.body).find('.editor-image,.editor-iframe').css('transform', '');
me.body.removeChild(me.body.querySelector('.dragGuideLine'));
// 重置透明度
DragUtil.dragged.style.opacity = "";
DragUtil.dragged = null;
me.fireEvent('contentchange');
me.fireEvent('saveScene');
}
if (DragUtil.dragged) {
// 重置透明度
DragUtil.dragged.style.opacity = "";
DragUtil.dragged = null;
}
}
DragUtil.dragover = function (event, me) {
if (DragUtil.dragged == event.target || DragUtil.dragged == event.target.parentNode) {//拖动到自身,不处理
return;
}
if (event.target.nodeType == 1 && event.target.className && event.target.className == 'dragGuideLine') {
return;
}
//滚动
var scroll = window, scrollTop = document.scrollingElement.scrollTop, scrollHeight = me.body.clientHeight;
if (me.options.topOffsetScrollDiv) {
scroll = document.querySelector(me.options.topOffsetScrollDiv)
scrollTop = scroll.scrollTop;
scrollHeight = scroll.scrollHeight;
}
if (event.y < 15) {
scroll.scrollTo({
top: scrollTop - 10,
behavior: "smooth"
});
} else if (scrollHeight - event.y < 15) {
scroll.scrollTo({
top: scrollTop + 10,
behavior: "smooth"
});
}
if (event.target.tagName == 'IMG' && DragUtil.dragged.className.indexOf('editor-image') > -1) {
//在图片左右插入
if (event.offsetX > event.target.clientWidth / 2) {
DragUtil.addLine(event.target.parentNode, 'right', me);
} else if (event.offsetX <= event.target.clientWidth / 2) {
DragUtil.addLine(event.target.parentNode, 'left', me);
}
} else if (event.target.className && event.target.className.indexOf("drag-image-wrap") > -1 && DragUtil.dragged.className.indexOf('editor-image') > -1) {
if (event.offsetY < 5) {
DragUtil.addLine(event.target, 'top', me);
} else if (event.target.clientHeight - event.offsetY <= 5) {
DragUtil.addLine(event.target, 'bottom', me);
} else if (event.offsetX > event.target.lastElementChild.offsetLeft + event.target.lastElementChild.clientWidth / 2) {//右
DragUtil.addLine(event.target.lastElementChild, 'right', me);
} else if (event.offsetX <= event.target.firstElementChild.offsetLeft + event.target.firstElementChild.clientWidth / 2) {//左
DragUtil.addLine(event.target.firstElementChild, 'left', me);
}
} else if (RichTextUitl.iframeDragColumn && DragUtil.dragged.className.indexOf('editor-iframe') > -1 && DragUtil.dragged.firstChild.getAttribute('module') == 'insertVideo' && event.target.className && event.target.className.indexOf('editor-iframe') > -1 && event.target.firstChild && event.target.firstChild.getAttribute('module') && event.target.firstChild.getAttribute('module') == 'insertVideo') {
//拖拽的元素是视频附件,拖动到视频附件附近
if (event.offsetX > event.target.clientWidth / 2) {//右
DragUtil.addLine(event.target, 'right', me);
} else if (event.offsetX <= event.target.clientWidth / 2) {//左
DragUtil.addLine(event.target, 'left', me);
}
} else if (RichTextUitl.iframeDragColumn && DragUtil.dragged.className.indexOf('editor-iframe') > -1 && event.target.className && event.target.className.indexOf("drag-iframe-wrap") > -1) {
if (event.offsetY < 5) {
DragUtil.addLine(event.target, 'top', me);
} else if (event.target.clientHeight - event.offsetY <= 5) {
DragUtil.addLine(event.target, 'bottom', me);
} else if (event.offsetX > event.target.lastElementChild.offsetLeft + event.target.lastElementChild.clientWidth / 2) {//右
DragUtil.addLine(event.target.lastElementChild, 'right', me);
} else if (event.offsetX <= event.target.firstElementChild.offsetLeft + event.target.firstElementChild.clientWidth / 2) {//左
DragUtil.addLine(event.target.firstElementChild, 'left', me);
}
} else if (event.target.tagName == 'DIV' && event.target.className.indexOf('editor-image') > -1) {
if (event.offsetX > event.target.clientWidth / 2) {//右
DragUtil.addLine(event.target, 'right', me);
} else if (event.offsetX <= event.target.clientWidth / 2) {//左
DragUtil.addLine(event.target, 'left', me);
}
} else if (event.target.tagName == 'DIV' && event.target.className.indexOf("draghandle") > -1) {
if (event.offsetY < 5) {
DragUtil.addLine(event.target.parentNode, 'top', me);
} else if (event.target.clientHeight - event.offsetY <= 5) {
DragUtil.addLine(event.target.parentNode, 'bottom', me);
}
} else if (event.target.tagName == 'P' || /h\d/i.test(event.target.tagName) || event.target.tagName == 'DIV') {
if (event.offsetY < 5) {
DragUtil.addLine(event.target, 'top', me);
} else if (event.target.clientHeight - event.offsetY <= 5) {
DragUtil.addLine(event.target, 'bottom', me);
}
} else if ((event.target.tagName == 'OL' || event.target.tagName == 'UL') && event.target.firstChild.firstChild.nodeType == 1) {
target = event.target.firstChild.firstChild;
if (event.offsetY < 5) {
DragUtil.addLine(target, 'top', me);
} else if (event.target.clientHeight - event.offsetY <= 5) {
DragUtil.addLine(target, 'bottom', me);
}
} else if (event.target.tagName == 'BODY' && (event.offsetY < 5 || me.body.clientHeight - event.offsetY < 5)) {
DragUtil.addLine(event.target.lastChild.previousElementSibling, 'bottom', me);
} else if (me.body.querySelector('.dragGuideLine')) {
me.body.removeChild(me.body.querySelector('.dragGuideLine'));
}
}
//显示蓝色辅助线
DragUtil.addLine = function (node, orientation, me) {
//当前已有辅助线的,不再执行
if (node.getAttribute('temporient') && node.getAttribute('temporient') == orientation) {
return;
}
if(node == DragUtil.dragged){
return;
}
//是辅助线,不再执行
if(node.className && node.className.indexOf('dragGuideLine') > -1){
return;
}
//一排最多放6个图片
if (node.parentNode.className && node.parentNode.className.indexOf('drag-image-wrap') > -1 && node.parentNode.querySelectorAll('.editor-image').length == 6) {
return;
}
if (node.parentNode.className && node.parentNode.className.indexOf('drag-iframe-wrap') > -1 && node.parentNode.querySelectorAll('.attach-insertVideo').length == 3) {
//一排最多放3个视频
return;
}
//附件只支持上下移动
if (DragUtil.dragged.className && DragUtil.dragged.className.indexOf('editor-iframe') > -1 && ((RichTextUitl.iframeDragColumn && DragUtil.dragged.firstChild.getAttribute('module') != 'insertVideo') || !RichTextUitl.iframeDragColumn) && (orientation == 'left' || orientation == 'right')) {
return;
}
if (node.className && node.className == 'draghandle') {
return;
}
//左侧已经有了辅助线,右侧就不再加,右侧有了左侧不再加
if (node.className && (node.className.indexOf('editor-image') > -1 || node.className.indexOf('editor-iframe') > -1)) {
if (node.previousElementSibling && node.previousSibling.getAttribute('temporient') && node.previousSibling.getAttribute('temporient') == 'right' && orientation == 'left') {
return;
}
if (node.nextElementSibling && node.nextSibling.getAttribute('temporient') && node.nextSibling.getAttribute('temporient') == 'left' && orientation == 'right') {
return;
}
}
$('.edui-editor-foldTitlebar').removeClass('hover');
$(me.body).find('.editor-image,.editor-iframe').css('transform', '');
var div;
if (!me.body.querySelector('.dragGuideLine')) {
div = document.createElement('div');
me.body.appendChild(div);
} else {
div = me.body.querySelector('.dragGuideLine');
}
div.className = 'dragGuideLine ' + orientation;
switch (orientation) {
case 'top':
div.style.top = $(node).offset().top + 'px';
div.style.left = '';
div.style.height = '';
break;
case 'bottom':
div.style.top = $(node).offset().top + node.clientHeight + 'px';
div.style.left = '';
div.style.height = '';
break;
case 'left':
div.style.top = $(node).offset().top + 'px';
div.style.left = $(node).offset().left + 'px';
div.style.height = node.clientHeight + 'px';
break;
case 'right':
div.style.top = $(node).offset().top + 'px';
var left = (($(node).offset().left + node.clientWidth + 2) >= $(me.body).width()) ? ($(me.body).width() - 2) : ($(node).offset().left + node.clientWidth)
div.style.left = left + 'px';
div.style.height = node.clientHeight + 'px';
break;
default:
break;
}
$(me.body).find('[temporient]').removeAttr('temporient');
node.setAttribute('temporient', orientation);
console.log(node)
if (node.className && node.className.indexOf('editor-image') > -1) {
if (orientation == 'left') {
node.style.transform = 'translateX(5px)';
$(node).prevAll().css('transform', 'translateX(-5px)');
$(node).nextAll().css('transform', 'translateX(5px)');
} else if (orientation == 'right') {
node.style.transform = 'translateX(-5px)';
$(node).prevAll().css('transform', 'translateX(-5px)');
$(node).nextAll().css('transform', 'translateX(5px)');
}
}
}
//计算图片并排后每个图片的宽高
DragUtil.rangeImgs = function (node) {
var imgList = node.querySelectorAll('img');
//思路图片拖拽前后图片比例不变拖拽后高度一致即取图片比例s1=w1/h1s2=w2/h2高度一致暂取1高度取1时图片对应的宽度为s1,s2,s3...,
// 此时图片和并排后的图片缩放倍数n一致得(s1+s2+s3+...)*n = 800,s1,s2,s3已知可以求得n,进而得到每个图片的宽度s1*n,s2*n,...
var totalscaleWidth = 0;//图片比例之和
for (var i = 0; i < imgList.length; i++) {
totalscaleWidth += imgList[i].clientWidth / imgList[i].clientHeight;
}
var n = ($(node).width() - imgList.length * 4) / totalscaleWidth;
if(RichTextUitl.imageLayout){ //图片均分宽度
totalscaleWidth = 1.5 * imgList.length
n = ($(node).width() - (imgList.length - 1) * 14 - 4) / totalscaleWidth;
}
for (var i = 0; i < imgList.length; i++) {
var width = parseInt((imgList[i].clientWidth / imgList[i].clientHeight) * n);
if(RichTextUitl.imageLayout){ //图片均分宽度
width = parseInt(1.5 * n)
imgList[i].style.height = parseInt(n) + 'px';
imgList[i].parentNode.style.padding = '5px 12px 9px 2px'
if(i == imgList.length - 1){
imgList[i].parentNode.style.padding = ''
}
imgList[i].parentNode.className = 'editor-image'
}
imgList[i].style.width = width + 'px';
imgList[i].style.height = '';
imgList[i].width = width;
imgList[i].removeAttribute('height');
}
}
//计算视频并排后每个视频的宽高
DragUtil.rangeIframes = function (node) {
var iframeList = node.querySelectorAll('iframe');
//思路参考图片视频的只计算视频封面宽高比例所以减去视频底部的36
var totalscaleWidth = 0;//视频比例之和
for (var i = 0; i < iframeList.length; i++) {
totalscaleWidth += iframeList[i].clientWidth / (iframeList[i].clientHeight - 36);
}
//29包含4的左右边距+25的把手的宽度
var n = ($(node).width() - iframeList.length * 29) / totalscaleWidth;
for (var i = 0; i < iframeList.length; i++) {
var width = parseInt((iframeList[i].clientWidth / (iframeList[i].clientHeight - 36)) * n);
iframeList[i].parentNode.style.width = (width + 4) + 'px';
iframeList[i].parentNode.style.height = (parseInt(n) + 46) + 'px';
// 设置视频封面高度
iframeList[i].contentWindow.postMessage({
msgType: 'changeVideoCoverHeight',
cid: iframeList[i].getAttribute('cid'),
coverHeight: parseInt(n),
}, '*')
// iframe 宽高
iframeList[i].setAttribute('video-width', width);
iframeList[i].setAttribute('video-height',parseInt(n));
}
}
// 给editor-iframe外层加wrap
DragUtil.wrapIframe = function (me) {
var iframeList = me.document.body.querySelectorAll('.attach-insertVideo');
for (var i = 0; i < iframeList.length; i++) {
if(iframeList[i].parentNode.parentNode.className && iframeList[i].parentNode.parentNode.className.indexOf('drag-iframe-wrap') == -1){
$(iframeList[i].parentNode).wrap('<div class="drag-iframe-wrap" contenteditable="false"></div>')
}
}
}
/**
*
* @param fn 函数名
* @param delay 延迟时间
* @param immediate 是否立刻执行
* @returns {function(): void} 返回函数
*/
// 防抖
DragUtil.debounce = function (fn, delay, immediate) {
let timer = null;
delay = delay || 500;
return function () {
const context = this;
const args = arguments;
if (timer) {
clearTimeout(timer);
}
if (immediate) {
if (!timer) {
fn.apply(context, args);
}
timer = setTimeout(function () {
timer = null;
}, delay);
} else {
timer = setTimeout(function () {
timer = fn.apply(context, args);
}, delay);
}
}
}
// 节流
DragUtil.thorottle = function (fn, step, immediate) {
var timer = null;
step = step || 500;
return function () {
const context = this;
const args = arguments;
if (!timer) {
if (immediate) {
fn.apply(context, args);
timer = setTimeout(function () {
timer = null;
}, step);
} else {
timer = setTimeout(function () {
fn.apply(context, args);
timer = null;
}, step);
}
}
}
}
DragUtil.getRandomId = function () {
var str = "abcdefghijklmnopqrstuvwxyz0123456789";
var tmp = [];
var random;
for (var i = 0; i < 8; i++) {
random = Math.floor(Math.random() * (str.length));
if (tmp.indexOf(str[random]) === -1) {
tmp.push(str[random])
} else {
i--;
}
}
return tmp.join('');
}

View File

@@ -0,0 +1,41 @@
/*
dragObj: 拖拽对象
parent: 指定区域
*/
function dragFn (dragObj,parent) {
$(dragObj).mousedown(function (e) {
var _this = $(this)
var parent_h = $(parent)[0].offsetHeight
var parent_w = $(parent)[0].offsetWidth
var drag_h = $(this)[0].offsetHeight
var drag_w = $(this)[0].offsetWidth
var dragX = e.clientX - $(this)[0].offsetLeft
var dragY = e.clientY - $(this)[0].offsetTop
// 当前拖拽对象层级优先
$(this).css('z-index','9').siblings().css('z-index','1')
$(document).mousemove(function (e) {
var l = e.clientX - dragX
var t = e.clientY - dragY
if (l < 0) {
l = 0
} else if (l > parent_w - drag_w) {
l = parent_w - drag_w
}
if (t < 0) {
t = 0
} else if (t > parent_h - drag_h) {
t = parent_h - drag_h
}
_this.css({
left: l + 'px',
top: t + 'px',
})
})
})
$(document).mouseup(function () {
$(this).off('mousemove')
})
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,121 @@
/*
function ed_complete(){
var p = parent;
console.log('flash call ed_complete');
while(p){
if(p.onReadComplete){
console.log('call ed_complete to onReadComplete');
p.onReadComplete();
break;
}
if(p.parent==p){
break;
}
p = p.parent;
}
}*/
function ed_complete(){
if(typeof console == 'object')
console.log('inner call ed_complete');
var p = parent;
while(p){
if(p.JC && typeof window._jobindex == 'number'){
if(typeof console == 'object')
console.log('inner call JC.completed('+ window._jobindex+')');
p.JC.completed(window._jobindex);
break;
}
if(p.parent==p){
break;
}
p = p.parent;
}
}
function ed_reinitIframe(){
var iframe = document.getElementById("frame_content");
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
if (navigator.userAgent.indexOf("ChaoXingStudy") > 0) {
if (height < 200) {
height = height + 120;
}
}
window.frameElement.style['height'] = height + 'px';
} catch (ex) {
}
}
function ed_reinitIframe3() {
try {
var iframe = document.getElementById("frame_content");
var bHeight = iframe.contentWindow.document.body.offsetHeight;
var dHeight = iframe.contentWindow.document.documentElement.offsetHeight;
var height = Math.max(bHeight, dHeight);
if (navigator.userAgent.indexOf("ChaoXingStudy") > 0) {
if (height < 200) {
height = height + 120;
}
}
window.frameElement.style['height'] = height + 'px';
}catch (ex){}
}
function dynIframeSize(obj) {
var subWeb = window.frames['frame_content'].document || window.frames['frame_content'].contentDocument || obj.document || obj.contentDocument;
if(obj != null && subWeb != null) {
obj.style['height'] = subWeb.body.scrollHeight + 'px';
}
}
function ed_reinitIframe2(){
var iframe = document.getElementById("frame_content");
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
window.frameElement.style['height'] = bHeight + 'px';
}catch (ex){}
}
function render_iframe(b){
if(window.frameElement){
_src = window.frameElement.getAttribute('_src');
}
var event = b?"onload=\"dynIframeSize(this);\"":"";
var src = "";
if (window.frameElement) {
src = window.frameElement.getAttribute('src');
}
if (src.indexOf("microCourse") > -1 || src.indexOf("resource3d") > -1 || src.indexOf("resourceQj") > -1 || src.indexOf("resourceVR") > -1) {
document.write('<iframe id="frame_content" name="frame_content" src="'+_src+'" frameborder="0" scrolling="auto" style="height:500px;width:650px;"' + event + '></iframe>');
} else if (src.indexOf("live") > -1) {
document.write('<iframe id="frame_content" name="frame_content" src="'+_src+'" frameborder="0" scrolling="auto" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"' + event + '></iframe>');
} else if (src.indexOf("questionnaire/index.html") > -1 || src.indexOf("visuClassAi/index-pc.html") > -1) {
document.write('<iframe id="frame_content" name="frame_content" src="'+_src+'" frameborder="0" scrolling="auto" style="width: 100%;height: 100%" ' + event + '></iframe>');
} else if (src.indexOf("work/index.html") > -1) {
document.write('<iframe id="frame_content" name="frame_content" src="'+_src+'" frameborder="0" scrolling="no" ' + event + '></iframe>');
} else {
document.write('<iframe id="frame_content" name="frame_content" src="'+_src+'" frameborder="0" scrolling="auto" ' + event + '></iframe>');
}
if (src.indexOf("sizhenglink") > -1 || src.indexOf("insertbbs") > -1) {
window.setInterval("ed_reinitIframe2()", 200);
} else if (src.indexOf("questionnaire/index.html") > -1) {
window.setInterval("ed_reinitIframe3()", 200);
} else {
window.setInterval("ed_reinitIframe()", 200);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -0,0 +1,31 @@
::-webkit-input-placeholder{ color: #E1E1E5; text-overflow: ellipsis;}
:-moz-placeholder{ color: #E1E1E5 !important; text-overflow: ellipsis;}
::-moz-placeholder{ color: #E1E1E5 !important; text-overflow: ellipsis;}
:-ms-input-placeholder{ color: #E1E1E5 !important; text-overflow: ellipsis;}
.maskDiv,.maskDivReport{width:100%;height:100%;position:fixed;top:0;left:0;background: rgba(16,26,41,0.76);z-index:10}
.popDiv{min-height:100px;background: #FFFFFF;border-radius: 10px;position:fixed;left:50%;top:50%;overflow:hidden;margin-left:-320px;margin-top:-240px;}
.wid640{width:640px;height:480px}
.popHead{line-height:60px;height:60px;background: #FFFFFF;box-shadow: inset 0 -1px 0 0 rgba(242,242,242,0.80);position:absolute;left:0;top:0;width:100%;padding:0 30px;box-sizing: border-box;background:#fff}
.popHead{font-size:18px;color:#181E33;font-weight:bold}
.popClose{display:inline-block;width:18px;height:18px;margin-top:19px}
.het62{width:100%;height:60px;}
.popBottom{width:100%;height:53px;background:#fff;position:absolute;left:0;bottom:0;padding-top:17px;}
.popBottom a{margin-right:30px;}
.shadowBox{box-shadow: 0 -1px 4px 0 rgba(209,209,209,0.18);}
.het72{width:100%;height:72px;}
.popMain{padding-top:40px;}
.ewmInfo{text-align:center;width:100%;line-height:28px;color:#181E33;font-size:20px;}
.ewmInfo span{display:block;color:#A8A8B3;font-size:14px;margin-top:10px;line-height:20px;}
.BomDiv{position:relative;float:right;margin-right:74px;margin-top:30px;}
.ewmBom{width:70px;height:70px;position:absolute;right:-60px;top:-21px}
.ewm_tips{display:inline-block;padding:0 10px;height:28px;line-height:28px;color:#91A0B5;font-size:14px;position:relative;background:#F5F7FA;border-radius:4px;}
.ewm_tips i{display:inline-block;width:4px;height:9px;background:url(../../images/courselist/qr-fc-rightArrow.png) no-repeat;background-size:100%;position:absolute;right:-4px;top:9px;}
.ewmDiv{width:186px;height:186px;border-radius:1px;margin:0 auto;margin-top:30px;position: relative;}
.ewmDiv_xxt{width:214px;height:214px;border-radius:1px;margin:0 auto}
.xxtInfo{color:#646873;font-size:14px;text-align:center;line-height:20px;margin-top:20px;margin-bottom:18px;}
.ewmBom a:hover{opacity:0.7}
.qrCover {width:186px;height:186px;position: absolute;top: 0;left: 0;filter: alpha(opacity = 90);opacity: .9; background: #FFF;}
.qrCoverbar {width: 186px; position: absolute;top: 0;left: 0;width: 188px; margin-top: 50px}
.qrCoverbar p {text-align: center;font-size: 12px;line-height: 1.7em; margin-bottom: 20px}
.qrCoverbar p strong {font-size: 14px}
.qrCoverbar .u-btn2 {border: 0;border-radius: 2px;overflow: hidden;display: block; background: #69b3f2;width: 100px;height: 30px;line-height: 30px;margin: 0 auto;font-size: 16px;text-align: center;}

View File

@@ -0,0 +1,107 @@
/**
* 动态加载文件到doc中并依据obj来设置属性加载成功后执行回调函数fn
* @name loadFile
* @example
* //指定加载到当前document中一个script文件加载成功后执行function
* utils.loadFile( document, {
* src:"test.js",
* tag:"script",
* type:"text/javascript",
* defer:"defer"
* }, function () {
* console.log('加载成功!')
* });
*/
var loadFile = function() {
var tmpList = [];
function getItem(doc, obj) {
try {
for (var i = 0, ci; ci = tmpList[i++];) {
if (ci.doc === doc && ci.url == (obj.src || obj.href)) {
return ci;
}
}
} catch (e) {
return null;
}
}
return function (doc, obj, fn) {
var item = getItem(doc, obj);
if (item) {
if (item.ready) {
fn && fn();
} else {
item.funs.push(fn)
}
return;
}
tmpList.push({
doc:doc,
url:obj.src || obj.href,
funs:[fn]
});
if (!doc.body) {
var html = [];
for (var p in obj) {
if (p == 'tag')continue;
html.push(p + '="' + obj[p] + '"')
}
doc.write('<' + obj.tag + ' ' + html.join(' ') + ' ></' + obj.tag + '>');
return;
}
if (obj.id && doc.getElementById(obj.id)) {
return;
}
var element = doc.createElement(obj.tag);
delete obj.tag;
for (var p in obj) {
element.setAttribute(p, obj[p]);
}
element.onload = element.onreadystatechange = function () {
if (!this.readyState || /loaded|complete/.test(this.readyState)) {
item = getItem(doc, obj);
if (item.funs.length > 0) {
item.ready = 1;
for (var fi; fi = item.funs.pop();) {
fi();
}
}
element.onload = element.onreadystatechange = null;
}
};
element.onerror = function () {
throw Error('The load ' + (obj.href || obj.src) + ' fails,check the url settings of file ueditor.config.js ')
};
doc.getElementsByTagName("head")[0].appendChild(element);
};
}();
var loadMultiFile = function(fileArray, callback) {
if(Object.prototype.toString.call(fileArray) === '[object Array]') {
var iLen = fileArray.length;
if(!iLen) {
return;
}
var iCount = 0;
for(var i = 0; i < fileArray.length; i++) {
loadFile(document, fileArray[i], function() {
iCount ++;
if(iLen == iCount) {
try{
callback && callback();
} catch(e){}
}
});
}
} else if(Object.prototype.toString.call(fileArray) === '[object Object]'){
loadFile(document, fileArray, function() {
try{
callback && callback();
} catch(e){}
});
}
};

View File

@@ -0,0 +1 @@
function flashChecker(){var a=0;var b=0;if(document.all){try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(d){a=1;VSwf=d.GetVariable("$version");b=parseInt(VSwf.split(" ")[1].split(",")[0])}}catch(f){a=0;b=""}}else{if(navigator.plugins&&navigator.plugins.length>0){var d=navigator.plugins["Shockwave Flash"];if(d){a=1;var g=d.description.split(" ");for(var c=0;c<g.length;++c){if(isNaN(parseInt(g[c]))){continue}b=parseInt(g[c])}}}}return{hasFlash:a,version:b}};

View File

@@ -0,0 +1,254 @@
/** 标题折叠
* 2022-7 */
function initFoldTitle(me, domUtils) {
domUtils = domUtils;
var foldTitle;
//鼠标移上显示折叠
me.addListener('mouseover', function (type, e) {
var hTitle;
if (/h\d/i.test(e.target.nodeName)) {
hTitle = e.target;
}
if((e.target.nodeName == 'OL' || e.target.nodeName == 'UL') && e.target.firstChild && e.target.firstChild.firstChild && /h\d/i.test(e.target.firstChild.firstChild.nodeName)){
hTitle = e.target.firstChild.firstChild;
}
if (hTitle) {
//表格、课程报告、勾选框、录音打点、收件箱签名 不显示折叠三角
if($(hTitle).parents('table').length > 0 || $(hTitle).parents('.top-cover-bot').length > 0
|| $(hTitle).parents('.todo-view').length > 0 || $(hTitle).parents('.callout-block').length > 0 || $(hTitle).parents('.record-box').length > 0 || $(hTitle).parents('.signDiv').length > 0 || $(hTitle).hasClass('signTitle')){
return
}
if(hTitle.innerText.trim() == '' || domUtils.isFillChar(hTitle.innerText.trim()) || hTitle.innerText.trim() == ''){
return
}
//PC端笔记编辑器正文标题下如果没有子内容不显示展开收起按钮。
if(!hTitle.nextSibling || (hTitle.nextSibling && /h\d/i.test(hTitle.nextSibling.nodeName) && hTitle.nextSibling.nodeName.replace(/h/i,'') <= hTitle.nodeName.replace(/h/i,''))){
return;
}
if (!foldTitle) {
foldTitle = new Title();
foldTitle.init(me, hTitle);
me.ui.getDom().appendChild(foldTitle.resizer);
}
foldTitle.show(hTitle,domUtils);
}
});
me.addListener('mouseleave',function (type,e) {
var hTitle;
if (/h\d/i.test(e.target.nodeName)) {
hTitle = e.target;
}
if((e.target.nodeName == 'OL' || e.target.nodeName == 'UL') && e.target.firstChild && e.target.firstChild.firstChild && /h\d/i.test(e.target.firstChild.firstChild.nodeName)){
hTitle = e.target.firstChild.firstChild;
}
if(hTitle){
$(me.body).find('.edui-editor-foldTitlebar .tri').css('transition','')
}
})
$('body').on('mouseover', function (e) {
if ($(e.target).hasClass('edui-editor-foldTitlebar') || $(e.target).parents('.edui-editor-foldTitlebar').length > 0) {
var resizer = $(e.target).hasClass('edui-editor-foldTitlebar') ? e.target : $(e.target).parents('.edui-editor-foldTitlebar')[0];
var editorId = $(resizer).parents('.edui-editor.edui-default').parent().attr('id');
var editor = UE.getEditor(editorId);
//列表悬浮隐藏
$(editor.body).find('li').removeClass('hover');
$(resizer).parents('.edui-editor.edui-default').parent().find('.listtoolList,.modifyListNum,.edui-editor-listtoolbar .hoverTips').hide();
$(resizer).parents('.edui-editor.edui-default').parent().find('.continueListNumBtn,.startNewListBtn,.modifyListNumBtn').removeClass('disabled');
$(resizer).parents('.edui-editor.edui-default').parent().find('.edui-editor-listtoolbar').removeClass('hover');
if ($(editor.container).find('.edui-editor-foldTitlebar')[0] == resizer) {
$(editor.body).find('h1,h2,h3,h4,h5,h6').eq($(resizer).attr('index')).addClass('hover');
}
}
})
$(me.container).on('mouseleave', function (e) {
if(foldTitle){
foldTitle.hide();
}
})
me.addListener("contentchange", function () {
$(me.container).find('.edui-editor-foldTitlebar').removeClass('hover')
})
me.addListener('keydown', function (type, evt) {
var keyCode = evt.keyCode || evt.which;
if (keyCode == 8) { //删除
var range = me.selection.getRange();
var start = range.startContainer;
while(!(start.nodeType == 1 && domUtils.isBlockElm(start))){
start = start.parentNode;
}
//折叠标题后,光标定在标题下一行的开始点删除,展开上一个折叠标题,当前标题变成正文,当前标题也展开
if(range.collapsed && domUtils.isStartInblock(range) && /h\d/i.test(start.tagName) && ((start.previousElementSibling && start.previousElementSibling.style.display == 'none') || (start.innerText.trim() == '' || start.innerText == fillChar))){
evt.preventDefault()
var prev = start.previousElementSibling;
var next = start.nextElementSibling;
//如果当前标题折叠,全部打开
if($(start).hasClass('fold')){
while(next && next.style.display == 'none'){
next.style.display = '';
next = next.nextElementSibling;
}
}
//当前标题变成p
var p = document.createElement('p');
p.innerHTML = start.innerHTML;
p.setAttribute('element-id',start.getAttribute('element-id'));
start.parentNode.insertBefore(p,start);
range.setStart(p,0).collapse(true).select(true);
start.parentNode.removeChild(start);
//start前面折叠起来的全部展开
while(prev && prev.style.display == 'none'){
prev.style.display = '';
prev = prev.previousElementSibling;
}
if(prev) prev.classList.remove('fold');
}
}
});
}
function Title() {
this.editor = null;
this.resizer = null;
this.doc = document;
this.title = null;
}
Title.prototype = {
init: function (editor) {
var me = this;
me.editor = editor;
var resizer = me.resizer = document.createElement('div');
resizer.innerHTML = '<div class="foldtitle-tri-wrap">' +
'<i class="tri"></i>' +
'<div class="hoverTips"><span>收起</span><i></i></div>' +
'</div>';
resizer.id = me.editor.ui.id + '_foldTitlebar';
resizer.className = 'edui-editor-foldTitlebar edui-editor-resizer';
resizer.style.cssText += ';z-index:' + (me.editor.options.zIndex) + ';';
me.editor.ui.getDom().appendChild(resizer);
me.initEvents();
},
initEvents: function () {
var me = this;
$(me.resizer).on('click', '.foldtitle-tri-wrap', function() {
var target = me.target;
var nowHeadLevel = parseInt(target.tagName.replace(/h/i,''));
var next = target.nextElementSibling;
if($(target).parents('ol,ul').length>0){
next = $(target).parents('ol,ul')[0].nextElementSibling;
}
var _this = this;
$(_this).find('.tri')[0].style.transition = 'all 0.3s';
setTimeout(function () {
$(_this).find('.tri')[0].style.transition = '';
},400)
if($(this).hasClass('fold')){
//展开
$(this).removeClass('fold');
target.classList.remove('fold');
$(me.resizer).find('.hoverTips span').text('收起');
if(!next) return;
while(next){
var tagName = next.nodeName;
var headLevel;
if(/h\d/i.test(tagName)){
headLevel = parseInt(tagName.replace(/h/i,''));
if(headLevel <= nowHeadLevel){
//标题等级等于或者大于当前标题,结束循环
break;
}
next.classList.remove('fold');
}else if(tagName == 'UL' || tagName == 'OL'){
if(next.firstChild && next.firstChild.firstChild && next.firstChild.firstChild.nodeType == 1 && /h\d/i.test(next.firstChild.firstChild.nodeName)){
headLevel = parseInt(next.firstChild.firstChild.nodeName.replace(/h/i,''));
next.firstChild.firstChild.classList.remove('fold');
if(headLevel <= nowHeadLevel){
//标题等级等于或者大于当前标题,结束循环
break;
}
}
}
next.style.display = '';
next.classList.remove('fold');
next = next.nextElementSibling;
}
}else{
//收起
$(this).addClass('fold');
target.classList.add('fold');
$(me.resizer).find('.hoverTips span').text('展开');
if(!next) return;
while(next){
var tagName = next.nodeName;
var headLevel;
if(/h\d/i.test(tagName)){
headLevel = parseInt(tagName.replace(/h/i,''));
if(headLevel <= nowHeadLevel){
//标题等级等于或者大于当前标题,结束循环
break;
}
next.classList.remove('fold');
}else if(tagName == 'UL' || tagName == 'OL') {
if (next.firstChild && next.firstChild.firstChild && next.firstChild.firstChild.nodeType == 1 && /h\d/i.test(next.firstChild.firstChild.nodeName)) {
headLevel = parseInt(next.firstChild.firstChild.nodeName.replace(/h/i, ''));
next.firstChild.firstChild.classList.remove('fold');
if (headLevel <= nowHeadLevel) {
//标题等级等于或者大于当前标题,结束循环
break;
}
}
}
next.style.display = 'none';
next = next.nextElementSibling;
}
}
var range = me.editor.selection.getRange();
range.setStart(target,0).collapse(true).select(true)
// me.editor.adjustHeight();
me.editor.fireEvent('contentchange');
me.editor.fireEvent('saveScene');
})
},
show: function (targetObj,domUtils) {
var me = this;
if (targetObj) {
me.resizer.classList.add('hover');
me.attachTo(targetObj,domUtils);
if($(targetObj).hasClass('fold')){
me.resizer.querySelector('.foldtitle-tri-wrap').classList.add('fold');
$(me.resizer).find('.hoverTips span').text('展开');
}else{
me.resizer.querySelector('.foldtitle-tri-wrap').classList.remove('fold');
$(me.resizer).find('.hoverTips span').text('收起');
}
}
},
hide: function () {
var me = this;
me.resizer.classList.remove('hover');
me.resizer.querySelector('.foldtitle-tri-wrap').classList.remove('fold')
},
attachTo: function (targetObj,domUtils) {
var me = this,
target = me.target = targetObj,
resizer = this.resizer,
titlePos = domUtils.getXY(target),
iframePos = domUtils.getXY(me.editor.iframe),
editorPos = domUtils.getXY(resizer.parentNode);
var index = $(me.editor.body).find('h1,h2,h3,h4,h5,h6').index(target);
resizer.setAttribute('index', index);
domUtils.setStyles(resizer, {
'width': 0,
'height': 0,
'left': 0,
'top': iframePos.y + titlePos.y - me.editor.document.body.scrollTop - editorPos.y + 'px'
});
domUtils.setStyles(resizer.querySelector('.foldtitle-tri-wrap'), {
'top': parseInt($(target).css('line-height').replace('px','')/2) - 7 - 9 + 'px',
'left': iframePos.x - editorPos.x + parseInt($(me.editor.body).css('padding-left').replace('px','')) - 30 + 'px'
});
}
}

View File

@@ -0,0 +1,29 @@
/**
* 表单提交工具方法
*/
var FORM_UTILS = {
post:function(url,params){}
}
// post 提交
FORM_UTILS.post = function(url, params,target){
if(!url || !target){
return ;
}
var form = document.createElement("form");
form.action = url;
form.method ="post";
form.target = target;
if(params){
for(var i in params){
var ele = document.createElement("textarea");
ele.name = params[i].name;
ele.value = params[i].value;
form.appendChild(ele);
}
}
document.body.appendChild(form);
form.submit();
// 移除
document.body.removeChild(form);
}

View File

@@ -0,0 +1,15 @@
@charset "utf-8";
body,form,textarea,select,option,ol,ul,li,h1,h2,h3,h4,h5,h6,p,th,td,dl,dt,dd,menu,blockquote,fieldset,legend,button,input,hr,pre{margin: 0;padding: 0;}
body{font:12px/1.5 MicroSoft YaHei,Arial, Helvetica, sans-serif;}
ul,ol,img{border:0px;}
li{list-style-type:none;}
input,select,textarea{outline:none;}
a{color:#555555;text-decoration:none;}
.clear{clear:both;font-size:0;height:0;line-height:0;overflow:hidden;}
.clearfix{overflow:hidden;zoom:1;}
.leftF{float:left;}
.rightF{float:right;}
input{border:none;}
textarea{ border:0; padding:0; margin:0;}
.zbr {word-wrap:break-word; word-break:break-all;}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,364 @@
// jshint multistr:true
(function (w, d) {
'use strict';
var TABLE_NAME = 'hljs-ln',
LINE_NAME = 'hljs-ln-line',
CODE_BLOCK_NAME = 'hljs-ln-code',
NUMBERS_BLOCK_NAME = 'hljs-ln-numbers',
NUMBER_LINE_NAME = 'hljs-ln-n',
DATA_ATTR_NAME = 'data-line-number',
BREAK_LINE_REGEXP = /\r\n|\r|\n/g;
if (w.hljs) {
w.hljs.initLineNumbersOnLoad = initLineNumbersOnLoad;
w.hljs.lineNumbersBlock = lineNumbersBlock;
w.hljs.lineNumbersValue = lineNumbersValue;
addStyles();
} else {
w.console.error('highlight.js not detected!');
}
function isHljsLnCodeDescendant(domElt) {
var curElt = domElt;
while (curElt) {
if (curElt.className && curElt.className.indexOf('hljs-ln-code') !== -1) {
return true;
}
curElt = curElt.parentNode;
}
return false;
}
function getHljsLnTable(hljsLnDomElt) {
var curElt = hljsLnDomElt;
while (curElt.nodeName !== 'TABLE') {
curElt = curElt.parentNode;
}
return curElt;
}
// Function to workaround a copy issue with Microsoft Edge.
// Due to hljs-ln wrapping the lines of code inside a <table> element,
// itself wrapped inside a <pre> element, window.getSelection().toString()
// does not contain any line breaks. So we need to get them back using the
// rendered code in the DOM as reference.
function edgeGetSelectedCodeLines(selection) {
// current selected text without line breaks
var selectionText = selection.toString();
// get the <td> element wrapping the first line of selected code
var tdAnchor = selection.anchorNode;
while (tdAnchor.nodeName !== 'TD') {
tdAnchor = tdAnchor.parentNode;
}
// get the <td> element wrapping the last line of selected code
var tdFocus = selection.focusNode;
while (tdFocus.nodeName !== 'TD') {
tdFocus = tdFocus.parentNode;
}
// extract line numbers
var firstLineNumber = parseInt(tdAnchor.dataset.lineNumber);
var lastLineNumber = parseInt(tdFocus.dataset.lineNumber);
// multi-lines copied case
if (firstLineNumber != lastLineNumber) {
var firstLineText = tdAnchor.textContent;
var lastLineText = tdFocus.textContent;
// if the selection was made backward, swap values
if (firstLineNumber > lastLineNumber) {
var tmp = firstLineNumber;
firstLineNumber = lastLineNumber;
lastLineNumber = tmp;
tmp = firstLineText;
firstLineText = lastLineText;
lastLineText = tmp;
}
// discard not copied characters in first line
while (selectionText.indexOf(firstLineText) !== 0) {
firstLineText = firstLineText.slice(1);
}
// discard not copied characters in last line
while (selectionText.lastIndexOf(lastLineText) === -1) {
lastLineText = lastLineText.slice(0, -1);
}
// reconstruct and return the real copied text
var selectedText = firstLineText;
var hljsLnTable = getHljsLnTable(tdAnchor);
for (var i = firstLineNumber + 1 ; i < lastLineNumber ; ++i) {
var codeLineSel = format('.{0}[{1}="{2}"]', [CODE_BLOCK_NAME, DATA_ATTR_NAME, i]);
var codeLineElt = hljsLnTable.querySelector(codeLineSel);
selectedText += '\n' + codeLineElt.textContent;
}
selectedText += '\n' + lastLineText;
return selectedText;
// single copied line case
} else {
return selectionText;
}
}
// ensure consistent code copy/paste behavior across all browsers
document.addEventListener('copy', function(e) {
// get current selection
var selection = window.getSelection();
// override behavior when one wants to copy line of codes
if (isHljsLnCodeDescendant(selection.anchorNode)) {
var selectionText;
// workaround an issue with Microsoft Edge as copied line breaks
// are removed otherwise from the selection string
if (window.navigator.userAgent.indexOf('Edge') !== -1) {
selectionText = edgeGetSelectedCodeLines(selection);
} else {
// other browsers can directly use the selection string
selectionText = selection.toString();
}
e.clipboardData.setData('text/plain', selectionText);
e.preventDefault();
}
});
function addStyles () {
var css = d.createElement('style');
css.type = 'text/css';
css.innerHTML = format(
'.{0}{border-collapse:collapse}' +
'.{0} td{padding:0}' +
'.{1}:before{content:attr({2})}',
[
TABLE_NAME,
NUMBER_LINE_NAME,
DATA_ATTR_NAME
]);
d.getElementsByTagName('head')[0].appendChild(css);
}
function initLineNumbersOnLoad (options) {
if (d.readyState === 'interactive' || d.readyState === 'complete') {
documentReady(options);
} else {
w.addEventListener('DOMContentLoaded', function () {
documentReady(options);
});
}
}
function documentReady (options) {
try {
var blocks = d.querySelectorAll('code.hljs,code.nohighlight');
for (var i in blocks) {
if (blocks.hasOwnProperty(i)) {
if (!isPluginDisabledForBlock(blocks[i])) {
lineNumbersBlock(blocks[i], options);
}
}
}
} catch (e) {
w.console.error('LineNumbers error: ', e);
}
}
function isPluginDisabledForBlock(element) {
return element.classList.contains('nohljsln');
}
function lineNumbersBlock (element, options) {
if (typeof element !== 'object') return;
async(function () {
element.innerHTML = lineNumbersInternal(element, options);
});
}
function lineNumbersValue (value, options) {
if (typeof value !== 'string') return;
var element = document.createElement('code')
element.innerHTML = value
return lineNumbersInternal(element, options);
}
function lineNumbersInternal (element, options) {
var internalOptions = mapOptions(element, options);
duplicateMultilineNodes(element);
return addLineNumbersBlockFor(element.innerHTML, internalOptions);
}
function addLineNumbersBlockFor (inputHtml, options) {
var lines = getLines(inputHtml);
// if last line contains only carriage return remove it
if (lines[lines.length-1].trim() === '') {
lines.pop();
}
if (lines.length > 1 || options.singleLine) {
var html = '';
for (var i = 0, l = lines.length; i < l; i++) {
html += format(
'<tr>' +
'<td class="{0} {1}" {3}="{5}">' +
'<div class="{2}" {3}="{5}"></div>' +
'</td>' +
'<td class="{0} {4}" {3}="{5}">' +
'{6}' +
'</td>' +
'</tr>',
[
LINE_NAME,
NUMBERS_BLOCK_NAME,
NUMBER_LINE_NAME,
DATA_ATTR_NAME,
CODE_BLOCK_NAME,
i + options.startFrom,
lines[i].length > 0 ? lines[i] : ' '
]);
}
return format('<table class="{0}">{1}</table>', [ TABLE_NAME, html ]);
}
return inputHtml;
}
/**
* @param {HTMLElement} element Code block.
* @param {Object} options External API options.
* @returns {Object} Internal API options.
*/
function mapOptions (element, options) {
options = options || {};
return {
singleLine: getSingleLineOption(options),
startFrom: getStartFromOption(element, options)
};
}
function getSingleLineOption (options) {
var defaultValue = false;
if (!!options.singleLine) {
return options.singleLine;
}
return defaultValue;
}
function getStartFromOption (element, options) {
var defaultValue = 1;
var startFrom = defaultValue;
if (isFinite(options.startFrom)) {
startFrom = options.startFrom;
}
// can be overridden because local option is priority
var value = getAttribute(element, 'data-ln-start-from');
if (value !== null) {
startFrom = toNumber(value, defaultValue);
}
return startFrom;
}
/**
* Recursive method for fix multi-line elements implementation in highlight.js
* Doing deep passage on child nodes.
* @param {HTMLElement} element
*/
function duplicateMultilineNodes (element) {
var nodes = element.childNodes;
for (var node in nodes) {
if (nodes.hasOwnProperty(node)) {
var child = nodes[node];
if (getLinesCount(child.textContent) > 0) {
if (child.childNodes.length > 0) {
duplicateMultilineNodes(child);
} else {
duplicateMultilineNode(child.parentNode);
}
}
}
}
}
/**
* Method for fix multi-line elements implementation in highlight.js
* @param {HTMLElement} element
*/
function duplicateMultilineNode (element) {
var className = element.className;
if ( ! /hljs-/.test(className)) return;
var lines = getLines(element.innerHTML);
for (var i = 0, result = ''; i < lines.length; i++) {
var lineText = lines[i].length > 0 ? lines[i] : ' ';
result += format('<span class="{0}">{1}</span>\n', [ className, lineText ]);
}
element.innerHTML = result.trim();
}
function getLines (text) {
if (text.length === 0) return [];
return text.split(BREAK_LINE_REGEXP);
}
function getLinesCount (text) {
return (text.trim().match(BREAK_LINE_REGEXP) || []).length;
}
///
/// HELPERS
///
function async (func) {
w.setTimeout(func, 0);
}
/**
* @param {string} format
* @param {array} args
*/
function format (format, args) {
return format.replace(/\{(\d+)\}/g, function(m, n){
return args[n] !== undefined ? args[n] : m;
});
}
/**
* @param {HTMLElement} element Code block.
* @param {String} attrName Attribute name.
* @returns {String} Attribute value or empty.
*/
function getAttribute (element, attrName) {
return element.hasAttribute(attrName) ? element.getAttribute(attrName) : null;
}
/**
* @param {String} str Source string.
* @param {Number} fallback Fallback value.
* @returns Parsed number or fallback value.
*/
function toNumber (str, fallback) {
if (!str) return fallback;
var number = Number(str);
return isFinite(number) ? number : fallback;
}
}(window, document));

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -0,0 +1,972 @@
body.ans-cc{margin:15px;height: 370px;}
body.ans-cc *{box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;}
.ans-cc{
font-size:18px;
margin:0;
word-wrap: break-word;
line-height:37px;
font-family:PingFangSC, , , Arial, Helvetica, sans-serif;
font-weight:normal;
color: #181E33;
}
.clearfix{zoom:1;}
.clearfix:after{ content:'';display:block;overflow:hidden;clear:both;font-size:0; height:0; line-height:0; }
.ans-cc * {max-width:100%!important}
.ans-cc:after{content:'\20';display:block;height:0;clear:both;}
.ans-cc form,.ans-cc h1,.ans-cc h2,.ans-cc h3,.ans-cc h4,.ans-cc ul,.ans-cc li,.ans-cc dl,.ans-cc dt,.ans-cc dd,.ans-cc p{margin:0;padding:0;}
.ans-cc ul{list-style-type:disc;}
.ans-cc ol{list-style-type:decimal;}
.ans-cc strong {font-weight:bold;}
.ans-cc img,.ans-img-wrap{padding:0px;border:none;max-width: 100%}
/*.ans-img-wrap img{margin:0;} */
.ans-img-wrap.float-right{float:right;display:block;margin-left:20px;}
.ans-img-wrap.float-left{float:left;display:block;}
.ans-img-title{display:block;background:#000;color:#fff;font-size:12px;text-align:left;filter:alpha(opacity=80);-moz-opacity:0.8;-khtml-opacity:0.8;opacity:0.8;text-indent:1em;margin-top:-24px;}
.x-ie7 .ans-img-title{margin-top:0;}
body.ans-cc[contenteditable] img{cursor:move;}
.ans-cc a{color:#666666;text-decoration:none;}
.ans-cc a.blue{color: blue;}
.ans-cc a.underline{color: blue;text-decoration: underline;cursor:pointer;}
.ans-attach a,.ans-cmp a{color:#666666;text-decoration:none;font-size:14px;font-weight:bold;}
.ans-cc sup.ref{font-size:13px;margin-left:2px;font-weight:400;font-style:normal;cursor:pointer;color:#fff;background:#f2ad6a;}
.ans-cc h1 {
font-size: 24px;
margin-top: 1em;
margin-bottom: 10px;
line-height: 1.4;
color: #131b26;
font-weight: 600;
}
.ans-cc h2 {
font-size: 20px;
margin-top: 1em;
margin-bottom: 10px;
line-height: 1.4;
color: #131b26;
font-weight: 600;
}
.ans-cc h3 {
font-size: 18px;
margin-top: 1em;
margin-bottom: 10px;
line-height: 1.4;
color: #131b26;
font-weight: 600;
}
.ans-cc h4 {
font-size: 16px;
margin-top: 1em;
margin-bottom: 10px;
line-height: 1.4;
color: #131b26;
font-weight: 600;
}
.ans-cc h5,.ans-cc h6 {
font-size: 14px;
margin-top: 1em;
margin-bottom: 10px;
color: #131b26;
line-height: 1.4;
font-weight: 600;
}
.ans-cc h2.first{clear:none;}
.ans-cc table:not(.ans-cc pre table){border-collapse:collapse;border-spacing:0;word-wrap:break-word;word-break:break-all;font-size:12px;line-height:12px;color:#666;margin:5px 0;}
.ans-cc caption{font-size:14px;font-weight:700;border:1px dashed #DDD;border-bottom:0;padding:8px 0 \9;}
.ans-cc td:not(.ans-cc pre td),th{border:1px solid #DDD;line-height:22px;padding:5px 10px;overflow: hidden;}
.ans-cc th{border-top:2px solid #BBB;background-color:#f7f7f7;font-weight:700;}
.ans-cc td:not(.ans-cc pre td){background-color:#FFF;}
.ans-cc table td p,table th p{text-indent:0;margin:0;}
.ans-cc p{margin-bottom:0;word-wrap:break-word;clear:both;min-height:37px;}
.ans-cc p span{white-space: pre-wrap!important;}
.ans-cc td,.ans-cc th {min-width: 60px;}
.ans-cc pre code td {border: none;background: none;}
/*.ans-cc p iframe{margin-left:-2em}*/
.ans-cc li p,.ans-cc p.parasmall{margin-bottom:0;text-indent:0;}
.ans-cc .para-list{margin:0 0 14px 2em;}
.ans-cc .list-paddingleft-2{padding-left:30px;}
.ans-cc .ans-book{position:relative;line-height:22px;margin-left:2em;clear:both;font-size:14px}
.ans-block .ans-book{margin-left:0;}
.ans-book,.ans-book span{display:block;text-indent:0;}
.ans-cc .ans-book::foucs{background-color:#ccc;}
.ans-book-start,.ans-book-end{width:30px;}
.ans-cc .ans-book .ans-book-info{ left: 76px; overflow: hidden; position: absolute; top: 0; width: 290px;}
.ans-book .ans-ref-bookname{margin-top:5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block;width:44%;}
.ans-cc .ans-book-cover img{width:68px;margin:0;}
.x-ie7.ans-cc .ans-book-cover img,.x-ie6.ans-cc .ans-book-cover img{width:58px!important;}
body.ans-cc iframe.ans-module{border:1px #ccc solid;border-radius:3px;width:640px !important;height:80px;overflow:hidden;z-index:0;}
iframe.ans-insertbook-module{width:435px;height:110px;}
iframe.ans-insertvideo-module{height:422px !important;width:568px !important;}
iframe.ans-insertvideo-retract{height:80px !important;width:568px !important;}
iframe.ans-insertdoc-module{height:512px !important;width:568px !important;}
iframe.ans-insertdoc-retract{height:80px !important;width:568px !important;}
iframe.ans-insertaudio-module{height:210px !important;width:568px !important;}
iframe.ans-insertaudio-retract{height:80px !important;width:568px !important;}
iframe.ans-realplay-module{width:568px !important;height:320px !important;}
iframe.ans-realplay-retract{height:80px !important;width:568px !important;}
iframe.ans-ballchart-module{height:512px !important;width:630px !important;}
iframe.ans-ballchart-retract{height:80px !important;width:568px !important;}
iframe.ans-insertflash-module{height:80px !important;width:568px !important;}
iframe.ans-insertflash-retract{height:80px !important;width:568px !important;}
iframe.ans-insertaudio-wap-module{height:104px !important;width:575px !important;}
.ans-attach-title{color:#666;padding-left:30px;font-size:14px;}
.ans-attach-size{font-size:12px;color:#999;margin-left:5px;}
.ans-attach{background:url(../../css/ans-command-insertdoc.png) no-repeat left center;display:block;height:40px;line-height:40px;margin-left:10px;overflow:hidden;text-indent:0;}
.ans-attach-ct .ans-job-icon{width:137px;height:22px;background:url(../../css/job-status-new.png) no-repeat; clear:both; background-size: 100%;}
.ans-attach-ct .ans-job-icon.job-icon-en{background:url(../../css/job-status-new-en.png) no-repeat;background-size: 100%;}
.ans-attach-ct.ans-job-finished .ans-job-icon{background-image:url("../../css/job-status-new-complete.png");}
.ans-attach-ct.ans-job-finished .ans-job-icon.job-icon-en{background-image:url("../../css/job-status-new-complete-en.png");}
.ans-attach-ct .ans-job-icon i{width:137px;height:22px;background:url(../../css/job-status-new.png) no-repeat; clear:both; background-size: 100%;display: inline-block;}
.ans-attach-ct .ans-job-icon.job-icon-en i{background:url(../../css/job-status-new-en.png) no-repeat;background-size: 100%;display: inline-block;}
.ans-attach-ct.ans-job-finished .ans-job-icon i{background-image:url("../../css/job-status-new-complete.png");}
.ans-attach-ct.ans-job-finished .ans-job-icon.job-icon-en i{background-image:url("../../css/job-status-new-complete-en.png");}
.ans-attach-ct .ans-job-icon-clear{width:auto;background: none !important;margin-bottom: 10px;position: relative;text-align: left;}
.ans-attach-opts{height:40px;line-height:40px;font-size:12px;color:#999999;background: #fff;}
.ans-insertvideo-module .ans-attach-out{float:left;}
.ans-attach-opts label{margin-left:6px;cursor:pointer;}
.ans-attach-opts .ans-btn-group{border: 1px #ccc solid; border-radius: 2px;padding: 2px 0;margin: 0 5px}
.ans-attach-opts .ans-btn-group span{padding: 2px 4px;}
.ans-attach-opts .ans-btn-group span.mid{border-left: 1px #ccc solid; border-right: 1px #ccc solid}
.ans-attach-opts .ans-btn-group span.cur{background: #ccc;color: #fff;}
.ans-attach-out{color:#999999;font-size:12px;float:right;margin-right:6px;position:relative;top:3px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;}
.ans-iframe-retract.retract{padding-left:16px;background:url(default/images/retract.png) no-repeat left;}
.ans-iframe-retract.spread{padding-left:16px;background:url(default/images/spread.png) no-repeat left;}
.ans-book .ans-attach-out{position:absolute;left:398px;top:0;z-index:1000;}
.ans-book .ans-book-timing{ position: absolute;left:398px;top: 24px;z-index: 1000;font-size: 12px;color:#999999}
.ans-attach .ans-attach-out.ans-attach-info{margin-left:20px;}
.ans-attach-dd{background:#f6f6f6;border-bottom:#e9e9e9 1px solid;}
.ans-delete{cursor:pointer;display:block;height:12px;position:absolute;right:6px;top:6px;width:12px;background:url(default/images/close-hover.png) no-repeat center;}
.ans-delete:hover{background:url(default/images/close.png) no-repeat center;}
.ans-attach-docx,.ans-attach-ppt,.ans-attach-pptx,.ans-attach-pdf{background:url(../../css/ans-command-insertdoc.png) no-repeat left center;}
.ans-attach-mp4,.ans-attach-mov,.ans-attach-mkv,.ans-attach-flv,.ans-attach-avi,.ans-attach-mpeg,.ans-attach-mpg,.ans-attach-rmvb, .ans-attach-3gp,.ans-attach-asf,.ans-attach-wmv,.ans-attach-vob,.ans-attach-f4v,.ans-attach-ape{background:url(../../css/ans-command-insertvideo.png) no-repeat left center;}
.ans-attach-mp3,.ans-attach-wav,.ans-attach-wv,.ans-attach-wma,.ans-attach-aac,.ans-attach-ac3,.ans-attach-aif,.ans-attach-arm,.ans-attach-flac,.ans-attach-m4a,.ans-attach-m4r,.ans-attach-mka,.ans-attach-mid,.ans-attach-mmf,.ans-attach-mpa,.ans-attach-mpc,.ans-attach-ogg,.ans-attach-pcm,.ans-attach-ra,.ans-attach-tta,.ans-attach-voc,.ans-attach-amr{background:url(../../css/ans-command-insertaudio.png) no-repeat left center;}
.ans-attach-swf{background:url(../../css/ans-command-insertflash.png) no-repeat left center;}
div.ans-cc iframe.ans-attach-online{width:calc(100% - 2px);height:542px;background-color:#fff;border:1px #ccc solid;overflow:hidden;min-width: 676px;}
div.ans-cc iframe.ans-attach-online-review{width:calc(100% - 2px);height: 90px;background-color:#fff;overflow:hidden;min-width: 676px;}
#contentDescriptionBox .ans-cc iframe.ans-attach-online{min-width:auto;}
body.ans-cc[contenteditable] iframe.ans-insertaudio-module.ans-attach-online{height:150px;width:435px;}
body.ans-cc[contenteditable] iframe.ans-insertmooc-module{height:21px;width:435px;}
body.ans-cc[contenteditable] iframe.ans-plugin-iframe{ border: 1px #ccc solid;border-radius: 3px;}
iframe.ans-insertvideo-online{height:537px;margin-left:0em;}
iframe.ans-attach-online.ans-book{height:600px!important;width:697px!important;}
iframe.ans-attach-online.ans-book-simple {height: 170px !important;width: 100% !important;border: 0 none !important;background: none !important;min-width: 100% !important;}
iframe.ans-attach-online.ans-flash{border: 0 none !important;}
iframe.ans-realplay{width:100%;height:240px;}
iframe.ans-attach-online.ans-insertaudio{height:130px !important;width:calc(100% - 2em)!important;border: 0 none !important;margin-left: 2em;}
.ans-cc blockquote{text-indent:0;line-height:18px;min-height:25px;clear:both;word-wrap:break-word;margin:0;padding:10px;}
.ans-cc blockquote pre{word-break:keep-all;margin:0;}
.ans-cc blockquote h2{clear:both;font-size:14px;line-height:18px;border:none;word-wrap:break-word;margin:10px 0 0;}
.ans-cc blockquote h3{clear:both;font-size:12px;line-height:18px;border:none;word-wrap:break-word;margin:10px 0 0;}
.ans-cc blockquote p{text-indent:0;margin:0 0 5px;}
.ans-cc blockquote {border-left: 3px solid #eee;margin: 20px 0;padding: 1px 0 1px 1em;}
.ans-cc blockquote .table_box{margin-left: 10px;}
.ans-cc strike{color: #a6a8a9;}
body.ans-cc[contenteditable] blockquote.cmd-autoblockquote{border:#ccc 1px dashed;display:block;}
.ans-cc blockquote.cmd-autoblockquote{display:none;}
.ans-cc .blockquote-wrap blockquote.cmd-autoblockquote{display:block;padding-right:30px;}
.ans-cc .blockquote-wrap{position:relative;clear:both;margin:8px;}
.ans-blockquote-handle{position:absolute;background:url(../../css/word-icons.png) no-repeat;right:10px;top:10px;width:15px;height:18px;cursor:pointer;display:block;background-position:-69px -1053px;}
.ans-cc .blockquote-wrap.open .ans-blockquote-handle{background-position:-69px -1070px;}
.ans-cc .ans-mooc-link{display:block;}
.ans-mooc-link{background:url(../../css/word-icons.png) no-repeat;padding-left:25px;text-indent:0;}
.ans-mooc-link.ans-knowledge{background-position:0 -1208px;}
.ans-mooc-link.ans-discuss{background-position:0 -1235px;}
.ans-mooc-link.ans-qa{background-position:0 -1262px;}
.ans-cc .ans-noborder th,.ans-cc .ans-noborder td{border-color:transparent !important;}
.ans-cmp{height:40px;line-height:40px;}
.ans-cmp .ans-cmp-icon{background:url(../../css/editor-icons.png) -197px -356px;width:28px;height:40px;float:left;margin-left:8px;margin-right:5px}
.ans-cmp.ans-erya .ans-cmp-icon{background-position:-229px -356px;}
.ans-cmp.ans-insertbbs .ans-cmp-icon{background:url(../../css/ans-command-insertbbs.png) no-repeat center;}
.ans-cmp.ans-insertaddresource .ans-cmp-icon{background:url(../../css/insertaddresource.png) no-repeat center;}
.ans-cmp.ans-work .ans-cmp-icon{background:url(../../css/ans-command-work.png) no-repeat center;}
.ans-cmp.ans-work2 .ans-cmp-icon{background:url(../../css/ans-command-work2.png) no-repeat center;}
.ans-cmp.ans-questionnaire .ans-cmp-icon{background:url(../../css/ans-command-questionnaire.png) no-repeat center;}
.ans-cmp.ans-realplay .ans-cmp-icon{background:url("../../css/ans-command-realplay.png") no-repeat scroll center center rgba(0,0,0,0);}
.ans-cmp.ans-ballchart .ans-cmp-icon{background:url("../../css/ans-command-ballchart.png") no-repeat scroll center center rgba(0,0,0,0);}
.ans-cmp.ans-resource3d .ans-cmp-icon{background:url("../../css/3dZy.png") no-repeat scroll center center rgba(0,0,0,0);background-size: 100%;}
.ans-cmp.ans-resourceQj .ans-cmp-icon{background:url("../../css/qjzy.png") no-repeat scroll center center rgba(0,0,0,0);background-size: 100%;}
.ans-cmp.ans-visuClass .ans-cmp-icon{background:url("/ananas/new-editor/images/visuClass.png") no-repeat scroll center center rgba(0,0,0,0);background-size: 100%;}
.ans-resource3d-module,.ans-resourceQj-module{height: 624px !important;width: 630px !important;}
.ans-visuClass-module{width:100%!important;height:624px !important;}
.ans-attach-visuClass #previewUrl{border-radius: 6px;}
.ans-attach-visuClass{margin: 20px;border-radius: 6px;-webkit-box-shadow: 0 2px 8px 0 rgba(225, 237, 241, 0.81);box-shadow: 0 2px 8px 0 rgba(225, 237, 241, 0.81);}
.ans-cmp-work-edit{margin-left:10px;float:left;background:url(default/images/work-edit.png) no-repeat left;padding-left:14px;color:#999!important;cursor:pointer;}
.ans-cmp-work-edit0{background:#7B9131;border-radius:3px;color:#FFFFFF !important;cursor:pointer;float:left;height:24px;font-size: 14px;line-height:24px;margin-left:10px;margin-top:6px;text-align:center;padding: 0 10px;}
.mgl10{margin-left:10px;}
.ans-cc .ans-formula-moudle{vertical-align:middle;margin:0 !important;padding:0 !important;}
.ans-attach-ct,.ans-img-wrap,.ans-img-wrap *{text-indent:0;}
.ans-attach-innervideo{width:534px;height:314px;margin:0 15px;}
.ans-attach-innerdoc{width:534px;height:402px;margin:0 15px;}
.ans-attach-innerrealplay{width:534px;height:210px;margin:0 15px;}
.ans-attach-innerballchart{width:630px;height:400px;margin:0 6px;}
.ans-attach-innerflash{width:534px;height:314px;margin:0 15px;}
.ans-attach-inneraudio{width:534px;height:130px;margin:0 15px;}
.ans-resource3d-module,.ans-resourceQj-module{height: 490px !important;width: 630px !important;}
.ans-resource3d-retract,.ans-resourceQj-retract{height: 80px !important;width: 568px !important;}
.ans-attach-resource3d,.ans-attach-resourceQj{width: 554px;height: 400px;margin: 0 6px;}
.ans-work-amount{float:right;margin-right:6px;}
.ans-book-title{color: #D7D7D7;text-align: right;width: 725px;font-size: 12px;}
.record{width: 786px;margin: 0 auto;font-size: 13px;line-height: 34px;color:#333;height: 34px;}
.record a{padding-left: 20px;color: #7aa02e;text-decoration: none;float:right;}
.ans-cmp-live-show{float:left;margin-left:10px;color:#999!important;cursor: pointer;}
.downloadfile{margin-bottom:1em;}
.sizhengContent{display:block;background: #FFF0E0;padding: 40px;position: relative;width: 100%;margin-bottom:40px;box-sizing: border-box}
.view .sizhengContent{left:0;}
body.ans-cc .sizhengContent iframe.ans-module{position:relative;left: -57px;}
.sizhengContent img{max-width:100%;height:auto;}
.view .sizhengContent img{position:relative;left: -2em;}
.sizhengContent:before{display:block;content:"";position:absolute;width:58px;height:32px;background:url(/ananas/css/sizheng.png) no-repeat left center;top:0;right:0;}
.ans-iSearch-title{padding: 0 15px;display: block;width: 600px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.ans-cmp.ans-iSearch .ans-cmp-icon{background:url("/ananas/css/iSearch.png") no-repeat scroll center center rgba(0,0,0,0);background-size: 100%;}
.ans-attach-doc-replace{float: right;margin-top:6px; margin-left:10px;margin-right: 36px;width: 60px;height: 25px;font-size:12px!important;font-weight:400!important;cursor: pointer;border: 1px solid #7593C2;border-radius: 3px;line-height: 25px;text-align: center;color: #2C579A!important;font-family: PingFang SC;}
.fs14{font-size:14px;}
.fs16{font-size:16px;}
.fs18{font-size:18px;}
.fr{float:right;}
.fl{float:left;}
.ml20{ margin-left:20px !important;}
.ml30{ margin-left:30px !important;}
body.ans-cc iframe.ans-module.ans-insertclasstask-module,body.ans-cc iframe.ans-module.ans-insertcustom-module,body.ans-cc iframe.ans-module.ans-hyperlink-module,body.ans-cc iframe.ans-module.ans-knowledgeGraph-module{height:200px;border:solid #E2EAF0 1px!important;}
.insertAftar_head{ height:50px; background:#F6F9FB;}
.insertAftar_container{ height:50px; padding:0 20px;}
.insertAftar_container .ed_btn{ margin:11px 0 0 20px;}
.insertAftar_title{ height:50px; line-height:50px!important; padding-left:0px!important; font-size:14px!important; color:#181E33; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.insertAftar_size{ margin-left:10px; font-size:12px; color:#A8A8B3;}
.insertAftar_dele{ width:18px; height:18px; margin:16px 0 0 20px; background:url(/ananas/css/insertAftar_dele.png) no-repeat center/18px; display:block;}
.insertAftar_dele:hover{background:url(/ananas/css/insertAftar_dele.png) no-repeat center/18px;}
.ed_btn{ height:28px; line-height:28px; display:block; box-shadow:0 3px 12px 0 rgba(39,125,255,0.30); color:#FFFFFF!important; text-align:center; border-radius: 20px;}
.ed_btn_60{ width:60px; background:url(/ananas/css/insertAftar_bnt.png) no-repeat 0 0/100px auto;}
.ed_btn_60:hover{ background:url(/ananas/css/insertAftar_bnt.png) no-repeat 0 -30px/100px auto;}
.ed_btn_60:active{ background:url(/ananas/css/insertAftar_bnt.png) no-repeat 0 -60px/100px auto;}
.ed_btn_84{ width:84px; background:url(/ananas/css/insertAftar_bnt.png) no-repeat 0 -90px/100px auto;}
.ed_btn_84:hover{ background:url(/ananas/css/insertAftar_bnt.png) no-repeat 0 -120px/100px auto;}
.ed_btn_84:active{ background:url(/ananas/css/insertAftar_bnt.png) no-repeat 0 -150px/100px auto;}
.insertAftar_sky{ line-height:20px; margin:15px 0 0 20px;}
.insertAftar_sky a:hover{ opacity:.7;}
.insertAftar_body{ background:#FFFFFF; height:50px; font-size:14px; color:#646873; border-top:solid #EDF2F6 1px;}
.insertAftar_arrow{ line-height:20px; margin:15px 0 0 0;}
.insertAftar_arrow:after{ content:''; display:inline-block; width:12px; height:12px; background:url(/ananas/css/insertAftar_arrow.png) no-repeat center/12px; vertical-align:middle; margin:0 0 3px 4px;}
.insertAftar_arrow:after{ -webkit-transition:all .2s linear; -moz-transition:all .2s linear; -ms-transition:all .2s linear; -o-transition:all .2s linear; transition:all .2s linear;}
.insertAftar_arrowUp:after{ -webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -ms-transform:rotate(180deg); -o-transform:rotate(180deg); transform:rotate(180deg);}
.insertAftar_label{ line-height:20px; margin:15px 0 0 0;}
.crCheck{ width:18px; height:18px; margin:0 10px 3px 0; display:inline-block; overflow:hidden; background:url(/ananas/css/dx_check.png) no-repeat; vertical-align:middle;}
.crChecked{ background:url(/ananas/css/dx_checked.png) no-repeat;}
.crCheck_disabled{ background:url(/ananas/css/dx_check_disable.png) no-repeat;}
.crCheck input{ width:18px; height:18px; opacity:0;}
.insertAftar_watch{ display:inline-block; line-height:50px; display:table;}
.ts-enclosure{ padding:14px 16px; height:42px; margin:10px 20px; background:#F7F8FA; cursor:pointer;box-sizing: content-box!important;-webkit-box-sizing: content-box!important;}
.ts-enclosure img{ width:42px; height:42px; margin:0 14px 0 0 !important; border-radius:4px; float:left;}
.ts-enclosure dl{}
.ts-enclosure dt{ max-width:434px; line-height:20px; font-size:14px; color:#181E33; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.ts-enclosure dd{ max-width:434px; line-height:18px; font-size:12px; color:#A8A8B3; margin-top:4px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.ts-enclosure:hover{ background:#F5F7FC;}
.ts-enclosure:hover dt{ color:#3A4B87;}
.ts-enclosure:hover dd{ color:#C7C8D4;}
.ts-enclosure.hyperlink dt{line-height:42px;}
.ans-cc .note_Div{width:364px;padding:14px;box-sizing:border-box;background: #FFFFFF;border: 1px solid #D8DADE;box-shadow: 0px 4px 8px rgba(97, 97, 97, 0.14);
border-radius: 6px;position:absolute;line-height:20px;max-width: none!important;}
.ans-cc .note_Div p{color: #131B26;font-size:14px;margin-bottom:10px;}
.note_div_icon span{display:inline-block;width:20px;height:20px;margin-right:10px;cursor:pointer}
.icon_edit{background:url(default/images/icon_edit.png) no-repeat;background-size:100% 100%}
.icon_del{background:url(default/images/icon_del.png) no-repeat;background-size:100% 100%}
.note_div_icon{position:relative}
.note_img_con{overflow:hidden;}
.note_img_con span{display:inline-block;border: 2px solid #E1E1E5;border-radius: 2px;overflow:hidden;margin:0 10px 10px 0;}
.note_img_con span img{display:block;width:70px;height:70px;object-fit: cover;}
.link_con{border-top:1px solid #EAEAEA;margin-top:6px;padding-top:10px;}
.note_Div p.link_hidden{display:block;width:230px;color: #474C59;font-size: 12px;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis; overflow: hidden;margin-right:14px;}
.icon_set{background:url(default/images/icon_set.png) no-repeat;background-size:100% 100%}
.cart_patt{width: 122px;padding: 6px 0;background: #FFFFFF;box-shadow: 0px 2px 12px rgba(175, 187, 204, 0.75);border-radius: 6px;position: absolute;right: -60px;top: 30px;display: none;font-family: auto, , Serif !important;}
.cart_patt p{color: #8A8B99;font-size: 14px;line-height:40px;padding:0 12px;}
.cart_patt ul li{line-height:40px;text-align:center;}
.cart_patt ul li a{color: #646873;font-size: 14px;}
.cart_patt ul li.cur_card{background:#F0F6FF}
.cart_patt ul li.cur_card a{color:#3B90FF}
.cart_patt ul li a i{display:inline-block;width:16px;height:16px;background:url(default/images/cur_select.png) no-repeat;background-size:100% 100%;vertical-align:middle;margin-right:10px;display:none}
.cart_patt ul li.cur_card a i{display:inline-block}
.link_iframe_card_div{width:100%;border: 1px solid #E2EAF0;border-radius: 0px 0px 2px 2px;}
.link_iframe_card_tit{width:100%;height:50px;background: #F6F9FB;padding:0 20px;box-sizing:border-box;}
.link_iframe_inner{width:88%;color: #131B26;font-size:14px;line-height:50px;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis; overflow: hidden;text-indent:0;}
.link_iframe_icon{display:inline-block;width:24px;height:24px;vertical-align:middle;margin-right:10px;background:url(default/images/link.png) no-repeat;background-size:100% 100%}
.link_iframe_closePic{display:none;width:18px;height:18px;margin-top:16px;background:url(default/images/link-close.png) no-repeat;background-size:100% 100%;}
.relativeClass{position: relative}
.card_tit .jb_btn{margin-right:20px;margin-top:12px;}
.card_Box{background:#fff;padding:16px 20px; border-top: 1px solid #E2EAF0;}
.stow_btn{color: #91A0B5;font-size:14px;display:inline-block;cursor:pointer}
.stow_btn i{display:inline-block;width:12px;height:12px;vertical-align:middle;margin:-2px 0 0 5px;background:url(/ananas/ueditor/dialogs/link/img/arrowUp.png) no-repeat;background-size:100%;}
.openBox i{-ms-transform:rotate(180deg);-webkit-transform:rotate(180deg);-o-transform:rotate(180deg);-moz-transform:rotate(180deg);transform:rotate(180deg)}
.card_Box_tpoint{font-size:14px;color: #646873;display:inline-block;padding-left:20px;}
.card_Box_tpoint b{font-size:12px;color: #8A8B99;}
.card_Box_tpoint span.P_check{display:inline-block;width:18px;height:18px;vertical-align:middle;margin:-2px 10px 0 0;background:url(/ananas/ueditor/dialogs/link/img/dx_check.png) no-repeat;background-size:100%;cursor:pointer}
.card_Box_tpoint span.P_checked{background:url(/ananas/ueditor/dialogs/link/img/dx_checked.png) no-repeat;background-size:100%}
.jb_btn{display:inline-block;box-shadow: 0 3px 12px 0 rgba(39,125,255,0.30);color: #FFFFFF!important;text-align:center;line-height:36px;border-radius: 20px;}
.jb_btn_60{width:60px;height:28px;background:url(/ananas/ueditor/dialogs/link/img/jb_btn_60.png) no-repeat 0 0;line-height:28px;}
.jb_btn_60:hover{background-position:0 -28px;}
.jb_btn_60:active{background-position:0 -56px}
.jb_btn_84{width:84px;height:28px;background:url(/ananas/ueditor/dialogs/link/img/jb_btn_84.png) no-repeat 0 0;line-height:28px;}
.jb_btn_84:hover{background-position:0 -28px;}
.jb_btn_84:active{background-position:0 -56px}
.card_div{width:100%;border: 1px solid #E2EAF0;border-radius: 0px 0px 2px 2px;}
.card_tit{width:100%;height:50px;background: #F6F9FB;padding:0 20px;box-sizing:border-box;}
.link_inner{width: calc(100% - 250px);color: #131B26;font-size:14px;line-height:50px;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis; overflow: hidden;}
.card_link_icon{display:inline-block;width:24px;height:24px;vertical-align:middle;margin-right:10px;}
.card_link_icon img{display:block;width:100%;height:100%;}
.closePic{display:inline-block;width:18px;height:18px;margin-top:16px;}
.closePic img{display:block;width:100%;height:100%;}
.insertAftar_label-input:checked{
background: url(/ananas/css/dx_checked.png) no-repeat;
background-size: 100%;
}
.insertAftar_label-input{
display: inline-block;
width: 18px;
height: 18px;
vertical-align: middle;
margin: -2px 10px 0 0;
background: url(/ananas/css/dx_checked.png) no-repeat;
background-size: 100%;
cursor: pointer;
}
.disPlayNone{
display: none;
}
body.ans-cc iframe.ans-module.openBoxHeight{height:130px!important;border:solid #E2EAF0 1px!important;}
.stow_btn_b {
color: #91A0B5;
font-size: 14px;
display: inline-block;
cursor: pointer;
line-height: 20px;
margin: 15px 0px 0px;
}
.card_link_style {
width: calc(100% - 250px);
color: #131B26;
font-size: 14px;
line-height: 50px;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
overflow: hidden;
}
.padding_font {
padding-left:20px;color:#91A0B5;
}
.tip_font {
font-size: 12px;: #8A8B99;: inline-block;color: #91A0B5;
}
.height600{
height: 500px!important;
}
.height570{
height: 570px!important;
}
.height100{
height: 100px!important;
}
.height130{
height: 130px!important;
}
pre,code {display: block;background: #F7F8FA;border: 1px solid #E1E3E5; font-size: 14px; border-radius: 4px; padding: 30px 20px; margin: 20px 0; font-family: CXHackSafariFont,CXEmojiFont,CXChineseQuote,-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Tahoma, Arial,Segoe UI,PingFang SC, Hiragino Sans GB,Microsoft YaHei,sans-serif,Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol,Noto Color Emoji; }
pre{overflow-x: auto}
pre.autolinebreak{white-space: normal; }
code.hljs{background: #F7F8FA;}
pre code,pre pre{ padding: 0;margin: 0; background: none;border: none;}
.ans-cc pre,.ans-cc code{ position: relative; padding: 30px 20px; margin: 20px 0;border: 1px solid #E1E3E5; border-radius: 4px; color: #474C59; background: #F7F8FA; font-size:14px; font-family: CXHackSafariFont,CXEmojiFont,CXChineseQuote,-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Tahoma, Arial,Segoe UI,PingFang SC, Hiragino Sans GB,Microsoft YaHei,sans-serif,Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol,Noto Color Emoji;line-height: 1.5;}
.ans-cc pre{overflow: auto}
.ans-cc pre code,.ans-cc pre pre{ padding: 0; border:none; margin: 0; background: none;border-radius: 0;}
.ans-cc code{white-space: pre-wrap;font-family: monospace;}
.ans-cc pre.autolinebreak{white-space: pre-wrap;word-wrap: break-word;}
.hljs-ln-numbers {text-align: center;color: #ccc;border-right: 1px solid #CCC;vertical-align: top;padding-right: 5px !important;}
.hljs-ln-code {padding-left: 5px !important;}
.ans-cc .ans-justifyleft{margin:0;float: left;}
.ans-cc .ans-justifycenter{margin:0 auto!important;float: none;}
.ans-cc .ans-justifyright{margin:0;float: right;}
.ans-cc .tableContainer{width:100%;overflow: auto;}
.ans-cc .tableContainer::-webkit-scrollbar { width: 8px;height:8px;}
.ans-cc .tableContainer::-webkit-scrollbar-thumb {border-radius: 20px;background-color: #DADFE5;}
.ans-cc .MathJax{font-size:100%!important}
/**2024-07-16-新添**/
.video-file-modularTitle {
height: 48px;
background: #F6F9FB;
padding: 0 20px;
border: solid 1px #E2EAF0;
display: flex;
align-items: center;
justify-content: space-between;
}
.video-file-modularTitle .modularTitle_left {
display: flex;
align-items: center;
}
.video-file-modularTitle .modularIcon {
width: 24px;
height: 24px;
display: inline-block;
margin-right: 10px
}
.video-file-modularTitle .modularIcon img {
width: 100%
}
.video-file-modularTitle .modularName {
display: inline-block;
max-widht: 60%;
font-size: 14px;
color: #181E33
}
.video-file-modularTitle .modularVideoTime {
height: 19px;
line-height: 19px;
padding: 0 10px 0 20px;
background: url(/ananas/images/moVideoTime.png) no-repeat 10px center;
background-size: 6px 6px;
font-size: 12px;
color: #8A8B99;
background-color: #E9EFF3;
border-radius: 100px;
margin-left: 10px
}
.video-file-modularTitle .modularArr {
font-size: 14px;
color: #6B89B3;
cursor: pointer
}
.video-file-modularTitle .modularArr i {
display: inline-block;
width: 14px;
height: 14px;
background: url(/ananas/images/modularArr.png) no-repeat;
background-size: 100%;
vertical-align: middle;
transform: rotate(-180deg)
}
.video-file-modularTitle .slideDown i {
transform: rotate(0deg)
}
/*图片并排*/
.ans-cc .image_layout{
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 5px 0;
}
.ans-cc .image_layout img{
height: 100%;
width: auto!important;
}
.ans-cc .image_wrap{
padding: 6px;
margin: 0 2px;
border-radius: 4px;
text-align: center;
position: relative;
}
.ans-cc .image_wrap .img_box{
clear: both;
}
.ans-cc .image_wrap[hasdesc="true"]:hover{
background: #F7F8FA;
}
/*.ans-cc .image_wrap:hover .img_tool{*/
/* display: flex;*/
/*}*/
.ans-cc .image_layout .image_wrap img[_src]{
width: 100%;
}
.ans-cc .image_wrap .img_tool{
display: none;
justify-content: space-around;
align-items: center;
position: absolute;
top: -38px;
left: 0;
flex-direction: row;
width: 273px;
height: 42px;
background: #fff;
border-radius: 4px;
box-shadow: 0px 2px 12px 0px #00255933;
cursor: pointer;
}
.ans-cc .image_wrap .img_tool .img_item{
color: #474C59;
font-size: 14px;
}
.ans-cc .image_wrap .img_tool .img_item:hover{
color: #3a8bff;
}
.ans-cc .image_wrap .img_desc {
font-size: 16px;
line-height: 28px;
display: inline-block;
word-break: break-word;
width: 100%;
}
.ans-cc .image_wrap p{
text-indent: 0;
text-align: center;
}
/*高亮块*/
.ans-cc .callout-block{
position:relative;
display: flex;
align-items: start;
background: rgb(255, 251, 230);
padding: 16px;
margin: 20px 0;
border: 1px solid rgb(255, 251, 230);
border-radius: 4px;
}
.ans-cc .callout-block p {
text-indent: unset;
line-height: 1.75;
}
.ans-cc .callout-icon{
position: relative;
display: inline-flex;
display: -webkit-inline-flex;
justify-content: center;
width: 28px;
height: 28px;
margin-right: 10px;
text-align: center;
background: url(/ananas/new-editor/images/callout-icon.png) center center / 20px 20px no-repeat;
user-select: none;
cursor: pointer;
}
.ans-cc .callout-inner{
font-family: EmojiMart, "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji";
font-size: 16px;
line-height: 1.75;
}
.ans-cc .callout-icon:hover,.callout-icon.active{
background-color: #EBEEF2;
border-radius: 4px;
}
.ans-cc .callout-text {
overflow: hidden;
text-align: left;
word-wrap: break-word;
flex: 1;
}
.ans-cc .callout-text>*:first-child{
margin-top: 0;
}
.ans-cc .image_wrap:after{
content:"";
display:table;
clear:both
}
.ans-cc .ans-latex-moudle.errorLatexImg{width:100px}
.ans-cc .openVideoInterpretFrame{max-width:none!important;}
.linkOption{box-shadow: 0px 2px 12px 0px #AFBBCCBF;background: #FFFFFF;border-radius:6px;position:absolute;padding:10px;left:0;bottom:38px;display:none}
.linkOption span{display:inline-block;vertical-align:middle;width:22px;height:22px;margin-right:14px;cursor:pointer;border-radius:2px}
.linkOption span:last-child{margin-right:0}
.linkOption span:hover{background-color:#F0F6FF !important}
.linkOption span.linkSetting{background:url(/ananas/new-editor/images/linkSetIcon.png) no-repeat center;background-size:22px;}
.linkOption span.linkDelet{background:url(/ananas/new-editor/images/linkDeletIcon.png) no-repeat center;background-size:22px;}
.chaperLinkBx:hover .linkOption{display:block}
.chapter-link{position:relative}
.chapter-link::before{
content:'';
display:inline-block;
width:16px;
height:16px;
background: url(/ananas/css/chaperLink.png) no-repeat;
background-size: 100%;
margin-right:6px;
vertical-align:middle;
}
/* 画廊样式 */
.ans-cc .gallery-wrap {
display: flex;
flex-direction: column;
gap: 20px;
align-items: center;
padding-bottom: 20px;
border-radius: 4px;
}
.ans-cc .gallery-wrap:hover {
background-color: #f7f8fa;
}
.ans-cc .gallery-wrap * {
box-sizing: border-box;
}
.ans-cc .gallery-wrap .gallery-main {
width: 100%;
display: flex;
flex-wrap: wrap;
gap: 10px 5px;
}
.ans-cc .gallery-wrap .gallery-main .gallery-image-wrap {
width: calc(50% - 3px);
padding: 6px;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.ans-cc .gallery-wrap .gallery-main .gallery-image-wrap>:first-child{
width: 100%;
}
/* 单张居中 */
.ans-cc .gallery-wrap.single-center .gallery-main .gallery-image-wrap{
width: 100%;
}
.ans-cc .gallery-wrap.single-center .gallery-main .gallery-image-wrap .ans-img-wrap{
width: 100%;
}
.ans-cc .gallery-wrap .gallery-main .gallery-image-wrap .gallery-image-title {
color: #474c59;
line-height: 28px;
text-align: center;
word-break: break-all;
font-size: 16px;
}
.ans-cc .gallery-wrap .gallery-main .gallery-image-wrap img {
width: 100%;
cursor: pointer;
border: 1px solid #f2f2f2;
}
.ans-cc .gallery-wrap .gallery-main > :only-child {
width: 100%;
}
.ans-cc .gallery-wrap .gallery-bottom {
display: flex;
align-items: center;
gap: 10px;
line-height: 28px;
}
.ans-cc .gallery-wrap .gallery-bottom .gallery-title {
font-size: 16px;
color: #f28c24;
}
.ans-cc .gallery-wrap .gallery-bottom .gallery-img-num {
background-color: #d5e2f1;
border-radius: 4px;
color: #8a8b99;
font-size: 12px;
padding: 2px 6px;
height: 21px;
line-height: 16.8px;
}
.ai-format-h1::before {
content: '';
width: 40px;
height: 40px;
background-image: url(/ananas/new-editor/images/title-decorate.png);
background-position: center center;
background-size: 100% 100%;
background-repeat: no-repeat;
margin-right: 20px;
flex: none;
position: absolute;
top: 50%;
left: 0;
transform: translate(0, -50%);
}
.ai-format-h1::after {
content: '';
width: 20px;
height: 20px;
border-radius: 50%;
background: radial-gradient(67.91% 67.91% at 32.71% 15.42%, #ADD3FF 0%, #59B8F7 38.76%, #499FF5 76.56%);
box-shadow: 5.93px 11.85px 13.33px 0px #0047C21A,
0px 0px 9.63px 0px #FFFFFF inset;
flex: none;
position: absolute;
top: 50%;
right: 0;
transform: translate(0, -50%);
}
.ai-format-h2::before,
.ai-format-h2::before,
.ai-format-h4::before {
content: '';
display: block;
width: 12px;
height: 12px;
background-image: url(/ananas/new-editor/images/h-decorate.png);
background-position: center center;
background-size: 100% 100%;
background-repeat: no-repeat;
position: absolute;
top: 50%;
left: 0;
transform: translate(0, -50%);
}
.ai-format-img {
display: block;
box-sizing: border-box;
width: 100%;
padding: 20px;
border-radius: 20px;
margin: 10px 0;
background-image: linear-gradient(30deg, #CFE1FC 0%, #CFE1FC 55%, #B5E6FF 75%, #84C0FF 100%);
background-repeat: no-repeat;
background-clip: border-box;
background-size: 100% 100%;
border: 1px solid #B5E6FF;
box-shadow: 0px 0px 50px 0px #92D3FE14 inset;
position: relative;
}
.ai-format-img > img {
content: " ";
display: block;
width: 100%;
height: auto;
border-radius: 20px;
position: relative;
z-index: 1;
}
.ai-format-img::after {
content: '';
display: block;
width: 3.33vw !important;
height: 3.33vw !important;
visibility: visible !important;
border-radius: 50%;
background: radial-gradient(72.37% 84.58% at 32.71% 15.42%, #ADD3FF 0%, #59B8F7 38.76%, #499FF5 76.56%);
box-shadow: 6.61px 13.22px 14.87px 0px #0047C21A,
0px 0px 19.83px 0px #FFFFFF inset,
0px 3.3px 3.3px 0px #FFFFFF40 inset,
6.61px 6.61px 19.83px 0px #FFFFFF99 inset;
position: absolute;
bottom: 8px;
right: 6px;
z-index: 2;
}
.crossRefer {
border-bottom: solid 2px #3A8BFF;
}
.gallery-wrap[data-format=sideBySide] .gallery-main .gallery-image-wrap {
display: none
}
.gallery-wrap[data-format=singleCenter] .gallery-main .gallery-image-wrap {
display: none
}
.gallery-wrap[data-format=singleCenter] .gallery-main .gallery-image-wrap:first-child {
width: 100%;
display: flex
}
.gallery-wrap[data-format=sideBySide] .gallery-main .gallery-image-wrap:first-child,.gallery-wrap[data-format=sideBySide] .gallery-main .gallery-image-wrap:nth-child(2) {
display: flex
}
.table_box table {
width: max-content!important;
box-sizing: border-box;
display: table;
table-layout: fixed;
border-collapse: collapse;
margin-bottom: 3px;
}
.table_box table p, .table_box table li[level]::before{
font-size: 14px !important;
}
.table_box table img[lazyimg][modifyImg='0']{
height: auto!important;
width: auto!important;
}
/* .ProseMirror table .image_desc{
width: auto!important;
} */
.table_box table .desc_auto{
width: auto!important;
}
.table_box table div[isplaceholder='true'] img[modifyImg='0']{
height: auto!important;
width: auto!important;
}
.table_box{
padding-top: 25px;
pointer-events: auto;
overflow-x: auto;
width: 100%;
max-width: 100%;
}
.table_box table[headerrow="1"] tbody tr:first-child td{
background-color: #F2F4F7;
font-weight: 600;
}
.table_box table[headercol="1"] tbody tr td:first-child{
background-color: #F2F4F7;
font-weight: 600;
}
.table_box table[alignsetting="left"]{
margin-left: 0!important;
margin-right: auto!important;
}
.table_box table[alignsetting="center"]{
margin-left: auto!important;
margin-right: auto!important;
}
.table_box table[alignsetting="right"]{
margin-left: auto!important;
margin-right: 0!important;
}
.table_box::-webkit-scrollbar {
width:8px;
height: 8px;
}
.table_box::-webkit-scrollbar-track {
background: transparent;
}
.table_box::-webkit-scrollbar-thumb {
border-radius: 20px;
background-color: #DADFE5;
}
.ans-cc .table_box th,.ans-cc .table_box td{
border: 1px solid #D9D9D9;
padding: 0 10px!important;
height: 40px;
}
.ans-cc .table_box table{
max-width: none!important;
}
.table_box::-webkit-scrollbar-thumb{ visibility: hidden; }
.table_box:hover::-webkit-scrollbar-thumb{ visibility: visible; }
.table_box_hover::-webkit-scrollbar-thumb{ visibility: visible; }
.table_box table {
width: max-content!important;
box-sizing: border-box;
display: table;
table-layout: fixed;
border-collapse: collapse;
margin-bottom: 3px;
}
.audio_knowledgePoint{
position: relative;
display: none;
margin-top:20px;
border: 1px solid #EBEEF2;
border-radius:10px;
}
.audio_knowledgePoint_tit{
font-size:16px;
font-weight:600;
color:#131B26;
padding:0 20px;
border-bottom:solid 1px #F2F2F2;
height: 53px;
line-height: 53px;
position: relative;
}
.audio_knowledgePoint_tit:after{
content: '';
position: absolute;
left: 28px;
bottom: -1px;
width: 32px;
height: 4px;
background:#3A8BFF;
border-radius:2px;
}
.audio_knowledgePoint_ul{
overflow: hidden;
padding:11px 11px 25px 25px
}
.audio_knowledgePoint_ul .topicItem{
float: left;
margin-right:14px;
margin-top:14px;
padding:0 14px;
box-sizing: border-box;
max-width: 228px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
background: #ECEFF4;
border-radius:14px;
height: 29px;
line-height: 29px;
font-size:12px;
color:#181E33;
cursor: pointer;
}
.audio_knowledgePoint_ul .topicItem .knowledgePointName{
display: inline-block;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.audio_knowledgePoint::before{
content: '';
position: absolute;
left:38px;
top: -8px;
width: 18px;
height: 9px;
background: url(/ananas/css/audio_arr.png) no-repeat;
background-size: 100%;
}
.ans-cc ol{
list-style-type: decimal;
}
.ans-cc ol ol{
list-style-type: lower-alpha;
}
.ans-cc ol ol ol{
list-style-type: lower-roman;
}
.ans-cc ol ol ol ol{
list-style-type: upper-alpha;
}
.ans-cc ol ol ol ol ol{
list-style-type: upper-roman;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
if (typeof ServerHosts == 'undefined'){
document.write('<script src="/ananas/ext/ananas/ServerHosts.js?v=2024-0119-1400"></script>');
}
document.write('<script src="/ananas/ext-4.2.0.663/all-classes.js?v=2024-1024-1400"></script>');

View File

@@ -0,0 +1,4 @@
if (typeof ServerHosts == 'undefined'){
document.write('<script src="/ananas/ext/ananas/ServerHosts.js?v=2024-0119-1400"></script>');
}
document.write('<script src="/ananas/ext-4.2.0.663/all-classes.js?v=2024-1024-1400"></script>');

View File

@@ -0,0 +1,3 @@
if (typeof ServerHosts == 'undefined'){
document.write('<script src="/ananas/ext/ananas/ServerHosts.js?v=2023-1024-1400"></script>');
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,72 @@
// JavaScript Document
(function($){
$.fn.disappearDefault=function(options){
var opts=jQuery.extend({},jQuery.fn.disappearDefault.defaults,options);
$(this).val(opts.vals);
$(this).css({color:opts.defaultColor});
$(this).focus(function(){
if($(this).val()==opts.vals){
$(this).val('');}else {
return false;
}
$(this).css({color:opts.color});
opts.callback($(this));
});
$(this).blur(function(){
if(opts.showDefault){
if($(this).val()==''){
$(this).val(opts.vals);
$(this).css({color:opts.defaultColor});
}
}
});
}
})(jQuery);
$.fn.disappearDefault.defaults={
vals:"标签用逗号或空格隔开",
defaultColor:"#999",
color:"#333",
callback:function(o){},
showDefault:false
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,243 @@
(function($) {
"use strict";
$.fn.jQCloud = function(word_array, options) {
// 容器元素的引用
var $this = this;
// 都已ID命名 避免多个标签之间的碰撞
var cloud_namespace = $this.attr('id') || Math.floor((Math.random() * 1000000)).toString(36);
// 默认选项值
var default_options = {
width: $this.width(),
height: $this.height(),
center: {
x: ((options && options.width) ? options.width : $this.width()) / 2.0,
y: ((options && options.height) ? options.height : $this.height()) / 2.0
},
delayedMode: word_array.length > 50,
shape: false, // 默认为椭圆形状
encodeURI: true,
removeOverflowing: true
};
options = $.extend(default_options, options || {});
// “jqcloud”类添加到容器简单的CSS样式,设置容器宽度/高度
//$this.addClass("jqcloud").width(options.width).height(options.height);
// 容器的CSS位置不能为“静态”
if ($this.css("position") === "static") {
$this.css("position", "relative");
}
var drawWordCloud = function() {
//Helper函数来测试如果一个元素重叠
var hitTest = function(elem, other_elems) {
// 两两重叠检测
var overlapping = function(a, b) {
if (Math.abs(2.0 * a.offsetLeft + a.offsetWidth - 2.0 * b.offsetLeft - b.offsetWidth) < a.offsetWidth + b.offsetWidth) {
if (Math.abs(2.0 * a.offsetTop + a.offsetHeight - 2.0 * b.offsetTop - b.offsetHeight) < a.offsetHeight + b.offsetHeight) {
return true;
}
}
return false;
};
var i = 0;
// 检查元素重叠一个接一个,停止并返回false一旦发现重叠
for (i = 0; i < other_elems.length; i++) {
if (overlapping(elem, other_elems[i])) {
return true;
}
}
return false;
};
// 确保每一个重量之前是一个数字排序
for (var i = 0; i < word_array.length; i++) {
word_array[i].weight = parseFloat(word_array[i].weight, 10);
}
// 排序word_array从最高的词体重最低的一个
word_array.sort(function(a, b) {
if (a.weight < b.weight) {
return 1;
} else if (a.weight > b.weight) {
return -1;
} else {
return 0;
}
});
var step = (options.shape === "rectangular") ? 18.0 : 2.0,
already_placed_words = [],
aspect_ratio = options.width / options.height;
// 函数画一词,在螺旋通过移动它,直到找到一个合适的空地方。这将是迭代每个单词。
var drawOneWord = function(index, word) {
// 定义跨越的ID属性,将这个词,和相关的jQuery选择器字符串
var word_id = cloud_namespace + "_word_" + index,
word_selector = "#" + word_id,
angle = 6.28 * Math.random(),
radius = 0.0,
// Only used if option.shape == 'rectangular'
steps_in_direction = 0.0,
quarter_turns = 0.0,
weight = 5,
custom_class = "",
inner_html = "",
word_span;
if (word_array.length > 6) {
weight = 2;
}
// 扩展词html选项默认值
word.html = $.extend(word.html, {
id: word_id
});
// 如果指定的自定义类,把它们放在一个变量并将它从html attrs,避免由jQCloud覆盖类
if (word.html && word.html["class"]) {
custom_class = word.html["class"];
delete word.html["class"];
}
// 检查是否min(重量)> max(重量)否则使用默认
if (word_array[0].weight > word_array[word_array.length - 1].weight) {
// 线性映射原体重一个离散的规模从1到10
weight = Math.round((word.weight - word_array[word_array.length - 1].weight) /
(word_array[0].weight - word_array[word_array.length - 1].weight) * 9) + 1;
}
word_span = $('<span>').attr(word.html).addClass('w' + weight + " " + custom_class);
// 如果单词添加链接。url属性设置
if (word.link) {
//如果链接是一个字符串,然后使用它作为href链接
if (typeof word.link === "string") {
word.link = {
href: word.link
};
}
// 扩展链接的html选项默认值
if (options.encodeURI) {
word.link = $.extend(word.link, {
href: encodeURI(word.link.href).replace(/'/g, "%27")
});
}
inner_html = $('<a>').attr(word.link).text(word.text);
} else {
inner_html = word.text;
}
word_span.append(inner_html);
// 将处理程序绑定到单词
if (!!word.handlers) {
for (var prop in word.handlers) {
if (word.handlers.hasOwnProperty(prop) && typeof word.handlers[prop] === 'function') {
$(word_span).bind(prop, word.handlers[prop]);
}
}
}
$this.append(word_span);
var width = word_span.width(),
height = word_span.height(),
left = options.center.x - width / 2.0,
top = options.center.y - height / 2.0;
// 保存样式属性的引用,获得更好的性能
var word_style = word_span[0].style;
word_style.position = "absolute";
word_style.left = left + "px";
word_style.top = top + "px";
while (hitTest(word_span[0], already_placed_words)) {
// 选择形状是矩形的移动这个词在一个矩形螺旋
if (options.shape === "rectangular") {
steps_in_direction++;
if (steps_in_direction * step > (1 + Math.floor(quarter_turns / 2.0)) * step * ((quarter_turns % 4 % 2) === 0 ? 1 : aspect_ratio)) {
steps_in_direction = 0.0;
quarter_turns++;
}
switch (quarter_turns % 4) {
case 1:
left += step * aspect_ratio + Math.random() * 2.0;
break;
case 2:
top -= step + Math.random() * 2.0;
break;
case 3:
left -= step * aspect_ratio + Math.random() * 2.0;
break;
case 0:
top += step + Math.random() * 2.0;
break;
}
} else { // 默认设置:椭圆螺旋形状
radius += step;
angle += (index % 2 === 0 ? 1 : -1) * step;
left = options.center.x - (width / 2.0) + (radius * Math.cos(angle)) * aspect_ratio;
top = options.center.y + radius * Math.sin(angle) - (height / 2.0);
}
word_style.left = left + "px";
word_style.top = top + "px";
}
// 不呈现词如果外面将容器的一部分
if (options.removeOverflowing && (left < 0 || top < 0 || (left + width) > options.width || (top + height) > options.height)) {
word_span.remove()
return;
}
already_placed_words.push(word_span[0]);
// 如果现有调用回调
if ($.isFunction(word.afterWordRender)) {
word.afterWordRender.call(word_span);
}
};
var drawOneWordDelayed = function(index) {
index = index || 0;
if (!$this.is(':visible')) { // 如果不可见,那么不要试图拉
setTimeout(function() {
drawOneWordDelayed(index);
}, 10);
return;
}
if (index < word_array.length) {
drawOneWord(index, word_array[index]);
setTimeout(function() {
drawOneWordDelayed(index + 1);
}, 10);
} else {
if ($.isFunction(options.afterCloudRender)) {
options.afterCloudRender.call($this);
}
}
};
// 迭代drawOneWord上每一个字。迭代的方式完成取决于绘图模式(delayedMode是真或假的)
if (options.delayedMode) {
drawOneWordDelayed();
} else {
$.each(word_array, drawOneWord);
if ($.isFunction(options.afterCloudRender)) {
options.afterCloudRender.call($this);
}
}
};
// 延迟执行,以便在浏览器可以渲染云画推算的强化词前的页面
setTimeout(function() {
drawWordCloud();
}, 10);
return $this;
};
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(g.state==0){g.start=c(g.elem,e);g.end=b(g.end)}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]}})(jQuery);

View File

@@ -0,0 +1,230 @@
/**
* jQuery MD5 hash algorithm function
*
* <code>
* Calculate the md5 hash of a String
* String $.md5 ( String str )
* </code>
*
* Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash.
* MD5 (Message-Digest algorithm 5) is a widely-used cryptographic hash function with a 128-bit hash value. MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of data. The generated hash is also non-reversable. Data cannot be retrieved from the message digest, the digest uniquely identifies the data.
* MD5 was developed by Professor Ronald L. Rivest in 1994. Its 128 bit (16 byte) message digest makes it a faster implementation than SHA-1.
* This script is used to process a variable length message into a fixed-length output of 128 bits using the MD5 algorithm. It is fully compatible with UTF-8 encoding. It is very useful when u want to transfer encrypted passwords over the internet. If you plan using UTF-8 encoding in your project don't forget to set the page encoding to UTF-8 (Content-Type meta tag).
* This function orginally get from the WebToolkit and rewrite for using as the jQuery plugin.
*
* Example
* Code
* <code>
* $.md5("I'm Persian.");
* </code>
* Result
* <code>
* "b8c901d0f02223f9761016cfff9d68df"
* </code>
*
* @alias Muhammad Hussein Fattahizadeh < muhammad [AT] semnanweb [DOT] com >
* @link http://www.semnanweb.com/jquery-plugin/md5.html
* @see http://www.webtoolkit.info/
* @license http://www.gnu.org/licenses/gpl.html [GNU General Public License]
* @param {jQuery} {md5:function(string))
* @return string
*/
(function($){
var rotateLeft = function(lValue, iShiftBits) {
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
}
var addUnsigned = function(lX, lY) {
var lX4, lY4, lX8, lY8, lResult;
lX8 = (lX & 0x80000000);
lY8 = (lY & 0x80000000);
lX4 = (lX & 0x40000000);
lY4 = (lY & 0x40000000);
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
if (lX4 | lY4) {
if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
else return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
} else {
return (lResult ^ lX8 ^ lY8);
}
}
var F = function(x, y, z) {
return (x & y) | ((~ x) & z);
}
var G = function(x, y, z) {
return (x & z) | (y & (~ z));
}
var H = function(x, y, z) {
return (x ^ y ^ z);
}
var I = function(x, y, z) {
return (y ^ (x | (~ z)));
}
var FF = function(a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var GG = function(a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var HH = function(a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var II = function(a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var convertToWordArray = function(string) {
var lWordCount;
var lMessageLength = string.length;
var lNumberOfWordsTempOne = lMessageLength + 8;
var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64;
var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16;
var lWordArray = Array(lNumberOfWords - 1);
var lBytePosition = 0;
var lByteCount = 0;
while (lByteCount < lMessageLength) {
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
lBytePosition = (lByteCount % 4) * 8;
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
lByteCount++;
}
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
lBytePosition = (lByteCount % 4) * 8;
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
return lWordArray;
};
var wordToHex = function(lValue) {
var WordToHexValue = "", WordToHexValueTemp = "", lByte, lCount;
for (lCount = 0; lCount <= 3; lCount++) {
lByte = (lValue >>> (lCount * 8)) & 255;
WordToHexValueTemp = "0" + lByte.toString(16);
WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2);
}
return WordToHexValue;
};
var uTF8Encode = function(string) {
string = string.replace(/\x0d\x0a/g, "\x0a");
var output = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
output += String.fromCharCode(c);
} else if ((c > 127) && (c < 2048)) {
output += String.fromCharCode((c >> 6) | 192);
output += String.fromCharCode((c & 63) | 128);
} else {
output += String.fromCharCode((c >> 12) | 224);
output += String.fromCharCode(((c >> 6) & 63) | 128);
output += String.fromCharCode((c & 63) | 128);
}
}
return output;
};
$.extend({
md5: function(string) {
var x = Array();
var k, AA, BB, CC, DD, a, b, c, d;
var S11=7, S12=12, S13=17, S14=22;
var S21=5, S22=9 , S23=14, S24=20;
var S31=4, S32=11, S33=16, S34=23;
var S41=6, S42=10, S43=15, S44=21;
string = uTF8Encode(string);
x = convertToWordArray(string);
a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
for (k = 0; k < x.length; k += 16) {
AA = a; BB = b; CC = c; DD = d;
a = FF(a, b, c, d, x[k+0], S11, 0xD76AA478);
d = FF(d, a, b, c, x[k+1], S12, 0xE8C7B756);
c = FF(c, d, a, b, x[k+2], S13, 0x242070DB);
b = FF(b, c, d, a, x[k+3], S14, 0xC1BDCEEE);
a = FF(a, b, c, d, x[k+4], S11, 0xF57C0FAF);
d = FF(d, a, b, c, x[k+5], S12, 0x4787C62A);
c = FF(c, d, a, b, x[k+6], S13, 0xA8304613);
b = FF(b, c, d, a, x[k+7], S14, 0xFD469501);
a = FF(a, b, c, d, x[k+8], S11, 0x698098D8);
d = FF(d, a, b, c, x[k+9], S12, 0x8B44F7AF);
c = FF(c, d, a, b, x[k+10], S13, 0xFFFF5BB1);
b = FF(b, c, d, a, x[k+11], S14, 0x895CD7BE);
a = FF(a, b, c, d, x[k+12], S11, 0x6B901122);
d = FF(d, a, b, c, x[k+13], S12, 0xFD987193);
c = FF(c, d, a, b, x[k+14], S13, 0xA679438E);
b = FF(b, c, d, a, x[k+15], S14, 0x49B40821);
a = GG(a, b, c, d, x[k+1], S21, 0xF61E2562);
d = GG(d, a, b, c, x[k+6], S22, 0xC040B340);
c = GG(c, d, a, b, x[k+11], S23, 0x265E5A51);
b = GG(b, c, d, a, x[k+0], S24, 0xE9B6C7AA);
a = GG(a, b, c, d, x[k+5], S21, 0xD62F105D);
d = GG(d, a, b, c, x[k+10], S22, 0x2441453);
c = GG(c, d, a, b, x[k+15], S23, 0xD8A1E681);
b = GG(b, c, d, a, x[k+4], S24, 0xE7D3FBC8);
a = GG(a, b, c, d, x[k+9], S21, 0x21E1CDE6);
d = GG(d, a, b, c, x[k+14], S22, 0xC33707D6);
c = GG(c, d, a, b, x[k+3], S23, 0xF4D50D87);
b = GG(b, c, d, a, x[k+8], S24, 0x455A14ED);
a = GG(a, b, c, d, x[k+13], S21, 0xA9E3E905);
d = GG(d, a, b, c, x[k+2], S22, 0xFCEFA3F8);
c = GG(c, d, a, b, x[k+7], S23, 0x676F02D9);
b = GG(b, c, d, a, x[k+12], S24, 0x8D2A4C8A);
a = HH(a, b, c, d, x[k+5], S31, 0xFFFA3942);
d = HH(d, a, b, c, x[k+8], S32, 0x8771F681);
c = HH(c, d, a, b, x[k+11], S33, 0x6D9D6122);
b = HH(b, c, d, a, x[k+14], S34, 0xFDE5380C);
a = HH(a, b, c, d, x[k+1], S31, 0xA4BEEA44);
d = HH(d, a, b, c, x[k+4], S32, 0x4BDECFA9);
c = HH(c, d, a, b, x[k+7], S33, 0xF6BB4B60);
b = HH(b, c, d, a, x[k+10], S34, 0xBEBFBC70);
a = HH(a, b, c, d, x[k+13], S31, 0x289B7EC6);
d = HH(d, a, b, c, x[k+0], S32, 0xEAA127FA);
c = HH(c, d, a, b, x[k+3], S33, 0xD4EF3085);
b = HH(b, c, d, a, x[k+6], S34, 0x4881D05);
a = HH(a, b, c, d, x[k+9], S31, 0xD9D4D039);
d = HH(d, a, b, c, x[k+12], S32, 0xE6DB99E5);
c = HH(c, d, a, b, x[k+15], S33, 0x1FA27CF8);
b = HH(b, c, d, a, x[k+2], S34, 0xC4AC5665);
a = II(a, b, c, d, x[k+0], S41, 0xF4292244);
d = II(d, a, b, c, x[k+7], S42, 0x432AFF97);
c = II(c, d, a, b, x[k+14], S43, 0xAB9423A7);
b = II(b, c, d, a, x[k+5], S44, 0xFC93A039);
a = II(a, b, c, d, x[k+12], S41, 0x655B59C3);
d = II(d, a, b, c, x[k+3], S42, 0x8F0CCC92);
c = II(c, d, a, b, x[k+10], S43, 0xFFEFF47D);
b = II(b, c, d, a, x[k+1], S44, 0x85845DD1);
a = II(a, b, c, d, x[k+8], S41, 0x6FA87E4F);
d = II(d, a, b, c, x[k+15], S42, 0xFE2CE6E0);
c = II(c, d, a, b, x[k+6], S43, 0xA3014314);
b = II(b, c, d, a, x[k+13], S44, 0x4E0811A1);
a = II(a, b, c, d, x[k+4], S41, 0xF7537E82);
d = II(d, a, b, c, x[k+11], S42, 0xBD3AF235);
c = II(c, d, a, b, x[k+2], S43, 0x2AD7D2BB);
b = II(b, c, d, a, x[k+9], S44, 0xEB86D391);
a = addUnsigned(a, AA);
b = addUnsigned(b, BB);
c = addUnsigned(c, CC);
d = addUnsigned(d, DD);
}
var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
return tempValue.toLowerCase();
}
});
})(jQuery);

View File

@@ -0,0 +1,197 @@
(function($){
var rotateLeft = function(lValue, iShiftBits) {
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
}
var addUnsigned = function(lX, lY) {
var lX4, lY4, lX8, lY8, lResult;
lX8 = (lX & 0x80000000);
lY8 = (lY & 0x80000000);
lX4 = (lX & 0x40000000);
lY4 = (lY & 0x40000000);
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
if (lX4 | lY4) {
if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
else return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
} else {
return (lResult ^ lX8 ^ lY8);
}
}
var F = function(x, y, z) {
return (x & y) | ((~ x) & z);
}
var G = function(x, y, z) {
return (x & z) | (y & (~ z));
}
var H = function(x, y, z) {
return (x ^ y ^ z);
}
var I = function(x, y, z) {
return (y ^ (x | (~ z)));
}
var FF = function(a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var GG = function(a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var HH = function(a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var II = function(a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var convertToWordArray = function(string) {
var lWordCount;
var lMessageLength = string.length;
var lNumberOfWordsTempOne = lMessageLength + 8;
var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64;
var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16;
var lWordArray = Array(lNumberOfWords - 1);
var lBytePosition = 0;
var lByteCount = 0;
while (lByteCount < lMessageLength) {
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
lBytePosition = (lByteCount % 4) * 8;
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
lByteCount++;
}
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
lBytePosition = (lByteCount % 4) * 8;
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
return lWordArray;
};
var wordToHex = function(lValue) {
var WordToHexValue = "", WordToHexValueTemp = "", lByte, lCount;
for (lCount = 0; lCount <= 3; lCount++) {
lByte = (lValue >>> (lCount * 8)) & 255;
WordToHexValueTemp = "0" + lByte.toString(16);
WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2);
}
return WordToHexValue;
};
var uTF8Encode = function(string) {
string = string.replace(/\x0d\x0a/g, "\x0a");
var output = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
output += String.fromCharCode(c);
} else if ((c > 127) && (c < 2048)) {
output += String.fromCharCode((c >> 6) | 192);
output += String.fromCharCode((c & 63) | 128);
} else {
output += String.fromCharCode((c >> 12) | 224);
output += String.fromCharCode(((c >> 6) & 63) | 128);
output += String.fromCharCode((c & 63) | 128);
}
}
return output;
};
$.extend({
md5: function(string) {
var x = Array();
var k, AA, BB, CC, DD, a, b, c, d;
var S11=7, S12=12, S13=17, S14=22;
var S21=5, S22=9 , S23=14, S24=20;
var S31=4, S32=11, S33=16, S34=23;
var S41=6, S42=10, S43=15, S44=21;
string = uTF8Encode(string);
x = convertToWordArray(string);
a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
for (k = 0; k < x.length; k += 16) {
AA = a; BB = b; CC = c; DD = d;
a = FF(a, b, c, d, x[k+0], S11, 0xD76AA478);
d = FF(d, a, b, c, x[k+1], S12, 0xE8C7B756);
c = FF(c, d, a, b, x[k+2], S13, 0x242070DB);
b = FF(b, c, d, a, x[k+3], S14, 0xC1BDCEEE);
a = FF(a, b, c, d, x[k+4], S11, 0xF57C0FAF);
d = FF(d, a, b, c, x[k+5], S12, 0x4787C62A);
c = FF(c, d, a, b, x[k+6], S13, 0xA8304613);
b = FF(b, c, d, a, x[k+7], S14, 0xFD469501);
a = FF(a, b, c, d, x[k+8], S11, 0x698098D8);
d = FF(d, a, b, c, x[k+9], S12, 0x8B44F7AF);
c = FF(c, d, a, b, x[k+10], S13, 0xFFFF5BB1);
b = FF(b, c, d, a, x[k+11], S14, 0x895CD7BE);
a = FF(a, b, c, d, x[k+12], S11, 0x6B901122);
d = FF(d, a, b, c, x[k+13], S12, 0xFD987193);
c = FF(c, d, a, b, x[k+14], S13, 0xA679438E);
b = FF(b, c, d, a, x[k+15], S14, 0x49B40821);
a = GG(a, b, c, d, x[k+1], S21, 0xF61E2562);
d = GG(d, a, b, c, x[k+6], S22, 0xC040B340);
c = GG(c, d, a, b, x[k+11], S23, 0x265E5A51);
b = GG(b, c, d, a, x[k+0], S24, 0xE9B6C7AA);
a = GG(a, b, c, d, x[k+5], S21, 0xD62F105D);
d = GG(d, a, b, c, x[k+10], S22, 0x2441453);
c = GG(c, d, a, b, x[k+15], S23, 0xD8A1E681);
b = GG(b, c, d, a, x[k+4], S24, 0xE7D3FBC8);
a = GG(a, b, c, d, x[k+9], S21, 0x21E1CDE6);
d = GG(d, a, b, c, x[k+14], S22, 0xC33707D6);
c = GG(c, d, a, b, x[k+3], S23, 0xF4D50D87);
b = GG(b, c, d, a, x[k+8], S24, 0x455A14ED);
a = GG(a, b, c, d, x[k+13], S21, 0xA9E3E905);
d = GG(d, a, b, c, x[k+2], S22, 0xFCEFA3F8);
c = GG(c, d, a, b, x[k+7], S23, 0x676F02D9);
b = GG(b, c, d, a, x[k+12], S24, 0x8D2A4C8A);
a = HH(a, b, c, d, x[k+5], S31, 0xFFFA3942);
d = HH(d, a, b, c, x[k+8], S32, 0x8771F681);
c = HH(c, d, a, b, x[k+11], S33, 0x6D9D6122);
b = HH(b, c, d, a, x[k+14], S34, 0xFDE5380C);
a = HH(a, b, c, d, x[k+1], S31, 0xA4BEEA44);
d = HH(d, a, b, c, x[k+4], S32, 0x4BDECFA9);
c = HH(c, d, a, b, x[k+7], S33, 0xF6BB4B60);
b = HH(b, c, d, a, x[k+10], S34, 0xBEBFBC70);
a = HH(a, b, c, d, x[k+13], S31, 0x289B7EC6);
d = HH(d, a, b, c, x[k+0], S32, 0xEAA127FA);
c = HH(c, d, a, b, x[k+3], S33, 0xD4EF3085);
b = HH(b, c, d, a, x[k+6], S34, 0x4881D05);
a = HH(a, b, c, d, x[k+9], S31, 0xD9D4D039);
d = HH(d, a, b, c, x[k+12], S32, 0xE6DB99E5);
c = HH(c, d, a, b, x[k+15], S33, 0x1FA27CF8);
b = HH(b, c, d, a, x[k+2], S34, 0xC4AC5665);
a = II(a, b, c, d, x[k+0], S41, 0xF4292244);
d = II(d, a, b, c, x[k+7], S42, 0x432AFF97);
c = II(c, d, a, b, x[k+14], S43, 0xAB9423A7);
b = II(b, c, d, a, x[k+5], S44, 0xFC93A039);
a = II(a, b, c, d, x[k+12], S41, 0x655B59C3);
d = II(d, a, b, c, x[k+3], S42, 0x8F0CCC92);
c = II(c, d, a, b, x[k+10], S43, 0xFFEFF47D);
b = II(b, c, d, a, x[k+1], S44, 0x85845DD1);
a = II(a, b, c, d, x[k+8], S41, 0x6FA87E4F);
d = II(d, a, b, c, x[k+15], S42, 0xFE2CE6E0);
c = II(c, d, a, b, x[k+6], S43, 0xA3014314);
b = II(b, c, d, a, x[k+13], S44, 0x4E0811A1);
a = II(a, b, c, d, x[k+4], S41, 0xF7537E82);
d = II(d, a, b, c, x[k+11], S42, 0xBD3AF235);
c = II(c, d, a, b, x[k+2], S43, 0x2AD7D2BB);
b = II(b, c, d, a, x[k+9], S44, 0xEB86D391);
a = addUnsigned(a, AA);
b = addUnsigned(b, BB);
c = addUnsigned(c, CC);
d = addUnsigned(d, DD);
}
var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
return tempValue.toLowerCase();
}
});
})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,330 @@
/** 编辑链接工具栏 */
function initLinkToolbar(me, domUtils) {
var linkToolbar;
//鼠标移上显示折叠
me.addListener('mouseover', function (type, e) {
var aLink;
if (e.target.nodeName == 'A') {
aLink = e.target;
} else if(linkToolbar){
linkToolbar.hide();
}
if (aLink) {
if(aLink.innerText.trim() == '' || domUtils.isFillChar(aLink.innerText.trim()) || aLink.innerText.trim() == '' || aLink.getAttribute('href') == '' || aLink.getAttribute('name')){
return
}
if (!linkToolbar) {
linkToolbar = new Link();
linkToolbar.init(me, aLink);
me.ui.getDom().appendChild(linkToolbar.resizer);
}
linkToolbar.show(aLink,domUtils);
}
});
me.addListener('mouseleave',function (type,e) {
var aLink;
if (/a/i.test(e.target.nodeName)) {
aLink = e.target;
}
if(aLink){
}
})
$('body').on('mouseover', function (e) {
if ($(e.target).hasClass('edui-editor-linkToolbar') || $(e.target).parents('.edui-editor-linkToolbar').length > 0) {
var resizer = $(e.target).hasClass('edui-editor-linkToolbar') ? e.target : $(e.target).parents('.edui-editor-linkToolbar')[0];
var editorId = $(resizer).parents('.edui-editor.edui-default').parent().attr('id');
var editor = UE.getEditor(editorId);
//列表悬浮隐藏
$(editor.body).find('li').removeClass('hover');
$(resizer).parents('.edui-editor.edui-default').parent().find('.listtoolList,.modifyListNum,.edui-editor-listtoolbar .hoverTips').hide();
$(resizer).parents('.edui-editor.edui-default').parent().find('.continueListNumBtn,.startNewListBtn,.modifyListNumBtn').removeClass('disabled');
$(resizer).parents('.edui-editor.edui-default').parent().find('.edui-editor-listtoolbar').removeClass('hover');
if ($(editor.container).find('.edui-editor-linkToolbar')[0] == resizer) {
$(editor.body).find('a').eq($(resizer).attr('index')).addClass('hover');
}
}
})
$(me.container).on('mouseleave', function (e) {
if(linkToolbar){
linkToolbar.hide();
}
})
me.addListener("contentchange", function () {
$(me.container).find('.edui-editor-linkToolbar').removeClass('hover')
})
//打开编辑链接弹窗
me.openEditLinkModal = function (iframeType, linkindex, editorId) {
//新泛雅弹窗覆盖顶部和左侧
if (top) {
top.postMessage('{"cmd":1,"toggle":true}', "*");
}
if ($('.popUeditorEditLinkShowHide').length == 0) {
var imgPrefix = (RichTextUitl.prefix || RichTextUitl.noteDomain) + '/res/plugin/ueditor/';
if(RichTextUitl.intranetMode){
imgPrefix = RichTextUitl.prefix
}
var div = document.createElement('div');
div.className = 'maskDiv popUeditorEditLinkShowHide editorMaskDiv';
div.style.cssText = 'display: none;'
div.innerHTML = '<div class="popDiv wid640 popMove">'
+ '<div class="popHead">'
+ '<a href="javascript:void(0);" class="popClose fr"><img src="' + imgPrefix + 'themes/default/images/popClose.png"></a>'
+ '<p class="fl fs18 colorDeep lh60" >' + me.getLang('popModal.link') + '</p>'
+ '</div>'
+ '<div class="het62"></div>'
+ '<div class="popWebsite_form">'
+ '<div class="popWebsite_row hyperlink-dialog-wrapper">'
+ '<span class="popWebsite_name colorIn fs14 fl">更换图标</span>'
+ '<img id="linkIcon" src="'+imgPrefix+'themes/default/images/iconLink.png" />'
+ '<span class="changeIcon"></span>'
+ '<input id="uploadIcon" style="display:none" accept="image/png, image/jpeg" type="file">'
+ '</div> '
+ '<div class="popWebsite_row">'
+ '<span class="popWebsite_name colorIn fs14 fl linkTitle">' + me.getLang('popModal.linkTitle') + '</span>'
+ '<input type="text" name="" id="text" value="" class="popWebsite_input fl" placeholder="' + me.getLang('popModal.linkTitlePlaceholder') + '" autocomplete="off" spellcheck="false">'
+ '</div>'
+ '<div class="popWebsite_row">'
+ '<span class="popWebsite_name colorIn fs14 fl linkUrl">' + me.getLang('popModal.linkHref') + '</span>'
+ '<input type="text" name="" id="href" value="" class="popWebsite_input fl" placeholder="' + me.getLang('popModal.linkHrefPlaceholder') + '" autocomplete="off" spellcheck="false" >'
+ '<span class="popWebsite_xing fl">*</span>'
+ '<p class="popWebsite_tishi" id="msg" style="display:none;">' + me.getLang('popModal.linkErrorTips') + 'https://www.baidu.com</p>'
+ '</div>'
+ '<div class="popWebsite_row mode_row">'
+'<span class="popWebsite_name colorIn fs14 fl linkMode">附件模式</span>'
+ '<input type="radio" id="option1" name="option" value="1" checked>'
+ '<label for="option1">卡片模式</label>'
+ '<input type="radio" id="option2" name="option" value="2">'
+ '<label for="option2">文本模式</label>'
+ '</div>'
+ '</div>'
+ '<div class="popBottom shadowBox">'
+ '<a href="javascript:void(0);" class="btn-blue fr fs14 confirm">' + me.getLang('popModal.done') + '</a>'
+ '<a href="javascript:void(0);" class="btn-white fr fs14 cancle">' + me.getLang('popModal.cancel') + '</a>'
+ '</div>'
+ '<div class="het72"></div>'
+ '</div>';
document.body.appendChild(div);
// start 更换图标
let uploadElm = document.querySelector('#uploadIcon')
let linkIconElm = document.querySelector('#linkIcon')
linkIconElm.addEventListener('click', () => {
uploadElm.click()
})
uploadElm.addEventListener('change', () => {
let uploadData = getUploadData(uploadElm.files[0])
$.ajax({
url: 'https://pan-yz.chaoxing.com/upload',
type: "post",
processData: false,
contentType: false,
data: uploadData,
dataType: 'json',
// async:false,
xhrFields: {
withCredentials: true
},
success: function (res) {
if (res.result && res.data) {
uploaIcon = true
linkIconElm.src = res.data.previewUrl
}
},
});
})
function getUploadData(file) {
let data = new FormData()
if (file.name) {
data.append("name", file.name)
} else {
data.append("name", (new Date()).getTime())
}
data.append("lastModifiedDate", file.lastModifiedDate)
data.append("size", file.size)
data.append("type", file.type)
data.append("puid", RichTextUitl.puid)
// data.append("prdid",442)
data.append("_token", RichTextUitl.yunToken)
data.append("file", file)
return data
}
//keyup 实时校验url
$('body').on('keyup', '.popUeditorEditLinkShowHide input#href', function (e) {
me.editLinkCheckUrl(e.target);
})
//编辑链接弹窗--确认修改
$('body').on('click', '.popUeditorEditLinkShowHide .confirm', function () {
var linkindex = $('.popUeditorEditLinkShowHide').attr('linkindex');
var iframeType = $('.popUeditorEditLinkShowHide').attr('iframeType') || '';
var editorId = $('.popUeditorEditLinkShowHide').attr('editorId');
var modeType = $('.popUeditorEditLinkShowHide #option1').prop('checked')? 1 : 2;
if ($(".popUeditorEditLinkShowHide #msg").css("display") == 'block') {
return;
}
var editor = UE.getEditor(editorId);
var link;
if (iframeType == 'iframe') {
link = $(editor.body).find('iframe').eq(linkindex);
} else {
link = $(editor.body).find('a').eq(linkindex);
}
var newLogo = linkIconElm.src ? linkIconElm.src : '/res/pc/images/richtext/icon_att_web.png'
var newtitle = $('.popUeditorEditLinkShowHide #text').val();
var newhref = $('.popUeditorEditLinkShowHide #href').val();
if (newhref.indexOf('http://') == -1 && newhref.indexOf('https://') == -1 && newhref.indexOf('ftp://') == -1) {
newhref = 'https://' + newhref;
}
if (newtitle == '') newtitle = newhref;
link.text(newtitle);
if(link[0].name){
var data = RichTextUitl.b64DecodeUnicode(link[0].name);
data.att_web.logo = newLogo
data.att_web.title = newtitle;
data.att_web.url = newhref;
link.attr('name', RichTextUitl.b64EncodeUnicode(JSON.stringify(data)))
}
//获取更改链接后的图标
if (iframeType == 'iframe') {
link[0].contentWindow.postMessage({
'msgType': 'updateTitle',
'name': link[0].name,
}, "*");
} else {
link.attr('href', newhref);
}
if (iframeType == 'iframe' && modeType == 2 || iframeType != 'iframe' && modeType == 1) {
if(!link[0].name){
link.attr('name', RichTextUitl.b64EncodeUnicode(JSON.stringify({
"att_web": {
"content": "",
"logo": newLogo,
"showContent": 0,
"title": newtitle,
"url": newhref
},
"attachmentType": 25,
"cid": RichTextUitl.randomUUID()
})))
link.attr('module','insertWeb')
link.attr('class','dynacALink link')
}
me.changeAttachmentModel(link)
}
me.fireEvent('contentchange');
me.fireEvent('saveScene');
$('.popUeditorEditLinkShowHide').removeClass('maskFadeOut').hide()
$('body').removeClass('popOverflow');
if (top) {
top.postMessage('{"cmd":1,"toggle":false}', "*");
}
});
//编辑链接弹窗--关闭按钮
$('body').on('click', '.popUeditorEditLinkShowHide .popClose,.popUeditorEditLinkShowHide .btn-white', function () {
$('.popUeditorEditLinkShowHide').removeClass('maskFadeOut').hide()
$('body').removeClass('popOverflow');
if (top) {
top.postMessage('{"cmd":1,"toggle":false}', "*");
}
});
}
if (iframeType == 'iframe') {
var iframe = $(me.document.body).find('iframe').eq(linkindex);
var data = RichTextUitl.b64DecodeUnicode(iframe[0].name);
let logo = data.att_web.logo ? data.att_web.logo : '/res/pc/images/richtext/icon_att_web.png'
$('.popUeditorEditLinkShowHide #linkIcon').attr('src', logo)
$('.popUeditorEditLinkShowHide #text').val(data.att_web.title);
$('.popUeditorEditLinkShowHide #href').val(data.att_web.url);
$('.popUeditorEditLinkShowHide #option1')[0].checked = true;
} else {
var a = $(me.document.body).find('a').eq(linkindex);
$('.popUeditorEditLinkShowHide #text').val(a.text());
$('.popUeditorEditLinkShowHide #href').val(a.attr('href'));
$('.popUeditorEditLinkShowHide #option2')[0].checked = true;
}
$('.popUeditorEditLinkShowHide').addClass('maskFadeOut').attr('iframeType', iframeType).attr('linkindex', linkindex).attr('editorId', editorId).show();
$('body').addClass('popOverflow');
$('.popUeditorEditLinkShowHide .popDiv').css({
top: function () {
return ($(window).height() - $(this).height()) / 2;
},
left: function () {
return ($(window).width() - $(this).width()) / 2;
},
transform: 'none'
});
}
}
function Link() {
this.editor = null;
this.resizer = null;
this.doc = document;
this.Link = null;
}
Link.prototype = {
init: function (editor) {
var me = this;
me.editor = editor;
var resizer = me.resizer = document.createElement('div');
resizer.innerHTML = '<div class="link-toolbar-wrap">' +
'<div class="copy link">'+editor.getLang('toolbarCmds.copy') +'</div><div class="editLink">'+editor.getLang('toolbarCmds.edit') +'</div>' +
'</div>';
resizer.id = me.editor.ui.id + '_linkToolbar';
resizer.className = 'edui-editor-linkToolbar edui-editor-resizer';
resizer.style.cssText += ';z-index:' + (me.editor.options.zIndex) + ';';
me.editor.ui.getDom().appendChild(resizer);
me.initEvents();
},
initEvents: function () {
var me = this;
// 复制
$(me.resizer).on('click', '.copy', function() {
var _this = this;
var target = me.target;
me.editor.copyEle(this);
})
//编辑链接
$(me.resizer).on('click', '.editLink', function() {
var index = $(this).parents('.edui-editor-resizer').attr('index');
me.editor.openEditLinkModal('a', index, me.editor.key);
})
},
show: function (targetObj,domUtils) {
var me = this;
if (targetObj) {
me.resizer.classList.add('hover');
me.attachTo(targetObj,domUtils);
}
},
hide: function () {
var me = this;
me.resizer.classList.remove('hover');
},
attachTo: function (targetObj,domUtils) {
var me = this,
target = me.target = targetObj,
resizer = this.resizer,
titlePos = domUtils.getXY(target),
iframePos = domUtils.getXY(me.editor.iframe),
editorPos = domUtils.getXY(resizer.parentNode);
var index = $(me.editor.body).find('a').index(target);
resizer.setAttribute('index', index);
var clientRects = target.getClientRects();
var width = clientRects[0].width;
domUtils.setStyles(resizer, {
'width': width,
'height': 0,
'left': 0,
'top': iframePos.y + titlePos.y - me.editor.document.body.scrollTop - editorPos.y + 'px'
});
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,278 @@
/**
* 依赖jquery需要放置在jquery后面
*/
/** MathJax核心库配置对象(默认) */
window.MathJax = {
options: {
ignoreHtmlClass: "ig",
renderActions: {
addMenu: [0, "", ""],
},
menuOptions: {
settings: {assistiveMml: false}
}
},
loader: {
load: ["[tex]/all-packages"]
},
tex: {
/*
packages: {
"[+]": ["color"],
"[+]": ["boldsymbol"],
"[+]": ["physics"],
"[+]": ["mhchem"],
"[+]": ["cancel"],
"[+]": ["ams"],
"[+]": ["amscd"],
"[+]": ["unicode"],
"[+]": ["bbox"],
"[+]": ["noerrors"],
"[+]": ["newcommand"]
},
*/
inlineMath: [
//["$", "$"],
//["\\(", "\\)"],
],
displayMath: [
//["$$", "$$"],
//["\\[", "\\]"]
]
},
svg: {
// displayAlign: 'left',
scale: '1.2',
displayIndent: '0'
},
startup: {
ready: function(){
try {
if (MathJax.version === "3.0.5") {
var SVGWrapper = MathJax._.output.svg.Wrapper.SVGWrapper;
var CommonWrapper = SVGWrapper.prototype.__proto__;
SVGWrapper.prototype.unicodeChars = function (text, variant) {
if (!variant) variant = this.variant || "normal";
return CommonWrapper.unicodeChars.call(this, text, variant);
};
}
MathJax.startup.defaultReady();
mathJaxCustomStyle();
mathJaxLatex2Svg();
asyncMathJaxLatex2Svg();
}catch(err){
console.log(err);
}
},
typeset: false
}
};
function mathJaxLatex2Svg() {
try {
$(document).ready(function () {
//$('img.ans-latex-moudle,img.ans-edrawmath-moudle,img.ans-formula-moudle').each(function () {
$('img.ans-latex-moudle,img.ans-formula-moudle').each(function () {
var module = 'latex';
if($(this).hasClass('ans-edrawmath-moudle')){
module = 'edrawmath';
}
if($(this).hasClass('ans-formula-moudle')){
module = 'formula';
}
tex2SvgAction(this,module);
});
// $('span.latex-formula').each(function () {
// sourceTex2SvgAction(this);
// });
});
} catch (err) {
console.log(err);
}
}
function mathJaxTex2svg(data) {
try {
if (!data) {
return '';
}
var svg = MathJax.tex2svg(data, {});
svg = tex2SvgErrorCheck(data, svg);
return svg;
} catch (err) {
console.log(err);
return '';
}
}
function sourceTex2SvgAction(span) {
try {
var me = span;
var data = $(me).text();
if (!data) {
return;
}
var svg = MathJax.tex2svg(data, {});
svg = tex2SvgErrorCheck(data, svg);
if (svg && svg != '') {
$(svg).attr('latex-formula',escape(JSON.stringify(data)));
$(me).replaceWith(svg);
}
} catch (err) {
console.log(err);
}
}
function tex2SvgAction(img,module) {
try {
var me = img;
var data = $(me).attr('data');
if(!data){
//console.log(me);
return;
}
data = JSON.parse(unescape(data));
if(module == 'formula'){
data = data.formula;
data = formulaRemoveDollars(data);
}
var svg = '';
if(data.indexOf('<math') != -1){
if(typeof(MathJax.mathml2svg) == 'function'){
svg = MathJax.mathml2svg(data,{});
}
}else{
if(module == 'edrawmath'){
data = edrawMathReplaceBracket(data);
}
svg = MathJax.tex2svg(data, {});
}
svg = tex2SvgErrorCheck(data,svg);
if($(svg).find('svg.wrong-formula-svg').length > 0){
svg = '';
}
//var svg = MathJax.tex2svg(data, {});
if(svg && svg != ''){
$(me).replaceWith(svg);
}
//$(me).after(svg);
} catch (err) {
console.log(err);
}
}
function formulaRemoveDollars(str) {
if(!str){
return str;
}
var result = '';
for (var i = 0; i < str.length; i++) {
if (str[i] === '$' && str[i - 1]!== '\\') {
result += '';
} else {
result += str[i];
}
}
return result;
}
// 去掉 '\[{}\]'标记
function edrawMathReplaceBracket(str) {
if (str.indexOf('\\[{') == 0) {
str = str.slice(3);
}
if (str.indexOf('}\\]') == str.length - 3) {
str = str.slice(0, -3);
}
return str;
}
function tex2SvgErrorCheck(data, svg) {
try {
if ($(svg).find('g[data-mml-node="merror"]').length > 0) {
var errorSvg = '<mjx-container class="MathJax" jax="SVG" display="true" role="presentation" style="position: relative; color: rgb(0, 0, 0);" latex-formula="' + escape(JSON.stringify(data)) + '"><svg class="wrong-formula-svg" width="100px"height="24px"style="transform:translate(0,2px)"xmlns="http://www.w3.org/2000/svg"><rect x="0"y="0"width="100"height="24"rx="4"ry="4"fill="#F7F8FA"/><path fill-rule="evenodd"transform="translate(8,2)"viewBox="0 0 20 20"transform="scale(0.9)"clip-rule="evenodd"d="M10 19.1666C15.0626 19.1666 19.1667 15.0625 19.1667 9.99992C19.1667 4.93731 15.0626 0.833252 10 0.833252C4.93743 0.833252 0.833374 4.93731 0.833374 9.99992C0.833374 15.0625 4.93743 19.1666 10 19.1666ZM8.54167 6.66667C8.54167 5.86125 9.19458 5.20833 10 5.20833C10.8054 5.20833 11.4583 5.86125 11.4583 6.66667C11.4583 6.87438 11.4149 7.07195 11.3366 7.25079L10.514 11.1996C10.3979 11.7569 9.60213 11.7569 9.48604 11.1996L8.66336 7.25079C8.58509 7.07195 8.54167 6.87438 8.54167 6.66667ZM11.0743 13.866C11.0743 14.4593 10.5933 14.9403 10 14.9403C9.40668 14.9403 8.92569 14.4593 8.92569 13.866C8.92569 13.2726 9.40668 12.7917 10 12.7917C10.5933 12.7917 11.0743 13.2726 11.0743 13.866Z"fill="#FFAF40"/><text x="60"y="17"fill="#333"font-size="14"text-anchor="middle">无效公式</text></svg></mjx-container>';
console.log('tex2Svg error' + $(svg).text());
console.log(data);
console.log('\r\n');
return errorSvg;
}
return svg;
} catch (err) {
console.log(err);
return errorSvg;
}
}
function asyncMathJaxLatex2Svg() {
try {
$(document).ajaxSuccess(function (event, xhr, settings) {
mathJaxLatex2Svg();
});
} catch (err) {
console.log(err);
}
}
function mathJaxCustomStyle() {
var style = document.createElement('style');
style.type = 'text/css';
style.id = '_MJX-SVG-styles';
var css = 'mjx-container[jax="SVG"][display="true"]{display: inline !important;margin1: 0 !important;}mjx-container svg{max-width:100%;}';
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
}
// 不直接替换掉图片图片隐藏掉在图片后边插入一个svg
function tex2SvgActionAppend(img,module) {
try {
var me = img;
var data = $(me).attr('data');
if(!data){
//console.log(me);
return;
}
data = JSON.parse(unescape(data));
if(module == 'formula'){
data = data.formula;
}
var svg = '';
if(data.indexOf('<math') != -1){
if(typeof(MathJax.mathml2svg) == 'function'){
svg = MathJax.mathml2svg(data,{});
}
}else{
if(module == 'edrawmath'){
data = edrawMathReplaceBracket(data);
}
svg = MathJax.tex2svg(data, {});
}
svg = tex2SvgErrorCheck(data,svg);
//var svg = MathJax.tex2svg(data, {});
if(svg && svg != ''){
$(me).addClass("ans-latex-moudle-hidden");
var latexImgSrc = $(me).attr("src");
var newLatexContainer = $('<span class="latex-svg" latexData="' + escape(JSON.stringify(data)) + '" latexImgSrc="' + latexImgSrc + '"></>');
$(newLatexContainer).attr("contenteditable", "false");
$(svg).appendTo(newLatexContainer);
var newSpan = $('<span>\u200B</span>')
// $("<br/>").appendTo(newDiv);
$(newLatexContainer).insertAfter(me);
$(newSpan).insertAfter(newLatexContainer);
}
//$(me).after(svg);
} catch (err) {
console.log(err);
}
}

View File

@@ -0,0 +1 @@
jsonp05219966733882745('{"refer":"http://i.mooc.chaoxing.com","status":true}')

View File

@@ -0,0 +1,723 @@
var MultiEditor = {
puid: '',
yunToken: '',
prdid: '442',//产品号,云盘那边给我们分配的,区分数据是那个团队传过去的
isPhone: false, //是否是移动端
idList: [],//编辑器id列表防止重复调用initEditor
hasLoadAttachListener: false, //是否加载了附件监听js
nowDomain: '',//引用当前js的域名
noteDomain: 'https://noteyd.chaoxing.com',//默认的js前缀
passport2Domain: 'https://passport2.chaoxing.com',
hasLoadedEditor: false, //编辑器是否加载完成
init: function () {
type, ua, options
}, //加载配置文件
initEditor: function (json, callback, changecallback) {
}, //编辑页初始化编辑器
loadJSFile: function (src, cb) {
},
getRichText: function (editorid) {
}, // 获取富文本内容
setRichText: function (editorid, content) {
}, // 设置富文本内容
renderRichtext: function (editorId, content, ua) {
}, //详情页渲染富文本内容
getUploadConfig: function (editorId) {
}, //获取上传信息
unescapeHTML: function (content) {
}, //还原html脚本
randomUUID: function () {
}, //生成随机id
pcLoadProfile: function () {
},//加载PC配置文件
loadUE: function (editorid, cb) {
},//加载完编辑器
focus: function () {
},//光标定到编辑器
insertHTML: function (editorid, html) {
},//插入到编辑器
insertTeacherCommentAttach: function (editorid, data) {
},//题目编辑器-插入教师批注附件
execCommand: function (editorid, cmd, data) {
},//编辑器-执行命令
destoryEditor: function (editorid) {
}, //销毁编辑器
hasLoadEditFile: false, //是否已经加载过编辑页配置文件
hasLoadDetailFile: false, //是否已经加载过详情页配置文件
hasLoadRichTextUitl: false, //是否已经加载过Richtextutil文件
intranetMode: false,//镜像编辑器,不是镜像笔记
options: {},//传过来的参数
mirrorDomainList:{},//镜像接口获取的域名信息
mirrorPanDomain:'',//云盘镜像地址
mirrorPhotoDomain:'',//图片服务镜像地址
isMirrorDeploy:'',//是镜像笔记服务
isFileDownloadPageJump: false, // 是否是下载文件触发的页面跳转
}
/*加载配置文件
*type: edit 或者 detail
* ua: 指定是app还是pc
* options: isIntranetMode:是否是镜像模式
* prefix 前缀
* */
MultiEditor.init = function (type, ua, options) {
var uaInfor = navigator.userAgent.toLowerCase();
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) || navigator.userAgent.indexOf('harmony') > -1) {
MultiEditor.isPhone = true;
} else if (ua == 'app') {
MultiEditor.isPhone = true;
}
if (options) {
MultiEditor.options = options;
}
//如果已经加载过,不再加载配置文件
if (type == 'edit') {
if (MultiEditor.hasLoadEditFile) {
return;
}
MultiEditor.hasLoadEditFile = true;
} else if (type == 'detail') {
if (MultiEditor.hasLoadDetailFile) {
return;
}
MultiEditor.hasLoadDetailFile = true;
}
if (MultiEditor.currentHref && MultiEditor.currentHref.indexOf('bistatic-') > -1) {
MultiEditor.noteDomain = window.location.protocol + '//bistatic-' + MultiEditor.noteDomain.replace('http:','').replace('https:','');
}
let prefix = ''
if (options && options.isIntranetMode) {
//是镜像
MultiEditor.intranetMode = true;
if (options && options.prefix) {
MultiEditor.prefix = options.prefix;
} else {
MultiEditor.prefix = 'ueditor4thirdparty/';
}
prefix = MultiEditor.prefix;
MultiEditor.isPhone = false; //镜像还没有支持移动端
} else {
if (options && options.prefix) {
MultiEditor.prefix = options.prefix;
} else {
MultiEditor.prefix = window.location.protocol + '//' + MultiEditor.nowDomain;
}
prefix = MultiEditor.prefix + '/res/plugin/ueditor4thirdparty/'
}
if (MultiEditor.isPhone) { //移动端
if(!window.obj){
window.obj = {};
}
if(window.location.host.indexOf('chaoxing.com') == -1){
//非超星域名获取镜像域名列表
MultiEditor.getMirrorDomain();
}
if (ua == 'xxt' && uaInfor.indexOf("chaoxingstudy") != -1) {
MultiEditor.loadJSFile(MultiEditor.prefix + '/res/plugin/meditor/js/mrich.text.util.js?_t=' + new Date().getTime(), function () {
if (type == 'edit') {
MrichTextUitl.loadEditorProfile2();
} else if (type == 'detail') {
MrichTextUitl.loadDetailPageProfile2();
}
});
} else {
//防止attachment_listener加载多次
if (MultiEditor.hasLoadAttachListener == false && typeof AttachmentListener == 'undefined') {
MultiEditor.loadJSFile(MultiEditor.prefix + '/res/pc/js/noteRichtext/attachment_listener.js?_t=' + new Date().getTime())
AttachmentListener = {};
MultiEditor.hasLoadAttachListener = true;
}
if (type == 'edit') {
MultiEditor.loadJSFile(MultiEditor.prefix + '/res/plugin/meditor/js/mrich.text.util.js?_t=' + new Date().getTime(), function () {
for (var key in MultiEditor.options) {
MrichTextUitl[key] = MultiEditor.options[key];
}
MrichTextUitl.loadMoreEditorProfile();
});
} else if (type == 'detail') {
MultiEditor.loadJSFile(MultiEditor.prefix + '/res/plugin/ueditor4thirdparty/rich.text.util.js?_t=' + new Date().getTime(), function () {
MultiEditor.pcLoadProfile(type);
})
}
}
} else { //PC
//防止attachment_listener加载多次
if (MultiEditor.hasLoadAttachListener == false && typeof AttachmentListener == 'undefined') {
MultiEditor.loadJSFile(MultiEditor.prefix + '/res/pc/js/noteRichtext/attachment_listener.js?_t=' + new Date().getTime())
AttachmentListener = {};
MultiEditor.hasLoadAttachListener = true;
}
if (typeof RichTextUitl == 'undefined') {
if (MultiEditor.hasLoadRichTextUitl) {
//防止两次调用期间js还没加载完成
var timer = setInterval(function () {
if (typeof RichTextUitl != 'undefined') {
clearInterval(timer)
MultiEditor.pcLoadProfile(type);
}
}, 500);
} else {
MultiEditor.hasLoadRichTextUitl = true;
MultiEditor.loadJSFile(prefix + 'rich.text.util.js?_t=' + new Date().getTime(), function () {
MultiEditor.pcLoadProfile(type);
})
}
} else {
MultiEditor.pcLoadProfile(type);
}
}
}
//获取镜像域名
MultiEditor.getMirrorDomain = function(){
if (typeof jQuery != 'undefined') {
var json = {
url: MultiEditor.prefix + '/apis/mirrorConfig',
type: "get",
xhrFields: {
withCredentials: true
},
data: {},
dataType: "json",
success: function (res) {
if(res.result){
let result = res.data
MultiEditor.mirrorDomainList = result.domainMap;
for(var key in MultiEditor.mirrorDomainList){
if(MultiEditor.mirrorDomainList[key]){
MultiEditor.mirrorDomainList[key] = window.location.protocol + MultiEditor.mirrorDomainList[key].replace('https:','').replace('http:','')
}
}
MultiEditor.isMirrorDeploy = result.isMirrorDeploy;
window.obj.mirrorDomain = MultiEditor.mirrorDomainList;
window.obj.mirrorDomain.isMirrorDeploy = result.isMirrorDeploy
MultiEditor.noteDomain = MultiEditor.mirrorDomainList.NoteDomainHttps
MultiEditor.mirrorPanDomain = MultiEditor.mirrorDomainList.panDomainHttps
MultiEditor.mirrorPhotoDomain = MultiEditor.mirrorDomainList.photoDomainHttps
MultiEditor.passport2Domain = MultiEditor.mirrorDomainList.passport2DomainHttps
}
},
error: function () {
}
}
// 同步调用
json.async = false;
$.ajax(json);
}
}
//加载PC配置文件
MultiEditor.pcLoadProfile = function (type) {
RichTextUitl.ismultiEditor = true;
if (MultiEditor.options) {
for (var key in MultiEditor.options) {
RichTextUitl[key] = MultiEditor.options[key];
}
if (MultiEditor.intranetMode) {
RichTextUitl.intranetMode = true;
}
RichTextUitl.prefix = MultiEditor.prefix
// 查看大图时是否可编辑 默认为false
if(MultiEditor.options.isEditableViewLargeImage === true) {
RichTextUitl.isEditableViewLargeImage = true
}
}
//提前加载js避免ueditor报错
if (MultiEditor.intranetMode) {
MultiEditor.loadJSFile(MultiEditor.prefix + 'rich.text.common.js');
} else if (MultiEditor.prefix) {
MultiEditor.loadJSFile(MultiEditor.prefix + '/res/pc/js/noteRichtext/rich.text.common.js');
} else {
MultiEditor.loadJSFile(window.location.protocol + '//' + MultiEditor.nowDomain + '/res/pc/js/noteRichtext/rich.text.common.js');
}
if (type == 'edit') {
RichTextUitl.loadEditorProfile(true, true)
} else if (type == 'detail') {
RichTextUitl.loadDetailPageProfile(true, true, false, false, true);
}
}
/*
* param editorid: 编辑器id、
* param content: 富文本内容、
* param editorheight: 初始高度
* param callback:回调方法(编辑器加载完成后的回调)
* param changecallback: 监听内容改变的时候回调
*/
MultiEditor.initEditor = function (json, callback, changecallback) {
var editorid = json.editorid;
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) || navigator.userAgent.indexOf('harmony') > -1) {
MultiEditor.isPhone = true;
}
if (MultiEditor.isPhone) { //移动端
var loadfiletimer = setInterval(function () {
if (typeof (MrichTextUitl) != 'undefined' && typeof (zss_editor) != 'undefined' && $('body').length > 0) {
clearInterval(loadfiletimer);
MrichTextUitl.initMoreEditor(json, callback, changecallback);
if (typeof callback == 'function') {
callback();
MultiEditor.hasLoadedEditor = true;
}
}
}, 500)
} else { //PC
//不允许同一个id多次初始化
if (MultiEditor.idList.indexOf(editorid) > -1) {
return;
}
MultiEditor.idList.push(editorid);
// if (document.getElementById(editorid) && document.getElementById(editorid).querySelector('.edui-editor')) {
// //已经初始化过的,不再初始化
// return;
// }
document.getElementById(editorid).innerHTML = '<script id="multi' + editorid + '" name="content" type="text/plain"></script>';
var loadfiletimer = setInterval(function () {
if (typeof (RichTextUitl) != 'undefined' && typeof (UE) != "undefined" && typeof (UE.getEditor) != "undefined") {
clearInterval(loadfiletimer);
RichTextUitl.initMoreUEditor(json, callback, changecallback);
MultiEditor.hasLoadedEditor = true;
}
}, 500)
}
}
//编辑页插入编辑器内容
MultiEditor.setRichText = function (editorid, content) {
if (MultiEditor.isPhone) { //移动端
if(typeof MrichTextUitl == 'undefined'){
console.log('请等待编辑器加载完成...')
return
}
content = MrichTextUitl.beforeSetRtfContent(content,{type:'edit'});
MrichTextUitl.setRichtext({'content': content}, editorid);
} else { //PC
if(typeof RichTextUitl == 'undefined'){
console.log('请等待编辑器加载完成...')
return
}
content = RichTextUitl.beforeSetRtfContent(content,{type:'edit'});
MultiEditor.loadUE(editorid, function (editor) {
editor.setContent(content);
})
}
}
/*插入富文本内容
* editorid 编辑器id
* cmd 命令
* data Object类型
* */
MultiEditor.insertHTML = function (editorid, html) {
if (MultiEditor.isPhone) { //移动端
html = MrichTextUitl.beforeSetRtfContent(html);
} else {
html = RichTextUitl.beforeSetRtfContent(html);
}
MultiEditor.execCommand(editorid, 'inserthtml', html);
}
/*执行编辑器内部命令
* editorid 编辑器id
* cmd 命令
* data
* */
MultiEditor.execCommand = function (editorid, cmd, data) {
if (MultiEditor.isPhone) { //移动端
if (typeof (zss_editor) != 'undefined' && $('body').length > 0) {
zss_editor.updateEnterRange(editorid);
zss_editor.insertHTML(data)
zss_editor.backupRange();
}
} else { //PC
MultiEditor.loadUE(editorid, function (editor) {
editor.execCommand(cmd, data);
})
}
}
//移动端插入图片
MultiEditor.insertImage = function (editorid, imgurl, objectId) {
if (MultiEditor.isPhone) { //移动端
if (typeof (zss_editor) != 'undefined' && $('body').length > 0) {
zss_editor.updateEnterRange(editorid);
zss_editor.insertImage(imgurl, objectId, '', '', true);
}
}
}
MultiEditor.getEditor = function (editorid) {
var editor = UE.getEditor('multi' + editorid);
return editor;
}
//编辑器加载完成事件后回调
MultiEditor.loadUE = function (editorid, cb) {
if (typeof (UE) == 'undefined') {
var loadfiletimer = setInterval(function () {
if (typeof (UE) != 'undefined') {
clearInterval(loadfiletimer);
var editor = UE.getEditor('multi' + editorid);
if (typeof (editor.body) == 'undefined') {
var loadfiletimer2 = setInterval(function () {
if (typeof (editor.body) != 'undefined') {
clearInterval(loadfiletimer2);
if (cb) cb(editor)
}
}, 500)
} else {
if (cb) cb(editor)
}
}
}, 500)
} else {
var editor = UE.getEditor('multi' + editorid);
if (typeof (editor.body) == 'undefined') {
var loadfiletimer2 = setInterval(function () {
if (typeof (editor.body) != 'undefined') {
clearInterval(loadfiletimer2);
if (cb) cb(editor)
}
}, 500)
} else {
if (cb) cb(editor)
}
}
}
//编辑页获取编辑器内容
MultiEditor.getRichText = function (editorid) {
if (MultiEditor.isPhone) { //移动端
return MrichTextUitl.getRichtextObj(editorid)
} else { //PC
if (typeof (UE) == 'undefined' || typeof UE.getEditor('multi' + editorid).body == "undefined") {
console.log('编辑器未加载完成,请稍后再获取数据')
return null;
} else {
var richtext = RichTextUitl.getRichText(null, 'multi' + editorid);
if (!richtext) {
richtext = {attachment: "", content: "", content_imgs: "", rtf_content: "", isuploading: true,hasUploadFailed:''}
}
return richtext;
}
}
}
/**详情页渲染富文本内容
* param richtextId 文本容器的id
* param content 文本内容
* param ua 浏览器
* params options 其他参数
*/
MultiEditor.renderRichtext = function (richtextId, content, ua, options) {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) || navigator.userAgent.indexOf('harmony') > -1) {
MultiEditor.isPhone = true;
}
var uaInfor = navigator.userAgent.toLowerCase();
if (ua == 'xxt' && uaInfor.indexOf("chaoxingstudy") != -1) {
if (typeof (MrichTextUitl) == 'undefined') {
var loadfiletimer = setInterval(function () {
if (typeof (MrichTextUitl) != 'undefined') {
clearInterval(loadfiletimer);
zss_editor.changeClientType();
zss_editor.init();
//渲染富文本内容
MrichTextUitl.insertDetailContent(content);
}
}, 500)
} else {
zss_editor.changeClientType();
zss_editor.init();
//渲染富文本内容
MrichTextUitl.insertDetailContent(content);
}
} else {
if (typeof (RichTextUitl) == 'undefined' || typeof (RichTextUitl.b64DecodeUnicode) == 'undefined') {
var loadfiletimer = setInterval(function () {
if (typeof (RichTextUitl) != 'undefined' && typeof (RichTextUitl.b64DecodeUnicode) != 'undefined') {
clearInterval(loadfiletimer);
MultiEditor.pcLoadRichText(richtextId, content, options)
}
}, 500)
} else {
MultiEditor.pcLoadRichText(richtextId, content, options)
}
}
// 详情页是否显示图片边框
if(MultiEditor.options && MultiEditor.options.showImageBorder === false) {
$('#' + richtextId).attr('show-image-border', false)
}
}
// pc中js加载完成后的操作
MultiEditor.pcLoadRichText = function (richtextId, content, options) {
if(options && options.catalogDiv) {
RichTextUitl.catalogDiv = options.catalogDiv
}
if(options && typeof options.catalogOptions != 'undefined') {
RichTextUitl.catalogOptions = options.catalogOptions
}
<!-- 富文本内容渲染到页面之前进行的操作-->
content = RichTextUitl.beforeSetRtfContent(content);
document.getElementById(richtextId).innerHTML = content;
<!-- 富文本内容渲染到页面之后进行的操作-->
RichTextUitl.afterPageRendered(document.getElementById(richtextId),options);
}
//获取编辑器对象,编辑器加载完成后调用
MultiEditor.focus = function (richtextId, toEnd) {
if (MultiEditor.isPhone) {
$('#' + richtextId).find('.editor_main').focus()
} else {
MultiEditor.loadUE(richtextId, function (editor) {
editor.focus(toEnd);
});
}
}
//销毁编辑器
MultiEditor.destoryEditor = function (editorid) {
$('#' + editorid).empty();
MultiEditor.idList.splice(MultiEditor.idList.indexOf(editorid), 1)
if (!MultiEditor.isPhone && typeof (UE) != 'undefined' && typeof UE.getEditor('multi' + editorid).body != "undefined") {
UE.getEditor('multi' + editorid).destroy();
}
}
//编辑器markdown转html
MultiEditor.insertMarkdown = function (editorid, text) {
UE.getEditor('multi' + editorid).execCommand('inserthtml', RichTextUitl.markDownToHtml(text));
}
//修改PC编辑器内容 id为dom查询条件,如#idtext为要修改的内容
MultiEditor.updatePCEditorText = function (editorid, id, text) {
var editor = MultiEditor.getEditor(editorid)
if(editor){
editor.body.querySelector(id).innerText = text;
editor.fireEvent('contentchange');
editor.fireEvent('saveScene');
}
}
//修改PC编辑器内容 id为dom查询条件,如#idhtml为要修改的内容
MultiEditor.updatePCEditorHTML = function (editorid, id, html) {
var editor = MultiEditor.getEditor(editorid)
if(editor){
editor.body.querySelector(id).outerHTML = html;
editor.fireEvent('contentchange');
editor.fireEvent('saveScene');
}
}
//移动光标至指定节点后面
MultiEditor.moveCursorAfterNode = function (editor, node) {
// 获取当前选区
var range = editor.selection.getRange();
// 获取当前光标所在的节点
var currentNode = range.startContainer;
// 将光标移动到span标签的后面
range.setStartAfter(node);
range.collapse(true).select(); // 设置新的选区
}
/*题目编辑器 - 插入教师批注附件
* editorid:编辑器id
* data:json对象,示例{data1:'xxx',data2:'xxx'},data1 data2是课程业务数据的id 作答记录 题目
* */
MultiEditor.insertTeacherCommentAttach = function (editorid, data) {
var cid = MultiEditor.randomUUID();
var json = {
"att_web": {
"content": "",
"logo": window.location.protocol + "//mooc2-ans.chaoxing.com/mooc2-ans/module/work/images/viewAttach.png",
"title": '教师批注',
"url": '',
data1: data.data1,
data2: data.data2,
},
"attachmentType": 25,
"cid": cid
}
var html = "<br><div element-id='" + MultiEditor.randomUUID() + "' class='editor-iframe' contenteditable='false'><iframe frameborder='0' scrolling='no' cid='" + cid + "' src='"+window.location.protocol +"//noteyd.chaoxing.com/attachment/insertWeb.html' name='" + btoa(encodeURIComponent(JSON.stringify(json))) + "' class='attach-module attach-insertWeb' module='insertWeb'></iframe></div>"
MultiEditor.insertHTML(editorid, html);
}
//章节笔记--插入章节视频打点
/** pointData:{id:'aaa',time:40}
* attachment: { "cid": cid,
* "attachmentType": 54,
* "att_course_video": data.att_course_video }
* */
MultiEditor.insertCourseVideoMark = function (editorid, pointData, attachment) {
if (!MultiEditor.hasLoadedEditor) return
if (MultiEditor.isPhone) {
if (typeof (zss_editor) != 'undefined' && $('body').length > 0) {
zss_editor.updateEnterRange(editorid);
zss_editor.insertCourseVideo(pointData, attachment)
}
} else {
let editor = MultiEditor.getEditor(editorid)
if (editor) {
editor.insertCourseVideo(pointData, attachment)
}
}
}
//加载外部js
MultiEditor.loadJSFile = function (src, cb) {
var head = document.head || document.getElementsByTagName('head')[0]
var script = document.createElement('script')
cb = cb || function () {
}
script.type = 'text/javascript'
script.src = src
if (!('onload' in script)) {
script.onreadystatechange = function () {
if (this.readyState !== 'complete' && this.readyState !== 'loaded') return
this.onreadystatechange = null
cb(script)
}
}
script.onload = function () {
this.onload = null
cb(script)
}
head.appendChild(script)
}
MultiEditor.getUploadConfig = function (sync) {
if (MultiEditor.puid && MultiEditor.yunToken) {
return;
}
if (typeof jQuery != 'undefined') {
var json = {
url: window.location.protocol+"//"+MultiEditor.noteDomain.replace('https://','').replace('http://','') + "/pc/files/getUploadConfig",
type: "get",
xhrFields: {
withCredentials: true
},
data: {},
dataType: "json",
success: function (resultData) {
if (resultData && resultData.result == 1) {
MultiEditor.puid = resultData.msg.puid;
MultiEditor.yunToken = resultData.msg.token || '';
}
},
error: function () {
}
}
if (sync) {
// 同步调用
json.async = false;
}
$.ajax(json);
}
}
//获取js当前路径
MultiEditor.currentHref = function () {
var jsPath = document.currentScript && document.currentScript.src ? document.currentScript.src : function () {
var js = document.scripts
, last = js.length - 1
, src;
for (var i = last; i > 0; i--) {
if (js[i].readyState === 'interactive') {
src = js[i].src;
break;
}
if (js[i].src.indexOf('multieditor.js') > -1) {
src = js[i].src;
break;
}
}
return src || js[last].src;
}();
jsPath = jsPath.substring(jsPath.indexOf('//') + 2, jsPath.lastIndexOf('/') + 1);
MultiEditor.nowDomain = jsPath.substring(0, jsPath.indexOf('/res/'));
return jsPath;
}();
/**
* 还原html脚本 < > & " '
*/
MultiEditor.unescapeHTML = function (content) {
if (content) {
return content.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&apos;/g, "'");
}
return "";
}
MultiEditor.randomUUID = function () {
var s = [];
var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join("");
return uuid;
}
//加载转发数据
MultiEditor.localTransferData = ''
//初始化加载转发数据方法
MultiEditor.initForwardData = function(type,callback){
var isPcClient = RegExp("\\(schild:(\\w+).*ChaoXingStudy_(\\d+)_(\\d+[^_]*)_([^_]*)_([pc]*)_([^ ]*)?( \\([^)]*\\))?.*_(.*[-]?\\w+).*").test(navigator.userAgent);
// pc客户端定制需求逐条转发
if(isPcClient) {
jsBridge.bind('CLIENT_GET_INIT_DATA', function(data) {
console.log('富文本数据', data)
if(data && data.content) {
MultiEditor.localTransferData = data
MultiEditor.loadForwardData(callback)
}
})
jsBridge.postNotification('CLIENT_GET_INIT_DATA');
}else{
MultiEditor.localTransferData = getCookie('localTransferData')
if(MultiEditor.localTransferData){
MultiEditor.localTransferData = JSON.parse(MultiEditor.localTransferData)
MultiEditor.loadForwardData(callback)
delCookie('localTransferData')
}
window.addEventListener('message',function (e) {
if(e.data.type == 'localTransferData'){
MultiEditor.localTransferData = JSON.parse(e.data.data)
try{
window.opener.postMessage({msgType:'transferDataloaded',type:type},'*')
}catch(e){
console.log(e)
}
console.log(e.data.data)
MultiEditor.loadForwardData(callback)
}
})
}
function getCookie(name){
var arr,reg=new RegExp("(^| )*"+name+"=([^;]*)(;|$)");
if(arr = document.cookie.match(reg)){
return unescape(arr[2]);
}else{
return null;
}
}
//删除cookie
function delCookie(name){
document.cookie = name+"=;expires="+(new Date(0)).toGMTString()+ ";path=/;domain=chaoxing.com;";
}
}
//处理转发数据
MultiEditor.loadForwardData = function (callback) {
var localTransferData = MultiEditor.localTransferData;
if(localTransferData){
var rtf_content = localTransferData.content;
var ForwardTitle = ''
if(rtf_content && rtf_content.indexOf('<') == -1){
rtf_content = decodeURIComponent(rtf_content)
}
if (localTransferData.title) {
ForwardTitle = localTransferData.title
}
if(callback){
callback(rtf_content,ForwardTitle)
}
}
}

View File

@@ -0,0 +1,759 @@
function getcookie(objname){
var arrstr = document.cookie.split("; ");
for(var i = 0;i < arrstr.length;i ++){
var temp = arrstr[i].split("=");
if(temp[0] == objname){
return unescape(temp[1]);
}
}
}
function errorTips(mes){
$(".toolTipBox").remove();
var html = '<div class="toolTipBox" style="top:50%;z-index:2019;"><i class="popicon"><img src="/ananas/css/wrong.png" style="display: block"/></i><span class="tipstext">'+ mes +'<span></div>';
$("body").append("\r\n"+html+"\r\n");
$(".toolTipBox").fadeIn();
function hide(){
$(".toolTipBox").fadeOut();
$(".toolTipBox").remove();
}
setTimeout(hide, 1500)
}
var cancel = function(){
$("#toplevelTextCommentTitle").val("");
$("#toplevelTextCommentContent").val("");
$("#images_fileUploader_group").html("");
$("#dataSource").html("");
$("#dataSource").css("padding", "0");
if ($(".markContent").length > 0) {
var iframeItem = $("#iframe")[0];
iframeItem.contentWindow.mark.cancleUnderline();
}
}
var addGroupDiscussReply = function(topicId,replycount){
var doc = document.getElementById("discuss"+topicId);
var content = doc.value;
if(content==null||content=='')
{
alert("内容不能为空!");
return;
}
doc.value = "";
jQuery.post(_HOST_CP2_ + "/bbscircle/addreply",
{
topicId:topicId,
content : content,
pagesize:replycount,
order:1,
type:1
},
function(data){
if(data.indexOf('error')>0){
alert("data");
}else{
var doc = document.getElementById("replylist"+topicId);
data = data.replace(/(^\s*)|(\s*$)/g,"");
doc.innerHTML = data;
var rcdoc = document.getElementById("replycount"+topicId);
rcdoc.innerHTML = parseInt(rcdoc.innerHTML)+1;
}
}
);
};
var groupreply = function(num,topicid,schoolid) {
var doc = document.getElementById("replylist"+topicid);
var showeddoc = document.getElementById("showed"+topicid);
if(doc.style.display!="none"){
doc.style.display = "none";
}else{
var obj = doc.innerHTML;
if(obj==null||obj==""){
jQuery.post(_HOST_CP2_ + "/bbscircle/getreplysbytopicId",
{
topicid:topicid,
pagesize:num,
order:1,
type:1
},
function(data){
data = data.replace(/(^\s*)|(\s*$)/g,"");
doc.innerHTML = data;
}
);
doc.style.display = "block";
show("replaytextarea"+topicid);
}else{
doc.style.display = "block";
show("replaytextarea"+topicid);
}
}
};
var addgrouptopcomment = function (clazzid, courseid, cpi,isChooseClazz) {
var title = document.getElementById("toplevelTextCommentTitle").value;
if (title.length > 200) {
errorTips(titleLimit200 || "标题限200字");
return;
}
var inputObjVal=$(".verifyCodeSpan input").val();
var content = document.getElementById("toplevelTextCommentContent").value;
if (content.length > 20000) {
errorTips(contentLimit20000 || "内容限20000字");
return;
}
var files = $("#files");
if((title==""||title.trim()=='')&&(content==""||content.trim()=='')&&(!files.length>0)){
alert(pulishCheckTip);
return false;
}
var originTitle=title;
//关联章节
var chapterId = document.getElementById("chapterIdid").value;
var chapterTitle = $("#cur"+chapterId).find(".chapternumber").html();
if(chapterTitle!=null){
title = "[" + chapterTitle + "节] " + title
}
var img=$("#images_fileUploader_group").find("img");
var str="";
for(var i=0;i<img.size();i++){
var imgsrc=img[i];
if(i==img.size()){
str=str+imgsrc.src.replace("25_25c","origin");
}else{
str=str+imgsrc.src.replace("25_25c","origin")+",";
}
}
document.getElementById("toplevelTextCommentTitle").value = "";
document.getElementById("toplevelTextCommentContent").value = "";
var ask = 0;
if(document.getElementById("askteacher") != null){
if(document.getElementById("askteacher").checked == true){
ask=1;
}
}
var chapterId=0;
if(document.getElementById("selchapter_id") !=null){
if(document.getElementById("selchapter_id").value!=''){
chapterId=document.getElementById("selchapter_id").value;
}
}
var allNoticeAttachment = noticeAttachment();
var chapterId=document.getElementById("chapterIdid").value;
var isPublicAsk = $("#content2 .formTopic_padding .markContent").length > 0 && $("#isDigitalTextbook").val() == 1;
var ut = $("#ut").val();
if(typeof ut == "undefined" || ut == "") {
ut = "s";
}
var isMicroCourse = $("#isMicroCourse").val();
var chooseClazzId = 0;
if (isChooseClazz){
chooseClazzId = $("#chooseClazzId").val();
}
var ignoreNode = $("#ignoreNode").val();
jQuery.post(_HOST_CP2_ + "/bbscircle/grouptopic/publish",
{
courseId:courseid,
clazzid:clazzid,
isMicroCourse: isMicroCourse,
title: title,
content:content,
type: isPublicAsk == 1 ? 5 : 2,
files:str,
veridyCode:inputObjVal,
chapterId:chapterId,
attachmentFile: allNoticeAttachment,
cpi: cpi,
mooc2: 1,
ut: ut,
chooseClazzId: chooseClazzId,
ignoreNode: ignoreNode
},
function(data){
if (isPublicAsk) {
try {
var oObj = eval('(' + data + ')');
if (oObj.topicId) {
getChapterRightDiscuss()
var iframeItem = $("#iframe")[0];
iframeItem.contentWindow.addTopic(oObj.topicId);
$("#content2 .markContent").remove();
$(".formTopic").css("display", "none");
}
} catch (e) {
alert(closeAndReEnterTip);
}
} else {
data = data.replace(/(^\s*)|(\s*$)/g, "");
var doc = document.getElementById("posDiscussScroll");
if (data.indexOf('error') == 0) {
alert(discussFailedTip + " " + data.replace('error;', ''));
} else {
$(".formTopic").css("display", "none");
doc.innerHTML = data;
cancel();
}
}
//输入内容
$('.formTopic_text>textarea,.formNote_text>textarea').focus(function(){
$(this).parent().addClass('areaShadow')
})
$('.formTopic_text>textarea,.formNote_text>textarea').blur(function(){
$(this).parent().removeClass('areaShadow')
})
bindImg2('fileUploader_group');
//讨论话题showhide
$('.newTopic_bnt').click(function(){
$(this).next().slideDown(300)
})
$('.replyQuxiao').click(function(){
$(this).parent().parent().slideUp(300)
})
function formTopicScroll(){
$("#formTopicScroll").niceScroll({cursorborder:"",cursorwidth:8,cursorcolor:"#CFD8E6",boxzoom:false,autohidemode:true});
setInterval(function(){
$("#formTopicScroll").getNiceScroll().resize(); //检测滚动条是否重置大小(当窗口改变大小时)
},300)
}
formTopicScroll()
function posDiscuss(){
var fanyaHeight = $(window).height()
$('#posDiscussScroll').css({'height' : fanyaHeight - 40 - 65}) //左右浮框
}
posDiscuss()
function posDiscussScroll(){
$("#posDiscussScroll").niceScroll({cursorborder:"",cursorwidth:8,cursorcolor:"#CFD8E6",boxzoom:false,autohidemode:true});
setInterval(function(){
$("#posDiscussScroll").getNiceScroll().resize(); //检测滚动条是否重置大小(当窗口改变大小时)
},300)
}
posDiscussScroll()
var count = $("#content2 .itemDiscuss").length;
if (count > 0) {
if (count < 1000) {
$(".discussNum").text("(" + count + ")");
}
}
})
baguetteBox.run('.smallImg', {
animation: 'fadeIn',
});
};
function addorcanclePraise(topicId,obj,enc,courseId,classId,uuid,ut){
ut = typeof ut == "undefined" ? "" : ut;
if(obj.className=='zan1 fr'){
canclePraise(topicId,obj,enc,courseId,classId,uuid,ut);
}else{
addPraise(topicId,obj,enc,courseId,classId,uuid,ut);
}
}
function addPraise(topicId,obj,enc,courseId,classId,uuid,ut){
jQuery.ajax({
type: "post",
url : _HOST_CP2_ + "/bbscircle/addpraise",
dataType:"json",
async : false,
data: {
topicId : topicId,
enc: enc,
courseId: courseId,
classId: classId,
uuid:uuid,
ut:ut
},
success: function(data){
if(data.result==1){
obj.innerHTML="<i></i>"+data.data.count;
$("#ispraise_"+topicId).val(1);
obj.className="zan1 fr";
}
}
});
}
function canclePraise(topicId,obj,enc,courseId,classId,uuid,ut){
jQuery.ajax({
type: "post",
url : _HOST_CP2_ + "/bbscircle/canclepraise",
dataType:"json",
async : false,
data: {
topicId : topicId,
enc: enc,
courseId: courseId,
classId: classId,
uuid:uuid,
ut:ut
},
success: function(data){
if(data.result==1){
obj.innerHTML="<i></i>"+data.data.count;
$("#ispraise_"+topicId).val(0);
obj.className="zan fr";
}
}
});
}
var topicPage = 1;
var getMoreTopic = function(clazzid,pagecount){
topicPage=topicPage+1;
jQuery.ajax({
type: "post",
url : _HOST_CP2_ + "/schoolCourseInfo/getgrouptopic",
dataType:'html',
data: {
clazzid : clazzid,
page : topicPage,
type : 3
},
success: function(data){
data = data.replace(/(^\s*)|(\s*$)/g,"");
var doc = document.getElementById("showTopics");
doc.innerHTML += data;
if(topicPage<pagecount){
$('#getMoreTopic').show();
}else{
$('#getMoreTopic').hide();
}
baguetteBox.run('.smallImg', {
animation: 'fadeIn',
});
}
});
};
function delTopic(clazzId,topicId) {
if(confirm("确定删除吗?")) {
jQuery.ajax({
type : "get",
url : _HOST_CP2_ + "/bbscircle/deletetopic",
data : {
"clazzid":clazzId,
"topicid":topicId,
},
dataType:'json',
success : function(data){
if(data.result==1){
$("#topic_"+topicId).remove();
}else{
alert(data.errorMsg);
}
}
});
}
}
var getMoreReplys = function(topicId,clazzid){
var t = this;
if(!t.pages){
t.pages = {};
}
t.pages[topicId] = t.pages[topicId]?t.pages[topicId]:2;
jQuery.ajax({
type: "post",
url : _HOST_CP2_ + "/bbscircle/getreplysbytopicId",
dataType:'html',
data: {
clazzid : clazzid,
topicid : topicId,
page : t.pages[topicId],
type : 3
},
success: function(data1){
data1 = data1.replace(/(^\s*)|(\s*$)/g,"");
var doc = document.getElementById("topic_replys_"+topicId);
doc.innerHTML += data1;
var pageCount=parseInt(t.pages[topicId]);
$("#reply_page_"+topicId).val(pageCount);
if(pageCount<parseInt($("#reply_pagecount_"+topicId).val())){
$('#more_reply_'+topicId).show();
}else{
$('#more_reply_'+topicId).hide();
}
t.pages[topicId] = pageCount+1;
}
});
};
function form_rep_submit(topicId,clazzId){
var content=$("#"+topicId).val();
if(content==""||content=="回复话题:"||content.trim()==''){
alert("请输入回复内容!");
return false;
}
jQuery.ajax({
type: "post",
url : _HOST_CP2_ + "/bbscircle/addreply",
dataType:'html',
data: {
clazzid : clazzId,
topicId : topicId,
content : content,
type : 3
},
success: function(data){
var div=$("#more_reply_"+topicId);
data = data.replace(/(^\s*)|(\s*$)/g,"");
var doc = document.getElementById("topic_replys_"+topicId);
doc.innerHTML += data;
$("#"+topicId).val("");
var reply_count=parseInt($("#reply_count"+topicId).val())+1;
$("#reply_count"+topicId).val(reply_count);
document.getElementById("reply_count_"+topicId).innerHTML="<i></i>"+reply_count;
}
});
}
function delReply(topicId,replyId,type) {
if(confirm("确定删除吗?")) {
jQuery.ajax({
type : "get",
url : _HOST_CP2_ + "/bbscircle/deletereply",
data : {
"topicid":topicId,
"replyid":replyId,
},
dataType:'json',
success : function(data){
if(data.result==1){
if(type==2){
$("#second_reply_"+replyId).remove();
$("#reply_div_"+replyId).remove();
}else{
$("#plDiv_"+replyId).remove();
}
}else{
alert(data.errorMsg);
}
}
});
}
}
function invitation_addReply(replyId2,topicId,replyId){
var content=$("#reply_content_"+replyId).val();
if(content==""||content=="回复话题:"||content.trim()==''){
alert("请输入回复内容!");
return false;
}
jQuery.ajax({
type: "post",
url : _HOST_CP2_ + "/bbscircle/addreply",
data: {
topicId : topicId,
replyId : replyId2,
content : content,
type : 4
},
success: function(data){
if(data.indexOf('error')>0){
alert("data");
}else{
data = data.replace(/(^\s*)|(\s*$)/g,"");
var doc = document.getElementById("second_data_"+replyId);
doc.innerHTML+= data;
$("#reply_content_"+replyId).val("");
}
}
});
}
function showreplytext(topicId,secondid,replyid,replyname) {
var sr=$("#reply_div_"+replyid);
var value=$("#reply_val_"+replyid).val();
var ph=$("#reply_content_"+replyid);
var click=$("#reply_submit_"+replyid);
if(value==-1){
$("#reply_val_"+replyid).val(secondid);
ph.attr("placeholder","回复"+replyname+":");
click.attr("onclick","invitation_addReply("+secondid+","+topicId+","+replyid+")");
sr.show();
}else if(value==secondid){
if(sr.css("display")=="none"){
sr.show();
}else{
sr.hide();
}
}else{
$("#reply_val_"+replyid).val(secondid);
ph.attr("placeholder","回复"+replyname+":");
click.attr("onclick","invitation_addReply("+secondid+","+topicId+","+replyid+")");
sr.show();
}
}
function toTop(topicId, courseId, bbsEnc) {
jQuery.ajax({
type : "get",
url : _HOST_CP2_ + "/bbscircle/totop",
data : {
"topicid":topicId,
"courseid": courseId,
"bbsEnc": bbsEnc
},
dataType:'json',
success : function(data){
if(data.result==1){
window.location.reload();
}else{
alert(data.errorMsg);
}
}
});
}
function cancelTop(topicId, courseId, bbsEnc) {
jQuery.ajax({
type : "get",
url : _HOST_CP2_ + "/bbscircle/canceltop",
data : {
"topicid":topicId,
"courseid":courseId,
"bbsEnc":bbsEnc
},
dataType:'json',
success : function(data){
if(data.result==1){
window.location.reload();
}else{
alert(data.errorMsg);
}
}
});
}
function addChoice(topicId, courseId, bbsEnc) {
jQuery.ajax({
type : "get",
url : _HOST_CP2_ + "/bbscircle/addchoice",
data : {
"topicid":topicId,
"courseid": courseId,
"bbsEnc": bbsEnc
},
dataType:'json',
success : function(data){
if(data.result==1){
window.location.reload();
}else{
alert(data.errorMsg);
}
}
});
}
function cancelChoice(topicId, courseId, bbsEnc) {
jQuery.ajax({
type : "get",
url : _HOST_CP2_ + "/bbscircle/cancelchoice",
data : {
"topicid":topicId,
"courseid": courseId,
"bbsEnc": bbsEnc
},
dataType:'json',
success : function(data){
if(data.result==1){
window.location.reload();
}else{
alert(data.errorMsg);
}
}
});
}
/**
* 讨论添加附加初始化
* @returns
*/
function initTopicAttachmentFile() {
var attachments = document.getElementsByName("attachment");
var filesize = attachments.length;
if (filesize >= 9) {
alert("最多能上传9份附件");
return false;
} else {
return true;
}
}
/**
* 讨论添加附件
* @returns
*/
function addTopicAttachmentFile (tagClassName,currentTime, uploadEnc,userId) {
var attachmentSize = document.getElementsByName("attachment").length;
var addFileA = document.getElementById("addFileA");
var disable = addFileA.getAttribute("disable");
if (disable == "true" || disable == true) {
alert("其他附件正在上传中,请稍候再试");
//清空当前不允许上传的文件,方便下次上传
clearInputFile();
return;
}
if(currentTime=== "" || uploadEnc === "") {
alert("参数错误,上传失败");
return;
}
addFileA.setAttribute("disable",true);
var data = new FormData();
var file = document.getElementById("file");
if (file == null) {
return;
}
data.append('file', file.files[0]);
$.ajax({
url: ServerHost.uploadDomain + '/upload/uploadNew?t='+currentTime+"&enc2="+uploadEnc+"&userId="+userId,
type: 'POST',
data: data,
processData: false, // 告诉jQuery不要去处理发送的数据
contentType: false, // 告诉jQuery不要去设置Content-Type请求头
dataType : 'json',
xhrFields: {withCredentials: true},
success: function (data) {
if (data.state == "SUCCESS") {
if (attachmentSize == 0) {
var content = document.getElementsByClassName(tagClassName);
$("#dataSource").css("padding", "0")
}
$("#dataSource").css("padding", "14px");
addFileA.setAttribute("disable", "false");
var original = data.original.split(".");
var imgUrl = _HOST_CP2_ + '/js/editor20150812/dialogs/attachment_new/fileTypeImages/icon_default.gif';
var dataStr = '';
if (original.length > 1) {
var type = original[original.length -1];
imgUrl = getFileTypeUrl(type);
data.type = type;
dataStr = JSON.stringify(data);
var reg = new RegExp("\"" , "g"); //创建正则RegExp对象
dataStr = dataStr.replace(reg,"'");
}
var attachMentName = data.original;
if (attachMentName.length > 16) {
attachMentName = attachMentName.substring(0,16);
}
var dataUrl='<li id="' + data.url + '" name="attachment" value="' + dataStr + '"><a title="' + data.original + '" href="/ueditorupload/read?objectId=' + data.url + '" target="_blank">' + attachMentName + '</a><a href="javascript:void(0);" class="docx_dele" onclick="deleteAttachment(\'' + data.url + '\',\'' + tagClassName + '\')">删除</a></li>';
$("#dataSource").append(dataUrl);
clearInputFile();
} else {
var errorMsg = "上传失败!";
if(typeof data.state != "undefined"){
errorMsg += data.state;
}
alert(errorMsg);
addFileA.setAttribute("disable", false);
clearInputFile();
}
},
error: function () {
}
});
}
function getFileTypeUrl(type){
var typeUrl = null;
var allType = [ 'doc', 'exe', 'mp3', 'mv', 'pdf', 'ppt', 'psd', 'rar',
'txt', 'xls', 'xlsx', 'chm' ];
for (var i = 0; i < allType.length; i++) {
var oneType = allType[i];
if (oneType == type) {
typeUrl = '/js/editor20150812/dialogs/attachment_new/fileTypeImages/icon_'
+ type + '.gif';
break;
}
}
if (type == 'jpg' || type == 'png') {
typeUrl = '/js/editor20150812/dialogs/attachment_new/fileTypeImages/icon_'
+ type + '.png';
}
if (typeUrl == null || typeUrl == '') {
typeUrl = '/js/editor20150812/dialogs/attachment_new/fileTypeImages/icon_default.gif';
}
return typeUrl;
}
function noticeAttachment(){
var attachment = "";
var attachmentsByName = document.getElementsByName("attachment");
if (attachmentsByName != null && attachmentsByName.length > 0) {
for (var i = 0; i < attachmentsByName.length; i++) {
var attachmentA = attachmentsByName[i];
if (attachmentA == null) {
continue;
}
attachment += attachmentA.getAttribute('value') + ",";
}
}
return attachment;
}
function deleteAttachment(obj , tagClassName) {
$("#" + obj).remove();
var attachmentsSize = document.getElementsByName("attachment").length;
if (attachmentsSize == 0) {
$("#dataSource").css("padding", "0")
}
var addFileA = document.getElementById("addFileA");
addFileA.setAttribute("disable", "false");
}
/**
* 清空当前不允许上传的文件
* @returns
*/
function clearInputFile(){
var curfile = jQuery("#file");
curfile.after(curfile.clone().val(""));
curfile.remove();
}
/**
* 增加框体高度
*/
function addHeight(curHeight , tab){
if (curHeight == null) {
return curHeight;
}
if (curHeight.toString().indexOf("px") == -1) {
return curHeight;
}
var curHeightInt = curHeight.substring(0, curHeight.length - 2);
curHeightInt = parseInt(curHeightInt) + parseInt(tab);
curHeightInt += "px";
return curHeightInt;
}
function getFileCloudMsg (filedata) {
$.ajax({
url: _HOST_CP2_ + '/upload/cloudUpload',
type: 'POST',
data : filedata,
processData: false, // 告诉jQuery不要去处理发送的数据
contentType: false, // 告诉jQuery不要去设置Content-Type请求头
dataType : 'json',
success: function (data) {
if (data.result == '1') {
return data.fileNamePath;
} else {
return '';
}
}
});
}

View File

@@ -0,0 +1,29 @@
.iconBox{position:fixed;bottom:22px;left:22px;}
.iconBg{width:40px;min-height:40px;background:rgba(29, 40, 64, 0.9);border:solid 1px #3D4B66;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;margin-top:22px;position:relative}
.iconBg:hover,.discusBg:hover{box-shadow:0 0 7px rgba(198, 204, 217, 0.58)}
.iconBg span,.discusBg span{display:block;width:20px;height:20px}
.iconBg span.kefu{background:url(../../mooc2/images/chapter/kfIcon.png) no-repeat;background-size:100% 100%}
.iconBg:hover span.kefu{background:url(../../mooc2/images/chapter/kfHover.png) no-repeat;background-size:100% 100%}
.iconBg span.ewm{background:url(../../mooc2/images/chapter/ewmIcon.png) no-repeat;background-size:100% 100%}
.iconBg:hover span.ewm{background:url(../../mooc2/images/chapter/ewmHover.png) no-repeat;background-size:100% 100%}
.iconBg span.dayi{background:url(../../mooc2/images/chapter/dayiIcon.png) no-repeat;background-size:100% 100%}
.iconBg:hover span.dayi{background:url(../../mooc2/images/chapter/dayiHover.png) no-repeat;background-size:100% 100%}
.iconBg span.backTo{background:url(../../mooc2/images/chapter/backTo.png) no-repeat;background-size:100% 100%}
.iconBg:hover span.backTo{background:url(../../mooc2/images/chapter/backHover.png) no-repeat;background-size:100% 100%}
.discusBg span.discusNew{background:url(../../mooc2/images/chapter/discusIcon.png) no-repeat;background-size:100% 100%;float:left}
.discusBg:hover span.discusNew{background:url(../../mooc2/images/chapter/discusHover.png) no-repeat;background-size:100% 100%}
.ewmBox{position:absolute;width:148px;background:#fff;padding:14px 20px;border-radius:6px;bottom:0;right:-154px;text-align:center;font-size:12px;line-height:17px;color:#8A8B99;box-sizing:border-box;display:none;box-shadow:0 2px 12px rgba(0, 37, 89, 0.2)}
.ewmBox p{margin-top:10px;}
.ewmBg:hover .ewmBox{display:block}
.discusFontBx{width:0;margin-left:10px;position:relative;float:left;overflow:hidden}
.textAreaBx{max-height:200px;overflow:hidden;}
.textcon{width:175px;background:none;color:#fff;font-size:14px;line-height:20px;font-family:microsoft Yahei;overflow:hidden}
.discusBg{padding:10px;min-height:20px;background:rgba(29, 40, 64, 0.9);border:solid 1px #3D4B66;border-radius:4px;cursor:pointer;margin-top:22px;position:relative;padding-right:0}
.textAreaBx::-webkit-scrollbar {width: 8px;height: 8px;}
.textAreaBx::-webkit-scrollbar-thumb {border-radius:8px;background-color: rgba(255, 255, 255, 0.15);}
.disArr{width:16px;height:100%;right:0;top:0px;position:absolute;background:#26334D;border-radius:0 10px 10px 0;display:flex;align-items:center;justify-content:center}
.disArr:before{content:'';display:block;width:12px;height:12px;background:url(../../mooc2/images/chapter/disArr.png) no-repeat;background-size:100%;}
.fabuBtn{border-top:solid 1px rgba(255,255,255,.1);position:relative;bottom:-8px;height:20px;padding-top:6px;text-align:right;padding-right:24px;margin-bottom:5px}
.fabuBtn a{color:#3A8BFF;font-size:14px}
.rightShow{left:auto;right:22px;width:40px;}
.rightShow .ewmBox{left:-154px}

View File

@@ -0,0 +1,75 @@
var myInterval ;
(function() {
if (document.cookie.indexOf("UID") < 0) {
return;
}
var requestAjax = function(settings) {
if (!settings || !settings.url) {
return;
}
var url = settings.url;
if (!settings.data) {
data = {};
}
var cbName = ("jsonp" + Math.random()).replace(".", "");
var oScript = document.createElement("script");
window[cbName] = function(json) {
oScript.parentNode.removeChild(oScript);
if (settings.success) {
settings.success(json);
}
};
data.jsoncallback = cbName;
data.t = new Date().getTime();
var arr = [];
for (var attr in data) {
arr.push(attr + "=" + data[attr]);
}
if (url.indexOf("?") > 0) {
url += "&" + arr.join("&");
} else {
url += "?" + arr.join("&");
}
oScript.src = url;
oScript.setAttribute("defer", "defer");
if (settings.charset) {
oScript.setAttribute("charset", settings.charset);
}
var head = document.getElementsByTagName("head")[0];
head.appendChild(oScript);
};
var fid = 22281;
var fn = function() {
var refer = encodeURIComponent('http://i.mooc.chaoxing.com');
requestAjax({
url: window.location.protocol+"//" + 'detect.chaoxing.com' + '/api/monitor?version=' + 1760175034867 + '&refer=' +refer + '&from=' + ''+'&fid='+fid,
success: function(json) {
var myjson = eval("(" + json + ")");
var from = '';
if (myjson.status == false) {
if (from == 'exam'){
console.log(json);
callback_exam(myjson);
console.log(json);
}else if ((fid == 179952 || fid == 74287) && myjson.lock == true) {
callback_course(myjson);
}else{
var mes = myjson.mes;
var time = myjson.time;
var sign = myjson.sign;
location.href = window.location.protocol+"//" + 'detect.chaoxing.com' + '/api/monitor_temp?refer=' + refer+ '&from=' + ''
+"&mes="+decodeURIComponent(mes)+"&time="+time+"&sign="+sign;
}
}
}
});
};
fn();
if (fid == 179952 || fid == 74287) {
myInterval = setInterval(fn, 30000);
}else{
setInterval(fn, 30000);
}
})();

View File

@@ -0,0 +1,139 @@
body{background:#ededef;min-width: 1300px;}
.left{margin-right:310px;height:100px;}
.content{width:930px;height:100px;margin:0px auto;}
.main{background:#fff;padding-bottom:60px;position:relative;min-height:750px;}
.goback{font-size:14px;height:45px;line-height:45px;color:#555}
.goback span{background:url(../../images/courselist/playbg.png) -29px -46px;width:9px;height:16px;display:inline-block;margin-bottom:-2px;}
.main h1{font-size:18px;color:#333;text-align:center;padding:45px 0px;}
.tabtags{text-align:center;border-bottom:1px solid #c9c9c9;margin-bottom:50px;height: 37px}
.tabtags span{height:36px;line-height:36px;border-radius:10px 10px 0px 0px;display:inline-block;width:118px;border:1px solid #c2c2c2;border-bottom:0px;background:#e8e8e8;text-align:center;cursor:pointer;position:relative;left:0px;top:0px;overflow: hidden;}
.tabtags b{width:19px;height:19px;margin-right:5px;margin-top:10px;line-height:19px;display:inline-block;text-align:center;color:#fff;border-radius:19px;background:#999}
.tabtags span.currents{background:#fff;top:1px;}
.tabtags span.currents b{background:#7B9E31}
.taskpoint{font-size:14px;height:17px;line-height:17px;padding:20px 35px;margin-left:20px;}
.taskpoint span{background:url(../../images/courselist/bg.png) -44px -63px;width:17px;height:17px;float:left;margin-right:8px;display:inline-block}
.displaycontent{width:820px;margin:0px auto;}
.orientationleft{cursor:pointer;width:20px;height:30px;background:url(../../images/courselist/bg.png) 0px -136px;position:absolute;left:45px;margin-top:0;bottom:10px}
.orientationright{cursor:pointer;width:20px;height:30px;background:url(../../images/courselist/bg.png) -21px -136px;position:absolute;right:45px;margin-top:0;bottom:10px}
.orientationright1{cursor:pointer;position:absolute;right:30px;margin-top:-15px;top:273px;color: rgb(123, 158, 49); cursor: pointer; text-decoration: underline; width: 60px; height: 30px; margin-top: 25px; margin-left: -30px;display:none;}
.gohead{background:url(../../images/courselist/bg.png) 0px -167px;position:absolute;right:10px;width:27px;height:41px;}
.nextprev{text-align:center;margin-top:100px;}
.nextprev .prevs{width:90px;height:45px;line-height:45px;background:#fff;border-radius:20px 0px 0px 20px;display:inline-block;font-size:14px;margin-right:1px;}
.nextprev .prevs .lefttriangle{height:0px;width:0px;font-size:0px;display:inline-block;overflow:hidden;
border-top:6px solid #fff;border-right:6px solid #333;border-bottom:6px solid #fff;margin-right:5px}
.nextprev .nexts{width:90px;height:45px;line-height:45px;background:#fff;border-radius:0px 20px 20px 0px;display:inline-block;font-size:14px;}
.nextprev .nexts .righttriangle{height:0px;width:0px;font-size:0px;display:inline-block;overflow:hidden;
border-top:6px solid #fff;border-left:6px solid #333;border-bottom:6px solid #fff;margin-left:5px}
.right{position:fixed;right:0px;top:0px;width:303px;border-left:7px solid #504f55;}
.tabs .lists{border-bottom:2px solid #999;background:#000}
.tabs .lists li{float:left;width:90px;height:45px;line-height:45px;background:#000;color:#fff;text-align:center;font-size:16px;cursor:pointer}
.tabs .lists li.current01{background:#999;}
.thiscontent{display:none}
.chapter{background:#f2f2f6 ;padding-top:5px;overflow-y:auto}
/**.chapter{background:#f2f2f6 url(../../images/courselist/player1-1.png) 55px 0px repeat-y;padding-top:5px;overflow-y:auto}**/
.onetoone{padding-bottom: 33px;}
.cells h3{color:#555;font-weight:normal;padding-top:5px;font-size:16px;}
.cells h3 .bgicon{background:url(../../images/courselist/playbg.png);width:38px;height:28px;line-height:28px;display:inline-block;font-size:13px;}
.cells h3 .bgicon span{width:20px;height:20px;line-height:20px;text-align:center;margin:4px 0px 0px 14px;display:inline-block;}
.cells h3 .titlewords{margin-left:4px;}
.ncells{display:none;}
.ncells h4:hover,.ncells h5:hover{background:#ccc;cursor:pointer}
.ncells h4.currents,.ncells h5.currents{background:#7b9e31;color:#fff}
.ncells h4.currents a{color:#fff}
.ncells h4{font-weight:normal;color:#000;height:17px;line-height:17px;font-size:14px;padding:5px 0px}
.ncells .roundpoint{vertical-align:text-bottom;background:url(../../images/task.png) no-repeat 0px 0px;text-align:center;font-size:13px;color:#fff;width:17px;height:17px;display:inline-block;margin:0;float:right;position:absolute;z-index:10;right:15px;}
.ncells .roundpointStudent{vertical-align:text-bottom;background:url(../../images/task.png) no-repeat 0px 0px;text-align:center;font-size:13px;color:#fff;width:17px;height:17px;margin:0;float:right;position:absolute;z-index:10;right:15px;}
/**background:url(../../images/courselist/playbg.png) 0px -28px;**/
.ncells h5 .roundpointStudent{vertical-align:text-bottom;text-align:center;font-size:13px;color:#fff;width:17px;height:17px;display:inline-block;margin:0;}
.ncells .blue{background:url(../../images/courselist/jobfinished.png) left center no-repeat;}
.ncells .orange01{background: #ff7a38;border-radius: 17px;}
.ncells .lock{background:url(../../images/courselist/playbg.png) -21px -111px;}
.ncells .review{background:url(../../mooc2/images/icon-review.png) no-repeat center/20px auto;}
.ncells h4 .chapternumber{color:#999;font-size:12px;width:35px;display:inline-block;text-align:right}
.ncells h4.currents .chapternumber{color:#fff}
.ncells h5{font-weight:normal;color:#000;font-size:14px;padding:5px 0px}
.cells h3,.ncells h4,.ncells h5{position:relative}
.knowledgeOpenBtn{float:left;width:24px;height:22px;margin-right:6px;cursor: pointer;margin-top:5px}
.knowledgeCloseBtnImg{background:url(../../images/courselist/knowledgeCloseBtn.png) no-repeat center center;}
.knowledgeOpenBtnImg{background:url(../../images/courselist/knowledgeOpenBtn.png) no-repeat center center;}
.knowledgeOpenCurBtnImg{background:url(../../images/courselist/knowledgeOpenCurBtn.png) no-repeat center center;}
.mt4{margin-top:0}
.discuss{background:#f2f2f6;padding-bottom:10px;overflow-y:auto}
.words{padding:10px 0px 0px 10px;}
.headimages{border-radius:24px;float:left;margin-right:8px;}
.inputwords{width:235px;padding-left:0px;height:28px;line-height:28px;border:1px solid #ddd;border-radius:1px;}
.aquestion{margin-top:12px;line-height:24px;padding:0px 10px;}
.aquestion .publishname{font-size:14px;color:#333;margin-right:4px;}
.aquestion .labels{background:#0367b0;border-radius:3px;color:#fff;padding:1px 5px;margin-right:5px;}
.aquestion .publishtime{font-size:12px;color:#999}
.aquestion h3{font-size:16px;color:#59657d;font-weight:normal;padding-left:32px;}
.aquestion h3 .jinghua{width:33px;height:17px;display:inline-block;background:url(../../images/courselist/bg.png) 0px -77px}
.aquestion p{color:#555;margin-left:32px;margin-top:3px;}
.answer{padding-left:32px;}
.answerclick{margin-bottom:0px;}
.answer span{color:#85a547;cursor:pointer}
.nanserwrap{display:none}
.nanswer{border-left:1px solid #ccc;padding-left:8px;padding-bottom:10px;}
.hfk{border-left:1px solid #ccc;padding-left:8px;}
.line{border-bottom:1px solid #ccc;height:0px;line-height:0px;font-size:0px;margin:10px 0px;overflow:hidden;}
.richmedias{display: inline-block;width: 70px;float:Left}
.richmediat{display: inline-block;width: 70px;float:Left;margin-left: 30px;}
.talkarea{margin:20px 0px 60px;text-align:center}
.talkarea a{border:1px solid #ccc;background:#fcfcfc;padding:3px 8px;border-radius:2px;color:#555;}
.studentlist{padding-left:10px;}
.studentlist li{width:52px;float:left;text-align:center;margin:0px 12px 20px;}
.studentlist li img{margin-bottom:8px;}
.answer .praise{background:url(../../images/courselist/bg.png) -54px 0px no-repeat;padding-left:15px;margin-left:10px;display:inline-block;height:12px;line-height:12px;color:#555}
.answer .praise:hover{background:url(../../images/courselist/bg.png) -54px -12px no-repeat;}
.answer .parts{width:37px;height:17px;line-height:17px;background:#ccc;display:inline-block;border-radius:3px;float:right;color:#555;text-align:center;margin-top:4px;}
.submits{width:63px;height:25px;line-height:25px;display:inline-block;text-align:center;margin-right:5px;color:#fff;border-radius:3px;background:#7b9131;cursor:pointer;display: inline-block;}
.cancels{cursor:pointer;color:#999}
.choicemenu{position:relative;float:left}
.choicelist{position:absolute;}
/*.note{height:500px;background:url(../../images/courselist/30-30.png);padding:0px 10px;line-height:30px;overflow-y:auto}*/
.note h3{font-weight:normal;font-size:14px;color:#999;height:30px;line-height:30px;}
.writenote{height:500px;word-break:break-all;word-wrap:break-word;font-size:14px;}
.switchbtn{position:fixed;right:0px;top:6px;cursor:pointer;background:url(../../images/courselist/playbg.png) 0px -45px;width:24px;height:32px;z-index:1;}
.temptexarea{margin:6px 0px 5px 32px;border-width:1px;border-style:solid;border-color:#ddd;overflow:auto;resize:none;width:235px}
.askteacher{width:70px;height:25px;line-height:30px;vertical-align:baseline;float:left; margin-left: 40px;margin-right: 10px;}
.askteacher input{margin:7px 5px 0px 0px;float:left}
.cur{background:url(../../images/courselist/bg.png) -54px -12px no-repeat;padding-left:15px;margin-left:10px;display:inline-block;height:12px;line-height:12px;color:#555}
.dyIcon {
background: url("../../images/courselist/icons.png") no-repeat scroll -36px top rgba(0, 0, 0, 0);
display: inline-block;
top:10px;
height: 18px;
width: 18px;
position: relative;
top: 3px;
}
.zad729 {margin-left:310px;height:100px;}
.zad730 {position:fixed;left:0px;top:0px;width:303px;border-right:7px solid #504f55;}
.zad731 {position:fixed;left:279px;top:6px;cursor:pointer;background:url(../../images/courselist/playbg.png) 0px -78px;width:24px;height:32px;}
.flush{position:absolute;right:10px;top:7px;cursor:pointer}
/**2015-08-28**/
.smallImg{width:220px;margin-left:32px}
.smallImg a{float:left;width:150px;height:150px;}
.smallImg a img{width:55px;height:55px;border:1px solid #eee}
.bigImg{position:fixed;display:none;z-index:9999;max-width:100%;max-height:100%;overflow:auto}
.imgBg{background:#000;filter:alpha(opacity=70);opacity:0.7;width:100%;height:100%;position:fixed;top:0;left:0;display:none;z-index:999}
.loadImg{position:relative;float:left;margin-right:10px;margin-bottom:10px}
.loadImg a{display:none;position:absolute;width:20px;height:20px;background:url(../../images/group/x.png) no-repeat;background-size:100%;right:-7px;top:-7px}
.loadImg:hover a{display:block}
.zhiding{font-size:12px;color:#999}
.plDiv .hfpl{margin:20px 0 30px 0}
.inp02{width:390px;height:26px;border:solid 1px #ddd;background:#fff;border-radius:3px;padding:0 10px;color:#777}
.grenBtn{width:61px;height:26px;line-height:26px;background:#7b9e31;color:#fff;border:none;border-radius:3px;cursor:pointer;margin-left:10px}
.marLeft95{margin-top:15px;margin-bottom:15px;margin-left:95px !important;}
.marLeft{margin-top:10px;}
.zan i{display:inline-block;width:15px;height:15px;background:url(../../images/group/gIcons.png) no-repeat -75px top;margin:0 10px;float:left;margin-top:2px}
.zan:hover i{background-position:-96px top}

View File

@@ -0,0 +1,123 @@
function setposition(){
var height = $("#mainid").height();
$('.orientationleft').css('top',height);
$('.orientationright').css('top',height);
$('#openlock').css('top',height);
//$('.gohead').css('top',$(window).height() - 100 - $('.main').offset().top + $(window).scrollTop());
}
//setposition();
$(window).scroll(function(){
//setposition();
if(parseInt($(window).scrollTop())>=150){
//$('.gohead').show();
}else{
$('.gohead').hide();
}
});
$('.inputwordsone').disappearDefault({
vals:"我有话说",
defaultColor:"#999",
color:"#333",
callback:function(o){
o.next().show();
},
showDefault:true
});
$('.answerclick .showone').click(function(){
if($(this).parent().next().css('display')=='none'){
$(this).parent().next().show();
$(this).text('隐藏1条回复');
}else{
$(this).parent().next().hide();
$(this).text('显示1条回复');
}
});
$(document).ready(function(){
if( !(typeof disableAutoResize == 'boolean' && disableAutoResize === true)){
function setheight(){
var h=$(window).height() - $('.lists').height();
$('.thiscontent').height(h);
}
setheight();
window.onresize=function(){
setheight();
};
}
$('.switchbtn').click(function(){
var r = $('.right'),//menu
l = $('.left'),//center
s = $('.switchbtn');//switcher
if( typeof leftMenuLayout == 'boolean' && leftMenuLayout === true){
if(r.css('left') == 0 +'px'){
r.animate({'left' : -310 + 'px'},500,function(){
s.css({'background-image':'url(/images/courselist/playbg_left.png)','background-position':'0px -33px'})
});
s.animate({'left' : '0px'},500);
//l.animate({'margin-left' : 0 + 'px'},500);
}else{
r.animate({'left':0 + 'px'},500,function(){
s.css({'background-image':'url(/images/courselist/playbg.png)','background-position':'0px -78px'})
});
s.animate({'left' : '279px'},500);
//l.animate({'margin-left' : 310 + 'px'},500);
}
}else{
if (s.hasClass("switchbtn_cur")) {
if ($(".posChapter_right").size() > 0) {
$('#DownloadaDiv').animate({right:'328px'})
$('#JS_back_to_top').animate({right:'328px'})
}
} else {
if ($(".posChapter_right").size() > 0) {
$('#DownloadaDiv').animate({right: '20px'})
$('#JS_back_to_top').animate({right: '20px'})
}
}
if(r.css('right') == 0 +'px'){
r.animate({'right' : -310 + 'px'},500,function(){
s.css({'background-position':'0px -78px'});
//l.css({'margin-right':'0px'});
});
l.animate({'margin-right' : 0 + 'px'},500);
}else{
r.animate({'right':0 + 'px'},500,function(){
s.css({'background-position':'0px -45px'});
//l.css({'margin-right':'310px'});
});
l.animate({'margin-right' : 310 + 'px'},500);
}
}
});
$('.zad731').click(function(){
if($('.zad730').css('left') == 0 +'px'){
$('.zad730').animate({'left' : -310 + 'px'},500,function(){
$('.zad731').css({'background-image':'url(/images/courselist/playbg_left.png)','background-position':'0px -33px'})
});
$('.zad731').animate({'left' : '0px'},500);
$('.zad729').animate({'margin-left' : 0 + 'px'},500);
}else{
$('.zad730').animate({'left':0 + 'px'},500,function(){
$('.zad731').css({'background-image':'url(/images/courselist/playbg.png)','background-position':'0px -78px'})
});
$('.zad731').animate({'left' : '279px'},500);
$('.zad729').animate({'margin-left' : 310 + 'px'},500);
}
});
});

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,70 @@
var PopLayout = {
bodyMargin: [30,30,30,30],
init: function(top,right,bottom,left){
this.bodyMargin = [top, right, bottom, left];
},
changeMargin: function(top,right,bottom,left){
var d = $(document.body);
var m = this.bodyMargin;
d.css("margin", (m[0]+top)+"px "+(m[1]+right)+"px "+(m[2]+bottom)+"px "+(m[3]+left)+"px");
},
};
(function($){
$.fn.extend({
fullFadeIn:function(t,e,n,r){
window.BODY_ORIGIN_BACKGROUND = $(document.body).css('background') || '';
$(document.body).css('background', 'transparent');
setTimeout(function(){
top.postMessage('{"cmd":1,"toggle":true}', "*");
},50);
return this.fadeIn(t,e,n,r);
},
fullFadeOut:function(t,e,n,r){
setTimeout(function(){
top.postMessage('{"cmd":1,"toggle":false}', "*");
if(window.BODY_ORIGIN_BACKGROUND){
$(document.body).css('background', window.BODY_ORIGIN_BACKGROUND);
}
},400);
//top.postMessage('{"cmd":1,"toggle":false}', "*");
return this.fadeOut(t,e,n,r)
}
});
})(jQuery);
$(function(){
var d = $(document.body);
// 如果本页面是嵌入的页面,调整页面布局
if($('.Header').length==0 && $('.nav_side').length==0){
$('head').append('<style>.clearfix:after{content: " ";display: block;height: 0px;clear: both;}</style>');
// body透明与父级页面配合出现遮罩层居中弹窗
//d.css('background', 'transparent');
// 清除浮动窗口
d.children(":first").addClass('clearfix');
}
// 记录用户原始body边距
PopLayout.init(parseInt(d.css("margin-top")), parseInt(d.css("margin-right")), parseInt(d.css("margin-bottom")), parseInt(d.css("margin-left")));
//监听父级页面布局变化
window.addEventListener("message", function(event) {
var msgJson = null;
try {
msgJson = JSON.parse(event.data);
}catch(e){
return;
}
if(msgJson==null){
return ;
}
switch(msgJson.cmd){
case 1001: //修改页边框
PopLayout.changeMargin(msgJson.top, msgJson.right, msgJson.bottom, msgJson.left);
break;
}
});
});

View File

@@ -0,0 +1,166 @@
/**
* Created by zhegxiaofang on 2019/7/22.
* 弹框插件
*/
(function ($) {
/**
*内容,确定按钮的点击事件,取消按钮的点击事件
* @param title
* @param width
* @param sureEvent
* @param cancleEvent
*/
$.selectDialog = function (options) {
var defaults = {
title: '',
content: '',
contentDiv:'',
contentDivClass:'',
sureText: "",
cancleText: "",
customBtn:'',
width: 'wid440',
baseUrl:"../../",
closeFull:true,
sureEvent: function () {
},
cancleEvent: function () {
}
};
var sets = $.extend(defaults, options || {});
// 自定义弹框的内容
var content=sets.contentDiv?sets.contentDiv:'';
if(sets.content){
content='<p class="popWord fs16 colorIn">' + sets.content + '</p>'+content;
}
// 自定义按钮的个数
var btns=sets.customBtn?sets.customBtn:'';
if(sets.sureText){
btns+= '<a href="javascript:;" class="jb_btn jb_btn_92 fr fs14 dialog_affrim">' + sets.sureText + '</a>' ;
}
if(sets.cancleText){
btns+= '<a href="javascript:;" class="btnBlue btn_92_cancel fr fs14 dialog_cancle">' + sets.cancleText + '</a>';
}
if(btns){
btns='<div class="popBottom shadowBox">'+btns+ '</div><div class="het72"></div>';
}
var selectDialog = '<div class="maskDiv" id="popDiv1"><div class="popDiv ' + sets.width + '">' +
'<div class="popHead">' +
'<a href="javascript:;" class="popClose fr"><img src="'+sets.baseUrl+'images/popClose.png"></a>' +
'<p class="fl fs18 colorDeep">' + sets.title +
'</p>' +
'</div>' +
'<div class="het62"></div>' + content + btns+
'</div></div>';
$("body").append(selectDialog);
$('#popDiv1').fullFadeIn();
unScroll();
//点击确定调用的事件
$('#popDiv1').on('click', '.dialog_affrim', function () {
if(sets.closeFull){
$('#popDiv1').fullFadeOut(1000);
}else{
$('#popDiv1').fadeOut(1000);
}
setTimeout(function(){
$('#popDiv1').off('click').remove();
},300)
if ($.isFunction(sets.cancleEvent)) {
removeUnScroll();
sets.cancleEvent();
}
return false;
});
// 点击取消调用的事件
$('#popDiv1').show().on('click', '.dialog_cancle', function () {
if(sets.closeFull){
$('#popDiv1').fullFadeOut(1000);
}else{
$('#popDiv1').fadeOut(1000);
}
setTimeout(function(){
$('#popDiv1').off('click').remove();
},300);
if ($.isFunction(sets.sureEvent)) {
removeUnScroll();
sets.sureEvent();
}
return true;
});
// 点击关闭按钮调用的事件
$("#popDiv1 .popClose").on("click", function () {
if(sets.closeFull){
removeUnScroll();
$('#popDiv1').fullFadeOut();
}else{
$('#popDiv1').fadeOut();
}
setTimeout(function(){
$('#popDiv1').off('click').remove();
},300)
})
};
/**
*内容,确定按钮的点击事件,取消按钮的点击事件
* @param title
* @param time
*/
$.toast = function (options) {
var defaults = {
content: "操作成功",
time: 1500,
type: '',
baseUrl: '',
top: '180px'
};
var sets = $.extend(defaults, options || {});
var iconUrl = '';
if (sets.type === 'success') {
iconUrl ='/mooc2/images/right.png';
} else if (sets.type === 'failure') {
iconUrl = '/mooc2/images/wrong.png';
} else if (sets.type === 'loading') {
iconUrl = '/mooc2/images/round.png';
}else if (sets.type === 'notice') {
iconUrl = '/mooc2/images/tips_pop.png';
}
if (sets.baseUrl == "" && typeof _HOST_CP2_ != "undefined" && _HOST_CP2_ != "") {
sets.baseUrl = _HOST_CP2_;
}
iconUrl = sets.baseUrl + iconUrl;
var iconTop = sets.top;
var toast = iconUrl ? '<div class="toolTipBox" style="z-index:9999; top:'+ iconTop +';" id="dialogToast"><i class="popicon"><img src="' + iconUrl + '" /></i>' + sets.content + '</div>' : '<div class="toolTipBox" id="dialogToast">' + sets.content + '</div>';
$("#dialogToast").remove();
$("body").append(toast);
$("#dialogToast").fadeIn();
// 自动推出
if(sets.time > 0){
setTimeout(function () {
$("#dialogToast").fadeOut();
$("#dialogToast").remove();
}, sets.time);
/*
setTimeout(function(){
$("#dialogToast").remove();
},sets.time+3000)
*/
}else{
return function closeHanlde(){
$("#dialogToast").remove();
};
}
};
})(window.jQuery);

View File

@@ -0,0 +1,16 @@
.bgmask{width:100%;background:#000;position:absolute;z-index:1000;left:0px;top:0px;opacity:0.5;filter:alpha(opacity=50);}
.mypop{border:4px solid #9d9d9d;background:#fff;border-radius:4px;width:518px;position:absolute;left:50%;margin-left:-269px;top:50%;z-index:1000;display:none;}
.mypop h3{height:52px;line-height:52px;padding:0px 10px 0px 20px;background:#f3f3f3;font-weight:normal}
.mypop h3 span{float:right;font-size:16px;color:#fff;background:#555;cursor:pointer;width:20px;height:20px;line-height:20px;text-align:center;border-radius:20px;display:inline-block;margin-top:15px;}
.mypop .sends,.mypop .neirong{font-size:14px;padding-left:20px;}
.mypop .sends{margin-top:20px;}
.mypop .sends input{width:190px;height:32px;border:1px solid #9d9d9d;border-radius:3px;color: #555;}
.mypop .neirong{margin-top:20px;}
.mypop .neirong span{float:left;}
.mypop .neirong textarea{width:430px;height:300px;padding-top:6px;border:1px solid #9d9d9d;border-radius:3px}
.thisbtn{margin:15px 0px 30px 40px;padding-left:20px;}
.thisbtn input{background:#7b9e31;width:70px;height:32px;line-height:32px;text-align:center;border-radius:5px;font-size:14px;color:#fff}
.thepop{position:absolute;left:50%;top:50%;margin:-37px 0px 0px -167px;width:275px;height:75px;line-height:75px;text-align:center;border:1px solid #ccc;border-radius:3px;background:#fff;z-index:1000;display:none}
.thepop h3{font-weight:normal;background:url(../../images/courselist/righticon.png) 24px 24px no-repeat;}

View File

@@ -0,0 +1,21 @@
@charset "utf-8";
/* CSS Document */
.maskDiv{width:100%;height:100%;position:fixed;top:0;left:0;background: rgba(16,26,41,0.76);z-index:999}
.wid440{width:440px;max-height:360px;top: 50%;margin-left: -220px;margin-top: -150px;}
.popDiv{min-height:100px;background: #FFFFFF;border-radius: 10px;position:fixed;left:50%;overflow:hidden}
.popHead{line-height:60px;height:60px;background: #FFFFFF;box-shadow: inset 0 -1px 0 0 rgba(242,242,242,0.80);position:absolute;left:0;top:0;width:100%;padding:0 30px;box-sizing: border-box;background:#fff}
.popClose{display:inline-block;width:18px;height:18px;margin-top:19px}
.het62{width:100%;height:60px;}
.popBottom{width:100%;height:53px;background:#fff;position:absolute;left:0;bottom:0;padding-top:17px;}
.popBottom a{margin-right:30px;}
.shadowBox{box-shadow: 0 -1px 4px 0 rgba(209,209,209,0.18);}
.het72{width:100%;height:72px;}
.popWord{padding:26px 30px;}
/*无障碍元素隐藏*/
.element-invisible-hidden {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
}

View File

@@ -0,0 +1,466 @@
@charset "utf-8";
/* CSS Document */
body{ background:#EEF2F5;}
.preview_header{ background:#FFFFFF; text-align:center; width:100%; position:fixed; top:0; z-index:100; -webkit-box-shadow:0 2px 17px 0 rgba(239,239,239,0.50); box-shadow:0 2px 17px 0 rgba(239,239,239,0.50);}
.preview_table{ height:70px; display:table; margin:0 auto;}
.preview_opacity{ height:60px; padding-top:10px; line-height:20px; font-size:14px; color:#646873; display:inline-block; vertical-align:middle; cursor:pointer;}
.preview_opacity.active{ background:#3A8BFF; color:#FFFFFF;}
.preview_opacity:hover{ opacity:.7;}
.preview_opacity.active:hover{ opacity:1;}
.preview_line{ width:1px; height:70px; background:#F2F2F2; margin:0 20px; display:inline-block; vertical-align:middle;}
.preview_computer{ width:90px; margin-right:20px;}
.preview_mobile{ width:90px; margin-right:20px;}
.preview_close{ width:80px; margin-left:20px;}
.preview_opacity:before{ content:''; display:block; width:26px; height:26px; margin:0 auto 6px; background:url(../../../mooc2/images/Preview_icons.png) no-repeat; overflow:hidden;}
.preview_computer:before{ background-position:0 0; background-size:52px auto;}
.preview_computer.active:before{ background-position:-26px 0; background-size:52px auto;}
.preview_mobile:before{ background-position:0 -26px; background-size:52px auto;}
.preview_mobile.active:before{ background-position:-26px -26px; background-size:52px auto;}
.preview_close:before{ background-position:0 -52px; background-size:52px auto;}
.fanyaPreview{ width:100%; min-width:1280px; position:absolute;}
.prev_box{ width:930px; background:#F5F8FB; margin:30px auto 0; border-radius:6px; position:relative; -webkit-box-shadow:0 2px 17px 0 rgba(225,237,241,0.81); box-shadow:0 2px 17px 0 rgba(225,237,241,0.81);}
.prev_title_pos{ width:100%;}
.prev_title{ padding:0 100px; line-height:36px; font-size:26px; color:#131B26; font-weight:500; text-align:left; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.prev_list{ padding:0 100px; margin-top:4px;}
.prev_list ul{}
.prev_list li{ margin:14px 14px 0 0; padding:6px 12px; height:20px; line-height:20px; background:#E8F1FE; font-size:14px; color:#474C59; border-radius:32px; cursor:pointer; float:left;}
.prev_list li .num{ font-family:'D-DIN'; margin-right:6px; display:inline-block; vertical-align:top;}
.prev_list li .spanText{ max-width:160px; display:inline-block; vertical-align:top; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.prev_list li.active{ background:#3A8BFF; color:#FFFFFF;}
/*.prev_list li{ margin-right:10px;}*/
/*.prev_list li .num{ width:18px; height:18px; line-height:18px; margin:0 4px 2px 0; background:#B5D3F6; font-size:10px; color:#FFF; border-radius:18px; display:inline-block; vertical-align:middle; text-align:center;}*/
/*.prev_list li.active{ background:#FFFFFF; color:#38537C;}*/
/*.prev_list li.active .num{ background:#3A8BFF;}*/
/*.prev_list li:hover{ background:#FFFFFF;}*/
/*.prev_list li .prev_white{ height:30px; line-height:1; padding-top:14px; border-radius:6px 6px 0 0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; text-align:center;}*/
/*.prev_list li.active .prev_white{ padding:14px 12px 0; background:#FFFFFF; position:absolute; top:0; left:0; right:0; z-index:99;}*/
.prev_select{ width:70px; height:44px; background:#F5F8FB; border-radius:6px 6px 0 0; position:absolute; bottom:0; right:10px; -webkit-box-shadow:0px 2px 17px 0px rgba(225,237,241,0.81); box-shadow:0px 2px 17px 0px rgba(225,237,241,0.81);}
.prev_select_white{ background:#FFFFFF;}
.prev_select_name{ display:block; width:70px; height:44px; background:url(../../../mooc2/images/rightArrow.png) no-repeat center/14px; cursor:pointer;}
.prev_select_con{ width:174px; padding:6px 2px; background:#FFFFFF; border-radius:6px; position:absolute; right:-10px; top:44px; z-index:9; -webkit-box-shadow:0px 2px 12px 0px rgba(175,187,204,0.75); box-shadow:0px 2px 12px 0px rgba(175,187,204,0.75);}
.prev_select_con ul{ max-height:320px;}
.prev_select_con li{ height:40px; line-height:40px; padding:0 20px 0 38px; font-size:14px; color:#646873; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; cursor:pointer;}
.prev_select_con li.active{ color:#3B90FF; background:#F5F8FB url(../../../mooc2/images/prev_select_active.png) no-repeat 14px center/16px;}
.prev_select_con li.active:hover{ background:#F5F8FB url(../../../mooc2/images/prev_select_active.png) no-repeat 14px center/16px;}
.prev_select_con li:hover{ color:#3B90FF; background:#F5F8FB;}
.prev_main{ padding: 30px 80px;background: #FFFFFF;box-shadow: none;webkit-box-shadow: none;position: relative;border-radius: 6px;}
.prev_main_text{ min-height:1000px; line-height:2; font-size:14px; color:#181E33;}
.prev_main_text img{ max-width:820px;}
/*Loading*/
.Loading{ line-height:18px; font-size:14px; color:#A8A8B3; text-align:center; padding:10px 0 0;}
.Loading img{ width:18px; height:18px; margin:0 10px 2px 0; vertical-align:middle;}
/*章节左右pop*/
.fanyaPreview_left{ padding-left:308px;}
.fanyaPreview_right{ padding-right:308px;}
.posChapter_left{ left:0; bottom:0;}
.posChapter_right{ right:0; bottom:0;}
.posChapter{ width:432px; position:fixed; background:#FFFFFF; z-index:99; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;}
.posChapter_left .drag{ position:absolute; top:0; right:-8px;}
.posChapter_right .drag{ position:absolute; top:0; left:-8px;}
.drag{ width:8px; height:100%; background:#C7CDD2;}
.drag_shizi{ width:6px; height:34px; position:absolute; top:40%; left:50%; margin:-3px; cursor:e-resize;}
.drag_shizi:before{ content:''; display:block; width:2px; height:34px; background:#ffffff; float:left;}
.drag_shizi:after{ content:''; display:block; width:2px; height:34px; background:#ffffff; float:right;}
.switchbtn{ width:32px; height:40px; background:#eaf0f8;top:46px; border-radius:6px 0px 0px 6px; z-index:222; cursor:pointer; -webkit-box-shadow:rgba(156,165,182,.6) 0 1px 3px 0; box-shadow:rgba(156,165,182,.6) 0 1px 3px 0;}
.switchbtn:before{ content:''; display:block; width:14px; height:14px; margin:13px auto 0; background:url(../../../mooc2/images/posflfr.png) no-repeat center/ 14px;}
.switchbtn:hover{ opacity:.7;}
.posChapter_left .switchbtn{ position:absolute; right:0; top:10px;}
.posChapter_right .switchbtn{ position:absolute; right:0; top:10px;}
.posChapter_left .switchbtn:before{
-webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -ms-transform:rotate(180deg); -o-transform:rotate(180deg); transform:rotate(180deg);
-webkit-transition:all .2s linear; -moz-transition:all .2s linear; -ms-transition:all .2s linear; -o-transition:all .2s linear; transition:all .2s linear;
}
.posChapter_left .switchbtn_cur:before{
-webkit-transform:rotate(0deg); -moz-transform:rotate(0deg); -ms-transform:rotate(0deg); -o-transform:rotate(0deg); transform:rotate(0deg);
}
.posChapter_right .switchbtn:before{
-webkit-transform:rotate(0deg); -moz-transform:rotate(0deg); -ms-transform:rotate(0deg); -o-transform:rotate(0deg); transform:rotate(0deg);
-webkit-transition:all .2s linear; -moz-transition:all .2s linear; -ms-transition:all .2s linear; -o-transition:all .2s linear; transition:all .2s linear;
}
.posChapter_right .switchbtn_cur:before{
-webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -ms-transform:rotate(180deg); -o-transform:rotate(180deg); transform:rotate(180deg);
}
.posDirectory{ height:60px; line-height:60px; padding:0 24px; font-size:16px; color:#A8A8B3; font-weight:600;}
.posCatalog{ width:100%; position:relative;}
.posCatalog li{ line-height:40px; cursor:pointer;}
.posCatalog_select{ font-size:14px; color:#181E33; position:relative;}
.posCatalog_title{
display:block; padding:0 40px 0 20px; font-weight:600; background:#F8F9FA; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
background-image:-webkit-linear-gradient(-180deg, #FCFDFE 0%, #F8F9FA 100%);
background-image:-moz-linear-gradient(-180deg, #FCFDFE 0%, #F8F9FA 100%);
background-image:-o-linear-gradient(-180deg, #FCFDFE 0%, #F8F9FA 100%);
background-image:linear-gradient(-180deg, #FCFDFE 0%, #F8F9FA 100%);
}
.posCatalog_title:hover{ opacity:.7;}
.posCatalog_name{ display:block; padding:0 40px 0 20px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.posCatalog_name:hover{ background:#F7FAFC;}
.posCatalog_sbar{ max-width:66px; display:inline-block; font-style:normal; vertical-align:top; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.posCatalog_active{ background:#F0F6FF; position:relative;}
.posCatalog_active:before{ content:''; display:block; width:100%; height:1px; background:#D6E8FF; position:absolute; top:0;}
.posCatalog_active:after{ content:''; display:block; width:100%; height:1px; background:#D6E8FF; position:absolute; bottom:0;}
.posCatalog_active .posCatalog_name{ background:#F0F6FF;}
.posCatalog_level{ display:none;}
.posCatalog_level li .posCatalog_name{ padding-left:38px;}
.posCatalog_level li li .posCatalog_name{ padding-left:56px;}
.posCatalog_level li li li .posCatalog_name{ padding-left:74px;}
.posCatalog_level li li li li .posCatalog_name{ padding-left:92px;}
.posCatalog_level li li li li li .posCatalog_name{ padding-left:110px;}
/*
.posCatalog li .posCatalog_title:before,
.posCatalog li .posCatalog_select>.posCatalog_name:before{ content:''; display:inline-block; width:12px; height:12px; vertical-align:middle; margin:0 6px 2px 0;}
.posCatalog_putit>.posCatalog_select>.posCatalog_title:before,
.posCatalog_putit>.posCatalog_select>.posCatalog_name:before{ content:''; display:inline-block; width:12px; height:12px; background:url(../images/chapter/posUpDown.png) no-repeat center/12px;}
*/
.titleIcon:before{ content:''; display:inline-block; width:12px; height:12px; background:url(../../../mooc2/images/posUpDown.png) no-repeat center/12px; vertical-align:middle; margin:0 6px 2px 0;
-webkit-transition:all .2s linear; -moz-transition:all .2s linear; -ms-transition:all .2s linear; -o-transition:all .2s linear; transition:all .2s linear;}
.posCatalog_rotate:before{-webkit-transform:rotate(90deg); -moz-transform:rotate(90deg); -ms-transform:rotate(90deg); -o-transform:rotate(90deg); transform:rotate(90deg);}
.catalog_points_yi{ height:20px; line-height:20px; font-size:12px; color:#FFF; text-align:center; font-family:arial; display:block; border-radius:20px; -webkit-box-shadow:0 2px 6px 0 rgba(255,182,28,0.57); box-shadow:0 2px 6px 0 rgba(255,182,28,0.57);}
.catalog_points_yi{ width:20px; background:url(../../../mooc2/images/chapter_icons.png) no-repeat 0 -120px/150px auto; position:absolute; right:20px; top:50%; margin-top:-10px;}
/*手机预览*/
/*.mobilePhone{ width:402px; height:749px; margin:20px auto; background:url(../../../mooc2/images/MobilePhone.png) no-repeat;}*/
.mobile_box{ height:554px; padding:87px 37px 106px 45px;}
.mobile_title{ height:40px; line-height:40px; background:#F5F6F7; position:relative;}
.mobile_title h2{ margin:0 54px; font-size:16px; color:#181E33; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.mobile_title .return{ width:16px; height:16px; background:url(../../../mooc2/images/posflfr.png) no-repeat center/16px; display:block; position:absolute; left:10px; top:50%; margin-top:-8px;
-webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -ms-transform:rotate(180deg); -o-transform:rotate(180deg); transform:rotate(180deg);}
.mobile_thead{ width:320px; height:37px; line-height:36px; overflow:hidden;}
.mobile_thead ul{ height:36px; font-size:14px; color:#181E33; border-bottom:solid #E4EFFF 1px;}
.mobile_thead li{ width:150px; float:left; cursor:pointer;}
.mobile_thead li.active{ color:#3A8BFF; border-bottom:solid #3A8BFF 1px;}
.mobile_thead li:hover{ opacity:.7;}
.mobile_thead li.active:hover{ opacity:1;}
.mobile_thead li>span{ display:block; margin:0 12px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.mobile_tbody{ padding:6px 0; font-size:14px; color:#181E33; line-height:1.5;}
.mobile_tbody img{ max-width:300px;}
.mobile_text{ padding:0 10px; height:464px; overflow:hidden;}
/*置顶二维码*/
.DownCode{ width:40px; height:40px; background:#FFF url(../../../mooc2/images/qrcode.png) no-repeat 0 0/40px auto; border-radius:4px; cursor:pointer; position:relative;}
.DownCode:hover{ background:#3A8BFF url(../../../mooc2/images/qrcode.png) no-repeat 0 -40px/40px auto;}
.DownCode_con{ width:146px; height:146px; padding-top:14px; background:#FFFFFF; border-radius:6px; position:absolute; right:50px; top:-10px; display:none; -webkit-box-shadow:0px 2px 17px 0px rgba(219,231,236,0.81); box-shadow:0px 2px 17px 0px rgba(219,231,236,0.81);}
.DownCode_con:before{ content:''; display:block; width:0; height:0; border:solid #FFF 3px; border-width:5px 3px; border-color:transparent transparent transparent #FFF; position:absolute; top:24px; right:-6px;}
.DownCode_pic{ width:108px; height:108px; margin:0 auto;}
.DownCode_pic img{ width:108px; height:108px; display:block;}
.DownCode_text{ line-height:18px; margin-top:10px; font-size:12px; color:#A8A8B3; text-align:center;}
.DownCode:hover .DownCode_con{ display:block;}
#DownloadaDiv{ right:328px; bottom:140px;}
#JS_back_to_top{ right:328px; bottom:90px;}
/*学生端*/
.tabCatalog{ height:60px; background:#FFFFFF; position:relative; z-index:200;}
.tabCatalog ul{ height:40px;padding:10px 14px 0; background:#F2F4F7;}
.tabCatalog li{ float:left;position:relative; width:auto;height:40px;line-height:40px;text-align:center;cursor:pointer;font-size:16px; padding:0 16px; margin:0 8px 0 0; color:#474C59; border-radius:0; opacity:1;}
.tabCatalog li:hover{ opacity:1;}
.tabCatalog li.active{ opacity:1;background:none; font-size:18px; color:#3a8bff; font-weight:500;}
.tabCatalog li.active:after{ position:absolute; bottom:0; left:50%; margin-left:-14px; content:''; display:block; width:28px; height:4px; background:#3A8BFF; border-radius:3px;}
.icon_Completed{ width:20px; height:20px; background:url(../../../mooc2/images/chapter_wancheng.png) no-repeat center/20px; position:absolute; right:20px; top:50%; margin-top:-10px;}
.Loading.padding20{ padding:10px 0 20px;}
/*讨论*/
.noTopic{ position: absolute;width: 100%;top: 243px;left: 0;line-height: 20px;font-size: 14px;color: #A8A8B3;text-align: center;}
.noMark {
position: absolute;
width: 100%;
top: 243px;
left: 0;
line-height: 20px;
font-size: 14px;
color: #A8A8B3;
text-align: center;
}
.newTopic1{ height:30px; padding:4px 22px 0; position:relative;}
.newTopic_bnt{ height:20px; line-height:20px; font-size:14px; color:#3A8BFF; /*font-weight:600;*/ cursor:pointer;}
.newTopic_bnt>i{ width:16px; height:16px; background:url(../../../mooc2/images/popBook_add.png) no-repeat; display:inline-block; vertical-align:middle; margin:0 4px 2px 0;}
.newTopic_bnt:hover{ opacity:.7;}
.formTopic{ width:100%; background:#FFFFFF; position:absolute; left:0; top:0; z-index:111; box-shadow:0px 10px 10px 0px rgba(208,212,214,.4);}
.formTopic_padding{ padding:10px 14px 0; max-height:382px; overflow:hidden;}
.formTopic_title{}
.formTopic_title>input{ display:block; width:calc(100% - 30px); height:20px; line-height:20px; padding:10px 14px; font-size:14px; color:#181E33; border:solid #E1E1E5 1px; border-radius:4px;}
.formTopic_title>input:focus{ border:1px solid #CCDEF3; box-shadow:0 0 4px 0 #75BAFF;}
.formTopic_text{ margin-top:15px; padding:10px 0; border:solid #E1E1E5 1px; border-radius:4px;}
.formTopic_text>textarea{ display:block; width:calc(100% - 30px); height:200px; line-height:20px; padding:0 14px; font-size:14px; color:#181E33; font-family:Microsoft YaHei,SimSun, Arial, Helvetica, sans-serif;}
.areaShadow{ border:1px solid #CCDEF3; box-shadow:0 0 4px 0 #75BAFF;}
.formTopic_pic{ margin-top:5px; zoom:1; overflow:hidden;}
.formTopic_pic li{ width:50px; height:50px; float:left; margin:10px 10px 0 0; position:relative; cursor:default;}
.formTopic_pic li img{ width:46px; height:46px; display:block; border:solid #E1E1E5 2px; border-radius:4px;}
.formTopic_pic li:hover img{ border-color:#3A8BFF;}
.formTopic_pic li .delePic{ width:20px; height:20px; background:url(../../../mooc2/images/icon-del-img.png) no-repeat center/20px; display:none; position:absolute; top:-5px; right:-8px;}
/*.formTopic_pic li .delePic:hover{ opacity:.7;}*/
.formTopic_pic li:hover .delePic{ display:block;}
.formTopic_pic li.addPic{ width:48px; height:48px; border:dashed #CCDEF3 1px; position:relative; cursor:pointer;}
.formTopic_pic li.addPic:before{ content:''; display:block; width:28px; height:0; border-top:dashed #CCDEF3 1px; position:absolute; top:50%; left:50%; margin-left:-14px;}
.formTopic_pic li.addPic:after{ content:''; display:block; width:0; height:28px; border-left:dashed #CCDEF3 1px; position:absolute; top:50%; left:50%; margin-top:-14px;}
.formTopic_pic li.addPic:hover,.formTopic_pic li.addPic:hover:before,.formTopic_pic li.addPic:hover:after{ border-color:#3a8bff;}
.formTopic_docx{ margin-top:14px; background:#F6F7F8;}
.formTopic_docx li{ padding-left:24px; padding-right:50px; line-height:20px; font-size:14px; color:#5C656E; position:relative;}
.formTopic_docx li:before{ content:''; display:block; width:16px; height:16px; background:url(../../../mooc2/images/topic_addFile.png) no-repeat center/16px; position:absolute; left:0; top:2px;}
.formTopic_docx li+li{ margin-top:12px;}
.formTopic_docx li .font12{ font-size:12px;}
.formTopic_docx li .docx_dele{ line-height:20px; color:#91A0B5; position:absolute; right:0; top:0;}
.formTopic_docx li .docx_dele:hover{ opacity:.7;}
.replyTopic{ height:28px; padding:20px 14px;}
.replyTopic .imgUpload,.replyTopic .fileUpload{ float:left; width:18px; height:28px; line-height:28px; margin-right:30px; display:inline-block; cursor:pointer; position:relative; overflow:hidden;}
.replyTopic .imgUpload input[type=file],.replyTopic .fileUpload input[type=file] { display:block; font-size:30px; opacity:0; filter:alpha(opacity=0); position:absolute; right:0; top:0; cursor:pointer;}
.replyTopic .imgUpload:hover,.replyTopic .fileUpload:hover{ opacity:0.7; }
.replyTopic .imgUpload{ background:url(../../../mooc2/images/topic_addimg.png) center center no-repeat; }
.replyTopic .fileUpload { background:url(../../../mooc2/images/topic_addFile.png) center center no-repeat; }
.replyQuxiao{ line-height:28px; font-size:14px; color:#91A0B5; margin-right:20px; cursor:pointer;}
.replyQuxiao:hover{ opacity:.7;}
.jb_btn_60{width:60px;height:28px;line-height:28px; background:url(../../../mooc2/images/chapter_icons.png) no-repeat 0 -235px/150px auto; cursor:pointer;}
.jb_btn_60:hover{ background:url(../../../mooc2/images/chapter_icons.png) no-repeat 0 -265px/150px auto;}
.jb_btn_60:active{ background:url(../../../mooc2/images/chapter_icons.png) no-repeat 0 -295px/150px auto;}
.tableDiscuss{ padding: 0 14px 35px 14px;}
.itemDiscuss{ padding:14px; background:#FAFCFF; border:solid #E5ECF3 1px; border-radius:4px;margin-top:10px}
.itemDiscuss:first-child{ margin-top:0px;}
.dis_name{ max-width:70px; line-height:20px; margin-right:10px; display:inline-block; vertical-align:middle; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.dis_time{ line-height:20px; display:inline-block; vertical-align:middle;}
.dis_title{ line-height:20px; font-size:14px; margin-top:6px; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;}
.dis_text{ line-height:20px; font-size:14px; margin-top:11px; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;}
.dis_text a {color: rgb(100, 104, 115);}
.dis_pic{ position:relative; margin-top:14px; height:100px; cursor:pointer;overflow: hidden;}
.dis_pic .imgList img{ display:block; float:left; width:100px; height:100px; border-radius:4px; margin-right:16px;}
/*.dis_pic .imgList img:hover { opacity:0.7;}*/
.dis_pic .imgTotal{ position:absolute; top:10px; left:0; height:30px; padding:0 5px; line-height:30px; font-size:12px; color:#FFFFFF; background:rgba(27, 27, 27, 0.69); border-radius:0px 2px 2px 0px;}
.itemDiscuss:hover{ cursor:pointer;}
.itemDiscuss:hover .dis_title{color:#3A4B87;}
.itemDiscuss:hover .dis_text{ color:#8B92A6;}
.itemDiscuss:hover .dis_pic{ opacity:0.7;}
.colorOrange{ color:#F7704E;}
.dis_docx{ margin-top:14px;}
.dis_docx li{ padding-left:24px; line-height:20px; font-size:14px; color:#5C656E; position:relative;}
.dis_docx li:before{ content:''; display:block; width:16px; height:16px; background:url(../../../mooc2/images/topic_addFile.png) no-repeat center/16px; position:absolute; left:0; top:2px;}
.dis_docx li+li{ margin-top:12px;}
.dis_docx li .font12{ font-size:12px;}
.dis_docx li:hover{ color:#8B92A6;}
.dis_docx li:hover .font12{ color:#C7C8D4;}
.topic_interactive { margin-top:10px; height:20px; line-height:20px; }
.topic_interactive .like,.topic_interactive .comment{ float:right; min-width:60px; text-align:right; padding-left:10px;}
.topic_interactive .like>i,.topic_interactive .like>span,.topic_interactive .comment>i,.topic_interactive .comment>span{ cursor:pointer;}
.topic_interactive span { display:inline-block; vertical-align:middle; margin:0 4px; font-size:14px; color:#91A0B5;}
.topic_interactive a{color:#91A0B5}
.topic_interactive .likeIcon,.topic_interactive .commentIcon, .topic_interactive .zan i,.topic_interactive .zan1 i{ display:inline-block; vertical-align:middle; width:16px; height:16px; background:url(../../../mooc2/images/topic_interactive.png) no-repeat;}
.topic_interactive .likeIcon { background-position:0 0; }
.topic_interactive .commentIcon { background-position:0 -24px; }
.topic_interactive .like.active .likeIcon{background-position:-24px 0; }
.topic_interactive .like.active span{ color:#3A8BFF; }
.topic_interactive .zan1 i{background-position:-24px 0;}
.topic_interactive .like:hover,.topic_interactive .comment:hover{ opacity:0.7; }
.Note_text{ max-height:400px; line-height:20px; font-size:14px; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:20; -webkit-box-orient:vertical;}
.Note_time{ line-height:17px; margin-top:14px;}
.itemDiscuss:hover .Note_text{color:#3A4B87;}
.formNote_padding{ padding:0 14px 0; max-height:500px; overflow: auto;margin-top:10px;}
.formNote_text{ padding:10px 0; border:solid #E1E1E5 1px; border-radius:4px;}
.formNote_text .kc_notes_area{ display:block; width:calc(100% - 30px); height:240px;overflow: hidden; line-height:20px; padding:0 14px; font-size:14px; color:#181E33; font-family:Microsoft YaHei,SimSun, Arial, Helvetica, sans-serif;}
.areaShadow{ border:1px solid #CCDEF3; box-shadow:0 0 4px 0 #75BAFF;}
.z-index99{ z-index:999;}
.subNav h2{ padding:0 200px;font-size:16px; color:#A8A8B3;}
.newTopic{ padding:4px 20px 0;}
.tableDiscuss{ padding:0;}
.itemDiscuss{ position:relative; padding:16px 20px 20px; background:none; border:0; border-radius:0; margin:0 !important;}
.itemDiscuss:after{ position:absolute; left:20px; bottom:0; right:20px; content:''; display:block; height:1px; background:#F2F2F2;}
.dis_photos{ height:32px; line-height:32px;}
.dis_photos img{ width:32px; height:32px; margin-right:10px; float:left; border-radius:50%;}
.dis_photos .dis_name{ line-height:32px; max-width:100px;}
.dis_photos .dis_time{ line-height:32px;}
.dis_photos .colorOrange{ color:#F7704E;}
.bjCard_photos{ height:32px; line-height:32px; margin-bottom:10px;}
.bjCard_photos img{ width:32px; height:32px; margin-right:10px; float:left; border-radius:50%;}
.bjCard_photos .dis_name{ line-height:32px; max-width:100px;}
.bjCard_photos .dis_time{ line-height:32px;}
.bjCard_photos .colorOrange{ color:#F7704E;}
.dis_title{ margin-top:10px; line-height:22px; font-size:16px;}
.dis_pic{ margin-top:10px;}
.topic_interactive{ margin-top:14px;}
.dis_file{ padding-left:20px; margin-top:10px; height:18px; line-height:18px; color:#8A8B99; background:url(../images/chapter/topic_numFile.png) no-repeat left center;}
.dis_ments{ margin-top:14px;}
.dis_ments_item{ line-height:20px; font-size:14px; color:#8A8B99; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;}
.dis_ments_more{ font-size:14px; color:#6B89B3;}
.itemDiscuss:hover{ background:#F0F6FF; cursor:pointer;}
.itemDiscuss:hover .dis_title{color:#3A8BFF;}
.itemDiscuss:hover .dis_text{ color:#474C59;}
.itemDiscuss:hover .dis_pic{ opacity:1;}
.catalog_points_yi,.catalog_points_er,.catalog_points_sa,.catalog_points_review{ height:20px; line-height:20px; font-size:12px; color:#FFF; text-align:center; font-family:arial; display:block; border-radius:20px; -webkit-box-shadow:0 2px 6px 0 rgba(255,182,28,0.57); box-shadow:0 2px 6px 0 rgba(255,182,28,0.57);}
.catalog_points_yi{ width:20px; background:url(../../../mooc2/images/chapter_icons.png) no-repeat 0 -120px/150px auto; position:absolute; right:20px; top:50%; margin-top:-10px;}
.catalog_points_er{ width:20px; background:url(../../../mooc2/images/catalog_tiem.png) no-repeat center/20px auto; position:absolute; right:20px; top:50%; margin-top:-10px;}
.catalog_points_sa{ width:20px; background:url(../../../mooc2/images/catalog_qi.png) no-repeat center/20px auto; position:absolute; right:20px; top:50%; margin-top:-10px;}
.catalog_points_review{ width:20px; background:url(../../../mooc2/images/icon-review.png) no-repeat center/20px auto; position:absolute; right:20px; top:50%; margin-top:-10px;}
.catalog_points_er,.catalog_points_sa,.catalog_points_review{ box-shadow:none; border-radius:0;}
/*目录气泡提示*/
.prevTips{ cursor:default !important;}
.prevHoverTips{ height:40px; line-height:40px; white-space:nowrap; text-align:center; font-family:Microsoft YaHei; font-size:12px; color:#FFF; background:rgba(24,30,51,0.80); border-radius:4px; display:block; position:absolute; top:-48px; z-index:99;}
.prevHoverTips i{ display:block; width:0px; height:0px; border:solid rgba(24,30,51,0.80) 4px; border-width:3px 5px; position:absolute; right:15px; top:40px; top:auto; border-color:rgba(24,30,51,0.80) transparent transparent transparent;}
.prevTips>.prevHoverTips{ padding:0 16px; right:-10px; opacity:0; visibility:hidden;
-webkit-transition:opacity 0.3s 1s, visibility 0.3s 1s;
-moz-transition:opacity 0.3s 1s, visibility 0.3s 1s;
-ms-transition:opacity 0.3s 1s, visibility 0.3s 1s;
-o-transition:opacity 0.3s 1s, visibility 0.3s 1s;
transition:opacity 0.3s 1s, visibility 0.3s 1s;
}
.posCatalog_select:hover .prevHoverTips{ display:block; opacity:1; visibility:visible;
-webkit-transition:opacity 0.3s 1s, visibility 0.3s 0.3s;
-moz-transition:opacity 0.3s 1s, visibility 0.3s 0.3s;
-ms-transition:opacity 0.3s 1s, visibility 0.3s 0.3s;
-o-transition:opacity 0.3s 1s, visibility 0.3s 0.3s;
transition:opacity 0.3s 1s, visibility 0.3s 0.3s;
}
.tipTime.prevTips>.prevHoverTips{width:241px;padding:0 16px;right:-10px;opacity:1;visibility:hidden;-webkit-transition:opacity 0.3s 1s,visibility 0.3s 1s;-moz-transition:opacity 0.3s 1s,visibility 0.3s 1s;-ms-transition:opacity 0.3s 1s,visibility 0.3s 1s;-o-transition:opacity 0.3s 1s,visibility 0.3s 1s;transition:opacity 0.3s 1s,visibility 0.3s 1s}
.posCatalog_select:hover .tipTime.prevTips>.prevHoverTips{display:block;opacity:1;visibility:visible;-webkit-transition:opacity 0.3s 1s,visibility 0.3s 0.3s;-moz-transition:opacity 0.3s 1s,visibility 0.3s 0.3s;-ms-transition:opacity 0.3s 1s,visibility 0.3s 0.3s;-o-transition:opacity 0.3s 1s,visibility 0.3s 0.3s;transition:opacity 0.3s 1s,visibility 0.3s 0.3s}
.tipTime.prevTips >.prevHoverTips{height:54px;padding:0px 16px;line-height:17px;word-wrap:normal;white-space:break-spaces;text-align:left;font-family:Microsoft YaHei;font-size:12px;color:#FFF;background:rgba(24,30,51,0.80);border-radius:4px;display:block;position:absolute;top:-60px;z-index:99;letter-spacing: 0.3px;}
.tipTime.prevTips >.prevHoverTips i{top: 54px}
.tipTime.prevTips >.prevHoverTips em{display:inline-block;margin-top:10px;}
.NoClick .posCatalog_name{ color:#A8A8B3; pointer-events: none; cursor:default !important;}
.NoClick{cursor:default !important;}
.NoClick .posCatalog_name:hover{ background:none;}
.ksDingweiBox{ bottom:150px !important; border-radius:50%; box-shadow:rgba(255,182,28,.6) 0 2px 6px 0;}
.ksDingwei{ width:40px; height:40px; line-height:40px; font-size:18px; color:#FFF; display:block; background:url(../../../mooc2/images/Oval-Copy.png) no-repeat; overflow:hidden; border-radius:50%; text-align:center;}
.ksDingwei:hover{ color:#FFF7DF; background-position:0 -40px;}
.ksDingwei:active{ color:#FFE2B1; background-position:0 -80px;}
.ksDingweiTxt{ padding:0 16px; width:auto; white-space:nowrap;}
.tag { display: inline-block; vertical-align: middle; height: 20px; margin-right: 10px; line-height: 20px; padding: 0 6px; font-size: 12px; color: #FFFFFF; border-radius: 4px; }
.tag.blue { background: #8FB4DE; }
.tag.red { background: #DE8F8F; }
.tag.yellow { background: #EDAF69; }
#kf{display: block;padding-right: 0px;height: 40px;width: 40px;background: #fff url(../../../mooc2/images/kfIcon.png) no-repeat 8px center;padding-left: 0px;border-radius: 4px;box-shadow: 0 1px 7px 0 rgba(198,204,217,0.58);}
.useHelpHref{display: block;padding-right: 0px;height: 40px;width: 40px;background: #fff url(../../../mooc2/images/useHelp.png) no-repeat 8px center;padding-left: 0px;border-radius: 4px;box-shadow: 0 1px 7px 0 rgba(198,204,217,0.58);}
#kf{margin-top:10px;}
.kfDiv,.useHelp{position:relative}
.kfHover,.useHelpHover{position:absolute;right:50px;bottom:0px;width: 82px;height:40px;background: rgba(24,30,51,0.80);border-radius: 4px;margin-left: -28px;opacity: 0; visibility: hidden;-webkit-transition: opacity 0.3s 1s, visibility 0s 0.3s;transition: opacity 0.3s 1s, visibility 0s 0.3s;transition: opacity 0.3s 1s, visibility 0s 0.3s;text-align:center;line-height:40px;color:#fff;}
.kfDiv:hover .kfHover, .useHelp:hover .useHelpHover{ display:block; opacity:1; visibility:visible;
-webkit-transition:opacity 0.3s 1s, visibility 0.3s 1s;
transition:opacity 0.3s 1s, visibility 0.3s 1s;}
.kfHover i,.useHelp i{ display:block; width:0px; height:0px; border:solid rgba(24,30,51,0.80) 4px; position:absolute; right:-8px; top:16px; bottom:auto; border-color:rgba(24,30,51,0.80) transparent transparent transparent;transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);}
.kfHover i.active, .useHelp i.active{ display:block; width:0px; height:0px; border:solid rgba(24,30,51,0.80) 4px; position:absolute; left:50%; margin-left:-4px; bottom:40px; top:auto; border-color:transparent transparent rgba(24,30,51,0.80) transparent;}
.titleEl{margin-top:137px!important;}
.edui-editor-toolbarbox{width:404px!important;}
@media screen and (max-width: 1440px) {
.posChapter {width: 300px;}
.prev_title{padding: 0 80px;}
.prev_list{padding: 0 80px;}
.titleEl{margin-top:189px!important;}
.edui-editor-toolbarbox{width:272px!important;}
.tabCatalog li {
padding: 0px 2px;
}
.tabCatalog ul {
padding: 10px 14px 0 10px;
}
}
.dotNote_box{ display:none;position:absolute; right:15px; bottom:80px; width:46px; height:46px;z-index:100;}
.dotNote_box .dotNote_dadian{ width:46px; height:46px; background:url(../../../mooc2/images/chapter/ico-sp-dotNote.png) no-repeat;background-size:100%;cursor: pointer;}
.dotNote_box .dotNote_dadian.en{background:url(/mooc2/images/chapter/noteMarkBtn.png) no-repeat;background-size:100%;}
.dotNote_con{display: none; position:absolute; bottom:0; right:60px; z-index:10; width:200px; min-height:60px; background:#FFFFFF; border-radius:4px; box-shadow:0px 2px 12px rgba(175, 187, 204, 0.75);}
.dotNote_con:before{ position:absolute; left:100%; bottom:18px; display:block; content:''; width:0px; height:0px; border:solid #FFFFFF 6px; border-width:5px 4px; border-color:transparent transparent transparent #FFFFFF;}
.dotNote_padd{ padding:12px 16px;}
.dotNote_text{ line-height:20px;color:#131B26;}
.dotNote_bnt{ height:28px; margin-top:6px; text-align:right;}
.dotNote_blue{ width:58px; height:26px; line-height:26px; border:solid #8CBBFF 1px; font-size:14px; color:#3A8BFF; border-radius:6px; display:inline-block; vertical-align:top; text-align:center;}
.reportFrame{border:none;width: 638px;height:420px}
.record-box{margin-top:17px;}
.record-list{position: relative;padding-bottom: 17px;}
.record-list:last-child{padding-bottom: 3px;}
.record-list-tit{position: relative;line-height: 20px;top:-6px;margin-bottom: -8px;margin-left:12px;padding-left: 12px;display: inline-block;}
.record-list-tit:before{content: "";width:6px;height: 6px;position: absolute;top:50%;margin-top:-3px;left: -3px;z-index: 2;background: #b3b3b3;border-radius: 50%;}
.record-list-tit > *{display:inline-block;vertical-align: top;}
.record-list-time{font-size:12px;color:#919599;height: 20px;background:#f0f2f5;position: relative;margin-left:-24px;margin-right:2px;right:0;padding-left:22px;padding-right:15px;border-radius: 12px;min-width: 30px;-webkit-user-select:none;box-sizing: content-box;/* top: 8px; */}
.record-list-ppt{width:34px;height: 17px;line-height: 17px;background:#b3b3b3;margin:3px 0 0 6px; border-radius: 14px;text-align: center;font-size:11px;color:#FFF;}
.record-iframe .editor-iframe:first-child{margin-left:-11px; padding: 0;}
.record-iframe .editor-iframe{position: relative;margin-top:5px;}
.record-list-tit,.record-box-video .record-list-tit{line-height: 22px;top: -11px;margin-left: -12px;}
.record-box-video .record-list-tit{cursor: pointer}
.record-list-time,.record-box-video .record-list-time{background:#ebf7ff;color:#3A8BFF;height:22px;}
.record-list-tit:before,.record-box-video .record-list-tit:before{background: url("../../../mooc2/images/chapter/icon_arrow.png") no-repeat;background-size: contain;border-radius: 0;}
.record-box-video{padding-left: 8px;}
.record-list,.record-box-video .record-list{padding-left:12px;}
.record-box-video .record-list:after{content: '';position: absolute;left: -1px;top: 10px;width:1px;height:100%;background-color:#3A8BFF;z-index: 0;}
.titleEl{height: 36px;border-bottom: 1px solid #D4D6D9;}
.titleEl.focus{border-bottom: 1px solid #3A8BFF;}
.titleEl input{display: inline-block;width: 100%;height: 35px;line-height: 35px;font-size: 18px;font-weight: 500;}
.noteTitle{font-size:14px;color:#131B26;width: 100%;height: 28px;line-height: 28px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.itemDiscuss .Note_text{color:#474C59}
.fht_send{ position:fixed; bottom:24px; z-index:9999; overflow:hidden; background:rgba(29, 40, 64, 0.90); border:1px solid #3D4B66; border-radius:10px; box-shadow:-1px 1px 8px 0px rgba(1, 82, 128, 0.20);}
.fht_right{right: 24px;}
.fht_left{left: 24px;}
.fht_send_icon{ padding:10px; width:30px; height:26px; background:url(../../../mooc2/images/chapter/ico-fht-send.png) no-repeat center center; background-size:26px 26px;}
.fht_send_close{ width:16px; background:#26334D url(../../../mooc2/images/chapter/ico-fht-send-arrow.png) no-repeat center center; background-size:12px 12px;}
.fht_send_one{ cursor:pointer;}
.fht_send_two{ position:relative;}
.fht_send_two .fht_send_icon{ position:absolute; left:0; top:0;}
.fht_send_two .fht_send_text{ padding:0 26px 0 50px; width:154px; height:46px; line-height:46px; font-size:14px; color:#ACB4BF;}
.fht_send_two .fht_send_close{ position:absolute; right:0; top:0; bottom:0;}
.fht_send_three{ position:relative;}
.fht_send_three .fht_send_icon{ position:absolute; left:0; top:0;}
.fht_send_three .fht_send_close{ position:absolute; right:0; top:0; bottom:0;}
.fht_send_three .fht_send_form{ padding:13px 26px 13px 50px;}
.fht_send_three .fht_send_area{ width:182px; height:20px; max-height:200px !important; line-height:20px; font-size:14px; color:#FFFFFF; caret-color:#3A8BFF; font-family:Microsoft YaHei; background:none; border:0 none;}
.fht_send_three .fht_send_area::-webkit-scrollbar{ width: 8px;}
.fht_send_three .fht_send_area::-webkit-scrollbar-track{ background-color:#f5f5f5; border-radius:10px; display:none;}
.fht_send_three .fht_send_area::-webkit-scrollbar-thumb{ background-color: rgba(255, 255, 255, 0.15); border-radius:10px;}
.fht_send_three .fht_send_area::-webkit-scrollbar-button{ background-color: #eee; display: none;}
.fht_send_three .fht_send_area::-webkit-scrollbar-corner{ background-color: black;}
.fht_send_three .fht_send_area::-webkit-input-placeholder{ color:#ACB4BF; text-overflow:ellipsis; }
.fht_send_three .fht_send_area:-moz-placeholder{ color:#ACB4BF !important; text-overflow:ellipsis; }
.fht_send_three .fht_send_area::-moz-placeholder{ color:#ACB4BF !important; text-overflow:ellipsis; }
.fht_send_three .fht_send_area:-ms-input-placeholder{ color:#ACB4BF !important; text-overflow:ellipsis; }
.fht_send_bnt{ padding:0 30px 0 14px; height:32px; line-height:32px; border-top:solid rgba(255, 255, 255, 0.10) 1px; text-align:right;}
.fht_send_href{ font-size:14px; color:#3A8BFF; display:inline-block; vertical-align:middle;padding:0 10px;}
.markContent,.topicAskContent{display: block;width: 100%;height: 20px;line-height: 20px;padding:0 0 15px 0;}
.topicAskContent{padding-top:10px;padding-bottom:0}
.markContent i,.topicAskContent i{float: left; width: 2px;height:16px;margin-top:2px;background: #ACB4BF}
.markContent span,.topicAskContent span{float: left;padding-left:4px;line-height:20px;font-size:14px;color:#8A8B99;width: calc(100% - 6px);height: 20px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.posChapter2{width: 100%;border-radius: 8px;box-sizing: border-box;background:#FFFFFF; z-index:99; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;}
.newTopic2{ height:30px; padding:10px 22px 0; position:relative;}
.formTopic .jb_btn_60 {
width: 60px;
height: 28px;
line-height: 28px;
background: url(../../../mooc2/images/chapter_icons.png) no-repeat 0 -235px/150px auto;
cursor: pointer;
}
.formTopic .jb_btn_60:hover {
background: url(../../../mooc2/images/chapter_icons.png) no-repeat 0 -265px/150px auto;
}
.formTopic .jb_btn_60:active {
background: url(../../../mooc2/images/chapter_icons.png) no-repeat 0 -295px/150px auto;
}
.marTop20{margin-top:20px}
.mistakeType li{float:left;margin-right:30px;font-size:14px;cursor: pointer;}
.mistakeType li span{vertical-align:middle;display: inline-block}
.mistakeType li i{vertical-align:middle;display: inline-block;vertical-align: middle;width:18px;height:19px;background: url(../../../mooc2/images/chapter/ai/check.png) no-repeat;margin-right:10px;background-size:100%;}
.mistakeType li.selected i{background:url(../../../mooc2/images/chapter/ai/checked.png) no-repeat;background-size: 100%;}
.questionInstuctionbx{border:solid 1px #D4D6D9;border-radius:4px;padding:14px;box-sizing: border-box;height: 120px;}
.questionInstuctionbx textarea{height:75px;width:100%;font-size:14px;font-family:pingfang, microsofrYahei;line-height:20px ;}
.wordNumber{margin-top:5px;color:#ACB4BF}
.questionPicList{margin-top:16px;overflow: hidden;}
.questionPicList li{float:left;width:80px;height: 80px;margin-right:12px;margin-top:7px;position: relative;}
.questionPicList li img{width:100%;height:100%;}
.delPic{position: absolute;width:20px;height: 20px;background:url(../../../mooc2/images/chapter/delPic.png) no-repeat;background-size: 100%;top:-7px;right:-7px;cursor: pointer;}
.focus{border: solid 1px #3A8BFF;}
.addPicBtn{width:80px;height:80px;background:url(../../../mooc2/images/chapter/addPic.png) no-repeat;background-size: 100%;position: relative;overflow: hidden;}
.addPicBtn:hover{background:url(../../../mooc2/images/chapter/hoverAddPic.png) no-repeat;background-size: 100%;}
.addPicBtn input[type='file']{position: absolute;font-size:100px;right:0;bottom:0;width:100%;height:100%;cursor: pointer;opacity: 0;}
.addpicTips{font-size:13px;line-height: 18px;color:#8A8B99;margin-bottom:20px;margin-top:14px}
.popSetupFile{ padding:0 28px; margin:0 2px; height:348px;}
.feedbackBox{display:none;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,7 @@
/*
radialIndicator.js v 1.0.0
Author: Sudhanshu Yadav
Copyright (c) 2015 Sudhanshu Yadav - ignitersworld.com , released under the MIT license.
Demo on: ignitersworld.com/lab/radialIndicator.html
*/
!function(t,e,n){"use strict";function r(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,n,r){return e+e+n+n+r+r});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:null}function i(t,e,n,r){return Math.round(n+(r-n)*t/e)}function a(t,e,n,a,o){var u=-1!=o.indexOf("#")?r(o):o.match(/\d+/g),l=-1!=a.indexOf("#")?r(a):a.match(/\d+/g),s=n-e,h=t-e;return u&&l?"rgb("+i(h,s,l[0],u[0])+","+i(h,s,l[1],u[1])+","+i(h,s,l[2],u[2])+")":null}function o(){for(var t=arguments,e=t[0],n=1,r=t.length;r>n;n++){var i=t[n];for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}function u(t){return function(e){if(!t)return e.toString();e=e||0;for(var n=e.toString().split("").reverse(),r=t.split("").reverse(),i=0,a=0,o=r.length;o>i&&n.length;i++)"#"==r[i]&&(a=i,r[i]=n.shift());return r.splice(a+1,r.lastIndexOf("#")-a,n.reverse().join("")),r.reverse().join("")}}function l(t,e){e=e||{},e=o({},s.defaults,e),this.indOption=e,"string"==typeof t&&(t=n.querySelector(t)),t.length&&(t=t[0]),this.container=t;var r=n.createElement("canvas");t.appendChild(r),this.canElm=r,this.ctx=r.getContext("2d"),this.current_value=e.initValue||e.minValue||0}function s(t,e){var n=new l(t,e);return n.init(),n}var h=2*Math.PI,f=Math.PI/2;l.prototype={constructor:s,init:function(){var t=this.indOption,e=this.canElm,n=this.ctx,r=2*(t.radius+t.barWidth),i=r/2;return this.formatter="function"==typeof t.format?t.format:u(t.format),this.maxLength=t.percentage?4:this.formatter(t.maxValue).length,e.width=r,e.height=r,n.strokeStyle=t.barBgColor,n.lineWidth=t.barWidth,n.beginPath(),n.arc(i,i,t.radius,0,2*Math.PI),n.stroke(),this.imgData=n.getImageData(0,0,r,r),this.value(this.current_value),this},value:function(t){if(void 0===t||isNaN(t))return this.current_value;t=parseInt(t);var e=this.ctx,n=this.indOption,r=n.barColor,i=2*(n.radius+n.barWidth),o=n.minValue,u=n.maxValue,l=i/2;t=o>t?o:t>u?u:t;var s=Math.round(100*(t-o)/(u-o)*100)/100,c=n.percentage?s+"%":this.formatter(t);if(this.current_value=t,e.putImageData(this.imgData,0,0),"object"==typeof r)for(var d=Object.keys(r),m=1,v=d.length;v>m;m++){var g=d[m-1],p=d[m],x=r[g],b=r[p],I=t==g?x:t==p?b:t>g&&p>t?n.interpolate?a(t,g,p,x,b):b:!1;if(0!=I){r=I;break}}if(e.strokeStyle=r,n.roundCorner&&(e.lineCap="round"),e.beginPath(),e.arc(l,l,n.radius,-f,h*s/100-f,!1),e.stroke(),n.displayNumber){var y=e.font.split(" "),C=n.fontWeight,O=n.fontSize||i/(this.maxLength-(Math.floor(1.4*this.maxLength/4)-1));y=n.fontFamily||y[y.length-1],e.fillStyle=n.fontColor||r,e.font=C+" "+O+"px "+y,e.textAlign="center",e.textBaseline="middle",e.fillText(c,l,l)}return this},animate:function(t){var e=this.indOption,n=this.current_value||e.minValue,r=this,i=Math.ceil((e.maxValue-e.minValue)/(e.frameNum||(e.percentage?100:500))),a=n>t;return this.intvFunc&&clearInterval(this.intvFunc),this.intvFunc=setInterval(function(){if(!a&&n>=t||a&&t>=n){if(r.current_value==n)return void clearInterval(r.intvFunc);n=t}r.value(n),n!=t&&(n+=a?-i:i)},e.frameTime),this},option:function(t,e){return void 0===e?this.option[t]:(-1!=["radius","barWidth","barBgColor","format","maxValue","percentage"].indexOf(t)&&(this.indOption[t]=e,this.init().value(this.current_value)),void(this.indOption[t]=e))}},s.defaults={radius:50,barWidth:5,barBgColor:"#eeeeee",barColor:"#99CC33",format:null,frameTime:10,frameNum:null,fontColor:null,fontFamily:null,fontWeight:"bold",fontSize:null,interpolate:!0,percentage:!1,displayNumber:!0,roundCorner:!1,minValue:0,maxValue:100,initValue:0},e.radialIndicator=s,t&&(t.fn.radialIndicator=function(e){return this.each(function(){var n=s(this,e);t.data(this,"radialIndicator",n)})})}(window.jQuery,window,document,void 0);

View File

@@ -0,0 +1,13 @@
function setWidth(){
if(screen.width == 1024){
$('.headerwrap').css({'width':1000 + 'px'});
$('.main').css({'width':1000 + 'px'});
$('.left').css({'width':585 + 'px'});
$('.right').css({'width':385 + 'px'});
$('.tabs .lists li').css({'width':128 + 'px'});
$('.inputwords').css({'width':348 + 'px'});
}
}
setWidth();

View File

@@ -0,0 +1,17 @@
(function(doc, win) {
var docEl = doc.documentElement, resizeEvt = 'onorientationchange' in window ? 'onorientationchange' : 'resize', recalc =
function() {
var clientWidth = docEl.clientWidth;
// if (!clientWidth) return;
// if(clientWidth>=750){
// docEl.style.fontSize = '100px';
// }else{
// }
docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
};
if ( !doc.addEventListener)
return;
win.addEventListener(resizeEvt, recalc, false);
recalc();
})(document, window);

View File

@@ -0,0 +1,270 @@
function ResizeVideo(domUtils) {
this.editor = null
this.resizer = null
this.hands = []
this.target = null
this.dragId = -1
this.domUtils = domUtils
}
ResizeVideo.prototype = {
init: function (editor) {
var me = this
me.editor = editor
this.prePos = {
x: 0,
y: 0,
}
var hands = [],
resizer = (me.resizer = document.createElement('div'))
for (i = 0; i < 4; i++) {
hands.push('<span class="edui-editor-videoscale-hand' + i + '" id="videoscale' + i + '"></span>')
}
resizer.id = me.editor.ui.id + '_videoscale'
resizer.className = 'edui-editor-videoscale edui-editor-resizer'
resizer.innerHTML = '<div class="cursorDiv">' + hands.join('') + '</div>'
resizer.style.cssText += ';z-index:' + me.editor.options.zIndex + ';'
me.hands = resizer.querySelector('.cursorDiv').querySelectorAll('span')
me.editor.ui.getDom().appendChild(resizer)
},
// 是否能够调整大小
canResize: function (width, height) {
// 最大宽度 750
if (width >= 750) return false
// 竖版视频 最小宽度200
if (width <= height) {
return width >= 200
}
// 横版视频 最小宽度330
else {
return width >= 330
}
},
mouseDown: function (e) {
var me = this
var hand = e.target || e.srcElement
if (hand.className && hand.className.indexOf('edui-editor-videoscale-hand') != -1 && me.dragId == -1) {
me.dragId = hand.className.slice(-1)
me.prePos.x = Number(e.screenX)
me.prePos.y = Number(e.screenY)
$(me.target.querySelector('iframe[module="insertVideo"]')).css('pointerEvents', 'none')
// 视频宽高比 减去内边距和底部工具栏高度
me.videoRatio = (me.target.clientWidth - 4) / (me.target.clientHeight - 46)
me.editor.body.onmousemove = function (e) {
me.mouseMove(e)
}
me.editor.body.onmouseup = function (e) {
me.mouseUp(e)
}
document.body.onmouseup = function (e) {
me.mouseUp(e)
}
}
},
mouseMove: function (e) {
e.preventDefault()
var me = this
if (me.dragId == -1) return
var newWidth, newHeight, offsetX
// 拖拽左上、左下拖拽点 取反
if (me.dragId == 0 || me.dragId == 2) {
offsetX = me.prePos.x - e.screenX
} else {
offsetX = e.screenX - me.prePos.x
}
me.prePos = {
x: e.screenX,
y: e.screenY,
}
newWidth = parseInt(offsetX * 2 + me.target.clientWidth - 4)
newHeight = parseInt(newWidth / me.videoRatio)
if (!me.canResize(newWidth, newHeight)) return
var videoIframe = me.target.querySelector('.attach-insertVideo')
// 设置容器尺寸
me.domUtils.setStyles(me.target, {
width: newWidth + 4 + 'px',
height: newHeight + 46 + 'px',
})
$(videoIframe).attr('video-width', newWidth)
$(videoIframe).attr('video-height', newHeight)
// 设置视频封面高度
videoIframe.contentWindow.postMessage({
msgType: 'changeVideoCoverHeight',
cid: videoIframe.getAttribute('cid'),
coverHeight: newHeight,
}, '*')
me.attachTo(me.target)
me.editor.adjustHeight();
},
mouseUp: function (e) {
var me = this
if (me.dragId != -1) {
me.dragId = -1
}
me.editor.body.onmousemove = null
me.editor.body.onmouseup = null
document.body.onmouseup = null
$(me.target.querySelector('iframe[module="insertVideo"]')).css('pointerEvents', 'unset')
me.editor.fireEvent('saveScene')
},
show: function (targetObj) {
var me = this
me.target = targetObj
me.resizer.classList.add('scale')
me.attachTo(targetObj)
$(me.editor.body)
.find('.videoScale')
.each(function (index, item) {
$(item).removeClass('videoScale')
})
// 视频wrap添加选中类名
if ($(targetObj).hasClass('editor-iframe') && $(targetObj).children('[module="insertVideo"]').length > 0) {
$($(targetObj).children('[module="insertVideo"]')[0]).addClass('videoScale')
}
for (var i = 0; i < 4; i++) {
me.hands[i].onmousedown = function (e) {
e.preventDefault()
me.mouseDown(e)
}
}
},
hide: function () {
var me = this
me.resizer.classList.remove('scale')
$(me.editor.body)
.find('.videoScale')
.each(function (index, item) {
$(item).removeClass('videoScale')
})
for (var i = 0; i < 4; i++) {
me.hands[i].onmousedown = null
}
},
attachTo: function (targetObj) {
var me = this,
target = me.target,
resizer = this.resizer,
/*getXY获取当前元素 xy可视坐标*/
videoWrapPos = me.domUtils.getXY(target),
iframePos = me.domUtils.getXY(me.editor.iframe),
editorPos = me.domUtils.getXY(resizer.parentNode)
if ($(targetObj).parents('.table').length > 0 && $(targetObj).parents('.table')[0].scrollLeft > 0) {
me.domUtils.setStyles(resizer, {
width: 0,
height: 0,
left:
iframePos.x +
videoWrapPos.x -
me.editor.document.body.scrollLeft -
$(targetObj).parents('.table')[0].scrollLeft -
editorPos.x +
1 +
'px',
top: iframePos.y + videoWrapPos.y - me.editor.document.body.scrollTop - editorPos.y - 3 + 'px',
})
} else {
me.domUtils.setStyles(resizer, {
width: 0,
height: 0,
left: iframePos.x + videoWrapPos.x - me.editor.document.body.scrollLeft - editorPos.x + 2 + 'px',
top: iframePos.y + videoWrapPos.y - me.editor.document.body.scrollTop - editorPos.y + 5 + 'px',
})
}
//左上
me.domUtils.setStyles(resizer.querySelector('.edui-editor-videoscale-hand0'), {
left: '0',
top: '0',
})
//右上
me.domUtils.setStyles(resizer.querySelector('.edui-editor-videoscale-hand1'), {
left: parseInt($(target).width()) + 'px',
top: '0',
})
//左下
me.domUtils.setStyles(resizer.querySelector('.edui-editor-videoscale-hand2'), {
left: '0',
top: parseInt($(target).height()) + 'px',
})
//右下
me.domUtils.setStyles(resizer.querySelector('.edui-editor-videoscale-hand3'), {
left: parseInt($(target).width()) + 'px',
top: parseInt($(target).height()) + 'px',
})
},
}
function initResizeVideo(me, domUtils) {
var resizeVideo = null
function getVideoWrapByCid(cid) {
if(!cid) return
return $(me.body).find('iframe[cid=' + cid + ']').parent()[0]
}
window.addEventListener('message', function(event) {
var data = event.data
if(!data) return
if(data.msgType == 'showVideoWrapResizer') {
var videoWrapElm = getVideoWrapByCid(data.cid)
// 图标引擎-富文本组件 既含有编辑状态 又含有详情状态 隐藏拖拽把手
if(document.querySelector('.richtext iframe[cid="' + data.cid + '"]')) {
return
}
// console.log('videoWrapElm', videoWrapElm)
if (!videoWrapElm) return
if (!resizeVideo) {
resizeVideo = new ResizeVideo(domUtils)
resizeVideo.init(me)
me.ui.getDom().appendChild(resizeVideo.resizer)
}
resizeVideo.show(videoWrapElm)
} else if(data.msgType == 'hideVideoWrapResizer') {
var videoWrapElm = getVideoWrapByCid(data.cid)
if (!videoWrapElm) return
resizeVideo && resizeVideo.hide()
}
})
me.addListener('click', function () {
resizeVideo && resizeVideo.hide()
})
me.addOutputRule(function (root) {
root.traversal(function (node) {
// 过滤视频聚焦类名
if (node.getAttr('class') && node.getAttr('class').indexOf('videoScale') > -1) {
node.setAttr('class', node.getAttr('class').replace('videoScale', ''))
}
})
})
}

View File

@@ -0,0 +1,63 @@
Ext.onReady(function(){
var parseParam = function(obj){
var paramStr = "";
for(var key in obj) {
var val = obj[key];
paramStr += '&' + key + '=' + val;
}
return paramStr.substr(1);
};
var requestResourceScan = function(url){
var body = document.getElementsByTagName('body')[0];
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
body.appendChild(script);
};
var parseObjectIds = function (attachments){
var objectIds = [];
for(var i = 0; i < attachments.length; i++){
var item = attachments[i];
var objectId = item.property && item.property.objectid;
objectId && objectIds.push(objectId);
}
return objectIds;
};
try{
var logFid = [1467,1845,47988,2780,11182,4336,187,4274,1660,4237,6832,7838,2840,2021,11252,33485,16278,4335,31689];
var fid = resourceScanParam.fid;
var noterya = resourceScanParam.noterya;
if(!noterya){
return;
}
if(!fid || !Ext.Array.contains(logFid,parseInt(fid))){
return;
}
var uid = getCookie('UID');
resourceScanParam.uid = uid;
var data = parseObjectIds(attachments);
if(data.length == 0){
return;
}
var dataAray = [];
var dataLength = data.length;
var slicenNum = dataLength / 50;
if(slicenNum > 0){
for(var i = 0; i < slicenNum; i++ ){
var slice = data.slice(dataLength * i / slicenNum , dataLength * (i + 1) / slicenNum);
dataAray.push(slice);
}
}else{
dataAray.push(data);
}
//PM383785 取消推送
/* for(var i = 0;i < dataAray.length; i++ ){
resourceScanParam.data = dataAray[i].join(',');
var url = location.protocol + '//fanyazyk2.chaoxing.com/resource/api/getDataLookNum';
url = url + '?_=' + Math.random() + '&' + parseParam(resourceScanParam);
requestResourceScan(url);
}*/
}catch(er){}
});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
<!-- saved from url=(0011)about:blank -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body></body></html>

View File

@@ -0,0 +1,3 @@
<!-- saved from url=(0011)about:blank -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body></body></html>

View File

@@ -0,0 +1,3 @@
<!-- saved from url=(0011)about:blank -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body></body></html>

View File

@@ -0,0 +1,3 @@
<!-- saved from url=(0011)about:blank -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body></body></html>

View File

@@ -0,0 +1,3 @@
<!-- saved from url=(0011)about:blank -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body></body></html>

View File

@@ -0,0 +1,3 @@
<!-- saved from url=(0011)about:blank -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body></body></html>

View File

@@ -0,0 +1,4 @@
<!DOCTYPE html>
<!-- saved from url=(0011)about:blank -->
<html xmlns="http://www.w3.org/1999/xhtml" class="view"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">.view{padding:0;word-wrap:break-word;cursor:text;}body{margin:8px;font-family:sans-serif;font-size:16px;}p{margin:5px 0;}</style><link rel="stylesheet" type="text/css" href="https://noteyd.chaoxing.com/res/plugin/ueditor/themes/iframe.css"><style>p{line-height:1.9em}</style><style id="tablesort">table.sortEnabled tr.firstRow th,table.sortEnabled tr.firstRow td{padding-right:20px;background-repeat: no-repeat;background-position: center right; background-image:url(https://noteyd.chaoxing.com/res/plugin/ueditor/themes/default/images/sortable.png);}</style><style id="table">.selectTdClass{ background-image: linear-gradient(0deg, rgba(118, 198, 255, 0.2), rgba(118, 198, 255, 0.2))!important;}.table{position:relative; margin-bottom: 10px;}table{border-collapse:collapse;display:table;table-layout: fixed;}caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}th{border-top:1px solid #BBB;background-color:#F7F7F7;}table tr.firstRow th{border-top-width:2px;}.ue-table-interlace-color-single{ background-color: #fcfcfc; } .ue-table-interlace-color-double{ background-color: #f7faff; }td p{margin:0;padding:0;}</style><style id="list">ol,ul{margin:0;padding:0;width:95%}li{clear:both;}</style><style id="pagebreak">.pagebreak{display:block;clear:both !important;cursor:default !important;width: 100% !important;margin:0;}</style><style id="loading">.loadingclass{display:inline-block;cursor:default;background: url('https://noteyd.chaoxing.com/res/plugin/ueditor/themes/default/images/loading.gif') no-repeat center center transparent;border:1px solid #cccccc;margin-left:1px;height: 22px;width: 22px;}
.loaderrorclass{display:inline-block;cursor:default;background: url('https://noteyd.chaoxing.com/res/plugin/ueditor/themes/default/images/loaderror.png') no-repeat center center transparent;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;}</style><style id="anchor">.anchorclass{background: url('https://noteyd.chaoxing.com/res/plugin/ueditor/themes/default/images/anchor.gif') no-repeat scroll left center transparent;cursor: auto;display: inline-block;height: 16px;width: 15px;}</style></head><body class="view " style="overflow-y: hidden; cursor: text; height: 300px;" contenteditable="true" spellcheck="false"><p element-id="init"><br></p></body></html>

View File

@@ -0,0 +1 @@
'success'

Some files were not shown because too many files have changed in this diff Show More