www.gusucode.com > 4077网博士成品网站管理系统网站源码php模板代码程序 > 4077/4077/view/admin/js/view.js
//读取参数列 (function($){ $.fn.getPropList = function(){ $("div#proplist").empty(); var catid=$("#selcatid")[0].value; var nowid=$("#nowid")[0].value; $.ajax({ type: "POST", url:"post.php", data: "act=proplist&catid="+catid+"&nowid="+nowid, success: function(msg){ $("div#proplist").append(msg); } }); }; })(jQuery); //选择分类时更新属性列 $(document).ready(function() { $("#selcatid").change(function(){ $().getPropList(); }); }); //切换视频类型时,同时切换提示信息 $(document).ready(function(){ $(".sitetype").click(function(){ var sitetype=this.value; if(this.checked==true){ if(sitetype=="1"){ $("#sitetypeinfo1").show(); $("#sitetypeinfo2").hide(); $("#viewgeshi").hide(); }else{ $("#sitetypeinfo1").hide(); $("#sitetypeinfo2").show(); $("#viewgeshi").show(); } } }); }); //视频发布表单提交 $(document).ready(function(){ $('#viewAddForm').submit(function(){ SelectAll('spe_selec[]', 'select[]'); $('#viewAddForm').ajaxSubmit({ target: 'div#notice', url: 'post.php', success: function(msg) { if(msg=="OK"){ $('div#notice').hide(); $().alertwindow("视频发布成功","view_con.php"); }else{ $('div#notice').hide(); $().alertwindow(msg,""); } } }); return false; }); }); //修改表单提交 $(document).ready(function(){ $('#viewForm').submit(function(){ $("#act")[0].value="viewmodify"; SelectAll('spe_selec[]', 'select[]'); $('#viewForm').ajaxSubmit({ target: 'div#notice', url: 'post.php', success: function(msg) { if(msg=="OK"){ $('div#notice').hide(); $().alertwindow("视频修改成功","view_con.php"); }else{ $('div#notice').hide(); $().alertwindow(msg,""); } } }); return false; }); }); //添加专题表单提交 $(document).ready(function(){ $('#addProjForm').submit(function(){ $('#addProjForm').ajaxSubmit({ target: 'div#notice', url: 'post.php', success: function(msg) { if(msg=="OK"){ $('div#notice').hide(); $.ajax({ type: "POST", url: "../../post.php", data: "act=plusenter", success: function(msg){ if(msg=="OK"){ var projpath="../project/"+$("#newfolder")[0].value; $().alertwindow("专题添加成功,按确定进入排版模式,对专题主页进行排版",projpath); }else{ self.location='view_proj.php'; } } }); }else{ $('div#notice').hide(); $().alertwindow(msg,""); } } }); return false; }); }); //切换到专题排版 $(document).ready(function() { $(".pdv_enter").click(function () { var folder=this.id.substr(3); $.ajax({ type: "POST", url: "../../post.php", data: "act=plusenter", success: function(msg){ if(msg=="OK"){ self.location="../project/"+folder+"/index.php"; }else{ alert("当前管理账户没有排版权限"); return false; } } }); }); }); //分类表单 function catCheckform(theform){ if(theform.cat.value.length < 1 || theform.cat.value=='请填写分类名称'){ alert("请填写分类名称"); theform.cat.focus(); return false; } return true; } //弹出对话框 function Dpop(url,w,h){ res = showModalDialog(url, null, 'dialogWidth: '+w+'px; dialogHeight: '+h+'px; center: yes; resizable: no; scroll: no; status: no;'); if(res=="ok"){window.location.reload();} } //切换到分类排版 $(document).ready(function() { $(".pr_enter").click(function () { var catid=this.id.substr(3); var url=$("#href_"+catid)[0].value; $.ajax({ type: "POST", url: "../../post.php", data: "act=plusenter", success: function(msg){ if(msg=="OK"){ self.location=url; }else{ alert("当前管理账户没有排版权限"); return false; } } }); }); });