Skip to content

Commit

Permalink
当使用input-append样式类时,错误信息显示位置调整到最后。
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed Jun 21, 2013
1 parent 21818ff commit 80b46c9
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/cache/ehcache-hibernate-rmi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

<!-- DefaultCache setting. -->
<defaultCache maxEntriesLocalHeap="1000" eternal="false" timeToIdleSeconds="300" timeToLiveSeconds="600"
overflowToDisk="true" maxEntriesLocalDisk="100000" />
overflowToDisk="true" maxEntriesLocalDisk="100000" >
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" properties="replicatePuts=false,replicateUpdatesViaCopy=false" />
</defaultCache>

<!-- Special objects setting. -->
<cache name="com.thinkgem.jeesite.modules.sys.entity.Dict" maxEntriesLocalHeap="1000" eternal="false" overflowToDisk="true" maxEntriesLocalDisk="100000">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
errorContainer: form + " .messageBox",
errorPlacement: function(error, element) {
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/modules/cms/siteForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/modules/oa/leaveForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/views/modules/sys/areaForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand All @@ -37,7 +37,7 @@
<label class="control-label">上级区域:</label>
<div class="controls">
<tags:treeselect id="area" name="parent.id" value="${area.parent.id}" labelName="parent.name" labelValue="${area.parent.name}"
title="区域" url="/sys/area/treeData" extId="${area.id}"/>
title="区域" url="/sys/area/treeData" extId="${area.id}" cssClass="required"/>
</div>
</div>
<div class="control-group">
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/modules/sys/dictForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/views/modules/sys/menuForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand All @@ -37,7 +37,7 @@
<label class="control-label">上级菜单:</label>
<div class="controls">
<tags:treeselect id="menu" name="parent.id" value="${menu.parent.id}" labelName="parent.name" labelValue="${menu.parent.name}"
title="菜单" url="/sys/menu/treeData" extId="${menu.id}"/>
title="菜单" url="/sys/menu/treeData" extId="${menu.id}" cssClass="required"/>
</div>
</div>
<div class="control-group">
Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/WEB-INF/views/modules/sys/officeForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand All @@ -37,14 +37,14 @@
<label class="control-label">上级机构:</label>
<div class="controls">
<tags:treeselect id="office" name="parent.id" value="${office.parent.id}" labelName="parent.name" labelValue="${office.parent.name}"
title="机构" url="/sys/office/treeData" extId="${office.id}"/>
title="机构" url="/sys/office/treeData" extId="${office.id}" cssClass="required"/>
</div>
</div>
<div class="control-group">
<label class="control-label">归属区域:</label>
<div class="controls">
<tags:treeselect id="area" name="area.id" value="${office.area.id}" labelName="area.name" labelValue="${office.area.name}"
title="区域" url="/sys/area/treeData"/>
title="区域" url="/sys/area/treeData" cssClass="required"/>
</div>
</div>
<div class="control-group">
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/views/modules/sys/roleForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down Expand Up @@ -104,7 +104,7 @@
<label class="control-label">归属机构:</label>
<div class="controls">
<tags:treeselect id="office" name="office.id" value="${role.office.id}" labelName="office.name" labelValue="${role.office.name}"
title="机构" url="/sys/office/treeData"/>
title="机构" url="/sys/office/treeData" cssClass="required"/>
</div>
</div>
<div class="control-group">
Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand All @@ -44,14 +44,14 @@
<label class="control-label">归属公司:</label>
<div class="controls">
<tags:treeselect id="company" name="company.id" value="${user.company.id}" labelName="company.name" labelValue="${user.company.name}"
title="公司" url="/sys/office/treeData?type=1"/>
title="公司" url="/sys/office/treeData?type=1" cssClass="required"/>
</div>
</div>
<div class="control-group">
<label class="control-label">归属部门:</label>
<div class="controls">
<tags:treeselect id="office" name="office.id" value="${user.office.id}" labelName="office.name" labelValue="${user.office.name}"
title="部门" url="/sys/office/treeData?type=2"/>
title="部门" url="/sys/office/treeData?type=2" cssClass="required"/>
</div>
</div>
<div class="control-group">
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/modules/sys/userInfo.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")){
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
Expand Down

0 comments on commit 80b46c9

Please sign in to comment.