Kaynağa Gözat

提交多选框处理

namejr 4 yıl önce
ebeveyn
işleme
4d93c718f8

+ 12 - 0
EBook.Web/Common/tasklib_book.css

@@ -114,4 +114,16 @@ table{
     table-layout:fixed;
     word-wrap:break-word;
     word-break:break-all;
+}
+.cBoxCls{
+    width: 24px;
+	height: 24px;
+	border-radius: 4px;
+	border: solid 1px #92d0ff;
+    display:inline-block;
+}
+.cBoxCls[data-status='1'] {
+    background-image: url('../Images/checkbox2x.png');
+    background-repeat:no-repeat;
+    background-position: 2px 5px;
 }

+ 21 - 0
EBook.Web/Common/tasklib_book.js

@@ -27,6 +27,25 @@ var styleWPSContrl = {
     sentenceFlag: true
 }
 
+// 处理多选
+var dealCheckBox = function () {
+    $.each($(".checkbox").find("input"), function (index, element) {
+        var InputId = $(element).attr("id");
+        var HtmlStr = "<div class='cBoxCls cBoxCls_" + InputId + "' data-status='0' onclick='clickCheckBox(" + InputId + ")'></div>";
+        $(element).attr("hidden", "hidden").after(HtmlStr);
+    });
+};
+// 多选点击
+var clickCheckBox = function (InputId) {
+    var BoxJqStr = ".cBoxCls_" + InputId;
+    if ($(BoxJqStr).attr("data-status") == "1") {
+        $(BoxJqStr).attr("data-status", "0");
+    }
+    else {
+        $(BoxJqStr).attr("data-status", "1");
+    }
+    $("#" + InputId).click();
+}
 // 表格处理Start
 var pressTableFlag = false;
 var GetPadVal = function (THandel) {
@@ -1070,6 +1089,8 @@ function handleAnswerRange() {
     //删除所有钥匙节点
     $("img[class=yaoshi]").remove();
     //console.log(JSON.stringify(answerData));
+    // 处理多选框样式
+    dealCheckBox();
     return answerData;
 }
 

+ 3 - 0
EBook.Web/EBook.Web.csproj

@@ -98,6 +98,8 @@
     <Content Include="HightCode\BGGL.json" />
     <None Include="Lghp\21773.lghp" />
     <None Include="Lghp\21587.lghp" />
+    <Content Include="Images\checkbox2x.png" />
+    <Content Include="Images\选中%403x.png" />
     <Content Include="Lghp\21836.lghp" />
     <Content Include="Lghp\BGGX.lghp" />
     <Content Include="Lghp\duogouxuan.lghp" />
@@ -110,6 +112,7 @@
     <Content Include="Lghp\BGGL.lghp" />
     <Content Include="Lghp\22045.lghp" />
     <Content Include="Lghp\22052.lghp" />
+    <Content Include="Lghp\22225.lghp" />
     <None Include="Lghp\gaicuo.lghp" />
     <Content Include="NK\tasklib_book.css" />
     <Content Include="NK\tasklib_book.js" />

BIN
EBook.Web/Images/checkbox2x.png


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
EBook.Web/lghp/22225.lghp


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor