使用Maven遇到的问题
1>组件开发中不同组件之间不能关联(空间项目的依赖关系)
resolve dependencies from workspace projects
解决从工作空间项目的依赖关系
<script type="text/javascript">
$(function(){
var href = window.location.href;
if(href.indexOf("pageSimple") > 0){
$(".queikS").show();
$(".detailSea").hide();
$(".cellMarker").hide();
$(".cellClick").hide();
}
if(href.indexOf("pageAdvanced") > 0){
$(".queikS").hide();
$(".detailSea").show();
$(".cellMarker").show();
$(".cellClick").show();
}
})
</script>
分页:
<div class="clear clearfix pageWrap">
${page.show}
${page.showpagesize}
</div>
<p class="jieG">搜索到约<em>${page.totalCount}</em>项结果,用时${timeconsuming}秒</p>
查询
<script>
//高级查询
fkAdvanced = function(){
if($("#keyword").val() == "编号|标题|微内容"){
$("#keyword").val("");
}
if($("#createstartdate").val() == "开始时间"){
$("#createstartdate").val("");
}
if($("#createenddate").val() == "结束时间"){
$("#createenddate").val("");
}
$("table .tiaojian li").map(function(){
if($(this).hasClass("current")){
var required = $(this).attr("value");
$("#required").val(required);
}
});
return true;
}
<script type="text/javascript">
$(document).ready(function(){
/*验证模板*/
$.metadata.setType("attr", "validate");
$("#editExportform").validate({
onfocusout:false,
onclick:false,
onkeyup:false,
showErrors:function(errorMap, errorList){
var msg = "";
if(errorList.length!=0){
$("#editExportMessage").html(eval(errorList[0]).message);
}
}
});
//点击提交按钮
$("#editExportBtn").click(function(){
if($("#editExportform").valid()){
editExportSubmit();
$("#editExportBtn").attr("disabled",true);
}
$("#editExportBtn").attr("disabled",false);
})
})
editExportSubmit = function(){
//ajax异步请求 添加新导出包和导出包状态
$.ajax({
type:"post",
url:"${web_operation_name}/admin/export/updateExport.html",
dataType:"json",
data:$("#editExportform").serialize(),
beforeSend:function(){
loading();
},
success:function(date){
if(date.result_code == "200"){
alert("提交成功!")
}
close();
$(".showChildWrap").animate({left:"0px"}, 500 );
/* $(".showChildWrap").animate({top:"500px"}, 0 );
$(".showChildWrap").animate({top:"0px"},500 ); */
showExportList();
},
error:function(){
close();
}
})
}
</script>
<script>
function checkContent(){
if($("#content").val() == "输入关键字---"){
$("#content").val("");
}
return true;
}
$(document).ready(function(){
$(".keyWords").Watermark("输入关键字---");
/*下拉搜索*/
$(".selectXian").click(function(){
$(".selectUl").show();
})
$(".selectUl li").each(function(){
$(this).hover(
function(){$(this).css({"background":"#3c84c3","color":"#fff"})},
function(){$(this).css({"background":"#fff","color":"#333"})}
);
$(this).click(function(){
var id = $(this).attr("id");
var selectXianStr = $(this).html();
$("#param").val(id);
$(".selectXian").html(selectXianStr);
$(".selectUl").hide();
})
})
$(".largeUl li:odd").css("float","right");
/*点击红色移除按钮*/
var jackNumStr = 0;
$(".delet_a").click(function(){
$(this).removeClass("delet_a").addClass("delet_aNo");
$(this).unbind("click");
$("#jackNum").show();
jackNumStr = jackNumStr+1;
$(".jackNumDetail").html("-"+jackNumStr);
})
$(".daochuA").live("click",function(){
$(this).removeClass("daochuA").addClass("daochuANo");
$(this).unbind("click");
$("#jackNum").show();
jackNumStr = jackNumStr+1;
$(".jackNumDetail").html("-"+jackNumStr);
var trr = $(this).attr("name");
$("#"+trr+"").parent().parent().next().removeClass("delet_a").addClass("delet_aNo").unbind("click");
})
$(".closeBtn").click(function(){
$(".overlay").hide();
$(".proDetail").hide();
})
})
</script>
<script type="text/javascript">
//批量导出产出物内容
function exportAllFun(){
/* if(${page.totalCount} <= 0){
return false;
} */
if(!window.confirm("当前导出包内容过多,继续导出可能导致响应过慢,确认导出?")){
return false;
}
window.location.href="${web_operation_name}/admin/export/export/"+${productBean.exportid}+".html";
}
</script>
<script type="text/javascript">
//全部移除导出包的产出物内容
function removeAllFull() {
if(!window.confirm("确定移除该导出包内全部内容?")){
return false;
}
$.ajax({
url:"${web_operation_name}/admin/product/removeAllProduct.html",
type:"post",
async: false,
dataType:"json",
data:"exportid="+${productBean.exportid},
success:function(date){
if(date.result_code == "200"){
var jackNum =$(".jackNumDetail").html()*1;//根据导航栏得到值
if(jackNum <=0){
date.value= jackNum - date.value;
date.value=-date.value;
}
$(".largeUl").remove(); //去除表单
$(".pageWrap").remove(); //去除分页
$("#jackNum").show(); //显示右导航栏 -n
$(".jackNumDetail").html(-date.value);//导航栏个数
$(".jackNumDetail").unbind("click");
$("#jieG").html(date.value); //详细列表栏赋值
$(".selectXian").html("标题"); //设置下拉框 标题
$("#content").val("");
$(".keyWords").Watermark("输入关键字---");
}
}
});
}
//单个移除导出包中的产出物
function removeOneFull(id){
$.ajax({
url:"${web_operation_name}/admin/product/removeProduct.html?id='${productBean.exportid}'",
type:"post",
dataType:"json",
data: {
"productid": id,
"exportid": ${productBean.exportid}
},
success:function(date){
}
});
}
</script>
<script type="text/javascript">
$(function(){
//导出包
$(".exportBao").click(function(){
$(".overlay9905").show();
$("#kuangWrap").show();
$(".menuDaoWrap").show();
$(".adminMenuWrap").hide();
})
$(".jackAddBtn").live("click",function(){
$(".menuAddWrap").show().siblings().hide();
$(".showChildWrap").animate({ left:"-310px"}, 500 );
$("#saveExportform")[0].reset();
$(".addExName").Watermark("请输入导出包名称");
});
$(".jackBackBtn").live("click",function(){
$(".showChildWrap").animate({ left:"0px"}, 500 );
});
$(".jackEditBtn").live("click",function(){
$(".menuEditWrap").show().siblings().hide();
$(".showChildWrap").animate({ left:"-310px"}, 500 );
})
$(".exportBao").click(function(){
showExportList();
});
$(".exportEdit").live("click",function(){
var exportid = $(this).attr("exportid");
$.ajax({
url:"${web_operation_name}/admin/export/detail.html",
type:"post",
dataType:"json",
data:{"exportid":exportid},
beforeSend:function(){
loading();
},
success:function(data){
$("#editExportid").val(data.value.id);
$("#editexportname").val(data.value.exportname);
if(data.value.status == 1){
$("#editstart").attr("checked",true);
$("#editend").attr("checked",false);
}else{
$("#editstart").attr("checked",false);
$("#editend").attr("checked",true);
}
close();
},
error:function(){
close();
}
});
//$(".showChildWrap").animate({top:"-410px"}, 500 );
})
})
//列表
function showExportList(){
$("#rmExListUrl").empty();
$.ajax({
type:"post",
url:"${web_operation_name}/admin/export/list.html",
dataType:"json",
beforeSend:function(){
loading();
},
success:function(date){
if(date.result_code == "200"){
var exportList = date.value.exports;
var totalCountList = date.value.totalCount;
var exportHtml = "";
$.each(exportList,function(i,n){
var da = new Date(n.cdate).format('yyyy-MM-dd');
var status = "启用";
if(n.status == 0){
status = "停用";
}
exportHtml += "<ul class=\"clearfix\">";
exportHtml += "<li><strong><em class=\"blueF titleMessage\">【"+status+"】</em><a href=\"${web_operation_name}/admin/export/page/"+n.id+"/20/1.html\">"+n.exportname+"</a></strong></li>";
exportHtml += "<li>";
exportHtml += "<p class=\"left\">内容总数:"+totalCountList[n.id]+"条</p>";
exportHtml += "<p class=\"left\">创建时间:"+da+"</p>";
exportHtml += "</li>";
exportHtml += "<li class=\"tools\">"+
"<a href=\"javascript:void(0)\" class=\"right jackEditBtn exportEdit\" exportid=\""+n.id+"\">设置</a>"+
"<a href=\"javascript:void(0)\" class=\"right delExport\" exportid=\""+n.id+"\">删除</a>"+
"<a href=\"javascript:void(0)\" class=\"right\" οnclick=\"exportFun("+n.id+","+totalCountList[n.id]+");\">导出</a>"+
"</li>";
exportHtml += "</ul>";
})
$("#rmExListUrl").append(exportHtml);
}else{
alert(data.result_msg);
}
close();
},
error:function(){
close();
}
})
}
//导出
function exportFun(exportid,totalCount){
if(totalCount >= 100){
if(!window.confirm("当前导出包内容过多,继续导出可能导致响应过慢,确认导出?")){
return false;
}
}
window.location.href="${web_operation_name}/admin/export/export/"+exportid+".html";
}
$(function(){
//删除
$(".delExport").live("click",function(){
var exportid = $(this).attr("exportid");
if(!window.confirm("确定删除?")){
return false;
}
$.ajax({
url:"${web_operation_name}/admin/export/deleteExport/"+exportid+".html",
type:"post",
dataType:"json",
/* data:"id="+exportid, */
beforeSend:function(){
loading();
},
success:function(date){
if(date.result_code != "200"){
alert(data.result_msg);
}
close();
},
error:function(){
close();
}
});
$(this).parents("ul").remove();
})
})
</script>
<script type="text/javascript">
$(document).ready(function(){
/*验证模板*/
$.metadata.setType("attr", "validate");
$("#saveExportform").validate({
onfocusout:false,
onclick:false,
onkeyup:false,
showErrors:function(errorMap, errorList){
var msg = "";
if(errorList.length!=0){
$("#saveExportMessage").html(eval(errorList[0]).message);
}
}
});
//点击提交按钮
$("#saveExportBtn").click(function(){
if($("#saveExportform").valid()){
saveExportSubmit();
$("#saveExportBtn").attr("disabled",true);
}
$("#saveExportBtn").attr("disabled",false);
})
})
saveExportSubmit = function(){
//ajax异步请求 添加新导出包和导出包状态
$.ajax({
type:"post",
url:"${web_operation_name}/admin/export/saveExport.html",
dataType:"json",
data:$("#saveExportform").serialize(),
beforeSend:function(){
loading();
},
success:function(date){
if(date.result_code == "200"){
alert("提交成功!")
}else{
$("#saveExportMessage").html(data.result_msg);
}
close();
$(".showChildWrap").animate({ left:"0px"}, 500 );
showExportList();
},
error:function(){
close();
}
})
}
</script>