diff --git a/module/dev/css/langitem.css b/module/dev/css/langitem.css index 55c837e70f..eff84ac637 100644 --- a/module/dev/css/langitem.css +++ b/module/dev/css/langitem.css @@ -1,14 +1,16 @@ .flex {display: flex;} .h-32 {height: 32px;} .py-6 {padding: 6px 0;} -.my-6 {margin: 6px 0;} +.my-12 {margin: 12px 0;} .title {font-size: 13px; color: #313C52; font-weight: 700; height: 40px; text-align: center;} /* side-left */ .main-content > .side-left {flex: 0 0 160px; margin-left: 64px; width: 160px;} -.label-list > .input-label {display: flex; align-items: center; justify-content: center;} +.label-list {background: #F8F8F8; padding: 5px 0;} +.label-list > .input-label {display: flex; align-items: center; cursor: pointer; padding-left: 40px;} /* side-right */ .main-content > .side-right {margin-left: 50px;} +.main-content > .side-right > .input-list {padding: 5px 0;} .main-content > .side-right > .input-list > .input-control {position: relative;} -.main-content > .side-right > .input-list > .input-control > i.icon {position: absolute; font-size: 25px; left: -60px; top: 8px;} +.main-content > .side-right > .input-list > .input-control > i.icon {position: absolute; font-size: 25px; left: -40px; top: 3px;} diff --git a/module/dev/js/langitem.js b/module/dev/js/langitem.js new file mode 100644 index 0000000000..b6c10ce50c --- /dev/null +++ b/module/dev/js/langitem.js @@ -0,0 +1,35 @@ +$(function() +{ + $(".input-list").on("click", 'input', function(event) + { + addActive(event.target.id); + }); + $(".input-list").on("blur", 'input', function(event) + { + removeActive(event.target.id); + }); + $('.label-list').on('click', '.input-label', function(e) + { + var clearId = $('.label-list > .text-primary').attr('labelid'); + var clickId = $(e.target).attr('labelid'); + if (clearId && clearId != clickId) + { + removeActive(clearId); + } + if (clickId && clickId != clearId) + { + addActive(clickId); + $('#' + clickId).focus(); + } + }); + function addActive(id) + { + $('[labelid=' + id + ']').addClass('text-primary'); + $('[iconid=' + id + ']').removeClass('hidden'); + }; + function removeActive(id) + { + $('[labelid=' + id + ']').removeClass('text-primary'); + $('[iconid=' + id + ']').addClass('hidden'); + }; +}) diff --git a/module/dev/view/langitem.html.php b/module/dev/view/langitem.html.php index 16d190701d..1e640740b9 100644 --- a/module/dev/view/langitem.html.php +++ b/module/dev/view/langitem.html.php @@ -24,15 +24,20 @@
默认值
-
项目集
+
项目集
+
产品
修改值
-
- - +
+ + +
+
+ +