ZY пре 7 година
родитељ
комит
458dd08cb5
2 измењених фајлова са 78 додато и 38 уклоњено
  1. 72 36
      resources/app/public/css/browser.css
  2. 6 2
      resources/app/public/js/browser.js

+ 72 - 36
resources/app/public/css/browser.css

@@ -690,44 +690,52 @@ webview object {
 
 /* 历史记录样式 */
 
-.HistoryMain{
+.HistoryMain {
     width: 100%;
     height: 100%;
 }
-.HistoryMain *{
+
+.HistoryMain * {
     box-sizing: border-box;
 }
-.HistoryHead{
+
+.HistoryHead {
     width: 100%;
     height: 55px;
     background: #0b7aeb;
-    -moz-user-select:none;
-    -webkit-user-select:none;
-    -ms-user-select:none;
-    -khtml-user-select:none;
-    user-select:none;
+    -moz-user-select: none;
+    -webkit-user-select: none;
+    -ms-user-select: none;
+    -khtml-user-select: none;
+    user-select: none;
 }
+
 input::-webkit-input-placeholder {
     /* WebKit browsers */
     color: #fff;
 }
+
 input:-moz-placeholder {
     /* Mozilla Firefox 4 to 18 */
     color: #fff;
 }
+
 input::-moz-placeholder {
     /* Mozilla Firefox 19+ */
     color: #fff;
 }
+
 input::-ms-input-placeholder {
     /* Internet Explorer 10+ */
     color: #fff;
 }
-.HistorySelect{
+
+.HistorySelect {
     width: 500px;
     height: 100%;
     margin: auto;
 }
+
 .HistorySelect div {
     width: 450px;
     height: 45px;
@@ -736,6 +744,7 @@ input::-ms-input-placeholder {
     top: 5px;
     margin: auto;
 }
+
 .HistorySelect input {
     border: 0px;
     background: #0062ea;
@@ -748,16 +757,19 @@ input::-ms-input-placeholder {
     outline: none;
     z-index: 99999;
 }
+
 .browerHeaderControler {
     position: relative;
 }
-.HistoryHead p{
+
+.HistoryHead p {
     float: left;
     font-size: 18px;
     color: #fff;
     line-height: 55px;
     padding-left: 15px;
 }
+
 .HistoryContainer {
     padding: 0px 100px 20px;
     height: 866px;
@@ -766,16 +778,19 @@ input::-ms-input-placeholder {
     width: 1200px;
     float: right;
 }
-.Historyoperating{
+
+.Historyoperating {
     height: 866px;
     background: #eee;
     overflow: auto;
     width: 240px;
     float: left;
 }
+
 .Historyoperating ul {
     margin: 40px 00px;
 }
+
 .Historyoperating ul li {
     width: auto;
     transition: all .3s;
@@ -784,10 +799,12 @@ input::-ms-input-placeholder {
     padding: 0px 20px;
     cursor: pointer;
 }
+
 .Historyoperating ul li:hover {
     background: #dfdfdf;
 }
-.HistoryCard{
+
+.HistoryCard {
     width: 100%;
     background: #fff;
     /*box-shadow: 0 3px 3px 0 rgba(0,0,0,0.14), 0 1px 7px 0 rgba(0,0,0,0.12), 0 3px 1px -1px rgba(0,0,0,0.2);*/
@@ -795,68 +812,79 @@ input::-ms-input-placeholder {
     box-shadow: 0px 1px 1px 1px #c7c7c7;
     border-radius: 4px;
 }
-.HistoryCardContainer{
+
+.HistoryCardContainer {
     width: 100%;
 }
-.HistoryCardContainer li{
+
+.HistoryCardContainer li {
     width: 100%;
     height: 35px;
     line-height: 25px;
     margin-bottom: 2px;
     padding: 5px;
 }
-.HistoryCardContainer li:hover{
+
+.HistoryCardContainer li:hover {
     background: #eee;
     cursor: pointer;
 }
-.HistoryCardContainer li *{
+
+.HistoryCardContainer li * {
     float: left;
 }
-.HistoryCardContainer li span{
+
+.HistoryCardContainer li span {
     width: 80px;
     font-size: 12px;
     color: #7f7e7e;
-    -moz-user-select:none;
-    -webkit-user-select:none;
-    -ms-user-select:none;
-    -khtml-user-select:none;
-    user-select:none;
+    -moz-user-select: none;
+    -webkit-user-select: none;
+    -ms-user-select: none;
+    -khtml-user-select: none;
+    user-select: none;
 }
-.HistoryCardContainer li div{
+
+.HistoryCardContainer li div {
     width: calc(100% - 100px);
     height: 100%;
     font-size: 13px;
 }
-.HistoryCardContainer li img{
+
+.HistoryCardContainer li img {
     width: 15px;
     margin: 5px;
 }
-.HistoryCardContainer li p{
+
+.HistoryCardContainer li p {
     height: 25px;
     width: 200px;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }
-.HistoryCardHead{
+
+.HistoryCardHead {
     width: 100%;
     font-weight: bold;
     font-size: 18px;
     padding: 5px;
     border-bottom: 1px solid #eee;
     line-height: 40px;
-    -moz-user-select:none;
-    -webkit-user-select:none;
-    -ms-user-select:none;
-    -khtml-user-select:none;
-    user-select:none;
+    -moz-user-select: none;
+    -webkit-user-select: none;
+    -ms-user-select: none;
+    -khtml-user-select: none;
+    user-select: none;
 }
+
 .history_body span {
     padding-right: 20px;
     overflow: hidden;
     text-overflow: ellipsis;
     width: 180px;
 }
+
 .history_body p {
     width: 270px;
     height: 20px;
@@ -864,6 +892,7 @@ input::-ms-input-placeholder {
     overflow: hidden;
     text-overflow: ellipsis;
 }
+
 .history_body {
     display: inline-flex;
     margin-bottom: 10px;
@@ -958,23 +987,27 @@ input::-ms-input-placeholder {
     background: #0b7aeb;
     bottom: -55px;
 }
-.HistoryBottomContent{
+
+.HistoryBottomContent {
     width: 700px;
     height: auto;
     margin: auto;
     color: #ffffff;
 }
-.Historycount{
+
+.Historycount {
     width: auto;
     float: left;
     padding: 16px;
     font-size: 17px;
     z-index: 100;
 }
-.HistoryPick{
+
+.HistoryPick {
     width: auto;
     float: right;
 }
+
 .HistoryPick div {
     float: left;
     padding: 16px;
@@ -982,7 +1015,8 @@ input::-ms-input-placeholder {
     z-index: 100;
     cursor: pointer;
 }
-#qingchu > div {
+
+#qingchu>div {
     width: 35px;
     height: 20px;
     font-size: 12px;
@@ -996,10 +1030,12 @@ input::-ms-input-placeholder {
     opacity: 0;
     cursor: pointer;
 }
+
 .item {
     /*z-index: 9999;*/
 }
-.Historyinput{
+
+.Historyinput {
     margin-top: 7px;
     -webkit-app-region: no-drag;
     margin-right: 4px;

+ 6 - 2
resources/app/public/js/browser.js

@@ -836,6 +836,7 @@ US_Browser.HeadBind=function(){
     US_Browser.BrowerList.drag = function () {
         US_Browser.tags = document.querySelectorAll('.bowerCreaterWindow .BrowerList');
         US_Browser.tagEL = null;
+        US_Browser.stScreenX = null;
         [].forEach.call(US_Browser.tags,function(BrowerList){
             // 用户开始拖动元素或文本选择时会触发该事件
             BrowerList.addEventListener('dragstart',US_Browser.tagdragstart,false)
@@ -856,6 +857,7 @@ US_Browser.HeadBind=function(){
     }
     US_Browser.tagdragstart = function(e) {
         tagEL = e.target;
+        stScreenX = e.screenX;
     }
     US_Browser.tagdragenter = function(e) {
 
@@ -874,8 +876,10 @@ US_Browser.HeadBind=function(){
             US_Browser.NavContainer.insertBefore(this,tagEL);
         } else if (tagEL.previousSibling == this) {
             US_Browser.NavContainer.insertBefore(tagEL,this);
-        } else if (tagEL != this) {
-            US_Browser.NavContainer.insertBefore(tagEL,this.nextSibling);
+        } else if (stScreenX < e.screenX) {
+            US_Browser.NavContainer.insertBefore(tagEL,this.nextSibling)
+        } else if (stScreenX > e.screenX) {
+            US_Browser.NavContainer.insertBefore(tagEL,this)
         }
         tagELf=false;
     }