笙默考试管理系统-club(3)

笙默考试管理系统-club3

目录

一、笙默考试管理系统-club

二、笙默考试管理系统-club

二、笙默考试管理系统-club

三、笙默考试管理系统-club

四、笙默考试管理系统-club

一、笙默考试管理系统-club

function topicDel(id) {

   

$.dialog.confirm('', function(){

    $.get(clubDir + "index.aspx?c=group&a=handle", { action: "topicDel", rnd: Math.random(), boardid: boardId, topicid: id }, function (r) {   if (r == "error") { alert('没权限操作!'); } else { KesionJS.Message("successed", "恭喜,删除成功!", "$('#tr" + id + "').remove();") } });

}, function () {

});

}

function replyDel(topicId, postId) {

   

$.dialog.confirm('您确认删除该回复吗?', function(){

$.get(clubDir+"index.aspx?c=group&a=handle",{action:"replyDel",rnd:Math.random(),boardid:boardId,topicid:topicId,postId:postId},function(r){   var arr=r.split(':'); if (arr[0]=="error"){alert(arr[1]);}else{ KesionJS.Message("successed","恭喜,删除成功!","$('#myreply"+postId+"').remove();$('.rnum"+topicId+"').html(parseInt($('.rnum"+topicId+"').html())-1);") }});

}, function(){

});

二、笙默考试管理系统-club

}

//关闭所有弹窗

function closeDialog(){

var list = art.dialog.list;

for (var i in list) {

list[i].close();

};

}

var pos=null;

function setPos(id)

{

    if (document.all) {

jQuery("#"+id).focus();

    pos = document.selection.createRange();

  }else{

    pos = jQuery("#"+id)[0].selectionStart;

  }

}

function InsertValue(Val,id) {

    if (pos == null) { if ( $("#"+id).val()=='说两句^_^' || $("#"+id).val()=='我也说一句'){ $("#"+id).val('');} setPos(id) }

 if (document.all){

  pos.text=Val;

 }else{

   var obj=jQuery("#"+id);

   var lstr=obj.val().substring(0,pos);

   var rstr=obj.val().substring(pos);

   obj.val(lstr+Val+rstr);

 }

}

二、笙默考试管理系统-club

function showemot(o,topicId){

 var c=$("#emot").html();

 if (topicId!=undefined) c=c.replace(/content/g,'replyContent'+topicId);

 if (topicId!=undefined) c=c.replace(/objId/g,'replyContent'+topicId);

 $.dialog({title:false,width:500,follow:o,content:c,padding:'10px'});

}

function checkcommentlength(cobj, cmax,id) {

if (cmax <= 0) return;

if (cobj.value.length > cmax) {

cobj.value = cobj.value.substring(0, cmax);

$.dialog.alert("字数不能超过" + cmax + "个字符!", function() { });

} else {

var remain = String(cmax - cobj.value.length);

$('#'+id).html(remain);

}

}

function initialText(){

var slideHeight = 72; // px

$(".showContent").each(function(){

 var defHeight = $(this).height();

笙默考试管理系统-club

 if(defHeight >= slideHeight){

var o=$(this);

if (o.html().indexOf('ckplayer')!=-1) return; //含视频退出

if (o.next().html()!='') return;

o.css('height' , slideHeight + 'px');

o.next().append('[全文]');

o.next().find('a').click(function(){

var curHeight = o.height();

if(curHeight == slideHeight){

o.animate({

  height: defHeight

}, "normal");

$(this).html('[收起]');

o.find('.gradient').fadeOut();

}else{

o.animate({

  height: slideHeight

}, "normal");

$(this).html('[全文]');

o.find('.gradient').fadeIn();

}

return false;

});

}

});

}

四、笙默考试管理系统-club

//添加小组

function addgroup(groupid) {

    jQuery.ajax({

        url: "/plus/ajaxs.ashx?a=addgrouplimits&groupid=" + groupid,

        type: 'get',

        success: function (msg) {

            if (msg == "0") {

                KesionJS.Alert('您未登录,请登录!', 'showuserlogin();');

            } else if (msg == "1") {

                alert("对不起,您暂未拥有加入该小组的权限!");

            } else if (msg == "2") {

                $("#studentnum").html(parseInt($("#studentnum").html()) + 1);

                $("#addgroup").hide();

                alert("恭喜,加入小组成功!");

            } else {

                $("#addgroup").hide();

                alert("您已是小组成员!");

            }

        }

    });

}

//查看大图的js

function LookBigPic(postid) {

    var src = $("#img" + postid).children("img")[0].src

    location.href = src;

}

你可能感兴趣的:(物理引擎系统C++,servlet,前端,javascript)