KE修改居中换行居中消失的问题

yuanke_org
yuanke 9 years ago
parent 93fb4441d8
commit 0ac7163b05

@ -249,7 +249,7 @@ K.options = {
themeType : 'default', themeType : 'default',
langType : 'zh_CN', langType : 'zh_CN',
urlType : '', urlType : '',
newlineTag : 'p', newlineTag : 'br',
resizeType : 1, resizeType : 1,
syncType : 'form', syncType : 'form',
pasteType : 2, pasteType : 2,
@ -2539,7 +2539,7 @@ function _nativeCommand(doc, key, val) {
function _nativeCommandValue(doc, key) { function _nativeCommandValue(doc, key) {
var val = ''; var val = '';
try { try {
val = doc.queryCommandValue(key); val = doc.query_nativeCommand(self.doc, name, val);Value(key);
} catch (e) {} } catch (e) {}
if (typeof val !== 'string') { if (typeof val !== 'string') {
val = ''; val = '';

@ -11,15 +11,12 @@ $(function(){
var title = $('#program-title').val(); var title = $('#program-title').val();
if (!src) { if (!src) {
// alert('请输入正确的代码');
var htmlvalue = "</br><div style='width:550px;text-align:center'>请输入正确的代码!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>"; var htmlvalue = "</br><div style='width:550px;text-align:center'>请输入正确的代码!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50); pop_up_box(htmlvalue,580,30,50);
return false; return false;
} }
if (!title) { if (!title) {
// alert('请输入标题');
var htmlvalue = "</br><div style='width:550px;text-align:center'>请输入标题!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>"; var htmlvalue = "</br><div style='width:550px;text-align:center'>请输入标题!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50); pop_up_box(htmlvalue,580,30,50);
return false; return false;
@ -39,31 +36,6 @@ $(function(){
$('#test-program-btn').show(); $('#test-program-btn').show();
return; return;
} }
/*
$.post(
'/student_work/program_test_ex',
{homework: homework_id, student_work_id: student_work_id, src: src, title: title, is_test: is_test},
function(data,status){
tested = true;
console.log(data);
if(data.index <=0){
data.index = $('.ProResultTop').length+1;
}
if (typeof cb == 'function') {cb(data); return;}
var html=bt('t:result-list',data);
$('.ProResult').prepend(html);
if (data.status==0 && is_test != 'true') {
var r=confirm("答题正确,是否立刻提交?");
if (r) {
$(".HomeWorkCon form").submit();
}
}
}
);
*/
//先测试一次并返回测试集个数及结果再判断是否需要继续进行测试 //先测试一次并返回测试集个数及结果再判断是否需要继续进行测试
var test_post = function(i, testid){ var test_post = function(i, testid){
$.post( $.post(
@ -73,7 +45,6 @@ $(function(){
testid: testid}, testid: testid},
function(data,status){ function(data,status){
if (data.status==-4 || data.status==-5 ){ if (data.status==-4 || data.status==-5 ){
// alert("非常抱歉,您的程序引起了后台问题,请在公共贴吧提交您的代码进行意见反馈,谢谢!");
//弹框 //弹框
var root_path = getRootPath(); var root_path = getRootPath();
var forums_1_path = root_path + "/forums/1" var forums_1_path = root_path + "/forums/1"
@ -84,7 +55,6 @@ $(function(){
return; return;
} }
else if (data.status==-3){ else if (data.status==-3){
// alert("对不起,服务器繁忙请稍后再试!");
var htmlvalue = "</br><div style='width:550px;text-align:center'>对不起,服务器繁忙请稍后再试!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>"; var htmlvalue = "</br><div style='width:550px;text-align:center'>对不起,服务器繁忙请稍后再试!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50); pop_up_box(htmlvalue,580,30,50);
$('#test-program-btn').show(); $('#test-program-btn').show();
@ -122,11 +92,9 @@ $(function(){
} }
).fail(function(xhr, status){ ).fail(function(xhr, status){
if(status == 'timeout'){ if(status == 'timeout'){
// alert("您的答案超时了, 请检查代码是否存在死循环的错误.");
var htmlvalue = "</br><div style='width:550px;text-align:center'>您的答案超时了, 请检查代码是否存在死循环的错误!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>"; var htmlvalue = "</br><div style='width:550px;text-align:center'>您的答案超时了, 请检查代码是否存在死循环的错误!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50); pop_up_box(htmlvalue,580,30,50);
} else { } else {
// alert("对不起,服务器繁忙请稍后再试!");
var htmlvalue = "</br><div style='width:550px;text-align:center'>对不起,服务器繁忙请稍后再试!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>"; var htmlvalue = "</br><div style='width:550px;text-align:center'>对不起,服务器繁忙请稍后再试!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50); pop_up_box(htmlvalue,580,30,50);
} }
@ -146,11 +114,6 @@ $(function(){
return; return;
} }
if($('.ProResult .ProResultTop').length<=0){ if($('.ProResult .ProResultTop').length<=0){
// var r=confirm("测试后才能提交,是否立刻测试?");
// if (r) {
// test_program();
// }
var htmlvalue = "</br><div style='width:550px;text-align:center'>测试后才能提交,是否立刻测试?</div></br><div style='width:164px; margin:0 auto; text-align:center'><a href='javascript:void(0);' id='code-test-button' class='Blue-btn fl'>确定</a><a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a></div>"; var htmlvalue = "</br><div style='width:550px;text-align:center'>测试后才能提交,是否立刻测试?</div></br><div style='width:164px; margin:0 auto; text-align:center'><a href='javascript:void(0);' id='code-test-button' class='Blue-btn fl'>确定</a><a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a></div>";
pop_up_box(htmlvalue,580,30,50); pop_up_box(htmlvalue,580,30,50);
$("#code-test-button").on('click',function(){ $("#code-test-button").on('click',function(){
@ -162,10 +125,6 @@ $(function(){
if (!tested) { if (!tested) {
test_program(function(data){ test_program(function(data){
if (data.status!=0) { if (data.status!=0) {
// var r=confirm("测试不通过,是否强制提交?");
// if (!r) {
// return;
// }
var htmlvalue = "</br><div style='width:550px;text-align:center'>测试不通过,是否强制提交?</div></br><div style='width:164px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn fl' onclick='submit_code()'>确定</a><a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a></div><script>function submit_code(){$('.HomeWorkCon form').submit();hideModal();}</script>"; var htmlvalue = "</br><div style='width:550px;text-align:center'>测试不通过,是否强制提交?</div></br><div style='width:164px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn fl' onclick='submit_code()'>确定</a><a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a></div><script>function submit_code(){$('.HomeWorkCon form').submit();hideModal();}</script>";
pop_up_box(htmlvalue,580,30,50); pop_up_box(htmlvalue,580,30,50);
return; return;

Loading…
Cancel
Save