diff --git a/module/dev/css/langitem.css b/module/dev/css/langitem.css index eff84ac637..837d15c01e 100644 --- a/module/dev/css/langitem.css +++ b/module/dev/css/langitem.css @@ -2,10 +2,11 @@ .h-32 {height: 32px;} .py-6 {padding: 6px 0;} .my-12 {margin: 12px 0;} +.ml-20 {margin-left: 20px;} .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;} +.main-content > .side-left {flex: 0 0 160px; margin-left: 64px;} .label-list {background: #F8F8F8; padding: 5px 0;} .label-list > .input-label {display: flex; align-items: center; cursor: pointer; padding-left: 40px;} @@ -14,3 +15,6 @@ .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: -40px; top: 3px;} + +/* bottom-btn */ +.bottom-btn {display: flex; align-items: center; background: #fff;padding-left: 150px; padding-bottom: 20px;} diff --git a/module/dev/js/langitem.js b/module/dev/js/langitem.js index 15e9144419..033734fc93 100644 --- a/module/dev/js/langitem.js +++ b/module/dev/js/langitem.js @@ -1,25 +1,17 @@ $(function() { - $(".input-list").on("click", 'input', function(event) + $(".input-list").on("click", 'input', function(e) { - addActive(event.target.id); + handleClickItem(e.target.id); }); - $(".input-list").on("blur", 'input', function(event) + $(".input-list").on("blur", 'input', function(e) { - removeActive(event.target.id); + removeActive(e.target.id); }); - $('.label-list').on('click', '.input-label', function(e) + $('.label-list > .input-label').on('click', 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(); - } + handleClickItem($(this).attr('labelid')); }); function addActive(id) @@ -33,4 +25,18 @@ $(function() $('[labelid=' + id + ']').removeClass('text-primary'); $('[iconid=' + id + ']').addClass('hidden'); } + + function handleClickItem(clickId) + { + var clearId = $('.label-list > .text-primary').attr('labelid'); + if(clearId && clearId !== clickId) + { + removeActive(clearId); + }; + + if(clickId && clickId != clearId) + { + addActive(clickId); + }; + } }) diff --git a/module/dev/view/langitem.html.php b/module/dev/view/langitem.html.php index ea0eff2b3b..e55a4faa7f 100644 --- a/module/dev/view/langitem.html.php +++ b/module/dev/view/langitem.html.php @@ -48,4 +48,9 @@
+
+ + +
+