diff --git a/bi/base.css b/bi/base.css index 0400f6ab98..21f71f731c 100644 --- a/bi/base.css +++ b/bi/base.css @@ -36,26 +36,20 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker-button { - background-color: #eaeaea; +.bi-color-chooser-popup .color-chooser-popup-title { + background: #f4f4f4; + border-bottom: 1px solid #d4dadd; } -.bi-color-picker-button .color-picker-button-mask { - border: 1px solid #1a1a1a; +.bi-color-chooser-popup .color-chooser-popup-more { + background: #f4f4f4; } -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker > .center-element { - border-left: 1px solid #ffffff; - border-top: 1px solid #ffffff; +.bi-color-chooser-popup .color-chooser-popup-more:hover { + background: #d4dadd; } /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker-editor .color-picker-editor-label { - color: #808080; -} -.bi-color-picker-editor .color-picker-editor-display { +.bi-color-chooser-trigger { background: #ffffff; -webkit-border-radius: 2px; -moz-border-radius: 2px; @@ -64,6 +58,58 @@ -webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset; -moz-box-shadow: 0px 0px 2px 1px #d4dadd inset; } +/** + * Farbtastic Color Picker 1.2 + * © 2008 Steven Wittens + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +.farbtastic { + position: relative; +} +.farbtastic * { + position: absolute; + cursor: crosshair; +} +.farbtastic, +.farbtastic .wheel { + width: 195px; + height: 195px; +} +.farbtastic .color, +.farbtastic .overlay { + top: 47px; + left: 47px; + width: 101px; + height: 101px; +} +.farbtastic .wheel { + background: url(farbtastic/wheel.png) no-repeat; + width: 195px; + height: 195px; +} +.farbtastic .overlay { + background: url(farbtastic/mask.png) no-repeat; +} +.farbtastic .marker { + width: 17px; + height: 17px; + margin: -8px 0 0 -8px; + overflow: hidden; + background: url(farbtastic/marker.png) no-repeat; +} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ @@ -124,6 +170,72 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ +.bi-adapt-editor .adapt-editor-text { + font-size: 14px; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +/*************BI.SearchEditor******************/ +.bi-search-editor { + border: 1px solid #d4dadd; +} +.bi-search-editor .close-font { + font-size: 20px; +} +.bi-search-editor .search-font { + font-size: 20px; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +/*************BI.SearchEditor******************/ +.bi-small-search-editor .bi-editor { + font-size: 12px; +} +.bi-small-search-editor .bi-editor .bi-input { + font-size: 12px; +} +.bi-small-search-editor .bi-editor .bi-label { + font-size: 12px; +} +.bi-small-search-editor .close-font { + font-size: 18px; +} +.bi-small-search-editor .search-font { + font-size: 18px; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-sign-initial-editor .sign-initial-editor-text { + font-size: 14px; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-sign-style-editor .sign-style-editor-text { + max-width: 100%; + font-size: 12px; +} +.bi-sign-style-editor .sign-style-editor-tip { + max-width: 100%; + font-size: 12px; + color: #808080; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-text-editor { + border: 1px solid #d4dadd; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +/*************BI.SearchEditor******************/ +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ /* BASICS */ .CodeMirror { /* Set height, width, borders, and global font properties here */ @@ -669,38 +781,6 @@ li.CodeMirror-hint-active { /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-login-timeout-center .input-wrapper { - border-bottom: 1px solid #eaeaea; -} -.bi-login-timeout-center .input-wrapper .login-input { - font-size: 16px; -} -.bi-login-timeout-center .input-wrapper .error-mask { - background: #1a1a1a; - opacity: 0.25; - filter: alpha(opacity=25); - color: #ffffff; - font-size: 16px; -} -.bi-login-timeout-center .login-button { - background: #009de3; - -webkit-border-radius: 25px; - -moz-border-radius: 25px; - border-radius: 25px; - font-size: 22px; - color: #ffffff; -} -.bi-login-timeout-center .login-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-login-timeout-south .keep-state { - font-size: 14px; - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-all-count-pager .all-pager-prev { font-size: 16px; } @@ -732,26 +812,6 @@ li.CodeMirror-hint-active { /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-request-loading .mask-pane { - background: #ffffff; - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-request-loading .loading-comment { - font-size: 20px; - color: #808080; -} -.bi-request-loading .load-fail-comment { - font-size: 20px; - color: #808080; -} -.bi-request-loading .load-timeout-warning { - font-size: 16px; - color: #e85050; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-segment-button:active, .bi-segment-button.active { color: #ffffff; @@ -1306,548 +1366,46 @@ li.CodeMirror-hint-active { /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -/** - * Farbtastic Color Picker 1.2 - * © 2008 Steven Wittens - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -.farbtastic { - position: relative; -} -.farbtastic * { - position: absolute; - cursor: crosshair; -} -.farbtastic, -.farbtastic .wheel { - width: 195px; - height: 195px; -} -.farbtastic .color, -.farbtastic .overlay { - top: 47px; - left: 47px; - width: 101px; - height: 101px; -} -.farbtastic .wheel { - background: url(farbtastic/wheel.png) no-repeat; - width: 195px; - height: 195px; -} -.farbtastic .overlay { - background: url(farbtastic/mask.png) no-repeat; -} -.farbtastic .marker { - width: 17px; - height: 17px; - margin: -8px 0 0 -8px; - overflow: hidden; - background: url(farbtastic/marker.png) no-repeat; -} -/* required styles */ -.leaflet-pane, -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-tile-container, -.leaflet-map-pane svg, -.leaflet-map-pane canvas, -.leaflet-zoom-box, -.leaflet-image-layer, -.leaflet-layer { - position: absolute; - left: 0; - top: 0; -} -.leaflet-container { - overflow: hidden; - -ms-touch-action: none; - touch-action: none; -} -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - -webkit-user-drag: none; -} -/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ -.leaflet-safari .leaflet-tile { - image-rendering: -webkit-optimize-contrast; -} -/* hack that prevents hw layers "stretching" when loading new tiles */ -.leaflet-safari .leaflet-tile-container { - width: 1600px; - height: 1600px; - -webkit-transform-origin: 0 0; -} -.leaflet-marker-icon, -.leaflet-marker-shadow { - display: block; -} -/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ -/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ -.leaflet-container .leaflet-overlay-pane svg, -.leaflet-container .leaflet-marker-pane img, -.leaflet-container .leaflet-tile-pane img, -.leaflet-container img.leaflet-image-layer { - max-width: none !important; -} -.leaflet-tile { - filter: inherit; - visibility: hidden; -} -.leaflet-tile-loaded { - visibility: inherit; -} -.leaflet-zoom-box { - width: 0; - height: 0; - -moz-box-sizing: border-box; - box-sizing: border-box; - z-index: 800; -} -/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ -.leaflet-overlay-pane svg { - -moz-user-select: none; -} -.leaflet-pane { - z-index: 400; -} -.leaflet-tile-pane { - z-index: 200; -} -.leaflet-overlay-pane { - z-index: 400; -} -.leaflet-shadow-pane { - z-index: 500; -} -.leaflet-marker-pane { - z-index: 600; -} -.leaflet-popup-pane { - z-index: 700; -} -.leaflet-map-pane canvas { - z-index: 100; -} -.leaflet-map-pane svg { - z-index: 200; -} -.leaflet-vml-shape { - width: 1px; - height: 1px; -} -.lvml { - behavior: url(#default#VML); - display: inline-block; - position: absolute; -} -/* control positioning */ -.leaflet-control { - position: relative; - z-index: 800; - pointer-events: auto; -} -.leaflet-top, -.leaflet-bottom { - position: absolute; - z-index: 1000; - pointer-events: none; -} -.leaflet-top { - top: 0; -} -.leaflet-right { - right: 0; -} -.leaflet-bottom { - bottom: 0; -} -.leaflet-left { - left: 0; -} -.leaflet-control { - float: left; - clear: both; -} -.leaflet-right .leaflet-control { - float: right; -} -.leaflet-top .leaflet-control { - margin-top: 10px; -} -.leaflet-bottom .leaflet-control { - margin-bottom: 10px; -} -.leaflet-left .leaflet-control { - margin-left: 10px; -} -.leaflet-right .leaflet-control { - margin-right: 10px; -} -/* zoom and fade animations */ -.leaflet-fade-anim .leaflet-tile { - will-change: opacity; -} -.leaflet-fade-anim .leaflet-popup { - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; -} -.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { - opacity: 1; -} -.leaflet-zoom-animated { - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; -} -.leaflet-zoom-anim .leaflet-zoom-animated { - will-change: transform; -} -.leaflet-zoom-anim .leaflet-zoom-animated { - -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1); -} -.leaflet-zoom-anim .leaflet-tile, -.leaflet-pan-anim .leaflet-tile { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; -} -.leaflet-zoom-anim .leaflet-zoom-hide { - visibility: hidden; -} -/* cursors */ -.leaflet-interactive { - cursor: pointer; -} -.leaflet-grab { - cursor: -webkit-grab; - cursor: -moz-grab; -} -.leaflet-crosshair, -.leaflet-crosshair .leaflet-interactive { - cursor: crosshair; -} -.leaflet-popup-pane, -.leaflet-control { - cursor: auto; -} -.leaflet-dragging .leaflet-grab, -.leaflet-dragging .leaflet-grab .leaflet-interactive, -.leaflet-dragging .leaflet-marker-draggable { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; -} -/* marker & overlays interactivity */ -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-image-layer, -.leaflet-pane > svg path, -.leaflet-tile-container { - pointer-events: none; -} -.leaflet-marker-icon.leaflet-interactive, -.leaflet-image-layer.leaflet-interactive, -.leaflet-pane > svg path.leaflet-interactive { - pointer-events: auto; -} -/* visual tweaks */ -.leaflet-container { - /*background: #ddd;*/ - outline: 0; -} -.leaflet-container a { - color: #0078A8; -} -.leaflet-container a.leaflet-active { - outline: 2px solid orange; -} -.leaflet-zoom-box { - border: 2px dotted #38f; - background: rgba(255, 255, 255, 0.5); -} -/* general typography */ -.leaflet-container { - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; -} -/* general toolbar styles */ -.leaflet-bar { - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65); - border-radius: 4px; -} -.leaflet-bar a, -.leaflet-bar a:hover { - background-color: #fff; - border-bottom: 1px solid #ccc; - width: 26px; - height: 26px; - line-height: 26px; - display: block; - text-align: center; - text-decoration: none; - color: black; -} -.leaflet-bar a, -.leaflet-control-layers-toggle { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; -} -.leaflet-bar a:hover { - background-color: #f4f4f4; -} -.leaflet-bar a:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.leaflet-bar a:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom: none; -} -.leaflet-bar a.leaflet-disabled { - cursor: default; - background-color: #f4f4f4; - color: #bbb; -} -.leaflet-touch .leaflet-bar a { - width: 30px; - height: 30px; - line-height: 30px; -} -/* zoom control */ -.leaflet-control-zoom-in, -.leaflet-control-zoom-out { - font: bold 18px 'Lucida Console', Monaco, monospace; - text-indent: 1px; -} -.leaflet-control-zoom-out { - font-size: 20px; -} -.leaflet-touch .leaflet-control-zoom-in { - font-size: 22px; -} -.leaflet-touch .leaflet-control-zoom-out { - font-size: 24px; -} -/* layers control */ -.leaflet-control-layers { - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); - background: #fff; - border-radius: 5px; -} -.leaflet-control-layers-toggle { - background-image: url(images/layers.png); - width: 36px; - height: 36px; -} -.leaflet-retina .leaflet-control-layers-toggle { - background-image: url(images/layers-2x.png); - background-size: 26px 26px; -} -.leaflet-touch .leaflet-control-layers-toggle { - width: 44px; - height: 44px; -} -.leaflet-control-layers .leaflet-control-layers-list, -.leaflet-control-layers-expanded .leaflet-control-layers-toggle { - display: none; -} -.leaflet-control-layers-expanded .leaflet-control-layers-list { - display: block; - position: relative; +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-branch-tree .bi-branch-tree-view { + min-width: 300px; } -.leaflet-control-layers-expanded { - padding: 6px 10px 6px 6px; - color: #333; - background: #fff; +.bi-click-branch-tree { + border: 1px solid #d4dadd; } -.leaflet-control-layers-scrollbar { - overflow-y: scroll; - padding-right: 5px; +.bi-click-branch-tree .bi-empty-view { + background: #f4f4f4; } -.leaflet-control-layers-selector { - margin-top: 2px; - position: relative; - top: 1px; +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-display-tree .ztree * { + color: #808080; } -.leaflet-control-layers label { - display: block; +.bi-display-tree .ztree li span.button.switch.center_open { + background-image: url("icon/tree-vertical-line-3.png"); } -.leaflet-control-layers-separator { - height: 0; - border-top: 1px solid #ddd; - margin: 5px -10px 5px -6px; +.bi-display-tree .ztree li span.button.switch.roots_open { + background-image: url("icon/tree-vertical-line-2.png"); } -/* attribution and scale controls */ -.leaflet-container .leaflet-control-attribution { - background: #fff; - background: rgba(255, 255, 255, 0.7); - margin: 0; +.bi-display-tree .ztree li span.button.switch.bottom_open { + background-image: url("icon/tree-vertical-line-4.png"); } -.leaflet-control-attribution, -.leaflet-control-scale-line { - padding: 0 5px; - color: #333; +.bi-display-tree .ztree li a, +.bi-display-tree .ztree li span { + cursor: default !important; } -.leaflet-control-attribution a { +.bi-display-tree .ztree li a:hover { text-decoration: none; } -.leaflet-control-attribution a:hover { - text-decoration: underline; -} -.leaflet-container .leaflet-control-attribution, -.leaflet-container .leaflet-control-scale { - font-size: 11px; -} -.leaflet-left .leaflet-control-scale { - margin-left: 5px; -} -.leaflet-bottom .leaflet-control-scale { - margin-bottom: 5px; -} -.leaflet-control-scale-line { - border: 2px solid #777; - border-top: none; - line-height: 1.1; - padding: 2px 5px 1px; - font-size: 11px; - white-space: nowrap; - overflow: hidden; - -moz-box-sizing: border-box; - box-sizing: border-box; - background: #fff; - background: rgba(255, 255, 255, 0.5); -} -.leaflet-control-scale-line:not(:first-child) { - border-top: 2px solid #777; - border-bottom: none; - margin-top: -2px; -} -.leaflet-control-scale-line:not(:first-child):not(:last-child) { - border-bottom: 2px solid #777; -} -.leaflet-touch .leaflet-control-attribution, -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - box-shadow: none; -} -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - border: 2px solid rgba(0, 0, 0, 0.2); - background-clip: padding-box; -} -/* popup */ -.leaflet-popup { - position: absolute; - text-align: center; -} -.leaflet-popup-content-wrapper { - padding: 1px; - text-align: left; - border-radius: 12px; -} -.leaflet-popup-content { - margin: 13px 19px; - line-height: 1.4; -} -.leaflet-popup-content p { - margin: 18px 0; -} -.leaflet-popup-tip-container { - margin: 0 auto; - width: 40px; - height: 20px; - position: relative; - overflow: hidden; -} -.leaflet-popup-tip { - width: 17px; - height: 17px; - padding: 1px; - margin: -10px auto 0; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); -} -.leaflet-popup-content-wrapper, -.leaflet-popup-tip { - background: white; - color: #333; - box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4); -} -.leaflet-container a.leaflet-popup-close-button { - position: absolute; - top: 0; - right: 0; - padding: 4px 4px 0 0; +.bi-display-tree .ztree li a.curSelectedNode { + padding-top: 1px; border: none; - text-align: center; - width: 18px; - height: 14px; - font: 16px/14px Tahoma, Verdana, sans-serif; - color: #c3c3c3; - text-decoration: none; - font-weight: bold; - background: transparent; -} -.leaflet-container a.leaflet-popup-close-button:hover { - color: #999; -} -.leaflet-popup-scrolled { - overflow: auto; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; -} -.leaflet-oldie .leaflet-popup-content-wrapper { - zoom: 1; -} -.leaflet-oldie .leaflet-popup-tip { - width: 24px; - margin: 0 auto; - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; - filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); -} -.leaflet-oldie .leaflet-popup-tip-container { - margin-top: -1px; -} -.leaflet-oldie .leaflet-control-zoom, -.leaflet-oldie .leaflet-control-layers, -.leaflet-oldie .leaflet-popup-content-wrapper, -.leaflet-oldie .leaflet-popup-tip { - border: 1px solid #999; -} -/* div icon */ -.leaflet-div-icon { - background: #fff; - border: 1px solid #666; + background-color: inherit; + opacity: 1; + filter: alpha(opacity=100); } /*------------------------------------- zTree Style @@ -2140,81 +1698,6 @@ ul.ztree.zTreeDragUL { /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-timeout-toast { - font-size: 14px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fddddd; - color: #e85050; -} -.bi-timeout-toast .cancel-button { - background: #ffffff; - border: 1px solid #d4dadd; - color: #1a1a1a; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-timeout-toast .cancel-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-timeout-toast .retry-button { - background: #009de3; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - color: #ffffff; -} -.bi-timeout-toast .retry-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-branch-tree .bi-branch-tree-view { - min-width: 300px; -} -.bi-click-branch-tree { - border: 1px solid #d4dadd; -} -.bi-click-branch-tree .bi-empty-view { - background: #f4f4f4; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-display-tree .ztree * { - color: #808080; -} -.bi-display-tree .ztree li span.button.switch.center_open { - background-image: url("icon/tree-vertical-line-3.png"); -} -.bi-display-tree .ztree li span.button.switch.roots_open { - background-image: url("icon/tree-vertical-line-2.png"); -} -.bi-display-tree .ztree li span.button.switch.bottom_open { - background-image: url("icon/tree-vertical-line-4.png"); -} -.bi-display-tree .ztree li a, -.bi-display-tree .ztree li span { - cursor: default !important; -} -.bi-display-tree .ztree li a:hover { - text-decoration: none; -} -.bi-display-tree .ztree li a.curSelectedNode { - padding-top: 1px; - border: none; - background-color: inherit; - opacity: 1; - filter: alpha(opacity=100); -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-trigger .bi-trigger-icon-button { border-left: 1px solid #d4dadd; font-size: 16px; @@ -2287,329 +1770,3 @@ ul.ztree.zTreeDragUL { .bi-list-view .list-view-toolbar > .first-element { border-left: none; } -.bi-flex-center-layout { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -o-justify-content: center; - justify-content: center; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} -.bi-flex-horizontal-layout { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: flex-start; - /* 12版 */ - -webkit-align-items: flex-start; - -moz-align-items: flex-start; - -ms-align-items: flex-start; - -o-align-items: flex-start; - align-items: flex-start; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; -} -.bi-flex-horizontal-layout.middle { - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} -.bi-flex-horizontal-layout.bottom { - /* 09版 */ - -webkit-box-align: flex-end; - /* 12版 */ - -webkit-align-items: flex-end; - -moz-align-items: flex-end; - -ms-align-items: flex-end; - -o-align-items: flex-end; - align-items: flex-end; -} -.bi-flex-vertical-center { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; -} -.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -o-justify-content: center; - justify-content: center; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - min-width: 100%; - min-height: 100%; - float: left; -} -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: flex-start; - /* 12版 */ - -webkit-align-items: flex-start; - -moz-align-items: flex-start; - -ms-align-items: flex-start; - -o-align-items: flex-start; - align-items: flex-start; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; - min-height: 100%; -} -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle { - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom { - /* 09版 */ - -webkit-box-align: flex-end; - /* 12版 */ - -webkit-align-items: flex-end; - -moz-align-items: flex-end; - -ms-align-items: flex-end; - -o-align-items: flex-end; - align-items: flex-end; -} -.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; - min-height: 100%; - float: left; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-inline-center-adapt-layout:after { - display: inline-block; - width: 0; - min-height: 100%; - vertical-align: middle; - content: ' '; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-inline-vertical-adapt-layout:after { - display: inline-block; - width: 0; - min-height: 100%; - vertical-align: middle; - content: ' '; -} diff --git a/bi/base.js b/bi/base.js index 14edec7ef8..0d8bb0ef1e 100644 --- a/bi/base.js +++ b/bi/base.js @@ -4150,7 +4150,7 @@ BI.Searcher = BI.inherit(BI.Widget, { this.fireEvent(BI.Searcher.EVENT_START); this.popupView.startSearch && this.popupView.startSearch(); //搜索前先清空dom - BI.Maskers.get(this.getName()).empty(); + // BI.Maskers.get(this.getName()).empty(); BI.nextTick(function (name) { BI.Maskers.show(name); }, this.getName()); @@ -4175,9 +4175,9 @@ BI.Searcher = BI.inherit(BI.Widget, { BI.Maskers.hide(name); if (BI.Maskers.has(name) && this._isSearching === true) { //搜索后清空dom - BI.nextTick(function () { - BI.Maskers.has(name) && BI.Maskers.get(name).empty(); - }); + // BI.nextTick(function () { + // BI.Maskers.has(name) && BI.Maskers.get(name).empty(); + // }); this.popupView && this.popupView.stopSearch && this.popupView.stopSearch(); this.fireEvent(BI.Searcher.EVENT_STOP); } diff --git a/bi/case.js b/bi/case.js index 7ea957f9bd..cf9e2ca55a 100644 --- a/bi/case.js +++ b/bi/case.js @@ -4896,6 +4896,335 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, { } }); $.shortcut("bi.down_list_select_text_trigger", BI.DownListSelectTextTrigger);/** + * 根据内容自适应长度的输入框 + * @class BI.AdaptiveEditor + * @extends BI.Single + */ +BI.AdaptiveEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.AdaptiveEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-adapt-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: true, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.AdaptiveEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.sign_editor", + element: this, + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + mouseOut: o.mouseOut, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_FOCUS); + }); + this.editor.on(BI.SignEditor.EVENT_BLUR, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_BLUR); + }); + this.editor.on(BI.SignEditor.EVENT_CLICK, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_CLICK); + }); + this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { + self._checkEditorLength(); + self.fireEvent(BI.AdaptiveEditor.EVENT_CHANGE); + }); + this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.AdaptiveEditor.EVENT_KEY_DOWN); + }); + + this.editor.on(BI.SignEditor.EVENT_VALID, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_VALID); + }); + this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_CONFIRM); + }); + this.editor.on(BI.SignEditor.EVENT_START, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_START); + }); + this.editor.on(BI.SignEditor.EVENT_PAUSE, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_STOP); + }); + this.editor.on(BI.SignEditor.EVENT_SPACE, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_SPACE); + }); + this.editor.on(BI.SignEditor.EVENT_ERROR, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_ERROR); + }); + this.editor.on(BI.SignEditor.EVENT_ENTER, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_ENTER); + }); + this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_RESTRICT); + }); + this.editor.on(BI.SignEditor.EVENT_EMPTY, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_EMPTY); + }); + this._checkEditorLength(); + }, + + _checkEditorLength: function () { + var o = this.options; + this.element.width(BI.DOM.getTextSizeWidth(this.getValue(), 14) + 2 * o.hgap + o.lgap + o.rgap); + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + setValue: function (k) { + this.editor.setValue(k); + this._checkEditorLength(); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.editor.getState(); + }, + + setState: function (v) { + + } +}); +BI.AdaptiveEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.AdaptiveEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.AdaptiveEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.AdaptiveEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.AdaptiveEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.AdaptiveEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.AdaptiveEditor.EVENT_START = "EVENT_START"; +BI.AdaptiveEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.AdaptiveEditor.EVENT_STOP = "EVENT_STOP"; +BI.AdaptiveEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.AdaptiveEditor.EVENT_VALID = "EVENT_VALID"; +BI.AdaptiveEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.AdaptiveEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.AdaptiveEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.AdaptiveEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.AdaptiveEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.adapt_editor", BI.AdaptiveEditor);/** + * 有清楚按钮的文本框 + * Created by GUY on 2015/9/29. + * @class BI.SmallTextEditor + * @extends BI.SearchEditor + */ +BI.ClearEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-clear-editor", + height: 30, + errorText: "", + watermark: "", + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn + }); + }, + _init: function () { + BI.ClearEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + watermark: o.watermark, + allowBlank: true, + errorText: o.errorText, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker + }); + this.clear = BI.createWidget({ + type: "bi.icon_button", + stopEvent: true, + cls: "search-close-h-font" + }); + this.clear.on(BI.IconButton.EVENT_CHANGE, function () { + self.setValue(""); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); + self.fireEvent(BI.ClearEditor.EVENT_CLEAR); + }); + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: this.editor + }, + { + el: this.clear, + width: 25 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.ClearEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.ClearEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.ClearEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self._checkClear(); + self.fireEvent(BI.ClearEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.ClearEditor.EVENT_SPACE) + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE) + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.ClearEditor.EVENT_VALID) + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.ClearEditor.EVENT_ERROR) + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.ClearEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.ClearEditor.EVENT_RESTRICT) + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self._checkClear(); + self.fireEvent(BI.ClearEditor.EVENT_EMPTY) + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + self.fireEvent(BI.ClearEditor.EVENT_REMOVE) + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.ClearEditor.EVENT_CONFIRM) + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.ClearEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.ClearEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.ClearEditor.EVENT_STOP); + }); + + this.clear.invisible(); + }, + + _checkClear: function () { + if (!this.getValue()) { + this.clear.invisible(); + } else { + this.clear.visible(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + getValue: function () { + if (this.isValid()) { + var res = this.editor.getValue().match(/[\S]+/g); + return BI.isNull(res) ? "" : res[res.length - 1]; + } + }, + + setValue: function (v) { + this.editor.setValue(v); + if (BI.isKey(v)) { + this.clear.visible(); + } + }, + + isValid: function () { + return this.editor.isValid(); + } +}); +BI.ClearEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ClearEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.ClearEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.ClearEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.ClearEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.ClearEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.ClearEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; +BI.ClearEditor.EVENT_CLEAR = "EVENT_CLEAR"; + +BI.ClearEditor.EVENT_START = "EVENT_START"; +BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.ClearEditor.EVENT_STOP = "EVENT_STOP"; +BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ClearEditor.EVENT_VALID = "EVENT_VALID"; +BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; +$.shortcut("bi.clear_editor", BI.ClearEditor);/** * guy * 记录内容的输入框 * @class BI.RecordEditor @@ -4965,73 +5294,729 @@ BI.RecordEditor = BI.inherit(BI.Single, { this.editor.on(BI.Editor.EVENT_CHANGE, function () { self.fireEvent(BI.RecordEditor.EVENT_CHANGE, arguments); }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.RecordEditor.EVENT_KEY_DOWN, arguments); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.RecordEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.RecordEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.RecordEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.setState(self.getValue()); + self.editor.isValid() && self.editor.setValue(""); + self.fireEvent(BI.RecordEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.RecordEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.RecordEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.RecordEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.RecordEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self._checkInputState(); + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + if (!BI.isEmpty(self.contents)) { + self.contents.pop().destroy(); + self.setValue(self.getValue()); + self._adjustInputWidth(); + } + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.RecordEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.RecordEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.RecordEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.inline", + element: this, + items: [this.textContainer, this.editor] + }); + BI.ResizeDetector.addResizeListener(this, BI.bind(this._adjustInputWidth, this)); + this._adjustInputWidth(); + }, + + _adjustInputWidth: function () { + BI.nextTick(BI.bind(function () { + this.editor.element.css("width", this.element.width() - this.textContainer.element.outerWidth() - 10); + }, this)); + }, + + _checkInputState: function () { + if (BI.isEmpty(this.contents)) { + this.editor.enableWarterMark(); + } else { + this.editor.disableWarterMark(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + var values = BI.map(this.contents, function (i, lb) { + return lb.getText(); + }); + if (BI.isNotEmptyString(this.editor.getValue())) { + return values.concat([this.editor.getValue()]); + } + return values; + }, + + setState: function (v) { + BI.RecordEditor.superclass.setValue.apply(this, arguments); + v = BI.isArray(v) ? v : (v == "" ? [] : [v]); + var contents = this.contents = []; + BI.each(v, function (i, lb) { + contents.push(BI.createWidget({ + type: "bi.label", + height: 25, + cls: "record-editor-text", + text: lb + })) + }); + this.textContainer.empty(); + this.textContainer.populate(contents); + this.editor.isValid() && this.editor.setValue(""); + this._checkInputState(); + this._adjustInputWidth(); + }, + + destroy: function () { + BI.Resizers.remove(this.getName()); + BI.RecordEditor.superclass.destroy.apply(this, arguments); + } +}); +BI.RecordEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.RecordEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.RecordEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.RecordEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.RecordEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; + +BI.RecordEditor.EVENT_START = "EVENT_START"; +BI.RecordEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.RecordEditor.EVENT_STOP = "EVENT_STOP"; +BI.RecordEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.RecordEditor.EVENT_VALID = "EVENT_VALID"; +BI.RecordEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.RecordEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.RecordEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.RecordEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.RecordEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.record_editor", BI.RecordEditor);/** + * Created by roy on 15/9/14. + */ +BI.SearchEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-search-editor", + height: 30, + errorText: "", + watermark: BI.i18nText("BI-Basic_Search"), + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn + }); + }, + _init: function () { + this.options.height -= 2; + BI.SearchEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + watermark: o.watermark, + allowBlank: true, + errorText: o.errorText, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker + }); + this.clear = BI.createWidget({ + type: "bi.icon_button", + stopEvent: true, + cls: "search-close-h-font" + }); + this.clear.on(BI.IconButton.EVENT_CHANGE, function () { + self.setValue(""); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); + self.fireEvent(BI.SearchEditor.EVENT_CLEAR); + }); + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: { + type: "bi.center_adapt", + cls: "search-font", + items: [{ + el: { + type: "bi.icon" + } + }] + }, + width: 25 + }, + { + el: self.editor + }, + { + el: this.clear, + width: 25 + } + ] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SearchEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SearchEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SearchEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self._checkClear(); + self.fireEvent(BI.SearchEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SearchEditor.EVENT_SPACE) + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE) + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SearchEditor.EVENT_VALID) + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.SearchEditor.EVENT_ERROR) + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SearchEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SearchEditor.EVENT_RESTRICT) + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self._checkClear(); + self.fireEvent(BI.SearchEditor.EVENT_EMPTY) + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + self.fireEvent(BI.SearchEditor.EVENT_REMOVE) + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.SearchEditor.EVENT_CONFIRM) + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SearchEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SearchEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SearchEditor.EVENT_STOP); + }); + + this.clear.invisible(); + }, + + _checkClear: function () { + if (!this.getValue()) { + this.clear.invisible(); + } else { + this.clear.visible(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + getValue: function () { + if (this.isValid()) { + var res = this.editor.getValue().match(/[\S]+/g); + return BI.isNull(res) ? "" : res[res.length - 1]; + } + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (v) { + this.editor.setValue(v); + if (BI.isKey(v)) { + this.clear.visible(); + } + }, + + setValid: function (b) { + this.editor.setValid(b); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setEnable: function (b) { + BI.Editor.superclass.setEnable.apply(this, arguments); + this.editor && this.editor.setEnable(b); + this.clear.setEnabled(b); + } +}); +BI.SearchEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SearchEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SearchEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SearchEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SearchEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SearchEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SearchEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; +BI.SearchEditor.EVENT_CLEAR = "EVENT_CLEAR"; + +BI.SearchEditor.EVENT_START = "EVENT_START"; +BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SearchEditor.EVENT_STOP = "EVENT_STOP"; +BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SearchEditor.EVENT_VALID = "EVENT_VALID"; +BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY"; +$.shortcut("bi.search_editor", BI.SearchEditor);/** + * 小号搜索框 + * Created by GUY on 2015/9/29. + * @class BI.SmallSearchEditor + * @extends BI.SearchEditor + */ +BI.SmallSearchEditor = BI.inherit(BI.SearchEditor, { + _defaultConfig: function () { + var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-small-search-editor", + height: 24 + }); + }, + + _init: function () { + BI.SmallSearchEditor.superclass._init.apply(this, arguments); + } +}); +$.shortcut("bi.small_search_editor", BI.SmallSearchEditor);/** + * 带标记的文本框 + * Created by GUY on 2016/1/25. + * @class BI.ShelterEditor + * @extends BI.Single + */ +BI.ShelterEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-shelter-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: true, + watermark: "", + errorText: "", + height: 30, + textAlign: "left" + }) + }, + + _init: function () { + BI.ShelterEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + mouseOut: o.mouseOut, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "shelter-editor-text", + textAlign: o.textAlign, + height: o.height, + hgap: 4 + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.text.on(BI.Controller.EVENT_CHANGE, function () { + arguments[2] = self; + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL); + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.ShelterEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setTextStyle: function (style) { + this.text.setStyle(style); + }, + + setValue: function (k) { + this.editor.setValue(k); + this._checkText(); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + this._showHint(); + this.text.setValue(v); + } +}); +BI.ShelterEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ShelterEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.ShelterEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.ShelterEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.ShelterEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.ShelterEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.ShelterEditor.EVENT_START = "EVENT_START"; +BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.ShelterEditor.EVENT_STOP = "EVENT_STOP"; +BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ShelterEditor.EVENT_VALID = "EVENT_VALID"; +BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.ShelterEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.ShelterEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.ShelterEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.shelter_editor", BI.ShelterEditor);/** + * sign是新值(初始value值)形式的自适应宽度的输入框 + * @class BI.SignInitialEditor + * @extends BI.Single + */ +BI.SignInitialEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.SignInitialEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-sign-initial-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: true, + watermark: "", + errorText: "", + value: "", + text: "", + height: 30 + }) + }, + + _init: function () { + BI.SignInitialEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.sign_editor", + element: this, + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value || o.text, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + mouseOut: o.mouseOut, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + if(BI.isNotNull(o.value)){ + this.setState(o.value); + } + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS); + }); + this.editor.on(BI.SignEditor.EVENT_BLUR, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_BLUR); }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.RecordEditor.EVENT_VALID, arguments); + this.editor.on(BI.SignEditor.EVENT_CLICK, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CLICK); }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.RecordEditor.EVENT_SPACE, arguments); + this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE); }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.setState(self.getValue()); - self.editor.isValid() && self.editor.setValue(""); - self.fireEvent(BI.RecordEditor.EVENT_CONFIRM, arguments); + this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN); }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.RecordEditor.EVENT_START, arguments); + + this.editor.on(BI.SignEditor.EVENT_VALID, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_VALID); }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.RecordEditor.EVENT_PAUSE, arguments); + this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { + self.setState(self.editor.getValue()); + self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM); }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.RecordEditor.EVENT_STOP, arguments); + this.editor.on(BI.SignEditor.EVENT_START, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_START); }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.RecordEditor.EVENT_ENTER, arguments); + this.editor.on(BI.SignEditor.EVENT_PAUSE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE); }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self._checkInputState(); + this.editor.on(BI.SignEditor.EVENT_STOP, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_STOP); }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - if (!BI.isEmpty(self.contents)) { - self.contents.pop().destroy(); - self.setValue(self.getValue()); - self._adjustInputWidth(); - } + this.editor.on(BI.SignEditor.EVENT_SPACE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_SPACE); }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.RecordEditor.EVENT_ERROR, arguments); + this.editor.on(BI.SignEditor.EVENT_ERROR, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_ERROR); }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.RecordEditor.EVENT_RESTRICT, arguments); + this.editor.on(BI.SignEditor.EVENT_ENTER, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_ENTER); }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.RecordEditor.EVENT_EMPTY, arguments); + this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT); }); - BI.createWidget({ - type: "bi.inline", - element: this, - items: [this.textContainer, this.editor] + this.editor.on(BI.SignEditor.EVENT_EMPTY, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY); }); - BI.ResizeDetector.addResizeListener(this, BI.bind(this._adjustInputWidth, this)); - this._adjustInputWidth(); - }, - - _adjustInputWidth: function () { - BI.nextTick(BI.bind(function () { - this.editor.element.css("width", this.element.width() - this.textContainer.element.outerWidth() - 10); - }, this)); - }, - - _checkInputState: function () { - if (BI.isEmpty(this.contents)) { - this.editor.enableWarterMark(); - } else { - this.editor.disableWarterMark(); - } }, focus: function () { @@ -5054,84 +6039,57 @@ BI.RecordEditor = BI.inherit(BI.Single, { return this.editor.getErrorText(); }, - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (k) { - this.editor.setValue(k); + setValue: function (v) { + this.editor.setValue(v.value); + this.setState(v.value); }, getValue: function () { - return this.editor.getValue(); + return { + value: this.editor.getValue(), + text: this.options.text + } }, getState: function () { - var values = BI.map(this.contents, function (i, lb) { - return lb.getText(); - }); - if (BI.isNotEmptyString(this.editor.getValue())) { - return values.concat([this.editor.getValue()]); - } - return values; + return this.editor.getState(); }, setState: function (v) { - BI.RecordEditor.superclass.setValue.apply(this, arguments); - v = BI.isArray(v) ? v : (v == "" ? [] : [v]); - var contents = this.contents = []; - BI.each(v, function (i, lb) { - contents.push(BI.createWidget({ - type: "bi.label", - height: 25, - cls: "record-editor-text", - text: lb - })) - }); - this.textContainer.empty(); - this.textContainer.populate(contents); - this.editor.isValid() && this.editor.setValue(""); - this._checkInputState(); - this._adjustInputWidth(); - }, - - destroy: function () { - BI.Resizers.remove(this.getName()); - BI.RecordEditor.superclass.destroy.apply(this, arguments); + var o = this.options; + v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; + this.editor.setState(v); } }); -BI.RecordEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.RecordEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.RecordEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.RecordEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.RecordEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; - -BI.RecordEditor.EVENT_START = "EVENT_START"; -BI.RecordEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.RecordEditor.EVENT_STOP = "EVENT_STOP"; -BI.RecordEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.RecordEditor.EVENT_VALID = "EVENT_VALID"; -BI.RecordEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.RecordEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.RecordEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.RecordEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.RecordEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.record_editor", BI.RecordEditor);/** +BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignInitialEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignInitialEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignInitialEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignInitialEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignInitialEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SignInitialEditor.EVENT_START = "EVENT_START"; +BI.SignInitialEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignInitialEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignInitialEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignInitialEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignInitialEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignInitialEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignInitialEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignInitialEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignInitialEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.sign_initial_editor", BI.SignInitialEditor);/** * 带标记的文本框 - * Created by GUY on 2016/1/25. - * @class BI.ShelterEditor + * Created by GUY on 2015/8/28. + * @class BI.SignEditor * @extends BI.Single */ -BI.ShelterEditor = BI.inherit(BI.Single, { +BI.SignEditor = BI.inherit(BI.Single, { _defaultConfig: function () { - var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments); + var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-shelter-editor", + baseCls: (conf.baseCls || "") + " bi-sign-editor", hgap: 4, vgap: 2, lgap: 0, @@ -5144,13 +6102,12 @@ BI.ShelterEditor = BI.inherit(BI.Single, { allowBlank: true, watermark: "", errorText: "", - height: 30, - textAlign: "left" + height: 30 }) }, _init: function () { - BI.ShelterEditor.superclass._init.apply(this, arguments); + BI.SignEditor.superclass._init.apply(this, arguments); var self = this, o = this.options; this.editor = BI.createWidget({ type: "bi.editor", @@ -5171,10 +6128,20 @@ BI.ShelterEditor = BI.inherit(BI.Single, { }); this.text = BI.createWidget({ type: "bi.text_button", - cls: "shelter-editor-text", - textAlign: o.textAlign, + cls: "sign-editor-text", + textAlign: "left", height: o.height, - hgap: 4 + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL) + }); }); BI.createWidget({ type: "bi.absolute", @@ -5187,64 +6154,57 @@ BI.ShelterEditor = BI.inherit(BI.Single, { bottom: 0 }] }); - this.text.on(BI.Controller.EVENT_CHANGE, function () { - arguments[2] = self; - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL); - }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); }); this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments); + self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments); }); this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments); + self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments); }); this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments); + self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments); }); this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments); + self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments); }); this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments); + self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); }); this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments); + self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); }); this.editor.on(BI.Editor.EVENT_CONFIRM, function () { self._showHint(); self._checkText(); - self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments); + self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments); }); this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.ShelterEditor.EVENT_START, arguments); + self.fireEvent(BI.SignEditor.EVENT_START, arguments); }); this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments); + self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments); }); this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments); + self.fireEvent(BI.SignEditor.EVENT_STOP, arguments); }); this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments); + self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments); }); this.editor.on(BI.Editor.EVENT_ERROR, function () { self._checkText(); - self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments); + self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments); }); this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments); + self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments); }); this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments); + self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments); }); this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); + self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments); }); BI.createWidget({ type: "bi.vertical", @@ -5258,13 +6218,15 @@ BI.ShelterEditor = BI.inherit(BI.Single, { _checkText: function () { var o = this.options; - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.text.element.removeClass("bi-water-mark"); - } + BI.nextTick(BI.bind(function () { + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, this)); }, _showInput: function () { @@ -5314,6 +6276,11 @@ BI.ShelterEditor = BI.inherit(BI.Single, { return this.editor.isValid(); }, + setValid: function(v){ + BI.SignEditor.superclass.setValid.apply(this, arguments); + this.editor.setValid(v); + }, + setErrorText: function (text) { this.editor.setErrorText(text); }, @@ -5330,10 +6297,6 @@ BI.ShelterEditor = BI.inherit(BI.Single, { return this.editor.getLastValidValue(); }, - setTextStyle: function (style) { - this.text.setStyle(style); - }, - setValue: function (k) { this.editor.setValue(k); this._checkText(); @@ -5352,35 +6315,40 @@ BI.ShelterEditor = BI.inherit(BI.Single, { this.text.setValue(v); } }); -BI.ShelterEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.ShelterEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.ShelterEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.ShelterEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.ShelterEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.ShelterEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; +BI.SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; -BI.ShelterEditor.EVENT_START = "EVENT_START"; -BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.ShelterEditor.EVENT_STOP = "EVENT_STOP"; -BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.ShelterEditor.EVENT_VALID = "EVENT_VALID"; -BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.ShelterEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.ShelterEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.ShelterEditor.EVENT_EMPTY = "EVENT_EMPTY"; +BI.SignEditor.EVENT_START = "EVENT_START"; +BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; -$.shortcut("bi.shelter_editor", BI.ShelterEditor);/** - * 带标记的文本框 - * Created by GUY on 2015/8/28. - * @class BI.SignEditor +$.shortcut("bi.sign_editor", BI.SignEditor);/** + * sign标签分两段,可以自定义样式 + * @class BI.SignStyleEditor * @extends BI.Single */ -BI.SignEditor = BI.inherit(BI.Single, { +BI.SignStyleEditor = BI.inherit(BI.Single, { + + constants: { + tipTextGap: 4 + }, + _defaultConfig: function () { - var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments); + var conf = BI.SignStyleEditor.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-editor", + baseCls: (conf.baseCls || "") + " bi-sign-style-editor", + text: "", hgap: 4, vgap: 2, lgap: 0, @@ -5390,7 +6358,7 @@ BI.SignEditor = BI.inherit(BI.Single, { validationChecker: BI.emptyFn, quitChecker: BI.emptyFn, mouseOut: false, - allowBlank: true, + allowBlank: false, watermark: "", errorText: "", height: 30 @@ -5398,7 +6366,7 @@ BI.SignEditor = BI.inherit(BI.Single, { }, _init: function () { - BI.SignEditor.superclass._init.apply(this, arguments); + BI.SignStyleEditor.superclass._init.apply(this, arguments); var self = this, o = this.options; this.editor = BI.createWidget({ type: "bi.editor", @@ -5419,7 +6387,7 @@ BI.SignEditor = BI.inherit(BI.Single, { }); this.text = BI.createWidget({ type: "bi.text_button", - cls: "sign-editor-text", + cls: "sign-style-editor-text", textAlign: "left", height: o.height, hgap: 4, @@ -5429,73 +6397,90 @@ BI.SignEditor = BI.inherit(BI.Single, { self.editor.selectAll(); } }); + + this.tipText = BI.createWidget({ + type: "bi.text_button", + cls: "sign-style-editor-tip", + textAlign: "right", + rgap: 4, + height: o.height, + text: o.text, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { BI.nextTick(function () { - self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL) + self.fireEvent(BI.SignStyleEditor.EVENT_CLICK_LABEL) }); }); - BI.createWidget({ - type: "bi.absolute", + + this.tipText.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SignStyleEditor.EVENT_CLICK_LABEL) + }); + }); + + this.wrap = BI.createWidget({ + type: "bi.htape", element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] + items: [this.text, this.tipText] }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); }); this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_FOCUS); }); this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_BLUR); }); this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_CLICK); }); this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_CHANGE); }); this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_KEY_DOWN); }); this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_VALID); }); this.editor.on(BI.Editor.EVENT_CONFIRM, function () { self._showHint(); self._checkText(); - self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments); + self._resizeLayout(); + self.fireEvent(BI.SignStyleEditor.EVENT_CONFIRM); }); this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SignEditor.EVENT_START, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_START); }); this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_PAUSE); }); this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SignEditor.EVENT_STOP, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_STOP); }); this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_SPACE); }); this.editor.on(BI.Editor.EVENT_ERROR, function () { - self._checkText(); - self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_ERROR); }); this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_ENTER); }); this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_RESTRICT); }); this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_EMPTY); }); BI.createWidget({ type: "bi.vertical", @@ -5504,30 +6489,43 @@ BI.SignEditor = BI.inherit(BI.Single, { items: [this.editor] }); this._showHint(); - self._checkText(); + this._checkText(); + + BI.nextTick(function () { + var tipTextSize = self.text.element.getStyle("font-size"); + self.tipTextSize = tipTextSize.substring(0, tipTextSize.length - 2); + self._resizeLayout(); + }); }, _checkText: function () { var o = this.options; - BI.nextTick(BI.bind(function () { - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.text.element.removeClass("bi-water-mark"); - } - }, this)); + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.tipText.setValue("(" + o.text + ")"); + this.text.element.removeClass("bi-water-mark"); + } + this.setTitle(this.text.getValue() + this.tipText.getValue()); }, _showInput: function () { - this.editor.visible(); - this.text.invisible(); + this.editor.setVisible(true); + this.text.setVisible(false); + this.tipText.setVisible(false); }, _showHint: function () { - this.editor.invisible(); - this.text.visible(); + this.editor.setVisible(false); + this.text.setVisible(true); + this.tipText.setVisible(true); + }, + + _resizeLayout: function () { + this.wrap.attr("items")[0].width = BI.DOM.getTextSizeWidth(this.text.getValue(), this.tipTextSize) + 2 * this.constants.tipTextGap; + this.wrap.resize(); }, focus: function () { @@ -5541,37 +6539,10 @@ BI.SignEditor = BI.inherit(BI.Single, { this._checkText(); }, - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - isValid: function () { return this.editor.isValid(); }, - setValid: function(v){ - BI.SignEditor.superclass.setValid.apply(this, arguments); - this.editor.setValid(v); - }, - setErrorText: function (text) { this.editor.setErrorText(text); }, @@ -5580,17 +6551,11 @@ BI.SignEditor = BI.inherit(BI.Single, { return this.editor.getErrorText(); }, - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - setValue: function (k) { + BI.SignStyleEditor.superclass.setValue.apply(this, arguments); this.editor.setValue(k); this._checkText(); + this._resizeLayout(); }, getValue: function () { @@ -5598,33 +6563,36 @@ BI.SignEditor = BI.inherit(BI.Single, { }, getState: function () { - return this.text.getValue(); + return this.options.text; }, setState: function (v) { + var o = this.options; + o.text = v; this._showHint(); - this.text.setValue(v); + this.tipText.setValue("(" + v + ")"); + this._checkText(); } }); -BI.SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignEditor.EVENT_START = "EVENT_START"; -BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.sign_editor", BI.SignEditor);/** +BI.SignStyleEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignStyleEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignStyleEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignStyleEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignStyleEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignStyleEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SignStyleEditor.EVENT_START = "EVENT_START"; +BI.SignStyleEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignStyleEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignStyleEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignStyleEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignStyleEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignStyleEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignStyleEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignStyleEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignStyleEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.sign_style_editor", BI.SignStyleEditor);/** * guy * 记录状态的输入框 * @class BI.StateEditor @@ -6165,6 +7133,194 @@ BI.SimpleStateEditor.EVENT_SPACE = "EVENT_SPACE"; BI.SimpleStateEditor.EVENT_EMPTY = "EVENT_EMPTY"; $.shortcut("bi.simple_state_editor", BI.SimpleStateEditor);/** + * guy + * @class BI.TextEditor + * @extends BI.Single + */ +BI.TextEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + extraCls: "bi-text-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: false, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.TextEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (BI.isNumber(o.height)) { + this.element.css({height: o.height - 2}); + } + if (BI.isNumber(o.width)) { + this.element.css({width: o.width - 2}); + } + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height - 2, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + mouseOut: o.mouseOut, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.TextEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.TextEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.TextEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.TextEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_SPACE); + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_BACKSPACE); + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.TextEditor.EVENT_VALID); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.TextEditor.EVENT_CONFIRM); + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_REMOVE); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.TextEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.TextEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.TextEditor.EVENT_STOP); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.TextEditor.EVENT_ERROR); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.TextEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.TextEditor.EVENT_RESTRICT); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.TextEditor.EVENT_EMPTY); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setValue: function (v) { + this.editor.setValue(v); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + setEnable: function (b) { + BI.Editor.superclass.setEnable.apply(this, arguments); + this.editor && this.editor.setEnable(b); + } +}); +BI.TextEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TextEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.TextEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.TextEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.TextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.TextEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.TextEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; + +BI.TextEditor.EVENT_START = "EVENT_START"; +BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.TextEditor.EVENT_STOP = "EVENT_STOP"; +BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.TextEditor.EVENT_VALID = "EVENT_VALID"; +BI.TextEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.TextEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.text_editor", BI.TextEditor);/** + * 小号搜索框 + * Created by GUY on 2015/9/29. + * @class BI.SmallTextEditor + * @extends BI.SearchEditor + */ +BI.SmallTextEditor = BI.inherit(BI.TextEditor, { + _defaultConfig: function () { + var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-small-text-editor", + height: 25 + }); + }, + + _init: function () { + BI.SmallTextEditor.superclass._init.apply(this, arguments); + } +}); +$.shortcut("bi.small_text_editor", BI.SmallTextEditor);/** * 有确定取消按钮的弹出层 * @class BI.BarFloatSection * @extends BI.FloatSection diff --git a/bi/widget.css b/bi/widget.css index e8ed9dbd0c..300750cb60 100644 --- a/bi/widget.css +++ b/bi/widget.css @@ -58,12 +58,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-icon-combo.bi-combo-popup .bi-icon-combo-trigger .b-font:before { - color: #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-adapt-editor .adapt-editor-text { font-size: 14px; } @@ -130,131 +124,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-loading-main-background { - background-color: #ffffff; - opacity: 0.7; - filter: alpha(opacity=70); -} -.bi-loading-mask-content .loading-bar-label { - font-size: 20px; - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-line-segment-button.active .line-segment-button-line { - background: #009de3; -} -.bi-line-segment-button.disabled, -.bi-line-segment-button.disabled:hover, -.bi-line-segment-button.disabled:active { - color: #1a1a1a; - background: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-line-segment { - border-bottom: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-helper { - background-color: #009de3; - font-size: 13px; - color: #ffffff; - cursor: url('cursor/cursor_drag_hand.cur'), auto; - opacity: 0.7; -} -.bi-helper.dragging-modify { - background: none; -} -.bi-helper.dragging-modify .helper-warning { - color: #1a1a1a; - border: 1px solid #e85050; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar-bar { - background: #eaeaea; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar .progress-bar-label { - font-weight: bold; - font-family: "微软雅黑"; - color: #009de3; -} -.bi-progress-bar .progress-bar-label.success { - color: #0c6d23; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar-processor { - background: #009de3; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; -} -.bi-progress-bar-processor.success { - background: #58cc7d; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-chooser-popup .color-chooser-popup-title { - background: #f4f4f4; - border-bottom: 1px solid #d4dadd; -} -.bi-color-chooser-popup .color-chooser-popup-more { - background: #f4f4f4; -} -.bi-color-chooser-popup .color-chooser-popup-more:hover { - background: #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-chooser-trigger { - background: #ffffff; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - box-shadow: 0px 0px 2px 1px #d4dadd inset; - -webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset; - -moz-box-shadow: 0px 0px 2px 1px #d4dadd inset; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-copy2group-add-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fff5c1; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.copy2_group_search_pane { - background: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-date-picker { background: #f4f4f4; } @@ -305,19 +174,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sheet-tab-dynamic-button { - background: #eaeaea; - border-top: 1px solid #d4dadd; -} -.bi-sheet-tab-dynamic-button .bi-icon-button-scroll { - border: 1px solid #eaeaea; -} -.bi-sheet-tab-dynamic-button .bi-icon-button-scroll:hover { - border-color: #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ @@ -369,56 +225,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-item { - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-filter-item .filter-item-empty-item { - border-top: 1px solid #d4dadd; -} -.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf { - border: 1px dashed #178cdf; - background: #58cc7d; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-expander { - min-width: 100%; - border-right: 0px; - border-bottom: 0px; -} -.bi-filter-expander > .filter-item-empty-item { - border-top: 0px; - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-filter-expander > table { - min-width: 100%; -} -.bi-filter-expander > table > tbody > tr > td.first-element { - width: 20px; - border-right: 1px solid #d4dadd !important; - border-bottom: 1px solid #d4dadd !important; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-pane { - min-width: 100%; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border-top: 1px solid #d4dadd; - border-left: 1px solid #d4dadd; -} -.bi-filter-pane .condition-container { - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-fine-tuning-number-editor { border: 1px solid #d4dadd; -webkit-border-radius: 2px; @@ -435,103 +241,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-search-edit { - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-symbol-group .symbol-button:hover, -.bi-formula-symbol-group .symbol-button.hover, -.bi-formula-symbol-group .symbol-button:active, -.bi-formula-symbol-group .symbol-button.active { - color: #009de3; - background-color: #f4f4f4; - border: 1px solid #d4dadd; -} -.bi-formula-symbol-group .symbol-button { - color: #009de3; - border: 1px solid #ffffff; -} -.symbol-group-column { - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-insert .more-function-button { - color: #009de3; -} -.bi-formula-insert .bi-formula-field-pane { - border-top: 1px solid #d4dadd; - border-left: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-formula-insert .bi-formula-editor { - border-left: 1px solid #d4dadd; - border-top: 1px solid #d4dadd; - border-right: 1px solid #d4dadd; -} -.bi-formula-insert .bi-water-mark { - font-size: 14px; -} -.bi-formula-insert .proxy_div { - font-size: 13px; - background-color: #009de3; - color: #ffffff; - opacity: 0.7; - cursor: pointer; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-button-text-tree-item:hover, -.bi-button-text-tree-item.hover { - background-color: #f4f4f4; -} -.bi-button-text-tree-item.active { - color: #009de3; - background-color: #f4f4f4; -} -.bi-button-text-tree-item.disabled, -.bi-button-text-tree-item.disabled:hover, -.bi-button-text-tree-item.disabled:active { - background-color: #ffffff; -} -.bi-button-text-tree-item .formula-function-insert-button { - color: #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-function-pane .style-inner { - border-left: 1px solid #d4dadd; - border-top: 1px solid #d4dadd; -} -.bi-formula-function-pane .style-top { - border-top: 1px solid #d4dadd; -} -.bi-formula-function-pane .style-left { - border-left: 1px solid #d4dadd; -} -.bi-formula-function-pane { - background-color: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-field-tree { - background-color: #f4f4f4; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-function-tree { - background-color: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-image-button-href .image-button-href-icon-button { z-index: 1; font-size: 16px; @@ -575,114 +284,17 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-list-label { - font-size: 14px; -} -.bi-list-label .list-label-button:hover { - color: #e85050; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-month-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-move2group-add-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fff5c1; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.move2_group_search_pane { - background: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-combo { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-daycard .bi-multidate-inner-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-monthcard .bi-multidate-inner-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-popup .bi-multidate-popup-label { - color: #009de3; - font-size: 14px; - border-left: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; - border-top: 1px solid #eaeaea; -} -.bi-multidate-popup .bi-multidate-popup-tab { - border-bottom: 1px solid #eaeaea; -} -.bi-multidate-popup .bi-multidate-popup-item:active, -.bi-multidate-popup .bi-multidate-popup-item.active { - background-color: #009de3; - color: #ffffff; - -webkit-border-radius: 2px 2px 0 0; - -moz-border-radius: 2px 2px 0 0; - border-radius: 2px 2px 0 0; -} -.bi-multidate-popup .bi-multidate-popup-button { - color: #009de3; - font-size: 14px; - border-top: 1px solid #eaeaea; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-quartercard .bi-multidate-inner-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-segment .bi-multidate-normal-label { - color: #1a1a1a; -} -.bi-multidate-segment .bi-multidate-editor { - font-size: 14px; -} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-weekcard .bi-multidate-inner-label { - color: #808080; -} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-yearcard .bi-multidate-inner-label { - color: #808080; +.bi-month-trigger { + border: 1px solid #d4dadd; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; } /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ @@ -936,69 +548,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-date-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-date-interval-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param0-date-item .param-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param1-date-item .param-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param2-date-item .param-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-month-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-season-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-path-chooser .path-chooser-radio { z-index: 1; } @@ -1083,247 +632,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-search-result-pane .search-result-line { - border-top: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-searcher { - font-size: 13px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-search-segment .search-segment-field-table > .first-element { - -webkit-border-radius: 3px 0px 0px 3px; - -moz-border-radius: 3px 0px 0px 3px; - border-radius: 3px 0px 0px 3px; -} -.bi-select-data-search-segment .search-segment-field-table > .last-element { - -webkit-border-radius: 0px 3 3px 0px; - -moz-border-radius: 0px 3 3px 0px; - border-radius: 0px 3 3px 0px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level0-node .select-data-selected-count-label { - color: #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level1-node .select-data-selected-count-label { - color: #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level0-item .select-data-level0-item-button { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.bi-select-data-level0-item .select-data-level0-item-button:hover, -.bi-select-data-level0-item .select-data-level0-item-button.hover { - color: #009de3; - background-color: #f4f4f4; -} -.bi-select-data-level0-item .select-data-level0-item-button:active, -.bi-select-data-level0-item .select-data-level0-item-button.active { - color: #ffffff; - background-color: #009de3; -} -.bi-select-data-level0-item .select-data-level0-item-button:active .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.active .bi-high-light { - color: #ffffff; -} -.bi-select-data-level0-item .select-data-level0-item-button.disabled, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:hover, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:active { - color: #c4c6c6 !important; - background-color: #ffffff !important; -} -.bi-select-data-level0-item .select-data-level0-item-button.disabled .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:hover .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:active .bi-high-light { - color: #c4c6c6 !important; -} -.bi-select-data-level0-item .select-data-top-line, -.bi-select-data-level0-item .select-data-bottom-line { - background-color: #009de3; -} -.bi-select-data-level0-item.select-data-item-top .select-data-level0-item-button { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.bi-select-data-level0-item.select-data-item-bottom .select-data-level0-item-button { - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level1-item .select-data-level1-item-button { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.bi-select-data-level1-item .select-data-level1-item-button:hover, -.bi-select-data-level1-item .select-data-level1-item-button.hover { - color: #009de3; - background-color: #f4f4f4; -} -.bi-select-data-level1-item .select-data-level1-item-button:active, -.bi-select-data-level1-item .select-data-level1-item-button.active { - color: #ffffff; - background-color: #009de3; -} -.bi-select-data-level1-item .select-data-level1-item-button:active .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.active .bi-high-light { - color: #ffffff; -} -.bi-select-data-level1-item .select-data-level1-item-button.disabled, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:hover, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:active { - color: #c4c6c6 !important; - background-color: #ffffff !important; -} -.bi-select-data-level1-item .select-data-level1-item-button.disabled .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:hover .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:active .bi-high-light { - color: #c4c6c6 !important; -} -.bi-select-data-level1-item .select-data-top-line, -.bi-select-data-level1-item .select-data-bottom-line { - background-color: #009de3; -} -.bi-select-data-level1-item.select-data-item-top .select-data-level1-item-button { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.bi-select-data-level1-item.select-data-item-bottom .select-data-level1-item-button { - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-database-table { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; - background: #ffffff; -} -.bi-database-table.active { - background: #009de3; - color: #ffffff; -} -.bi-database-table .table-name-text { - max-width: 300px; -} -.bi-database-table .table-font { - font-size: 16px; -} -.bi-database-table .table-conn-label1 { - background-color: #009de3; -} -.bi-database-table .table-conn-label2 { - background-color: #4fc1e9; -} -.bi-database-table .table-conn-label3 { - background-color: #48cfad; -} -.bi-database-table .table-conn-label4 { - background-color: #57cb7c; -} -.bi-database-table .table-conn-label5 { - background-color: #a0d468; -} -.bi-database-table .table-conn-label6 { - background-color: #fbaf4f; -} -.bi-database-table .table-conn-label7 { - background-color: #fc6e51; -} -.bi-database-table .table-conn-label8 { - background-color: #ed5565; -} -.bi-database-table .table-conn-label9 { - background-color: #ac92ec; -} -.bi-database-table .table-conn-label10 { - background-color: #5d9cec; -} -.bi-database-table.table-selected1.active { - background-color: #009de3; -} -.bi-database-table.table-selected2.active { - background-color: #4fc1e9; -} -.bi-database-table.table-selected3.active { - background-color: #48cfad; -} -.bi-database-table.table-selected4.active { - background-color: #57cb7c; -} -.bi-database-table.table-selected5.active { - background-color: #a0d468; -} -.bi-database-table.table-selected6.active { - background-color: #fbaf4f; -} -.bi-database-table.table-selected7.active { - background-color: #fc6e51; -} -.bi-database-table.table-selected8.active { - background-color: #ed5565; -} -.bi-database-table.table-selected9.active { - background-color: #ac92ec; -} -.bi-database-table.table-selected10.active { - background-color: #5d9cec; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-selecttree-combo .selecttree-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-sequence-table-dynamic-number .sequence-table-title-cell { overflow: hidden; overflow-x: hidden; @@ -1417,42 +725,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-single-slider .slider-editor-button .sign-editor-text:hover { - border: 1px solid #d4dadd; -} -.bi-single-slider .slider-editor-button .bi-editor { - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-single-slider-slider { - cursor: url('cursor/cursor_left_right.cur'), auto; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-slider-track .background-track { - background-color: #f4f4f4; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px; -} -.bi-slider-track .gray-track { - background: #cccccc; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.bi-slider-track .blue-track { - background: #009de3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-singletree-combo .singletree-trigger { border: 1px solid #d4dadd; -webkit-border-radius: 2px; @@ -1465,88 +737,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sortable-table .sortable_table_drag_clone { - background: #d8f2fd; - top: 0px; - opacity: 0.5; -} -.bi-sortable-table .drag-header { - cursor: move; -} -.bi-sortable-table .insert-help-line { - border-right: 3px dashed #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-area .text-area-editor-text-button-label { - font-size: 16px; - color: #c4c6c6; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-toolbar-align-chooser .align-chooser-button:hover { - background-color: #c4c6c6; -} -.bi-text-toolbar-align-chooser .align-chooser-button.active { - background-color: #c4c6c6; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-toolbar { - background: #eaeaea; -} -.bi-text-toolbar .text-toolbar-button { - font-size: 16px; -} -.bi-text-toolbar .text-toolbar-size-chooser-trigger { - background: #ffffff; - font-size: 12px; -} -.bi-text-toolbar .text-toolbar-size-chooser-trigger a { - font-size: 12px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param-time-interval.time-error .bi-input { - color: #e85050; -} -.bi-param-time-interval.time-error .sign-editor-text { - color: #e85050; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-time-setting-day .operator-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-time-setting-hour .operator-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-tree-label { - font-size: 14px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-web-page .web-page-button { z-index: 1; font-size: 14px; diff --git a/bi/widget.js b/bi/widget.js index 0c5e9fa51d..2d9d4e0418 100644 --- a/bi/widget.js +++ b/bi/widget.js @@ -3870,2156 +3870,1240 @@ BI.extend(BI.Arrangement, { } }); $.shortcut('bi.arrangement', BI.Arrangement);/** - * 根据内容自适应长度的输入框 - * @class BI.AdaptiveEditor - * @extends BI.Single + * 表关联树 + * + * Created by GUY on 2015/12/15. + * @class BI.BranchRelation + * @extends BI.Widget */ -BI.AdaptiveEditor = BI.inherit(BI.Single, { +BI.BranchRelation = BI.inherit(BI.Widget, { + _defaultConfig: function () { - var conf = BI.AdaptiveEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-adapt-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: true, - watermark: "", - errorText: "", - height: 30 + return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-branch-relation-tree", + items: [], + + centerOffset: 0,//重心偏移量 + direction: BI.Direction.Bottom, + align: BI.VerticalAlign.Top }) }, _init: function () { - BI.AdaptiveEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.sign_editor", - element: this, - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - mouseOut: o.mouseOut, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_FOCUS); - }); - this.editor.on(BI.SignEditor.EVENT_BLUR, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_BLUR); - }); - this.editor.on(BI.SignEditor.EVENT_CLICK, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_CLICK); - }); - this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { - self._checkEditorLength(); - self.fireEvent(BI.AdaptiveEditor.EVENT_CHANGE); - }); - this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.AdaptiveEditor.EVENT_KEY_DOWN); - }); + BI.BranchRelation.superclass._init.apply(this, arguments); + this.populate(this.options.items); + }, - this.editor.on(BI.SignEditor.EVENT_VALID, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_VALID); - }); - this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.SignEditor.EVENT_START, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_START); - }); - this.editor.on(BI.SignEditor.EVENT_PAUSE, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_STOP); - }); - this.editor.on(BI.SignEditor.EVENT_SPACE, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_SPACE); - }); - this.editor.on(BI.SignEditor.EVENT_ERROR, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_ERROR); - }); - this.editor.on(BI.SignEditor.EVENT_ENTER, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_ENTER); - }); - this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_RESTRICT); - }); - this.editor.on(BI.SignEditor.EVENT_EMPTY, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_EMPTY); + //树分层 + _stratification: function () { + var levels = []; + this.tree.recursion(function (node, route) { + //node.isRoot = route.length <= 1; + node.leaf = node.isLeaf(); + if (!levels[route.length - 1]) { + levels[route.length - 1] = []; + } + levels[route.length - 1].push(node); }); - this._checkEditorLength(); + return levels; }, - _checkEditorLength: function () { - var o = this.options; - this.element.width(BI.DOM.getTextSizeWidth(this.getValue(), 14) + 2 * o.hgap + o.lgap + o.rgap); - }, + //计算所有节点的叶子结点个数 + _calculateLeaves: function () { + var count = 0; - focus: function () { - this.editor.focus(); - }, + function track(node) { + var c = 0; + if (node.isLeaf()) { + return 1; + } + BI.each(node.getChildren(), function (i, child) { + c += track(child); + }); + node.set("leaves", c); + return c; + } - blur: function () { - this.editor.blur(); + count = track(this.tree.getRoot()); + return count; }, - isValid: function () { - return this.editor.isValid(); + //树平移 + _translate: function (levels) { + var adjust = []; + var maxLevel = levels.length; + BI.each(levels, function (i, nodes) { + if (!adjust[i]) { + adjust[i] = []; + } + BI.each(nodes, function (j, node) { + if (node.isLeaf() && i < maxLevel - 1) { + var newNode = new BI.Node(BI.UUID()); + //newNode.isEmptyRoot = node.isRoot || node.isEmptyRoot; + newNode.isNew = true; + //把node向下一层移 + var tar = 0; + if (j > 0) { + var c = nodes[j - 1].getLastChild(); + tar = levels[i + 1].indexOf(c) + 1; + } + levels[i + 1].splice(tar, 0, node); + //新增一个临时树节点 + var index = node.parent.getChildIndex(node.id); + node.parent.removeChildByIndex(index); + node.parent.addChild(newNode, index); + newNode.addChild(node); + adjust[i].push(newNode); + nodes[j] = newNode; + } else { + adjust[i].push(node); + } + }) + }); + return adjust; }, - setErrorText: function (text) { - this.editor.setErrorText(text); + //树补白 + _fill: function (levels) { + var adjust = []; + var maxLevel = levels.length; + BI.each(levels, function (i, nodes) { + if (!adjust[i]) { + adjust[i] = []; + } + BI.each(nodes, function (j, node) { + if (node.isLeaf() && i < maxLevel - 1) { + var newNode = new BI.Node(BI.UUID()); + newNode.leaf = true; + newNode.width = node.width; + newNode.height = node.height; + newNode.isNew = true; + //把node向下一层移 + var tar = 0; + if (j > 0) { + var c = nodes[j - 1].getLastChild(); + tar = levels[i + 1].indexOf(c) + 1; + } + levels[i + 1].splice(tar, 0, newNode); + //新增一个临时树节点 + node.addChild(newNode); + } + adjust[i].push(node); + }) + }); + return adjust; }, - getErrorText: function () { - return this.editor.getErrorText(); + //树调整 + _adjust: function (adjust) { + while (true) { + var isAllNeedAjust = false; + BI.backEach(adjust, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (!node.isNew) { + var needAdjust = true; + BI.any(node.getChildren(), function (k, n) { + if (!n.isNew) { + needAdjust = false; + return true; + } + }); + if (!node.isLeaf() && needAdjust === true) { + var allChilds = []; + BI.each(node.getChildren(), function (k, n) { + allChilds = allChilds.concat(n.getChildren()); + }); + node.removeAllChilds(); + BI.each(allChilds, function (k, c) { + node.addChild(c); + }); + var newNode = new BI.Node(BI.UUID()); + //newNode.isEmptyRoot = node.isRoot || node.isEmptyRoot; + newNode.isNew = true; + var index = node.parent.getChildIndex(node.id); + node.parent.removeChildByIndex(index); + node.parent.addChild(newNode, index); + newNode.addChild(node); + isAllNeedAjust = true; + } + } + }) + }); + if (isAllNeedAjust === false) { + break; + } else {//树重构 + adjust = this._stratification(); + } + } + return adjust; }, - setValue: function (k) { - this.editor.setValue(k); - this._checkEditorLength(); - }, + _calculateWidth: function () { + var o = this.options; + var width = 0; - getValue: function () { - return this.editor.getValue(); + function track1(node) { + var w = 0; + if (node.isLeaf()) { + return node.width; + } + BI.each(node.getChildren(), function (i, child) { + w += track1(child); + }); + return w; + } + + function track2(node) { + var w = 0; + if (node.isLeaf()) { + return node.height; + } + BI.each(node.getChildren(), function (i, child) { + w += track2(child); + }); + return w; + } + + if (this._isVertical()) { + width = track1(this.tree.getRoot()); + } else { + width = track2(this.tree.getRoot()); + } + + return width; }, - getState: function () { - return this.editor.getState(); + _isVertical: function () { + var o = this.options; + return o.direction === BI.Direction.Top || o.direction === BI.Direction.Bottom; }, - setState: function (v) { + _calculateHeight: function () { + var o = this.options; + var height = 0; - } -}); -BI.AdaptiveEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.AdaptiveEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.AdaptiveEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.AdaptiveEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.AdaptiveEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.AdaptiveEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.AdaptiveEditor.EVENT_START = "EVENT_START"; -BI.AdaptiveEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.AdaptiveEditor.EVENT_STOP = "EVENT_STOP"; -BI.AdaptiveEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.AdaptiveEditor.EVENT_VALID = "EVENT_VALID"; -BI.AdaptiveEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.AdaptiveEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.AdaptiveEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.AdaptiveEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.AdaptiveEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.adapt_editor", BI.AdaptiveEditor);/** - * 有清楚按钮的文本框 - * Created by GUY on 2015/9/29. - * @class BI.SmallTextEditor - * @extends BI.SearchEditor - */ -BI.ClearEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-clear-editor", - height: 30, - errorText: "", - watermark: "", - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn - }); - }, - _init: function () { - BI.ClearEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - watermark: o.watermark, - allowBlank: true, - errorText: o.errorText, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker - }); - this.clear = BI.createWidget({ - type: "bi.icon_button", - stopEvent: true, - cls: "search-close-h-font" - }); - this.clear.on(BI.IconButton.EVENT_CHANGE, function () { - self.setValue(""); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); - self.fireEvent(BI.ClearEditor.EVENT_CLEAR); - }); - BI.createWidget({ - element: this, - type: "bi.htape", - items: [ - { - el: this.editor - }, - { - el: this.clear, - width: 25 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.ClearEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.ClearEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.ClearEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self._checkClear(); - self.fireEvent(BI.ClearEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.ClearEditor.EVENT_SPACE) - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE) - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.ClearEditor.EVENT_VALID) - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.ClearEditor.EVENT_ERROR) - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.ClearEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.ClearEditor.EVENT_RESTRICT) - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self._checkClear(); - self.fireEvent(BI.ClearEditor.EVENT_EMPTY) - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - self.fireEvent(BI.ClearEditor.EVENT_REMOVE) - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.ClearEditor.EVENT_CONFIRM) - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.ClearEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.ClearEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.ClearEditor.EVENT_STOP); - }); - - this.clear.invisible(); - }, - - _checkClear: function () { - if (!this.getValue()) { - this.clear.invisible(); - } else { - this.clear.visible(); + function track1(node) { + var h = 0; + BI.each(node.getChildren(), function (i, child) { + h = Math.max(h, track1(child)); + }); + return h + (node.height || 0); } - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - }, - getValue: function () { - if (this.isValid()) { - var res = this.editor.getValue().match(/[\S]+/g); - return BI.isNull(res) ? "" : res[res.length - 1]; + function track2(node) { + var h = 0; + BI.each(node.getChildren(), function (i, child) { + h = Math.max(h, track2(child)); + }); + return h + (node.width || 0); } - }, - setValue: function (v) { - this.editor.setValue(v); - if (BI.isKey(v)) { - this.clear.visible(); + if (this._isVertical()) { + height = track1(this.tree.getRoot()); + } else { + height = track2(this.tree.getRoot()); } + return height; }, - isValid: function () { - return this.editor.isValid(); - } -}); -BI.ClearEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.ClearEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.ClearEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.ClearEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.ClearEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.ClearEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.ClearEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; -BI.ClearEditor.EVENT_CLEAR = "EVENT_CLEAR"; - -BI.ClearEditor.EVENT_START = "EVENT_START"; -BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.ClearEditor.EVENT_STOP = "EVENT_STOP"; -BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.ClearEditor.EVENT_VALID = "EVENT_VALID"; -BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; -$.shortcut("bi.clear_editor", BI.ClearEditor);/** - * Created by roy on 15/9/14. - */ -BI.SearchEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-search-editor", - height: 30, - errorText: "", - watermark: BI.i18nText("BI-Basic_Search"), - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn + _calculateXY: function (levels) { + var o = this.options; + var width = this._calculateWidth(); + var height = this._calculateHeight(); + var levelCount = levels.length; + var allLeavesCount = this._calculateLeaves(); + //计算坐标 + var xy = {}; + var levelHeight = height / levelCount; + BI.each(levels, function (i, nodes) { + //计算权重 + var weights = []; + BI.each(nodes, function (j, node) { + weights[j] = (node.get("leaves") || 1) / allLeavesCount; + }); + BI.each(nodes, function (j, node) { + //求前j个元素的权重 + var weight = BI.sum(weights.slice(0, j)); + //求坐标 + var x = weight * width + weights[j] * width / 2; + var y = i * levelHeight + levelHeight / 2; + xy[node.id] = {x: x, y: y}; + }) }); + return xy; }, - _init: function () { - this.options.height -= 2; - BI.SearchEditor.superclass._init.apply(this, arguments); + + _stroke: function (levels, xy) { + var height = this._calculateHeight(); + var levelCount = levels.length; + var levelHeight = height / levelCount; var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - watermark: o.watermark, - allowBlank: true, - errorText: o.errorText, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker - }); - this.clear = BI.createWidget({ - type: "bi.icon_button", - stopEvent: true, - cls: "search-close-h-font" - }); - this.clear.on(BI.IconButton.EVENT_CHANGE, function () { - self.setValue(""); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); - self.fireEvent(BI.SearchEditor.EVENT_CLEAR); - }); - BI.createWidget({ - element: this, - type: "bi.htape", - items: [ - { - el: { - type: "bi.center_adapt", - cls: "search-font", - items: [{ - el: { - type: "bi.icon" + switch (o.direction) { + case BI.Direction.Top: + BI.each(levels, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (node.getChildrenLength() > 0 && !node.leaf) { + var path = ""; + var start = xy[node.id]; + var split = start.y + levelHeight / 2; + path += "M" + start.x + "," + (start.y + o.centerOffset) + "L" + start.x + "," + split; + var end = []; + BI.each(node.getChildren(), function (t, c) { + var e = end[t] = xy[c.id]; + path += "M" + e.x + "," + (e.y + o.centerOffset) + "L" + e.x + "," + split; + }); + if (end.length > 0) { + path += "M" + BI.first(end).x + "," + split + "L" + BI.last(end).x + "," + split; } - }] - }, - width: 25 - }, - { - el: self.editor - }, - { - el: this.clear, - width: 25 - } - ] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SearchEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SearchEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SearchEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self._checkClear(); - self.fireEvent(BI.SearchEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SearchEditor.EVENT_SPACE) - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE) - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SearchEditor.EVENT_VALID) - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.SearchEditor.EVENT_ERROR) - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SearchEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SearchEditor.EVENT_RESTRICT) - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self._checkClear(); - self.fireEvent(BI.SearchEditor.EVENT_EMPTY) - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - self.fireEvent(BI.SearchEditor.EVENT_REMOVE) - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.SearchEditor.EVENT_CONFIRM) - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SearchEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SearchEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SearchEditor.EVENT_STOP); - }); - - this.clear.invisible(); + self.svg.path(path).attr("stroke", "gray"); + } + }) + }); + break; + case BI.Direction.Bottom: + BI.each(levels, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (node.getChildrenLength() > 0 && !node.leaf) { + var path = ""; + var start = xy[node.id]; + var split = start.y - levelHeight / 2; + path += "M" + start.x + "," + (start.y - o.centerOffset) + "L" + start.x + "," + split; + var end = []; + BI.each(node.getChildren(), function (t, c) { + var e = end[t] = xy[c.id]; + path += "M" + e.x + "," + (e.y - o.centerOffset) + "L" + e.x + "," + split; + }); + if (end.length > 0) { + path += "M" + BI.first(end).x + "," + split + "L" + BI.last(end).x + "," + split; + } + self.svg.path(path).attr("stroke", "gray"); + } + }) + }); + break; + case BI.Direction.Left: + BI.each(levels, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (node.getChildrenLength() > 0 && !node.leaf) { + var path = ""; + var start = xy[node.id]; + var split = start.y + levelHeight / 2; + path += "M" + (start.y + o.centerOffset) + "," + start.x + "L" + split + "," + start.x; + var end = []; + BI.each(node.getChildren(), function (t, c) { + var e = end[t] = xy[c.id]; + path += "M" + (e.y + o.centerOffset) + "," + e.x + "L" + split + "," + e.x; + }); + if (end.length > 0) { + path += "M" + split + "," + BI.first(end).x + "L" + split + "," + BI.last(end).x; + } + self.svg.path(path).attr("stroke", "gray"); + } + }) + }); + break; + case BI.Direction.Right: + BI.each(levels, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (node.getChildrenLength() > 0 && !node.leaf) { + var path = ""; + var start = xy[node.id]; + var split = start.y - levelHeight / 2; + path += "M" + (start.y - o.centerOffset) + "," + start.x + "L" + split + "," + start.x; + var end = []; + BI.each(node.getChildren(), function (t, c) { + var e = end[t] = xy[c.id]; + path += "M" + (e.y - o.centerOffset) + "," + e.x + "L" + split + "," + e.x; + }); + if (end.length > 0) { + path += "M" + split + "," + BI.first(end).x + "L" + split + "," + BI.last(end).x; + } + self.svg.path(path).attr("stroke", "gray"); + } + }) + }); + break; + } }, - _checkClear: function () { - if (!this.getValue()) { - this.clear.invisible(); - } else { - this.clear.visible(); + _createBranches: function (levels) { + var self = this, o = this.options; + if (o.direction === BI.Direction.Bottom || o.direction === BI.Direction.Right) { + levels = levels.reverse(); } + var xy = this._calculateXY(levels); + //画图 + this._stroke(levels, xy); }, - focus: function () { - this.editor.focus(); + _isNeedAdjust: function () { + var o = this.options; + return o.direction === BI.Direction.Top && o.align === BI.VerticalAlign.Bottom || o.direction === BI.Direction.Bottom && o.align === BI.VerticalAlign.Top + || o.direction === BI.Direction.Left && o.align === BI.HorizontalAlign.Right || o.direction === BI.Direction.Right && o.align === BI.HorizontalAlign.Left }, - blur: function () { - this.editor.blur(); + setValue: function (value) { + }, getValue: function () { - if (this.isValid()) { - var res = this.editor.getValue().match(/[\S]+/g); - return BI.isNull(res) ? "" : res[res.length - 1]; - } - }, - getLastValidValue: function () { - return this.editor.getLastValidValue(); }, - setValue: function (v) { - this.editor.setValue(v); - if (BI.isKey(v)) { - this.clear.visible(); + _transformToTreeFormat: function (sNodes) { + var i, l; + if (!sNodes) { + return []; } - }, - - setValid: function (b) { - this.editor.setValid(b); - }, - isEditing: function () { - return this.editor.isEditing(); + if (BI.isArray(sNodes)) { + var r = []; + var tmpMap = []; + for (i = 0, l = sNodes.length; i < l; i++) { + tmpMap[sNodes[i].id] = sNodes[i]; + } + for (i = 0, l = sNodes.length; i < l; i++) { + if (tmpMap[sNodes[i].pId] && sNodes[i].id != sNodes[i].pId) { + if (!tmpMap[sNodes[i].pId].children) { + tmpMap[sNodes[i].pId].children = []; + } + tmpMap[sNodes[i].pId].children.push(sNodes[i]); + } else { + r.push(sNodes[i]); + } + } + return r; + } else { + return [sNodes]; + } }, - isValid: function () { - return this.editor.isValid(); - }, + populate: function (items) { + var self = this, o = this.options; + o.items = items || []; + this.empty(); + items = this._transformToTreeFormat(o.items); + this.tree = new BI.Tree(); + this.tree.initTree(items); - setEnable: function (b) { - BI.Editor.superclass.setEnable.apply(this, arguments); - this.editor && this.editor.setEnable(b); - this.clear.setEnabled(b); - } -}); -BI.SearchEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SearchEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SearchEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SearchEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SearchEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SearchEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SearchEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; -BI.SearchEditor.EVENT_CLEAR = "EVENT_CLEAR"; - -BI.SearchEditor.EVENT_START = "EVENT_START"; -BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SearchEditor.EVENT_STOP = "EVENT_STOP"; -BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SearchEditor.EVENT_VALID = "EVENT_VALID"; -BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY"; -$.shortcut("bi.search_editor", BI.SearchEditor);/** - * 小号搜索框 - * Created by GUY on 2015/9/29. - * @class BI.SmallSearchEditor - * @extends BI.SearchEditor - */ -BI.SmallSearchEditor = BI.inherit(BI.SearchEditor, { - _defaultConfig: function () { - var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-small-search-editor", - height: 24 + this.svg = BI.createWidget({ + type: "bi.svg" }); - }, - _init: function () { - BI.SmallSearchEditor.superclass._init.apply(this, arguments); - } -}); -$.shortcut("bi.small_search_editor", BI.SmallSearchEditor);/** - * sign是新值(初始value值)形式的自适应宽度的输入框 - * @class BI.SignInitialEditor - * @extends BI.Single - */ -BI.SignInitialEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.SignInitialEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-initial-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: true, - watermark: "", - errorText: "", - value: "", - text: "", - height: 30 - }) - }, + //树分层 + var levels = this._stratification(); - _init: function () { - BI.SignInitialEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.sign_editor", - element: this, - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value || o.text, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - mouseOut: o.mouseOut, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - if(BI.isNotNull(o.value)){ - this.setState(o.value); + if (this._isNeedAdjust()) { + //树平移 + var adjust = this._translate(levels); + //树调整 + adjust = this._adjust(adjust); + + this._createBranches(adjust); + } else { + var adjust = this._fill(levels); + + this._createBranches(adjust); } - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS); - }); - this.editor.on(BI.SignEditor.EVENT_BLUR, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_BLUR); - }); - this.editor.on(BI.SignEditor.EVENT_CLICK, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CLICK); - }); - this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE); - }); - this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN); - }); - this.editor.on(BI.SignEditor.EVENT_VALID, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_VALID); - }); - this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { - self.setState(self.editor.getValue()); - self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.SignEditor.EVENT_START, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_START); + var container = BI.createWidget({ + type: "bi.layout", + width: this._isVertical() ? this._calculateWidth() : this._calculateHeight(), + height: this._isVertical() ? this._calculateHeight() : this._calculateWidth() }); - this.editor.on(BI.SignEditor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE); + BI.createWidget({ + type: "bi.absolute", + element: container, + items: [{ + el: this.svg, + top: 0, + left: 0, + right: 0, + bottom: 0 + }] }); - this.editor.on(BI.SignEditor.EVENT_STOP, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_STOP); + if (this._isVertical()) { + items = [{ + type: "bi.handstand_branch_tree", + expander: { + direction: o.direction + }, + el: { + layouts: [{ + type: "bi.horizontal_adapt", + verticalAlign: o.align + }] + }, + items: items + }] + } else { + items = [{ + type: "bi.branch_tree", + expander: { + direction: o.direction + }, + el: { + layouts: [{ + type: "bi.vertical" + }, { + type: o.align === BI.HorizontalAlign.Left ? "bi.left" : "bi.right" + }] + }, + items: items + }] + } + BI.createWidget({ + type: "bi.adaptive", + element: container, + items: items }); - this.editor.on(BI.SignEditor.EVENT_SPACE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_SPACE); + BI.createWidget({ + type: "bi.center_adapt", + scrollable: true, + element: this, + items: [container] }); - this.editor.on(BI.SignEditor.EVENT_ERROR, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_ERROR); + } +}); +BI.BranchRelation.EVENT_CHANGE = "BranchRelation.EVENT_CHANGE"; +$.shortcut("bi.branch_relation", BI.BranchRelation);/** + * 日期控件中的月份下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.MonthDateCombo + * @extends BI.Trigger + */ +BI.MonthDateCombo = BI.inherit(BI.Trigger, { + _defaultConfig: function() { + return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-month-combo", + height: 25 }); - this.editor.on(BI.SignEditor.EVENT_ENTER, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_ENTER); + }, + _init: function() { + BI.MonthDateCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.trigger = BI.createWidget({ + type: "bi.date_triangle_trigger" }); - this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT); + + this.popup = BI.createWidget({ + type: "bi.month_popup" }); - this.editor.on(BI.SignEditor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY); + + this.popup.on(BI.YearPopup.EVENT_CHANGE, function(){ + self.setValue(self.popup.getValue()); + }) + + + this.combo = BI.createWidget({ + type: "bi.combo", + offsetStyle: "center", + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + minWidth: 85, + stopPropagation: false, + el: this.popup + } + }) + this.combo.on(BI.Combo.EVENT_CHANGE, function(){ + self.combo.hideView(); + self.fireEvent(BI.MonthDateCombo.EVENT_CHANGE); }); }, - focus: function () { - this.editor.focus(); + setValue: function(v){ + this.trigger.setValue(v + 1); + this.popup.setValue(v); }, - blur: function () { - this.editor.blur(); + getValue: function(){ + return this.popup.getValue(); + } +}); +BI.MonthDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut('bi.month_date_combo', BI.MonthDateCombo);/** + * 年份下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.YearDateCombo + * @extends BI.Trigger + */ +BI.YearDateCombo = BI.inherit(BI.Trigger, { + _defaultConfig: function() { + return BI.extend( BI.YearDateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-year-combo", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + height: 25 + }); }, + _init: function() { + BI.YearDateCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; - isValid: function () { - return this.editor.isValid(); - }, + this.trigger = BI.createWidget({ + type: "bi.date_triangle_trigger" + }); - setErrorText: function (text) { - this.editor.setErrorText(text); - }, + this.popup = BI.createWidget({ + type: "bi.year_popup", + min: o.min, + max: o.max + }); - getErrorText: function () { - return this.editor.getErrorText(); - }, + this.popup.on(BI.YearPopup.EVENT_CHANGE, function(){ + self.setValue(self.popup.getValue()); + self.combo.hideView(); + self.fireEvent(BI.YearDateCombo.EVENT_CHANGE); + }) - setValue: function (v) { - this.editor.setValue(v.value); - this.setState(v.value); - }, - getValue: function () { - return { - value: this.editor.getValue(), - text: this.options.text - } + this.combo = BI.createWidget({ + type: "bi.combo", + offsetStyle: "center", + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + minWidth: 85, + stopPropagation: false, + el: this.popup + } + }) + this.combo.on(BI.Combo.EVENT_CHANGE, function(){ + self.fireEvent(BI.YearDateCombo.EVENT_CHANGE); + }) }, - getState: function () { - return this.editor.getState(); + setValue: function(v){ + this.trigger.setValue(v); + this.popup.setValue(v); }, - setState: function (v) { - var o = this.options; - v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; - this.editor.setState(v); + getValue: function(){ + return this.popup.getValue(); } }); -BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignInitialEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignInitialEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignInitialEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignInitialEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignInitialEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignInitialEditor.EVENT_START = "EVENT_START"; -BI.SignInitialEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignInitialEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignInitialEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignInitialEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignInitialEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignInitialEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignInitialEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignInitialEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignInitialEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.sign_initial_editor", BI.SignInitialEditor);/** - * sign标签分两段,可以自定义样式 - * @class BI.SignStyleEditor - * @extends BI.Single +BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut('bi.year_date_combo', BI.YearDateCombo);/** + * Created by GUY on 2015/9/7. + * @class BI.DatePicker + * @extends BI.Widget */ -BI.SignStyleEditor = BI.inherit(BI.Single, { - - constants: { - tipTextGap: 4 - }, - +BI.DatePicker = BI.inherit(BI.Widget, { _defaultConfig: function () { - var conf = BI.SignStyleEditor.superclass._defaultConfig.apply(this, arguments); + var conf = BI.DatePicker.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-style-editor", - text: "", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: false, - watermark: "", - errorText: "", - height: 30 + baseCls: "bi-date-picker", + height: 25, + min: '1900-01-01', //最小日期 + max: '2099-12-31' //最大日期 }) }, _init: function () { - BI.SignStyleEditor.superclass._init.apply(this, arguments); + BI.DatePicker.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - mouseOut: o.mouseOut, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "sign-style-editor-text", - textAlign: "left", - height: o.height, - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.selectAll(); - } + this._year = new Date().getFullYear(); + this._month = new Date().getMonth(); + this.left = BI.createWidget({ + type: "bi.icon_button", + cls: "pre-page-h-font", + width: 25, + height: 25 }); - - this.tipText = BI.createWidget({ - type: "bi.text_button", - cls: "sign-style-editor-tip", - textAlign: "right", - rgap: 4, - height: o.height, - text: o.text, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.selectAll(); + this.left.on(BI.IconButton.EVENT_CHANGE, function () { + if (self._month === 0) { + self.setValue({ + year: self.year.getValue() - 1, + month: 11 + }) + } else { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() - 1 + }) } + self.fireEvent(BI.DatePicker.EVENT_CHANGE); }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SignStyleEditor.EVENT_CLICK_LABEL) - }); - }); - - this.tipText.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SignStyleEditor.EVENT_CLICK_LABEL) - }); + this.right = BI.createWidget({ + type: "bi.icon_button", + cls: "next-page-h-font", + width: 25, + height: 25 }); - this.wrap = BI.createWidget({ - type: "bi.htape", - element: this, - items: [this.text, this.tipText] + this.right.on(BI.IconButton.EVENT_CHANGE, function () { + if (self._month === 11) { + self.setValue({ + year: self.year.getValue() + 1, + month: 0 + }) + } else { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + 1 + }) + } + self.fireEvent(BI.DatePicker.EVENT_CHANGE); }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_CLICK); + this.year = BI.createWidget({ + type: "bi.year_date_combo", + min: o.min, + max: o.max }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_CHANGE); + this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + }); + self.fireEvent(BI.DatePicker.EVENT_CHANGE); + }) + this.month = BI.createWidget({ + type: "bi.month_date_combo" }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignStyleEditor.EVENT_KEY_DOWN); + this.month.on(BI.MonthDateCombo.EVENT_CHANGE, function () { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + }); + self.fireEvent(BI.DatePicker.EVENT_CHANGE); }); - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_VALID); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self._checkText(); - self._resizeLayout(); - self.fireEvent(BI.SignStyleEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_STOP); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_SPACE); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_ERROR); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_RESTRICT); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_EMPTY); - }); BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - this._checkText(); - - BI.nextTick(function () { - var tipTextSize = self.text.element.getStyle("font-size"); - self.tipTextSize = tipTextSize.substring(0, tipTextSize.length - 2); - self._resizeLayout(); - }); - }, - - _checkText: function () { - var o = this.options; - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.tipText.setValue("(" + o.text + ")"); - this.text.element.removeClass("bi-water-mark"); - } - this.setTitle(this.text.getValue() + this.tipText.getValue()); - }, - - _showInput: function () { - this.editor.setVisible(true); - this.text.setVisible(false); - this.tipText.setVisible(false); - }, - - _showHint: function () { - this.editor.setVisible(false); - this.text.setVisible(true); - this.tipText.setVisible(true); - }, - - _resizeLayout: function () { - this.wrap.attr("items")[0].width = BI.DOM.getTextSizeWidth(this.text.getValue(), this.tipTextSize) + 2 * this.constants.tipTextGap; - this.wrap.resize(); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - this._checkText(); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); + type: "bi.htape", + element: this.element, + items: [{ + el: this.left, + width: 25 + }, { + type: "bi.center_adapt", + items: [{ + type: "bi.horizontal", + width: 100, + items: [this.year, this.month] + }] + }, { + el: this.right, + width: 25 + }] + }) + this.setValue({ + year: this._year, + month: this._month + }) }, - setValue: function (k) { - BI.SignStyleEditor.superclass.setValue.apply(this, arguments); - this.editor.setValue(k); - this._checkText(); - this._resizeLayout(); + setValue: function (ob) { + this._year = ob.year; + this._month = ob.month; + this.year.setValue(ob.year); + this.month.setValue(ob.month); }, getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.options.text; - }, - - setState: function (v) { - var o = this.options; - o.text = v; - this._showHint(); - this.tipText.setValue("(" + v + ")"); - this._checkText(); + return { + year: this.year.getValue(), + month: this.month.getValue() + } } }); -BI.SignStyleEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignStyleEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignStyleEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignStyleEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignStyleEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignStyleEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignStyleEditor.EVENT_START = "EVENT_START"; -BI.SignStyleEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignStyleEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignStyleEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignStyleEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignStyleEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignStyleEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignStyleEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignStyleEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignStyleEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.sign_style_editor", BI.SignStyleEditor);/** - * guy - * @class BI.TextEditor - * @extends BI.Single +BI.DatePicker.EVENT_CHANGE = "EVENT_CHANGE" +$.shortcut("bi.date_picker", BI.DatePicker);/** + * Created by GUY on 2015/9/7. + * @class BI.DateCalendarPopup + * @extends BI.Widget */ -BI.TextEditor = BI.inherit(BI.Single, { +BI.DateCalendarPopup = BI.inherit(BI.Widget, { _defaultConfig: function () { - var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments); + var conf = BI.DateCalendarPopup.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-text-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: false, - watermark: "", - errorText: "", - height: 30 + baseCls: "bi-date-calendar-popup", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + selectedTime: null }) }, + _createNav: function (v) { + var date = BI.Calendar.getDateJSONByPage(v); + var calendar = BI.createWidget({ + type: "bi.calendar", + logic: { + dynamic: true + }, + min: this.options.min, + max: this.options.max, + year: date.year, + month: date.month, + day: this.selectedTime.day + }); + return calendar; + }, + _init: function () { - BI.TextEditor.superclass._init.apply(this, arguments); + BI.DateCalendarPopup.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (BI.isNumber(o.height)) { - this.element.css({height: o.height - 2}); - } - if (BI.isNumber(o.width)) { - this.element.css({width: o.width - 2}); - } - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height - 2, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - mouseOut: o.mouseOut, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); + this.today = new Date(); + this._year = this.today.getFullYear(); + this._month = this.today.getMonth(); + this._day = this.today.getDate(); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.TextEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.TextEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.TextEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.TextEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_SPACE); - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_BACKSPACE); + this.selectedTime = o.selectedTime || { + year: this._year, + month: this._month, + day: this._day + }; + this.datePicker = BI.createWidget({ + type: "bi.date_picker", + min: o.min, + max: o.max }); + this.calendar = BI.createWidget({ + direction: "top", + element: this.element, + logic: { + dynamic: true + }, + type: "bi.navigation", + tab: this.datePicker, + cardCreator: BI.bind(this._createNav, this), - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.TextEditor.EVENT_VALID); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.TextEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_REMOVE); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.TextEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.TextEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.TextEditor.EVENT_STOP); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.TextEditor.EVENT_ERROR); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.TextEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.TextEditor.EVENT_RESTRICT); + afterCardCreated: function () { + + }, + + afterCardShow: function () { + this.setValue(self.selectedTime); + } }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.TextEditor.EVENT_EMPTY); + + this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () { + self.selectedTime = self.datePicker.getValue(); + self.selectedTime.day = 1; + self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] + + this.calendar.on(BI.Navigation.EVENT_CHANGE, function () { + self.selectedTime = self.calendar.getValue(); + self.setValue(self.selectedTime); + self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); }, - focus: function () { - this.editor.focus(); + setValue: function (timeOb) { + this.datePicker.setValue(timeOb); + this.calendar.setSelect(BI.Calendar.getPageByDateJSON(timeOb)); + this.calendar.setValue(timeOb); + this.selectedTime = timeOb; }, - blur: function () { - this.editor.blur(); + getValue: function () { + return this.selectedTime; + } +}); +BI.DateCalendarPopup.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut("bi.date_calendar_popup", BI.DateCalendarPopup);/** + * 日期控件中的年份或月份trigger + * + * Created by GUY on 2015/9/7. + * @class BI.DateTriangleTrigger + * @extends BI.Trigger + */ +BI.DateTriangleTrigger = BI.inherit(BI.Trigger, { + _const: { + height: 25, + iconWidth: 16, + iconHeight: 13 }, - setErrorText: function (text) { - this.editor.setErrorText(text); + _defaultConfig: function() { + return BI.extend( BI.DateTriangleTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-date-triangle-trigger pull-down-ha-font cursor-pointer", + height: 25 + }); }, + _init: function() { + BI.DateTriangleTrigger.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "right", + text: o.text, + value: o.value, + height: c.height + }) + this.icon = BI.createWidget({ + type: "bi.icon", + width: c.iconWidth, + height: c.iconHeight + }); - getErrorText: function () { - return this.editor.getErrorText(); + BI.createWidget({ + type: "bi.center_adapt", + element: this.element, + items: [{ + type: "bi.center_adapt", + width: 50, + height: c.height, + items: [this.text, this.icon] + }] + }) }, - isValid: function () { - return this.editor.isValid(); + setValue: function(v){ + this.text.setValue(v); }, - setValue: function (v) { - this.editor.setValue(v); + getValue: function(){ + return this.text.getValue(); }, - getValue: function () { - return this.editor.getValue(); + setText: function(v){ + this.text.setText(v); }, - setEnable: function (b) { - BI.Editor.superclass.setEnable.apply(this, arguments); - this.editor && this.editor.setEnable(b); - } -}); -BI.TextEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.TextEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.TextEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.TextEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.TextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.TextEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.TextEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; - -BI.TextEditor.EVENT_START = "EVENT_START"; -BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.TextEditor.EVENT_STOP = "EVENT_STOP"; -BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.TextEditor.EVENT_VALID = "EVENT_VALID"; -BI.TextEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.TextEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.text_editor", BI.TextEditor);/** - * 小号搜索框 - * Created by GUY on 2015/9/29. - * @class BI.SmallTextEditor - * @extends BI.SearchEditor - */ -BI.SmallTextEditor = BI.inherit(BI.TextEditor, { - _defaultConfig: function () { - var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-small-text-editor", - height: 25 - }); + getText: function(){ + return this.item.getText(); }, - _init: function () { - BI.SmallTextEditor.superclass._init.apply(this, arguments); + getKey: function(){ + } }); -$.shortcut("bi.small_text_editor", BI.SmallTextEditor);/** - * @class BI.LoadingCancelMask - * @extend BI.Widget - * 带有取消按钮的正在加载mask +$.shortcut('bi.date_triangle_trigger', BI.DateTriangleTrigger);/** + * 日期下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.DateCombo + * @extends BI.Widget */ -BI.LoadingCancelMask = BI.inherit(BI.Widget, { +BI.DateCombo = BI.inherit(BI.Widget, { _defaultConfig: function () { - return BI.extend(BI.LoadingCancelMask.superclass._defaultConfig.apply(this, arguments), {}) + return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-date-combo", + height: 30 + }); }, - _init: function () { - BI.LoadingCancelMask.superclass._init.apply(this, arguments); + BI.DateCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - var cancelButton = BI.createWidget({ - type: "bi.button", - level: "ignore", - width: 100, - height: 30, - text: BI.i18nText("BI-Basic_Cancel") - }); - cancelButton.on(BI.Button.EVENT_CHANGE, function () { - self.fireEvent(BI.LoadingCancelMask.EVENT_VALUE_CANCEL); - self.destroy(); + + this.trigger = BI.createWidget({ + type: "bi.date_trigger" }); - var mask = BI.Maskers.create(this.getName(), o.masker); - BI.createWidget({ - type: "bi.absolute", - element: mask, - items: [{ - el: { - type: "bi.layout", - cls: "bi-loading-main-background" - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }, { - el: { - type: "bi.center_adapt", - cls: "bi-loading-mask-content", - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.center_adapt", - cls: "loading-bar-icon", - items: [{ - type: "bi.icon", - width: 208, - height: 30 - }] - }, { - type: "bi.label", - cls: "loading-bar-label", - text: o.text, - height: 30 - }, { - type: "bi.center_adapt", - items: [cancelButton] - }], - vgap: 10 - } - }] - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }] - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); - }); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -BI.LoadingCancelMask.EVENT_VALUE_CANCEL = "EVENT_VALUE_CANCEL"; -$.shortcut("bi.loading_cancel_mask", BI.LoadingCancelMask);/** - * @class BI.LoadingBackground - * @extend BI.Widget - * 正在加载mask层 - */ -BI.LoadingBackground = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LoadingBackground.superclass._defaultConfig.apply(this, arguments), { - baseCls: "", - backgroundCls: "loading-background-e50" - }) - }, - - _init: function () { - BI.LoadingBackground.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var mask = BI.Maskers.create(this.getName(), o.masker, {offset: o.offset, container: o.container}); - BI.createWidget({ - type: "bi.center_adapt", - element: mask, - cls: "bi-loading-mask " + o.backgroundCls - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); - }); - }, - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -$.shortcut("bi.loading_background", BI.LoadingBackground);/** - * @class BI.LoadingMask - * @extend BI.Widget - * 正在加载mask层 - */ -BI.LoadingMask = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LoadingMask.superclass._defaultConfig.apply(this, arguments), { - baseCls: "" + this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK, function () { + self.combo.toggle(); }); - }, - _init: function () { - BI.LoadingMask.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var mask = BI.Maskers.create(this.getName(), o.masker, {offset: o.offset, container: o.container}); - BI.createWidget({ - type: "bi.absolute", - element: mask, - items: [{ - el: { - type: "bi.layout", - cls: "bi-loading-main-background" - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }, { - el: { - type: "bi.center_adapt", - cls: "bi-loading-mask-content", - items: [{ - type: "bi.vertical", - items: [{ - type: "bi.center_adapt", - cls: "loading-bar-icon", - items: [{ - type: "bi.icon", - width: 208, - height: 30 - }] - }, { - type: "bi.label", - cls: "loading-bar-label", - text: o.text, - height: 30 - }] - }] - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }] - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); + this.popup = BI.createWidget({ + type: "bi.date_calendar_popup" }); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -$.shortcut("bi.loading_mask", BI.LoadingMask);/** - * 一个button选中的时候下面有条线 - * - * Created by GUY on 2015/9/30. - * @class BI.LineSegmentButton - * @extends BI.BasicButton - */ -BI.LineSegmentButton = BI.inherit(BI.BasicButton, { - - _defaultConfig: function() { - var conf = BI.LineSegmentButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend( conf, { - baseCls : (conf.baseCls ||"")+' bi-line-segment-button bi-list-item-effect', - once: true, - readonly: true, - hgap: 10, - height: 25 - }) - }, - _init:function() { - BI.LineSegmentButton.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - text: o.text, - height: o.height, - value: o.value, - hgap: o.hgap + this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); }); - this.line = BI.createWidget({ - type: "bi.layout", - cls: "line-segment-button-line", - height: 3 - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.line, - left: 0, - right: 0, - bottom: 0 - }] - }) - }, - - setSelected: function(v){ - BI.LineSegmentButton.superclass.setSelected.apply(this, arguments); - }, - - setText : function(text) { - BI.LineSegmentButton.superclass.setText.apply(this, arguments); - this.text.setText(text); - }, - - destroy : function() { - BI.LineSegmentButton.superclass.destroy.apply(this, arguments); - } -}); -$.shortcut('bi.line_segment_button', BI.LineSegmentButton);/** - * 另一套风格的单选按钮组 - * - * Created by GUY on 2015/9/30. - * @class BI.LineSegment - * @extends BI.Widget - */ -BI.LineSegment = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LineSegment.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-line-segment", - items: [], - height: 30 - }); - }, - _init: function () { - BI.LineSegment.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isNumber(o.height)) { - this.element.css({height: o.height - 1, lineHeight: (o.height - 1) + 'px'}); - } - this.buttonGroup = BI.createWidget({ - element: this, - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.line_segment_button", - height: o.height - 1 - }), - layout: [ - { - type: "bi.center" - } - ] - }); - this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments) - }); - this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function () { - self.fireEvent(BI.LineSegment.EVENT_CHANGE) + this.combo = BI.createWidget({ + type: "bi.combo", + toggle: false, + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + width: 270, + el: this.popup, + stopPropagation: false + } }) }, setValue: function (v) { - this.buttonGroup.setValue(v); - }, - - setEnabledValue: function (v) { - this.buttonGroup.setEnabledValue(v); - }, - - setEnable: function (v) { - BI.LineSegment.superclass.setEnable.apply(this, arguments); - this.buttonGroup.setEnable(v) + this.trigger.setValue(v); + this.popup.setValue(v); }, - getValue: function () { - return this.buttonGroup.getValue(); + return this.popup.getValue(); } }); -BI.LineSegment.EVENT_CHANGE = "EVENT_CHANGE"; -$.shortcut('bi.line_segment', BI.LineSegment);/** - * 拖拽字段的helper - * Created by roy on 15/10/13. - */ -BI.Helper = BI.inherit(BI.Tip, { - _defaultConfig: function () { - return BI.extend(BI.Helper.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-helper", - text: "", - value: "" - }) - }, - - _init: function () { - BI.Helper.superclass._init.apply(this, arguments); - this.populate(); - }, - - modifyContent: function(widget) { - this.empty(); - BI.createWidget({ - type: "bi.left", - element: this, - cls: "dragging-modify", - items: [widget], - lgap: 15 - }); +$.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + vgap: 2, + triggerWidth: 30, + watermark: BI.i18nText("BI-Unrestricted"), + yearLength: 4, + yearMonthLength: 7 }, - populate: function () { - var o = this.options; - this.element.data({helperWidget: this}); - this.empty(); - BI.createWidget({ - element: this, - type: "bi.label", - textAlign: "center", - textHeight: 20, - hgap: 5, - text: o.text, - value: o.value - }); - this.element.removeClass("dragging-modify"); - } -}); -$.shortcut("bi.helper", BI.Helper);/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBarBar - * @extends BI.BasicButton - */ -BI.ProgressBarBar = BI.inherit(BI.Single, { _defaultConfig: function () { - return BI.extend(BI.ProgressBarBar.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar-bar", - height: 24 - }) + return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-date-trigger", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + height: 25 + }); }, _init: function () { - BI.ProgressBarBar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.svg = BI.createWidget({ - type: "bi.svg", - width: 6, - height: 6 - }); - this.svg.circle(3, 3, 3).attr({fill: "#ffffff", "stroke": ""}); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.svg, - right: 10, - top: 9 - }] + BI.DateTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.editor = BI.createWidget({ + type: "bi.sign_editor", + height: o.height, + validationChecker: function (v) { + var date = v.match(/\d+/g); + self._autoAppend(v, date); + return self._dateCheck(v) && Date.checkLegal(v) && self._checkVoid({ + year: date[0], + month: date[1], + day: date[2] + }); + }, + quitChecker: function () { + return false; + }, + hgap: c.hgap, + vgap: c.vgap, + allowBlank: true, + watermark: c.watermark, + errorText: function () { + if (self.editor.isEditing()) { + return BI.i18nText("BI-Date_Trigger_Error_Text"); + } + return BI.i18nText("BI-Year_Trigger_Invalid_Text"); + } }); - this.processor = BI.createWidget({ - type: "bi.progress_bar_processor", - width: "0%", - height: o.height + this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { + self.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN) }); - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.processor] + this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.DateTrigger.EVENT_FOCUS); }); - }, - - setValue: function (process) { - this.processor.setValue(process); - - } -}); -$.shortcut("bi.progress_bar_bar", BI.ProgressBarBar);/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBar - * @extends BI.BasicButton - */ -BI.ProgressBar = BI.inherit(BI.Single, { - _defaultConfig: function () { - return BI.extend(BI.ProgressBar.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar", - height: 24 - }) - }, - _init: function () { - BI.ProgressBar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.bar = BI.createWidget({ - type: "bi.progress_bar_bar", - height: o.height + this.editor.on(BI.SignEditor.EVENT_VALID, function () { + self.fireEvent(BI.DateTrigger.EVENT_VALID); }); - this.label = BI.createWidget({ - type: "bi.label", - cls: "progress-bar-label", - width: 50, - height: o.height, - value: "0%" + this.editor.on(BI.SignEditor.EVENT_ERROR, function () { + self.fireEvent(BI.DateTrigger.EVENT_ERROR); }); - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - el: this.bar - }, { - el: this.label, - width: 50 - }] - }) - }, + this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { + var value = self.editor.getState(); + if (BI.isNotNull(value)) { + self.editor.setState(value); + } - setValue: function (process) { - if (process >= 100) { - process = 100; - this.label.element.addClass("success"); - } else { - this.label.element.removeClass("success"); - } - this.label.setValue(process + "%"); - this.bar.setValue(process); - } -}); -$.shortcut("bi.progress_bar", BI.ProgressBar);/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBarProcessor - * @extends BI.BasicButton - */ -BI.ProgressBarProcessor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return BI.extend(BI.ProgressBarProcessor.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar-processor", - height: 24 - }) - }, - _init: function () { - BI.ProgressBarProcessor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.svg = BI.createWidget({ - type: "bi.svg", - width: 12, - height: 12 - }); - this.svg.circle(6, 6, 6).attr({fill: "#eaeaea", "stroke": ""}); - - this.dot = this.svg.circle(6, 6, 3).attr({fill: "#ffffff", "stroke": ""}).hide(); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.svg, - right: 7, - top: 6 - }] - }); - }, - - setValue: function (process) { - if (process >= 100) { - process = 100; - this.dot.show(); - this.element.addClass("success"); - } else { - this.dot.hide(); - this.element.removeClass("success"); - } - this.element.width(process + "%"); - } -}); -BI.ProgressBarProcessor.EVENT_CHANGE = "ProgressBarProcessor.EVENT_CHANGE"; -$.shortcut("bi.progress_bar_processor", BI.ProgressBarProcessor);/** - * 表关联树 - * - * Created by GUY on 2015/12/15. - * @class BI.BranchRelation - * @extends BI.Widget - */ -BI.BranchRelation = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-branch-relation-tree", - items: [], - - centerOffset: 0,//重心偏移量 - direction: BI.Direction.Bottom, - align: BI.VerticalAlign.Top - }) - }, - - _init: function () { - BI.BranchRelation.superclass._init.apply(this, arguments); - this.populate(this.options.items); - }, - - //树分层 - _stratification: function () { - var levels = []; - this.tree.recursion(function (node, route) { - //node.isRoot = route.length <= 1; - node.leaf = node.isLeaf(); - if (!levels[route.length - 1]) { - levels[route.length - 1] = []; - } - levels[route.length - 1].push(node); - }); - return levels; - }, - - //计算所有节点的叶子结点个数 - _calculateLeaves: function () { - var count = 0; - - function track(node) { - var c = 0; - if (node.isLeaf()) { - return 1; - } - BI.each(node.getChildren(), function (i, child) { - c += track(child); - }); - node.set("leaves", c); - return c; - } - - count = track(this.tree.getRoot()); - return count; - }, - - //树平移 - _translate: function (levels) { - var adjust = []; - var maxLevel = levels.length; - BI.each(levels, function (i, nodes) { - if (!adjust[i]) { - adjust[i] = []; - } - BI.each(nodes, function (j, node) { - if (node.isLeaf() && i < maxLevel - 1) { - var newNode = new BI.Node(BI.UUID()); - //newNode.isEmptyRoot = node.isRoot || node.isEmptyRoot; - newNode.isNew = true; - //把node向下一层移 - var tar = 0; - if (j > 0) { - var c = nodes[j - 1].getLastChild(); - tar = levels[i + 1].indexOf(c) + 1; - } - levels[i + 1].splice(tar, 0, node); - //新增一个临时树节点 - var index = node.parent.getChildIndex(node.id); - node.parent.removeChildByIndex(index); - node.parent.addChild(newNode, index); - newNode.addChild(node); - adjust[i].push(newNode); - nodes[j] = newNode; - } else { - adjust[i].push(node); - } - }) - }); - return adjust; - }, - - //树补白 - _fill: function (levels) { - var adjust = []; - var maxLevel = levels.length; - BI.each(levels, function (i, nodes) { - if (!adjust[i]) { - adjust[i] = []; - } - BI.each(nodes, function (j, node) { - if (node.isLeaf() && i < maxLevel - 1) { - var newNode = new BI.Node(BI.UUID()); - newNode.leaf = true; - newNode.width = node.width; - newNode.height = node.height; - newNode.isNew = true; - //把node向下一层移 - var tar = 0; - if (j > 0) { - var c = nodes[j - 1].getLastChild(); - tar = levels[i + 1].indexOf(c) + 1; + if (BI.isNotEmptyString(value)) { + var date = value.split("-"); + self.store_value = { + type: BICst.MULTI_DATE_CALENDAR, + value:{ + year: date[0] | 0, + month: date[1] - 1, + day: date[2] | 0 } - levels[i + 1].splice(tar, 0, newNode); - //新增一个临时树节点 - node.addChild(newNode); - } - adjust[i].push(node); - }) - }); - return adjust; - }, - - //树调整 - _adjust: function (adjust) { - while (true) { - var isAllNeedAjust = false; - BI.backEach(adjust, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (!node.isNew) { - var needAdjust = true; - BI.any(node.getChildren(), function (k, n) { - if (!n.isNew) { - needAdjust = false; - return true; - } - }); - if (!node.isLeaf() && needAdjust === true) { - var allChilds = []; - BI.each(node.getChildren(), function (k, n) { - allChilds = allChilds.concat(n.getChildren()); - }); - node.removeAllChilds(); - BI.each(allChilds, function (k, c) { - node.addChild(c); - }); - var newNode = new BI.Node(BI.UUID()); - //newNode.isEmptyRoot = node.isRoot || node.isEmptyRoot; - newNode.isNew = true; - var index = node.parent.getChildIndex(node.id); - node.parent.removeChildByIndex(index); - node.parent.addChild(newNode, index); - newNode.addChild(node); - isAllNeedAjust = true; - } - } - }) - }); - if (isAllNeedAjust === false) { - break; - } else {//树重构 - adjust = this._stratification(); - } - } - return adjust; - }, - - _calculateWidth: function () { - var o = this.options; - var width = 0; - - function track1(node) { - var w = 0; - if (node.isLeaf()) { - return node.width; - } - BI.each(node.getChildren(), function (i, child) { - w += track1(child); - }); - return w; - } - - function track2(node) { - var w = 0; - if (node.isLeaf()) { - return node.height; + }; } - BI.each(node.getChildren(), function (i, child) { - w += track2(child); - }); - return w; - } - - if (this._isVertical()) { - width = track1(this.tree.getRoot()); - } else { - width = track2(this.tree.getRoot()); - } - - return width; - }, - - _isVertical: function () { - var o = this.options; - return o.direction === BI.Direction.Top || o.direction === BI.Direction.Bottom; - }, - - _calculateHeight: function () { - var o = this.options; - var height = 0; - - function track1(node) { - var h = 0; - BI.each(node.getChildren(), function (i, child) { - h = Math.max(h, track1(child)); - }); - return h + (node.height || 0); - } - - function track2(node) { - var h = 0; - BI.each(node.getChildren(), function (i, child) { - h = Math.max(h, track2(child)); - }); - return h + (node.width || 0); - } - - if (this._isVertical()) { - height = track1(this.tree.getRoot()); - } else { - height = track2(this.tree.getRoot()); - } - return height; - }, - - _calculateXY: function (levels) { - var o = this.options; - var width = this._calculateWidth(); - var height = this._calculateHeight(); - var levelCount = levels.length; - var allLeavesCount = this._calculateLeaves(); - //计算坐标 - var xy = {}; - var levelHeight = height / levelCount; - BI.each(levels, function (i, nodes) { - //计算权重 - var weights = []; - BI.each(nodes, function (j, node) { - weights[j] = (node.get("leaves") || 1) / allLeavesCount; - }); - BI.each(nodes, function (j, node) { - //求前j个元素的权重 - var weight = BI.sum(weights.slice(0, j)); - //求坐标 - var x = weight * width + weights[j] * width / 2; - var y = i * levelHeight + levelHeight / 2; - xy[node.id] = {x: x, y: y}; - }) + self.fireEvent(BI.DateTrigger.EVENT_CONFIRM); }); - return xy; - }, - - _stroke: function (levels, xy) { - var height = this._calculateHeight(); - var levelCount = levels.length; - var levelHeight = height / levelCount; - var self = this, o = this.options; - switch (o.direction) { - case BI.Direction.Top: - BI.each(levels, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (node.getChildrenLength() > 0 && !node.leaf) { - var path = ""; - var start = xy[node.id]; - var split = start.y + levelHeight / 2; - path += "M" + start.x + "," + (start.y + o.centerOffset) + "L" + start.x + "," + split; - var end = []; - BI.each(node.getChildren(), function (t, c) { - var e = end[t] = xy[c.id]; - path += "M" + e.x + "," + (e.y + o.centerOffset) + "L" + e.x + "," + split; - }); - if (end.length > 0) { - path += "M" + BI.first(end).x + "," + split + "L" + BI.last(end).x + "," + split; - } - self.svg.path(path).attr("stroke", "gray"); - } - }) - }); - break; - case BI.Direction.Bottom: - BI.each(levels, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (node.getChildrenLength() > 0 && !node.leaf) { - var path = ""; - var start = xy[node.id]; - var split = start.y - levelHeight / 2; - path += "M" + start.x + "," + (start.y - o.centerOffset) + "L" + start.x + "," + split; - var end = []; - BI.each(node.getChildren(), function (t, c) { - var e = end[t] = xy[c.id]; - path += "M" + e.x + "," + (e.y - o.centerOffset) + "L" + e.x + "," + split; - }); - if (end.length > 0) { - path += "M" + BI.first(end).x + "," + split + "L" + BI.last(end).x + "," + split; - } - self.svg.path(path).attr("stroke", "gray"); - } - }) - }); - break; - case BI.Direction.Left: - BI.each(levels, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (node.getChildrenLength() > 0 && !node.leaf) { - var path = ""; - var start = xy[node.id]; - var split = start.y + levelHeight / 2; - path += "M" + (start.y + o.centerOffset) + "," + start.x + "L" + split + "," + start.x; - var end = []; - BI.each(node.getChildren(), function (t, c) { - var e = end[t] = xy[c.id]; - path += "M" + (e.y + o.centerOffset) + "," + e.x + "L" + split + "," + e.x; - }); - if (end.length > 0) { - path += "M" + split + "," + BI.first(end).x + "L" + split + "," + BI.last(end).x; - } - self.svg.path(path).attr("stroke", "gray"); - } - }) - }); - break; - case BI.Direction.Right: - BI.each(levels, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (node.getChildrenLength() > 0 && !node.leaf) { - var path = ""; - var start = xy[node.id]; - var split = start.y - levelHeight / 2; - path += "M" + (start.y - o.centerOffset) + "," + start.x + "L" + split + "," + start.x; - var end = []; - BI.each(node.getChildren(), function (t, c) { - var e = end[t] = xy[c.id]; - path += "M" + (e.y - o.centerOffset) + "," + e.x + "L" + split + "," + e.x; - }); - if (end.length > 0) { - path += "M" + split + "," + BI.first(end).x + "L" + split + "," + BI.last(end).x; - } - self.svg.path(path).attr("stroke", "gray"); - } - }) - }); - break; - } - }, - - _createBranches: function (levels) { - var self = this, o = this.options; - if (o.direction === BI.Direction.Bottom || o.direction === BI.Direction.Right) { - levels = levels.reverse(); - } - var xy = this._calculateXY(levels); - //画图 - this._stroke(levels, xy); - }, - - _isNeedAdjust: function () { - var o = this.options; - return o.direction === BI.Direction.Top && o.align === BI.VerticalAlign.Bottom || o.direction === BI.Direction.Bottom && o.align === BI.VerticalAlign.Top - || o.direction === BI.Direction.Left && o.align === BI.HorizontalAlign.Right || o.direction === BI.Direction.Right && o.align === BI.HorizontalAlign.Left + this.editor.on(BI.SignEditor.EVENT_SPACE, function () { + if (self.editor.isValid()) { + self.editor.blur(); + } + }); + this.editor.on(BI.SignEditor.EVENT_START, function () { + self.fireEvent(BI.DateTrigger.EVENT_START); + }); + this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { + self.fireEvent(BI.DateTrigger.EVENT_CHANGE); + }); + BI.createWidget({ + type: "bi.htape", + element: this.element, + items: [{ + el: BI.createWidget(), + width: 30 + }, { + el: this.editor + }] + }) }, - - setValue: function (value) { - + _dateCheck: function (date) { + return Date.parseDateTime(date, "%Y-%x-%d").print("%Y-%x-%d") == date || Date.parseDateTime(date, "%Y-%X-%d").print("%Y-%X-%d") == date || Date.parseDateTime(date, "%Y-%x-%e").print("%Y-%x-%e") == date || Date.parseDateTime(date, "%Y-%X-%e").print("%Y-%X-%e") == date; }, - - getValue: function () { - + _checkVoid: function (obj) { + return !Date.checkVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0]; }, - - _transformToTreeFormat: function (sNodes) { - var i, l; - if (!sNodes) { - return []; - } - - if (BI.isArray(sNodes)) { - var r = []; - var tmpMap = []; - for (i = 0, l = sNodes.length; i < l; i++) { - tmpMap[sNodes[i].id] = sNodes[i]; - } - for (i = 0, l = sNodes.length; i < l; i++) { - if (tmpMap[sNodes[i].pId] && sNodes[i].id != sNodes[i].pId) { - if (!tmpMap[sNodes[i].pId].children) { - tmpMap[sNodes[i].pId].children = []; + _autoAppend: function (v, dateObj) { + var self = this; + var date = Date.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d"); + var yearCheck = function (v) { + return Date.parseDateTime(v, "%Y").print("%Y") == v && date >= self.options.min && date <= self.options.max; + }; + var monthCheck = function (v) { + return Date.parseDateTime(v, "%Y-%X").print("%Y-%X") == v && date >= self.options.min && date <= self.options.max; + }; + if (BI.isNotNull(dateObj) && Date.checkLegal(v)) { + switch (v.length) { + case this._const.yearLength: + if (yearCheck(v)) { + this.editor.setValue(v + "-"); } - tmpMap[sNodes[i].pId].children.push(sNodes[i]); - } else { - r.push(sNodes[i]); - } + break; + case this._const.yearMonthLength: + if (monthCheck(v)) { + this.editor.setValue(v + "-"); + } + break; } - return r; - } else { - return [sNodes]; } }, - populate: function (items) { - var self = this, o = this.options; - o.items = items || []; - this.empty(); - items = this._transformToTreeFormat(o.items); - this.tree = new BI.Tree(); - this.tree.initTree(items); - - this.svg = BI.createWidget({ - type: "bi.svg" - }); - - //树分层 - var levels = this._stratification(); - - if (this._isNeedAdjust()) { - //树平移 - var adjust = this._translate(levels); - //树调整 - adjust = this._adjust(adjust); - - this._createBranches(adjust); - } else { - var adjust = this._fill(levels); - - this._createBranches(adjust); + setValue: function (v) { + var type, value, self = this; + var date = new Date(); + this.store_value = v; + if (BI.isNotNull(v)) { + type = v.type || BICst.MULTI_DATE_CALENDAR; value = v.value; + if(BI.isNull(value)){ + value = v; + } + } + var _setInnerValue = function (date, text) { + var dateStr = date.print("%Y-%x-%e"); + self.editor.setState(dateStr); + self.editor.setValue(dateStr); + self.setTitle(text + ":" + dateStr); + }; + switch (type) { + case BICst.MULTI_DATE_YEAR_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_PREV]; + date = new Date((date.getFullYear() - 1 * value), date.getMonth(), date.getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_AFTER]; + date = new Date((date.getFullYear() + 1 * value), date.getMonth(), date.getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_BEGIN]; + date = new Date(date.getFullYear(), 0, 1); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_END]; + date = new Date(date.getFullYear(), 11, 31); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_PREV]; + date = new Date().getBeforeMulQuarter(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_AFTER]; + date = new Date().getAfterMulQuarter(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_BEGIN]; + date = new Date().getQuarterStartDate(); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_END]; + date = new Date().getQuarterEndDate(); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_PREV]; + date = new Date().getBeforeMultiMonth(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_AFTER]; + date = new Date().getAfterMultiMonth(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_BEGIN]; + date = new Date(date.getFullYear(), date.getMonth(), 1); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_END]; + date = new Date(date.getFullYear(), date.getMonth(), (date.getLastDateOfMonth()).getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_WEEK_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_WEEK_PREV]; + date = date.getOffsetDate(-7 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_WEEK_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_WEEK_AFTER]; + date = date.getOffsetDate(7 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_PREV]; + date = date.getOffsetDate(-1 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_AFTER]; + date = date.getOffsetDate(1 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_TODAY: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_TODAY]; + date = new Date(); + _setInnerValue(date, text); + break; + default: + if (BI.isNull(value) || BI.isNull(value.day)) { + this.editor.setState(""); + this.editor.setValue(""); + this.setTitle(""); + } else { + var dateStr = value.year + "-" + (value.month + 1) + "-" + value.day; + this.editor.setState(dateStr); + this.editor.setValue(dateStr); + this.setTitle(dateStr); + } + break; } + }, - var container = BI.createWidget({ - type: "bi.layout", - width: this._isVertical() ? this._calculateWidth() : this._calculateHeight(), - height: this._isVertical() ? this._calculateHeight() : this._calculateWidth() - }); - BI.createWidget({ - type: "bi.absolute", - element: container, - items: [{ - el: this.svg, - top: 0, - left: 0, - right: 0, - bottom: 0 - }] - }); - if (this._isVertical()) { - items = [{ - type: "bi.handstand_branch_tree", - expander: { - direction: o.direction - }, - el: { - layouts: [{ - type: "bi.horizontal_adapt", - verticalAlign: o.align - }] - }, - items: items - }] - } else { - items = [{ - type: "bi.branch_tree", - expander: { - direction: o.direction - }, - el: { - layouts: [{ - type: "bi.vertical" - }, { - type: o.align === BI.HorizontalAlign.Left ? "bi.left" : "bi.right" - }] - }, - items: items - }] - } - BI.createWidget({ - type: "bi.adaptive", - element: container, - items: items - }); - BI.createWidget({ - type: "bi.center_adapt", - scrollable: true, - element: this, - items: [container] - }); + getKey: function () { + return this.editor.getValue(); + }, + getValue: function () { + return this.store_value; } + }); -BI.BranchRelation.EVENT_CHANGE = "BranchRelation.EVENT_CHANGE"; -$.shortcut("bi.branch_relation", BI.BranchRelation);/** +BI.DateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.DateTrigger.EVENT_START = "EVENT_START"; +BI.DateTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.DateTrigger.EVENT_CHANGE = "EVENT_CHANGE"; +BI.DateTrigger.EVENT_VALID = "EVENT_VALID"; +BI.DateTrigger.EVENT_ERROR = "EVENT_ERROR"; +BI.DateTrigger.EVENT_TRIGGER_CLICK = "EVENT_TRIGGER_CLICK"; +BI.DateTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +$.shortcut("bi.date_trigger", BI.DateTrigger);/** * Created by zcf on 2017/2/20. */ BI.DatePaneWidget = BI.inherit(BI.Widget, { @@ -8765,172 +7849,40 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, { width: c.triggerWidth }, width: c.triggerWidth - }, { - el: { - type: "bi.trigger_icon_button", - width: c.triggerWidth - }, - width: c.triggerWidth - } - ] - }); - }, - setValue: function (v) { - if(BI.isNotNull(v)){ - this.editor.setState(v + 1); - this.editor.setValue(v + 1); - this.editor.setTitle(v + 1); - return; - } - this.editor.setState(); - this.editor.setValue(); - this.editor.setTitle(); - }, - getKey: function () { - return this.editor.getValue() | 0; - }, - getValue: function () { - return this.editor.getValue() - 1; - } -}); -BI.MonthTrigger.EVENT_FOCUS = "EVENT_FOCUS"; -BI.MonthTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.MonthTrigger.EVENT_START = "EVENT_START"; -BI.MonthTrigger.EVENT_STOP = "EVENT_STOP"; -BI.MonthTrigger.EVENT_CHANGE = "EVENT_CHANGE"; -$.shortcut("bi.month_trigger", BI.MonthTrigger);/** - * Created by fay on 2016/9/14. - */ -BI.TextLabelItemGroup = BI.inherit(BI.ButtonGroup, { - _defaultConfig: function () { - return BI.extend(BI.TextLabelItemGroup.superclass._defaultConfig.apply(this, arguments), { - chooseType: BI.Selection.Multi - }); - }, - - _init: function () { - BI.TextLabelItemGroup.superclass._init.apply(this, arguments); - this._checkBtnStyle(); - }, - - _btnsCreator: function (items) { - var self = this, args = Array.prototype.slice.call(arguments), o = this.options; - var buttons = this._createBtns(items); - args[0] = buttons; - - BI.each(this.behaviors, function (i, behavior) { - behavior.doBehavior.apply(behavior, args); - }); - BI.each(buttons, function (i, btn) { - btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - switch (o.chooseType) { - case BI.ButtonGroup.CHOOSE_TYPE_MULTI: - if (BI.isEmptyString(btn.getValue())) { - self.setValue([]); - } else { - self._checkBtnStyle(); - } - break; - case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: - self.setValue(btn.getValue()); - break; - case BI.ButtonGroup.CHOOSE_TYPE_NONE: - self.setValue([]); - break; - } - self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - btn.on(BI.Events.DESTROY, function () { - BI.remove(self.buttons, btn); - }) - }); - - return buttons; - }, - - _checkBtnStyle: function () { - var self = this; - var flag = BI.isEmptyArray(this.getValue()); - BI.each(this.buttons, function (idx, btn) { - if (flag && BI.isEmptyString(btn.getValue())) { - btn.setSelected(true); - btn.doHighLight(); - } - if (!flag && BI.isEmptyString(btn.getValue())) { - btn.setSelected(false); - btn.unHighLight(); - } - if (btn.isSelected()) { - btn.doHighLight(); - } else { - btn.unHighLight(); - } - }); - }, - - setValue: function (v) { - BI.TextLabelItemGroup.superclass.setValue.apply(this, arguments); - this._checkBtnStyle(); - } -}); - -$.shortcut('bi.text_label_item_group', BI.TextLabelItemGroup); -/** - * 文本标签 - * - * Created by fay on 2016/9/11. - */ -BI.TextLabel = BI.inherit(BI.Widget, { - - _constant: { - MAX_COLUMN_SIZE: 40 - }, - - _defaultConfig: function () { - return BI.extend(BI.TextLabel.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-label", - title: "" - }) - }, - - _init: function () { - BI.TextLabel.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var title = BI.createWidget({ - type: "bi.label", - text: o.title + ":" - }); - this.container = BI.createWidget({ - type: "bi.text_label_item_group", - items: BI.createItems(o.items.slice(0, this._constant.MAX_COLUMN_SIZE), { - type: "bi.text_button" - }), - layouts: [{ - type: "bi.horizontal", - - }] + }, { + el: { + type: "bi.trigger_icon_button", + width: c.triggerWidth + }, + width: c.triggerWidth + } + ] }); - - BI.createWidget({ - type: "bi.horizontal", - items: [title, this.container], - element: this - }) }, - setValue: function (v) { - this.container.setValue(v); + if(BI.isNotNull(v)){ + this.editor.setState(v + 1); + this.editor.setValue(v + 1); + this.editor.setTitle(v + 1); + return; + } + this.editor.setState(); + this.editor.setValue(); + this.editor.setTitle(); + }, + getKey: function () { + return this.editor.getValue() | 0; }, - getValue: function () { - return this.container.getValue(); + return this.editor.getValue() - 1; } }); - -$.shortcut('bi.text_label', BI.TextLabel);/** +BI.MonthTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MonthTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.MonthTrigger.EVENT_START = "EVENT_START"; +BI.MonthTrigger.EVENT_STOP = "EVENT_STOP"; +BI.MonthTrigger.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut("bi.month_trigger", BI.MonthTrigger);/** * @class BI.MultiLayerSelectTreeCombo * @extends BI.Widget */ @@ -11846,42 +10798,361 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, { BI.nextTick(function () { me.populate(); }); - }); + }); + + this.switcher.element.click(function (e) { + e.stopPropagation(); + }); + }, + + adjustView: function () { + this.switcher.adjustView(); + }, + + hideView: function () { + this.switcher.empty(); + this.switcher.hideView(); + }, + + setValue: function (v) { + this.switcher.setValue(v); + }, + + setButtonChecked: function (v) { + this.button.setValue(v) + }, + + getValue: function () { + + }, + + populate: function (items) { + this.switcher.populate.apply(this.switcher, arguments); + } +}); + +BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = "MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE"; +BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW"; +$.shortcut('bi.multi_select_check_selected_switcher', BI.MultiSelectCheckSelectedSwitcher);/** + * Created by zcf on 2016/12/14. + */ +BI.MultiStringList = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.MultiStringList.superclass._defaultConfig.apply(this, arguments), { + baseCls: 'bi-multi-string-list', + itemsCreator: BI.emptyFn, + valueFormatter: BI.emptyFn, + height: 25 + }) + }, + _init: function () { + BI.MultiStringList.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + + var assertShowValue = function () { + BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); + self.trigger.getSearcher().setState(self.storeValue); + self.trigger.getCounter().setButtonChecked(self.storeValue); + }; + this.storeValue = {}; + + + this.popup = BI.createWidget({ + type: "bi.multi_select_loader", + cls: "popup-multi-string-list", + itemsCreator: o.itemsCreator, + valueFormatter: o.valueFormatter, + onLoaded: o.onLoaded, + el: { + height: "" + } + }); + this.popup.on(BI.MultiSelectLoader.EVENT_CHANGE, function () { + self.storeValue = this.getValue(); + self._adjust(function () { + assertShowValue(); + self.fireEvent(BI.MultiStringList.EVENT_CHANGE); + }); + }); + + this.trigger = BI.createWidget({ + type: "bi.multi_select_trigger", + height: o.height, + adapter: this.popup, + masker: { + offset: { + left: 1, + top: 0, + right: 2, + bottom: 1 + } + }, + valueFormatter: o.valueFormatter, + itemsCreator: function (op, callback) { + o.itemsCreator(op, function (res) { + if (op.times === 1 && BI.isNotNull(op.keyword)) { + self.trigger.setValue(self.getValue()); + } + callback.apply(self, arguments); + }); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { + self._setStartValue(""); + this.getSearcher().setValue(self.storeValue); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () { + self._setStartValue(""); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { + if (this.getSearcher().hasMatched()) { + var keyword = this.getSearcher().getKeyword(); + self._join({ + type: BI.Selection.Multi, + value: [keyword] + }, function () { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + self._setStartValue(keyword); + assertShowValue(); + self.populate(); + self._setStartValue(""); + self.fireEvent(BI.MultiStringList.EVENT_CHANGE); + }) + } + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { + var last = BI.last(keywords); + keywords = BI.initial(keywords || []); + if (keywords.length > 0) { + self._joinKeywords(keywords, function () { + if (BI.isEndWithBlank(last)) { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + assertShowValue(); + self.popup.populate(); + self._setStartValue(""); + } else { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + assertShowValue(); + } + }); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) { + if (obj instanceof BI.MultiSelectBar) { + self._joinAll(this.getValue(), function () { + assertShowValue(); + }); + } else { + self._join(this.getValue(), function () {//安徽省 北京 + assertShowValue(); + }); + } + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { + this.getCounter().setValue(self.storeValue); + }); + var div = BI.createWidget({ + type: "bi.layout" + }); + BI.createWidget({ + type: "bi.vtape", + element: this.element, + height: "100%", + width: "100%", + items: [{ + el: this.trigger, + height: 25 + }, { + el: div, + height: 2 + }, { + el: this.popup, + height: "fill" + }] + }); + }, + _defaultState: function () { + this.trigger.stopEditing(); + }, + + _assertValue: function (val) { + val || (val = {}); + val.type || (val.type = BI.Selection.Multi); + val.value || (val.value = []); + }, + + _makeMap: function (values) { + return BI.makeObject(values || []); + }, + + _joinKeywords: function (keywords, callback) { + var self = this, o = this.options; + this._assertValue(this.storeValue); + if (!this._allData) { + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_ALL_DATA + }, function (ob) { + self._allData = BI.pluck(ob.items, "value"); + digest(self._allData); + }) + } else { + digest(this._allData) + } + + function digest(items) { + var selectedMap = self._makeMap(items); + BI.each(keywords, function (i, val) { + if (BI.isNotNull(selectedMap[val])) { + self.storeValue.value[self.storeValue.type === BI.Selection.Multi ? "pushDistinct" : "remove"](val); + } + }); + self._adjust(callback); + } + }, + + _joinAll: function (res, callback) { + var self = this, o = this.options; + this._assertValue(res); + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_ALL_DATA, + keyword: this.trigger.getKey() + }, function (ob) { + var items = BI.pluck(ob.items, "value"); + if (self.storeValue.type === res.type) { + var change = false; + var map = self._makeMap(self.storeValue.value); + BI.each(items, function (i, v) { + if (BI.isNotNull(map[v])) { + change = true; + delete map[v]; + } + }); + change && (self.storeValue.value = BI.values(map)); + self._adjust(callback); + return; + } + var selectedMap = self._makeMap(self.storeValue.value); + var notSelectedMap = self._makeMap(res.value); + var newItems = []; + BI.each(items, function (i, item) { + if (BI.isNotNull(selectedMap[items[i]])) { + delete selectedMap[items[i]]; + } + if (BI.isNull(notSelectedMap[items[i]])) { + newItems.push(item); + } + }); + self.storeValue.value = newItems.concat(BI.values(selectedMap)); + self._adjust(callback); + }) + }, + + _adjust: function (callback) { + var self = this, o = this.options; + if (!this._count) { + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_DATA_LENGTH + }, function (res) { + self._count = res.count; + adjust(); + callback(); + }); + } else { + adjust(); + callback(); + } + function adjust() { + if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { + self.storeValue = { + type: BI.Selection.Multi, + value: [] + } + } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { + self.storeValue = { + type: BI.Selection.All, + value: [] + } + } + } + }, - this.switcher.element.click(function (e) { - e.stopPropagation(); - }); + _join: function (res, callback) { + var self = this, o = this.options; + this._assertValue(res); + this._assertValue(this.storeValue); + if (this.storeValue.type === res.type) { + var map = this._makeMap(this.storeValue.value); + BI.each(res.value, function (i, v) { + if (!map[v]) { + self.storeValue.value.push(v); + map[v] = v; + } + }); + var change = false; + BI.each(res.assist, function (i, v) { + if (BI.isNotNull(map[v])) { + change = true; + delete map[v]; + } + }); + change && (this.storeValue.value = BI.values(map)); + self._adjust(callback); + return; + } + this._joinAll(res, callback); }, - adjustView: function () { - this.switcher.adjustView(); + _setStartValue: function (value) { + this._startValue = value; + this.popup.setStartValue(value); }, - hideView: function () { - this.switcher.empty(); - this.switcher.hideView(); + // isAllSelected: function () { + // return this.popup.isAllSelected(); + // }, + + resize: function () { + this.trigger.getCounter().adjustView(); + this.trigger.getSearcher().adjustView(); }, - setValue: function (v) { - this.switcher.setValue(v); + setEnable: function (v) { + this.trigger.setEnable(v); + this.popup.setEnable(v); }, - setButtonChecked: function (v) { - this.button.setValue(v) + setValue: function (v) { + this.storeValue = v || {}; + this._assertValue(this.storeValue); + this.popup.setValue(this.storeValue); + this.trigger.setValue(this.storeValue); }, getValue: function () { - + return this.storeValue; }, - populate: function (items) { - this.switcher.populate.apply(this.switcher, arguments); + populate: function () { + this._count = null; + this._allData = null; + this.popup.populate.apply(this.popup, arguments); + this.trigger.populate.apply(this.trigger, arguments); } }); -BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = "MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE"; -BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW"; -$.shortcut('bi.multi_select_check_selected_switcher', BI.MultiSelectCheckSelectedSwitcher);/** +BI.extend(BI.MultiStringList, { + REQ_GET_DATA_LENGTH: 0, + REQ_GET_ALL_DATA: -1 +}); + +BI.MultiStringList.EVENT_CHANGE = "BI.MultiStringList.EVENT_CHANGE"; +$.shortcut("bi.multi_string_list", BI.MultiStringList);/** * * @class BI.MultiTreeCheckPane * @extends BI.Pane @@ -12619,7 +11890,231 @@ BI.MultiTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE"; BI.MultiTreeSearcher.EVENT_START = "EVENT_START"; BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; -$.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);//小于号的值为:0,小于等于号的值为:1 +$.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);/** + * Created by zcf on 2016/12/20. + */ +BI.MultiTreeList = BI.inherit(BI.Widget, { + constants: { + offset: { + left: 1, + top: 0, + right: 2, + bottom: 1 + } + }, + + _defaultConfig: function () { + return BI.extend(BI.MultiTreeList.superclass._defaultConfig.apply(this, arguments), { + baseCls: 'bi-multi-tree-combo', + itemsCreator: BI.emptyFn, + height: 25 + }); + }, + + _init: function () { + BI.MultiTreeList.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + + var isInit = false; + var want2showCounter = false; + + this.popup = BI.createWidget({ + type: "bi.multi_tree_list_popup", + itemsCreator: o.itemsCreator + }); + + this.popup.on(BI.MultiStringListPopup.EVENT_AFTER_INIT, function () { + self.trigger.getCounter().adjustView(); + isInit = true; + if (want2showCounter === true) { + showCounter(); + } + }); + + this.trigger = BI.createWidget({ + type: "bi.multi_select_trigger", + height: o.height, + adapter: this.popup, + masker: { + offset: this.constants.offset + }, + searcher: { + type: "bi.multi_tree_searcher", + itemsCreator: o.itemsCreator + }, + switcher: { + el: { + type: "bi.multi_tree_check_selected_button" + }, + popup: { + type: "bi.multi_tree_check_pane", + itemsCreator: o.itemsCreator + } + } + }); + + this.storeValue = {value: {}}; + + var isSearching = function () { + return self.trigger.getSearcher().isSearching(); + }; + + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { + self.storeValue = {value: self.popup.getValue()}; + this.setValue(self.storeValue); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () { + self.storeValue = {value: this.getValue()}; + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + BI.nextTick(function () { + self.trigger.populate(); + self.popup.populate(); + }); + }); + function showCounter() { + if (isSearching()) { + self.storeValue = {value: self.trigger.getValue()}; + } else { + self.storeValue = {value: self.popup.getValue()}; + } + self.trigger.setValue(self.storeValue); + } + + this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { + if (want2showCounter === false) { + want2showCounter = true; + } + if (isInit === true) { + want2showCounter = null; + showCounter(); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () { + var val = { + type: BI.Selection.Multi, + value: this.getSearcher().hasChecked() ? {1: 1} : {} + }; + this.getSearcher().setState(val); + this.getCounter().setButtonChecked(val); + }); + + this.popup.on(BI.MultiStringListPopup.EVENT_CHANGE, function () { + showCounter(); + var val = { + type: BI.Selection.Multi, + value: this.hasChecked() ? {1: 1} : {} + }; + self.trigger.getSearcher().setState(val); + self.trigger.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeList.EVENT_CHANGE); + }); + + var div = BI.createWidget({ + type: "bi.layout" + }); + BI.createWidget({ + type: "bi.vtape", + element: this.element, + height: "100%", + width: "100%", + items: [{ + el: this.trigger, + height: 25 + }, { + el: div, + height: 2 + }, { + el: this.popup, + height: "fill" + }] + }) + }, + + _defaultState: function () { + this.trigger.stopEditing(); + }, + + resize: function () { + this.trigger.getCounter().adjustView(); + this.trigger.getSearcher().adjustView(); + }, + + setEnable: function (v) { + this.trigger.setEnable(v); + this.popup.setEnable(v); + }, + + setValue: function (v) { + this.storeValue.value = v || {}; + this.popup.setValue({ + value: v || {} + }); + this.trigger.setValue({ + value: v || {} + }); + }, + + getValue: function () { + return this.storeValue.value; + }, + + populate: function () { + this.trigger.populate.apply(this.trigger, arguments); + this.popup.populate.apply(this.popup, arguments); + } +}); +BI.MultiTreeList.EVENT_CHANGE = "MultiTreeList.EVENT_CHANGE"; +$.shortcut('bi.multi_tree_list', BI.MultiTreeList);/** + * Created by zcf on 2016/12/21. + */ +BI.MultiStringListPopup=BI.inherit(BI.Widget,{ + _defaultConfig:function () { + return BI.extend(BI.MultiStringListPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-tree-list-popup", + itemsCreator: BI.emptyFn + }); + }, + _init:function () { + BI.MultiStringListPopup.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.popup = BI.createWidget({ + type: "bi.sync_tree", + height: 400, + element:this.element, + itemsCreator: o.itemsCreator + }); + this.popup.on(BI.TreeView.EVENT_AFTERINIT, function () { + self.fireEvent(BI.MultiStringListPopup.EVENT_AFTER_INIT) + }); + this.popup.on(BI.TreeView.EVENT_CHANGE, function () { + self.fireEvent(BI.MultiStringListPopup.EVENT_CHANGE) + }); + }, + + hasChecked: function () { + return this.popup.hasChecked(); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + v || (v = {}); + this.popup.setValue(v.value); + }, + + populate: function (config) { + this.popup.stroke(config); + } + +}); +BI.MultiStringListPopup.EVENT_AFTER_INIT="BI.MultiStringListPopup.EVENT_AFTER_INIT"; +BI.MultiStringListPopup.EVENT_CHANGE="BI.MultiStringListPopup.EVENT_CHANGE"; +$.shortcut("bi.multi_tree_list_popup",BI.MultiStringListPopup);//小于号的值为:0,小于等于号的值为:1 //closeMIn:最小值的符号,closeMax:最大值的符号 /** * Created by roy on 15/9/17. diff --git a/dist/icon/loading.gif b/dist/background/loading.gif similarity index 100% rename from dist/icon/loading.gif rename to dist/background/loading.gif diff --git a/dist/base.css b/dist/base.css index 0400f6ab98..a2ee41b073 100644 --- a/dist/base.css +++ b/dist/base.css @@ -36,26 +36,20 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker-button { - background-color: #eaeaea; +.bi-color-chooser-popup .color-chooser-popup-title { + background: #f4f4f4; + border-bottom: 1px solid #d4dadd; } -.bi-color-picker-button .color-picker-button-mask { - border: 1px solid #1a1a1a; +.bi-color-chooser-popup .color-chooser-popup-more { + background: #f4f4f4; } -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker > .center-element { - border-left: 1px solid #ffffff; - border-top: 1px solid #ffffff; +.bi-color-chooser-popup .color-chooser-popup-more:hover { + background: #d4dadd; } /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker-editor .color-picker-editor-label { - color: #808080; -} -.bi-color-picker-editor .color-picker-editor-display { +.bi-color-chooser-trigger { background: #ffffff; -webkit-border-radius: 2px; -moz-border-radius: 2px; @@ -64,6 +58,58 @@ -webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset; -moz-box-shadow: 0px 0px 2px 1px #d4dadd inset; } +/** + * Farbtastic Color Picker 1.2 + * © 2008 Steven Wittens + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +.farbtastic { + position: relative; +} +.farbtastic * { + position: absolute; + cursor: crosshair; +} +.farbtastic, +.farbtastic .wheel { + width: 195px; + height: 195px; +} +.farbtastic .color, +.farbtastic .overlay { + top: 47px; + left: 47px; + width: 101px; + height: 101px; +} +.farbtastic .wheel { + background: url(third/farbtastic/wheel.png) no-repeat; + width: 195px; + height: 195px; +} +.farbtastic .overlay { + background: url(third/farbtastic/mask.png) no-repeat; +} +.farbtastic .marker { + width: 17px; + height: 17px; + margin: -8px 0 0 -8px; + overflow: hidden; + background: url(third/farbtastic/marker.png) no-repeat; +} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ @@ -124,6 +170,72 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ +.bi-adapt-editor .adapt-editor-text { + font-size: 14px; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +/*************BI.SearchEditor******************/ +.bi-search-editor { + border: 1px solid #d4dadd; +} +.bi-search-editor .close-font { + font-size: 20px; +} +.bi-search-editor .search-font { + font-size: 20px; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +/*************BI.SearchEditor******************/ +.bi-small-search-editor .bi-editor { + font-size: 12px; +} +.bi-small-search-editor .bi-editor .bi-input { + font-size: 12px; +} +.bi-small-search-editor .bi-editor .bi-label { + font-size: 12px; +} +.bi-small-search-editor .close-font { + font-size: 18px; +} +.bi-small-search-editor .search-font { + font-size: 18px; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-sign-initial-editor .sign-initial-editor-text { + font-size: 14px; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-sign-style-editor .sign-style-editor-text { + max-width: 100%; + font-size: 12px; +} +.bi-sign-style-editor .sign-style-editor-tip { + max-width: 100%; + font-size: 12px; + color: #808080; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-text-editor { + border: 1px solid #d4dadd; +} +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +/*************BI.SearchEditor******************/ +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ /* BASICS */ .CodeMirror { /* Set height, width, borders, and global font properties here */ @@ -669,38 +781,6 @@ li.CodeMirror-hint-active { /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-login-timeout-center .input-wrapper { - border-bottom: 1px solid #eaeaea; -} -.bi-login-timeout-center .input-wrapper .login-input { - font-size: 16px; -} -.bi-login-timeout-center .input-wrapper .error-mask { - background: #1a1a1a; - opacity: 0.25; - filter: alpha(opacity=25); - color: #ffffff; - font-size: 16px; -} -.bi-login-timeout-center .login-button { - background: #009de3; - -webkit-border-radius: 25px; - -moz-border-radius: 25px; - border-radius: 25px; - font-size: 22px; - color: #ffffff; -} -.bi-login-timeout-center .login-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-login-timeout-south .keep-state { - font-size: 14px; - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-all-count-pager .all-pager-prev { font-size: 16px; } @@ -732,26 +812,6 @@ li.CodeMirror-hint-active { /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-request-loading .mask-pane { - background: #ffffff; - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-request-loading .loading-comment { - font-size: 20px; - color: #808080; -} -.bi-request-loading .load-fail-comment { - font-size: 20px; - color: #808080; -} -.bi-request-loading .load-timeout-warning { - font-size: 16px; - color: #e85050; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-segment-button:active, .bi-segment-button.active { color: #ffffff; @@ -1306,548 +1366,46 @@ li.CodeMirror-hint-active { /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -/** - * Farbtastic Color Picker 1.2 - * © 2008 Steven Wittens - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -.farbtastic { - position: relative; -} -.farbtastic * { - position: absolute; - cursor: crosshair; -} -.farbtastic, -.farbtastic .wheel { - width: 195px; - height: 195px; -} -.farbtastic .color, -.farbtastic .overlay { - top: 47px; - left: 47px; - width: 101px; - height: 101px; -} -.farbtastic .wheel { - background: url(farbtastic/wheel.png) no-repeat; - width: 195px; - height: 195px; -} -.farbtastic .overlay { - background: url(farbtastic/mask.png) no-repeat; -} -.farbtastic .marker { - width: 17px; - height: 17px; - margin: -8px 0 0 -8px; - overflow: hidden; - background: url(farbtastic/marker.png) no-repeat; -} -/* required styles */ -.leaflet-pane, -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-tile-container, -.leaflet-map-pane svg, -.leaflet-map-pane canvas, -.leaflet-zoom-box, -.leaflet-image-layer, -.leaflet-layer { - position: absolute; - left: 0; - top: 0; -} -.leaflet-container { - overflow: hidden; - -ms-touch-action: none; - touch-action: none; -} -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - -webkit-user-drag: none; -} -/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ -.leaflet-safari .leaflet-tile { - image-rendering: -webkit-optimize-contrast; -} -/* hack that prevents hw layers "stretching" when loading new tiles */ -.leaflet-safari .leaflet-tile-container { - width: 1600px; - height: 1600px; - -webkit-transform-origin: 0 0; -} -.leaflet-marker-icon, -.leaflet-marker-shadow { - display: block; -} -/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ -/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ -.leaflet-container .leaflet-overlay-pane svg, -.leaflet-container .leaflet-marker-pane img, -.leaflet-container .leaflet-tile-pane img, -.leaflet-container img.leaflet-image-layer { - max-width: none !important; -} -.leaflet-tile { - filter: inherit; - visibility: hidden; -} -.leaflet-tile-loaded { - visibility: inherit; -} -.leaflet-zoom-box { - width: 0; - height: 0; - -moz-box-sizing: border-box; - box-sizing: border-box; - z-index: 800; -} -/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ -.leaflet-overlay-pane svg { - -moz-user-select: none; -} -.leaflet-pane { - z-index: 400; -} -.leaflet-tile-pane { - z-index: 200; -} -.leaflet-overlay-pane { - z-index: 400; -} -.leaflet-shadow-pane { - z-index: 500; -} -.leaflet-marker-pane { - z-index: 600; -} -.leaflet-popup-pane { - z-index: 700; -} -.leaflet-map-pane canvas { - z-index: 100; -} -.leaflet-map-pane svg { - z-index: 200; -} -.leaflet-vml-shape { - width: 1px; - height: 1px; -} -.lvml { - behavior: url(#default#VML); - display: inline-block; - position: absolute; -} -/* control positioning */ -.leaflet-control { - position: relative; - z-index: 800; - pointer-events: auto; -} -.leaflet-top, -.leaflet-bottom { - position: absolute; - z-index: 1000; - pointer-events: none; -} -.leaflet-top { - top: 0; -} -.leaflet-right { - right: 0; -} -.leaflet-bottom { - bottom: 0; -} -.leaflet-left { - left: 0; -} -.leaflet-control { - float: left; - clear: both; -} -.leaflet-right .leaflet-control { - float: right; -} -.leaflet-top .leaflet-control { - margin-top: 10px; -} -.leaflet-bottom .leaflet-control { - margin-bottom: 10px; -} -.leaflet-left .leaflet-control { - margin-left: 10px; -} -.leaflet-right .leaflet-control { - margin-right: 10px; -} -/* zoom and fade animations */ -.leaflet-fade-anim .leaflet-tile { - will-change: opacity; -} -.leaflet-fade-anim .leaflet-popup { - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; -} -.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { - opacity: 1; -} -.leaflet-zoom-animated { - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; -} -.leaflet-zoom-anim .leaflet-zoom-animated { - will-change: transform; -} -.leaflet-zoom-anim .leaflet-zoom-animated { - -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1); -} -.leaflet-zoom-anim .leaflet-tile, -.leaflet-pan-anim .leaflet-tile { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; -} -.leaflet-zoom-anim .leaflet-zoom-hide { - visibility: hidden; -} -/* cursors */ -.leaflet-interactive { - cursor: pointer; -} -.leaflet-grab { - cursor: -webkit-grab; - cursor: -moz-grab; -} -.leaflet-crosshair, -.leaflet-crosshair .leaflet-interactive { - cursor: crosshair; -} -.leaflet-popup-pane, -.leaflet-control { - cursor: auto; -} -.leaflet-dragging .leaflet-grab, -.leaflet-dragging .leaflet-grab .leaflet-interactive, -.leaflet-dragging .leaflet-marker-draggable { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; -} -/* marker & overlays interactivity */ -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-image-layer, -.leaflet-pane > svg path, -.leaflet-tile-container { - pointer-events: none; -} -.leaflet-marker-icon.leaflet-interactive, -.leaflet-image-layer.leaflet-interactive, -.leaflet-pane > svg path.leaflet-interactive { - pointer-events: auto; -} -/* visual tweaks */ -.leaflet-container { - /*background: #ddd;*/ - outline: 0; -} -.leaflet-container a { - color: #0078A8; -} -.leaflet-container a.leaflet-active { - outline: 2px solid orange; -} -.leaflet-zoom-box { - border: 2px dotted #38f; - background: rgba(255, 255, 255, 0.5); -} -/* general typography */ -.leaflet-container { - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; -} -/* general toolbar styles */ -.leaflet-bar { - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65); - border-radius: 4px; -} -.leaflet-bar a, -.leaflet-bar a:hover { - background-color: #fff; - border-bottom: 1px solid #ccc; - width: 26px; - height: 26px; - line-height: 26px; - display: block; - text-align: center; - text-decoration: none; - color: black; -} -.leaflet-bar a, -.leaflet-control-layers-toggle { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; -} -.leaflet-bar a:hover { - background-color: #f4f4f4; -} -.leaflet-bar a:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.leaflet-bar a:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom: none; -} -.leaflet-bar a.leaflet-disabled { - cursor: default; - background-color: #f4f4f4; - color: #bbb; -} -.leaflet-touch .leaflet-bar a { - width: 30px; - height: 30px; - line-height: 30px; -} -/* zoom control */ -.leaflet-control-zoom-in, -.leaflet-control-zoom-out { - font: bold 18px 'Lucida Console', Monaco, monospace; - text-indent: 1px; -} -.leaflet-control-zoom-out { - font-size: 20px; -} -.leaflet-touch .leaflet-control-zoom-in { - font-size: 22px; -} -.leaflet-touch .leaflet-control-zoom-out { - font-size: 24px; -} -/* layers control */ -.leaflet-control-layers { - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); - background: #fff; - border-radius: 5px; -} -.leaflet-control-layers-toggle { - background-image: url(images/layers.png); - width: 36px; - height: 36px; -} -.leaflet-retina .leaflet-control-layers-toggle { - background-image: url(images/layers-2x.png); - background-size: 26px 26px; -} -.leaflet-touch .leaflet-control-layers-toggle { - width: 44px; - height: 44px; -} -.leaflet-control-layers .leaflet-control-layers-list, -.leaflet-control-layers-expanded .leaflet-control-layers-toggle { - display: none; -} -.leaflet-control-layers-expanded .leaflet-control-layers-list { - display: block; - position: relative; +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-branch-tree .bi-branch-tree-view { + min-width: 300px; } -.leaflet-control-layers-expanded { - padding: 6px 10px 6px 6px; - color: #333; - background: #fff; +.bi-click-branch-tree { + border: 1px solid #d4dadd; } -.leaflet-control-layers-scrollbar { - overflow-y: scroll; - padding-right: 5px; +.bi-click-branch-tree .bi-empty-view { + background: #f4f4f4; } -.leaflet-control-layers-selector { - margin-top: 2px; - position: relative; - top: 1px; +/****添加计算宽度的--运算符直接需要space****/ +/****** common color(常用颜色,可用于普遍场景) *****/ +/**** custom color(自定义颜色,用于特定场景) ****/ +.bi-display-tree .ztree * { + color: #808080; } -.leaflet-control-layers label { - display: block; +.bi-display-tree .ztree li span.button.switch.center_open { + background-image: url("icon/tree-vertical-line-3.png"); } -.leaflet-control-layers-separator { - height: 0; - border-top: 1px solid #ddd; - margin: 5px -10px 5px -6px; +.bi-display-tree .ztree li span.button.switch.roots_open { + background-image: url("icon/tree-vertical-line-2.png"); } -/* attribution and scale controls */ -.leaflet-container .leaflet-control-attribution { - background: #fff; - background: rgba(255, 255, 255, 0.7); - margin: 0; +.bi-display-tree .ztree li span.button.switch.bottom_open { + background-image: url("icon/tree-vertical-line-4.png"); } -.leaflet-control-attribution, -.leaflet-control-scale-line { - padding: 0 5px; - color: #333; +.bi-display-tree .ztree li a, +.bi-display-tree .ztree li span { + cursor: default !important; } -.leaflet-control-attribution a { +.bi-display-tree .ztree li a:hover { text-decoration: none; } -.leaflet-control-attribution a:hover { - text-decoration: underline; -} -.leaflet-container .leaflet-control-attribution, -.leaflet-container .leaflet-control-scale { - font-size: 11px; -} -.leaflet-left .leaflet-control-scale { - margin-left: 5px; -} -.leaflet-bottom .leaflet-control-scale { - margin-bottom: 5px; -} -.leaflet-control-scale-line { - border: 2px solid #777; - border-top: none; - line-height: 1.1; - padding: 2px 5px 1px; - font-size: 11px; - white-space: nowrap; - overflow: hidden; - -moz-box-sizing: border-box; - box-sizing: border-box; - background: #fff; - background: rgba(255, 255, 255, 0.5); -} -.leaflet-control-scale-line:not(:first-child) { - border-top: 2px solid #777; - border-bottom: none; - margin-top: -2px; -} -.leaflet-control-scale-line:not(:first-child):not(:last-child) { - border-bottom: 2px solid #777; -} -.leaflet-touch .leaflet-control-attribution, -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - box-shadow: none; -} -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - border: 2px solid rgba(0, 0, 0, 0.2); - background-clip: padding-box; -} -/* popup */ -.leaflet-popup { - position: absolute; - text-align: center; -} -.leaflet-popup-content-wrapper { - padding: 1px; - text-align: left; - border-radius: 12px; -} -.leaflet-popup-content { - margin: 13px 19px; - line-height: 1.4; -} -.leaflet-popup-content p { - margin: 18px 0; -} -.leaflet-popup-tip-container { - margin: 0 auto; - width: 40px; - height: 20px; - position: relative; - overflow: hidden; -} -.leaflet-popup-tip { - width: 17px; - height: 17px; - padding: 1px; - margin: -10px auto 0; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); -} -.leaflet-popup-content-wrapper, -.leaflet-popup-tip { - background: white; - color: #333; - box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4); -} -.leaflet-container a.leaflet-popup-close-button { - position: absolute; - top: 0; - right: 0; - padding: 4px 4px 0 0; +.bi-display-tree .ztree li a.curSelectedNode { + padding-top: 1px; border: none; - text-align: center; - width: 18px; - height: 14px; - font: 16px/14px Tahoma, Verdana, sans-serif; - color: #c3c3c3; - text-decoration: none; - font-weight: bold; - background: transparent; -} -.leaflet-container a.leaflet-popup-close-button:hover { - color: #999; -} -.leaflet-popup-scrolled { - overflow: auto; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; -} -.leaflet-oldie .leaflet-popup-content-wrapper { - zoom: 1; -} -.leaflet-oldie .leaflet-popup-tip { - width: 24px; - margin: 0 auto; - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; - filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); -} -.leaflet-oldie .leaflet-popup-tip-container { - margin-top: -1px; -} -.leaflet-oldie .leaflet-control-zoom, -.leaflet-oldie .leaflet-control-layers, -.leaflet-oldie .leaflet-popup-content-wrapper, -.leaflet-oldie .leaflet-popup-tip { - border: 1px solid #999; -} -/* div icon */ -.leaflet-div-icon { - background: #fff; - border: 1px solid #666; + background-color: inherit; + opacity: 1; + filter: alpha(opacity=100); } /*------------------------------------- zTree Style @@ -1935,8 +1493,8 @@ website: http://code.google.com/p/jquerytree/ background-color: transparent; background-repeat: no-repeat; background-attachment: scroll; - background-image: url("ztree/img/zTreeStandard.png"); - *background-image: url("ztree/img/zTreeStandard.gif"); + background-image: url("third/ztree/img/zTreeStandard.png"); + *background-image: url("third/ztree/img/zTreeStandard.gif"); } .ztree li span.button.chk { width: 16px; @@ -2086,7 +1644,7 @@ website: http://code.google.com/p/jquerytree/ .ztree li span.button.ico_loading { width: 0px; margin-right: 2px; - background: url("ztree/img/loading.gif") no-repeat scroll 0 0 transparent; + background: url("third/ztree/img/loading.gif") no-repeat scroll 0 0 transparent; vertical-align: top; *vertical-align: middle; } @@ -2107,8 +1665,8 @@ span.tmpzTreeMove_arrow { background-repeat: no-repeat; background-attachment: scroll; background-position: -110px -80px; - background-image: url("ztree/img/zTreeStandard.png"); - *background-image: url("ztree/img/zTreeStandard.gif"); + background-image: url("third/ztree/img/zTreeStandard.png"); + *background-image: url("third/ztree/img/zTreeStandard.gif"); } ul.ztree.zTreeDragUL { margin: 0; @@ -2140,81 +1698,6 @@ ul.ztree.zTreeDragUL { /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-timeout-toast { - font-size: 14px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fddddd; - color: #e85050; -} -.bi-timeout-toast .cancel-button { - background: #ffffff; - border: 1px solid #d4dadd; - color: #1a1a1a; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-timeout-toast .cancel-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-timeout-toast .retry-button { - background: #009de3; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - color: #ffffff; -} -.bi-timeout-toast .retry-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-branch-tree .bi-branch-tree-view { - min-width: 300px; -} -.bi-click-branch-tree { - border: 1px solid #d4dadd; -} -.bi-click-branch-tree .bi-empty-view { - background: #f4f4f4; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-display-tree .ztree * { - color: #808080; -} -.bi-display-tree .ztree li span.button.switch.center_open { - background-image: url("icon/tree-vertical-line-3.png"); -} -.bi-display-tree .ztree li span.button.switch.roots_open { - background-image: url("icon/tree-vertical-line-2.png"); -} -.bi-display-tree .ztree li span.button.switch.bottom_open { - background-image: url("icon/tree-vertical-line-4.png"); -} -.bi-display-tree .ztree li a, -.bi-display-tree .ztree li span { - cursor: default !important; -} -.bi-display-tree .ztree li a:hover { - text-decoration: none; -} -.bi-display-tree .ztree li a.curSelectedNode { - padding-top: 1px; - border: none; - background-color: inherit; - opacity: 1; - filter: alpha(opacity=100); -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-trigger .bi-trigger-icon-button { border-left: 1px solid #d4dadd; font-size: 16px; @@ -2287,329 +1770,3 @@ ul.ztree.zTreeDragUL { .bi-list-view .list-view-toolbar > .first-element { border-left: none; } -.bi-flex-center-layout { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -o-justify-content: center; - justify-content: center; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} -.bi-flex-horizontal-layout { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: flex-start; - /* 12版 */ - -webkit-align-items: flex-start; - -moz-align-items: flex-start; - -ms-align-items: flex-start; - -o-align-items: flex-start; - align-items: flex-start; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; -} -.bi-flex-horizontal-layout.middle { - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} -.bi-flex-horizontal-layout.bottom { - /* 09版 */ - -webkit-box-align: flex-end; - /* 12版 */ - -webkit-align-items: flex-end; - -moz-align-items: flex-end; - -ms-align-items: flex-end; - -o-align-items: flex-end; - align-items: flex-end; -} -.bi-flex-vertical-center { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; -} -.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -o-justify-content: center; - justify-content: center; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - min-width: 100%; - min-height: 100%; - float: left; -} -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: flex-start; - /* 12版 */ - -webkit-align-items: flex-start; - -moz-align-items: flex-start; - -ms-align-items: flex-start; - -o-align-items: flex-start; - align-items: flex-start; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; - min-height: 100%; -} -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle { - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom { - /* 09版 */ - -webkit-box-align: flex-end; - /* 12版 */ - -webkit-align-items: flex-end; - -moz-align-items: flex-end; - -ms-align-items: flex-end; - -o-align-items: flex-end; - align-items: flex-end; -} -.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; - min-height: 100%; - float: left; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-inline-center-adapt-layout:after { - display: inline-block; - width: 0; - min-height: 100%; - vertical-align: middle; - content: ' '; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-inline-vertical-adapt-layout:after { - display: inline-block; - width: 0; - min-height: 100%; - vertical-align: middle; - content: ' '; -} diff --git a/dist/base.js b/dist/base.js index 14edec7ef8..0d8bb0ef1e 100644 --- a/dist/base.js +++ b/dist/base.js @@ -4150,7 +4150,7 @@ BI.Searcher = BI.inherit(BI.Widget, { this.fireEvent(BI.Searcher.EVENT_START); this.popupView.startSearch && this.popupView.startSearch(); //搜索前先清空dom - BI.Maskers.get(this.getName()).empty(); + // BI.Maskers.get(this.getName()).empty(); BI.nextTick(function (name) { BI.Maskers.show(name); }, this.getName()); @@ -4175,9 +4175,9 @@ BI.Searcher = BI.inherit(BI.Widget, { BI.Maskers.hide(name); if (BI.Maskers.has(name) && this._isSearching === true) { //搜索后清空dom - BI.nextTick(function () { - BI.Maskers.has(name) && BI.Maskers.get(name).empty(); - }); + // BI.nextTick(function () { + // BI.Maskers.has(name) && BI.Maskers.get(name).empty(); + // }); this.popupView && this.popupView.stopSearch && this.popupView.stopSearch(); this.fireEvent(BI.Searcher.EVENT_STOP); } diff --git a/dist/case.js b/dist/case.js index 7ea957f9bd..cf9e2ca55a 100644 --- a/dist/case.js +++ b/dist/case.js @@ -4896,6 +4896,335 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, { } }); $.shortcut("bi.down_list_select_text_trigger", BI.DownListSelectTextTrigger);/** + * 根据内容自适应长度的输入框 + * @class BI.AdaptiveEditor + * @extends BI.Single + */ +BI.AdaptiveEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.AdaptiveEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-adapt-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: true, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.AdaptiveEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.sign_editor", + element: this, + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + mouseOut: o.mouseOut, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_FOCUS); + }); + this.editor.on(BI.SignEditor.EVENT_BLUR, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_BLUR); + }); + this.editor.on(BI.SignEditor.EVENT_CLICK, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_CLICK); + }); + this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { + self._checkEditorLength(); + self.fireEvent(BI.AdaptiveEditor.EVENT_CHANGE); + }); + this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.AdaptiveEditor.EVENT_KEY_DOWN); + }); + + this.editor.on(BI.SignEditor.EVENT_VALID, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_VALID); + }); + this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_CONFIRM); + }); + this.editor.on(BI.SignEditor.EVENT_START, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_START); + }); + this.editor.on(BI.SignEditor.EVENT_PAUSE, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_STOP); + }); + this.editor.on(BI.SignEditor.EVENT_SPACE, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_SPACE); + }); + this.editor.on(BI.SignEditor.EVENT_ERROR, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_ERROR); + }); + this.editor.on(BI.SignEditor.EVENT_ENTER, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_ENTER); + }); + this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_RESTRICT); + }); + this.editor.on(BI.SignEditor.EVENT_EMPTY, function () { + self.fireEvent(BI.AdaptiveEditor.EVENT_EMPTY); + }); + this._checkEditorLength(); + }, + + _checkEditorLength: function () { + var o = this.options; + this.element.width(BI.DOM.getTextSizeWidth(this.getValue(), 14) + 2 * o.hgap + o.lgap + o.rgap); + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + setValue: function (k) { + this.editor.setValue(k); + this._checkEditorLength(); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.editor.getState(); + }, + + setState: function (v) { + + } +}); +BI.AdaptiveEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.AdaptiveEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.AdaptiveEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.AdaptiveEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.AdaptiveEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.AdaptiveEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.AdaptiveEditor.EVENT_START = "EVENT_START"; +BI.AdaptiveEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.AdaptiveEditor.EVENT_STOP = "EVENT_STOP"; +BI.AdaptiveEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.AdaptiveEditor.EVENT_VALID = "EVENT_VALID"; +BI.AdaptiveEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.AdaptiveEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.AdaptiveEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.AdaptiveEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.AdaptiveEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.adapt_editor", BI.AdaptiveEditor);/** + * 有清楚按钮的文本框 + * Created by GUY on 2015/9/29. + * @class BI.SmallTextEditor + * @extends BI.SearchEditor + */ +BI.ClearEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-clear-editor", + height: 30, + errorText: "", + watermark: "", + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn + }); + }, + _init: function () { + BI.ClearEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + watermark: o.watermark, + allowBlank: true, + errorText: o.errorText, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker + }); + this.clear = BI.createWidget({ + type: "bi.icon_button", + stopEvent: true, + cls: "search-close-h-font" + }); + this.clear.on(BI.IconButton.EVENT_CHANGE, function () { + self.setValue(""); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); + self.fireEvent(BI.ClearEditor.EVENT_CLEAR); + }); + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: this.editor + }, + { + el: this.clear, + width: 25 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.ClearEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.ClearEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.ClearEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self._checkClear(); + self.fireEvent(BI.ClearEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.ClearEditor.EVENT_SPACE) + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE) + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.ClearEditor.EVENT_VALID) + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.ClearEditor.EVENT_ERROR) + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.ClearEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.ClearEditor.EVENT_RESTRICT) + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self._checkClear(); + self.fireEvent(BI.ClearEditor.EVENT_EMPTY) + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + self.fireEvent(BI.ClearEditor.EVENT_REMOVE) + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.ClearEditor.EVENT_CONFIRM) + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.ClearEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.ClearEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.ClearEditor.EVENT_STOP); + }); + + this.clear.invisible(); + }, + + _checkClear: function () { + if (!this.getValue()) { + this.clear.invisible(); + } else { + this.clear.visible(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + getValue: function () { + if (this.isValid()) { + var res = this.editor.getValue().match(/[\S]+/g); + return BI.isNull(res) ? "" : res[res.length - 1]; + } + }, + + setValue: function (v) { + this.editor.setValue(v); + if (BI.isKey(v)) { + this.clear.visible(); + } + }, + + isValid: function () { + return this.editor.isValid(); + } +}); +BI.ClearEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ClearEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.ClearEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.ClearEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.ClearEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.ClearEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.ClearEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; +BI.ClearEditor.EVENT_CLEAR = "EVENT_CLEAR"; + +BI.ClearEditor.EVENT_START = "EVENT_START"; +BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.ClearEditor.EVENT_STOP = "EVENT_STOP"; +BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ClearEditor.EVENT_VALID = "EVENT_VALID"; +BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; +$.shortcut("bi.clear_editor", BI.ClearEditor);/** * guy * 记录内容的输入框 * @class BI.RecordEditor @@ -4965,73 +5294,729 @@ BI.RecordEditor = BI.inherit(BI.Single, { this.editor.on(BI.Editor.EVENT_CHANGE, function () { self.fireEvent(BI.RecordEditor.EVENT_CHANGE, arguments); }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.RecordEditor.EVENT_KEY_DOWN, arguments); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.RecordEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.RecordEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.RecordEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.setState(self.getValue()); + self.editor.isValid() && self.editor.setValue(""); + self.fireEvent(BI.RecordEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.RecordEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.RecordEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.RecordEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.RecordEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self._checkInputState(); + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + if (!BI.isEmpty(self.contents)) { + self.contents.pop().destroy(); + self.setValue(self.getValue()); + self._adjustInputWidth(); + } + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.RecordEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.RecordEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.RecordEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.inline", + element: this, + items: [this.textContainer, this.editor] + }); + BI.ResizeDetector.addResizeListener(this, BI.bind(this._adjustInputWidth, this)); + this._adjustInputWidth(); + }, + + _adjustInputWidth: function () { + BI.nextTick(BI.bind(function () { + this.editor.element.css("width", this.element.width() - this.textContainer.element.outerWidth() - 10); + }, this)); + }, + + _checkInputState: function () { + if (BI.isEmpty(this.contents)) { + this.editor.enableWarterMark(); + } else { + this.editor.disableWarterMark(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + var values = BI.map(this.contents, function (i, lb) { + return lb.getText(); + }); + if (BI.isNotEmptyString(this.editor.getValue())) { + return values.concat([this.editor.getValue()]); + } + return values; + }, + + setState: function (v) { + BI.RecordEditor.superclass.setValue.apply(this, arguments); + v = BI.isArray(v) ? v : (v == "" ? [] : [v]); + var contents = this.contents = []; + BI.each(v, function (i, lb) { + contents.push(BI.createWidget({ + type: "bi.label", + height: 25, + cls: "record-editor-text", + text: lb + })) + }); + this.textContainer.empty(); + this.textContainer.populate(contents); + this.editor.isValid() && this.editor.setValue(""); + this._checkInputState(); + this._adjustInputWidth(); + }, + + destroy: function () { + BI.Resizers.remove(this.getName()); + BI.RecordEditor.superclass.destroy.apply(this, arguments); + } +}); +BI.RecordEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.RecordEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.RecordEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.RecordEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.RecordEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; + +BI.RecordEditor.EVENT_START = "EVENT_START"; +BI.RecordEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.RecordEditor.EVENT_STOP = "EVENT_STOP"; +BI.RecordEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.RecordEditor.EVENT_VALID = "EVENT_VALID"; +BI.RecordEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.RecordEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.RecordEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.RecordEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.RecordEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.record_editor", BI.RecordEditor);/** + * Created by roy on 15/9/14. + */ +BI.SearchEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-search-editor", + height: 30, + errorText: "", + watermark: BI.i18nText("BI-Basic_Search"), + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn + }); + }, + _init: function () { + this.options.height -= 2; + BI.SearchEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + watermark: o.watermark, + allowBlank: true, + errorText: o.errorText, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker + }); + this.clear = BI.createWidget({ + type: "bi.icon_button", + stopEvent: true, + cls: "search-close-h-font" + }); + this.clear.on(BI.IconButton.EVENT_CHANGE, function () { + self.setValue(""); + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); + self.fireEvent(BI.SearchEditor.EVENT_CLEAR); + }); + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: { + type: "bi.center_adapt", + cls: "search-font", + items: [{ + el: { + type: "bi.icon" + } + }] + }, + width: 25 + }, + { + el: self.editor + }, + { + el: this.clear, + width: 25 + } + ] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.SearchEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.SearchEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.SearchEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self._checkClear(); + self.fireEvent(BI.SearchEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.SearchEditor.EVENT_SPACE) + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { + self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE) + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.SearchEditor.EVENT_VALID) + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.SearchEditor.EVENT_ERROR) + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.SearchEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SearchEditor.EVENT_RESTRICT) + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self._checkClear(); + self.fireEvent(BI.SearchEditor.EVENT_EMPTY) + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function () { + self.fireEvent(BI.SearchEditor.EVENT_REMOVE) + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.SearchEditor.EVENT_CONFIRM) + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.SearchEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.SearchEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.SearchEditor.EVENT_STOP); + }); + + this.clear.invisible(); + }, + + _checkClear: function () { + if (!this.getValue()) { + this.clear.invisible(); + } else { + this.clear.visible(); + } + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + getValue: function () { + if (this.isValid()) { + var res = this.editor.getValue().match(/[\S]+/g); + return BI.isNull(res) ? "" : res[res.length - 1]; + } + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (v) { + this.editor.setValue(v); + if (BI.isKey(v)) { + this.clear.visible(); + } + }, + + setValid: function (b) { + this.editor.setValid(b); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setEnable: function (b) { + BI.Editor.superclass.setEnable.apply(this, arguments); + this.editor && this.editor.setEnable(b); + this.clear.setEnabled(b); + } +}); +BI.SearchEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SearchEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SearchEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SearchEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SearchEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SearchEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SearchEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; +BI.SearchEditor.EVENT_CLEAR = "EVENT_CLEAR"; + +BI.SearchEditor.EVENT_START = "EVENT_START"; +BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SearchEditor.EVENT_STOP = "EVENT_STOP"; +BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SearchEditor.EVENT_VALID = "EVENT_VALID"; +BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY"; +$.shortcut("bi.search_editor", BI.SearchEditor);/** + * 小号搜索框 + * Created by GUY on 2015/9/29. + * @class BI.SmallSearchEditor + * @extends BI.SearchEditor + */ +BI.SmallSearchEditor = BI.inherit(BI.SearchEditor, { + _defaultConfig: function () { + var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-small-search-editor", + height: 24 + }); + }, + + _init: function () { + BI.SmallSearchEditor.superclass._init.apply(this, arguments); + } +}); +$.shortcut("bi.small_search_editor", BI.SmallSearchEditor);/** + * 带标记的文本框 + * Created by GUY on 2016/1/25. + * @class BI.ShelterEditor + * @extends BI.Single + */ +BI.ShelterEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-shelter-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: true, + watermark: "", + errorText: "", + height: 30, + textAlign: "left" + }) + }, + + _init: function () { + BI.ShelterEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + mouseOut: o.mouseOut, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "shelter-editor-text", + textAlign: o.textAlign, + height: o.height, + hgap: 4 + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.text.on(BI.Controller.EVENT_CHANGE, function () { + arguments[2] = self; + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL); + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.ShelterEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setTextStyle: function (style) { + this.text.setStyle(style); + }, + + setValue: function (k) { + this.editor.setValue(k); + this._checkText(); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + this._showHint(); + this.text.setValue(v); + } +}); +BI.ShelterEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ShelterEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.ShelterEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.ShelterEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.ShelterEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.ShelterEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.ShelterEditor.EVENT_START = "EVENT_START"; +BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.ShelterEditor.EVENT_STOP = "EVENT_STOP"; +BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ShelterEditor.EVENT_VALID = "EVENT_VALID"; +BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.ShelterEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.ShelterEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.ShelterEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.shelter_editor", BI.ShelterEditor);/** + * sign是新值(初始value值)形式的自适应宽度的输入框 + * @class BI.SignInitialEditor + * @extends BI.Single + */ +BI.SignInitialEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.SignInitialEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-sign-initial-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: true, + watermark: "", + errorText: "", + value: "", + text: "", + height: 30 + }) + }, + + _init: function () { + BI.SignInitialEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.sign_editor", + element: this, + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value || o.text, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + mouseOut: o.mouseOut, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + if(BI.isNotNull(o.value)){ + this.setState(o.value); + } + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS); + }); + this.editor.on(BI.SignEditor.EVENT_BLUR, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_BLUR); }); - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.RecordEditor.EVENT_VALID, arguments); + this.editor.on(BI.SignEditor.EVENT_CLICK, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CLICK); }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.RecordEditor.EVENT_SPACE, arguments); + this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE); }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.setState(self.getValue()); - self.editor.isValid() && self.editor.setValue(""); - self.fireEvent(BI.RecordEditor.EVENT_CONFIRM, arguments); + this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN); }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.RecordEditor.EVENT_START, arguments); + + this.editor.on(BI.SignEditor.EVENT_VALID, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_VALID); }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.RecordEditor.EVENT_PAUSE, arguments); + this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { + self.setState(self.editor.getValue()); + self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM); }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.RecordEditor.EVENT_STOP, arguments); + this.editor.on(BI.SignEditor.EVENT_START, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_START); }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.RecordEditor.EVENT_ENTER, arguments); + this.editor.on(BI.SignEditor.EVENT_PAUSE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE); }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self._checkInputState(); + this.editor.on(BI.SignEditor.EVENT_STOP, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_STOP); }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - if (!BI.isEmpty(self.contents)) { - self.contents.pop().destroy(); - self.setValue(self.getValue()); - self._adjustInputWidth(); - } + this.editor.on(BI.SignEditor.EVENT_SPACE, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_SPACE); }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.RecordEditor.EVENT_ERROR, arguments); + this.editor.on(BI.SignEditor.EVENT_ERROR, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_ERROR); }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.RecordEditor.EVENT_RESTRICT, arguments); + this.editor.on(BI.SignEditor.EVENT_ENTER, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_ENTER); }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.RecordEditor.EVENT_EMPTY, arguments); + this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT); }); - BI.createWidget({ - type: "bi.inline", - element: this, - items: [this.textContainer, this.editor] + this.editor.on(BI.SignEditor.EVENT_EMPTY, function () { + self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY); }); - BI.ResizeDetector.addResizeListener(this, BI.bind(this._adjustInputWidth, this)); - this._adjustInputWidth(); - }, - - _adjustInputWidth: function () { - BI.nextTick(BI.bind(function () { - this.editor.element.css("width", this.element.width() - this.textContainer.element.outerWidth() - 10); - }, this)); - }, - - _checkInputState: function () { - if (BI.isEmpty(this.contents)) { - this.editor.enableWarterMark(); - } else { - this.editor.disableWarterMark(); - } }, focus: function () { @@ -5054,84 +6039,57 @@ BI.RecordEditor = BI.inherit(BI.Single, { return this.editor.getErrorText(); }, - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - - setValue: function (k) { - this.editor.setValue(k); + setValue: function (v) { + this.editor.setValue(v.value); + this.setState(v.value); }, getValue: function () { - return this.editor.getValue(); + return { + value: this.editor.getValue(), + text: this.options.text + } }, getState: function () { - var values = BI.map(this.contents, function (i, lb) { - return lb.getText(); - }); - if (BI.isNotEmptyString(this.editor.getValue())) { - return values.concat([this.editor.getValue()]); - } - return values; + return this.editor.getState(); }, setState: function (v) { - BI.RecordEditor.superclass.setValue.apply(this, arguments); - v = BI.isArray(v) ? v : (v == "" ? [] : [v]); - var contents = this.contents = []; - BI.each(v, function (i, lb) { - contents.push(BI.createWidget({ - type: "bi.label", - height: 25, - cls: "record-editor-text", - text: lb - })) - }); - this.textContainer.empty(); - this.textContainer.populate(contents); - this.editor.isValid() && this.editor.setValue(""); - this._checkInputState(); - this._adjustInputWidth(); - }, - - destroy: function () { - BI.Resizers.remove(this.getName()); - BI.RecordEditor.superclass.destroy.apply(this, arguments); + var o = this.options; + v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; + this.editor.setState(v); } }); -BI.RecordEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.RecordEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.RecordEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.RecordEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.RecordEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; - -BI.RecordEditor.EVENT_START = "EVENT_START"; -BI.RecordEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.RecordEditor.EVENT_STOP = "EVENT_STOP"; -BI.RecordEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.RecordEditor.EVENT_VALID = "EVENT_VALID"; -BI.RecordEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.RecordEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.RecordEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.RecordEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.RecordEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.record_editor", BI.RecordEditor);/** +BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignInitialEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignInitialEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignInitialEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignInitialEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignInitialEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SignInitialEditor.EVENT_START = "EVENT_START"; +BI.SignInitialEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignInitialEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignInitialEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignInitialEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignInitialEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignInitialEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignInitialEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignInitialEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignInitialEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.sign_initial_editor", BI.SignInitialEditor);/** * 带标记的文本框 - * Created by GUY on 2016/1/25. - * @class BI.ShelterEditor + * Created by GUY on 2015/8/28. + * @class BI.SignEditor * @extends BI.Single */ -BI.ShelterEditor = BI.inherit(BI.Single, { +BI.SignEditor = BI.inherit(BI.Single, { _defaultConfig: function () { - var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments); + var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-shelter-editor", + baseCls: (conf.baseCls || "") + " bi-sign-editor", hgap: 4, vgap: 2, lgap: 0, @@ -5144,13 +6102,12 @@ BI.ShelterEditor = BI.inherit(BI.Single, { allowBlank: true, watermark: "", errorText: "", - height: 30, - textAlign: "left" + height: 30 }) }, _init: function () { - BI.ShelterEditor.superclass._init.apply(this, arguments); + BI.SignEditor.superclass._init.apply(this, arguments); var self = this, o = this.options; this.editor = BI.createWidget({ type: "bi.editor", @@ -5171,10 +6128,20 @@ BI.ShelterEditor = BI.inherit(BI.Single, { }); this.text = BI.createWidget({ type: "bi.text_button", - cls: "shelter-editor-text", - textAlign: o.textAlign, + cls: "sign-editor-text", + textAlign: "left", height: o.height, - hgap: 4 + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL) + }); }); BI.createWidget({ type: "bi.absolute", @@ -5187,64 +6154,57 @@ BI.ShelterEditor = BI.inherit(BI.Single, { bottom: 0 }] }); - this.text.on(BI.Controller.EVENT_CHANGE, function () { - arguments[2] = self; - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL); - }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); }); this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments); + self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments); }); this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments); + self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments); }); this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments); + self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments); }); this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments); + self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments); }); this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments); + self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); }); this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments); + self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); }); this.editor.on(BI.Editor.EVENT_CONFIRM, function () { self._showHint(); self._checkText(); - self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments); + self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments); }); this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.ShelterEditor.EVENT_START, arguments); + self.fireEvent(BI.SignEditor.EVENT_START, arguments); }); this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments); + self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments); }); this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments); + self.fireEvent(BI.SignEditor.EVENT_STOP, arguments); }); this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments); + self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments); }); this.editor.on(BI.Editor.EVENT_ERROR, function () { self._checkText(); - self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments); + self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments); }); this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments); + self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments); }); this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments); + self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments); }); this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); + self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments); }); BI.createWidget({ type: "bi.vertical", @@ -5258,13 +6218,15 @@ BI.ShelterEditor = BI.inherit(BI.Single, { _checkText: function () { var o = this.options; - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.text.element.removeClass("bi-water-mark"); - } + BI.nextTick(BI.bind(function () { + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, this)); }, _showInput: function () { @@ -5314,6 +6276,11 @@ BI.ShelterEditor = BI.inherit(BI.Single, { return this.editor.isValid(); }, + setValid: function(v){ + BI.SignEditor.superclass.setValid.apply(this, arguments); + this.editor.setValid(v); + }, + setErrorText: function (text) { this.editor.setErrorText(text); }, @@ -5330,10 +6297,6 @@ BI.ShelterEditor = BI.inherit(BI.Single, { return this.editor.getLastValidValue(); }, - setTextStyle: function (style) { - this.text.setStyle(style); - }, - setValue: function (k) { this.editor.setValue(k); this._checkText(); @@ -5352,35 +6315,40 @@ BI.ShelterEditor = BI.inherit(BI.Single, { this.text.setValue(v); } }); -BI.ShelterEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.ShelterEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.ShelterEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.ShelterEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.ShelterEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.ShelterEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; +BI.SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; -BI.ShelterEditor.EVENT_START = "EVENT_START"; -BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.ShelterEditor.EVENT_STOP = "EVENT_STOP"; -BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.ShelterEditor.EVENT_VALID = "EVENT_VALID"; -BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.ShelterEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.ShelterEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.ShelterEditor.EVENT_EMPTY = "EVENT_EMPTY"; +BI.SignEditor.EVENT_START = "EVENT_START"; +BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; -$.shortcut("bi.shelter_editor", BI.ShelterEditor);/** - * 带标记的文本框 - * Created by GUY on 2015/8/28. - * @class BI.SignEditor +$.shortcut("bi.sign_editor", BI.SignEditor);/** + * sign标签分两段,可以自定义样式 + * @class BI.SignStyleEditor * @extends BI.Single */ -BI.SignEditor = BI.inherit(BI.Single, { +BI.SignStyleEditor = BI.inherit(BI.Single, { + + constants: { + tipTextGap: 4 + }, + _defaultConfig: function () { - var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments); + var conf = BI.SignStyleEditor.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-editor", + baseCls: (conf.baseCls || "") + " bi-sign-style-editor", + text: "", hgap: 4, vgap: 2, lgap: 0, @@ -5390,7 +6358,7 @@ BI.SignEditor = BI.inherit(BI.Single, { validationChecker: BI.emptyFn, quitChecker: BI.emptyFn, mouseOut: false, - allowBlank: true, + allowBlank: false, watermark: "", errorText: "", height: 30 @@ -5398,7 +6366,7 @@ BI.SignEditor = BI.inherit(BI.Single, { }, _init: function () { - BI.SignEditor.superclass._init.apply(this, arguments); + BI.SignStyleEditor.superclass._init.apply(this, arguments); var self = this, o = this.options; this.editor = BI.createWidget({ type: "bi.editor", @@ -5419,7 +6387,7 @@ BI.SignEditor = BI.inherit(BI.Single, { }); this.text = BI.createWidget({ type: "bi.text_button", - cls: "sign-editor-text", + cls: "sign-style-editor-text", textAlign: "left", height: o.height, hgap: 4, @@ -5429,73 +6397,90 @@ BI.SignEditor = BI.inherit(BI.Single, { self.editor.selectAll(); } }); + + this.tipText = BI.createWidget({ + type: "bi.text_button", + cls: "sign-style-editor-tip", + textAlign: "right", + rgap: 4, + height: o.height, + text: o.text, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { BI.nextTick(function () { - self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL) + self.fireEvent(BI.SignStyleEditor.EVENT_CLICK_LABEL) }); }); - BI.createWidget({ - type: "bi.absolute", + + this.tipText.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(BI.SignStyleEditor.EVENT_CLICK_LABEL) + }); + }); + + this.wrap = BI.createWidget({ + type: "bi.htape", element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] + items: [this.text, this.tipText] }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); }); this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_FOCUS); }); this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_BLUR); }); this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_CLICK); }); this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_CHANGE); }); this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_KEY_DOWN); }); this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_VALID); }); this.editor.on(BI.Editor.EVENT_CONFIRM, function () { self._showHint(); self._checkText(); - self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments); + self._resizeLayout(); + self.fireEvent(BI.SignStyleEditor.EVENT_CONFIRM); }); this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SignEditor.EVENT_START, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_START); }); this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_PAUSE); }); this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SignEditor.EVENT_STOP, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_STOP); }); this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_SPACE); }); this.editor.on(BI.Editor.EVENT_ERROR, function () { - self._checkText(); - self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_ERROR); }); this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_ENTER); }); this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_RESTRICT); }); this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments); + self.fireEvent(BI.SignStyleEditor.EVENT_EMPTY); }); BI.createWidget({ type: "bi.vertical", @@ -5504,30 +6489,43 @@ BI.SignEditor = BI.inherit(BI.Single, { items: [this.editor] }); this._showHint(); - self._checkText(); + this._checkText(); + + BI.nextTick(function () { + var tipTextSize = self.text.element.getStyle("font-size"); + self.tipTextSize = tipTextSize.substring(0, tipTextSize.length - 2); + self._resizeLayout(); + }); }, _checkText: function () { var o = this.options; - BI.nextTick(BI.bind(function () { - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.text.element.removeClass("bi-water-mark"); - } - }, this)); + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.tipText.setValue("(" + o.text + ")"); + this.text.element.removeClass("bi-water-mark"); + } + this.setTitle(this.text.getValue() + this.tipText.getValue()); }, _showInput: function () { - this.editor.visible(); - this.text.invisible(); + this.editor.setVisible(true); + this.text.setVisible(false); + this.tipText.setVisible(false); }, _showHint: function () { - this.editor.invisible(); - this.text.visible(); + this.editor.setVisible(false); + this.text.setVisible(true); + this.tipText.setVisible(true); + }, + + _resizeLayout: function () { + this.wrap.attr("items")[0].width = BI.DOM.getTextSizeWidth(this.text.getValue(), this.tipTextSize) + 2 * this.constants.tipTextGap; + this.wrap.resize(); }, focus: function () { @@ -5541,37 +6539,10 @@ BI.SignEditor = BI.inherit(BI.Single, { this._checkText(); }, - doRedMark: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doHighLight: function () { - if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { - return; - } - this.text.doHighLight.apply(this.text, arguments); - }, - - unHighLight: function () { - this.text.unHighLight.apply(this.text, arguments); - }, - isValid: function () { return this.editor.isValid(); }, - setValid: function(v){ - BI.SignEditor.superclass.setValid.apply(this, arguments); - this.editor.setValid(v); - }, - setErrorText: function (text) { this.editor.setErrorText(text); }, @@ -5580,17 +6551,11 @@ BI.SignEditor = BI.inherit(BI.Single, { return this.editor.getErrorText(); }, - isEditing: function () { - return this.editor.isEditing(); - }, - - getLastValidValue: function () { - return this.editor.getLastValidValue(); - }, - setValue: function (k) { + BI.SignStyleEditor.superclass.setValue.apply(this, arguments); this.editor.setValue(k); this._checkText(); + this._resizeLayout(); }, getValue: function () { @@ -5598,33 +6563,36 @@ BI.SignEditor = BI.inherit(BI.Single, { }, getState: function () { - return this.text.getValue(); + return this.options.text; }, setState: function (v) { + var o = this.options; + o.text = v; this._showHint(); - this.text.setValue(v); + this.tipText.setValue("(" + v + ")"); + this._checkText(); } }); -BI.SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignEditor.EVENT_START = "EVENT_START"; -BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.sign_editor", BI.SignEditor);/** +BI.SignStyleEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.SignStyleEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SignStyleEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.SignStyleEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.SignStyleEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.SignStyleEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + +BI.SignStyleEditor.EVENT_START = "EVENT_START"; +BI.SignStyleEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.SignStyleEditor.EVENT_STOP = "EVENT_STOP"; +BI.SignStyleEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.SignStyleEditor.EVENT_VALID = "EVENT_VALID"; +BI.SignStyleEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.SignStyleEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.SignStyleEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.SignStyleEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.SignStyleEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.sign_style_editor", BI.SignStyleEditor);/** * guy * 记录状态的输入框 * @class BI.StateEditor @@ -6165,6 +7133,194 @@ BI.SimpleStateEditor.EVENT_SPACE = "EVENT_SPACE"; BI.SimpleStateEditor.EVENT_EMPTY = "EVENT_EMPTY"; $.shortcut("bi.simple_state_editor", BI.SimpleStateEditor);/** + * guy + * @class BI.TextEditor + * @extends BI.Single + */ +BI.TextEditor = BI.inherit(BI.Single, { + _defaultConfig: function () { + var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + extraCls: "bi-text-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + mouseOut: false, + allowBlank: false, + watermark: "", + errorText: "", + height: 30 + }) + }, + + _init: function () { + BI.TextEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (BI.isNumber(o.height)) { + this.element.css({height: o.height - 2}); + } + if (BI.isNumber(o.width)) { + this.element.css({width: o.width - 2}); + } + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height - 2, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + mouseOut: o.mouseOut, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(BI.TextEditor.EVENT_FOCUS); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(BI.TextEditor.EVENT_BLUR); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(BI.TextEditor.EVENT_CLICK); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(BI.TextEditor.EVENT_CHANGE); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_SPACE); + }); + this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_BACKSPACE); + }); + + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(BI.TextEditor.EVENT_VALID); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self.fireEvent(BI.TextEditor.EVENT_CONFIRM); + }); + this.editor.on(BI.Editor.EVENT_REMOVE, function (v) { + self.fireEvent(BI.TextEditor.EVENT_REMOVE); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(BI.TextEditor.EVENT_START); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(BI.TextEditor.EVENT_PAUSE); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(BI.TextEditor.EVENT_STOP); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent(BI.TextEditor.EVENT_ERROR); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(BI.TextEditor.EVENT_ENTER); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(BI.TextEditor.EVENT_RESTRICT); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(BI.TextEditor.EVENT_EMPTY); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + }, + + focus: function () { + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setValue: function (v) { + this.editor.setValue(v); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + setEnable: function (b) { + BI.Editor.superclass.setEnable.apply(this, arguments); + this.editor && this.editor.setEnable(b); + } +}); +BI.TextEditor.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TextEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.TextEditor.EVENT_BLUR = "EVENT_BLUR"; +BI.TextEditor.EVENT_CLICK = "EVENT_CLICK"; +BI.TextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +BI.TextEditor.EVENT_SPACE = "EVENT_SPACE"; +BI.TextEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; + +BI.TextEditor.EVENT_START = "EVENT_START"; +BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE"; +BI.TextEditor.EVENT_STOP = "EVENT_STOP"; +BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.TextEditor.EVENT_VALID = "EVENT_VALID"; +BI.TextEditor.EVENT_ERROR = "EVENT_ERROR"; +BI.TextEditor.EVENT_ENTER = "EVENT_ENTER"; +BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; +BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; +BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; + +$.shortcut("bi.text_editor", BI.TextEditor);/** + * 小号搜索框 + * Created by GUY on 2015/9/29. + * @class BI.SmallTextEditor + * @extends BI.SearchEditor + */ +BI.SmallTextEditor = BI.inherit(BI.TextEditor, { + _defaultConfig: function () { + var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-small-text-editor", + height: 25 + }); + }, + + _init: function () { + BI.SmallTextEditor.superclass._init.apply(this, arguments); + } +}); +$.shortcut("bi.small_text_editor", BI.SmallTextEditor);/** * 有确定取消按钮的弹出层 * @class BI.BarFloatSection * @extends BI.FloatSection diff --git a/dist/core.css b/dist/core.css index 30b90d3c5e..95c5fae838 100644 --- a/dist/core.css +++ b/dist/core.css @@ -3371,7 +3371,7 @@ textarea::-webkit-scrollbar-thumb { _background: none; } .loading-background { - background: url('icon/loading.gif') no-repeat center center; + background: url('background/loading.gif') no-repeat center center; _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='icon/loading.gif'); _background: none; } diff --git a/dist/farbtastic/marker.png b/dist/third/farbtastic/marker.png similarity index 100% rename from dist/farbtastic/marker.png rename to dist/third/farbtastic/marker.png diff --git a/dist/farbtastic/mask.png b/dist/third/farbtastic/mask.png similarity index 100% rename from dist/farbtastic/mask.png rename to dist/third/farbtastic/mask.png diff --git a/dist/farbtastic/wheel.png b/dist/third/farbtastic/wheel.png similarity index 100% rename from dist/farbtastic/wheel.png rename to dist/third/farbtastic/wheel.png diff --git a/dist/ztree/img/line_conn.gif b/dist/third/ztree/img/line_conn.gif similarity index 100% rename from dist/ztree/img/line_conn.gif rename to dist/third/ztree/img/line_conn.gif diff --git a/dist/ztree/img/loading.gif b/dist/third/ztree/img/loading.gif similarity index 100% rename from dist/ztree/img/loading.gif rename to dist/third/ztree/img/loading.gif diff --git a/dist/ztree/img/zTreeStandard.gif b/dist/third/ztree/img/zTreeStandard.gif similarity index 100% rename from dist/ztree/img/zTreeStandard.gif rename to dist/third/ztree/img/zTreeStandard.gif diff --git a/dist/ztree/img/zTreeStandard.png b/dist/third/ztree/img/zTreeStandard.png similarity index 100% rename from dist/ztree/img/zTreeStandard.png rename to dist/third/ztree/img/zTreeStandard.png diff --git a/dist/widget.css b/dist/widget.css index e8ed9dbd0c..300750cb60 100644 --- a/dist/widget.css +++ b/dist/widget.css @@ -58,12 +58,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-icon-combo.bi-combo-popup .bi-icon-combo-trigger .b-font:before { - color: #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-adapt-editor .adapt-editor-text { font-size: 14px; } @@ -130,131 +124,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-loading-main-background { - background-color: #ffffff; - opacity: 0.7; - filter: alpha(opacity=70); -} -.bi-loading-mask-content .loading-bar-label { - font-size: 20px; - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-line-segment-button.active .line-segment-button-line { - background: #009de3; -} -.bi-line-segment-button.disabled, -.bi-line-segment-button.disabled:hover, -.bi-line-segment-button.disabled:active { - color: #1a1a1a; - background: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-line-segment { - border-bottom: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-helper { - background-color: #009de3; - font-size: 13px; - color: #ffffff; - cursor: url('cursor/cursor_drag_hand.cur'), auto; - opacity: 0.7; -} -.bi-helper.dragging-modify { - background: none; -} -.bi-helper.dragging-modify .helper-warning { - color: #1a1a1a; - border: 1px solid #e85050; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar-bar { - background: #eaeaea; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar .progress-bar-label { - font-weight: bold; - font-family: "微软雅黑"; - color: #009de3; -} -.bi-progress-bar .progress-bar-label.success { - color: #0c6d23; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar-processor { - background: #009de3; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; -} -.bi-progress-bar-processor.success { - background: #58cc7d; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-chooser-popup .color-chooser-popup-title { - background: #f4f4f4; - border-bottom: 1px solid #d4dadd; -} -.bi-color-chooser-popup .color-chooser-popup-more { - background: #f4f4f4; -} -.bi-color-chooser-popup .color-chooser-popup-more:hover { - background: #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-chooser-trigger { - background: #ffffff; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - box-shadow: 0px 0px 2px 1px #d4dadd inset; - -webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset; - -moz-box-shadow: 0px 0px 2px 1px #d4dadd inset; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-copy2group-add-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fff5c1; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.copy2_group_search_pane { - background: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-date-picker { background: #f4f4f4; } @@ -305,19 +174,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sheet-tab-dynamic-button { - background: #eaeaea; - border-top: 1px solid #d4dadd; -} -.bi-sheet-tab-dynamic-button .bi-icon-button-scroll { - border: 1px solid #eaeaea; -} -.bi-sheet-tab-dynamic-button .bi-icon-button-scroll:hover { - border-color: #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ @@ -369,56 +225,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-item { - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-filter-item .filter-item-empty-item { - border-top: 1px solid #d4dadd; -} -.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf { - border: 1px dashed #178cdf; - background: #58cc7d; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-expander { - min-width: 100%; - border-right: 0px; - border-bottom: 0px; -} -.bi-filter-expander > .filter-item-empty-item { - border-top: 0px; - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-filter-expander > table { - min-width: 100%; -} -.bi-filter-expander > table > tbody > tr > td.first-element { - width: 20px; - border-right: 1px solid #d4dadd !important; - border-bottom: 1px solid #d4dadd !important; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-pane { - min-width: 100%; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border-top: 1px solid #d4dadd; - border-left: 1px solid #d4dadd; -} -.bi-filter-pane .condition-container { - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-fine-tuning-number-editor { border: 1px solid #d4dadd; -webkit-border-radius: 2px; @@ -435,103 +241,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-search-edit { - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-symbol-group .symbol-button:hover, -.bi-formula-symbol-group .symbol-button.hover, -.bi-formula-symbol-group .symbol-button:active, -.bi-formula-symbol-group .symbol-button.active { - color: #009de3; - background-color: #f4f4f4; - border: 1px solid #d4dadd; -} -.bi-formula-symbol-group .symbol-button { - color: #009de3; - border: 1px solid #ffffff; -} -.symbol-group-column { - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-insert .more-function-button { - color: #009de3; -} -.bi-formula-insert .bi-formula-field-pane { - border-top: 1px solid #d4dadd; - border-left: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-formula-insert .bi-formula-editor { - border-left: 1px solid #d4dadd; - border-top: 1px solid #d4dadd; - border-right: 1px solid #d4dadd; -} -.bi-formula-insert .bi-water-mark { - font-size: 14px; -} -.bi-formula-insert .proxy_div { - font-size: 13px; - background-color: #009de3; - color: #ffffff; - opacity: 0.7; - cursor: pointer; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-button-text-tree-item:hover, -.bi-button-text-tree-item.hover { - background-color: #f4f4f4; -} -.bi-button-text-tree-item.active { - color: #009de3; - background-color: #f4f4f4; -} -.bi-button-text-tree-item.disabled, -.bi-button-text-tree-item.disabled:hover, -.bi-button-text-tree-item.disabled:active { - background-color: #ffffff; -} -.bi-button-text-tree-item .formula-function-insert-button { - color: #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-function-pane .style-inner { - border-left: 1px solid #d4dadd; - border-top: 1px solid #d4dadd; -} -.bi-formula-function-pane .style-top { - border-top: 1px solid #d4dadd; -} -.bi-formula-function-pane .style-left { - border-left: 1px solid #d4dadd; -} -.bi-formula-function-pane { - background-color: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-field-tree { - background-color: #f4f4f4; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-function-tree { - background-color: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-image-button-href .image-button-href-icon-button { z-index: 1; font-size: 16px; @@ -575,114 +284,17 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-list-label { - font-size: 14px; -} -.bi-list-label .list-label-button:hover { - color: #e85050; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-month-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-move2group-add-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fff5c1; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.move2_group_search_pane { - background: #ffffff; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-combo { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-daycard .bi-multidate-inner-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-monthcard .bi-multidate-inner-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-popup .bi-multidate-popup-label { - color: #009de3; - font-size: 14px; - border-left: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; - border-top: 1px solid #eaeaea; -} -.bi-multidate-popup .bi-multidate-popup-tab { - border-bottom: 1px solid #eaeaea; -} -.bi-multidate-popup .bi-multidate-popup-item:active, -.bi-multidate-popup .bi-multidate-popup-item.active { - background-color: #009de3; - color: #ffffff; - -webkit-border-radius: 2px 2px 0 0; - -moz-border-radius: 2px 2px 0 0; - border-radius: 2px 2px 0 0; -} -.bi-multidate-popup .bi-multidate-popup-button { - color: #009de3; - font-size: 14px; - border-top: 1px solid #eaeaea; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-quartercard .bi-multidate-inner-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-segment .bi-multidate-normal-label { - color: #1a1a1a; -} -.bi-multidate-segment .bi-multidate-editor { - font-size: 14px; -} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-weekcard .bi-multidate-inner-label { - color: #808080; -} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-yearcard .bi-multidate-inner-label { - color: #808080; +.bi-month-trigger { + border: 1px solid #d4dadd; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; } /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ @@ -936,69 +548,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-date-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-date-interval-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param0-date-item .param-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param1-date-item .param-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param2-date-item .param-label { - color: #808080; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-month-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-season-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-path-chooser .path-chooser-radio { z-index: 1; } @@ -1083,247 +632,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-search-result-pane .search-result-line { - border-top: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-searcher { - font-size: 13px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-search-segment .search-segment-field-table > .first-element { - -webkit-border-radius: 3px 0px 0px 3px; - -moz-border-radius: 3px 0px 0px 3px; - border-radius: 3px 0px 0px 3px; -} -.bi-select-data-search-segment .search-segment-field-table > .last-element { - -webkit-border-radius: 0px 3 3px 0px; - -moz-border-radius: 0px 3 3px 0px; - border-radius: 0px 3 3px 0px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level0-node .select-data-selected-count-label { - color: #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level1-node .select-data-selected-count-label { - color: #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level0-item .select-data-level0-item-button { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.bi-select-data-level0-item .select-data-level0-item-button:hover, -.bi-select-data-level0-item .select-data-level0-item-button.hover { - color: #009de3; - background-color: #f4f4f4; -} -.bi-select-data-level0-item .select-data-level0-item-button:active, -.bi-select-data-level0-item .select-data-level0-item-button.active { - color: #ffffff; - background-color: #009de3; -} -.bi-select-data-level0-item .select-data-level0-item-button:active .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.active .bi-high-light { - color: #ffffff; -} -.bi-select-data-level0-item .select-data-level0-item-button.disabled, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:hover, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:active { - color: #c4c6c6 !important; - background-color: #ffffff !important; -} -.bi-select-data-level0-item .select-data-level0-item-button.disabled .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:hover .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:active .bi-high-light { - color: #c4c6c6 !important; -} -.bi-select-data-level0-item .select-data-top-line, -.bi-select-data-level0-item .select-data-bottom-line { - background-color: #009de3; -} -.bi-select-data-level0-item.select-data-item-top .select-data-level0-item-button { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.bi-select-data-level0-item.select-data-item-bottom .select-data-level0-item-button { - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level1-item .select-data-level1-item-button { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.bi-select-data-level1-item .select-data-level1-item-button:hover, -.bi-select-data-level1-item .select-data-level1-item-button.hover { - color: #009de3; - background-color: #f4f4f4; -} -.bi-select-data-level1-item .select-data-level1-item-button:active, -.bi-select-data-level1-item .select-data-level1-item-button.active { - color: #ffffff; - background-color: #009de3; -} -.bi-select-data-level1-item .select-data-level1-item-button:active .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.active .bi-high-light { - color: #ffffff; -} -.bi-select-data-level1-item .select-data-level1-item-button.disabled, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:hover, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:active { - color: #c4c6c6 !important; - background-color: #ffffff !important; -} -.bi-select-data-level1-item .select-data-level1-item-button.disabled .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:hover .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:active .bi-high-light { - color: #c4c6c6 !important; -} -.bi-select-data-level1-item .select-data-top-line, -.bi-select-data-level1-item .select-data-bottom-line { - background-color: #009de3; -} -.bi-select-data-level1-item.select-data-item-top .select-data-level1-item-button { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.bi-select-data-level1-item.select-data-item-bottom .select-data-level1-item-button { - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-database-table { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; - background: #ffffff; -} -.bi-database-table.active { - background: #009de3; - color: #ffffff; -} -.bi-database-table .table-name-text { - max-width: 300px; -} -.bi-database-table .table-font { - font-size: 16px; -} -.bi-database-table .table-conn-label1 { - background-color: #009de3; -} -.bi-database-table .table-conn-label2 { - background-color: #4fc1e9; -} -.bi-database-table .table-conn-label3 { - background-color: #48cfad; -} -.bi-database-table .table-conn-label4 { - background-color: #57cb7c; -} -.bi-database-table .table-conn-label5 { - background-color: #a0d468; -} -.bi-database-table .table-conn-label6 { - background-color: #fbaf4f; -} -.bi-database-table .table-conn-label7 { - background-color: #fc6e51; -} -.bi-database-table .table-conn-label8 { - background-color: #ed5565; -} -.bi-database-table .table-conn-label9 { - background-color: #ac92ec; -} -.bi-database-table .table-conn-label10 { - background-color: #5d9cec; -} -.bi-database-table.table-selected1.active { - background-color: #009de3; -} -.bi-database-table.table-selected2.active { - background-color: #4fc1e9; -} -.bi-database-table.table-selected3.active { - background-color: #48cfad; -} -.bi-database-table.table-selected4.active { - background-color: #57cb7c; -} -.bi-database-table.table-selected5.active { - background-color: #a0d468; -} -.bi-database-table.table-selected6.active { - background-color: #fbaf4f; -} -.bi-database-table.table-selected7.active { - background-color: #fc6e51; -} -.bi-database-table.table-selected8.active { - background-color: #ed5565; -} -.bi-database-table.table-selected9.active { - background-color: #ac92ec; -} -.bi-database-table.table-selected10.active { - background-color: #5d9cec; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-selecttree-combo .selecttree-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-sequence-table-dynamic-number .sequence-table-title-cell { overflow: hidden; overflow-x: hidden; @@ -1417,42 +725,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-single-slider .slider-editor-button .sign-editor-text:hover { - border: 1px solid #d4dadd; -} -.bi-single-slider .slider-editor-button .bi-editor { - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-single-slider-slider { - cursor: url('cursor/cursor_left_right.cur'), auto; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-slider-track .background-track { - background-color: #f4f4f4; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px; -} -.bi-slider-track .gray-track { - background: #cccccc; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.bi-slider-track .blue-track { - background: #009de3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-singletree-combo .singletree-trigger { border: 1px solid #d4dadd; -webkit-border-radius: 2px; @@ -1465,88 +737,6 @@ /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sortable-table .sortable_table_drag_clone { - background: #d8f2fd; - top: 0px; - opacity: 0.5; -} -.bi-sortable-table .drag-header { - cursor: move; -} -.bi-sortable-table .insert-help-line { - border-right: 3px dashed #009de3; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-area .text-area-editor-text-button-label { - font-size: 16px; - color: #c4c6c6; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-toolbar-align-chooser .align-chooser-button:hover { - background-color: #c4c6c6; -} -.bi-text-toolbar-align-chooser .align-chooser-button.active { - background-color: #c4c6c6; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-toolbar { - background: #eaeaea; -} -.bi-text-toolbar .text-toolbar-button { - font-size: 16px; -} -.bi-text-toolbar .text-toolbar-size-chooser-trigger { - background: #ffffff; - font-size: 12px; -} -.bi-text-toolbar .text-toolbar-size-chooser-trigger a { - font-size: 12px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param-time-interval.time-error .bi-input { - color: #e85050; -} -.bi-param-time-interval.time-error .sign-editor-text { - color: #e85050; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-time-setting-day .operator-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-time-setting-hour .operator-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-tree-label { - font-size: 14px; -} -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ .bi-web-page .web-page-button { z-index: 1; font-size: 14px; diff --git a/dist/widget.js b/dist/widget.js index 0c5e9fa51d..2d9d4e0418 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -3870,2156 +3870,1240 @@ BI.extend(BI.Arrangement, { } }); $.shortcut('bi.arrangement', BI.Arrangement);/** - * 根据内容自适应长度的输入框 - * @class BI.AdaptiveEditor - * @extends BI.Single + * 表关联树 + * + * Created by GUY on 2015/12/15. + * @class BI.BranchRelation + * @extends BI.Widget */ -BI.AdaptiveEditor = BI.inherit(BI.Single, { +BI.BranchRelation = BI.inherit(BI.Widget, { + _defaultConfig: function () { - var conf = BI.AdaptiveEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-adapt-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: true, - watermark: "", - errorText: "", - height: 30 + return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-branch-relation-tree", + items: [], + + centerOffset: 0,//重心偏移量 + direction: BI.Direction.Bottom, + align: BI.VerticalAlign.Top }) }, _init: function () { - BI.AdaptiveEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.sign_editor", - element: this, - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - mouseOut: o.mouseOut, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_FOCUS); - }); - this.editor.on(BI.SignEditor.EVENT_BLUR, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_BLUR); - }); - this.editor.on(BI.SignEditor.EVENT_CLICK, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_CLICK); - }); - this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { - self._checkEditorLength(); - self.fireEvent(BI.AdaptiveEditor.EVENT_CHANGE); - }); - this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.AdaptiveEditor.EVENT_KEY_DOWN); - }); + BI.BranchRelation.superclass._init.apply(this, arguments); + this.populate(this.options.items); + }, - this.editor.on(BI.SignEditor.EVENT_VALID, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_VALID); - }); - this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.SignEditor.EVENT_START, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_START); - }); - this.editor.on(BI.SignEditor.EVENT_PAUSE, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_STOP); - }); - this.editor.on(BI.SignEditor.EVENT_SPACE, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_SPACE); - }); - this.editor.on(BI.SignEditor.EVENT_ERROR, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_ERROR); - }); - this.editor.on(BI.SignEditor.EVENT_ENTER, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_ENTER); - }); - this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_RESTRICT); - }); - this.editor.on(BI.SignEditor.EVENT_EMPTY, function () { - self.fireEvent(BI.AdaptiveEditor.EVENT_EMPTY); + //树分层 + _stratification: function () { + var levels = []; + this.tree.recursion(function (node, route) { + //node.isRoot = route.length <= 1; + node.leaf = node.isLeaf(); + if (!levels[route.length - 1]) { + levels[route.length - 1] = []; + } + levels[route.length - 1].push(node); }); - this._checkEditorLength(); + return levels; }, - _checkEditorLength: function () { - var o = this.options; - this.element.width(BI.DOM.getTextSizeWidth(this.getValue(), 14) + 2 * o.hgap + o.lgap + o.rgap); - }, + //计算所有节点的叶子结点个数 + _calculateLeaves: function () { + var count = 0; - focus: function () { - this.editor.focus(); - }, + function track(node) { + var c = 0; + if (node.isLeaf()) { + return 1; + } + BI.each(node.getChildren(), function (i, child) { + c += track(child); + }); + node.set("leaves", c); + return c; + } - blur: function () { - this.editor.blur(); + count = track(this.tree.getRoot()); + return count; }, - isValid: function () { - return this.editor.isValid(); + //树平移 + _translate: function (levels) { + var adjust = []; + var maxLevel = levels.length; + BI.each(levels, function (i, nodes) { + if (!adjust[i]) { + adjust[i] = []; + } + BI.each(nodes, function (j, node) { + if (node.isLeaf() && i < maxLevel - 1) { + var newNode = new BI.Node(BI.UUID()); + //newNode.isEmptyRoot = node.isRoot || node.isEmptyRoot; + newNode.isNew = true; + //把node向下一层移 + var tar = 0; + if (j > 0) { + var c = nodes[j - 1].getLastChild(); + tar = levels[i + 1].indexOf(c) + 1; + } + levels[i + 1].splice(tar, 0, node); + //新增一个临时树节点 + var index = node.parent.getChildIndex(node.id); + node.parent.removeChildByIndex(index); + node.parent.addChild(newNode, index); + newNode.addChild(node); + adjust[i].push(newNode); + nodes[j] = newNode; + } else { + adjust[i].push(node); + } + }) + }); + return adjust; }, - setErrorText: function (text) { - this.editor.setErrorText(text); + //树补白 + _fill: function (levels) { + var adjust = []; + var maxLevel = levels.length; + BI.each(levels, function (i, nodes) { + if (!adjust[i]) { + adjust[i] = []; + } + BI.each(nodes, function (j, node) { + if (node.isLeaf() && i < maxLevel - 1) { + var newNode = new BI.Node(BI.UUID()); + newNode.leaf = true; + newNode.width = node.width; + newNode.height = node.height; + newNode.isNew = true; + //把node向下一层移 + var tar = 0; + if (j > 0) { + var c = nodes[j - 1].getLastChild(); + tar = levels[i + 1].indexOf(c) + 1; + } + levels[i + 1].splice(tar, 0, newNode); + //新增一个临时树节点 + node.addChild(newNode); + } + adjust[i].push(node); + }) + }); + return adjust; }, - getErrorText: function () { - return this.editor.getErrorText(); + //树调整 + _adjust: function (adjust) { + while (true) { + var isAllNeedAjust = false; + BI.backEach(adjust, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (!node.isNew) { + var needAdjust = true; + BI.any(node.getChildren(), function (k, n) { + if (!n.isNew) { + needAdjust = false; + return true; + } + }); + if (!node.isLeaf() && needAdjust === true) { + var allChilds = []; + BI.each(node.getChildren(), function (k, n) { + allChilds = allChilds.concat(n.getChildren()); + }); + node.removeAllChilds(); + BI.each(allChilds, function (k, c) { + node.addChild(c); + }); + var newNode = new BI.Node(BI.UUID()); + //newNode.isEmptyRoot = node.isRoot || node.isEmptyRoot; + newNode.isNew = true; + var index = node.parent.getChildIndex(node.id); + node.parent.removeChildByIndex(index); + node.parent.addChild(newNode, index); + newNode.addChild(node); + isAllNeedAjust = true; + } + } + }) + }); + if (isAllNeedAjust === false) { + break; + } else {//树重构 + adjust = this._stratification(); + } + } + return adjust; }, - setValue: function (k) { - this.editor.setValue(k); - this._checkEditorLength(); - }, + _calculateWidth: function () { + var o = this.options; + var width = 0; - getValue: function () { - return this.editor.getValue(); + function track1(node) { + var w = 0; + if (node.isLeaf()) { + return node.width; + } + BI.each(node.getChildren(), function (i, child) { + w += track1(child); + }); + return w; + } + + function track2(node) { + var w = 0; + if (node.isLeaf()) { + return node.height; + } + BI.each(node.getChildren(), function (i, child) { + w += track2(child); + }); + return w; + } + + if (this._isVertical()) { + width = track1(this.tree.getRoot()); + } else { + width = track2(this.tree.getRoot()); + } + + return width; }, - getState: function () { - return this.editor.getState(); + _isVertical: function () { + var o = this.options; + return o.direction === BI.Direction.Top || o.direction === BI.Direction.Bottom; }, - setState: function (v) { + _calculateHeight: function () { + var o = this.options; + var height = 0; - } -}); -BI.AdaptiveEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.AdaptiveEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.AdaptiveEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.AdaptiveEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.AdaptiveEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.AdaptiveEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.AdaptiveEditor.EVENT_START = "EVENT_START"; -BI.AdaptiveEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.AdaptiveEditor.EVENT_STOP = "EVENT_STOP"; -BI.AdaptiveEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.AdaptiveEditor.EVENT_VALID = "EVENT_VALID"; -BI.AdaptiveEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.AdaptiveEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.AdaptiveEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.AdaptiveEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.AdaptiveEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.adapt_editor", BI.AdaptiveEditor);/** - * 有清楚按钮的文本框 - * Created by GUY on 2015/9/29. - * @class BI.SmallTextEditor - * @extends BI.SearchEditor - */ -BI.ClearEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-clear-editor", - height: 30, - errorText: "", - watermark: "", - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn - }); - }, - _init: function () { - BI.ClearEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - watermark: o.watermark, - allowBlank: true, - errorText: o.errorText, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker - }); - this.clear = BI.createWidget({ - type: "bi.icon_button", - stopEvent: true, - cls: "search-close-h-font" - }); - this.clear.on(BI.IconButton.EVENT_CHANGE, function () { - self.setValue(""); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); - self.fireEvent(BI.ClearEditor.EVENT_CLEAR); - }); - BI.createWidget({ - element: this, - type: "bi.htape", - items: [ - { - el: this.editor - }, - { - el: this.clear, - width: 25 - }] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.ClearEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.ClearEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.ClearEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self._checkClear(); - self.fireEvent(BI.ClearEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.ClearEditor.EVENT_SPACE) - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE) - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.ClearEditor.EVENT_VALID) - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.ClearEditor.EVENT_ERROR) - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.ClearEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.ClearEditor.EVENT_RESTRICT) - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self._checkClear(); - self.fireEvent(BI.ClearEditor.EVENT_EMPTY) - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - self.fireEvent(BI.ClearEditor.EVENT_REMOVE) - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.ClearEditor.EVENT_CONFIRM) - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.ClearEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.ClearEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.ClearEditor.EVENT_STOP); - }); - - this.clear.invisible(); - }, - - _checkClear: function () { - if (!this.getValue()) { - this.clear.invisible(); - } else { - this.clear.visible(); + function track1(node) { + var h = 0; + BI.each(node.getChildren(), function (i, child) { + h = Math.max(h, track1(child)); + }); + return h + (node.height || 0); } - }, - - focus: function () { - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - }, - getValue: function () { - if (this.isValid()) { - var res = this.editor.getValue().match(/[\S]+/g); - return BI.isNull(res) ? "" : res[res.length - 1]; + function track2(node) { + var h = 0; + BI.each(node.getChildren(), function (i, child) { + h = Math.max(h, track2(child)); + }); + return h + (node.width || 0); } - }, - setValue: function (v) { - this.editor.setValue(v); - if (BI.isKey(v)) { - this.clear.visible(); + if (this._isVertical()) { + height = track1(this.tree.getRoot()); + } else { + height = track2(this.tree.getRoot()); } + return height; }, - isValid: function () { - return this.editor.isValid(); - } -}); -BI.ClearEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.ClearEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.ClearEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.ClearEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.ClearEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.ClearEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.ClearEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; -BI.ClearEditor.EVENT_CLEAR = "EVENT_CLEAR"; - -BI.ClearEditor.EVENT_START = "EVENT_START"; -BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.ClearEditor.EVENT_STOP = "EVENT_STOP"; -BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.ClearEditor.EVENT_VALID = "EVENT_VALID"; -BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.ClearEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.ClearEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.ClearEditor.EVENT_EMPTY = "EVENT_EMPTY"; -$.shortcut("bi.clear_editor", BI.ClearEditor);/** - * Created by roy on 15/9/14. - */ -BI.SearchEditor = BI.inherit(BI.Widget, { - _defaultConfig: function () { - var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: "bi-search-editor", - height: 30, - errorText: "", - watermark: BI.i18nText("BI-Basic_Search"), - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn + _calculateXY: function (levels) { + var o = this.options; + var width = this._calculateWidth(); + var height = this._calculateHeight(); + var levelCount = levels.length; + var allLeavesCount = this._calculateLeaves(); + //计算坐标 + var xy = {}; + var levelHeight = height / levelCount; + BI.each(levels, function (i, nodes) { + //计算权重 + var weights = []; + BI.each(nodes, function (j, node) { + weights[j] = (node.get("leaves") || 1) / allLeavesCount; + }); + BI.each(nodes, function (j, node) { + //求前j个元素的权重 + var weight = BI.sum(weights.slice(0, j)); + //求坐标 + var x = weight * width + weights[j] * width / 2; + var y = i * levelHeight + levelHeight / 2; + xy[node.id] = {x: x, y: y}; + }) }); + return xy; }, - _init: function () { - this.options.height -= 2; - BI.SearchEditor.superclass._init.apply(this, arguments); + + _stroke: function (levels, xy) { + var height = this._calculateHeight(); + var levelCount = levels.length; + var levelHeight = height / levelCount; var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - watermark: o.watermark, - allowBlank: true, - errorText: o.errorText, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker - }); - this.clear = BI.createWidget({ - type: "bi.icon_button", - stopEvent: true, - cls: "search-close-h-font" - }); - this.clear.on(BI.IconButton.EVENT_CHANGE, function () { - self.setValue(""); - self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT); - self.fireEvent(BI.SearchEditor.EVENT_CLEAR); - }); - BI.createWidget({ - element: this, - type: "bi.htape", - items: [ - { - el: { - type: "bi.center_adapt", - cls: "search-font", - items: [{ - el: { - type: "bi.icon" + switch (o.direction) { + case BI.Direction.Top: + BI.each(levels, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (node.getChildrenLength() > 0 && !node.leaf) { + var path = ""; + var start = xy[node.id]; + var split = start.y + levelHeight / 2; + path += "M" + start.x + "," + (start.y + o.centerOffset) + "L" + start.x + "," + split; + var end = []; + BI.each(node.getChildren(), function (t, c) { + var e = end[t] = xy[c.id]; + path += "M" + e.x + "," + (e.y + o.centerOffset) + "L" + e.x + "," + split; + }); + if (end.length > 0) { + path += "M" + BI.first(end).x + "," + split + "L" + BI.last(end).x + "," + split; } - }] - }, - width: 25 - }, - { - el: self.editor - }, - { - el: this.clear, - width: 25 - } - ] - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SearchEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SearchEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SearchEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self._checkClear(); - self.fireEvent(BI.SearchEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SearchEditor.EVENT_SPACE) - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function () { - self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE) - }); - - - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SearchEditor.EVENT_VALID) - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.SearchEditor.EVENT_ERROR) - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SearchEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SearchEditor.EVENT_RESTRICT) - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self._checkClear(); - self.fireEvent(BI.SearchEditor.EVENT_EMPTY) - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function () { - self.fireEvent(BI.SearchEditor.EVENT_REMOVE) - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.SearchEditor.EVENT_CONFIRM) - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SearchEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SearchEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SearchEditor.EVENT_STOP); - }); - - this.clear.invisible(); + self.svg.path(path).attr("stroke", "gray"); + } + }) + }); + break; + case BI.Direction.Bottom: + BI.each(levels, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (node.getChildrenLength() > 0 && !node.leaf) { + var path = ""; + var start = xy[node.id]; + var split = start.y - levelHeight / 2; + path += "M" + start.x + "," + (start.y - o.centerOffset) + "L" + start.x + "," + split; + var end = []; + BI.each(node.getChildren(), function (t, c) { + var e = end[t] = xy[c.id]; + path += "M" + e.x + "," + (e.y - o.centerOffset) + "L" + e.x + "," + split; + }); + if (end.length > 0) { + path += "M" + BI.first(end).x + "," + split + "L" + BI.last(end).x + "," + split; + } + self.svg.path(path).attr("stroke", "gray"); + } + }) + }); + break; + case BI.Direction.Left: + BI.each(levels, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (node.getChildrenLength() > 0 && !node.leaf) { + var path = ""; + var start = xy[node.id]; + var split = start.y + levelHeight / 2; + path += "M" + (start.y + o.centerOffset) + "," + start.x + "L" + split + "," + start.x; + var end = []; + BI.each(node.getChildren(), function (t, c) { + var e = end[t] = xy[c.id]; + path += "M" + (e.y + o.centerOffset) + "," + e.x + "L" + split + "," + e.x; + }); + if (end.length > 0) { + path += "M" + split + "," + BI.first(end).x + "L" + split + "," + BI.last(end).x; + } + self.svg.path(path).attr("stroke", "gray"); + } + }) + }); + break; + case BI.Direction.Right: + BI.each(levels, function (i, nodes) { + BI.each(nodes, function (j, node) { + if (node.getChildrenLength() > 0 && !node.leaf) { + var path = ""; + var start = xy[node.id]; + var split = start.y - levelHeight / 2; + path += "M" + (start.y - o.centerOffset) + "," + start.x + "L" + split + "," + start.x; + var end = []; + BI.each(node.getChildren(), function (t, c) { + var e = end[t] = xy[c.id]; + path += "M" + (e.y - o.centerOffset) + "," + e.x + "L" + split + "," + e.x; + }); + if (end.length > 0) { + path += "M" + split + "," + BI.first(end).x + "L" + split + "," + BI.last(end).x; + } + self.svg.path(path).attr("stroke", "gray"); + } + }) + }); + break; + } }, - _checkClear: function () { - if (!this.getValue()) { - this.clear.invisible(); - } else { - this.clear.visible(); + _createBranches: function (levels) { + var self = this, o = this.options; + if (o.direction === BI.Direction.Bottom || o.direction === BI.Direction.Right) { + levels = levels.reverse(); } + var xy = this._calculateXY(levels); + //画图 + this._stroke(levels, xy); }, - focus: function () { - this.editor.focus(); + _isNeedAdjust: function () { + var o = this.options; + return o.direction === BI.Direction.Top && o.align === BI.VerticalAlign.Bottom || o.direction === BI.Direction.Bottom && o.align === BI.VerticalAlign.Top + || o.direction === BI.Direction.Left && o.align === BI.HorizontalAlign.Right || o.direction === BI.Direction.Right && o.align === BI.HorizontalAlign.Left }, - blur: function () { - this.editor.blur(); + setValue: function (value) { + }, getValue: function () { - if (this.isValid()) { - var res = this.editor.getValue().match(/[\S]+/g); - return BI.isNull(res) ? "" : res[res.length - 1]; - } - }, - getLastValidValue: function () { - return this.editor.getLastValidValue(); }, - setValue: function (v) { - this.editor.setValue(v); - if (BI.isKey(v)) { - this.clear.visible(); + _transformToTreeFormat: function (sNodes) { + var i, l; + if (!sNodes) { + return []; } - }, - - setValid: function (b) { - this.editor.setValid(b); - }, - isEditing: function () { - return this.editor.isEditing(); + if (BI.isArray(sNodes)) { + var r = []; + var tmpMap = []; + for (i = 0, l = sNodes.length; i < l; i++) { + tmpMap[sNodes[i].id] = sNodes[i]; + } + for (i = 0, l = sNodes.length; i < l; i++) { + if (tmpMap[sNodes[i].pId] && sNodes[i].id != sNodes[i].pId) { + if (!tmpMap[sNodes[i].pId].children) { + tmpMap[sNodes[i].pId].children = []; + } + tmpMap[sNodes[i].pId].children.push(sNodes[i]); + } else { + r.push(sNodes[i]); + } + } + return r; + } else { + return [sNodes]; + } }, - isValid: function () { - return this.editor.isValid(); - }, + populate: function (items) { + var self = this, o = this.options; + o.items = items || []; + this.empty(); + items = this._transformToTreeFormat(o.items); + this.tree = new BI.Tree(); + this.tree.initTree(items); - setEnable: function (b) { - BI.Editor.superclass.setEnable.apply(this, arguments); - this.editor && this.editor.setEnable(b); - this.clear.setEnabled(b); - } -}); -BI.SearchEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SearchEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SearchEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SearchEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SearchEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SearchEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SearchEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; -BI.SearchEditor.EVENT_CLEAR = "EVENT_CLEAR"; - -BI.SearchEditor.EVENT_START = "EVENT_START"; -BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SearchEditor.EVENT_STOP = "EVENT_STOP"; -BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SearchEditor.EVENT_VALID = "EVENT_VALID"; -BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY"; -$.shortcut("bi.search_editor", BI.SearchEditor);/** - * 小号搜索框 - * Created by GUY on 2015/9/29. - * @class BI.SmallSearchEditor - * @extends BI.SearchEditor - */ -BI.SmallSearchEditor = BI.inherit(BI.SearchEditor, { - _defaultConfig: function () { - var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-small-search-editor", - height: 24 + this.svg = BI.createWidget({ + type: "bi.svg" }); - }, - _init: function () { - BI.SmallSearchEditor.superclass._init.apply(this, arguments); - } -}); -$.shortcut("bi.small_search_editor", BI.SmallSearchEditor);/** - * sign是新值(初始value值)形式的自适应宽度的输入框 - * @class BI.SignInitialEditor - * @extends BI.Single - */ -BI.SignInitialEditor = BI.inherit(BI.Single, { - _defaultConfig: function () { - var conf = BI.SignInitialEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-initial-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: true, - watermark: "", - errorText: "", - value: "", - text: "", - height: 30 - }) - }, + //树分层 + var levels = this._stratification(); - _init: function () { - BI.SignInitialEditor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.sign_editor", - element: this, - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value || o.text, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - mouseOut: o.mouseOut, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - if(BI.isNotNull(o.value)){ - this.setState(o.value); + if (this._isNeedAdjust()) { + //树平移 + var adjust = this._translate(levels); + //树调整 + adjust = this._adjust(adjust); + + this._createBranches(adjust); + } else { + var adjust = this._fill(levels); + + this._createBranches(adjust); } - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS); - }); - this.editor.on(BI.SignEditor.EVENT_BLUR, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_BLUR); - }); - this.editor.on(BI.SignEditor.EVENT_CLICK, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CLICK); - }); - this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE); - }); - this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN); - }); - this.editor.on(BI.SignEditor.EVENT_VALID, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_VALID); - }); - this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { - self.setState(self.editor.getValue()); - self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.SignEditor.EVENT_START, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_START); + var container = BI.createWidget({ + type: "bi.layout", + width: this._isVertical() ? this._calculateWidth() : this._calculateHeight(), + height: this._isVertical() ? this._calculateHeight() : this._calculateWidth() }); - this.editor.on(BI.SignEditor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE); + BI.createWidget({ + type: "bi.absolute", + element: container, + items: [{ + el: this.svg, + top: 0, + left: 0, + right: 0, + bottom: 0 + }] }); - this.editor.on(BI.SignEditor.EVENT_STOP, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_STOP); + if (this._isVertical()) { + items = [{ + type: "bi.handstand_branch_tree", + expander: { + direction: o.direction + }, + el: { + layouts: [{ + type: "bi.horizontal_adapt", + verticalAlign: o.align + }] + }, + items: items + }] + } else { + items = [{ + type: "bi.branch_tree", + expander: { + direction: o.direction + }, + el: { + layouts: [{ + type: "bi.vertical" + }, { + type: o.align === BI.HorizontalAlign.Left ? "bi.left" : "bi.right" + }] + }, + items: items + }] + } + BI.createWidget({ + type: "bi.adaptive", + element: container, + items: items }); - this.editor.on(BI.SignEditor.EVENT_SPACE, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_SPACE); + BI.createWidget({ + type: "bi.center_adapt", + scrollable: true, + element: this, + items: [container] }); - this.editor.on(BI.SignEditor.EVENT_ERROR, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_ERROR); + } +}); +BI.BranchRelation.EVENT_CHANGE = "BranchRelation.EVENT_CHANGE"; +$.shortcut("bi.branch_relation", BI.BranchRelation);/** + * 日期控件中的月份下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.MonthDateCombo + * @extends BI.Trigger + */ +BI.MonthDateCombo = BI.inherit(BI.Trigger, { + _defaultConfig: function() { + return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-month-combo", + height: 25 }); - this.editor.on(BI.SignEditor.EVENT_ENTER, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_ENTER); + }, + _init: function() { + BI.MonthDateCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.trigger = BI.createWidget({ + type: "bi.date_triangle_trigger" }); - this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT); + + this.popup = BI.createWidget({ + type: "bi.month_popup" }); - this.editor.on(BI.SignEditor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY); + + this.popup.on(BI.YearPopup.EVENT_CHANGE, function(){ + self.setValue(self.popup.getValue()); + }) + + + this.combo = BI.createWidget({ + type: "bi.combo", + offsetStyle: "center", + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + minWidth: 85, + stopPropagation: false, + el: this.popup + } + }) + this.combo.on(BI.Combo.EVENT_CHANGE, function(){ + self.combo.hideView(); + self.fireEvent(BI.MonthDateCombo.EVENT_CHANGE); }); }, - focus: function () { - this.editor.focus(); + setValue: function(v){ + this.trigger.setValue(v + 1); + this.popup.setValue(v); }, - blur: function () { - this.editor.blur(); + getValue: function(){ + return this.popup.getValue(); + } +}); +BI.MonthDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut('bi.month_date_combo', BI.MonthDateCombo);/** + * 年份下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.YearDateCombo + * @extends BI.Trigger + */ +BI.YearDateCombo = BI.inherit(BI.Trigger, { + _defaultConfig: function() { + return BI.extend( BI.YearDateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-year-combo", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + height: 25 + }); }, + _init: function() { + BI.YearDateCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; - isValid: function () { - return this.editor.isValid(); - }, + this.trigger = BI.createWidget({ + type: "bi.date_triangle_trigger" + }); - setErrorText: function (text) { - this.editor.setErrorText(text); - }, + this.popup = BI.createWidget({ + type: "bi.year_popup", + min: o.min, + max: o.max + }); - getErrorText: function () { - return this.editor.getErrorText(); - }, + this.popup.on(BI.YearPopup.EVENT_CHANGE, function(){ + self.setValue(self.popup.getValue()); + self.combo.hideView(); + self.fireEvent(BI.YearDateCombo.EVENT_CHANGE); + }) - setValue: function (v) { - this.editor.setValue(v.value); - this.setState(v.value); - }, - getValue: function () { - return { - value: this.editor.getValue(), - text: this.options.text - } + this.combo = BI.createWidget({ + type: "bi.combo", + offsetStyle: "center", + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + minWidth: 85, + stopPropagation: false, + el: this.popup + } + }) + this.combo.on(BI.Combo.EVENT_CHANGE, function(){ + self.fireEvent(BI.YearDateCombo.EVENT_CHANGE); + }) }, - getState: function () { - return this.editor.getState(); + setValue: function(v){ + this.trigger.setValue(v); + this.popup.setValue(v); }, - setState: function (v) { - var o = this.options; - v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")"; - this.editor.setState(v); + getValue: function(){ + return this.popup.getValue(); } }); -BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignInitialEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignInitialEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignInitialEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignInitialEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignInitialEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignInitialEditor.EVENT_START = "EVENT_START"; -BI.SignInitialEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignInitialEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignInitialEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignInitialEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignInitialEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignInitialEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignInitialEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignInitialEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignInitialEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.sign_initial_editor", BI.SignInitialEditor);/** - * sign标签分两段,可以自定义样式 - * @class BI.SignStyleEditor - * @extends BI.Single +BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut('bi.year_date_combo', BI.YearDateCombo);/** + * Created by GUY on 2015/9/7. + * @class BI.DatePicker + * @extends BI.Widget */ -BI.SignStyleEditor = BI.inherit(BI.Single, { - - constants: { - tipTextGap: 4 - }, - +BI.DatePicker = BI.inherit(BI.Widget, { _defaultConfig: function () { - var conf = BI.SignStyleEditor.superclass._defaultConfig.apply(this, arguments); + var conf = BI.DatePicker.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-sign-style-editor", - text: "", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: false, - watermark: "", - errorText: "", - height: 30 + baseCls: "bi-date-picker", + height: 25, + min: '1900-01-01', //最小日期 + max: '2099-12-31' //最大日期 }) }, _init: function () { - BI.SignStyleEditor.superclass._init.apply(this, arguments); + BI.DatePicker.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - mouseOut: o.mouseOut, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.text = BI.createWidget({ - type: "bi.text_button", - cls: "sign-style-editor-text", - textAlign: "left", - height: o.height, - hgap: 4, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.selectAll(); - } + this._year = new Date().getFullYear(); + this._month = new Date().getMonth(); + this.left = BI.createWidget({ + type: "bi.icon_button", + cls: "pre-page-h-font", + width: 25, + height: 25 }); - - this.tipText = BI.createWidget({ - type: "bi.text_button", - cls: "sign-style-editor-tip", - textAlign: "right", - rgap: 4, - height: o.height, - text: o.text, - handler: function () { - self._showInput(); - self.editor.focus(); - self.editor.selectAll(); + this.left.on(BI.IconButton.EVENT_CHANGE, function () { + if (self._month === 0) { + self.setValue({ + year: self.year.getValue() - 1, + month: 11 + }) + } else { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() - 1 + }) } + self.fireEvent(BI.DatePicker.EVENT_CHANGE); }); - this.text.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SignStyleEditor.EVENT_CLICK_LABEL) - }); - }); - - this.tipText.on(BI.TextButton.EVENT_CHANGE, function () { - BI.nextTick(function () { - self.fireEvent(BI.SignStyleEditor.EVENT_CLICK_LABEL) - }); + this.right = BI.createWidget({ + type: "bi.icon_button", + cls: "next-page-h-font", + width: 25, + height: 25 }); - this.wrap = BI.createWidget({ - type: "bi.htape", - element: this, - items: [this.text, this.tipText] + this.right.on(BI.IconButton.EVENT_CHANGE, function () { + if (self._month === 11) { + self.setValue({ + year: self.year.getValue() + 1, + month: 0 + }) + } else { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + 1 + }) + } + self.fireEvent(BI.DatePicker.EVENT_CHANGE); }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_CLICK); + this.year = BI.createWidget({ + type: "bi.year_date_combo", + min: o.min, + max: o.max }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_CHANGE); + this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + }); + self.fireEvent(BI.DatePicker.EVENT_CHANGE); + }) + this.month = BI.createWidget({ + type: "bi.month_date_combo" }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.SignStyleEditor.EVENT_KEY_DOWN); + this.month.on(BI.MonthDateCombo.EVENT_CHANGE, function () { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + }); + self.fireEvent(BI.DatePicker.EVENT_CHANGE); }); - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_VALID); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self._showHint(); - self._checkText(); - self._resizeLayout(); - self.fireEvent(BI.SignStyleEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_STOP); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_SPACE); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_ERROR); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_RESTRICT); - }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.SignStyleEditor.EVENT_EMPTY); - }); BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] - }); - this._showHint(); - this._checkText(); - - BI.nextTick(function () { - var tipTextSize = self.text.element.getStyle("font-size"); - self.tipTextSize = tipTextSize.substring(0, tipTextSize.length - 2); - self._resizeLayout(); - }); - }, - - _checkText: function () { - var o = this.options; - if (this.editor.getValue() === "") { - this.text.setValue(o.watermark || ""); - this.text.element.addClass("bi-water-mark"); - } else { - this.text.setValue(this.editor.getValue()); - this.tipText.setValue("(" + o.text + ")"); - this.text.element.removeClass("bi-water-mark"); - } - this.setTitle(this.text.getValue() + this.tipText.getValue()); - }, - - _showInput: function () { - this.editor.setVisible(true); - this.text.setVisible(false); - this.tipText.setVisible(false); - }, - - _showHint: function () { - this.editor.setVisible(false); - this.text.setVisible(true); - this.tipText.setVisible(true); - }, - - _resizeLayout: function () { - this.wrap.attr("items")[0].width = BI.DOM.getTextSizeWidth(this.text.getValue(), this.tipTextSize) + 2 * this.constants.tipTextGap; - this.wrap.resize(); - }, - - focus: function () { - this._showInput(); - this.editor.focus(); - }, - - blur: function () { - this.editor.blur(); - this._showHint(); - this._checkText(); - }, - - isValid: function () { - return this.editor.isValid(); - }, - - setErrorText: function (text) { - this.editor.setErrorText(text); - }, - - getErrorText: function () { - return this.editor.getErrorText(); + type: "bi.htape", + element: this.element, + items: [{ + el: this.left, + width: 25 + }, { + type: "bi.center_adapt", + items: [{ + type: "bi.horizontal", + width: 100, + items: [this.year, this.month] + }] + }, { + el: this.right, + width: 25 + }] + }) + this.setValue({ + year: this._year, + month: this._month + }) }, - setValue: function (k) { - BI.SignStyleEditor.superclass.setValue.apply(this, arguments); - this.editor.setValue(k); - this._checkText(); - this._resizeLayout(); + setValue: function (ob) { + this._year = ob.year; + this._month = ob.month; + this.year.setValue(ob.year); + this.month.setValue(ob.month); }, getValue: function () { - return this.editor.getValue(); - }, - - getState: function () { - return this.options.text; - }, - - setState: function (v) { - var o = this.options; - o.text = v; - this._showHint(); - this.tipText.setValue("(" + v + ")"); - this._checkText(); + return { + year: this.year.getValue(), + month: this.month.getValue() + } } }); -BI.SignStyleEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.SignStyleEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.SignStyleEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.SignStyleEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.SignStyleEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.SignStyleEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; - -BI.SignStyleEditor.EVENT_START = "EVENT_START"; -BI.SignStyleEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.SignStyleEditor.EVENT_STOP = "EVENT_STOP"; -BI.SignStyleEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.SignStyleEditor.EVENT_VALID = "EVENT_VALID"; -BI.SignStyleEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.SignStyleEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.SignStyleEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.SignStyleEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.SignStyleEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.sign_style_editor", BI.SignStyleEditor);/** - * guy - * @class BI.TextEditor - * @extends BI.Single +BI.DatePicker.EVENT_CHANGE = "EVENT_CHANGE" +$.shortcut("bi.date_picker", BI.DatePicker);/** + * Created by GUY on 2015/9/7. + * @class BI.DateCalendarPopup + * @extends BI.Widget */ -BI.TextEditor = BI.inherit(BI.Single, { +BI.DateCalendarPopup = BI.inherit(BI.Widget, { _defaultConfig: function () { - var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments); + var conf = BI.DateCalendarPopup.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-text-editor", - hgap: 4, - vgap: 2, - lgap: 0, - rgap: 0, - tgap: 0, - bgap: 0, - validationChecker: BI.emptyFn, - quitChecker: BI.emptyFn, - mouseOut: false, - allowBlank: false, - watermark: "", - errorText: "", - height: 30 + baseCls: "bi-date-calendar-popup", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + selectedTime: null }) }, + _createNav: function (v) { + var date = BI.Calendar.getDateJSONByPage(v); + var calendar = BI.createWidget({ + type: "bi.calendar", + logic: { + dynamic: true + }, + min: this.options.min, + max: this.options.max, + year: date.year, + month: date.month, + day: this.selectedTime.day + }); + return calendar; + }, + _init: function () { - BI.TextEditor.superclass._init.apply(this, arguments); + BI.DateCalendarPopup.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (BI.isNumber(o.height)) { - this.element.css({height: o.height - 2}); - } - if (BI.isNumber(o.width)) { - this.element.css({width: o.width - 2}); - } - this.editor = BI.createWidget({ - type: "bi.editor", - height: o.height - 2, - hgap: o.hgap, - vgap: o.vgap, - lgap: o.lgap, - rgap: o.rgap, - tgap: o.tgap, - bgap: o.bgap, - value: o.value, - validationChecker: o.validationChecker, - quitChecker: o.quitChecker, - mouseOut: o.mouseOut, - allowBlank: o.allowBlank, - watermark: o.watermark, - errorText: o.errorText - }); - this.editor.on(BI.Controller.EVENT_CHANGE, function () { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); + this.today = new Date(); + this._year = this.today.getFullYear(); + this._month = this.today.getMonth(); + this._day = this.today.getDate(); - this.editor.on(BI.Editor.EVENT_FOCUS, function () { - self.fireEvent(BI.TextEditor.EVENT_FOCUS); - }); - this.editor.on(BI.Editor.EVENT_BLUR, function () { - self.fireEvent(BI.TextEditor.EVENT_BLUR); - }); - this.editor.on(BI.Editor.EVENT_CLICK, function () { - self.fireEvent(BI.TextEditor.EVENT_CLICK); - }); - this.editor.on(BI.Editor.EVENT_CHANGE, function () { - self.fireEvent(BI.TextEditor.EVENT_CHANGE); - }); - this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { - self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN); - }); - this.editor.on(BI.Editor.EVENT_SPACE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_SPACE); - }); - this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_BACKSPACE); + this.selectedTime = o.selectedTime || { + year: this._year, + month: this._month, + day: this._day + }; + this.datePicker = BI.createWidget({ + type: "bi.date_picker", + min: o.min, + max: o.max }); + this.calendar = BI.createWidget({ + direction: "top", + element: this.element, + logic: { + dynamic: true + }, + type: "bi.navigation", + tab: this.datePicker, + cardCreator: BI.bind(this._createNav, this), - this.editor.on(BI.Editor.EVENT_VALID, function () { - self.fireEvent(BI.TextEditor.EVENT_VALID); - }); - this.editor.on(BI.Editor.EVENT_CONFIRM, function () { - self.fireEvent(BI.TextEditor.EVENT_CONFIRM); - }); - this.editor.on(BI.Editor.EVENT_REMOVE, function (v) { - self.fireEvent(BI.TextEditor.EVENT_REMOVE); - }); - this.editor.on(BI.Editor.EVENT_START, function () { - self.fireEvent(BI.TextEditor.EVENT_START); - }); - this.editor.on(BI.Editor.EVENT_PAUSE, function () { - self.fireEvent(BI.TextEditor.EVENT_PAUSE); - }); - this.editor.on(BI.Editor.EVENT_STOP, function () { - self.fireEvent(BI.TextEditor.EVENT_STOP); - }); - this.editor.on(BI.Editor.EVENT_ERROR, function () { - self.fireEvent(BI.TextEditor.EVENT_ERROR); - }); - this.editor.on(BI.Editor.EVENT_ENTER, function () { - self.fireEvent(BI.TextEditor.EVENT_ENTER); - }); - this.editor.on(BI.Editor.EVENT_RESTRICT, function () { - self.fireEvent(BI.TextEditor.EVENT_RESTRICT); + afterCardCreated: function () { + + }, + + afterCardShow: function () { + this.setValue(self.selectedTime); + } }); - this.editor.on(BI.Editor.EVENT_EMPTY, function () { - self.fireEvent(BI.TextEditor.EVENT_EMPTY); + + this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () { + self.selectedTime = self.datePicker.getValue(); + self.selectedTime.day = 1; + self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); }); - BI.createWidget({ - type: "bi.vertical", - scrolly: false, - element: this, - items: [this.editor] + + this.calendar.on(BI.Navigation.EVENT_CHANGE, function () { + self.selectedTime = self.calendar.getValue(); + self.setValue(self.selectedTime); + self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); }, - focus: function () { - this.editor.focus(); + setValue: function (timeOb) { + this.datePicker.setValue(timeOb); + this.calendar.setSelect(BI.Calendar.getPageByDateJSON(timeOb)); + this.calendar.setValue(timeOb); + this.selectedTime = timeOb; }, - blur: function () { - this.editor.blur(); + getValue: function () { + return this.selectedTime; + } +}); +BI.DateCalendarPopup.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut("bi.date_calendar_popup", BI.DateCalendarPopup);/** + * 日期控件中的年份或月份trigger + * + * Created by GUY on 2015/9/7. + * @class BI.DateTriangleTrigger + * @extends BI.Trigger + */ +BI.DateTriangleTrigger = BI.inherit(BI.Trigger, { + _const: { + height: 25, + iconWidth: 16, + iconHeight: 13 }, - setErrorText: function (text) { - this.editor.setErrorText(text); + _defaultConfig: function() { + return BI.extend( BI.DateTriangleTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-date-triangle-trigger pull-down-ha-font cursor-pointer", + height: 25 + }); }, + _init: function() { + BI.DateTriangleTrigger.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "right", + text: o.text, + value: o.value, + height: c.height + }) + this.icon = BI.createWidget({ + type: "bi.icon", + width: c.iconWidth, + height: c.iconHeight + }); - getErrorText: function () { - return this.editor.getErrorText(); + BI.createWidget({ + type: "bi.center_adapt", + element: this.element, + items: [{ + type: "bi.center_adapt", + width: 50, + height: c.height, + items: [this.text, this.icon] + }] + }) }, - isValid: function () { - return this.editor.isValid(); + setValue: function(v){ + this.text.setValue(v); }, - setValue: function (v) { - this.editor.setValue(v); + getValue: function(){ + return this.text.getValue(); }, - getValue: function () { - return this.editor.getValue(); + setText: function(v){ + this.text.setText(v); }, - setEnable: function (b) { - BI.Editor.superclass.setEnable.apply(this, arguments); - this.editor && this.editor.setEnable(b); - } -}); -BI.TextEditor.EVENT_CHANGE = "EVENT_CHANGE"; -BI.TextEditor.EVENT_FOCUS = "EVENT_FOCUS"; -BI.TextEditor.EVENT_BLUR = "EVENT_BLUR"; -BI.TextEditor.EVENT_CLICK = "EVENT_CLICK"; -BI.TextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; -BI.TextEditor.EVENT_SPACE = "EVENT_SPACE"; -BI.TextEditor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; - -BI.TextEditor.EVENT_START = "EVENT_START"; -BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE"; -BI.TextEditor.EVENT_STOP = "EVENT_STOP"; -BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.TextEditor.EVENT_VALID = "EVENT_VALID"; -BI.TextEditor.EVENT_ERROR = "EVENT_ERROR"; -BI.TextEditor.EVENT_ENTER = "EVENT_ENTER"; -BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; -BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; -BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; - -$.shortcut("bi.text_editor", BI.TextEditor);/** - * 小号搜索框 - * Created by GUY on 2015/9/29. - * @class BI.SmallTextEditor - * @extends BI.SearchEditor - */ -BI.SmallTextEditor = BI.inherit(BI.TextEditor, { - _defaultConfig: function () { - var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments); - return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-small-text-editor", - height: 25 - }); + getText: function(){ + return this.item.getText(); }, - _init: function () { - BI.SmallTextEditor.superclass._init.apply(this, arguments); + getKey: function(){ + } }); -$.shortcut("bi.small_text_editor", BI.SmallTextEditor);/** - * @class BI.LoadingCancelMask - * @extend BI.Widget - * 带有取消按钮的正在加载mask +$.shortcut('bi.date_triangle_trigger', BI.DateTriangleTrigger);/** + * 日期下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.DateCombo + * @extends BI.Widget */ -BI.LoadingCancelMask = BI.inherit(BI.Widget, { +BI.DateCombo = BI.inherit(BI.Widget, { _defaultConfig: function () { - return BI.extend(BI.LoadingCancelMask.superclass._defaultConfig.apply(this, arguments), {}) + return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-date-combo", + height: 30 + }); }, - _init: function () { - BI.LoadingCancelMask.superclass._init.apply(this, arguments); + BI.DateCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - var cancelButton = BI.createWidget({ - type: "bi.button", - level: "ignore", - width: 100, - height: 30, - text: BI.i18nText("BI-Basic_Cancel") - }); - cancelButton.on(BI.Button.EVENT_CHANGE, function () { - self.fireEvent(BI.LoadingCancelMask.EVENT_VALUE_CANCEL); - self.destroy(); + + this.trigger = BI.createWidget({ + type: "bi.date_trigger" }); - var mask = BI.Maskers.create(this.getName(), o.masker); - BI.createWidget({ - type: "bi.absolute", - element: mask, - items: [{ - el: { - type: "bi.layout", - cls: "bi-loading-main-background" - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }, { - el: { - type: "bi.center_adapt", - cls: "bi-loading-mask-content", - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.center_adapt", - cls: "loading-bar-icon", - items: [{ - type: "bi.icon", - width: 208, - height: 30 - }] - }, { - type: "bi.label", - cls: "loading-bar-label", - text: o.text, - height: 30 - }, { - type: "bi.center_adapt", - items: [cancelButton] - }], - vgap: 10 - } - }] - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }] - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); - }); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -BI.LoadingCancelMask.EVENT_VALUE_CANCEL = "EVENT_VALUE_CANCEL"; -$.shortcut("bi.loading_cancel_mask", BI.LoadingCancelMask);/** - * @class BI.LoadingBackground - * @extend BI.Widget - * 正在加载mask层 - */ -BI.LoadingBackground = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LoadingBackground.superclass._defaultConfig.apply(this, arguments), { - baseCls: "", - backgroundCls: "loading-background-e50" - }) - }, - - _init: function () { - BI.LoadingBackground.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var mask = BI.Maskers.create(this.getName(), o.masker, {offset: o.offset, container: o.container}); - BI.createWidget({ - type: "bi.center_adapt", - element: mask, - cls: "bi-loading-mask " + o.backgroundCls - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); - }); - }, - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -$.shortcut("bi.loading_background", BI.LoadingBackground);/** - * @class BI.LoadingMask - * @extend BI.Widget - * 正在加载mask层 - */ -BI.LoadingMask = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LoadingMask.superclass._defaultConfig.apply(this, arguments), { - baseCls: "" + this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK, function () { + self.combo.toggle(); }); - }, - _init: function () { - BI.LoadingMask.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var mask = BI.Maskers.create(this.getName(), o.masker, {offset: o.offset, container: o.container}); - BI.createWidget({ - type: "bi.absolute", - element: mask, - items: [{ - el: { - type: "bi.layout", - cls: "bi-loading-main-background" - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }, { - el: { - type: "bi.center_adapt", - cls: "bi-loading-mask-content", - items: [{ - type: "bi.vertical", - items: [{ - type: "bi.center_adapt", - cls: "loading-bar-icon", - items: [{ - type: "bi.icon", - width: 208, - height: 30 - }] - }, { - type: "bi.label", - cls: "loading-bar-label", - text: o.text, - height: 30 - }] - }] - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }] - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); + this.popup = BI.createWidget({ + type: "bi.date_calendar_popup" }); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -$.shortcut("bi.loading_mask", BI.LoadingMask);/** - * 一个button选中的时候下面有条线 - * - * Created by GUY on 2015/9/30. - * @class BI.LineSegmentButton - * @extends BI.BasicButton - */ -BI.LineSegmentButton = BI.inherit(BI.BasicButton, { - - _defaultConfig: function() { - var conf = BI.LineSegmentButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend( conf, { - baseCls : (conf.baseCls ||"")+' bi-line-segment-button bi-list-item-effect', - once: true, - readonly: true, - hgap: 10, - height: 25 - }) - }, - _init:function() { - BI.LineSegmentButton.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - text: o.text, - height: o.height, - value: o.value, - hgap: o.hgap + this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); }); - this.line = BI.createWidget({ - type: "bi.layout", - cls: "line-segment-button-line", - height: 3 - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.line, - left: 0, - right: 0, - bottom: 0 - }] - }) - }, - - setSelected: function(v){ - BI.LineSegmentButton.superclass.setSelected.apply(this, arguments); - }, - - setText : function(text) { - BI.LineSegmentButton.superclass.setText.apply(this, arguments); - this.text.setText(text); - }, - - destroy : function() { - BI.LineSegmentButton.superclass.destroy.apply(this, arguments); - } -}); -$.shortcut('bi.line_segment_button', BI.LineSegmentButton);/** - * 另一套风格的单选按钮组 - * - * Created by GUY on 2015/9/30. - * @class BI.LineSegment - * @extends BI.Widget - */ -BI.LineSegment = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LineSegment.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-line-segment", - items: [], - height: 30 - }); - }, - _init: function () { - BI.LineSegment.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isNumber(o.height)) { - this.element.css({height: o.height - 1, lineHeight: (o.height - 1) + 'px'}); - } - this.buttonGroup = BI.createWidget({ - element: this, - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.line_segment_button", - height: o.height - 1 - }), - layout: [ - { - type: "bi.center" - } - ] - }); - this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments) - }); - this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function () { - self.fireEvent(BI.LineSegment.EVENT_CHANGE) + this.combo = BI.createWidget({ + type: "bi.combo", + toggle: false, + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + width: 270, + el: this.popup, + stopPropagation: false + } }) }, setValue: function (v) { - this.buttonGroup.setValue(v); - }, - - setEnabledValue: function (v) { - this.buttonGroup.setEnabledValue(v); - }, - - setEnable: function (v) { - BI.LineSegment.superclass.setEnable.apply(this, arguments); - this.buttonGroup.setEnable(v) + this.trigger.setValue(v); + this.popup.setValue(v); }, - getValue: function () { - return this.buttonGroup.getValue(); + return this.popup.getValue(); } }); -BI.LineSegment.EVENT_CHANGE = "EVENT_CHANGE"; -$.shortcut('bi.line_segment', BI.LineSegment);/** - * 拖拽字段的helper - * Created by roy on 15/10/13. - */ -BI.Helper = BI.inherit(BI.Tip, { - _defaultConfig: function () { - return BI.extend(BI.Helper.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-helper", - text: "", - value: "" - }) - }, - - _init: function () { - BI.Helper.superclass._init.apply(this, arguments); - this.populate(); - }, - - modifyContent: function(widget) { - this.empty(); - BI.createWidget({ - type: "bi.left", - element: this, - cls: "dragging-modify", - items: [widget], - lgap: 15 - }); +$.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + vgap: 2, + triggerWidth: 30, + watermark: BI.i18nText("BI-Unrestricted"), + yearLength: 4, + yearMonthLength: 7 }, - populate: function () { - var o = this.options; - this.element.data({helperWidget: this}); - this.empty(); - BI.createWidget({ - element: this, - type: "bi.label", - textAlign: "center", - textHeight: 20, - hgap: 5, - text: o.text, - value: o.value - }); - this.element.removeClass("dragging-modify"); - } -}); -$.shortcut("bi.helper", BI.Helper);/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBarBar - * @extends BI.BasicButton - */ -BI.ProgressBarBar = BI.inherit(BI.Single, { _defaultConfig: function () { - return BI.extend(BI.ProgressBarBar.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar-bar", - height: 24 - }) + return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-date-trigger", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + height: 25 + }); }, _init: function () { - BI.ProgressBarBar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.svg = BI.createWidget({ - type: "bi.svg", - width: 6, - height: 6 - }); - this.svg.circle(3, 3, 3).attr({fill: "#ffffff", "stroke": ""}); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.svg, - right: 10, - top: 9 - }] + BI.DateTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.editor = BI.createWidget({ + type: "bi.sign_editor", + height: o.height, + validationChecker: function (v) { + var date = v.match(/\d+/g); + self._autoAppend(v, date); + return self._dateCheck(v) && Date.checkLegal(v) && self._checkVoid({ + year: date[0], + month: date[1], + day: date[2] + }); + }, + quitChecker: function () { + return false; + }, + hgap: c.hgap, + vgap: c.vgap, + allowBlank: true, + watermark: c.watermark, + errorText: function () { + if (self.editor.isEditing()) { + return BI.i18nText("BI-Date_Trigger_Error_Text"); + } + return BI.i18nText("BI-Year_Trigger_Invalid_Text"); + } }); - this.processor = BI.createWidget({ - type: "bi.progress_bar_processor", - width: "0%", - height: o.height + this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { + self.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN) }); - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.processor] + this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.DateTrigger.EVENT_FOCUS); }); - }, - - setValue: function (process) { - this.processor.setValue(process); - - } -}); -$.shortcut("bi.progress_bar_bar", BI.ProgressBarBar);/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBar - * @extends BI.BasicButton - */ -BI.ProgressBar = BI.inherit(BI.Single, { - _defaultConfig: function () { - return BI.extend(BI.ProgressBar.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar", - height: 24 - }) - }, - _init: function () { - BI.ProgressBar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.bar = BI.createWidget({ - type: "bi.progress_bar_bar", - height: o.height + this.editor.on(BI.SignEditor.EVENT_VALID, function () { + self.fireEvent(BI.DateTrigger.EVENT_VALID); }); - this.label = BI.createWidget({ - type: "bi.label", - cls: "progress-bar-label", - width: 50, - height: o.height, - value: "0%" + this.editor.on(BI.SignEditor.EVENT_ERROR, function () { + self.fireEvent(BI.DateTrigger.EVENT_ERROR); }); - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - el: this.bar - }, { - el: this.label, - width: 50 - }] - }) - }, + this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { + var value = self.editor.getState(); + if (BI.isNotNull(value)) { + self.editor.setState(value); + } - setValue: function (process) { - if (process >= 100) { - process = 100; - this.label.element.addClass("success"); - } else { - this.label.element.removeClass("success"); - } - this.label.setValue(process + "%"); - this.bar.setValue(process); - } -}); -$.shortcut("bi.progress_bar", BI.ProgressBar);/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBarProcessor - * @extends BI.BasicButton - */ -BI.ProgressBarProcessor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return BI.extend(BI.ProgressBarProcessor.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar-processor", - height: 24 - }) - }, - _init: function () { - BI.ProgressBarProcessor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.svg = BI.createWidget({ - type: "bi.svg", - width: 12, - height: 12 - }); - this.svg.circle(6, 6, 6).attr({fill: "#eaeaea", "stroke": ""}); - - this.dot = this.svg.circle(6, 6, 3).attr({fill: "#ffffff", "stroke": ""}).hide(); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.svg, - right: 7, - top: 6 - }] - }); - }, - - setValue: function (process) { - if (process >= 100) { - process = 100; - this.dot.show(); - this.element.addClass("success"); - } else { - this.dot.hide(); - this.element.removeClass("success"); - } - this.element.width(process + "%"); - } -}); -BI.ProgressBarProcessor.EVENT_CHANGE = "ProgressBarProcessor.EVENT_CHANGE"; -$.shortcut("bi.progress_bar_processor", BI.ProgressBarProcessor);/** - * 表关联树 - * - * Created by GUY on 2015/12/15. - * @class BI.BranchRelation - * @extends BI.Widget - */ -BI.BranchRelation = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-branch-relation-tree", - items: [], - - centerOffset: 0,//重心偏移量 - direction: BI.Direction.Bottom, - align: BI.VerticalAlign.Top - }) - }, - - _init: function () { - BI.BranchRelation.superclass._init.apply(this, arguments); - this.populate(this.options.items); - }, - - //树分层 - _stratification: function () { - var levels = []; - this.tree.recursion(function (node, route) { - //node.isRoot = route.length <= 1; - node.leaf = node.isLeaf(); - if (!levels[route.length - 1]) { - levels[route.length - 1] = []; - } - levels[route.length - 1].push(node); - }); - return levels; - }, - - //计算所有节点的叶子结点个数 - _calculateLeaves: function () { - var count = 0; - - function track(node) { - var c = 0; - if (node.isLeaf()) { - return 1; - } - BI.each(node.getChildren(), function (i, child) { - c += track(child); - }); - node.set("leaves", c); - return c; - } - - count = track(this.tree.getRoot()); - return count; - }, - - //树平移 - _translate: function (levels) { - var adjust = []; - var maxLevel = levels.length; - BI.each(levels, function (i, nodes) { - if (!adjust[i]) { - adjust[i] = []; - } - BI.each(nodes, function (j, node) { - if (node.isLeaf() && i < maxLevel - 1) { - var newNode = new BI.Node(BI.UUID()); - //newNode.isEmptyRoot = node.isRoot || node.isEmptyRoot; - newNode.isNew = true; - //把node向下一层移 - var tar = 0; - if (j > 0) { - var c = nodes[j - 1].getLastChild(); - tar = levels[i + 1].indexOf(c) + 1; - } - levels[i + 1].splice(tar, 0, node); - //新增一个临时树节点 - var index = node.parent.getChildIndex(node.id); - node.parent.removeChildByIndex(index); - node.parent.addChild(newNode, index); - newNode.addChild(node); - adjust[i].push(newNode); - nodes[j] = newNode; - } else { - adjust[i].push(node); - } - }) - }); - return adjust; - }, - - //树补白 - _fill: function (levels) { - var adjust = []; - var maxLevel = levels.length; - BI.each(levels, function (i, nodes) { - if (!adjust[i]) { - adjust[i] = []; - } - BI.each(nodes, function (j, node) { - if (node.isLeaf() && i < maxLevel - 1) { - var newNode = new BI.Node(BI.UUID()); - newNode.leaf = true; - newNode.width = node.width; - newNode.height = node.height; - newNode.isNew = true; - //把node向下一层移 - var tar = 0; - if (j > 0) { - var c = nodes[j - 1].getLastChild(); - tar = levels[i + 1].indexOf(c) + 1; + if (BI.isNotEmptyString(value)) { + var date = value.split("-"); + self.store_value = { + type: BICst.MULTI_DATE_CALENDAR, + value:{ + year: date[0] | 0, + month: date[1] - 1, + day: date[2] | 0 } - levels[i + 1].splice(tar, 0, newNode); - //新增一个临时树节点 - node.addChild(newNode); - } - adjust[i].push(node); - }) - }); - return adjust; - }, - - //树调整 - _adjust: function (adjust) { - while (true) { - var isAllNeedAjust = false; - BI.backEach(adjust, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (!node.isNew) { - var needAdjust = true; - BI.any(node.getChildren(), function (k, n) { - if (!n.isNew) { - needAdjust = false; - return true; - } - }); - if (!node.isLeaf() && needAdjust === true) { - var allChilds = []; - BI.each(node.getChildren(), function (k, n) { - allChilds = allChilds.concat(n.getChildren()); - }); - node.removeAllChilds(); - BI.each(allChilds, function (k, c) { - node.addChild(c); - }); - var newNode = new BI.Node(BI.UUID()); - //newNode.isEmptyRoot = node.isRoot || node.isEmptyRoot; - newNode.isNew = true; - var index = node.parent.getChildIndex(node.id); - node.parent.removeChildByIndex(index); - node.parent.addChild(newNode, index); - newNode.addChild(node); - isAllNeedAjust = true; - } - } - }) - }); - if (isAllNeedAjust === false) { - break; - } else {//树重构 - adjust = this._stratification(); - } - } - return adjust; - }, - - _calculateWidth: function () { - var o = this.options; - var width = 0; - - function track1(node) { - var w = 0; - if (node.isLeaf()) { - return node.width; - } - BI.each(node.getChildren(), function (i, child) { - w += track1(child); - }); - return w; - } - - function track2(node) { - var w = 0; - if (node.isLeaf()) { - return node.height; + }; } - BI.each(node.getChildren(), function (i, child) { - w += track2(child); - }); - return w; - } - - if (this._isVertical()) { - width = track1(this.tree.getRoot()); - } else { - width = track2(this.tree.getRoot()); - } - - return width; - }, - - _isVertical: function () { - var o = this.options; - return o.direction === BI.Direction.Top || o.direction === BI.Direction.Bottom; - }, - - _calculateHeight: function () { - var o = this.options; - var height = 0; - - function track1(node) { - var h = 0; - BI.each(node.getChildren(), function (i, child) { - h = Math.max(h, track1(child)); - }); - return h + (node.height || 0); - } - - function track2(node) { - var h = 0; - BI.each(node.getChildren(), function (i, child) { - h = Math.max(h, track2(child)); - }); - return h + (node.width || 0); - } - - if (this._isVertical()) { - height = track1(this.tree.getRoot()); - } else { - height = track2(this.tree.getRoot()); - } - return height; - }, - - _calculateXY: function (levels) { - var o = this.options; - var width = this._calculateWidth(); - var height = this._calculateHeight(); - var levelCount = levels.length; - var allLeavesCount = this._calculateLeaves(); - //计算坐标 - var xy = {}; - var levelHeight = height / levelCount; - BI.each(levels, function (i, nodes) { - //计算权重 - var weights = []; - BI.each(nodes, function (j, node) { - weights[j] = (node.get("leaves") || 1) / allLeavesCount; - }); - BI.each(nodes, function (j, node) { - //求前j个元素的权重 - var weight = BI.sum(weights.slice(0, j)); - //求坐标 - var x = weight * width + weights[j] * width / 2; - var y = i * levelHeight + levelHeight / 2; - xy[node.id] = {x: x, y: y}; - }) + self.fireEvent(BI.DateTrigger.EVENT_CONFIRM); }); - return xy; - }, - - _stroke: function (levels, xy) { - var height = this._calculateHeight(); - var levelCount = levels.length; - var levelHeight = height / levelCount; - var self = this, o = this.options; - switch (o.direction) { - case BI.Direction.Top: - BI.each(levels, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (node.getChildrenLength() > 0 && !node.leaf) { - var path = ""; - var start = xy[node.id]; - var split = start.y + levelHeight / 2; - path += "M" + start.x + "," + (start.y + o.centerOffset) + "L" + start.x + "," + split; - var end = []; - BI.each(node.getChildren(), function (t, c) { - var e = end[t] = xy[c.id]; - path += "M" + e.x + "," + (e.y + o.centerOffset) + "L" + e.x + "," + split; - }); - if (end.length > 0) { - path += "M" + BI.first(end).x + "," + split + "L" + BI.last(end).x + "," + split; - } - self.svg.path(path).attr("stroke", "gray"); - } - }) - }); - break; - case BI.Direction.Bottom: - BI.each(levels, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (node.getChildrenLength() > 0 && !node.leaf) { - var path = ""; - var start = xy[node.id]; - var split = start.y - levelHeight / 2; - path += "M" + start.x + "," + (start.y - o.centerOffset) + "L" + start.x + "," + split; - var end = []; - BI.each(node.getChildren(), function (t, c) { - var e = end[t] = xy[c.id]; - path += "M" + e.x + "," + (e.y - o.centerOffset) + "L" + e.x + "," + split; - }); - if (end.length > 0) { - path += "M" + BI.first(end).x + "," + split + "L" + BI.last(end).x + "," + split; - } - self.svg.path(path).attr("stroke", "gray"); - } - }) - }); - break; - case BI.Direction.Left: - BI.each(levels, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (node.getChildrenLength() > 0 && !node.leaf) { - var path = ""; - var start = xy[node.id]; - var split = start.y + levelHeight / 2; - path += "M" + (start.y + o.centerOffset) + "," + start.x + "L" + split + "," + start.x; - var end = []; - BI.each(node.getChildren(), function (t, c) { - var e = end[t] = xy[c.id]; - path += "M" + (e.y + o.centerOffset) + "," + e.x + "L" + split + "," + e.x; - }); - if (end.length > 0) { - path += "M" + split + "," + BI.first(end).x + "L" + split + "," + BI.last(end).x; - } - self.svg.path(path).attr("stroke", "gray"); - } - }) - }); - break; - case BI.Direction.Right: - BI.each(levels, function (i, nodes) { - BI.each(nodes, function (j, node) { - if (node.getChildrenLength() > 0 && !node.leaf) { - var path = ""; - var start = xy[node.id]; - var split = start.y - levelHeight / 2; - path += "M" + (start.y - o.centerOffset) + "," + start.x + "L" + split + "," + start.x; - var end = []; - BI.each(node.getChildren(), function (t, c) { - var e = end[t] = xy[c.id]; - path += "M" + (e.y - o.centerOffset) + "," + e.x + "L" + split + "," + e.x; - }); - if (end.length > 0) { - path += "M" + split + "," + BI.first(end).x + "L" + split + "," + BI.last(end).x; - } - self.svg.path(path).attr("stroke", "gray"); - } - }) - }); - break; - } - }, - - _createBranches: function (levels) { - var self = this, o = this.options; - if (o.direction === BI.Direction.Bottom || o.direction === BI.Direction.Right) { - levels = levels.reverse(); - } - var xy = this._calculateXY(levels); - //画图 - this._stroke(levels, xy); - }, - - _isNeedAdjust: function () { - var o = this.options; - return o.direction === BI.Direction.Top && o.align === BI.VerticalAlign.Bottom || o.direction === BI.Direction.Bottom && o.align === BI.VerticalAlign.Top - || o.direction === BI.Direction.Left && o.align === BI.HorizontalAlign.Right || o.direction === BI.Direction.Right && o.align === BI.HorizontalAlign.Left + this.editor.on(BI.SignEditor.EVENT_SPACE, function () { + if (self.editor.isValid()) { + self.editor.blur(); + } + }); + this.editor.on(BI.SignEditor.EVENT_START, function () { + self.fireEvent(BI.DateTrigger.EVENT_START); + }); + this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { + self.fireEvent(BI.DateTrigger.EVENT_CHANGE); + }); + BI.createWidget({ + type: "bi.htape", + element: this.element, + items: [{ + el: BI.createWidget(), + width: 30 + }, { + el: this.editor + }] + }) }, - - setValue: function (value) { - + _dateCheck: function (date) { + return Date.parseDateTime(date, "%Y-%x-%d").print("%Y-%x-%d") == date || Date.parseDateTime(date, "%Y-%X-%d").print("%Y-%X-%d") == date || Date.parseDateTime(date, "%Y-%x-%e").print("%Y-%x-%e") == date || Date.parseDateTime(date, "%Y-%X-%e").print("%Y-%X-%e") == date; }, - - getValue: function () { - + _checkVoid: function (obj) { + return !Date.checkVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0]; }, - - _transformToTreeFormat: function (sNodes) { - var i, l; - if (!sNodes) { - return []; - } - - if (BI.isArray(sNodes)) { - var r = []; - var tmpMap = []; - for (i = 0, l = sNodes.length; i < l; i++) { - tmpMap[sNodes[i].id] = sNodes[i]; - } - for (i = 0, l = sNodes.length; i < l; i++) { - if (tmpMap[sNodes[i].pId] && sNodes[i].id != sNodes[i].pId) { - if (!tmpMap[sNodes[i].pId].children) { - tmpMap[sNodes[i].pId].children = []; + _autoAppend: function (v, dateObj) { + var self = this; + var date = Date.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d"); + var yearCheck = function (v) { + return Date.parseDateTime(v, "%Y").print("%Y") == v && date >= self.options.min && date <= self.options.max; + }; + var monthCheck = function (v) { + return Date.parseDateTime(v, "%Y-%X").print("%Y-%X") == v && date >= self.options.min && date <= self.options.max; + }; + if (BI.isNotNull(dateObj) && Date.checkLegal(v)) { + switch (v.length) { + case this._const.yearLength: + if (yearCheck(v)) { + this.editor.setValue(v + "-"); } - tmpMap[sNodes[i].pId].children.push(sNodes[i]); - } else { - r.push(sNodes[i]); - } + break; + case this._const.yearMonthLength: + if (monthCheck(v)) { + this.editor.setValue(v + "-"); + } + break; } - return r; - } else { - return [sNodes]; } }, - populate: function (items) { - var self = this, o = this.options; - o.items = items || []; - this.empty(); - items = this._transformToTreeFormat(o.items); - this.tree = new BI.Tree(); - this.tree.initTree(items); - - this.svg = BI.createWidget({ - type: "bi.svg" - }); - - //树分层 - var levels = this._stratification(); - - if (this._isNeedAdjust()) { - //树平移 - var adjust = this._translate(levels); - //树调整 - adjust = this._adjust(adjust); - - this._createBranches(adjust); - } else { - var adjust = this._fill(levels); - - this._createBranches(adjust); + setValue: function (v) { + var type, value, self = this; + var date = new Date(); + this.store_value = v; + if (BI.isNotNull(v)) { + type = v.type || BICst.MULTI_DATE_CALENDAR; value = v.value; + if(BI.isNull(value)){ + value = v; + } + } + var _setInnerValue = function (date, text) { + var dateStr = date.print("%Y-%x-%e"); + self.editor.setState(dateStr); + self.editor.setValue(dateStr); + self.setTitle(text + ":" + dateStr); + }; + switch (type) { + case BICst.MULTI_DATE_YEAR_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_PREV]; + date = new Date((date.getFullYear() - 1 * value), date.getMonth(), date.getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_AFTER]; + date = new Date((date.getFullYear() + 1 * value), date.getMonth(), date.getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_BEGIN]; + date = new Date(date.getFullYear(), 0, 1); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_END]; + date = new Date(date.getFullYear(), 11, 31); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_PREV]; + date = new Date().getBeforeMulQuarter(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_AFTER]; + date = new Date().getAfterMulQuarter(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_BEGIN]; + date = new Date().getQuarterStartDate(); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_END]; + date = new Date().getQuarterEndDate(); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_PREV]; + date = new Date().getBeforeMultiMonth(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_AFTER]; + date = new Date().getAfterMultiMonth(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_BEGIN]; + date = new Date(date.getFullYear(), date.getMonth(), 1); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_END]; + date = new Date(date.getFullYear(), date.getMonth(), (date.getLastDateOfMonth()).getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_WEEK_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_WEEK_PREV]; + date = date.getOffsetDate(-7 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_WEEK_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_WEEK_AFTER]; + date = date.getOffsetDate(7 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_PREV]; + date = date.getOffsetDate(-1 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_AFTER]; + date = date.getOffsetDate(1 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_TODAY: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_TODAY]; + date = new Date(); + _setInnerValue(date, text); + break; + default: + if (BI.isNull(value) || BI.isNull(value.day)) { + this.editor.setState(""); + this.editor.setValue(""); + this.setTitle(""); + } else { + var dateStr = value.year + "-" + (value.month + 1) + "-" + value.day; + this.editor.setState(dateStr); + this.editor.setValue(dateStr); + this.setTitle(dateStr); + } + break; } + }, - var container = BI.createWidget({ - type: "bi.layout", - width: this._isVertical() ? this._calculateWidth() : this._calculateHeight(), - height: this._isVertical() ? this._calculateHeight() : this._calculateWidth() - }); - BI.createWidget({ - type: "bi.absolute", - element: container, - items: [{ - el: this.svg, - top: 0, - left: 0, - right: 0, - bottom: 0 - }] - }); - if (this._isVertical()) { - items = [{ - type: "bi.handstand_branch_tree", - expander: { - direction: o.direction - }, - el: { - layouts: [{ - type: "bi.horizontal_adapt", - verticalAlign: o.align - }] - }, - items: items - }] - } else { - items = [{ - type: "bi.branch_tree", - expander: { - direction: o.direction - }, - el: { - layouts: [{ - type: "bi.vertical" - }, { - type: o.align === BI.HorizontalAlign.Left ? "bi.left" : "bi.right" - }] - }, - items: items - }] - } - BI.createWidget({ - type: "bi.adaptive", - element: container, - items: items - }); - BI.createWidget({ - type: "bi.center_adapt", - scrollable: true, - element: this, - items: [container] - }); + getKey: function () { + return this.editor.getValue(); + }, + getValue: function () { + return this.store_value; } + }); -BI.BranchRelation.EVENT_CHANGE = "BranchRelation.EVENT_CHANGE"; -$.shortcut("bi.branch_relation", BI.BranchRelation);/** +BI.DateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.DateTrigger.EVENT_START = "EVENT_START"; +BI.DateTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.DateTrigger.EVENT_CHANGE = "EVENT_CHANGE"; +BI.DateTrigger.EVENT_VALID = "EVENT_VALID"; +BI.DateTrigger.EVENT_ERROR = "EVENT_ERROR"; +BI.DateTrigger.EVENT_TRIGGER_CLICK = "EVENT_TRIGGER_CLICK"; +BI.DateTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +$.shortcut("bi.date_trigger", BI.DateTrigger);/** * Created by zcf on 2017/2/20. */ BI.DatePaneWidget = BI.inherit(BI.Widget, { @@ -8765,172 +7849,40 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, { width: c.triggerWidth }, width: c.triggerWidth - }, { - el: { - type: "bi.trigger_icon_button", - width: c.triggerWidth - }, - width: c.triggerWidth - } - ] - }); - }, - setValue: function (v) { - if(BI.isNotNull(v)){ - this.editor.setState(v + 1); - this.editor.setValue(v + 1); - this.editor.setTitle(v + 1); - return; - } - this.editor.setState(); - this.editor.setValue(); - this.editor.setTitle(); - }, - getKey: function () { - return this.editor.getValue() | 0; - }, - getValue: function () { - return this.editor.getValue() - 1; - } -}); -BI.MonthTrigger.EVENT_FOCUS = "EVENT_FOCUS"; -BI.MonthTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.MonthTrigger.EVENT_START = "EVENT_START"; -BI.MonthTrigger.EVENT_STOP = "EVENT_STOP"; -BI.MonthTrigger.EVENT_CHANGE = "EVENT_CHANGE"; -$.shortcut("bi.month_trigger", BI.MonthTrigger);/** - * Created by fay on 2016/9/14. - */ -BI.TextLabelItemGroup = BI.inherit(BI.ButtonGroup, { - _defaultConfig: function () { - return BI.extend(BI.TextLabelItemGroup.superclass._defaultConfig.apply(this, arguments), { - chooseType: BI.Selection.Multi - }); - }, - - _init: function () { - BI.TextLabelItemGroup.superclass._init.apply(this, arguments); - this._checkBtnStyle(); - }, - - _btnsCreator: function (items) { - var self = this, args = Array.prototype.slice.call(arguments), o = this.options; - var buttons = this._createBtns(items); - args[0] = buttons; - - BI.each(this.behaviors, function (i, behavior) { - behavior.doBehavior.apply(behavior, args); - }); - BI.each(buttons, function (i, btn) { - btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - switch (o.chooseType) { - case BI.ButtonGroup.CHOOSE_TYPE_MULTI: - if (BI.isEmptyString(btn.getValue())) { - self.setValue([]); - } else { - self._checkBtnStyle(); - } - break; - case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: - self.setValue(btn.getValue()); - break; - case BI.ButtonGroup.CHOOSE_TYPE_NONE: - self.setValue([]); - break; - } - self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - btn.on(BI.Events.DESTROY, function () { - BI.remove(self.buttons, btn); - }) - }); - - return buttons; - }, - - _checkBtnStyle: function () { - var self = this; - var flag = BI.isEmptyArray(this.getValue()); - BI.each(this.buttons, function (idx, btn) { - if (flag && BI.isEmptyString(btn.getValue())) { - btn.setSelected(true); - btn.doHighLight(); - } - if (!flag && BI.isEmptyString(btn.getValue())) { - btn.setSelected(false); - btn.unHighLight(); - } - if (btn.isSelected()) { - btn.doHighLight(); - } else { - btn.unHighLight(); - } - }); - }, - - setValue: function (v) { - BI.TextLabelItemGroup.superclass.setValue.apply(this, arguments); - this._checkBtnStyle(); - } -}); - -$.shortcut('bi.text_label_item_group', BI.TextLabelItemGroup); -/** - * 文本标签 - * - * Created by fay on 2016/9/11. - */ -BI.TextLabel = BI.inherit(BI.Widget, { - - _constant: { - MAX_COLUMN_SIZE: 40 - }, - - _defaultConfig: function () { - return BI.extend(BI.TextLabel.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-label", - title: "" - }) - }, - - _init: function () { - BI.TextLabel.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var title = BI.createWidget({ - type: "bi.label", - text: o.title + ":" - }); - this.container = BI.createWidget({ - type: "bi.text_label_item_group", - items: BI.createItems(o.items.slice(0, this._constant.MAX_COLUMN_SIZE), { - type: "bi.text_button" - }), - layouts: [{ - type: "bi.horizontal", - - }] + }, { + el: { + type: "bi.trigger_icon_button", + width: c.triggerWidth + }, + width: c.triggerWidth + } + ] }); - - BI.createWidget({ - type: "bi.horizontal", - items: [title, this.container], - element: this - }) }, - setValue: function (v) { - this.container.setValue(v); + if(BI.isNotNull(v)){ + this.editor.setState(v + 1); + this.editor.setValue(v + 1); + this.editor.setTitle(v + 1); + return; + } + this.editor.setState(); + this.editor.setValue(); + this.editor.setTitle(); + }, + getKey: function () { + return this.editor.getValue() | 0; }, - getValue: function () { - return this.container.getValue(); + return this.editor.getValue() - 1; } }); - -$.shortcut('bi.text_label', BI.TextLabel);/** +BI.MonthTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MonthTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.MonthTrigger.EVENT_START = "EVENT_START"; +BI.MonthTrigger.EVENT_STOP = "EVENT_STOP"; +BI.MonthTrigger.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut("bi.month_trigger", BI.MonthTrigger);/** * @class BI.MultiLayerSelectTreeCombo * @extends BI.Widget */ @@ -11846,42 +10798,361 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, { BI.nextTick(function () { me.populate(); }); - }); + }); + + this.switcher.element.click(function (e) { + e.stopPropagation(); + }); + }, + + adjustView: function () { + this.switcher.adjustView(); + }, + + hideView: function () { + this.switcher.empty(); + this.switcher.hideView(); + }, + + setValue: function (v) { + this.switcher.setValue(v); + }, + + setButtonChecked: function (v) { + this.button.setValue(v) + }, + + getValue: function () { + + }, + + populate: function (items) { + this.switcher.populate.apply(this.switcher, arguments); + } +}); + +BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = "MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE"; +BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW"; +$.shortcut('bi.multi_select_check_selected_switcher', BI.MultiSelectCheckSelectedSwitcher);/** + * Created by zcf on 2016/12/14. + */ +BI.MultiStringList = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.MultiStringList.superclass._defaultConfig.apply(this, arguments), { + baseCls: 'bi-multi-string-list', + itemsCreator: BI.emptyFn, + valueFormatter: BI.emptyFn, + height: 25 + }) + }, + _init: function () { + BI.MultiStringList.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + + var assertShowValue = function () { + BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); + self.trigger.getSearcher().setState(self.storeValue); + self.trigger.getCounter().setButtonChecked(self.storeValue); + }; + this.storeValue = {}; + + + this.popup = BI.createWidget({ + type: "bi.multi_select_loader", + cls: "popup-multi-string-list", + itemsCreator: o.itemsCreator, + valueFormatter: o.valueFormatter, + onLoaded: o.onLoaded, + el: { + height: "" + } + }); + this.popup.on(BI.MultiSelectLoader.EVENT_CHANGE, function () { + self.storeValue = this.getValue(); + self._adjust(function () { + assertShowValue(); + self.fireEvent(BI.MultiStringList.EVENT_CHANGE); + }); + }); + + this.trigger = BI.createWidget({ + type: "bi.multi_select_trigger", + height: o.height, + adapter: this.popup, + masker: { + offset: { + left: 1, + top: 0, + right: 2, + bottom: 1 + } + }, + valueFormatter: o.valueFormatter, + itemsCreator: function (op, callback) { + o.itemsCreator(op, function (res) { + if (op.times === 1 && BI.isNotNull(op.keyword)) { + self.trigger.setValue(self.getValue()); + } + callback.apply(self, arguments); + }); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { + self._setStartValue(""); + this.getSearcher().setValue(self.storeValue); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () { + self._setStartValue(""); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { + if (this.getSearcher().hasMatched()) { + var keyword = this.getSearcher().getKeyword(); + self._join({ + type: BI.Selection.Multi, + value: [keyword] + }, function () { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + self._setStartValue(keyword); + assertShowValue(); + self.populate(); + self._setStartValue(""); + self.fireEvent(BI.MultiStringList.EVENT_CHANGE); + }) + } + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { + var last = BI.last(keywords); + keywords = BI.initial(keywords || []); + if (keywords.length > 0) { + self._joinKeywords(keywords, function () { + if (BI.isEndWithBlank(last)) { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + assertShowValue(); + self.popup.populate(); + self._setStartValue(""); + } else { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + assertShowValue(); + } + }); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) { + if (obj instanceof BI.MultiSelectBar) { + self._joinAll(this.getValue(), function () { + assertShowValue(); + }); + } else { + self._join(this.getValue(), function () {//安徽省 北京 + assertShowValue(); + }); + } + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { + this.getCounter().setValue(self.storeValue); + }); + var div = BI.createWidget({ + type: "bi.layout" + }); + BI.createWidget({ + type: "bi.vtape", + element: this.element, + height: "100%", + width: "100%", + items: [{ + el: this.trigger, + height: 25 + }, { + el: div, + height: 2 + }, { + el: this.popup, + height: "fill" + }] + }); + }, + _defaultState: function () { + this.trigger.stopEditing(); + }, + + _assertValue: function (val) { + val || (val = {}); + val.type || (val.type = BI.Selection.Multi); + val.value || (val.value = []); + }, + + _makeMap: function (values) { + return BI.makeObject(values || []); + }, + + _joinKeywords: function (keywords, callback) { + var self = this, o = this.options; + this._assertValue(this.storeValue); + if (!this._allData) { + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_ALL_DATA + }, function (ob) { + self._allData = BI.pluck(ob.items, "value"); + digest(self._allData); + }) + } else { + digest(this._allData) + } + + function digest(items) { + var selectedMap = self._makeMap(items); + BI.each(keywords, function (i, val) { + if (BI.isNotNull(selectedMap[val])) { + self.storeValue.value[self.storeValue.type === BI.Selection.Multi ? "pushDistinct" : "remove"](val); + } + }); + self._adjust(callback); + } + }, + + _joinAll: function (res, callback) { + var self = this, o = this.options; + this._assertValue(res); + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_ALL_DATA, + keyword: this.trigger.getKey() + }, function (ob) { + var items = BI.pluck(ob.items, "value"); + if (self.storeValue.type === res.type) { + var change = false; + var map = self._makeMap(self.storeValue.value); + BI.each(items, function (i, v) { + if (BI.isNotNull(map[v])) { + change = true; + delete map[v]; + } + }); + change && (self.storeValue.value = BI.values(map)); + self._adjust(callback); + return; + } + var selectedMap = self._makeMap(self.storeValue.value); + var notSelectedMap = self._makeMap(res.value); + var newItems = []; + BI.each(items, function (i, item) { + if (BI.isNotNull(selectedMap[items[i]])) { + delete selectedMap[items[i]]; + } + if (BI.isNull(notSelectedMap[items[i]])) { + newItems.push(item); + } + }); + self.storeValue.value = newItems.concat(BI.values(selectedMap)); + self._adjust(callback); + }) + }, + + _adjust: function (callback) { + var self = this, o = this.options; + if (!this._count) { + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_DATA_LENGTH + }, function (res) { + self._count = res.count; + adjust(); + callback(); + }); + } else { + adjust(); + callback(); + } + function adjust() { + if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { + self.storeValue = { + type: BI.Selection.Multi, + value: [] + } + } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { + self.storeValue = { + type: BI.Selection.All, + value: [] + } + } + } + }, - this.switcher.element.click(function (e) { - e.stopPropagation(); - }); + _join: function (res, callback) { + var self = this, o = this.options; + this._assertValue(res); + this._assertValue(this.storeValue); + if (this.storeValue.type === res.type) { + var map = this._makeMap(this.storeValue.value); + BI.each(res.value, function (i, v) { + if (!map[v]) { + self.storeValue.value.push(v); + map[v] = v; + } + }); + var change = false; + BI.each(res.assist, function (i, v) { + if (BI.isNotNull(map[v])) { + change = true; + delete map[v]; + } + }); + change && (this.storeValue.value = BI.values(map)); + self._adjust(callback); + return; + } + this._joinAll(res, callback); }, - adjustView: function () { - this.switcher.adjustView(); + _setStartValue: function (value) { + this._startValue = value; + this.popup.setStartValue(value); }, - hideView: function () { - this.switcher.empty(); - this.switcher.hideView(); + // isAllSelected: function () { + // return this.popup.isAllSelected(); + // }, + + resize: function () { + this.trigger.getCounter().adjustView(); + this.trigger.getSearcher().adjustView(); }, - setValue: function (v) { - this.switcher.setValue(v); + setEnable: function (v) { + this.trigger.setEnable(v); + this.popup.setEnable(v); }, - setButtonChecked: function (v) { - this.button.setValue(v) + setValue: function (v) { + this.storeValue = v || {}; + this._assertValue(this.storeValue); + this.popup.setValue(this.storeValue); + this.trigger.setValue(this.storeValue); }, getValue: function () { - + return this.storeValue; }, - populate: function (items) { - this.switcher.populate.apply(this.switcher, arguments); + populate: function () { + this._count = null; + this._allData = null; + this.popup.populate.apply(this.popup, arguments); + this.trigger.populate.apply(this.trigger, arguments); } }); -BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = "MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE"; -BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW"; -$.shortcut('bi.multi_select_check_selected_switcher', BI.MultiSelectCheckSelectedSwitcher);/** +BI.extend(BI.MultiStringList, { + REQ_GET_DATA_LENGTH: 0, + REQ_GET_ALL_DATA: -1 +}); + +BI.MultiStringList.EVENT_CHANGE = "BI.MultiStringList.EVENT_CHANGE"; +$.shortcut("bi.multi_string_list", BI.MultiStringList);/** * * @class BI.MultiTreeCheckPane * @extends BI.Pane @@ -12619,7 +11890,231 @@ BI.MultiTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE"; BI.MultiTreeSearcher.EVENT_START = "EVENT_START"; BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; -$.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);//小于号的值为:0,小于等于号的值为:1 +$.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);/** + * Created by zcf on 2016/12/20. + */ +BI.MultiTreeList = BI.inherit(BI.Widget, { + constants: { + offset: { + left: 1, + top: 0, + right: 2, + bottom: 1 + } + }, + + _defaultConfig: function () { + return BI.extend(BI.MultiTreeList.superclass._defaultConfig.apply(this, arguments), { + baseCls: 'bi-multi-tree-combo', + itemsCreator: BI.emptyFn, + height: 25 + }); + }, + + _init: function () { + BI.MultiTreeList.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + + var isInit = false; + var want2showCounter = false; + + this.popup = BI.createWidget({ + type: "bi.multi_tree_list_popup", + itemsCreator: o.itemsCreator + }); + + this.popup.on(BI.MultiStringListPopup.EVENT_AFTER_INIT, function () { + self.trigger.getCounter().adjustView(); + isInit = true; + if (want2showCounter === true) { + showCounter(); + } + }); + + this.trigger = BI.createWidget({ + type: "bi.multi_select_trigger", + height: o.height, + adapter: this.popup, + masker: { + offset: this.constants.offset + }, + searcher: { + type: "bi.multi_tree_searcher", + itemsCreator: o.itemsCreator + }, + switcher: { + el: { + type: "bi.multi_tree_check_selected_button" + }, + popup: { + type: "bi.multi_tree_check_pane", + itemsCreator: o.itemsCreator + } + } + }); + + this.storeValue = {value: {}}; + + var isSearching = function () { + return self.trigger.getSearcher().isSearching(); + }; + + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { + self.storeValue = {value: self.popup.getValue()}; + this.setValue(self.storeValue); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () { + self.storeValue = {value: this.getValue()}; + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + BI.nextTick(function () { + self.trigger.populate(); + self.popup.populate(); + }); + }); + function showCounter() { + if (isSearching()) { + self.storeValue = {value: self.trigger.getValue()}; + } else { + self.storeValue = {value: self.popup.getValue()}; + } + self.trigger.setValue(self.storeValue); + } + + this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { + if (want2showCounter === false) { + want2showCounter = true; + } + if (isInit === true) { + want2showCounter = null; + showCounter(); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () { + var val = { + type: BI.Selection.Multi, + value: this.getSearcher().hasChecked() ? {1: 1} : {} + }; + this.getSearcher().setState(val); + this.getCounter().setButtonChecked(val); + }); + + this.popup.on(BI.MultiStringListPopup.EVENT_CHANGE, function () { + showCounter(); + var val = { + type: BI.Selection.Multi, + value: this.hasChecked() ? {1: 1} : {} + }; + self.trigger.getSearcher().setState(val); + self.trigger.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeList.EVENT_CHANGE); + }); + + var div = BI.createWidget({ + type: "bi.layout" + }); + BI.createWidget({ + type: "bi.vtape", + element: this.element, + height: "100%", + width: "100%", + items: [{ + el: this.trigger, + height: 25 + }, { + el: div, + height: 2 + }, { + el: this.popup, + height: "fill" + }] + }) + }, + + _defaultState: function () { + this.trigger.stopEditing(); + }, + + resize: function () { + this.trigger.getCounter().adjustView(); + this.trigger.getSearcher().adjustView(); + }, + + setEnable: function (v) { + this.trigger.setEnable(v); + this.popup.setEnable(v); + }, + + setValue: function (v) { + this.storeValue.value = v || {}; + this.popup.setValue({ + value: v || {} + }); + this.trigger.setValue({ + value: v || {} + }); + }, + + getValue: function () { + return this.storeValue.value; + }, + + populate: function () { + this.trigger.populate.apply(this.trigger, arguments); + this.popup.populate.apply(this.popup, arguments); + } +}); +BI.MultiTreeList.EVENT_CHANGE = "MultiTreeList.EVENT_CHANGE"; +$.shortcut('bi.multi_tree_list', BI.MultiTreeList);/** + * Created by zcf on 2016/12/21. + */ +BI.MultiStringListPopup=BI.inherit(BI.Widget,{ + _defaultConfig:function () { + return BI.extend(BI.MultiStringListPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-tree-list-popup", + itemsCreator: BI.emptyFn + }); + }, + _init:function () { + BI.MultiStringListPopup.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.popup = BI.createWidget({ + type: "bi.sync_tree", + height: 400, + element:this.element, + itemsCreator: o.itemsCreator + }); + this.popup.on(BI.TreeView.EVENT_AFTERINIT, function () { + self.fireEvent(BI.MultiStringListPopup.EVENT_AFTER_INIT) + }); + this.popup.on(BI.TreeView.EVENT_CHANGE, function () { + self.fireEvent(BI.MultiStringListPopup.EVENT_CHANGE) + }); + }, + + hasChecked: function () { + return this.popup.hasChecked(); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + v || (v = {}); + this.popup.setValue(v.value); + }, + + populate: function (config) { + this.popup.stroke(config); + } + +}); +BI.MultiStringListPopup.EVENT_AFTER_INIT="BI.MultiStringListPopup.EVENT_AFTER_INIT"; +BI.MultiStringListPopup.EVENT_CHANGE="BI.MultiStringListPopup.EVENT_CHANGE"; +$.shortcut("bi.multi_tree_list_popup",BI.MultiStringListPopup);//小于号的值为:0,小于等于号的值为:1 //closeMIn:最小值的符号,closeMax:最大值的符号 /** * Created by roy on 15/9/17. diff --git a/src/base/combination/searcher.js b/src/base/combination/searcher.js index c4dae3418f..0fa8eec11b 100644 --- a/src/base/combination/searcher.js +++ b/src/base/combination/searcher.js @@ -130,7 +130,7 @@ BI.Searcher = BI.inherit(BI.Widget, { this.fireEvent(BI.Searcher.EVENT_START); this.popupView.startSearch && this.popupView.startSearch(); //搜索前先清空dom - BI.Maskers.get(this.getName()).empty(); + // BI.Maskers.get(this.getName()).empty(); BI.nextTick(function (name) { BI.Maskers.show(name); }, this.getName()); @@ -155,9 +155,9 @@ BI.Searcher = BI.inherit(BI.Widget, { BI.Maskers.hide(name); if (BI.Maskers.has(name) && this._isSearching === true) { //搜索后清空dom - BI.nextTick(function () { - BI.Maskers.has(name) && BI.Maskers.get(name).empty(); - }); + // BI.nextTick(function () { + // BI.Maskers.has(name) && BI.Maskers.get(name).empty(); + // }); this.popupView && this.popupView.stopSearch && this.popupView.stopSearch(); this.fireEvent(BI.Searcher.EVENT_STOP); } diff --git a/src/widget/base/editor/editor.adapt.js b/src/case/editor/editor.adapt.js similarity index 100% rename from src/widget/base/editor/editor.adapt.js rename to src/case/editor/editor.adapt.js diff --git a/src/widget/base/editor/editor.clear.js b/src/case/editor/editor.clear.js similarity index 100% rename from src/widget/base/editor/editor.clear.js rename to src/case/editor/editor.clear.js diff --git a/src/widget/base/editor/editor.search.js b/src/case/editor/editor.search.js similarity index 100% rename from src/widget/base/editor/editor.search.js rename to src/case/editor/editor.search.js diff --git a/src/widget/base/editor/editor.search.small.js b/src/case/editor/editor.search.small.js similarity index 100% rename from src/widget/base/editor/editor.search.small.js rename to src/case/editor/editor.search.small.js diff --git a/src/widget/base/editor/editor.sign.initial.js b/src/case/editor/editor.sign.initial.js similarity index 100% rename from src/widget/base/editor/editor.sign.initial.js rename to src/case/editor/editor.sign.initial.js diff --git a/src/widget/base/editor/editor.sign.style.js b/src/case/editor/editor.sign.style.js similarity index 100% rename from src/widget/base/editor/editor.sign.style.js rename to src/case/editor/editor.sign.style.js diff --git a/src/widget/base/editor/editor.text.js b/src/case/editor/editor.text.js similarity index 100% rename from src/widget/base/editor/editor.text.js rename to src/case/editor/editor.text.js diff --git a/src/widget/base/editor/editor.text.small.js b/src/case/editor/editor.text.small.js similarity index 100% rename from src/widget/base/editor/editor.text.small.js rename to src/case/editor/editor.text.small.js diff --git a/src/case/pager/pager.all.count.js~67b55d486e769f445942f15883303ca839ffd092 b/src/case/pager/pager.all.count.js~67b55d486e769f445942f15883303ca839ffd092 deleted file mode 100644 index 1d698b609b..0000000000 --- a/src/case/pager/pager.all.count.js~67b55d486e769f445942f15883303ca839ffd092 +++ /dev/null @@ -1,163 +0,0 @@ -/** - * 有总页数和总行数的分页控件 - * Created by Young's on 2016/10/13. - */ -BI.AllCountPager = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-all-count-pager", - height: 30, - pages: 1, //必选项 - curr: 1, //初始化当前页, pages为数字时可用, - count: 1 //总行数 - }) - }, - _init: function () { - BI.AllCountPager.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.editor = BI.createWidget({ - type: "bi.small_text_editor", - cls: "pager-editor", - validationChecker: function (v) { - return (self.rowCount.getValue() == 0 && v === "0") || BI.isPositiveInteger(v); - }, - hgap: 4, - vgap: 0, - value: o.curr, - errorText: BI.i18nText("BI-Please_Input_Integer"), - width: 30, - height: 20 - }); - this.pager = BI.createWidget({ - type: "bi.detail_pager", - width: 36, - layouts: [{ - type: "bi.horizontal", - hgap: 1, - vgap: 1 - }], - - dynamicShow: false, - pages: o.pages, - curr: o.curr, - groups: 0, - - first: false, - last: false, - prev: { - type: "bi.icon_button", - value: "prev", - title: BI.i18nText("BI-Previous_Page"), - warningTitle: BI.i18nText("BI-Current_Is_First_Page"), - height: 20, - cls: "all-pager-prev column-pre-page-h-font" - }, - next: { - type: "bi.icon_button", - value: "next", - title: BI.i18nText("BI-Next_Page"), - warningTitle: BI.i18nText("BI-Current_Is_Last_Page"), - height: 20, - cls: "all-pager-next column-next-page-h-font" - }, - - hasPrev: o.hasPrev, - hasNext: o.hasNext, - firstPage: o.firstPage, - lastPage: o.lastPage - }); - - this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () { - self.pager.setValue(BI.parseInt(self.editor.getValue())); - self.fireEvent(BI.AllCountPager.EVENT_CHANGE); - }); - this.pager.on(BI.Pager.EVENT_CHANGE, function () { - self.fireEvent(BI.AllCountPager.EVENT_CHANGE); - }); - this.pager.on(BI.Pager.EVENT_AFTER_POPULATE, function () { - self.editor.setValue(self.pager.getCurrentPage()); - }); - - this.allPages = BI.createWidget({ - type: "bi.label", - width: 30, - title: o.pages, - text: "/" + o.pages - }); - - this.rowCount = BI.createWidget({ - type: "bi.label", - height: o.height, - hgap: 5, - text: o.count, - title: o.count - }); - - var count = BI.createWidget({ - type: "bi.left", - items: [{ - type: "bi.label", - height: o.height, - text: BI.i18nText("BI-Basic_Total"), - width: 15 - }, this.rowCount, { - type: "bi.label", - height: o.height, - text: BI.i18nText("BI-Basic_Tiao") + BI.i18nText("BI-Basic_Data"), - width: 50, - textAlign: "left" - }] - }); - BI.createWidget({ - type: "bi.center_adapt", - element: this, - columnSize: ["", 30, 40, 36], - items: [count, this.editor, this.allPages, this.pager] - }) - }, - - setAllPages: function (v) { - this.allPages.setText("/" + v); - this.allPages.setTitle(v); - this.pager.setAllPages(v); - this.editor.setEnable(v >= 1); - }, - - setValue: function (v) { - this.pager.setValue(v); - }, - - setCount: function (count) { - this.rowCount.setValue(count); - this.rowCount.setTitle(count); - }, - - getCurrentPage: function () { - return this.pager.getCurrentPage(); - }, - - hasPrev: function () { - return this.pager.hasPrev(); - }, - - hasNext: function () { - return this.pager.hasNext(); - }, - - setPagerVisible: function (b) { - this.editor.setVisible(b); - this.allPages.setVisible(b); - this.pager.setVisible(b); - }, - - getAliasWidth: function () { - return this.options.width - 100; - }, - - populate: function () { - this.pager.populate(); - } -}); -BI.AllCountPager.EVENT_CHANGE = "EVENT_CHANGE"; -$.shortcut("bi.all_count_pager", BI.AllCountPager); \ No newline at end of file diff --git a/src/css/base/base.css b/src/css/base/base.css deleted file mode 100644 index f3ec3f4509..0000000000 --- a/src/css/base/base.css +++ /dev/null @@ -1,21 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -@font-face { - font-family: 'bbr'; - src: url('/resources/fonts/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('/resources/fonts/iconfont.woff') format('woff'), /* chrome、firefox */ url('/resources/fonts/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('/resources/fonts/iconfont.svg#svgFontName') format('svg'); - - /* iOS 4.1- */ -} -.b-font { - font-family: "bi"; - font-style: normal; - -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; - -moz-osx-font-smoothing: grayscale; -} -.bi-base-request-fail-mask .mask-pane { - background: #ffffff; - opacity: 0.8; - filter: alpha(opacity=80); -} diff --git a/src/css/base/calendar/calendar.css b/src/css/base/calendar/calendar.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/calendar/calendar.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/chart/chart.combine.css b/src/css/base/chart/chart.combine.css deleted file mode 100644 index 1c94930a02..0000000000 --- a/src/css/base/chart/chart.combine.css +++ /dev/null @@ -1,11 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-combine-chart .bi-linkage-list { - background-color: #ffffff; - border: 1px solid #eaeaea; - z-index: 1000000000; -} -.bi-combine-chart .bi-linkage-list .bi-linkage-list-item:hover { - background-color: #f4f4f4; -} diff --git a/src/css/base/colorpicker/button.colorpicker.css b/src/css/base/colorpicker/button.colorpicker.css deleted file mode 100644 index 6317de4f6f..0000000000 --- a/src/css/base/colorpicker/button.colorpicker.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker-button { - background-color: #eaeaea; -} -.bi-color-picker-button .color-picker-button-mask { - border: 1px solid #1a1a1a; -} diff --git a/src/css/base/colorpicker/colorpicker.css b/src/css/base/colorpicker/colorpicker.css deleted file mode 100644 index 98fc55e0c9..0000000000 --- a/src/css/base/colorpicker/colorpicker.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker > .center-element { - border-left: 1px solid #ffffff; - border-top: 1px solid #ffffff; -} diff --git a/src/css/base/colorpicker/editor.colorpicker.css b/src/css/base/colorpicker/editor.colorpicker.css deleted file mode 100644 index 62cdece565..0000000000 --- a/src/css/base/colorpicker/editor.colorpicker.css +++ /dev/null @@ -1,15 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-picker-editor .color-picker-editor-label { - color: #808080; -} -.bi-color-picker-editor .color-picker-editor-display { - background: #ffffff; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - box-shadow: 0px 0px 2px 1px #d4dadd inset; - -webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset; - -moz-box-shadow: 0px 0px 2px 1px #d4dadd inset; -} diff --git a/src/css/base/combination/combo.css b/src/css/base/combination/combo.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/combination/combo.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/combination/searcher.css b/src/css/base/combination/searcher.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/combination/searcher.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/combo/combo.bubble.css b/src/css/base/combo/combo.bubble.css deleted file mode 100644 index 0c7ee8d0ed..0000000000 --- a/src/css/base/combo/combo.bubble.css +++ /dev/null @@ -1,31 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-bubble-combo .bubble-combo-triangle-left { - width: 0; - height: 0; - border-top: 6px solid transparent; - border-left: 6px solid #009de3; - border-bottom: 6px solid transparent; -} -.bi-bubble-combo .bubble-combo-triangle-right { - width: 0; - height: 0; - border-top: 6px solid transparent; - border-right: 6px solid #009de3; - border-bottom: 6px solid transparent; -} -.bi-bubble-combo .bubble-combo-triangle-top { - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #009de3; -} -.bi-bubble-combo .bubble-combo-triangle-bottom { - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #009de3; -} diff --git a/src/css/base/combo/popup.bubble.css b/src/css/base/combo/popup.bubble.css deleted file mode 100644 index 2423ffe25a..0000000000 --- a/src/css/base/combo/popup.bubble.css +++ /dev/null @@ -1,11 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-bubble-popup-view { - -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); -} -.bi-bubble-popup-view .bubble-popup-line { - background-color: #009de3; -} diff --git a/src/css/base/dom.css b/src/css/base/dom.css deleted file mode 100644 index 4429e36252..0000000000 --- a/src/css/base/dom.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/************hing light*****************/ -.bi-z-index-mask { - background-color: #1a1a1a; - opacity: 0.5; - filter: alpha(opacity=50); -} diff --git a/src/css/base/formula/codemirror.css b/src/css/base/formula/codemirror.css deleted file mode 100644 index ee5e2577a5..0000000000 --- a/src/css/base/formula/codemirror.css +++ /dev/null @@ -1,473 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/* BASICS */ -.CodeMirror { - /* Set height, width, borders, and global font properties here */ - font-family: monospace; - cursor: text; - width: 100%; - height: 100%; - color: black; -} -/* PADDING */ -.CodeMirror-lines { - padding: 4px 0; - /* Vertical padding around content */ -} -.CodeMirror pre { - padding: 0 4px; - /* Horizontal padding of content */ -} -.CodeMirror-scrollbar-filler, -.CodeMirror-gutter-filler { - background-color: white; - /* The little square between H and V scrollbars */ -} -/* GUTTER */ -.CodeMirror-gutters { - border-right: 1px solid #ddd; - background-color: #f7f7f7; - white-space: nowrap; -} -.CodeMirror-linenumber { - padding: 0 3px 0 5px; - min-width: 20px; - text-align: right; - color: #999; - white-space: nowrap; -} -.CodeMirror-guttermarker { - color: black; -} -.CodeMirror-guttermarker-subtle { - color: #999; -} -/* CURSOR */ -.CodeMirror div.CodeMirror-cursor { - border-left: 1px solid black; -} -/* Shown when moving in bi-directional text */ -.CodeMirror div.CodeMirror-secondarycursor { - border-left: 1px solid silver; -} -.CodeMirror.cm-fat-cursor div.CodeMirror-cursor { - width: auto; - border: 0; - background: #7e7; -} -.CodeMirror.cm-fat-cursor div.CodeMirror-cursors { - z-index: 1; -} -.cm-animate-fat-cursor { - width: auto; - border: 0; - -webkit-animation: blink 1.06s steps(1) infinite; - -moz-animation: blink 1.06s steps(1) infinite; - animation: blink 1.06s steps(1) infinite; -} -@-moz-keyframes blink { - 0% { - background: #7e7; - } - 50% { - background: none; - } - 100% { - background: #7e7; - } -} -@-webkit-keyframes blink { - 0% { - background: #7e7; - } - 50% { - background: none; - } - 100% { - background: #7e7; - } -} -@keyframes blink { - 0% { - background: #7e7; - } - 50% { - background: none; - } - 100% { - background: #7e7; - } -} -/* Can style cursor different in overwrite (non-insert) mode */ -.cm-tab { - display: inline-block; - text-decoration: inherit; -} -.CodeMirror-ruler { - border-left: 1px solid #ccc; - position: absolute; -} -/* DEFAULT THEME */ -.cm-s-default .cm-header { - color: blue; -} -.cm-s-default .cm-quote { - color: #090; -} -.cm-negative { - color: #d44; -} -.cm-positive { - color: #292; -} -.cm-header, -.cm-strong { - font-weight: bold; -} -.cm-em { - font-style: italic; -} -.cm-link { - text-decoration: underline; -} -.cm-strikethrough { - text-decoration: line-through; -} -.cm-s-default .cm-atom { - color: #219; -} -.cm-s-default .cm-number { - color: #164; -} -.cm-s-default .cm-def { - color: #00f; -} -.cm-s-default .cm-variable-2 { - color: #05a; -} -.cm-s-default .cm-variable-3 { - color: #085; -} -.cm-s-default .cm-comment { - color: #a50; -} -.cm-s-default .cm-string { - color: #a11; -} -.cm-s-default .cm-string-2 { - color: #f50; -} -.cm-s-default .cm-meta { - color: #555; -} -.cm-s-default .cm-qualifier { - color: #555; -} -.cm-s-default .cm-builtin { - color: #30a; -} -.cm-s-default .cm-bracket { - color: #997; -} -.cm-s-default .cm-tag { - color: #170; -} -.cm-s-default .cm-attribute { - color: #00c; -} -.cm-s-default .cm-hr { - color: #999; -} -.cm-s-default .cm-link { - color: #00c; -} -.cm-s-default span[class*="fieldName"] { - color: white; - padding: 1px ; - margin: 1px 0px; - background: #009de3; -} -.cm-s-default span[class*="start"] { - -webkit-border-radius: 3px 0px 0px 3px; - -moz-border-radius: 3px 0px 0px 3px; - border-radius: 3px 0px 0px 3px; - margin-left: 3px; -} -.cm-s-default span[class*="end"] { - -webkit-border-radius: 0px 3px 3px 0px; - -moz-border-radius: 0px 3px 3px 0px; - border-radius: 0px 3px 3px 0px; - margin-right: 3px; -} -.cm-s-default span[class*="start end"] { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.cm-s-default span[class*="#"] { - color: #009de3; -} -.cm-s-default .cm-error { - color: #f00; -} -.cm-invalidchar { - color: #f00; -} -.CodeMirror-composing { - border-bottom: 2px solid; -} -/* Default styles for common addons */ -div.CodeMirror span.CodeMirror-matchingbracket { - color: #0f0; -} -div.CodeMirror span.CodeMirror-nonmatchingbracket { - color: #f22; -} -.CodeMirror-matchingtag { - background: rgba(255, 150, 0, 0.3); -} -.CodeMirror-activeline-background { - background: #e8f2ff; -} -/* STOP */ -/* The rest of this file contains styles related to the mechanics of - the editor. You probably shouldn't touch them. */ -.CodeMirror { - position: relative; - overflow: hidden; - background: white; -} -.CodeMirror-scroll { - overflow: scroll !important; - /* Things will break if this is overridden */ - /* 30px is the magic margin used to hide the element's real scrollbars */ - /* See overflow: hidden in .CodeMirror */ - margin-bottom: -30px; - margin-right: -30px; - padding-bottom: 30px; - height: 100%; - outline: none; - /* Prevent dragging from highlighting the element */ - position: relative; -} -.CodeMirror-sizer { - position: relative; - border-right: 30px solid transparent; -} -/* The fake, visible scrollbars. Used to force redraw during scrolling - before actuall scrolling happens, thus preventing shaking and - flickering artifacts. */ -.CodeMirror-vscrollbar, -.CodeMirror-hscrollbar, -.CodeMirror-scrollbar-filler, -.CodeMirror-gutter-filler { - position: absolute; - z-index: 6; - display: none; -} -.CodeMirror-vscrollbar { - right: 0; - top: 0; - overflow-x: hidden; - overflow-y: scroll; -} -.CodeMirror-hscrollbar { - bottom: 0; - left: 0; - overflow-y: hidden; - overflow-x: scroll; -} -.CodeMirror-scrollbar-filler { - right: 0; - bottom: 0; -} -.CodeMirror-gutter-filler { - left: 0; - bottom: 0; -} -.CodeMirror-gutters { - position: absolute; - left: 0; - top: 0; - z-index: 3; -} -.CodeMirror-gutter { - white-space: normal; - height: 100%; - display: inline-block; - margin-bottom: -30px; - /* Hack to make IE7 behave */ - *zoom: 1; - *display: inline; -} -.CodeMirror-gutter-wrapper { - position: absolute; - z-index: 4; - height: 100%; -} -.CodeMirror-gutter-elt { - position: absolute; - cursor: default; - z-index: 4; -} -.CodeMirror-gutter-wrapper { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.CodeMirror-lines { - cursor: text; - min-height: 1px; - /* prevents collapsing before first draw */ -} -.CodeMirror pre { - /* Reset some styles that the rest of the page might have set */ - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; - border-width: 0; - background: transparent; - font-family: inherit; - font-size: inherit; - margin: 0; - white-space: pre; - word-wrap: normal; - line-height: 2em; - color: inherit; - z-index: 2; - position: relative; - overflow: visible; - -webkit-tap-highlight-color: transparent; -} -.CodeMirror-wrap pre { - word-wrap: break-word; - white-space: pre-wrap; - word-break: normal; -} -.CodeMirror-linebackground { - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - z-index: 0; -} -.CodeMirror-linewidget { - position: relative; - z-index: 2; - overflow: auto; -} -.CodeMirror-code { - outline: none; -} -/* Force content-box sizing for the elements where we expect it */ -.CodeMirror-scroll, -.CodeMirror-sizer, -.CodeMirror-gutter, -.CodeMirror-gutters, -.CodeMirror-linenumber { - -moz-box-sizing: content-box; - box-sizing: content-box; -} -.CodeMirror-measure { - position: absolute; - width: 100%; - height: 0; - overflow: hidden; - visibility: hidden; -} -.CodeMirror-measure pre { - position: static; -} -.CodeMirror div.CodeMirror-cursor { - position: absolute; - border-right: none; - width: 0; -} -div.CodeMirror-cursors { - visibility: hidden; - position: relative; - z-index: 3; -} -.CodeMirror-focused div.CodeMirror-cursors { - visibility: visible; -} -.CodeMirror-selected { - background: #d9d9d9; -} -.CodeMirror-focused .CodeMirror-selected { - background: #d7d4f0; -} -.CodeMirror-crosshair { - cursor: crosshair; -} -.CodeMirror-line::selection, -.CodeMirror-line > span::selection, -.CodeMirror-line > span > span::selection { - background: #d7d4f0; -} -.CodeMirror-line::-moz-selection, -.CodeMirror-line > span::-moz-selection, -.CodeMirror-line > span > span::-moz-selection { - background: #d7d4f0; -} -.cm-searching { - background: #ffa; - background: rgba(255, 255, 0, 0.4); -} -/* IE7 hack to prevent it from returning funny offsetTops on the spans */ -.CodeMirror span { - *vertical-align: text-bottom; -} -/* Used to force a border model for a node */ -.cm-force-border { - padding-right: .1px; -} -@media print { - /* Hide the cursor when printing */ - .CodeMirror div.CodeMirror-cursors { - visibility: hidden; - } -} -/* See issue #2901 */ -.cm-tab-wrap-hack:after { - content: ''; -} -/* Help users use markselection to safely style text background */ -span.CodeMirror-selectedtext { - background: none; -} -/*addon: show-hint*/ -.CodeMirror-hints { - position: absolute; - z-index: 10000; - overflow: hidden; - list-style: none; - margin: 0; - padding: 2px; - -webkit-box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2); - box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2); - border-radius: 3px; - border: 1px solid silver; - background: white; - font-size: 90%; - font-family: monospace; - max-height: 20em; - overflow-y: auto; -} -.CodeMirror-hint { - margin: 0; - padding: 0 4px; - border-radius: 2px; - max-width: 19em; - overflow: hidden; - white-space: pre; - color: black; - cursor: pointer; -} -li.CodeMirror-hint-active { - background: #08f; - color: white; -} diff --git a/src/css/base/foundation/bi.message.css b/src/css/base/foundation/bi.message.css deleted file mode 100644 index 1a6c77e76a..0000000000 --- a/src/css/base/foundation/bi.message.css +++ /dev/null @@ -1,31 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-message-mask { - background-color: #1a1a1a; - opacity: 0.5; - filter: alpha(opacity=50); -} -.bi-message-title { - background-color: #f4f4f4; - color: #808080; - font-size: 16px; - cursor: pointer; -} -.bi-message-text { - font-size: 16px; - -webkit-user-select: text; - -khtml-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - -o-user-select: text; - user-select: text; -} -.bi-message-content { - background-color: #ffffff; - color: #808080; - font-size: 16px; -} -.bi-message-close { - font-size: 25px; -} diff --git a/src/css/base/layer/layer.multiselect.css b/src/css/base/layer/layer.multiselect.css deleted file mode 100644 index e2d23e4547..0000000000 --- a/src/css/base/layer/layer.multiselect.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-list-view .bi-button-mask { - opacity: 0.1; - filter: alpha(opacity=10); -} diff --git a/src/css/base/layer/layer.panel.css b/src/css/base/layer/layer.panel.css deleted file mode 100644 index 11907bf3c0..0000000000 --- a/src/css/base/layer/layer.panel.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-popup-panel .popup-panel-title { - background: #f4f4f4; - border-bottom: 1px solid #d4dadd; -} diff --git a/src/css/base/layer/layer.searcher.css b/src/css/base/layer/layer.searcher.css deleted file mode 100644 index 81fbf98693..0000000000 --- a/src/css/base/layer/layer.searcher.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-searcher-view { - background: #ffffff; -} -.bi-searcher-view .searcher-view-spliter { - background: #d4dadd; -} diff --git a/src/css/base/layer/panel.css b/src/css/base/layer/panel.css deleted file mode 100644 index cb1f068153..0000000000 --- a/src/css/base/layer/panel.css +++ /dev/null @@ -1,18 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-panel { - border: 1px solid #a3d6e8; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-panel .panel-title { - background-color: #d8f2fd; - border-bottom: 1px solid #a3d6e8; -} -.bi-panel .panel-title .panel-title-text { - cursor: text; - color: #808080; - font-size: 14px; -} diff --git a/src/css/base/logintimeout/login.timeout.css b/src/css/base/logintimeout/login.timeout.css deleted file mode 100644 index 321da08dd9..0000000000 --- a/src/css/base/logintimeout/login.timeout.css +++ /dev/null @@ -1,32 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-login-timeout-center .input-wrapper { - border-bottom: 1px solid #eaeaea; -} -.bi-login-timeout-center .input-wrapper .login-input { - font-size: 16px; -} -.bi-login-timeout-center .input-wrapper .error-mask { - background: #1a1a1a; - opacity: 0.25; - filter: alpha(opacity=25); - color: #ffffff; - font-size: 16px; -} -.bi-login-timeout-center .login-button { - background: #009de3; - -webkit-border-radius: 25px; - -moz-border-radius: 25px; - border-radius: 25px; - font-size: 22px; - color: #ffffff; -} -.bi-login-timeout-center .login-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-login-timeout-south .keep-state { - font-size: 14px; - color: #808080; -} diff --git a/src/css/base/pager/pager.all.count.css b/src/css/base/pager/pager.all.count.css deleted file mode 100644 index 61dead7114..0000000000 --- a/src/css/base/pager/pager.all.count.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-all-count-pager .all-pager-prev { - font-size: 16px; -} -.bi-all-count-pager .all-pager-next { - font-size: 16px; -} diff --git a/src/css/base/pager/pager.css b/src/css/base/pager/pager.css deleted file mode 100644 index 47959284af..0000000000 --- a/src/css/base/pager/pager.css +++ /dev/null @@ -1,13 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-pager .page-item { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-pager .page-item.active { - background: #009de3; - color: #ffffff; -} diff --git a/src/css/base/pager/pager.direction.css b/src/css/base/pager/pager.direction.css deleted file mode 100644 index 1984a00e9c..0000000000 --- a/src/css/base/pager/pager.direction.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-direction-pager .direction-pager-prev { - font-size: 16px; -} -.bi-direction-pager .direction-pager-next { - font-size: 16px; -} diff --git a/src/css/base/reqloading/loading.request.css b/src/css/base/reqloading/loading.request.css deleted file mode 100644 index 235bd2f212..0000000000 --- a/src/css/base/reqloading/loading.request.css +++ /dev/null @@ -1,20 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-request-loading .mask-pane { - background: #ffffff; - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-request-loading .loading-comment { - font-size: 20px; - color: #808080; -} -.bi-request-loading .load-fail-comment { - font-size: 20px; - color: #808080; -} -.bi-request-loading .load-timeout-warning { - font-size: 16px; - color: #e85050; -} diff --git a/src/css/base/segment/button.segment.css b/src/css/base/segment/button.segment.css deleted file mode 100644 index 19e183d066..0000000000 --- a/src/css/base/segment/button.segment.css +++ /dev/null @@ -1,14 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-segment-button:active, -.bi-segment-button.active { - color: #ffffff; - background: #009de3; -} -.bi-segment-button.disabled, -.bi-segment-button.disabled:hover, -.bi-segment-button.disabled:active { - color: #1a1a1a; - background: #ffffff; -} diff --git a/src/css/base/segment/segment.css b/src/css/base/segment/segment.css deleted file mode 100644 index 11ddb87d90..0000000000 --- a/src/css/base/segment/segment.css +++ /dev/null @@ -1,23 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-segment > .center-element { - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; - background: #ffffff; - border-right: 1px solid #d4dadd; - border-top: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-segment > .first-element { - border-left: 1px solid #d4dadd; - -webkit-border-radius: 6px 0px 0px 6px; - -moz-border-radius: 6px 0px 0px 6px; - border-radius: 6px 0px 0px 6px; -} -.bi-segment > .last-element { - -webkit-border-radius: 0px 6px 6px 0px; - -moz-border-radius: 0px 6px 6px 0px; - border-radius: 0px 6px 6px 0px; -} diff --git a/src/css/base/single/bar/bar.css b/src/css/base/single/bar/bar.css deleted file mode 100644 index 1ed7ff8398..0000000000 --- a/src/css/base/single/bar/bar.css +++ /dev/null @@ -1,15 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-loading-bar .loading-text { - color: #808080; -} -.bi-loading-bar .loading-text:hover, -.bi-loading-bar .loading-text.hover { - color: #009de3; -} -.bi-loading-bar .loading-text.disabled, -.bi-loading-bar .loading-text.disabled:hover, -.bi-loading-bar .loading-text.disabled:active { - color: #ffffff; -} diff --git a/src/css/base/single/button/button.css b/src/css/base/single/button/button.css deleted file mode 100644 index 7f8ef980d4..0000000000 --- a/src/css/base/single/button/button.css +++ /dev/null @@ -1,93 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #009de3; - background-color: #009de3; - text-align: center; - vertical-align: middle; - cursor: pointer; - font-size: 14px; -} -.bi-button.button-common, -.bi-button.button-common .b-font { - color: #ffffff; -} -.bi-button.button-common .b-font:before { - color: #ffffff; -} -.bi-button.button-ignore { - background-color: #ffffff; - border-color: #d4dadd; -} -.bi-button.button-ignore, -.bi-button.button-ignore .b-font { - color: #1a1a1a; -} -.bi-button.button-success { - background-color: #58cc7d; - border-color: #58cc7d; -} -.bi-button.button-success, -.bi-button.button-success .b-font { - color: #ffffff; -} -.bi-button.button-success .b-font:before { - color: #ffffff; -} -.bi-button.button-warning { - background-color: #e85050; - border-color: #e85050; -} -.bi-button.button-warning, -.bi-button.button-warning .b-font { - color: #ffffff; -} -.bi-button.button-warning .b-font:before { - color: #ffffff; -} -.bi-button.button-common.disabled, -.bi-button.button-success.disabled, -.bi-button.button-warning.disabled { - background: #c4c6c6 !important; - border-color: #c4c6c6 !important; -} -.bi-button.button-common.disabled, -.bi-button.button-success.disabled, -.bi-button.button-warning.disabled, -.bi-button.button-common.disabled .b-font, -.bi-button.button-success.disabled .b-font, -.bi-button.button-warning.disabled .b-font { - color: #ffffff !important; -} -.bi-button.button-common.disabled .b-font:before, -.bi-button.button-success.disabled .b-font:before, -.bi-button.button-warning.disabled .b-font:before { - color: #ffffff !important; -} -.bi-button.button-ignore.disabled { - background: #ffffff !important; - border-color: #d4dadd !important; -} -.bi-button.button-ignore.disabled, -.bi-button.button-ignore.disabled .b-font { - color: #c4c6c6 !important; -} -.bi-button.button-ignore.disabled .b-font:before { - color: #c4c6c6 !important; -} -.bi-basic-button.button-common .bi-button-mask, -.bi-basic-button.button-success .bi-button-mask, -.bi-basic-button.button-warning .bi-button-mask { - opacity: 0.2; - filter: alpha(opacity=20); - background-color: #ffffff; -} -.bi-basic-button .bi-button-mask { - opacity: 0.2; - filter: alpha(opacity=20); - background-color: #1a1a1a; -} diff --git a/src/css/base/single/button/item.multiselect.css b/src/css/base/single/button/item.multiselect.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/single/button/item.multiselect.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/single/button/item.singleselect.icontext.css b/src/css/base/single/button/item.singleselect.icontext.css deleted file mode 100644 index eedc549569..0000000000 --- a/src/css/base/single/button/item.singleselect.icontext.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-single-select-icon-text-item:active .b-font:before, -.bi-single-select-icon-text-item.active .b-font:before { - color: #009de3; -} diff --git a/src/css/base/single/button/item.singleselectradio.css b/src/css/base/single/button/item.singleselectradio.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/single/button/item.singleselectradio.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/single/button/item.texticon.css b/src/css/base/single/button/item.texticon.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/single/button/item.texticon.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/single/button/listitem.css b/src/css/base/single/button/listitem.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/single/button/listitem.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/single/editor/editor.css b/src/css/base/single/editor/editor.css deleted file mode 100644 index 149e666fb8..0000000000 --- a/src/css/base/single/editor/editor.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-editor { - font-size: 12px; -} diff --git a/src/css/base/single/editor/editor.multifile.css b/src/css/base/single/editor/editor.multifile.css deleted file mode 100644 index 6f335ad867..0000000000 --- a/src/css/base/single/editor/editor.multifile.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multifile-editor .multifile-editor { - text-align: right; - cursor: pointer; - font-size: 100px; - z-index: 2; -} diff --git a/src/css/base/single/editor/editor.record.css b/src/css/base/single/editor/editor.record.css deleted file mode 100644 index 5252e6e7fe..0000000000 --- a/src/css/base/single/editor/editor.record.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-record-editor .record-editor-text { - font-size: 12px; - background: #f4f4f4; -} diff --git a/src/css/base/single/editor/editor.shelter.css b/src/css/base/single/editor/editor.shelter.css deleted file mode 100644 index 30e8290f10..0000000000 --- a/src/css/base/single/editor/editor.shelter.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-shelter-editor .shelter-editor-text { - font-size: 12px; -} diff --git a/src/css/base/single/editor/editor.sign.css b/src/css/base/single/editor/editor.sign.css deleted file mode 100644 index 5593ed1992..0000000000 --- a/src/css/base/single/editor/editor.sign.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sign-editor .sign-editor-text { - font-size: 12px; -} diff --git a/src/css/base/single/editor/editor.state.css b/src/css/base/single/editor/editor.state.css deleted file mode 100644 index 0d3f1bb148..0000000000 --- a/src/css/base/single/editor/editor.state.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-state-editor .state-editor-infinite-text { - color: #cccccc; -} diff --git a/src/css/base/single/editor/editor.state.simple.css b/src/css/base/single/editor/editor.state.simple.css deleted file mode 100644 index c2c8927812..0000000000 --- a/src/css/base/single/editor/editor.state.simple.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-simple-state-editor .state-editor-infinite-text { - color: #cccccc; -} diff --git a/src/css/base/single/editor/editor.textarea.css b/src/css/base/single/editor/editor.textarea.css deleted file mode 100644 index 150d4a224d..0000000000 --- a/src/css/base/single/editor/editor.textarea.css +++ /dev/null @@ -1,17 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-textarea-editor { - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; -} -.bi-textarea-editor .textarea-editor-content { - font-size: 12px; -} -.bi-textarea-editor .textarea-editor-content { - border: none; -} -.bi-textarea-editor .textarea-editor-content.textarea-editor-focus { - border: 1px solid #009de3; -} diff --git a/src/css/base/single/input/file.css b/src/css/base/single/input/file.css deleted file mode 100644 index d4577ee62c..0000000000 --- a/src/css/base/single/input/file.css +++ /dev/null @@ -1,8 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-file { - opacity: 0; - filter: alpha(opacity=0); - z-index: 2; -} diff --git a/src/css/base/single/input/input.css b/src/css/base/single/input/input.css deleted file mode 100644 index c2425f2f3b..0000000000 --- a/src/css/base/single/input/input.css +++ /dev/null @@ -1,22 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-input { - border: none; - outline: none; - background-color: transparent; - padding: 0; - margin: 0; - width: 100%; - height: 100%; -} -.bi-input.bi-input-focus { - border: none; -} -.bi-input.bi-input-error { - border: none; - color: #e85050 !important; -} -.bi-input.disabled { - background-color: white; -} diff --git a/src/css/base/single/single.css b/src/css/base/single/single.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/single/single.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/single/text.css b/src/css/base/single/text.css deleted file mode 100644 index 34613e8aa1..0000000000 --- a/src/css/base/single/text.css +++ /dev/null @@ -1,10 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text { - text-overflow: ellipsis; - overflow-x: hidden; - overflow-y: hidden; - white-space: nowrap; - word-break: break-all; -} diff --git a/src/css/base/single/tip/tip.bubble.css b/src/css/base/single/tip/tip.bubble.css deleted file mode 100644 index 80c0ed1e9f..0000000000 --- a/src/css/base/single/tip/tip.bubble.css +++ /dev/null @@ -1,13 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-bubble { - font-size: 14px; -} -.bi-bubble .bubble-text { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fddddd; - color: #e85050; -} diff --git a/src/css/base/single/tip/tip.css b/src/css/base/single/tip/tip.css deleted file mode 100644 index 0ba90bfd9a..0000000000 --- a/src/css/base/single/tip/tip.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-tip { - position: fixed !important; -} diff --git a/src/css/base/single/tip/tip.toast.css b/src/css/base/single/tip/tip.toast.css deleted file mode 100644 index 5556804e8a..0000000000 --- a/src/css/base/single/tip/tip.toast.css +++ /dev/null @@ -1,17 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-toast { - font-size: 14px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-toast.toast-success { - background: #e1f4e7; - color: #0c6d23; -} -.bi-toast.toast-warning { - background: #fddddd; - color: #e85050; -} diff --git a/src/css/base/single/tip/tip.tooltip.css b/src/css/base/single/tip/tip.tooltip.css deleted file mode 100644 index 3597086880..0000000000 --- a/src/css/base/single/tip/tip.tooltip.css +++ /dev/null @@ -1,20 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-tooltip { - max-width: 250px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - font-size: 12px; -} -.bi-tooltip.tooltip-success { - background: #fff5c1; - border: 1px solid #fff5c1; - color: #1a1a1a; -} -.bi-tooltip.tooltip-warning { - background: #fddddd; - color: #e85050; - border: 1px solid #f4cbcb; -} diff --git a/src/css/base/table/table.collection.cell.css b/src/css/base/table/table.collection.cell.css deleted file mode 100644 index 66ea16fb19..0000000000 --- a/src/css/base/table/table.collection.cell.css +++ /dev/null @@ -1,21 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-collection-table-cell { - -webkit-box-sizing: border-box; - /*Safari3.2+*/ - -moz-box-sizing: border-box; - /*Firefox3.5+*/ - -ms-box-sizing: border-box; - /*IE8*/ - box-sizing: border-box; - /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ - border-right: 1px solid #eaeaea; - border-bottom: 1px solid #eaeaea; -} -.bi-collection-table-cell.first-row { - border-top: 1px solid #eaeaea; -} -.bi-collection-table-cell.first-col { - border-left: 1px solid #eaeaea; -} diff --git a/src/css/base/table/table.collection.quick.css b/src/css/base/table/table.collection.quick.css deleted file mode 100644 index abee99d390..0000000000 --- a/src/css/base/table/table.collection.quick.css +++ /dev/null @@ -1,8 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-quick-collection-table > div > .bi-collection { - overflow: hidden !important; - overflow-x: hidden !important; - overflow-y: hidden !important; -} diff --git a/src/css/base/table/table.css b/src/css/base/table/table.css deleted file mode 100644 index 41053d659e..0000000000 --- a/src/css/base/table/table.css +++ /dev/null @@ -1,54 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-table > .first-col { - border-left: none; -} -.bi-table > .first-row { - border-top: none; -} -.bi-table > div > div > table { - border-bottom: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; -} -.bi-table > div.top-left > div > div > table { - border-bottom: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; -} -.bi-table > div.top-right > div > div > table { - border-bottom: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; -} -.bi-table > div.bottom-left > div > div > table { - border-bottom: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; -} -.bi-table > div.bottom-right > div > div > table { - border-right: 1px solid #eaeaea; - border-bottom: 1px solid #eaeaea; -} -.bi-table > div > div > table, -.bi-table > div > div > div > table { - min-width: 100%; - clear: both; - vertical-align: middle; - border-spacing: 0; - border-collapse: separate; -} -.bi-table > div > div > table, -.bi-table > div > div > div > table, -.bi-table > div > div > table > * > * > th, -.bi-table > div > div > div > table > * > * > th, -.bi-table > div > div > table > * > * > td, -.bi-table > div > div > div > table > * > * > td { - vertical-align: middle; - margin: 0; - padding: 0; -} -.bi-table > div > div > table > tbody > tr > td, -.bi-table > div > div > div > table > tbody > tr > td, -.bi-table > div > div > table > thead > tr > td, -.bi-table > div > div > div > table > thead > tr > td { - border-top: 1px solid #eaeaea; - border-left: 1px solid #eaeaea; -} diff --git a/src/css/base/table/table.grid.cell.css b/src/css/base/table/table.grid.cell.css deleted file mode 100644 index bb6039308e..0000000000 --- a/src/css/base/table/table.grid.cell.css +++ /dev/null @@ -1,21 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-grid-table-cell { - -webkit-box-sizing: border-box; - /*Safari3.2+*/ - -moz-box-sizing: border-box; - /*Firefox3.5+*/ - -ms-box-sizing: border-box; - /*IE8*/ - box-sizing: border-box; - /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ - border-right: 1px solid #eaeaea; - border-bottom: 1px solid #eaeaea; -} -.bi-grid-table-cell.first-row { - border-top: 1px solid #eaeaea; -} -.bi-grid-table-cell.first-col { - border-left: 1px solid #eaeaea; -} diff --git a/src/css/base/table/table.grid.quick.css b/src/css/base/table/table.grid.quick.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/table/table.grid.quick.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/table/table.grid.scrollbar.css b/src/css/base/table/table.grid.scrollbar.css deleted file mode 100644 index 289bc820cd..0000000000 --- a/src/css/base/table/table.grid.scrollbar.css +++ /dev/null @@ -1,94 +0,0 @@ -.scrollbar-layout-main { - box-sizing: border-box; - outline: none; - overflow: hidden; - position: absolute; - transition-duration: 250ms; - transition-timing-function: ease; - user-select: none; - background-color: rgba(0, 0, 0, 0.1); - border-radius: 5px; -} -.scrollbar-layout-main-vertical { - bottom: 0; - right: 0; - top: 0; - transition-property: background-color; - width: 10px; -} -.scrollbar-layout-main-vertical.public-scrollbar-main-active, -.scrollbar-layout-main-vertical:hover { - width: 10px; -} -.scrollbar-layout-main-horizontal { - bottom: 0; - height: 10px; - left: 0; - transition-property: background-color; - background-color: rgba(0, 0, 0, 0.1); -} -/* Touching the scroll-track directly makes the scroll-track bolder */ -.scrollbar-layout-main-horizontal.public-scrollbar-main-active, -.scrollbar-layout-main-horizontal:hover { - height: 10px; -} -.scrollbar-layout-face { - left: 0; - overflow: hidden; - position: absolute; - z-index: 1; -} -/** - * This selector renders the "nub" of the scrollface. The nub must - * be rendered as pseudo-element so that it won't receive any UI events then - * we can get the correct `event.offsetX` and `event.offsetY` from the - * scrollface element while dragging it. - */ -.scrollbar-layout-face:after { - border-radius: 6px; - content: ''; - display: block; - position: absolute; - transition: background-color 250ms ease; -} -.scrollbar-layout-face-horizontal { - bottom: 0; - left: 0; - top: 0; -} -.scrollbar-layout-face-horizontal:after { - bottom: 2px; - left: 0; - top: 2px; - width: 100%; -} -.scrollbar-layout-face-vertical { - left: 0; - right: 0; - top: 0; -} -.scrollbar-layout-face-vertical:after { - height: 100%; - left: 2px; - right: 2px; - top: 0; -} -/** - * scrollbars. - */ -/* Touching the scroll-track directly makes the scroll-track bolder */ -.public-scrollbar-face:after { - background-color: #c2c2c2; -} -.public-scrollbar-main:hover .public-scrollbar-face:after, -.public-scrollbar-main-active .public-scrollbar-face:after, -.public-scrollbar-faceActive:after { - background-color: #7d7d7d; -} -.horizontal-scrollbar { - bottom: 0; - position: absolute; -} -.horizontal-scrollbar .public-scrollbar-main-horizontal { - background-color: #fff; -} diff --git a/src/css/base/table/table.resizable.cell.css b/src/css/base/table/table.resizable.cell.css deleted file mode 100644 index 282106d65a..0000000000 --- a/src/css/base/table/table.resizable.cell.css +++ /dev/null @@ -1,11 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-resizable-table-cell .resizable-table-cell-resizer-container { - cursor: ew-resize; - z-index: 1; -} -.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob, -.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob { - background-color: #009de3; -} diff --git a/src/css/base/table/table.resizable.css b/src/css/base/table/table.resizable.css deleted file mode 100644 index 0495b2cd24..0000000000 --- a/src/css/base/table/table.resizable.css +++ /dev/null @@ -1,16 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-resizable-table .resizable-table-resizer { - cursor: ew-resize; - z-index: 1; - background-color: #009de3; -} -.bi-resizable-table .resizable-table-region-resizer { - cursor: ew-resize; - z-index: 1; -} -.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob, -.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob { - background-color: #009de3; -} diff --git a/src/css/base/table/table.tree.css b/src/css/base/table/table.tree.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/table/table.tree.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/third/farbtastic/farbtastic.css b/src/css/base/third/farbtastic/farbtastic.css deleted file mode 100644 index 76e8942fa8..0000000000 --- a/src/css/base/third/farbtastic/farbtastic.css +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Farbtastic Color Picker 1.2 - * © 2008 Steven Wittens - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -.farbtastic { - position: relative; -} -.farbtastic * { - position: absolute; - cursor: crosshair; -} -.farbtastic, -.farbtastic .wheel { - width: 195px; - height: 195px; -} -.farbtastic .color, -.farbtastic .overlay { - top: 47px; - left: 47px; - width: 101px; - height: 101px; -} -.farbtastic .wheel { - background: url(farbtastic/wheel.png) no-repeat; - width: 195px; - height: 195px; -} -.farbtastic .overlay { - background: url(farbtastic/mask.png) no-repeat; -} -.farbtastic .marker { - width: 17px; - height: 17px; - margin: -8px 0 0 -8px; - overflow: hidden; - background: url(farbtastic/marker.png) no-repeat; -} diff --git a/src/css/base/third/leaflet.css b/src/css/base/third/leaflet.css deleted file mode 100644 index 75873513a1..0000000000 --- a/src/css/base/third/leaflet.css +++ /dev/null @@ -1,491 +0,0 @@ -/* required styles */ -.leaflet-pane, -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-tile-container, -.leaflet-map-pane svg, -.leaflet-map-pane canvas, -.leaflet-zoom-box, -.leaflet-image-layer, -.leaflet-layer { - position: absolute; - left: 0; - top: 0; -} -.leaflet-container { - overflow: hidden; - -ms-touch-action: none; - touch-action: none; -} -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - -webkit-user-drag: none; -} -/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ -.leaflet-safari .leaflet-tile { - image-rendering: -webkit-optimize-contrast; -} -/* hack that prevents hw layers "stretching" when loading new tiles */ -.leaflet-safari .leaflet-tile-container { - width: 1600px; - height: 1600px; - -webkit-transform-origin: 0 0; -} -.leaflet-marker-icon, -.leaflet-marker-shadow { - display: block; -} -/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ -/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ -.leaflet-container .leaflet-overlay-pane svg, -.leaflet-container .leaflet-marker-pane img, -.leaflet-container .leaflet-tile-pane img, -.leaflet-container img.leaflet-image-layer { - max-width: none !important; -} -.leaflet-tile { - filter: inherit; - visibility: hidden; -} -.leaflet-tile-loaded { - visibility: inherit; -} -.leaflet-zoom-box { - width: 0; - height: 0; - -moz-box-sizing: border-box; - box-sizing: border-box; - z-index: 800; -} -/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ -.leaflet-overlay-pane svg { - -moz-user-select: none; -} -.leaflet-pane { - z-index: 400; -} -.leaflet-tile-pane { - z-index: 200; -} -.leaflet-overlay-pane { - z-index: 400; -} -.leaflet-shadow-pane { - z-index: 500; -} -.leaflet-marker-pane { - z-index: 600; -} -.leaflet-popup-pane { - z-index: 700; -} -.leaflet-map-pane canvas { - z-index: 100; -} -.leaflet-map-pane svg { - z-index: 200; -} -.leaflet-vml-shape { - width: 1px; - height: 1px; -} -.lvml { - behavior: url(#default#VML); - display: inline-block; - position: absolute; -} -/* control positioning */ -.leaflet-control { - position: relative; - z-index: 800; - pointer-events: auto; -} -.leaflet-top, -.leaflet-bottom { - position: absolute; - z-index: 1000; - pointer-events: none; -} -.leaflet-top { - top: 0; -} -.leaflet-right { - right: 0; -} -.leaflet-bottom { - bottom: 0; -} -.leaflet-left { - left: 0; -} -.leaflet-control { - float: left; - clear: both; -} -.leaflet-right .leaflet-control { - float: right; -} -.leaflet-top .leaflet-control { - margin-top: 10px; -} -.leaflet-bottom .leaflet-control { - margin-bottom: 10px; -} -.leaflet-left .leaflet-control { - margin-left: 10px; -} -.leaflet-right .leaflet-control { - margin-right: 10px; -} -/* zoom and fade animations */ -.leaflet-fade-anim .leaflet-tile { - will-change: opacity; -} -.leaflet-fade-anim .leaflet-popup { - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; -} -.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { - opacity: 1; -} -.leaflet-zoom-animated { - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; -} -.leaflet-zoom-anim .leaflet-zoom-animated { - will-change: transform; -} -.leaflet-zoom-anim .leaflet-zoom-animated { - -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1); - transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1); -} -.leaflet-zoom-anim .leaflet-tile, -.leaflet-pan-anim .leaflet-tile { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; -} -.leaflet-zoom-anim .leaflet-zoom-hide { - visibility: hidden; -} -/* cursors */ -.leaflet-interactive { - cursor: pointer; -} -.leaflet-grab { - cursor: -webkit-grab; - cursor: -moz-grab; -} -.leaflet-crosshair, -.leaflet-crosshair .leaflet-interactive { - cursor: crosshair; -} -.leaflet-popup-pane, -.leaflet-control { - cursor: auto; -} -.leaflet-dragging .leaflet-grab, -.leaflet-dragging .leaflet-grab .leaflet-interactive, -.leaflet-dragging .leaflet-marker-draggable { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; -} -/* marker & overlays interactivity */ -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-image-layer, -.leaflet-pane > svg path, -.leaflet-tile-container { - pointer-events: none; -} -.leaflet-marker-icon.leaflet-interactive, -.leaflet-image-layer.leaflet-interactive, -.leaflet-pane > svg path.leaflet-interactive { - pointer-events: auto; -} -/* visual tweaks */ -.leaflet-container { - /*background: #ddd;*/ - outline: 0; -} -.leaflet-container a { - color: #0078A8; -} -.leaflet-container a.leaflet-active { - outline: 2px solid orange; -} -.leaflet-zoom-box { - border: 2px dotted #38f; - background: rgba(255, 255, 255, 0.5); -} -/* general typography */ -.leaflet-container { - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; -} -/* general toolbar styles */ -.leaflet-bar { - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65); - border-radius: 4px; -} -.leaflet-bar a, -.leaflet-bar a:hover { - background-color: #fff; - border-bottom: 1px solid #ccc; - width: 26px; - height: 26px; - line-height: 26px; - display: block; - text-align: center; - text-decoration: none; - color: black; -} -.leaflet-bar a, -.leaflet-control-layers-toggle { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; -} -.leaflet-bar a:hover { - background-color: #f4f4f4; -} -.leaflet-bar a:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.leaflet-bar a:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom: none; -} -.leaflet-bar a.leaflet-disabled { - cursor: default; - background-color: #f4f4f4; - color: #bbb; -} -.leaflet-touch .leaflet-bar a { - width: 30px; - height: 30px; - line-height: 30px; -} -/* zoom control */ -.leaflet-control-zoom-in, -.leaflet-control-zoom-out { - font: bold 18px 'Lucida Console', Monaco, monospace; - text-indent: 1px; -} -.leaflet-control-zoom-out { - font-size: 20px; -} -.leaflet-touch .leaflet-control-zoom-in { - font-size: 22px; -} -.leaflet-touch .leaflet-control-zoom-out { - font-size: 24px; -} -/* layers control */ -.leaflet-control-layers { - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); - background: #fff; - border-radius: 5px; -} -.leaflet-control-layers-toggle { - background-image: url(images/layers.png); - width: 36px; - height: 36px; -} -.leaflet-retina .leaflet-control-layers-toggle { - background-image: url(images/layers-2x.png); - background-size: 26px 26px; -} -.leaflet-touch .leaflet-control-layers-toggle { - width: 44px; - height: 44px; -} -.leaflet-control-layers .leaflet-control-layers-list, -.leaflet-control-layers-expanded .leaflet-control-layers-toggle { - display: none; -} -.leaflet-control-layers-expanded .leaflet-control-layers-list { - display: block; - position: relative; -} -.leaflet-control-layers-expanded { - padding: 6px 10px 6px 6px; - color: #333; - background: #fff; -} -.leaflet-control-layers-scrollbar { - overflow-y: scroll; - padding-right: 5px; -} -.leaflet-control-layers-selector { - margin-top: 2px; - position: relative; - top: 1px; -} -.leaflet-control-layers label { - display: block; -} -.leaflet-control-layers-separator { - height: 0; - border-top: 1px solid #ddd; - margin: 5px -10px 5px -6px; -} -/* attribution and scale controls */ -.leaflet-container .leaflet-control-attribution { - background: #fff; - background: rgba(255, 255, 255, 0.7); - margin: 0; -} -.leaflet-control-attribution, -.leaflet-control-scale-line { - padding: 0 5px; - color: #333; -} -.leaflet-control-attribution a { - text-decoration: none; -} -.leaflet-control-attribution a:hover { - text-decoration: underline; -} -.leaflet-container .leaflet-control-attribution, -.leaflet-container .leaflet-control-scale { - font-size: 11px; -} -.leaflet-left .leaflet-control-scale { - margin-left: 5px; -} -.leaflet-bottom .leaflet-control-scale { - margin-bottom: 5px; -} -.leaflet-control-scale-line { - border: 2px solid #777; - border-top: none; - line-height: 1.1; - padding: 2px 5px 1px; - font-size: 11px; - white-space: nowrap; - overflow: hidden; - -moz-box-sizing: border-box; - box-sizing: border-box; - background: #fff; - background: rgba(255, 255, 255, 0.5); -} -.leaflet-control-scale-line:not(:first-child) { - border-top: 2px solid #777; - border-bottom: none; - margin-top: -2px; -} -.leaflet-control-scale-line:not(:first-child):not(:last-child) { - border-bottom: 2px solid #777; -} -.leaflet-touch .leaflet-control-attribution, -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - box-shadow: none; -} -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - border: 2px solid rgba(0, 0, 0, 0.2); - background-clip: padding-box; -} -/* popup */ -.leaflet-popup { - position: absolute; - text-align: center; -} -.leaflet-popup-content-wrapper { - padding: 1px; - text-align: left; - border-radius: 12px; -} -.leaflet-popup-content { - margin: 13px 19px; - line-height: 1.4; -} -.leaflet-popup-content p { - margin: 18px 0; -} -.leaflet-popup-tip-container { - margin: 0 auto; - width: 40px; - height: 20px; - position: relative; - overflow: hidden; -} -.leaflet-popup-tip { - width: 17px; - height: 17px; - padding: 1px; - margin: -10px auto 0; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); -} -.leaflet-popup-content-wrapper, -.leaflet-popup-tip { - background: white; - color: #333; - box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4); -} -.leaflet-container a.leaflet-popup-close-button { - position: absolute; - top: 0; - right: 0; - padding: 4px 4px 0 0; - border: none; - text-align: center; - width: 18px; - height: 14px; - font: 16px/14px Tahoma, Verdana, sans-serif; - color: #c3c3c3; - text-decoration: none; - font-weight: bold; - background: transparent; -} -.leaflet-container a.leaflet-popup-close-button:hover { - color: #999; -} -.leaflet-popup-scrolled { - overflow: auto; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; -} -.leaflet-oldie .leaflet-popup-content-wrapper { - zoom: 1; -} -.leaflet-oldie .leaflet-popup-tip { - width: 24px; - margin: 0 auto; - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; - filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); -} -.leaflet-oldie .leaflet-popup-tip-container { - margin-top: -1px; -} -.leaflet-oldie .leaflet-control-zoom, -.leaflet-oldie .leaflet-control-layers, -.leaflet-oldie .leaflet-popup-content-wrapper, -.leaflet-oldie .leaflet-popup-tip { - border: 1px solid #999; -} -/* div icon */ -.leaflet-div-icon { - background: #fff; - border: 1px solid #666; -} diff --git a/src/css/base/third/ztree/zTreeStyle.css b/src/css/base/third/ztree/zTreeStyle.css deleted file mode 100644 index ec763cae5e..0000000000 --- a/src/css/base/third/ztree/zTreeStyle.css +++ /dev/null @@ -1,288 +0,0 @@ -/*------------------------------------- -zTree Style - -version: 3.5.17 -author: Hunter.z -email: hunter.z@263.net -website: http://code.google.com/p/jquerytree/ - --------------------------------------*/ -.ztree * { - padding: 0; - margin: 0; -} -.ztree { - margin: 0; - padding: 5px; -} -.ztree li { - padding: 0; - margin: 0; - list-style: none; - line-height: 14px; - text-align: left; - white-space: nowrap; - outline: 0; -} -.ztree li ul { - margin: 0; - padding: 0 0 0 18px; -} -.ztree li ul.line { - background: url(icon/tree-vertical-line-1.png) 0 0 repeat-y; -} -.ztree li a { - padding: 1px 3px 0 0; - margin: 0; - cursor: pointer; - height: 24px; - background-color: transparent; - text-decoration: none; - vertical-align: top; - display: inline-block; -} -.ztree li a.curSelectedNode_Edit { - padding-top: 0px; - background-color: #FFE6B0; - color: black; - height: 16px; - border: 1px #FFB951 solid; - opacity: 0.8; -} -.ztree li a.tmpTargetNode_inner { - padding-top: 0px; - background-color: #316AC5; - color: white; - height: 16px; - border: 1px #316AC5 solid; - opacity: 0.8; - filter: alpha(opacity=80); -} -.ztree li a input.rename { - height: 14px; - width: 80px; - padding: 0; - margin: 0; - font-size: 12px; - border: 1px #7EC4CC solid; - *border: 0px; -} -.ztree li span { - line-height: 24px; - margin-right: 2px; -} -.ztree li span.button { - line-height: 0; - margin: 0; - width: 16px; - height: 16px; - display: inline-block; - vertical-align: middle; - border: 0 none; - cursor: pointer; - outline: none; - background-color: transparent; - background-repeat: no-repeat; - background-attachment: scroll; - background-image: url("ztree/img/zTreeStandard.png"); - *background-image: url("ztree/img/zTreeStandard.gif"); -} -.ztree li span.button.chk { - width: 16px; - height: 16px; - margin: 0 3px 0 0; - cursor: auto; -} -.ztree li span.button.chk.checkbox_false_full { - background-image: url("icon/check-box-normal.png"); -} -.ztree li span.button.chk.checkbox_false_full_focus { - background-image: url("icon/check-box-normal.png"); -} -.ztree li span.button.chk.checkbox_false_part { - background-image: url("icon/half_selected.png"); -} -.ztree li span.button.chk.checkbox_false_part_focus { - background-image: url("icon/half_selected.png"); -} -.ztree li span.button.chk.checkbox_false_disable { - background-position: 0 -56px; -} -.ztree li span.button.chk.checkbox_true_full { - background-image: url("icon/check-box-active.png"); -} -.ztree li span.button.chk.checkbox_true_full_focus { - background-image: url("icon/check-box-active.png"); -} -.ztree li span.button.chk.checkbox_true_part { - background-image: url("icon/half_selected.png"); -} -.ztree li span.button.chk.checkbox_true_part_focus { - background-image: url("icon/half_selected.png"); -} -.ztree li span.button.chk.checkbox_true_disable { - background-position: -14px -56px; -} -.ztree li span.button.chk.radio_false_full { - background-position: -28px 0; -} -.ztree li span.button.chk.radio_false_full_focus { - background-position: -28px -14px; -} -.ztree li span.button.chk.radio_false_part { - background-position: -28px -28px; -} -.ztree li span.button.chk.radio_false_part_focus { - background-position: -28px -42px; -} -.ztree li span.button.chk.radio_false_disable { - background-position: -28px -56px; -} -.ztree li span.button.chk.radio_true_full { - background-position: -42px 0; -} -.ztree li span.button.chk.radio_true_full_focus { - background-position: -42px -14px; -} -.ztree li span.button.chk.radio_true_part { - background-position: -42px -28px; -} -.ztree li span.button.chk.radio_true_part_focus { - background-position: -42px -42px; -} -.ztree li span.button.chk.radio_true_disable { - background-position: -42px -56px; -} -.ztree li span.button.switch { - width: 25px; - height: 25px; -} -.ztree li span.button.root_open { - background-image: url("icon/tree-expand-1.png"); -} -.ztree li span.button.root_close { - background-image: url("icon/tree-collapse-1.png"); -} -.ztree li span.button.roots_open { - background-image: url("icon/tree-expand-2.png"); -} -.ztree li span.button.roots_close { - background-image: url("icon/tree-collapse-2.png"); -} -.ztree li span.button.center_open { - background-image: url("icon/tree-expand-3.png"); -} -.ztree li span.button.center_close { - background-image: url("icon/tree-collapse-3.png"); -} -.ztree li span.button.bottom_open { - background-image: url("icon/tree-expand-4.png"); -} -.ztree li span.button.bottom_close { - background-image: url("icon/tree-collapse-4.png"); -} -.ztree li span.button.noline_open { - background-position: -92px -72px; -} -.ztree li span.button.noline_close { - background-position: -74px -72px; -} -.ztree li span.button.root_docu { - background: none; -} -.ztree li span.button.roots_docu { - background-image: url("icon/tree-vertical-line-2.png"); -} -.ztree li span.button.center_docu { - background-image: url("icon/tree-vertical-line-3.png"); -} -.ztree li span.button.bottom_docu { - background-image: url("icon/tree-vertical-line-4.png"); -} -.ztree li span.button.noline_docu { - background: none; -} -.ztree li span.button.ico_open { - margin-right: 2px; - background-position: -110px -16px; - vertical-align: top; - *vertical-align: middle; -} -.ztree li span.button.ico_close { - margin-right: 2px; - background-position: -110px 0; - vertical-align: top; - *vertical-align: middle; -} -.ztree li span.button.ico_docu { - margin-right: 2px; - background-position: -110px -32px; - vertical-align: top; - *vertical-align: middle; -} -.ztree li span.button.edit { - margin-right: 2px; - background-position: -110px -48px; - vertical-align: top; - *vertical-align: middle; -} -.ztree li span.button.remove { - margin-right: 2px; - background-position: -110px -64px; - vertical-align: top; - *vertical-align: middle; -} -.ztree li span.button.ico_loading { - width: 0px; - margin-right: 2px; - background: url("ztree/img/loading.gif") no-repeat scroll 0 0 transparent; - vertical-align: top; - *vertical-align: middle; -} -ul.tmpTargetzTree { - background-color: #FFE6B0; - opacity: 0.8; - filter: alpha(opacity=80); -} -span.tmpzTreeMove_arrow { - width: 16px; - height: 16px; - display: inline-block; - padding: 0; - margin: 2px 0 0 1px; - border: 0 none; - position: absolute; - background-color: transparent; - background-repeat: no-repeat; - background-attachment: scroll; - background-position: -110px -80px; - background-image: url("ztree/img/zTreeStandard.png"); - *background-image: url("ztree/img/zTreeStandard.gif"); -} -ul.ztree.zTreeDragUL { - margin: 0; - padding: 0; - position: absolute; - width: auto; - height: auto; - overflow: hidden; - background-color: #cfcfcf; - border: 1px #00B83F dotted; - opacity: 0.8; - filter: alpha(opacity=80); -} -.zTreeMask { - z-index: 10000; - background-color: #cfcfcf; - opacity: 0.0; - filter: alpha(opacity=0); - position: absolute; -} -/* level style*/ -/*.ztree li span.button.level0 { - display:none; -} -.ztree li ul.level0 { - padding:0; - background:none; -}*/ diff --git a/src/css/base/timeouttoast/widget.timeouttoast.css b/src/css/base/timeouttoast/widget.timeouttoast.css deleted file mode 100644 index 6efd304246..0000000000 --- a/src/css/base/timeouttoast/widget.timeouttoast.css +++ /dev/null @@ -1,34 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-timeout-toast { - font-size: 14px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fddddd; - color: #e85050; -} -.bi-timeout-toast .cancel-button { - background: #ffffff; - border: 1px solid #d4dadd; - color: #1a1a1a; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-timeout-toast .cancel-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} -.bi-timeout-toast .retry-button { - background: #009de3; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - color: #ffffff; -} -.bi-timeout-toast .retry-button:hover { - opacity: 0.8; - filter: alpha(opacity=80); -} diff --git a/src/css/base/tree/branch.tree.css b/src/css/base/tree/branch.tree.css deleted file mode 100644 index 9d642a0856..0000000000 --- a/src/css/base/tree/branch.tree.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-branch-tree .bi-branch-tree-view { - min-width: 300px; -} -.bi-click-branch-tree { - border: 1px solid #d4dadd; -} -.bi-click-branch-tree .bi-empty-view { - background: #f4f4f4; -} diff --git a/src/css/base/tree/display.tree.css b/src/css/base/tree/display.tree.css deleted file mode 100644 index 4655bd0279..0000000000 --- a/src/css/base/tree/display.tree.css +++ /dev/null @@ -1,29 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-display-tree .ztree * { - color: #808080; -} -.bi-display-tree .ztree li span.button.switch.center_open { - background-image: url("icon/tree-vertical-line-3.png"); -} -.bi-display-tree .ztree li span.button.switch.roots_open { - background-image: url("icon/tree-vertical-line-2.png"); -} -.bi-display-tree .ztree li span.button.switch.bottom_open { - background-image: url("icon/tree-vertical-line-4.png"); -} -.bi-display-tree .ztree li a, -.bi-display-tree .ztree li span { - cursor: default !important; -} -.bi-display-tree .ztree li a:hover { - text-decoration: none; -} -.bi-display-tree .ztree li a.curSelectedNode { - padding-top: 1px; - border: none; - background-color: inherit; - opacity: 1; - filter: alpha(opacity=100); -} diff --git a/src/css/base/trigger/trigger.css b/src/css/base/trigger/trigger.css deleted file mode 100644 index 51cdd3fba6..0000000000 --- a/src/css/base/trigger/trigger.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-trigger .bi-trigger-icon-button { - border-left: 1px solid #d4dadd; - font-size: 16px; -} diff --git a/src/css/base/trigger/trigger.editor.css b/src/css/base/trigger/trigger.editor.css deleted file mode 100644 index 304d1984d9..0000000000 --- a/src/css/base/trigger/trigger.editor.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-editor-trigger { - border: 1px solid #d4dadd; -} diff --git a/src/css/base/trigger/trigger.icon.css b/src/css/base/trigger/trigger.icon.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/base/trigger/trigger.icon.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/base/trigger/trigger.selecttext.css b/src/css/base/trigger/trigger.selecttext.css deleted file mode 100644 index cf54edd22e..0000000000 --- a/src/css/base/trigger/trigger.selecttext.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-text-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/base/trigger/trigger.selecttextsmall.css b/src/css/base/trigger/trigger.selecttextsmall.css deleted file mode 100644 index e22a3c0aa2..0000000000 --- a/src/css/base/trigger/trigger.selecttextsmall.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-small-select-text-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/base/view/floatboxview.css b/src/css/base/view/floatboxview.css deleted file mode 100644 index b1d8bc3c40..0000000000 --- a/src/css/base/view/floatboxview.css +++ /dev/null @@ -1,11 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-float-box { - background: #ffffff; -} -.bi-float-box .float-box-button { - color: #ffffff; - background: #009de3; - border: 1px solid #d4dadd; -} diff --git a/src/css/base/view/popupview.css b/src/css/base/view/popupview.css deleted file mode 100644 index 79efbe2ddd..0000000000 --- a/src/css/base/view/popupview.css +++ /dev/null @@ -1,30 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/**********BI.BIListView*************/ -.bi-list-view { - position: fixed !important; - overflow-y: visible !important; - overflow-x: visible !important; - overflow: visible !important; - cursor: default; -} -.bi-list-view .list-view-outer { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - color: #1a1a1a; - background: #ffffff; -} -.bi-list-view .list-view-toolbar { - border-top: 1px solid #eaeaea; - line-height: 30px; - color: #009de3; -} -.bi-list-view .list-view-toolbar > .center-element { - border-left: 1px solid #eaeaea; -} -.bi-list-view .list-view-toolbar > .first-element { - border-left: none; -} diff --git a/src/css/base/wrapper/flex.center.css b/src/css/base/wrapper/flex.center.css deleted file mode 100644 index 74feeac543..0000000000 --- a/src/css/base/wrapper/flex.center.css +++ /dev/null @@ -1,38 +0,0 @@ -.bi-flex-center-layout { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -o-justify-content: center; - justify-content: center; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} diff --git a/src/css/base/wrapper/flex.horizontal.css b/src/css/base/wrapper/flex.horizontal.css deleted file mode 100644 index 1956492672..0000000000 --- a/src/css/base/wrapper/flex.horizontal.css +++ /dev/null @@ -1,66 +0,0 @@ -.bi-flex-horizontal-layout { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: flex-start; - /* 12版 */ - -webkit-align-items: flex-start; - -moz-align-items: flex-start; - -ms-align-items: flex-start; - -o-align-items: flex-start; - align-items: flex-start; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; -} -.bi-flex-horizontal-layout.middle { - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} -.bi-flex-horizontal-layout.bottom { - /* 09版 */ - -webkit-box-align: flex-end; - /* 12版 */ - -webkit-align-items: flex-end; - -moz-align-items: flex-end; - -ms-align-items: flex-end; - -o-align-items: flex-end; - align-items: flex-end; -} diff --git a/src/css/base/wrapper/flex.vertical.center.css b/src/css/base/wrapper/flex.vertical.center.css deleted file mode 100644 index dd331f8491..0000000000 --- a/src/css/base/wrapper/flex.vertical.center.css +++ /dev/null @@ -1,46 +0,0 @@ -.bi-flex-vertical-center { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; -} diff --git a/src/css/base/wrapper/flex.wrapper.center.css b/src/css/base/wrapper/flex.wrapper.center.css deleted file mode 100644 index a3f2e030e6..0000000000 --- a/src/css/base/wrapper/flex.wrapper.center.css +++ /dev/null @@ -1,41 +0,0 @@ -.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -o-justify-content: center; - justify-content: center; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - min-width: 100%; - min-height: 100%; - float: left; -} diff --git a/src/css/base/wrapper/flex.wrapper.horizontal.css b/src/css/base/wrapper/flex.wrapper.horizontal.css deleted file mode 100644 index d3435658bc..0000000000 --- a/src/css/base/wrapper/flex.wrapper.horizontal.css +++ /dev/null @@ -1,67 +0,0 @@ -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: flex-start; - /* 12版 */ - -webkit-align-items: flex-start; - -moz-align-items: flex-start; - -ms-align-items: flex-start; - -o-align-items: flex-start; - align-items: flex-start; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; - min-height: 100%; -} -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle { - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; -} -.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom { - /* 09版 */ - -webkit-box-align: flex-end; - /* 12版 */ - -webkit-align-items: flex-end; - -moz-align-items: flex-end; - -ms-align-items: flex-end; - -o-align-items: flex-end; - align-items: flex-end; -} diff --git a/src/css/base/wrapper/flex.wrapper.vertical.center.css b/src/css/base/wrapper/flex.wrapper.vertical.center.css deleted file mode 100644 index 7779832815..0000000000 --- a/src/css/base/wrapper/flex.wrapper.vertical.center.css +++ /dev/null @@ -1,48 +0,0 @@ -.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper { - display: box; - /* OLD - Android 4.4- */ - display: -webkit-box; - /* OLD - iOS 6-, Safari 3.1-6 */ - display: -moz-box; - /* OLD - Firefox 19- (buggy but mostly works) */ - display: -ms-flexbox; - /* TWEENER - IE 10 */ - display: -webkit-flex; - /* NEW - Chrome */ - display: flex; - /* NEW, Spec - Opera 12.1, Firefox 20+ */ - /* 09版 */ - -webkit-box-orient: horizontal; - /* 12版 */ - -webkit-flex-direction: row; - -moz-flex-direction: row; - -ms-flex-direction: row; - -o-flex-direction: row; - flex-direction: row; - /* 09版 */ - -webkit-box-pack: flex-start; - /* 12版 */ - -webkit-justify-content: flex-start; - -moz-justify-content: flex-start; - -ms-justify-content: flex-start; - -o-justify-content: flex-start; - justify-content: flex-start; - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -o-align-items: center; - align-items: center; - /* 09版 */ - /*-webkit-box-lines: multiple;*/ - /* 12版 */ - -webkit-flex-wrap: nowrap; - -moz-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - -o-flex-wrap: nowrap; - flex-wrap: nowrap; - min-height: 100%; - float: left; -} diff --git a/src/css/base/wrapper/inline.center.css b/src/css/base/wrapper/inline.center.css deleted file mode 100644 index e59191dcb4..0000000000 --- a/src/css/base/wrapper/inline.center.css +++ /dev/null @@ -1,10 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-inline-center-adapt-layout:after { - display: inline-block; - width: 0; - min-height: 100%; - vertical-align: middle; - content: ' '; -} diff --git a/src/css/base/wrapper/inline.vertical.css b/src/css/base/wrapper/inline.vertical.css deleted file mode 100644 index e9729c497d..0000000000 --- a/src/css/base/wrapper/inline.vertical.css +++ /dev/null @@ -1,10 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-inline-vertical-adapt-layout:after { - display: inline-block; - width: 0; - min-height: 100%; - vertical-align: middle; - content: ' '; -} diff --git a/src/css/utils/background.css b/src/css/utils/background.css index 958ba6d1f9..79e2b66c1a 100644 --- a/src/css/utils/background.css +++ b/src/css/utils/background.css @@ -22,502 +22,4 @@ background: url('icon/loading.gif') no-repeat center center; _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='icon/loading.gif'); _background: none; -} -.loading-background-f25 { - background: url('background/F.25.gif') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/F.25.gif'); - _background: none; -} -.loading-background-e50 { - background: url('background/E.50.gif') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/E.50.gif'); - _background: none; -} -.loading-background-d100 { - background: url('background/D.100.gif') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/D.100.gif'); - _background: none; -} -.axis-tip-background { - background: url('background/charts/axis.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/axis.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-accu-tip-background { - background: url('background/charts/axis_accu.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/axis_accu.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-percent-tip-background { - background: url('background/charts/axis_percent.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/axis_percent.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-compare-tip-background { - background: url('background/charts/axis_compare.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/axis_compare.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-fall-tip-background { - background: url('background/charts/axis_fall.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/axis_fall.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bubble-tip-background { - background: url('background/charts/bubble.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/bubble.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bubble-force-tip-background { - background: url('background/charts/bubble_force.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/bubble_force.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.dashboard-tip-background { - background: url('background/charts/dashboard.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/dashboard.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.donut-tip-background { - background: url('background/charts/donut.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/donut.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.funnel-tip-background { - background: url('background/charts/funnel.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/funnel.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-tip-background { - background: url('background/charts/map.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/map.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-gis-tip-background { - background: url('background/charts/map_gis.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/map_gis.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-svg-tip-background { - background: url('background/charts/map_svg.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/map_svg.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-svg-c-tip-background { - background: url('background/charts/map_svg_c.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/map_svg_c.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-svg-g-tip-background { - background: url('background/charts/map_svg_g.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/map_svg_g.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.pie-tip-background { - background: url('background/charts/pie.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/pie.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.radar-tip-background { - background: url('background/charts/radar.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/radar.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.radar-accu-tip-background { - background: url('background/charts/radar_accu.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/radar_accu.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-tip-background { - background: url('background/charts/area.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/area.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-accu-tip-background { - background: url('background/charts/area_accu.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/area_accu.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-compare-tip-background { - background: url('background/charts/area_compare.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/area_compare.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-percent-tip-background { - background: url('background/charts/area_percent.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/area_percent.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-range-tip-background { - background: url('background/charts/area_range.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/area_range.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bar-tip-background { - background: url('background/charts/bar.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/bar.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bar-accu-tip-background { - background: url('background/charts/bar_accu.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/bar_accu.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bar-compare-tip-background { - background: url('background/charts/bar_compare.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/bar_compare.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.combine-tip-background { - background: url('background/charts/combine.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/combine.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.combine-m-tip-background { - background: url('background/charts/combine_m.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/combine_m.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.line-tip-background { - background: url('background/charts/line.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/line.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.scatter-tip-background { - background: url('background/charts/scatter.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/scatter.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.table-complex-tip-background { - background: url('background/charts/table_complex.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/table_complex.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.table-cross-tip-background { - background: url('background/charts/table_cross.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/table_cross.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.table-group-tip-background { - background: url('background/charts/table_group.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/table_group.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.table-detail-tip-background { - background: url('background/charts/table_detail.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/table_detail.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-text-tip-background { - background: url('background/charts/text/axis_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/axis_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-accu-text-tip-background { - background: url('background/charts/text/axis_accu_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/axis_accu_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-percent-text-tip-background { - background: url('background/charts/text/axis_percent_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/axis_percent_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-compare-text-tip-background { - background: url('background/charts/text/axis_compare_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/axis_compare_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.axis-fall-text-tip-background { - background: url('background/charts/text/axis_fall_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/axis_fall_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bubble-text-tip-background { - background: url('background/charts/text/bubble_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/bubble_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bubble-force-text-tip-background { - background: url('background/charts/text/bubble_force_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/bubble_force_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.dashboard-text-tip-background { - background: url('background/charts/text/dashboard_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/dashboard_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.donut-text-tip-background { - background: url('background/charts/text/donut_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/donut_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.funnel-text-tip-background { - background: url('background/charts/text/funnel_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/funnel_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-text-tip-background { - background: url('background/charts/text/map_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/map_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-gis-text-tip-background { - background: url('background/charts/text/map_gis_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/map_gis_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-svg-text-tip-background { - background: url('background/charts/text/map_svg_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/map_svg_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-svg-c-text-tip-background { - background: url('background/charts/text/map_svg_c_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/map_svg_c_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.map-svg-g-text-tip-background { - background: url('background/charts/text/map_svg_g_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/map_svg_g_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.pie-text-tip-background { - background: url('background/charts/text/pie_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/pie_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.radar-text-tip-background { - background: url('background/charts/text/radar_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/radar_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.radar-accu-text-tip-background { - background: url('background/charts/text/radar_accu_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/radar_accu_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-text-tip-background { - background: url('background/charts/text/area_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/area_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-accu-text-tip-background { - background: url('background/charts/text/area_accu_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/area_accu_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-compare-text-tip-background { - background: url('background/charts/text/area_compare_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/area_compare_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-percent-text-tip-background { - background: url('background/charts/text/area_percent_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/area_percent_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.area-range-text-tip-background { - background: url('background/charts/text/area_range_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/area_range_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bar-text-tip-background { - background: url('background/charts/text/bar_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/bar_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bar-accu-text-tip-background { - background: url('background/charts/text/bar_accu_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/bar_accu_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.bar-compare-text-tip-background { - background: url('background/charts/text/bar_compare_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/bar_compare_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.combine-text-tip-background { - background: url('background/charts/text/combine_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/combine_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.combine-m-text-tip-background { - background: url('background/charts/text/combine_m_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/combine_m_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.line-text-tip-background { - background: url('background/charts/text/line_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/line_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.scatter-text-tip-background { - background: url('background/charts/text/text/scatter_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/text/scatter_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.table-complex-text-tip-background { - background: url('background/charts/text/table_complex_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/table_complex_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.table-cross-text-tip-background { - background: url('background/charts/text/table_cross_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/table_cross_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.table-group-text-tip-background { - background: url('background/charts/text/table_group_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/table_group_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.table-detail-text-tip-background { - background: url('background/charts/text/table_detail_text.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/charts/text/table_detail_text.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} -.data-miss-background { - background: url('background/data_miss.png') no-repeat center center; - _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/data_miss.png'); - _background: none; - background-color: #ffffff; - z-index: 2; -} +} \ No newline at end of file diff --git a/src/css/widget/arrangement/arrangement.block.css b/src/css/widget/arrangement/arrangement.block.css deleted file mode 100644 index 69b801736b..0000000000 --- a/src/css/widget/arrangement/arrangement.block.css +++ /dev/null @@ -1,8 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-arrangement-block { - background: #e85050; - opacity: 0.8; - filter: alpha(opacity=80); -} diff --git a/src/css/widget/arrangement/arrangement.css b/src/css/widget/arrangement/arrangement.css deleted file mode 100644 index ee99b79863..0000000000 --- a/src/css/widget/arrangement/arrangement.css +++ /dev/null @@ -1,40 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-arrangement .arrangement-helper { - border: 1px solid #d4dadd; - background: #009de3; - z-index: 1000000000; -} -.bi-arrangement .arrangement-block { - z-index: 1000000000; -} -.bi-arrangement .arrangement-drop-container { - z-index: 1000000000; -} -.bi-arrangement .arrangement-drop-container .arrangement-drop-region { - overflow: hidden; -} -.bi-arrangement .arrangement-drop-container .drop-devider { - z-index: 1000000001; - background: #009de3; -} -.bi-arrangement .arrangement-drop-container .top-left, -.bi-arrangement .arrangement-drop-container .top-right, -.bi-arrangement .arrangement-drop-container .bottom-left, -.bi-arrangement .arrangement-drop-container .bottom-right, -.bi-arrangement .arrangement-drop-container .top-left-second, -.bi-arrangement .arrangement-drop-container .top-right-second, -.bi-arrangement .arrangement-drop-container .bottom-left-second, -.bi-arrangement .arrangement-drop-container .bottom-right-second, -.bi-arrangement .arrangement-drop-container .top-center, -.bi-arrangement .arrangement-drop-container .bottom-center, -.bi-arrangement .arrangement-drop-container .left-center, -.bi-arrangement .arrangement-drop-container .right-center, -.bi-arrangement .arrangement-drop-container .top-center-second, -.bi-arrangement .arrangement-drop-container .bottom-center-second, -.bi-arrangement .arrangement-drop-container .left-center-second, -.bi-arrangement .arrangement-drop-container .right-center-second { - z-index: 1000000001; - background: #009de3; -} diff --git a/src/css/widget/arrangement/arrangement.droppable.css b/src/css/widget/arrangement/arrangement.droppable.css deleted file mode 100644 index 2ae94e0f7e..0000000000 --- a/src/css/widget/arrangement/arrangement.droppable.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-arrangement-droppable { - background: #d8f3fe; - opacity: 0.8; - filter: alpha(opacity=80); - z-index: 100000; -} diff --git a/src/css/widget/base/combo/iconcombo/combo.icon.css b/src/css/widget/base/combo/iconcombo/combo.icon.css deleted file mode 100644 index c825b6e90f..0000000000 --- a/src/css/widget/base/combo/iconcombo/combo.icon.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-icon-combo.bi-combo-popup .bi-icon-combo-trigger .b-font:before { - color: #009de3; -} diff --git a/src/css/widget/base/editor/editor.adapt.css b/src/css/widget/base/editor/editor.adapt.css deleted file mode 100644 index 70e3792fe2..0000000000 --- a/src/css/widget/base/editor/editor.adapt.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-adapt-editor .adapt-editor-text { - font-size: 14px; -} diff --git a/src/css/widget/base/editor/editor.search.css b/src/css/widget/base/editor/editor.search.css deleted file mode 100644 index 0070eff5a8..0000000000 --- a/src/css/widget/base/editor/editor.search.css +++ /dev/null @@ -1,13 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/*************BI.SearchEditor******************/ -.bi-search-editor { - border: 1px solid #d4dadd; -} -.bi-search-editor .close-font { - font-size: 20px; -} -.bi-search-editor .search-font { - font-size: 20px; -} diff --git a/src/css/widget/base/editor/editor.search.small.css b/src/css/widget/base/editor/editor.search.small.css deleted file mode 100644 index 75ffc8c06f..0000000000 --- a/src/css/widget/base/editor/editor.search.small.css +++ /dev/null @@ -1,19 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/*************BI.SearchEditor******************/ -.bi-small-search-editor .bi-editor { - font-size: 12px; -} -.bi-small-search-editor .bi-editor .bi-input { - font-size: 12px; -} -.bi-small-search-editor .bi-editor .bi-label { - font-size: 12px; -} -.bi-small-search-editor .close-font { - font-size: 18px; -} -.bi-small-search-editor .search-font { - font-size: 18px; -} diff --git a/src/css/widget/base/editor/editor.sign.initial.css b/src/css/widget/base/editor/editor.sign.initial.css deleted file mode 100644 index e1bb436f7f..0000000000 --- a/src/css/widget/base/editor/editor.sign.initial.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sign-initial-editor .sign-initial-editor-text { - font-size: 14px; -} diff --git a/src/css/widget/base/editor/editor.sign.style.css b/src/css/widget/base/editor/editor.sign.style.css deleted file mode 100644 index 63e9f258cf..0000000000 --- a/src/css/widget/base/editor/editor.sign.style.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sign-style-editor .sign-style-editor-text { - max-width: 100%; - font-size: 12px; -} -.bi-sign-style-editor .sign-style-editor-tip { - max-width: 100%; - font-size: 12px; - color: #808080; -} diff --git a/src/css/widget/base/editor/editor.text.css b/src/css/widget/base/editor/editor.text.css deleted file mode 100644 index fd41d73a43..0000000000 --- a/src/css/widget/base/editor/editor.text.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-editor { - border: 1px solid #d4dadd; -} diff --git a/src/css/widget/base/editor/editor.text.small.css b/src/css/widget/base/editor/editor.text.small.css deleted file mode 100644 index 18e55e5ff6..0000000000 --- a/src/css/widget/base/editor/editor.text.small.css +++ /dev/null @@ -1,4 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -/*************BI.SearchEditor******************/ diff --git a/src/css/widget/base/mask/loading.mask.css b/src/css/widget/base/mask/loading.mask.css deleted file mode 100644 index ff6723d462..0000000000 --- a/src/css/widget/base/mask/loading.mask.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-loading-main-background { - background-color: #ffffff; - opacity: 0.7; - filter: alpha(opacity=70); -} -.bi-loading-mask-content .loading-bar-label { - font-size: 20px; - color: #808080; -} diff --git a/src/css/widget/base/segment/button.line.segment.css b/src/css/widget/base/segment/button.line.segment.css deleted file mode 100644 index 3d59b575af..0000000000 --- a/src/css/widget/base/segment/button.line.segment.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-line-segment-button.active .line-segment-button-line { - background: #009de3; -} -.bi-line-segment-button.disabled, -.bi-line-segment-button.disabled:hover, -.bi-line-segment-button.disabled:active { - color: #1a1a1a; - background: #ffffff; -} diff --git a/src/css/widget/base/segment/segment.line.css b/src/css/widget/base/segment/segment.line.css deleted file mode 100644 index a9ebad60b5..0000000000 --- a/src/css/widget/base/segment/segment.line.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-line-segment { - border-bottom: 1px solid #d4dadd; -} diff --git a/src/css/widget/base/tip/tip.helper.css b/src/css/widget/base/tip/tip.helper.css deleted file mode 100644 index 0fad5f96be..0000000000 --- a/src/css/widget/base/tip/tip.helper.css +++ /dev/null @@ -1,20 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-helper { - background-color: #009de3; - font-size: 13px; - color: #ffffff; - cursor: url('cursor/cursor_drag_hand.cur'), auto; - opacity: 0.7; -} -.bi-helper.dragging-modify { - background: none; -} -.bi-helper.dragging-modify .helper-warning { - color: #1a1a1a; - border: 1px solid #e85050; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/base/toolbar/toolbar.progress.bar.css b/src/css/widget/base/toolbar/toolbar.progress.bar.css deleted file mode 100644 index fff1ebaae7..0000000000 --- a/src/css/widget/base/toolbar/toolbar.progress.bar.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar-bar { - background: #eaeaea; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; -} diff --git a/src/css/widget/base/toolbar/toolbar.progress.css b/src/css/widget/base/toolbar/toolbar.progress.css deleted file mode 100644 index ee1456d144..0000000000 --- a/src/css/widget/base/toolbar/toolbar.progress.css +++ /dev/null @@ -1,11 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar .progress-bar-label { - font-weight: bold; - font-family: "微软雅黑"; - color: #009de3; -} -.bi-progress-bar .progress-bar-label.success { - color: #0c6d23; -} diff --git a/src/css/widget/base/toolbar/toolbar.progress.processor.css b/src/css/widget/base/toolbar/toolbar.progress.processor.css deleted file mode 100644 index 85df881138..0000000000 --- a/src/css/widget/base/toolbar/toolbar.progress.processor.css +++ /dev/null @@ -1,15 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-progress-bar-processor { - background: #009de3; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; -} -.bi-progress-bar-processor.success { - background: #58cc7d; -} diff --git a/src/css/widget/colorchooser/colorchooser.popup.css b/src/css/widget/colorchooser/colorchooser.popup.css deleted file mode 100644 index cfaf63670a..0000000000 --- a/src/css/widget/colorchooser/colorchooser.popup.css +++ /dev/null @@ -1,13 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-chooser-popup .color-chooser-popup-title { - background: #f4f4f4; - border-bottom: 1px solid #d4dadd; -} -.bi-color-chooser-popup .color-chooser-popup-more { - background: #f4f4f4; -} -.bi-color-chooser-popup .color-chooser-popup-more:hover { - background: #d4dadd; -} diff --git a/src/css/widget/colorchooser/colorchooser.trigger.css b/src/css/widget/colorchooser/colorchooser.trigger.css deleted file mode 100644 index 65be3f1965..0000000000 --- a/src/css/widget/colorchooser/colorchooser.trigger.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-color-chooser-trigger { - background: #ffffff; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - box-shadow: 0px 0px 2px 1px #d4dadd inset; - -webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset; - -moz-box-shadow: 0px 0px 2px 1px #d4dadd inset; -} diff --git a/src/css/widget/copy2group/button.add.copy2group.css b/src/css/widget/copy2group/button.add.copy2group.css deleted file mode 100644 index 527a2c526e..0000000000 --- a/src/css/widget/copy2group/button.add.copy2group.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-copy2group-add-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fff5c1; -} diff --git a/src/css/widget/copy2group/combo.copy2group.css b/src/css/widget/copy2group/combo.copy2group.css deleted file mode 100644 index 426daff8e6..0000000000 --- a/src/css/widget/copy2group/combo.copy2group.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.copy2_group_search_pane { - background: #ffffff; -} diff --git a/src/css/widget/date/calendar/picker.date.css b/src/css/widget/date/calendar/picker.date.css deleted file mode 100644 index 6a76b7b14a..0000000000 --- a/src/css/widget/date/calendar/picker.date.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-date-picker { - background: #f4f4f4; -} diff --git a/src/css/widget/date/trigger.date.css b/src/css/widget/date/trigger.date.css deleted file mode 100644 index c7b947b942..0000000000 --- a/src/css/widget/date/trigger.date.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-date-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/downlist/combo.downlist.css b/src/css/widget/downlist/combo.downlist.css deleted file mode 100644 index edfed09c68..0000000000 --- a/src/css/widget/downlist/combo.downlist.css +++ /dev/null @@ -1,16 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-down-list-combo .down-list-group.bi-combo-hover .bi-down-list-group-item, -.bi-down-list-combo .down-list-group.bi-combo-hover .bi-down-list-group-item .b-font:before { - background-color: #f4f4f4; -} -.bi-down-list-combo .down-list-group.bi-combo-hover .bi-down-list-group-item:disabled, -.bi-down-list-combo .down-list-group.bi-combo-hover .bi-down-list-group-item.disabled, -.bi-down-list-combo .down-list-group.bi-combo-hover .bi-down-list-group-item:disabled .b-font:before, -.bi-down-list-combo .down-list-group.bi-combo-hover .bi-down-list-group-item.disabled .b-font:before { - background-color: #ffffff; -} -.bi-down-list-combo .bi-down-list-spliter { - border-top: 1px solid #eaeaea; -} diff --git a/src/css/widget/downlist/popup.downlist.css b/src/css/widget/downlist/popup.downlist.css deleted file mode 100644 index 0d60861477..0000000000 --- a/src/css/widget/downlist/popup.downlist.css +++ /dev/null @@ -1,19 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-down-list-popup .bi-down-list-item:hover, -.bi-down-list-popup .bi-down-list-item.hover { - background-color: #f4f4f4; -} -.bi-down-list-popup .bi-down-list-item.disabled, -.bi-down-list-popup .bi-down-list-item.disabled:hover, -.bi-down-list-popup .bi-down-list-item.disabled:active { - background-color: #ffffff; -} -.bi-down-list-popup .bi-down-list-item:active { - color: #009de3; - background-color: #f4f4f4; -} -.bi-down-list-popup .bi-down-list-item .list-item-text { - max-width: 203px; -} diff --git a/src/css/widget/dynamicgrouptab/dynamicgroup.tab.buttongroup.css b/src/css/widget/dynamicgrouptab/dynamicgroup.tab.buttongroup.css deleted file mode 100644 index 5ba2080228..0000000000 --- a/src/css/widget/dynamicgrouptab/dynamicgroup.tab.buttongroup.css +++ /dev/null @@ -1,13 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sheet-tab-dynamic-button { - background: #eaeaea; - border-top: 1px solid #d4dadd; -} -.bi-sheet-tab-dynamic-button .bi-icon-button-scroll { - border: 1px solid #eaeaea; -} -.bi-sheet-tab-dynamic-button .bi-icon-button-scroll:hover { - border-color: #d4dadd; -} diff --git a/src/css/widget/exceltable/exceltable.cell.css b/src/css/widget/exceltable/exceltable.cell.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/exceltable/exceltable.cell.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/exceltable/exceltable.css b/src/css/widget/exceltable/exceltable.css deleted file mode 100644 index 90a35f20e2..0000000000 --- a/src/css/widget/exceltable/exceltable.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-excel-table > div.bottom-right > div > div > table { - border-right: 1px solid #eaeaea; -} diff --git a/src/css/widget/exceltable/exceltable.header.cell.css b/src/css/widget/exceltable/exceltable.header.cell.css deleted file mode 100644 index 94c48f0c85..0000000000 --- a/src/css/widget/exceltable/exceltable.header.cell.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-excel-table-header-cell { - font-weight: bold; - background-color: #eaeaea; -} diff --git a/src/css/widget/filemanager/filemanager.css b/src/css/widget/filemanager/filemanager.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/filemanager/filemanager.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/filemanager/items/item.file.filemanager.css b/src/css/widget/filemanager/items/item.file.filemanager.css deleted file mode 100644 index 4d8cf6ce58..0000000000 --- a/src/css/widget/filemanager/items/item.file.filemanager.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-file-manager-file-item { - border-bottom: 1px solid #d4dadd; -} diff --git a/src/css/widget/filemanager/items/item.folder.filemanager.css b/src/css/widget/filemanager/items/item.folder.filemanager.css deleted file mode 100644 index e47e3507c2..0000000000 --- a/src/css/widget/filemanager/items/item.folder.filemanager.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-file-manager-folder-item { - border-bottom: 1px solid #d4dadd; -} diff --git a/src/css/widget/filemanager/nav/button/button.nav.filemanager.css b/src/css/widget/filemanager/nav/button/button.nav.filemanager.css deleted file mode 100644 index 27a5e28074..0000000000 --- a/src/css/widget/filemanager/nav/button/button.nav.filemanager.css +++ /dev/null @@ -1,14 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-file-manager-nav-button .file-manager-nav-button-text { - max-width: 200px; - background: #ffffff; -} -.bi-file-manager-nav-button .file-manager-nav-button-text.active { - background-color: #f4f4f4; - color: #808080; -} -.bi-file-manager-nav-button .file-manager-nav-button-triangle { - z-index: 1; -} diff --git a/src/css/widget/filemanager/nav/nav.filemanager.css b/src/css/widget/filemanager/nav/nav.filemanager.css deleted file mode 100644 index 952e093907..0000000000 --- a/src/css/widget/filemanager/nav/nav.filemanager.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-file-manager-nav { - border-left: 1px solid #d4dadd; -} diff --git a/src/css/widget/filterpane/abstract.item.filter.css b/src/css/widget/filterpane/abstract.item.filter.css deleted file mode 100644 index 878dccf2b0..0000000000 --- a/src/css/widget/filterpane/abstract.item.filter.css +++ /dev/null @@ -1,14 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-item { - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-filter-item .filter-item-empty-item { - border-top: 1px solid #d4dadd; -} -.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf { - border: 1px dashed #178cdf; - background: #58cc7d; -} diff --git a/src/css/widget/filterpane/expander.filter.css b/src/css/widget/filterpane/expander.filter.css deleted file mode 100644 index 456fb19495..0000000000 --- a/src/css/widget/filterpane/expander.filter.css +++ /dev/null @@ -1,21 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-expander { - min-width: 100%; - border-right: 0px; - border-bottom: 0px; -} -.bi-filter-expander > .filter-item-empty-item { - border-top: 0px; - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-filter-expander > table { - min-width: 100%; -} -.bi-filter-expander > table > tbody > tr > td.first-element { - width: 20px; - border-right: 1px solid #d4dadd !important; - border-bottom: 1px solid #d4dadd !important; -} diff --git a/src/css/widget/filterpane/pane.filter.css b/src/css/widget/filterpane/pane.filter.css deleted file mode 100644 index b4925510f7..0000000000 --- a/src/css/widget/filterpane/pane.filter.css +++ /dev/null @@ -1,15 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-filter-pane { - min-width: 100%; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border-top: 1px solid #d4dadd; - border-left: 1px solid #d4dadd; -} -.bi-filter-pane .condition-container { - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} diff --git a/src/css/widget/finetuningnumbereditor/finetuning.number.editor.css b/src/css/widget/finetuningnumbereditor/finetuning.number.editor.css deleted file mode 100644 index d8afcf2390..0000000000 --- a/src/css/widget/finetuningnumbereditor/finetuning.number.editor.css +++ /dev/null @@ -1,16 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-fine-tuning-number-editor { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-fine-tuning-number-editor .top-button { - border-left: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-fine-tuning-number-editor .bottom-button { - border-left: 1px solid #d4dadd; -} diff --git a/src/css/widget/formula/editor.search.css b/src/css/widget/formula/editor.search.css deleted file mode 100644 index e70aecdc11..0000000000 --- a/src/css/widget/formula/editor.search.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-search-edit { - border: 1px solid #d4dadd; -} diff --git a/src/css/widget/formula/group.symbol.css b/src/css/widget/formula/group.symbol.css deleted file mode 100644 index 243dbd17bf..0000000000 --- a/src/css/widget/formula/group.symbol.css +++ /dev/null @@ -1,18 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-symbol-group .symbol-button:hover, -.bi-formula-symbol-group .symbol-button.hover, -.bi-formula-symbol-group .symbol-button:active, -.bi-formula-symbol-group .symbol-button.active { - color: #009de3; - background-color: #f4f4f4; - border: 1px solid #d4dadd; -} -.bi-formula-symbol-group .symbol-button { - color: #009de3; - border: 1px solid #ffffff; -} -.symbol-group-column { - border: 1px solid #d4dadd; -} diff --git a/src/css/widget/formula/insert.formula.css b/src/css/widget/formula/insert.formula.css deleted file mode 100644 index 7957c68986..0000000000 --- a/src/css/widget/formula/insert.formula.css +++ /dev/null @@ -1,26 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-insert .more-function-button { - color: #009de3; -} -.bi-formula-insert .bi-formula-field-pane { - border-top: 1px solid #d4dadd; - border-left: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} -.bi-formula-insert .bi-formula-editor { - border-left: 1px solid #d4dadd; - border-top: 1px solid #d4dadd; - border-right: 1px solid #d4dadd; -} -.bi-formula-insert .bi-water-mark { - font-size: 14px; -} -.bi-formula-insert .proxy_div { - font-size: 13px; - background-color: #009de3; - color: #ffffff; - opacity: 0.7; - cursor: pointer; -} diff --git a/src/css/widget/formula/item.button.text.treeleaf.css b/src/css/widget/formula/item.button.text.treeleaf.css deleted file mode 100644 index df2339264a..0000000000 --- a/src/css/widget/formula/item.button.text.treeleaf.css +++ /dev/null @@ -1,19 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-button-text-tree-item:hover, -.bi-button-text-tree-item.hover { - background-color: #f4f4f4; -} -.bi-button-text-tree-item.active { - color: #009de3; - background-color: #f4f4f4; -} -.bi-button-text-tree-item.disabled, -.bi-button-text-tree-item.disabled:hover, -.bi-button-text-tree-item.disabled:active { - background-color: #ffffff; -} -.bi-button-text-tree-item .formula-function-insert-button { - color: #009de3; -} diff --git a/src/css/widget/formula/pane.function.css b/src/css/widget/formula/pane.function.css deleted file mode 100644 index 612ea26f43..0000000000 --- a/src/css/widget/formula/pane.function.css +++ /dev/null @@ -1,16 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-function-pane .style-inner { - border-left: 1px solid #d4dadd; - border-top: 1px solid #d4dadd; -} -.bi-formula-function-pane .style-top { - border-top: 1px solid #d4dadd; -} -.bi-formula-function-pane .style-left { - border-left: 1px solid #d4dadd; -} -.bi-formula-function-pane { - background-color: #ffffff; -} diff --git a/src/css/widget/formula/tree.fieldname.css b/src/css/widget/formula/tree.fieldname.css deleted file mode 100644 index 57851feb83..0000000000 --- a/src/css/widget/formula/tree.fieldname.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-field-tree { - background-color: #f4f4f4; -} diff --git a/src/css/widget/formula/tree.function.css b/src/css/widget/formula/tree.function.css deleted file mode 100644 index 158b2053cc..0000000000 --- a/src/css/widget/formula/tree.function.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-formula-function-tree { - background-color: #ffffff; -} diff --git a/src/css/widget/image/button/href/image.button.href.css b/src/css/widget/image/button/href/image.button.href.css deleted file mode 100644 index cb133baf92..0000000000 --- a/src/css/widget/image/button/href/image.button.href.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-image-button-href .image-button-href-icon-button { - z-index: 1; - font-size: 16px; -} diff --git a/src/css/widget/image/button/size/image.button.size.css b/src/css/widget/image/button/size/image.button.size.css deleted file mode 100644 index 9c5a45187e..0000000000 --- a/src/css/widget/image/button/size/image.button.size.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-image-button-size .image-button-size-button-group { - font-size: 12px; - color: #1a1a1a; -} diff --git a/src/css/widget/image/button/upload.css b/src/css/widget/image/button/upload.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/image/button/upload.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/image/uploadimage.css b/src/css/widget/image/uploadimage.css deleted file mode 100644 index bf0fe2720b..0000000000 --- a/src/css/widget/image/uploadimage.css +++ /dev/null @@ -1,16 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-upload-image .upload-image-text-button-label { - font-size: 14px; - color: #c4c6c6; -} -.bi-upload-image .upload-image-icon-button { - z-index: 1; - font-size: 16px; - background-color: #ffffff; -} -.bi-upload-image .upload-image-delete-label { - font-size: 14px; - color: #1a1a1a; -} diff --git a/src/css/widget/interactivearrangement/interactivearrangement.css b/src/css/widget/interactivearrangement/interactivearrangement.css deleted file mode 100644 index f7ee4d7712..0000000000 --- a/src/css/widget/interactivearrangement/interactivearrangement.css +++ /dev/null @@ -1,10 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-interactive-arrangement .interactive-arrangement-dragtag-line { - z-index: 1000000000; - background-color: #f07d0a; -} -.bi-interactive-arrangement .interactive-arrangement-dragtag-icon { - z-index: 1000000000; -} diff --git a/src/css/widget/listlabel/listlabel.css b/src/css/widget/listlabel/listlabel.css deleted file mode 100644 index 608635c07b..0000000000 --- a/src/css/widget/listlabel/listlabel.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-list-label { - font-size: 14px; -} -.bi-list-label .list-label-button:hover { - color: #e85050; -} diff --git a/src/css/widget/month/combo.month.css b/src/css/widget/month/combo.month.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/month/combo.month.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/month/popup.month.css b/src/css/widget/month/popup.month.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/month/popup.month.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/month/trigger.month.css b/src/css/widget/month/trigger.month.css deleted file mode 100644 index 51c4a6c1ac..0000000000 --- a/src/css/widget/month/trigger.month.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-month-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/move2group/button.add.move2group.css b/src/css/widget/move2group/button.add.move2group.css deleted file mode 100644 index ef36515b56..0000000000 --- a/src/css/widget/move2group/button.add.move2group.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-move2group-add-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fff5c1; -} diff --git a/src/css/widget/move2group/combo.move2group.css b/src/css/widget/move2group/combo.move2group.css deleted file mode 100644 index bb2f59142c..0000000000 --- a/src/css/widget/move2group/combo.move2group.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.move2_group_search_pane { - background: #ffffff; -} diff --git a/src/css/widget/multidate/multidate.combo.css b/src/css/widget/multidate/multidate.combo.css deleted file mode 100644 index 44b1247899..0000000000 --- a/src/css/widget/multidate/multidate.combo.css +++ /dev/null @@ -1,8 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-combo { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/multidate/multidate.day.css b/src/css/widget/multidate/multidate.day.css deleted file mode 100644 index 3d6b4e284e..0000000000 --- a/src/css/widget/multidate/multidate.day.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-daycard .bi-multidate-inner-label { - color: #808080; -} diff --git a/src/css/widget/multidate/multidate.month.css b/src/css/widget/multidate/multidate.month.css deleted file mode 100644 index ae2e589c03..0000000000 --- a/src/css/widget/multidate/multidate.month.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-monthcard .bi-multidate-inner-label { - color: #808080; -} diff --git a/src/css/widget/multidate/multidate.popup.css b/src/css/widget/multidate/multidate.popup.css deleted file mode 100644 index 1b99414242..0000000000 --- a/src/css/widget/multidate/multidate.popup.css +++ /dev/null @@ -1,26 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-popup .bi-multidate-popup-label { - color: #009de3; - font-size: 14px; - border-left: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; - border-top: 1px solid #eaeaea; -} -.bi-multidate-popup .bi-multidate-popup-tab { - border-bottom: 1px solid #eaeaea; -} -.bi-multidate-popup .bi-multidate-popup-item:active, -.bi-multidate-popup .bi-multidate-popup-item.active { - background-color: #009de3; - color: #ffffff; - -webkit-border-radius: 2px 2px 0 0; - -moz-border-radius: 2px 2px 0 0; - border-radius: 2px 2px 0 0; -} -.bi-multidate-popup .bi-multidate-popup-button { - color: #009de3; - font-size: 14px; - border-top: 1px solid #eaeaea; -} diff --git a/src/css/widget/multidate/multidate.quarter.css b/src/css/widget/multidate/multidate.quarter.css deleted file mode 100644 index 7ecb2a43e3..0000000000 --- a/src/css/widget/multidate/multidate.quarter.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-quartercard .bi-multidate-inner-label { - color: #808080; -} diff --git a/src/css/widget/multidate/multidate.segment.css b/src/css/widget/multidate/multidate.segment.css deleted file mode 100644 index 16cc3e3a71..0000000000 --- a/src/css/widget/multidate/multidate.segment.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-segment .bi-multidate-normal-label { - color: #1a1a1a; -} -.bi-multidate-segment .bi-multidate-editor { - font-size: 14px; -} diff --git a/src/css/widget/multidate/multidate.week.css b/src/css/widget/multidate/multidate.week.css deleted file mode 100644 index 9d16364322..0000000000 --- a/src/css/widget/multidate/multidate.week.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-weekcard .bi-multidate-inner-label { - color: #808080; -} diff --git a/src/css/widget/multidate/multidate.year.css b/src/css/widget/multidate/multidate.year.css deleted file mode 100644 index d6eb34b419..0000000000 --- a/src/css/widget/multidate/multidate.year.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multidate-yearcard .bi-multidate-inner-label { - color: #808080; -} diff --git a/src/css/widget/multiselect/check/multiselect.check.pane.css b/src/css/widget/multiselect/check/multiselect.check.pane.css deleted file mode 100644 index ee98f4e772..0000000000 --- a/src/css/widget/multiselect/check/multiselect.check.pane.css +++ /dev/null @@ -1,10 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-select-check-pane .multi-select-continue-select { - background-color: #f4f4f4; -} -.bi-multi-select-check-pane .multi-select-check-selected { - color: #009de3; - text-decoration: underline; -} diff --git a/src/css/widget/multiselect/check/multiselect.display.css b/src/css/widget/multiselect/check/multiselect.display.css deleted file mode 100644 index 26e6241c0b..0000000000 --- a/src/css/widget/multiselect/check/multiselect.display.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-display-list { - background-color: #f4f4f4; -} -.bi-display-list .display-list-item { - color: #808080; -} diff --git a/src/css/widget/multiselect/multiselect.combo.css b/src/css/widget/multiselect/multiselect.combo.css deleted file mode 100644 index 78e5887e77..0000000000 --- a/src/css/widget/multiselect/multiselect.combo.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-select-combo .multi-select-trigger-icon-button { - border-left: 1px solid #d4dadd; - font-size: 16px; -} diff --git a/src/css/widget/multiselect/multiselect.popup.view.css b/src/css/widget/multiselect/multiselect.popup.view.css deleted file mode 100644 index 53c8418642..0000000000 --- a/src/css/widget/multiselect/multiselect.popup.view.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-select-popup-view .multi-select-no-toolbar { - color: #c4c6c6; -} diff --git a/src/css/widget/multiselect/multiselect.trigger.css b/src/css/widget/multiselect/multiselect.trigger.css deleted file mode 100644 index 3bf97099ec..0000000000 --- a/src/css/widget/multiselect/multiselect.trigger.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-select-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px 2px 2px 2px; - -moz-border-radius: 2px 2px 2px 2px; - border-radius: 2px 2px 2px 2px; -} diff --git a/src/css/widget/multiselect/search/multiselect.search.pane.css b/src/css/widget/multiselect/search/multiselect.search.pane.css deleted file mode 100644 index a717a9144d..0000000000 --- a/src/css/widget/multiselect/search/multiselect.search.pane.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-select-search-pane { - background: #ffffff; -} -.bi-multi-select-search-pane .multi-select-toolbar { - color: #e85050; -} diff --git a/src/css/widget/multiselect/trigger/button.checkselected.css b/src/css/widget/multiselect/trigger/button.checkselected.css deleted file mode 100644 index 5756a2ff77..0000000000 --- a/src/css/widget/multiselect/trigger/button.checkselected.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-select-check-selected-button { - border: 1px solid #009de3; - -webkit-border-radius: 8px 8px 8px 8px; - -moz-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; - color: #009de3; - background-color: #ffffff; - z-index: 1; -} diff --git a/src/css/widget/multistringlist/multistringlist.css b/src/css/widget/multistringlist/multistringlist.css deleted file mode 100644 index dbe8886597..0000000000 --- a/src/css/widget/multistringlist/multistringlist.css +++ /dev/null @@ -1,8 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-string-list .popup-multi-string-list { - border-left: 1px solid #d4dadd; - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} diff --git a/src/css/widget/multitree/check/multi.tree.check.pane.css b/src/css/widget/multitree/check/multi.tree.check.pane.css deleted file mode 100644 index e47d209b74..0000000000 --- a/src/css/widget/multitree/check/multi.tree.check.pane.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-check-pane { - background-color: #f4f4f4; -} -.bi-multi-tree-check-pane .multi-tree-continue-select { - background-color: #f4f4f4; -} -.bi-multi-tree-check-pane .multi-tree-check-selected { - color: #009de3; -} diff --git a/src/css/widget/multitree/display.multi.tree.css b/src/css/widget/multitree/display.multi.tree.css deleted file mode 100644 index 95ed7ce025..0000000000 --- a/src/css/widget/multitree/display.multi.tree.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-display { - background-color: #f4f4f4; -} diff --git a/src/css/widget/multitree/multi.tree.combo.css b/src/css/widget/multitree/multi.tree.combo.css deleted file mode 100644 index 8ea67a36fb..0000000000 --- a/src/css/widget/multitree/multi.tree.combo.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-combo .multi-select-trigger-icon-button { - border-left: 1px solid #d4dadd; - font-size: 16px; -} diff --git a/src/css/widget/multitree/multi.tree.trigger.css b/src/css/widget/multitree/multi.tree.trigger.css deleted file mode 100644 index a5d0d76f3f..0000000000 --- a/src/css/widget/multitree/multi.tree.trigger.css +++ /dev/null @@ -1,22 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px 2px 2px 2px; - -moz-border-radius: 2px 2px 2px 2px; - border-radius: 2px 2px 2px 2px; -} -.bi-multi-tree-trigger .trigger-check-selected { - border: 1px solid #009de3; - -webkit-border-radius: 8px 8px 8px 8px; - -moz-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; - color: #009de3; - background-color: #ffffff; - z-index: 1; -} -.bi-multi-tree-trigger .trigger-icon-button { - border-left: 1px solid #d4dadd; - font-size: 16px; -} diff --git a/src/css/widget/multitree/popup.multi.tree.css b/src/css/widget/multitree/popup.multi.tree.css deleted file mode 100644 index 3367584e46..0000000000 --- a/src/css/widget/multitree/popup.multi.tree.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-popup .popup-view-tree { - min-height: 170px; -} diff --git a/src/css/widget/multitree/search.multi.tree.css b/src/css/widget/multitree/search.multi.tree.css deleted file mode 100644 index f5df365cfe..0000000000 --- a/src/css/widget/multitree/search.multi.tree.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-search-pane { - background: #ffffff; -} diff --git a/src/css/widget/multitree/trigger.multi.tree.css b/src/css/widget/multitree/trigger.multi.tree.css deleted file mode 100644 index a5d0d76f3f..0000000000 --- a/src/css/widget/multitree/trigger.multi.tree.css +++ /dev/null @@ -1,22 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px 2px 2px 2px; - -moz-border-radius: 2px 2px 2px 2px; - border-radius: 2px 2px 2px 2px; -} -.bi-multi-tree-trigger .trigger-check-selected { - border: 1px solid #009de3; - -webkit-border-radius: 8px 8px 8px 8px; - -moz-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; - color: #009de3; - background-color: #ffffff; - z-index: 1; -} -.bi-multi-tree-trigger .trigger-icon-button { - border-left: 1px solid #d4dadd; - font-size: 16px; -} diff --git a/src/css/widget/multitree/trigger/multi.tree.button.checkselected.css b/src/css/widget/multitree/trigger/multi.tree.button.checkselected.css deleted file mode 100644 index 33b983af34..0000000000 --- a/src/css/widget/multitree/trigger/multi.tree.button.checkselected.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-multi-tree-check-selected-button .trigger-check-selected { - border: 1px solid #009de3; - -webkit-border-radius: 8px 8px 8px 8px; - -moz-border-radius: 8px 8px 8px 8px; - border-radius: 8px 8px 8px 8px; - color: #009de3; - background-color: #ffffff; - z-index: 1; -} diff --git a/src/css/widget/multitreelist/multitreelist.popup.css b/src/css/widget/multitreelist/multitreelist.popup.css deleted file mode 100644 index ca53430b7f..0000000000 --- a/src/css/widget/multitreelist/multitreelist.popup.css +++ /dev/null @@ -1,8 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-tree-list-popup { - border-left: 1px solid #d4dadd; - border-right: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; -} diff --git a/src/css/widget/numericalinterval/numericalinterval.css b/src/css/widget/numericalinterval/numericalinterval.css deleted file mode 100644 index db77eda784..0000000000 --- a/src/css/widget/numericalinterval/numericalinterval.css +++ /dev/null @@ -1,52 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-numerical-interval .numerical-interval-small-editor { - border-top: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; - border-left: 1px solid #d4dadd; - -moz-border-radius-topleft: 2px; - -webkit-border-top-left-radius: 2px; - -moz-border-radius-bottomleft: 2px; - -webkit-border-bottom-left-radius: 2px; - border-top-left-radius: 2px; - border-bottom-left-radius: 2px; -} -.bi-numerical-interval .numerical-interval-big-editor { - border-top: 1px solid #d4dadd; - border-bottom: 1px solid #d4dadd; - border-right: 1px solid #d4dadd; - -moz-border-radius-topright: 2px; - -webkit-border-top-right-radius: 2px; - -moz-border-radius-bottomright: 2px; - -webkit-border-bottom-right-radius: 2px; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; -} -.bi-numerical-interval .numerical-interval-big-combo { - border: 1px solid #d4dadd; - -moz-border-radius-topleft: 2px; - -webkit-border-top-left-radius: 2px; - -moz-border-radius-bottomleft: 2px; - -webkit-border-bottom-left-radius: 2px; - border-top-left-radius: 2px; - border-bottom-left-radius: 2px; -} -.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { - font-size: 14px; -} -.bi-numerical-interval .numerical-interval-small-combo { - border: 1px solid #d4dadd; - -moz-border-radius-topright: 2px; - -webkit-border-top-right-radius: 2px; - -moz-border-radius-bottomright: 2px; - -webkit-border-bottom-right-radius: 2px; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; -} -.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { - font-size: 14px; -} -.bi-numerical-interval.number-error .bi-input { - color: #e85050; -} diff --git a/src/css/widget/numericalinterval/popup.numericalinterval.css b/src/css/widget/numericalinterval/popup.numericalinterval.css deleted file mode 100644 index a38f49d30e..0000000000 --- a/src/css/widget/numericalinterval/popup.numericalinterval.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-numerical-interval-popup .numerical-interval-popup-item.hover, -.bi-numerical-interval-popup .numerical-interval-popup-item:hover { - background-color: #f4f4f4; -} -.bi-numerical-interval-popup .numerical-interval-popup-item.active, -.bi-numerical-interval-popup .numerical-interval-popup-item:active { - background-color: #f4f4f4; - color: #009de3; -} diff --git a/src/css/widget/pagetable/pagetable.cell.css b/src/css/widget/pagetable/pagetable.cell.css deleted file mode 100644 index caa1a6ddce..0000000000 --- a/src/css/widget/pagetable/pagetable.cell.css +++ /dev/null @@ -1,11 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-page-table-cell { - -webkit-user-select: initial; - -khtml-user-select: initial; - -moz-user-select: initial; - -ms-user-select: initial; - -o-user-select: initial; - user-select: initial; -} diff --git a/src/css/widget/pagetable/pagetable.css b/src/css/widget/pagetable/pagetable.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/pagetable/pagetable.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/paramsettingcombo/datecombo/combo.param.date.css b/src/css/widget/paramsettingcombo/datecombo/combo.param.date.css deleted file mode 100644 index c45a8dc6c5..0000000000 --- a/src/css/widget/paramsettingcombo/datecombo/combo.param.date.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-date-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/paramsettingcombo/dateintervalcombo/combo.param.dateinterval.css b/src/css/widget/paramsettingcombo/dateintervalcombo/combo.param.dateinterval.css deleted file mode 100644 index 4766b5125c..0000000000 --- a/src/css/widget/paramsettingcombo/dateintervalcombo/combo.param.dateinterval.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-date-interval-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/paramsettingcombo/param0.date.item.css b/src/css/widget/paramsettingcombo/param0.date.item.css deleted file mode 100644 index 2034f7137c..0000000000 --- a/src/css/widget/paramsettingcombo/param0.date.item.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param0-date-item .param-label { - color: #808080; -} diff --git a/src/css/widget/paramsettingcombo/param1.date.item.css b/src/css/widget/paramsettingcombo/param1.date.item.css deleted file mode 100644 index 8c60f0bf88..0000000000 --- a/src/css/widget/paramsettingcombo/param1.date.item.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param1-date-item .param-label { - color: #808080; -} diff --git a/src/css/widget/paramsettingcombo/param2.date.item.css b/src/css/widget/paramsettingcombo/param2.date.item.css deleted file mode 100644 index a4e0bac61d..0000000000 --- a/src/css/widget/paramsettingcombo/param2.date.item.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param2-date-item .param-label { - color: #808080; -} diff --git a/src/css/widget/paramsettingcombo/yearcombo/combo.param.year.css b/src/css/widget/paramsettingcombo/yearcombo/combo.param.year.css deleted file mode 100644 index 6acdb9e247..0000000000 --- a/src/css/widget/paramsettingcombo/yearcombo/combo.param.year.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/paramsettingcombo/yearmonthcombo/combo.param.yearmonth.css b/src/css/widget/paramsettingcombo/yearmonthcombo/combo.param.yearmonth.css deleted file mode 100644 index ee5a699948..0000000000 --- a/src/css/widget/paramsettingcombo/yearmonthcombo/combo.param.yearmonth.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-month-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/paramsettingcombo/yearseasoncombo/combo.param.yearseason.css b/src/css/widget/paramsettingcombo/yearseasoncombo/combo.param.yearseason.css deleted file mode 100644 index e5bf6dc881..0000000000 --- a/src/css/widget/paramsettingcombo/yearseasoncombo/combo.param.yearseason.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-season-param-combo .param-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/pathchooser/pathchooser.css b/src/css/widget/pathchooser/pathchooser.css deleted file mode 100644 index 06171e32b5..0000000000 --- a/src/css/widget/pathchooser/pathchooser.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-path-chooser .path-chooser-radio { - z-index: 1; -} diff --git a/src/css/widget/pathchooser/pathregion.css b/src/css/widget/pathchooser/pathregion.css deleted file mode 100644 index b068ae1ed3..0000000000 --- a/src/css/widget/pathchooser/pathregion.css +++ /dev/null @@ -1,15 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-path-region { - background: #eaeaea; -} -.bi-path-region .path-region-label { - z-index: 1; - background: #ffffff; - border: 1px solid #ffffff; -} -.bi-path-region .path-region-label.active { - background: #009de3; - color: #ffffff; -} diff --git a/src/css/widget/previewtable/previewtable.cell.css b/src/css/widget/previewtable/previewtable.cell.css deleted file mode 100644 index 9af2d6d718..0000000000 --- a/src/css/widget/previewtable/previewtable.cell.css +++ /dev/null @@ -1,8 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-preview-table-cell { - min-height: 25px; - min-width: 80px; - max-width: 220px; -} diff --git a/src/css/widget/previewtable/previewtable.css b/src/css/widget/previewtable/previewtable.css deleted file mode 100644 index 7d4519ab24..0000000000 --- a/src/css/widget/previewtable/previewtable.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-preview-table > div > table > thead > tr.odd, -.bi-preview-table > div > div > div > table > thead > tr.odd { - background-color: #eaeaea; -} diff --git a/src/css/widget/previewtable/previewtable.header.cell.css b/src/css/widget/previewtable/previewtable.header.cell.css deleted file mode 100644 index 3b5af9d0d2..0000000000 --- a/src/css/widget/previewtable/previewtable.header.cell.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-preview-table-header-cell { - font-weight: bold; - min-height: 25px; - min-width: 80px; - max-width: 220px; -} diff --git a/src/css/widget/quarter/combo.quarter.css b/src/css/widget/quarter/combo.quarter.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/quarter/combo.quarter.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/quarter/popup.quarter.css b/src/css/widget/quarter/popup.quarter.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/quarter/popup.quarter.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/quarter/trigger.quarter.css b/src/css/widget/quarter/trigger.quarter.css deleted file mode 100644 index 1e8b3da92d..0000000000 --- a/src/css/widget/quarter/trigger.quarter.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-quarter-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/relationview/relationview.item.css b/src/css/widget/relationview/relationview.item.css deleted file mode 100644 index 21294ea027..0000000000 --- a/src/css/widget/relationview/relationview.item.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-relation-view-item.active { - color: #ffffff; - background-color: #009de3; -} diff --git a/src/css/widget/relationview/relationview.region.css b/src/css/widget/relationview/relationview.region.css deleted file mode 100644 index dceee5cf6a..0000000000 --- a/src/css/widget/relationview/relationview.region.css +++ /dev/null @@ -1,17 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-relation-view-region .relation-view-region-container { - background: #ffffff; - border: 1px solid #d4dadd; - z-index: 1; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-relation-view-region .relation-view-region-container.other-package { - border: 1px dashed #d4dadd; -} -.bi-relation-view-region .relation-view-region-container .relation-view-region-title { - border-bottom: 1px solid #d4dadd; -} diff --git a/src/css/widget/selectdata/searchpane/result.search.selectdata.css b/src/css/widget/selectdata/searchpane/result.search.selectdata.css deleted file mode 100644 index 5ed101bfbf..0000000000 --- a/src/css/widget/selectdata/searchpane/result.search.selectdata.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-search-result-pane .search-result-line { - border-top: 1px solid #d4dadd; -} diff --git a/src/css/widget/selectdata/searchpane/searcher.selectdata.css b/src/css/widget/selectdata/searchpane/searcher.selectdata.css deleted file mode 100644 index fd6819ddb0..0000000000 --- a/src/css/widget/selectdata/searchpane/searcher.selectdata.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-searcher { - font-size: 13px; -} diff --git a/src/css/widget/selectdata/searchpane/segment.search.selectdata.css b/src/css/widget/selectdata/searchpane/segment.search.selectdata.css deleted file mode 100644 index a70336b54a..0000000000 --- a/src/css/widget/selectdata/searchpane/segment.search.selectdata.css +++ /dev/null @@ -1,13 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-search-segment .search-segment-field-table > .first-element { - -webkit-border-radius: 3px 0px 0px 3px; - -moz-border-radius: 3px 0px 0px 3px; - border-radius: 3px 0px 0px 3px; -} -.bi-select-data-search-segment .search-segment-field-table > .last-element { - -webkit-border-radius: 0px 3 3px 0px; - -moz-border-radius: 0px 3 3px 0px; - border-radius: 0px 3 3px 0px; -} diff --git a/src/css/widget/selectdata/searchpane/tab.search.selectdata.css b/src/css/widget/selectdata/searchpane/tab.search.selectdata.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/selectdata/searchpane/tab.search.selectdata.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/selectdata/tree/expander.selectdata.css b/src/css/widget/selectdata/tree/expander.selectdata.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/selectdata/tree/expander.selectdata.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/selectdata/tree/node/node.level0.css b/src/css/widget/selectdata/tree/node/node.level0.css deleted file mode 100644 index ec4b3d5dcf..0000000000 --- a/src/css/widget/selectdata/tree/node/node.level0.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level0-node .select-data-selected-count-label { - color: #009de3; -} diff --git a/src/css/widget/selectdata/tree/node/node.level1.css b/src/css/widget/selectdata/tree/node/node.level1.css deleted file mode 100644 index 81225a64e8..0000000000 --- a/src/css/widget/selectdata/tree/node/node.level1.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level1-node .select-data-selected-count-label { - color: #009de3; -} diff --git a/src/css/widget/selectdata/tree/tree.selectdata.css b/src/css/widget/selectdata/tree/tree.selectdata.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/selectdata/tree/tree.selectdata.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/selectdata/tree/treeitem/item.level0.css b/src/css/widget/selectdata/tree/treeitem/item.level0.css deleted file mode 100644 index af5cf0864c..0000000000 --- a/src/css/widget/selectdata/tree/treeitem/item.level0.css +++ /dev/null @@ -1,53 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level0-item .select-data-level0-item-button { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.bi-select-data-level0-item .select-data-level0-item-button:hover, -.bi-select-data-level0-item .select-data-level0-item-button.hover { - color: #009de3; - background-color: #f4f4f4; -} -.bi-select-data-level0-item .select-data-level0-item-button:active, -.bi-select-data-level0-item .select-data-level0-item-button.active { - color: #ffffff; - background-color: #009de3; -} -.bi-select-data-level0-item .select-data-level0-item-button:active .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.active .bi-high-light { - color: #ffffff; -} -.bi-select-data-level0-item .select-data-level0-item-button.disabled, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:hover, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:active { - color: #c4c6c6 !important; - background-color: #ffffff !important; -} -.bi-select-data-level0-item .select-data-level0-item-button.disabled .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:hover .bi-high-light, -.bi-select-data-level0-item .select-data-level0-item-button.disabled:active .bi-high-light { - color: #c4c6c6 !important; -} -.bi-select-data-level0-item .select-data-top-line, -.bi-select-data-level0-item .select-data-bottom-line { - background-color: #009de3; -} -.bi-select-data-level0-item.select-data-item-top .select-data-level0-item-button { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.bi-select-data-level0-item.select-data-item-bottom .select-data-level0-item-button { - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} diff --git a/src/css/widget/selectdata/tree/treeitem/item.level1.css b/src/css/widget/selectdata/tree/treeitem/item.level1.css deleted file mode 100644 index 5a01508b46..0000000000 --- a/src/css/widget/selectdata/tree/treeitem/item.level1.css +++ /dev/null @@ -1,53 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-select-data-level1-item .select-data-level1-item-button { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.bi-select-data-level1-item .select-data-level1-item-button:hover, -.bi-select-data-level1-item .select-data-level1-item-button.hover { - color: #009de3; - background-color: #f4f4f4; -} -.bi-select-data-level1-item .select-data-level1-item-button:active, -.bi-select-data-level1-item .select-data-level1-item-button.active { - color: #ffffff; - background-color: #009de3; -} -.bi-select-data-level1-item .select-data-level1-item-button:active .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.active .bi-high-light { - color: #ffffff; -} -.bi-select-data-level1-item .select-data-level1-item-button.disabled, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:hover, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:active { - color: #c4c6c6 !important; - background-color: #ffffff !important; -} -.bi-select-data-level1-item .select-data-level1-item-button.disabled .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:hover .bi-high-light, -.bi-select-data-level1-item .select-data-level1-item-button.disabled:active .bi-high-light { - color: #c4c6c6 !important; -} -.bi-select-data-level1-item .select-data-top-line, -.bi-select-data-level1-item .select-data-bottom-line { - background-color: #009de3; -} -.bi-select-data-level1-item.select-data-item-top .select-data-level1-item-button { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.bi-select-data-level1-item.select-data-item-bottom .select-data-level1-item-button { - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} diff --git a/src/css/widget/selecttable/single/button.databasetable.css b/src/css/widget/selecttable/single/button.databasetable.css deleted file mode 100644 index 798b282596..0000000000 --- a/src/css/widget/selecttable/single/button.databasetable.css +++ /dev/null @@ -1,80 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-database-table { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; - background: #ffffff; -} -.bi-database-table.active { - background: #009de3; - color: #ffffff; -} -.bi-database-table .table-name-text { - max-width: 300px; -} -.bi-database-table .table-font { - font-size: 16px; -} -.bi-database-table .table-conn-label1 { - background-color: #009de3; -} -.bi-database-table .table-conn-label2 { - background-color: #4fc1e9; -} -.bi-database-table .table-conn-label3 { - background-color: #48cfad; -} -.bi-database-table .table-conn-label4 { - background-color: #57cb7c; -} -.bi-database-table .table-conn-label5 { - background-color: #a0d468; -} -.bi-database-table .table-conn-label6 { - background-color: #fbaf4f; -} -.bi-database-table .table-conn-label7 { - background-color: #fc6e51; -} -.bi-database-table .table-conn-label8 { - background-color: #ed5565; -} -.bi-database-table .table-conn-label9 { - background-color: #ac92ec; -} -.bi-database-table .table-conn-label10 { - background-color: #5d9cec; -} -.bi-database-table.table-selected1.active { - background-color: #009de3; -} -.bi-database-table.table-selected2.active { - background-color: #4fc1e9; -} -.bi-database-table.table-selected3.active { - background-color: #48cfad; -} -.bi-database-table.table-selected4.active { - background-color: #57cb7c; -} -.bi-database-table.table-selected5.active { - background-color: #a0d468; -} -.bi-database-table.table-selected6.active { - background-color: #fbaf4f; -} -.bi-database-table.table-selected7.active { - background-color: #fc6e51; -} -.bi-database-table.table-selected8.active { - background-color: #ed5565; -} -.bi-database-table.table-selected9.active { - background-color: #ac92ec; -} -.bi-database-table.table-selected10.active { - background-color: #5d9cec; -} diff --git a/src/css/widget/selecttree/combo.select.tree.css b/src/css/widget/selecttree/combo.select.tree.css deleted file mode 100644 index 9b6290885b..0000000000 --- a/src/css/widget/selecttree/combo.select.tree.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-selecttree-combo .selecttree-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/css/widget/sequencetable/dynamicnumber.sequencetable.css b/src/css/widget/sequencetable/dynamicnumber.sequencetable.css deleted file mode 100644 index fed0aa1c3e..0000000000 --- a/src/css/widget/sequencetable/dynamicnumber.sequencetable.css +++ /dev/null @@ -1,30 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sequence-table-dynamic-number .sequence-table-title-cell { - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; - -webkit-box-sizing: border-box; - /*Safari3.2+*/ - -moz-box-sizing: border-box; - /*Firefox3.5+*/ - -ms-box-sizing: border-box; - /*IE8*/ - box-sizing: border-box; - /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ - border: 1px solid #eaeaea; -} -.bi-sequence-table-dynamic-number .sequence-table-number-cell { - -webkit-box-sizing: border-box; - /*Safari3.2+*/ - -moz-box-sizing: border-box; - /*Firefox3.5+*/ - -ms-box-sizing: border-box; - /*IE8*/ - box-sizing: border-box; - /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ - border-left: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; - border-bottom: 1px solid #eaeaea; -} diff --git a/src/css/widget/sequencetable/listnumber.sequencetable.css b/src/css/widget/sequencetable/listnumber.sequencetable.css deleted file mode 100644 index dace5ccd17..0000000000 --- a/src/css/widget/sequencetable/listnumber.sequencetable.css +++ /dev/null @@ -1,30 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sequence-table-list-number .sequence-table-title-cell { - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; - -webkit-box-sizing: border-box; - /*Safari3.2+*/ - -moz-box-sizing: border-box; - /*Firefox3.5+*/ - -ms-box-sizing: border-box; - /*IE8*/ - box-sizing: border-box; - /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ - border: 1px solid #eaeaea; -} -.bi-sequence-table-list-number .sequence-table-number-cell { - -webkit-box-sizing: border-box; - /*Safari3.2+*/ - -moz-box-sizing: border-box; - /*Firefox3.5+*/ - -ms-box-sizing: border-box; - /*IE8*/ - box-sizing: border-box; - /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ - border-left: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; - border-bottom: 1px solid #eaeaea; -} diff --git a/src/css/widget/sequencetable/sequencetable.css b/src/css/widget/sequencetable/sequencetable.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/sequencetable/sequencetable.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/sequencetable/treenumber.sequencetable.css b/src/css/widget/sequencetable/treenumber.sequencetable.css deleted file mode 100644 index be1c1be2a0..0000000000 --- a/src/css/widget/sequencetable/treenumber.sequencetable.css +++ /dev/null @@ -1,30 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sequence-table-tree-number .sequence-table-title-cell { - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; - -webkit-box-sizing: border-box; - /*Safari3.2+*/ - -moz-box-sizing: border-box; - /*Firefox3.5+*/ - -ms-box-sizing: border-box; - /*IE8*/ - box-sizing: border-box; - /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ - border: 1px solid #eaeaea; -} -.bi-sequence-table-tree-number .sequence-table-number-cell { - -webkit-box-sizing: border-box; - /*Safari3.2+*/ - -moz-box-sizing: border-box; - /*Firefox3.5+*/ - -ms-box-sizing: border-box; - /*IE8*/ - box-sizing: border-box; - /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ - border-left: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; - border-bottom: 1px solid #eaeaea; -} diff --git a/src/css/widget/singleslider/singleslider.css b/src/css/widget/singleslider/singleslider.css deleted file mode 100644 index c3456da8c2..0000000000 --- a/src/css/widget/singleslider/singleslider.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-single-slider .slider-editor-button .sign-editor-text:hover { - border: 1px solid #d4dadd; -} -.bi-single-slider .slider-editor-button .bi-editor { - border: 1px solid #d4dadd; -} diff --git a/src/css/widget/singleslider/slider/widget.slider.css b/src/css/widget/singleslider/slider/widget.slider.css deleted file mode 100644 index bbf5521851..0000000000 --- a/src/css/widget/singleslider/slider/widget.slider.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-single-slider-slider { - cursor: url('cursor/cursor_left_right.cur'), auto; -} diff --git a/src/css/widget/singleslider/track/widget.track.css b/src/css/widget/singleslider/track/widget.track.css deleted file mode 100644 index 08d26ca5ba..0000000000 --- a/src/css/widget/singleslider/track/widget.track.css +++ /dev/null @@ -1,21 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-slider-track .background-track { - background-color: #f4f4f4; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px; -} -.bi-slider-track .gray-track { - background: #cccccc; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.bi-slider-track .blue-track { - background: #009de3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} diff --git a/src/css/widget/singletree/combo.single.tree.css b/src/css/widget/singletree/combo.single.tree.css deleted file mode 100644 index 3c017482b2..0000000000 --- a/src/css/widget/singletree/combo.single.tree.css +++ /dev/null @@ -1,12 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-singletree-combo .singletree-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.bi-singletree-combo .bi-singletree-popup .singletree-toolbar { - color: #c4c6c6; -} diff --git a/src/css/widget/sortabletable/sortabletable.css b/src/css/widget/sortabletable/sortabletable.css deleted file mode 100644 index 7f18220bd5..0000000000 --- a/src/css/widget/sortabletable/sortabletable.css +++ /dev/null @@ -1,14 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-sortable-table .sortable_table_drag_clone { - background: #d8f2fd; - top: 0px; - opacity: 0.5; -} -.bi-sortable-table .drag-header { - cursor: move; -} -.bi-sortable-table .insert-help-line { - border-right: 3px dashed #009de3; -} diff --git a/src/css/widget/textarea/textarea.css b/src/css/widget/textarea/textarea.css deleted file mode 100644 index f6bb7a5477..0000000000 --- a/src/css/widget/textarea/textarea.css +++ /dev/null @@ -1,7 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-area .text-area-editor-text-button-label { - font-size: 16px; - color: #c4c6c6; -} diff --git a/src/css/widget/texttoolbar/alignchooser/texttoolbar.alignchooser.css b/src/css/widget/texttoolbar/alignchooser/texttoolbar.alignchooser.css deleted file mode 100644 index 58f8b4dcc2..0000000000 --- a/src/css/widget/texttoolbar/alignchooser/texttoolbar.alignchooser.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-toolbar-align-chooser .align-chooser-button:hover { - background-color: #c4c6c6; -} -.bi-text-toolbar-align-chooser .align-chooser-button.active { - background-color: #c4c6c6; -} diff --git a/src/css/widget/texttoolbar/texttoolbar.css b/src/css/widget/texttoolbar/texttoolbar.css deleted file mode 100644 index 688d67d80f..0000000000 --- a/src/css/widget/texttoolbar/texttoolbar.css +++ /dev/null @@ -1,16 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-text-toolbar { - background: #eaeaea; -} -.bi-text-toolbar .text-toolbar-button { - font-size: 16px; -} -.bi-text-toolbar .text-toolbar-size-chooser-trigger { - background: #ffffff; - font-size: 12px; -} -.bi-text-toolbar .text-toolbar-size-chooser-trigger a { - font-size: 12px; -} diff --git a/src/css/widget/timeinterval/timeinterval.css b/src/css/widget/timeinterval/timeinterval.css deleted file mode 100644 index f43d57749b..0000000000 --- a/src/css/widget/timeinterval/timeinterval.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-param-time-interval.time-error .bi-input { - color: #e85050; -} -.bi-param-time-interval.time-error .sign-editor-text { - color: #e85050; -} diff --git a/src/css/widget/timesetting/timesetting.day.css b/src/css/widget/timesetting/timesetting.day.css deleted file mode 100644 index a5c627c84b..0000000000 --- a/src/css/widget/timesetting/timesetting.day.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-time-setting-day .operator-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; -} diff --git a/src/css/widget/timesetting/timesetting.hour.css b/src/css/widget/timesetting/timesetting.hour.css deleted file mode 100644 index 7deff31b54..0000000000 --- a/src/css/widget/timesetting/timesetting.hour.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-time-setting-hour .operator-button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #d4dadd; -} diff --git a/src/css/widget/treelabel/treelabel.css b/src/css/widget/treelabel/treelabel.css deleted file mode 100644 index d782c24135..0000000000 --- a/src/css/widget/treelabel/treelabel.css +++ /dev/null @@ -1,6 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-tree-label { - font-size: 14px; -} diff --git a/src/css/widget/treelabel/treelabel.view.css b/src/css/widget/treelabel/treelabel.view.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/treelabel/treelabel.view.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/web/web.css b/src/css/widget/web/web.css deleted file mode 100644 index 16fe67de55..0000000000 --- a/src/css/widget/web/web.css +++ /dev/null @@ -1,16 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-web-page .web-page-button { - z-index: 1; - font-size: 14px; - background-color: #ffffff; -} -.bi-web-page .web-page-text-button-label { - font-size: 16px; - color: #c4c6c6; -} -.bi-web-page .web-page-delete-label { - font-size: 14px; - color: #1a1a1a; -} diff --git a/src/css/widget/year/combo.year.css b/src/css/widget/year/combo.year.css deleted file mode 100644 index 2f6491e13f..0000000000 --- a/src/css/widget/year/combo.year.css +++ /dev/null @@ -1,3 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/src/css/widget/year/popup.year.css b/src/css/widget/year/popup.year.css deleted file mode 100644 index 3839717e26..0000000000 --- a/src/css/widget/year/popup.year.css +++ /dev/null @@ -1,14 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-popup .year-popup-navigation { - border-top: 1px solid #eaeaea; - line-height: 30px; - color: #009de3; -} -.bi-year-popup .year-popup-navigation > .center-element { - border-left: 1px solid #eaeaea; -} -.bi-year-popup .year-popup-navigation > .first-element { - border-left: none; -} diff --git a/src/css/widget/year/trigger.year.css b/src/css/widget/year/trigger.year.css deleted file mode 100644 index 72cd985180..0000000000 --- a/src/css/widget/year/trigger.year.css +++ /dev/null @@ -1,9 +0,0 @@ -/****添加计算宽度的--运算符直接需要space****/ -/****** common color(常用颜色,可用于普遍场景) *****/ -/**** custom color(自定义颜色,用于特定场景) ****/ -.bi-year-trigger { - border: 1px solid #d4dadd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} diff --git a/src/less/widget/colorchooser/colorchooser.popup.less b/src/less/base/colorchooser/colorchooser.popup.less similarity index 100% rename from src/less/widget/colorchooser/colorchooser.popup.less rename to src/less/base/colorchooser/colorchooser.popup.less diff --git a/src/less/widget/colorchooser/colorchooser.trigger.less b/src/less/base/colorchooser/colorchooser.trigger.less similarity index 100% rename from src/less/widget/colorchooser/colorchooser.trigger.less rename to src/less/base/colorchooser/colorchooser.trigger.less diff --git a/src/less/base/colorpicker/button.colorpicker.less b/src/less/base/colorchooser/colorpicker/button.colorpicker.less similarity index 100% rename from src/less/base/colorpicker/button.colorpicker.less rename to src/less/base/colorchooser/colorpicker/button.colorpicker.less diff --git a/src/less/base/colorpicker/colorpicker.less b/src/less/base/colorchooser/colorpicker/colorpicker.less similarity index 100% rename from src/less/base/colorpicker/colorpicker.less rename to src/less/base/colorchooser/colorpicker/colorpicker.less diff --git a/src/less/base/colorpicker/editor.colorpicker.less b/src/less/base/colorchooser/colorpicker/editor.colorpicker.less similarity index 100% rename from src/less/base/colorpicker/editor.colorpicker.less rename to src/less/base/colorchooser/colorpicker/editor.colorpicker.less diff --git a/src/less/base/third/farbtastic/farbtastic.less b/src/less/base/colorchooser/farbtastic/farbtastic.less similarity index 87% rename from src/less/base/third/farbtastic/farbtastic.less rename to src/less/base/colorchooser/farbtastic/farbtastic.less index a41494966a..b703841469 100644 --- a/src/less/base/third/farbtastic/farbtastic.less +++ b/src/less/base/colorchooser/farbtastic/farbtastic.less @@ -34,18 +34,18 @@ height: 101px; } .farbtastic .wheel { - background: url(farbtastic/wheel.png) no-repeat; + background: url(third/farbtastic/wheel.png) no-repeat; width: 195px; height: 195px; } .farbtastic .overlay { - background: url(farbtastic/mask.png) no-repeat; + background: url(third/farbtastic/mask.png) no-repeat; } .farbtastic .marker { width: 17px; height: 17px; margin: -8px 0 0 -8px; overflow: hidden; - background: url(farbtastic/marker.png) no-repeat; + background: url(third/farbtastic/marker.png) no-repeat; } diff --git a/src/less/widget/base/editor/editor.adapt.less b/src/less/base/editor/editor.adapt.less similarity index 72% rename from src/less/widget/base/editor/editor.adapt.less rename to src/less/base/editor/editor.adapt.less index b7074b7008..b245ef2fcd 100644 --- a/src/less/widget/base/editor/editor.adapt.less +++ b/src/less/base/editor/editor.adapt.less @@ -1,4 +1,4 @@ -@import "../../../bibase"; +@import "../../bibase"; .bi-adapt-editor{ .adapt-editor-text{ diff --git a/src/less/widget/base/editor/editor.search.less b/src/less/base/editor/editor.search.less similarity index 87% rename from src/less/widget/base/editor/editor.search.less rename to src/less/base/editor/editor.search.less index 34c4145437..b66c946cf6 100644 --- a/src/less/widget/base/editor/editor.search.less +++ b/src/less/base/editor/editor.search.less @@ -1,4 +1,4 @@ -@import "../../../bibase"; +@import "../../bibase"; /*************BI.SearchEditor******************/ .bi-search-editor { border: 1px solid @color-bi-border-normal; diff --git a/src/less/widget/base/editor/editor.search.small.less b/src/less/base/editor/editor.search.small.less similarity index 91% rename from src/less/widget/base/editor/editor.search.small.less rename to src/less/base/editor/editor.search.small.less index 09736f98ff..4c66953062 100644 --- a/src/less/widget/base/editor/editor.search.small.less +++ b/src/less/base/editor/editor.search.small.less @@ -1,4 +1,4 @@ -@import "../../../bibase"; +@import "../../bibase"; /*************BI.SearchEditor******************/ .bi-small-search-editor { & .bi-editor { diff --git a/src/less/widget/base/editor/editor.sign.initial.less b/src/less/base/editor/editor.sign.initial.less similarity index 76% rename from src/less/widget/base/editor/editor.sign.initial.less rename to src/less/base/editor/editor.sign.initial.less index 4d3d7ea21b..524c46286f 100644 --- a/src/less/widget/base/editor/editor.sign.initial.less +++ b/src/less/base/editor/editor.sign.initial.less @@ -1,4 +1,4 @@ -@import "../../../bibase"; +@import "../../bibase"; .bi-sign-initial-editor{ .sign-initial-editor-text{ diff --git a/src/less/widget/base/editor/editor.sign.style.less b/src/less/base/editor/editor.sign.style.less similarity index 88% rename from src/less/widget/base/editor/editor.sign.style.less rename to src/less/base/editor/editor.sign.style.less index 3d46826252..f437ddcc8b 100644 --- a/src/less/widget/base/editor/editor.sign.style.less +++ b/src/less/base/editor/editor.sign.style.less @@ -1,4 +1,4 @@ -@import "../../../bibase"; +@import "../../bibase"; .bi-sign-style-editor{ & .sign-style-editor-text{ diff --git a/src/less/widget/base/editor/editor.text.less b/src/less/base/editor/editor.text.less similarity index 69% rename from src/less/widget/base/editor/editor.text.less rename to src/less/base/editor/editor.text.less index 27d2316119..48d4f395f0 100644 --- a/src/less/widget/base/editor/editor.text.less +++ b/src/less/base/editor/editor.text.less @@ -1,4 +1,4 @@ -@import "../../../bibase"; +@import "../../bibase"; .bi-text-editor{ border: 1px solid @color-bi-border-normal; diff --git a/src/less/widget/base/editor/editor.text.small.less b/src/less/base/editor/editor.text.small.less similarity index 77% rename from src/less/widget/base/editor/editor.text.small.less rename to src/less/base/editor/editor.text.small.less index 679652bc39..d0fbed35bc 100644 --- a/src/less/widget/base/editor/editor.text.small.less +++ b/src/less/base/editor/editor.text.small.less @@ -1,4 +1,4 @@ -@import "../../../bibase"; +@import "../../bibase"; /*************BI.SearchEditor******************/ .bi-small-text-editor { & .bi-editor { diff --git a/src/less/base/third/leaflet.less b/src/less/base/third/leaflet.less deleted file mode 100644 index ac01aa4bf1..0000000000 --- a/src/less/base/third/leaflet.less +++ /dev/null @@ -1,523 +0,0 @@ -/* required styles */ - -.leaflet-pane, -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-tile-container, -.leaflet-map-pane svg, -.leaflet-map-pane canvas, -.leaflet-zoom-box, -.leaflet-image-layer, -.leaflet-layer { - position: absolute; - left: 0; - top: 0; - } -.leaflet-container { - overflow: hidden; - -ms-touch-action: none; - touch-action: none; - } -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - -webkit-user-drag: none; - } -/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ -.leaflet-safari .leaflet-tile { - image-rendering: -webkit-optimize-contrast; - } -/* hack that prevents hw layers "stretching" when loading new tiles */ -.leaflet-safari .leaflet-tile-container { - width: 1600px; - height: 1600px; - -webkit-transform-origin: 0 0; - } -.leaflet-marker-icon, -.leaflet-marker-shadow { - display: block; - } -/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ -/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ -.leaflet-container .leaflet-overlay-pane svg, -.leaflet-container .leaflet-marker-pane img, -.leaflet-container .leaflet-tile-pane img, -.leaflet-container img.leaflet-image-layer { - max-width: none !important; - } -.leaflet-tile { - filter: inherit; - visibility: hidden; - } -.leaflet-tile-loaded { - visibility: inherit; - } -.leaflet-zoom-box { - width: 0; - height: 0; - -moz-box-sizing: border-box; - box-sizing: border-box; - z-index: 800; - } -/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ -.leaflet-overlay-pane svg { - -moz-user-select: none; - } - -.leaflet-pane { z-index: 400; } - -.leaflet-tile-pane { z-index: 200; } -.leaflet-overlay-pane { z-index: 400; } -.leaflet-shadow-pane { z-index: 500; } -.leaflet-marker-pane { z-index: 600; } -.leaflet-popup-pane { z-index: 700; } - -.leaflet-map-pane canvas { z-index: 100; } -.leaflet-map-pane svg { z-index: 200; } - -.leaflet-vml-shape { - width: 1px; - height: 1px; - } -.lvml { - behavior: url(#default#VML); - display: inline-block; - position: absolute; - } - - -/* control positioning */ - -.leaflet-control { - position: relative; - z-index: 800; - pointer-events: auto; - } -.leaflet-top, -.leaflet-bottom { - position: absolute; - z-index: 1000; - pointer-events: none; - } -.leaflet-top { - top: 0; - } -.leaflet-right { - right: 0; - } -.leaflet-bottom { - bottom: 0; - } -.leaflet-left { - left: 0; - } -.leaflet-control { - float: left; - clear: both; - } -.leaflet-right .leaflet-control { - float: right; - } -.leaflet-top .leaflet-control { - margin-top: 10px; - } -.leaflet-bottom .leaflet-control { - margin-bottom: 10px; - } -.leaflet-left .leaflet-control { - margin-left: 10px; - } -.leaflet-right .leaflet-control { - margin-right: 10px; - } - - -/* zoom and fade animations */ - -.leaflet-fade-anim .leaflet-tile { - will-change: opacity; - } -.leaflet-fade-anim .leaflet-popup { - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; - } -.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { - opacity: 1; - } -.leaflet-zoom-animated { - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; - } -.leaflet-zoom-anim .leaflet-zoom-animated { - will-change: transform; - } -.leaflet-zoom-anim .leaflet-zoom-animated { - -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); - -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); - -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); - transition: transform 0.25s cubic-bezier(0,0,0.25,1); - } -.leaflet-zoom-anim .leaflet-tile, -.leaflet-pan-anim .leaflet-tile { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; - } - -.leaflet-zoom-anim .leaflet-zoom-hide { - visibility: hidden; - } - - -/* cursors */ - -.leaflet-interactive { - cursor: pointer; - } -.leaflet-grab { - cursor: -webkit-grab; - cursor: -moz-grab; - } -.leaflet-crosshair, -.leaflet-crosshair .leaflet-interactive { - cursor: crosshair; - } -.leaflet-popup-pane, -.leaflet-control { - cursor: auto; - } -.leaflet-dragging .leaflet-grab, -.leaflet-dragging .leaflet-grab .leaflet-interactive, -.leaflet-dragging .leaflet-marker-draggable { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - } - -/* marker & overlays interactivity */ -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-image-layer, -.leaflet-pane > svg path, -.leaflet-tile-container { - pointer-events: none; - } - -.leaflet-marker-icon.leaflet-interactive, -.leaflet-image-layer.leaflet-interactive, -.leaflet-pane > svg path.leaflet-interactive { - pointer-events: auto; - } - -/* visual tweaks */ - -.leaflet-container { - /*background: #ddd;*/ - outline: 0; - } -.leaflet-container a { - color: #0078A8; - } -.leaflet-container a.leaflet-active { - outline: 2px solid orange; - } -.leaflet-zoom-box { - border: 2px dotted #38f; - background: rgba(255,255,255,0.5); - } - - -/* general typography */ -.leaflet-container { - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; - } - - -/* general toolbar styles */ - -.leaflet-bar { - box-shadow: 0 1px 5px rgba(0,0,0,0.65); - border-radius: 4px; - } -.leaflet-bar a, -.leaflet-bar a:hover { - background-color: #fff; - border-bottom: 1px solid #ccc; - width: 26px; - height: 26px; - line-height: 26px; - display: block; - text-align: center; - text-decoration: none; - color: black; - } -.leaflet-bar a, -.leaflet-control-layers-toggle { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; - } -.leaflet-bar a:hover { - background-color: #f4f4f4; - } -.leaflet-bar a:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - } -.leaflet-bar a:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom: none; - } -.leaflet-bar a.leaflet-disabled { - cursor: default; - background-color: #f4f4f4; - color: #bbb; - } - -.leaflet-touch .leaflet-bar a { - width: 30px; - height: 30px; - line-height: 30px; - } - - -/* zoom control */ - -.leaflet-control-zoom-in, -.leaflet-control-zoom-out { - font: bold 18px 'Lucida Console', Monaco, monospace; - text-indent: 1px; - } -.leaflet-control-zoom-out { - font-size: 20px; - } - -.leaflet-touch .leaflet-control-zoom-in { - font-size: 22px; - } -.leaflet-touch .leaflet-control-zoom-out { - font-size: 24px; - } - - -/* layers control */ - -.leaflet-control-layers { - box-shadow: 0 1px 5px rgba(0,0,0,0.4); - background: #fff; - border-radius: 5px; - } -.leaflet-control-layers-toggle { - background-image: url(images/layers.png); - width: 36px; - height: 36px; - } -.leaflet-retina .leaflet-control-layers-toggle { - background-image: url(images/layers-2x.png); - background-size: 26px 26px; - } -.leaflet-touch .leaflet-control-layers-toggle { - width: 44px; - height: 44px; - } -.leaflet-control-layers .leaflet-control-layers-list, -.leaflet-control-layers-expanded .leaflet-control-layers-toggle { - display: none; - } -.leaflet-control-layers-expanded .leaflet-control-layers-list { - display: block; - position: relative; - } -.leaflet-control-layers-expanded { - padding: 6px 10px 6px 6px; - color: #333; - background: #fff; - } -.leaflet-control-layers-scrollbar { - overflow-y: scroll; - padding-right: 5px; - } -.leaflet-control-layers-selector { - margin-top: 2px; - position: relative; - top: 1px; - } -.leaflet-control-layers label { - display: block; - } -.leaflet-control-layers-separator { - height: 0; - border-top: 1px solid #ddd; - margin: 5px -10px 5px -6px; - } - - -/* attribution and scale controls */ - -.leaflet-container .leaflet-control-attribution { - background: #fff; - background: rgba(255, 255, 255, 0.7); - margin: 0; - } -.leaflet-control-attribution, -.leaflet-control-scale-line { - padding: 0 5px; - color: #333; - } -.leaflet-control-attribution a { - text-decoration: none; - } -.leaflet-control-attribution a:hover { - text-decoration: underline; - } -.leaflet-container .leaflet-control-attribution, -.leaflet-container .leaflet-control-scale { - font-size: 11px; - } -.leaflet-left .leaflet-control-scale { - margin-left: 5px; - } -.leaflet-bottom .leaflet-control-scale { - margin-bottom: 5px; - } -.leaflet-control-scale-line { - border: 2px solid #777; - border-top: none; - line-height: 1.1; - padding: 2px 5px 1px; - font-size: 11px; - white-space: nowrap; - overflow: hidden; - -moz-box-sizing: border-box; - box-sizing: border-box; - - background: #fff; - background: rgba(255, 255, 255, 0.5); - } -.leaflet-control-scale-line:not(:first-child) { - border-top: 2px solid #777; - border-bottom: none; - margin-top: -2px; - } -.leaflet-control-scale-line:not(:first-child):not(:last-child) { - border-bottom: 2px solid #777; - } - -.leaflet-touch .leaflet-control-attribution, -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - box-shadow: none; - } -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - border: 2px solid rgba(0,0,0,0.2); - background-clip: padding-box; - } - - -/* popup */ - -.leaflet-popup { - position: absolute; - text-align: center; - } -.leaflet-popup-content-wrapper { - padding: 1px; - text-align: left; - border-radius: 12px; - } -.leaflet-popup-content { - margin: 13px 19px; - line-height: 1.4; - } -.leaflet-popup-content p { - margin: 18px 0; - } -.leaflet-popup-tip-container { - margin: 0 auto; - width: 40px; - height: 20px; - position: relative; - overflow: hidden; - } -.leaflet-popup-tip { - width: 17px; - height: 17px; - padding: 1px; - - margin: -10px auto 0; - - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); - } -.leaflet-popup-content-wrapper, -.leaflet-popup-tip { - background: white; - color: #333; - box-shadow: 0 3px 14px rgba(0,0,0,0.4); - } -.leaflet-container a.leaflet-popup-close-button { - position: absolute; - top: 0; - right: 0; - padding: 4px 4px 0 0; - border: none; - text-align: center; - width: 18px; - height: 14px; - font: 16px/14px Tahoma, Verdana, sans-serif; - color: #c3c3c3; - text-decoration: none; - font-weight: bold; - background: transparent; - } -.leaflet-container a.leaflet-popup-close-button:hover { - color: #999; - } -.leaflet-popup-scrolled { - overflow: auto; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; - } - -.leaflet-oldie .leaflet-popup-content-wrapper { - zoom: 1; - } -.leaflet-oldie .leaflet-popup-tip { - width: 24px; - margin: 0 auto; - - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; - filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); - } -.leaflet-oldie .leaflet-popup-tip-container { - margin-top: -1px; - } - -.leaflet-oldie .leaflet-control-zoom, -.leaflet-oldie .leaflet-control-layers, -.leaflet-oldie .leaflet-popup-content-wrapper, -.leaflet-oldie .leaflet-popup-tip { - border: 1px solid #999; - } - - -/* div icon */ - -.leaflet-div-icon { - background: #fff; - border: 1px solid #666; - } diff --git a/src/less/base/third/ztree/zTreeStyle.less b/src/less/base/tree/ztree/zTreeStyle.less similarity index 93% rename from src/less/base/third/ztree/zTreeStyle.less rename to src/less/base/tree/ztree/zTreeStyle.less index 6e625f2ac1..e4bcf31809 100644 --- a/src/less/base/third/ztree/zTreeStyle.less +++ b/src/less/base/tree/ztree/zTreeStyle.less @@ -28,7 +28,7 @@ website: http://code.google.com/p/jquerytree/ .ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle; border:0 none; cursor: pointer;outline:none; background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; - background-image:url("ztree/img/zTreeStandard.png"); *background-image:url("ztree/img/zTreeStandard.gif")} + background-image:url("third/ztree/img/zTreeStandard.png"); *background-image:url("third/ztree/img/zTreeStandard.gif")} .ztree li span.button.chk {width:16px; height:16px; margin:0 3px 0 0; cursor: auto} .ztree li span.button.chk.checkbox_false_full { @@ -113,13 +113,13 @@ website: http://code.google.com/p/jquerytree/ .ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle} .ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle} -.ztree li span.button.ico_loading{width: 0px;margin-right:2px; background:url("ztree/img/loading.gif") no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} +.ztree li span.button.ico_loading{width: 0px;margin-right:2px; background:url("third/ztree/img/loading.gif") no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; - background-position:-110px -80px; background-image:url("ztree/img/zTreeStandard.png"); *background-image:url("ztree/img/zTreeStandard.gif")} + background-position:-110px -80px; background-image:url("third/ztree/img/zTreeStandard.png"); *background-image:url("third/ztree/img/zTreeStandard.gif")} ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} .zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} diff --git a/src/less/widget/base/combo/iconcombo/combo.icon.less b/src/less/widget/base/combo/iconcombo/combo.icon.less deleted file mode 100644 index f656f1b6c4..0000000000 --- a/src/less/widget/base/combo/iconcombo/combo.icon.less +++ /dev/null @@ -1,11 +0,0 @@ -@import "../../../../bibase"; - -.bi-icon-combo{ - &.bi-combo-popup{ - & .bi-icon-combo-trigger{ - & .b-font:before{ - color: @color-bi-text-highlight; - } - } - } -} \ No newline at end of file diff --git a/src/less/widget/base/mask/loading.mask.less b/src/less/widget/base/mask/loading.mask.less deleted file mode 100644 index f31fced003..0000000000 --- a/src/less/widget/base/mask/loading.mask.less +++ /dev/null @@ -1,13 +0,0 @@ -@import "../../../bibase"; - -.bi-loading-main-background { - background-color: @color-bi-background-default; - .opacity(0.7); -} - -.bi-loading-mask-content { - & .loading-bar-label { - font-size: 20px; - color: @color-bi-text-gray; - } -} \ No newline at end of file diff --git a/src/less/widget/base/segment/button.line.segment.less b/src/less/widget/base/segment/button.line.segment.less deleted file mode 100644 index 094bf62198..0000000000 --- a/src/less/widget/base/segment/button.line.segment.less +++ /dev/null @@ -1,13 +0,0 @@ -@import "../../../bibase"; - -.bi-line-segment-button{ - &.active { - & .line-segment-button-line { - background: @color-bi-background-highlight; - } - } - &.disabled, &.disabled:hover, &.disabled:active { - color: @color-bi-text-black; - background: @color-bi-background-default; - } -} \ No newline at end of file diff --git a/src/less/widget/base/segment/segment.line.less b/src/less/widget/base/segment/segment.line.less deleted file mode 100644 index 8e7d6f51da..0000000000 --- a/src/less/widget/base/segment/segment.line.less +++ /dev/null @@ -1,6 +0,0 @@ -@import "../../../bibase"; - - -.bi-line-segment{ - border-bottom: 1px solid @color-bi-border-normal; -} \ No newline at end of file diff --git a/src/less/widget/base/tip/tip.helper.less b/src/less/widget/base/tip/tip.helper.less deleted file mode 100644 index 5d206f17a4..0000000000 --- a/src/less/widget/base/tip/tip.helper.less +++ /dev/null @@ -1,16 +0,0 @@ -@import "../../../bibase"; -.bi-helper{ - background-color: @background-color-highlight; - font-size: 13px; - color:@color-bi-text; - cursor: url('@{dragCursor}'), auto; - opacity: 0.7; - &.dragging-modify{ - background: none; - & .helper-warning{ - color: @color-bi-text-black; - border: 1px solid @color-bi-border-failure; - .border-radius(2px); - } - } -} \ No newline at end of file diff --git a/src/less/widget/base/toolbar/toolbar.progress.bar.less b/src/less/widget/base/toolbar/toolbar.progress.bar.less deleted file mode 100644 index d80d15d519..0000000000 --- a/src/less/widget/base/toolbar/toolbar.progress.bar.less +++ /dev/null @@ -1,6 +0,0 @@ -@import "../../../bibase"; - -.bi-progress-bar-bar{ - background: @color-bi-background-light; - .border-radius(20px); -} \ No newline at end of file diff --git a/src/less/widget/base/toolbar/toolbar.progress.less b/src/less/widget/base/toolbar/toolbar.progress.less deleted file mode 100644 index 74797951ba..0000000000 --- a/src/less/widget/base/toolbar/toolbar.progress.less +++ /dev/null @@ -1,12 +0,0 @@ -@import "../../../bibase"; - -.bi-progress-bar{ - & .progress-bar-label{ - font-weight: bold; - font-family: "微软雅黑"; - color: @color-bi-text-highlight; - &.success{ - color: @color-bi-text-success; - } - } -} \ No newline at end of file diff --git a/src/less/widget/base/toolbar/toolbar.progress.processor.less b/src/less/widget/base/toolbar/toolbar.progress.processor.less deleted file mode 100644 index 65da00a286..0000000000 --- a/src/less/widget/base/toolbar/toolbar.progress.processor.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "../../../bibase"; - -.bi-progress-bar-processor{ - background: @color-bi-background-highlight; - .border-radius(20px); - .overflow-hidden(); - &.success{ - background: @color-bi-background-success; - } -} \ No newline at end of file diff --git a/src/less/widget/copy2group/button.add.copy2group.less b/src/less/widget/copy2group/button.add.copy2group.less deleted file mode 100644 index c74eaf1be2..0000000000 --- a/src/less/widget/copy2group/button.add.copy2group.less +++ /dev/null @@ -1,6 +0,0 @@ -@import "../../bibase"; - -.bi-copy2group-add-button{ - .border-radius(2px); - background: @color-bi-tooltip-success-background; -} \ No newline at end of file diff --git a/src/less/widget/copy2group/combo.copy2group.less b/src/less/widget/copy2group/combo.copy2group.less deleted file mode 100644 index 5fbdca4ba3..0000000000 --- a/src/less/widget/copy2group/combo.copy2group.less +++ /dev/null @@ -1,5 +0,0 @@ -@import "../../bibase"; - -.copy2_group_search_pane{ - background: @color-bi-background-default; -} \ No newline at end of file diff --git a/src/less/widget/dynamicgrouptab/dynamicgroup.tab.buttongroup.less b/src/less/widget/dynamicgrouptab/dynamicgroup.tab.buttongroup.less deleted file mode 100644 index 8d167f444e..0000000000 --- a/src/less/widget/dynamicgrouptab/dynamicgroup.tab.buttongroup.less +++ /dev/null @@ -1,13 +0,0 @@ -@import "../../bibase"; - -.bi-sheet-tab-dynamic-button { - background: @color-bi-background-light; - border-top: 1px solid @color-bi-border-normal; - - & .bi-icon-button-scroll { - border:1px solid @background-color-light; - &:hover { - border-color: @color-bi-border-normal; - } - } -} \ No newline at end of file diff --git a/src/less/widget/filterpane/abstract.item.filter.less b/src/less/widget/filterpane/abstract.item.filter.less deleted file mode 100644 index f210ec3d7d..0000000000 --- a/src/less/widget/filterpane/abstract.item.filter.less +++ /dev/null @@ -1,14 +0,0 @@ -@import "../../bibase"; - -.bi-filter-item { - //min-width: 470px; - border-right: 1px solid @color-bi-border-normal; - border-bottom: 1px solid @color-bi-border-normal; - & .filter-item-empty-item { - border-top: 1px solid @color-bi-border-normal; - & .empty-filter-item-leaf{ - border: 1px dashed @color-bi-border-highlight; - background: @color-bi-background-success; - } - } -} \ No newline at end of file diff --git a/src/less/widget/filterpane/expander.filter.less b/src/less/widget/filterpane/expander.filter.less deleted file mode 100644 index 80f3bfbad0..0000000000 --- a/src/less/widget/filterpane/expander.filter.less +++ /dev/null @@ -1,23 +0,0 @@ -@import "../../bibase"; - -.bi-filter-expander { - min-width: 100%; - border-right: 0px; - border-bottom: 0px; - & > .filter-item-empty-item { - border-top: 0px; - border-right: 1px solid @color-bi-border-normal; - border-bottom: 1px solid @color-bi-border-normal; - } - & .condition-and-or { - - } - > table { - min-width: 100%; - } - > table > tbody > tr > td.first-element { - width: 20px; - border-right: 1px solid @color-bi-border-normal !important; - border-bottom: 1px solid @color-bi-border-normal !important; - } -} \ No newline at end of file diff --git a/src/less/widget/filterpane/pane.filter.less b/src/less/widget/filterpane/pane.filter.less deleted file mode 100644 index e276962078..0000000000 --- a/src/less/widget/filterpane/pane.filter.less +++ /dev/null @@ -1,12 +0,0 @@ -@import "../../bibase"; - -.bi-filter-pane { - min-width: 100%; - .border-radius(2px); - border-top: 1px solid @color-bi-border-normal; - border-left: 1px solid @color-bi-border-normal; - & .condition-container { - border-right: 1px solid @color-bi-border-normal; - border-bottom: 1px solid @color-bi-border-normal; - } -} \ No newline at end of file diff --git a/src/less/widget/formula/editor.search.less b/src/less/widget/formula/editor.search.less deleted file mode 100644 index 6b7e36d129..0000000000 --- a/src/less/widget/formula/editor.search.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../bibase"; - -.bi-search-edit{ - &{ - border: 1px solid @color-bi-background-dark; - } -} \ No newline at end of file diff --git a/src/less/widget/formula/group.symbol.less b/src/less/widget/formula/group.symbol.less deleted file mode 100644 index 04c6e7c047..0000000000 --- a/src/less/widget/formula/group.symbol.less +++ /dev/null @@ -1,21 +0,0 @@ -@import "../../bibase"; - -.bi-formula-symbol-group{ - & .symbol-button{ - &:hover, &.hover, &:active, &.active{ - color:@color-bi-text-highlight; - background-color:@color-bi-background-gray; - border:1px solid @color-bi-background-dark; - } - &{ - color:@color-bi-text-highlight; - border:1px solid @color-bi-background-default; - } - } -} - -.symbol-group-column{ - &{ - border:1px solid @color-bi-background-dark; - } -} \ No newline at end of file diff --git a/src/less/widget/formula/insert.formula.less b/src/less/widget/formula/insert.formula.less deleted file mode 100644 index 747603397a..0000000000 --- a/src/less/widget/formula/insert.formula.less +++ /dev/null @@ -1,31 +0,0 @@ -@import "../../bibase"; - -.bi-formula-insert { - & .more-function-button { - & { - color: @color-bi-text-highlight - } - } - & .bi-formula-field-pane { - border-top: 1px solid @color-bi-border-normal; - border-left: 1px solid @color-bi-border-normal; - border-bottom: 1px solid @color-bi-border-normal; - } - & .bi-formula-editor { - border-left: 1px solid @color-bi-border-normal; - border-top: 1px solid @color-bi-border-normal; - border-right: 1px solid @color-bi-border-normal; - - } - & .bi-water-mark { - font-size: 14px; - } - - & .proxy_div { - font-size: 13px; - background-color: @color-bi-background-highlight; - color: @color-bi-text; - opacity: 0.7; - cursor: pointer; - } -} \ No newline at end of file diff --git a/src/less/widget/formula/item.button.text.treeleaf.less b/src/less/widget/formula/item.button.text.treeleaf.less deleted file mode 100644 index 7542785bda..0000000000 --- a/src/less/widget/formula/item.button.text.treeleaf.less +++ /dev/null @@ -1,19 +0,0 @@ -@import "../../bibase"; - -.bi-button-text-tree-item{ - &:hover,&.hover{ - background-color: @color-bi-background-gray; - } - &.active{ - color: @color-bi-text-highlight; - background-color: @color-bi-background-gray; - } - &.disabled{ - &, &:hover, &:active{ - background-color: @color-bi-background-default; - } - } - & .formula-function-insert-button{ - color:@color-bi-text-highlight; - } -} \ No newline at end of file diff --git a/src/less/widget/formula/pane.function.less b/src/less/widget/formula/pane.function.less deleted file mode 100644 index 8ffc6d14f8..0000000000 --- a/src/less/widget/formula/pane.function.less +++ /dev/null @@ -1,20 +0,0 @@ -@import "../../bibase"; - -.bi-formula-function-pane { - & .style-inner { - & { - border-left: 1px solid @color-bi-background-dark; - border-top: 1px solid @color-bi-background-dark; - } - } - & .style-top { - border-top: 1px solid @color-bi-background-dark; - } - & .style-left { - border-left: 1px solid @color-bi-background-dark; - } - &{ - background-color: @color-bi-background-default; - } - -} \ No newline at end of file diff --git a/src/less/widget/formula/tree.fieldname.less b/src/less/widget/formula/tree.fieldname.less deleted file mode 100644 index f2f927760a..0000000000 --- a/src/less/widget/formula/tree.fieldname.less +++ /dev/null @@ -1,5 +0,0 @@ -@import "../../bibase"; - -.bi-formula-field-tree{ - background-color: @color-bi-background-gray; -} \ No newline at end of file diff --git a/src/less/widget/formula/tree.function.less b/src/less/widget/formula/tree.function.less deleted file mode 100644 index cd4acf7ab0..0000000000 --- a/src/less/widget/formula/tree.function.less +++ /dev/null @@ -1,5 +0,0 @@ -@import "../../bibase"; - -.bi-formula-function-tree{ - background-color: @color-bi-background-default; -} \ No newline at end of file diff --git a/src/less/widget/listlabel/listlabel.less b/src/less/widget/listlabel/listlabel.less deleted file mode 100644 index f799827d89..0000000000 --- a/src/less/widget/listlabel/listlabel.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "../../bibase"; - -.bi-list-label { - font-size: @font-size-14; - .list-label-button { - &:hover { - color: @font-color-warning - } - } -} diff --git a/src/less/widget/move2group/button.add.move2group.less b/src/less/widget/move2group/button.add.move2group.less deleted file mode 100644 index 5040d2185a..0000000000 --- a/src/less/widget/move2group/button.add.move2group.less +++ /dev/null @@ -1,6 +0,0 @@ -@import "../../bibase"; - -.bi-move2group-add-button{ - .border-radius(2px); - background: @color-bi-tooltip-success-background; -} \ No newline at end of file diff --git a/src/less/widget/move2group/combo.move2group.less b/src/less/widget/move2group/combo.move2group.less deleted file mode 100644 index 4d3716e06f..0000000000 --- a/src/less/widget/move2group/combo.move2group.less +++ /dev/null @@ -1,5 +0,0 @@ -@import "../../bibase"; - -.move2_group_search_pane{ - background: @color-bi-background-default; -} \ No newline at end of file diff --git a/src/less/widget/multidate/multidate.combo.less b/src/less/widget/multidate/multidate.combo.less deleted file mode 100644 index 6beb54694f..0000000000 --- a/src/less/widget/multidate/multidate.combo.less +++ /dev/null @@ -1,5 +0,0 @@ -@import "../../bibase"; - -.bi-multidate-combo{ - .border-radius(2px); -} \ No newline at end of file diff --git a/src/less/widget/multidate/multidate.day.less b/src/less/widget/multidate/multidate.day.less deleted file mode 100644 index e497d89498..0000000000 --- a/src/less/widget/multidate/multidate.day.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../bibase"; - -.bi-multidate-daycard{ - & .bi-multidate-inner-label{ - //font-size: @font-size-14; - color:@color-bi-text-gray; - } -} \ No newline at end of file diff --git a/src/less/widget/multidate/multidate.month.less b/src/less/widget/multidate/multidate.month.less deleted file mode 100644 index 4478abdd53..0000000000 --- a/src/less/widget/multidate/multidate.month.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../bibase"; - -.bi-multidate-monthcard{ - & .bi-multidate-inner-label{ - //font-size:@font-size-14; - color:@color-bi-text-gray; - } -} \ No newline at end of file diff --git a/src/less/widget/multidate/multidate.popup.less b/src/less/widget/multidate/multidate.popup.less deleted file mode 100644 index cb25ae6c3b..0000000000 --- a/src/less/widget/multidate/multidate.popup.less +++ /dev/null @@ -1,28 +0,0 @@ -@import "../../bibase"; - -.bi-multidate-popup{ - - & .bi-multidate-popup-label { - color:@color-bi-text-highlight; - font-size:@font-size-14; - border-left:1px solid @color-bi-border-line; - border-right:1px solid @color-bi-border-line; - border-top:1px solid @color-bi-border-line; - } - & .bi-multidate-popup-tab { - border-bottom:1px solid @color-bi-border-line; - } - & .bi-multidate-popup-item{ - &:active,&.active{ - background-color: @color-bi-text-highlight; - color: @color-bi-background-default; - .border-corner-radius(@radius-2,@radius-2,0,0); - } - } - - & .bi-multidate-popup-button{ - color:@color-bi-text-highlight; - font-size:@font-size-14; - border-top:1px solid @color-bi-border-line; - } -} \ No newline at end of file diff --git a/src/less/widget/multidate/multidate.quarter.less b/src/less/widget/multidate/multidate.quarter.less deleted file mode 100644 index 7cbb1e158a..0000000000 --- a/src/less/widget/multidate/multidate.quarter.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../bibase"; - -.bi-multidate-quartercard{ - & .bi-multidate-inner-label{ - //font-size:@font-size-14; - color:@color-bi-text-gray; - } -} \ No newline at end of file diff --git a/src/less/widget/multidate/multidate.segment.less b/src/less/widget/multidate/multidate.segment.less deleted file mode 100644 index ba5577ca25..0000000000 --- a/src/less/widget/multidate/multidate.segment.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "../../bibase"; - -.bi-multidate-segment{ - & .bi-multidate-normal-label{ - color:@color-bi-text-black; - } - & .bi-multidate-editor{ - font-size: @font-size-14; - } -} \ No newline at end of file diff --git a/src/less/widget/multidate/multidate.week.less b/src/less/widget/multidate/multidate.week.less deleted file mode 100644 index 2f83c18772..0000000000 --- a/src/less/widget/multidate/multidate.week.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../bibase"; - -.bi-multidate-weekcard{ - & .bi-multidate-inner-label{ - //font-size:@font-size-14; - color:@color-bi-text-gray; - } -} \ No newline at end of file diff --git a/src/less/widget/multidate/multidate.year.less b/src/less/widget/multidate/multidate.year.less deleted file mode 100644 index f13afd566d..0000000000 --- a/src/less/widget/multidate/multidate.year.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../bibase"; - -.bi-multidate-yearcard{ - & .bi-multidate-inner-label{ - //font-size:@font-size-14; - color:@color-bi-text-gray; - } -} \ No newline at end of file diff --git a/src/less/widget/paramsettingcombo/datecombo/combo.param.date.less b/src/less/widget/paramsettingcombo/datecombo/combo.param.date.less deleted file mode 100644 index c827a4929a..0000000000 --- a/src/less/widget/paramsettingcombo/datecombo/combo.param.date.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../../bibase"; - -.bi-date-param-combo{ - & .param-trigger{ - border: 1px solid @color-bi-border-normal; - .border-radius(2px) - } -} \ No newline at end of file diff --git a/src/less/widget/paramsettingcombo/dateintervalcombo/combo.param.dateinterval.less b/src/less/widget/paramsettingcombo/dateintervalcombo/combo.param.dateinterval.less deleted file mode 100644 index 71dae21ab1..0000000000 --- a/src/less/widget/paramsettingcombo/dateintervalcombo/combo.param.dateinterval.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../../bibase"; - -.bi-date-interval-param-combo{ - & .param-trigger{ - border: 1px solid @color-bi-border-normal; - .border-radius(2px) - } -} \ No newline at end of file diff --git a/src/less/widget/paramsettingcombo/param0.date.item.less b/src/less/widget/paramsettingcombo/param0.date.item.less deleted file mode 100644 index bb10108785..0000000000 --- a/src/less/widget/paramsettingcombo/param0.date.item.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../bibase"; - -.bi-param0-date-item{ - & .param-label{ - color: @color-bi-text-gray - } -} \ No newline at end of file diff --git a/src/less/widget/paramsettingcombo/param1.date.item.less b/src/less/widget/paramsettingcombo/param1.date.item.less deleted file mode 100644 index 4b8d8a9570..0000000000 --- a/src/less/widget/paramsettingcombo/param1.date.item.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../bibase"; - -.bi-param1-date-item{ - & .param-label{ - color: @color-bi-text-gray - } -} \ No newline at end of file diff --git a/src/less/widget/paramsettingcombo/param2.date.item.less b/src/less/widget/paramsettingcombo/param2.date.item.less deleted file mode 100644 index 4f3fe28a37..0000000000 --- a/src/less/widget/paramsettingcombo/param2.date.item.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../bibase"; - -.bi-param2-date-item{ - & .param-label{ - color: @color-bi-text-gray - } -} \ No newline at end of file diff --git a/src/less/widget/paramsettingcombo/yearcombo/combo.param.year.less b/src/less/widget/paramsettingcombo/yearcombo/combo.param.year.less deleted file mode 100644 index 1edcb8a74d..0000000000 --- a/src/less/widget/paramsettingcombo/yearcombo/combo.param.year.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../../bibase"; - -.bi-year-param-combo{ - & .param-trigger{ - border: 1px solid @color-bi-border-normal; - .border-radius(2px) - } -} \ No newline at end of file diff --git a/src/less/widget/paramsettingcombo/yearmonthcombo/combo.param.yearmonth.less b/src/less/widget/paramsettingcombo/yearmonthcombo/combo.param.yearmonth.less deleted file mode 100644 index e899f1162e..0000000000 --- a/src/less/widget/paramsettingcombo/yearmonthcombo/combo.param.yearmonth.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../../bibase"; - -.bi-year-month-param-combo{ - & .param-trigger{ - border: 1px solid @color-bi-border-normal; - .border-radius(2px) - } -} \ No newline at end of file diff --git a/src/less/widget/paramsettingcombo/yearseasoncombo/combo.param.yearseason.less b/src/less/widget/paramsettingcombo/yearseasoncombo/combo.param.yearseason.less deleted file mode 100644 index 150f84b61c..0000000000 --- a/src/less/widget/paramsettingcombo/yearseasoncombo/combo.param.yearseason.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "../../../bibase"; - -.bi-year-season-param-combo{ - & .param-trigger{ - border: 1px solid @color-bi-border-normal; - .border-radius(2px) - } -} \ No newline at end of file diff --git a/src/less/widget/selectdata/searchpane/result.search.selectdata.less b/src/less/widget/selectdata/searchpane/result.search.selectdata.less deleted file mode 100644 index 3c1a829ade..0000000000 --- a/src/less/widget/selectdata/searchpane/result.search.selectdata.less +++ /dev/null @@ -1,11 +0,0 @@ -@import "../../../bibase"; - - -.bi-select-data-search-result-pane{ - & .search-result-toolbar{ - - } - & .search-result-line{ - border-top: 1px solid @color-bi-border-normal; - } -} \ No newline at end of file diff --git a/src/less/widget/selectdata/searchpane/searcher.selectdata.less b/src/less/widget/selectdata/searchpane/searcher.selectdata.less deleted file mode 100644 index 424732a760..0000000000 --- a/src/less/widget/selectdata/searchpane/searcher.selectdata.less +++ /dev/null @@ -1,6 +0,0 @@ -@import "../../../bibase"; - - -.bi-select-data-searcher{ - font-size: @font-size-13; -} \ No newline at end of file diff --git a/src/less/widget/selectdata/searchpane/segment.search.selectdata.less b/src/less/widget/selectdata/searchpane/segment.search.selectdata.less deleted file mode 100644 index d08c6ed449..0000000000 --- a/src/less/widget/selectdata/searchpane/segment.search.selectdata.less +++ /dev/null @@ -1,14 +0,0 @@ -@import "../../../bibase"; - - -.bi-select-data-search-segment{ - - & .search-segment-field-table{ - & > .first-element{ - .border-corner-radius(3px,0px,0px,3px) - } - & > .last-element{ - .border-corner-radius(0px,3,3px,0px) - } - } -} \ No newline at end of file diff --git a/src/less/widget/selectdata/searchpane/tab.search.selectdata.less b/src/less/widget/selectdata/searchpane/tab.search.selectdata.less deleted file mode 100644 index 3d0e4ed65f..0000000000 --- a/src/less/widget/selectdata/searchpane/tab.search.selectdata.less +++ /dev/null @@ -1,6 +0,0 @@ -@import "../../../bibase"; - - -.bi-select-data-search-tab{ - -} \ No newline at end of file diff --git a/src/less/widget/selectdata/tree/expander.selectdata.less b/src/less/widget/selectdata/tree/expander.selectdata.less deleted file mode 100644 index 0573376d31..0000000000 --- a/src/less/widget/selectdata/tree/expander.selectdata.less +++ /dev/null @@ -1,5 +0,0 @@ -@import "../../../bibase"; - -.bi-select-data-expander{ - -} \ No newline at end of file diff --git a/src/less/widget/selectdata/tree/node/node.level0.less b/src/less/widget/selectdata/tree/node/node.level0.less deleted file mode 100644 index 7a30ff1a86..0000000000 --- a/src/less/widget/selectdata/tree/node/node.level0.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../../../bibase"; - -.bi-select-data-level0-node{ - & .select-data-selected-count-label{ - color: @color-bi-text-highlight; - } -} \ No newline at end of file diff --git a/src/less/widget/selectdata/tree/node/node.level1.less b/src/less/widget/selectdata/tree/node/node.level1.less deleted file mode 100644 index 3f6b9095ba..0000000000 --- a/src/less/widget/selectdata/tree/node/node.level1.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../../../bibase"; - -.bi-select-data-level1-node{ - & .select-data-selected-count-label{ - color: @color-bi-text-highlight; - } -} \ No newline at end of file diff --git a/src/less/widget/selectdata/tree/tree.selectdata.less b/src/less/widget/selectdata/tree/tree.selectdata.less deleted file mode 100644 index 9814791847..0000000000 --- a/src/less/widget/selectdata/tree/tree.selectdata.less +++ /dev/null @@ -1,5 +0,0 @@ -@import "../../../bibase"; - -.bi-select-data-tree{ - -} \ No newline at end of file diff --git a/src/less/widget/selectdata/tree/treeitem/item.level0.less b/src/less/widget/selectdata/tree/treeitem/item.level0.less deleted file mode 100644 index c07a7eb27f..0000000000 --- a/src/less/widget/selectdata/tree/treeitem/item.level0.less +++ /dev/null @@ -1,24 +0,0 @@ -@import "../../../../bibase"; - -.bi-select-data-level0-item { - & .select-data-level0-item-button { - .border-radius(3px); - .list-item-select(); - } - - & .select-data-top-line, & .select-data-bottom-line { - background-color: @color-bi-background-highlight; - } - - &.select-data-item-top { - & .select-data-level0-item-button { - .border-corner-top-radius(0, 0); - } - } - - &.select-data-item-bottom { - & .select-data-level0-item-button { - .border-corner-bottom-radius(0, 0); - } - } -} \ No newline at end of file diff --git a/src/less/widget/selectdata/tree/treeitem/item.level1.less b/src/less/widget/selectdata/tree/treeitem/item.level1.less deleted file mode 100644 index f051c9a2cf..0000000000 --- a/src/less/widget/selectdata/tree/treeitem/item.level1.less +++ /dev/null @@ -1,24 +0,0 @@ -@import "../../../../bibase"; - -.bi-select-data-level1-item { - & .select-data-level1-item-button { - .border-radius(3px); - .list-item-select(); - } - - & .select-data-top-line, & .select-data-bottom-line { - background-color: @color-bi-background-highlight; - } - - &.select-data-item-top { - & .select-data-level1-item-button { - .border-corner-top-radius(0, 0); - } - } - - &.select-data-item-bottom { - & .select-data-level1-item-button { - .border-corner-bottom-radius(0, 0); - } - } -} \ No newline at end of file diff --git a/src/less/widget/selecttable/single/button.databasetable.less b/src/less/widget/selecttable/single/button.databasetable.less deleted file mode 100644 index 2ef18931c1..0000000000 --- a/src/less/widget/selecttable/single/button.databasetable.less +++ /dev/null @@ -1,78 +0,0 @@ -@import "../../../bibase"; - -.bi-database-table { - .border-radius(2px); - border: 1px solid @color-bi-border-normal; - background: @color-bi-background-default; - &.active { - background: @color-bi-background-highlight; - color: @color-bi-text; - } - & .table-name-text { - max-width: 300px; - } - & .table-font { - font-size: @font-size-16; - } - & .table-conn-label1 { - background-color: @color-bi-data-link-button-color1; - } - & .table-conn-label2 { - background-color: @color-bi-data-link-button-color2; - } - & .table-conn-label3 { - background-color: @color-bi-data-link-button-color3; - } - & .table-conn-label4 { - background-color: @color-bi-data-link-button-color4; - } - & .table-conn-label5 { - background-color: @color-bi-data-link-button-color5; - } - & .table-conn-label6 { - background-color: @color-bi-data-link-button-color6; - } - & .table-conn-label7 { - background-color: @color-bi-data-link-button-color7; - } - & .table-conn-label8 { - background-color: @color-bi-data-link-button-color8; - } - & .table-conn-label9 { - background-color: @color-bi-data-link-button-color9; - } - & .table-conn-label10 { - background-color: @color-bi-data-link-button-color10; - } - - &.table-selected1.active { - background-color: @color-bi-data-link-button-color1; - } - &.table-selected2.active { - background-color: @color-bi-data-link-button-color2; - } - &.table-selected3.active { - background-color: @color-bi-data-link-button-color3; - } - &.table-selected4.active { - background-color: @color-bi-data-link-button-color4; - } - &.table-selected5.active { - background-color: @color-bi-data-link-button-color5; - } - &.table-selected6.active { - background-color: @color-bi-data-link-button-color6; - } - &.table-selected7.active { - background-color: @color-bi-data-link-button-color7; - } - &.table-selected8.active { - background-color: @color-bi-data-link-button-color8; - } - &.table-selected9.active { - background-color: @color-bi-data-link-button-color9; - } - &.table-selected10.active { - background-color: @color-bi-data-link-button-color10; - } -} \ No newline at end of file diff --git a/src/less/widget/selecttree/combo.select.tree.less b/src/less/widget/selecttree/combo.select.tree.less deleted file mode 100644 index 799b934979..0000000000 --- a/src/less/widget/selecttree/combo.select.tree.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../bibase"; -.bi-selecttree-combo{ - & .selecttree-trigger{ - border: 1px solid @color-bi-border-normal; - .border-radius(2px); - } -} \ No newline at end of file diff --git a/src/less/widget/singleslider/singleslider.less b/src/less/widget/singleslider/singleslider.less deleted file mode 100644 index 12cbd50b6c..0000000000 --- a/src/less/widget/singleslider/singleslider.less +++ /dev/null @@ -1,13 +0,0 @@ -@import "../../bibase"; -.bi-single-slider{ - & .slider-editor-button{ - & .sign-editor-text{ - &:hover { - border:1px solid @border-color-normal; - } - } - & .bi-editor{ - border:1px solid @border-color-normal; - } - } -} \ No newline at end of file diff --git a/src/less/widget/singleslider/slider/widget.slider.less b/src/less/widget/singleslider/slider/widget.slider.less deleted file mode 100644 index 297bd13f21..0000000000 --- a/src/less/widget/singleslider/slider/widget.slider.less +++ /dev/null @@ -1,4 +0,0 @@ -@import "../../../bibase"; -.bi-single-slider-slider{ - cursor: url('@{leftRightCursor}'), auto; -} \ No newline at end of file diff --git a/src/less/widget/singleslider/track/widget.track.less b/src/less/widget/singleslider/track/widget.track.less deleted file mode 100644 index 669f020e6e..0000000000 --- a/src/less/widget/singleslider/track/widget.track.less +++ /dev/null @@ -1,24 +0,0 @@ -@import "../../../bibase"; -.bi-slider-track{ - .background-track{ - background-color: @background-color-active; - .border-radius(12px); - } - .gray-track{ - background: @water-mark-color; - .border-radius(4px); - } - .blue-track{ - background: @background-color-highlight; - .border-radius(4px); - } - //.track-blue{ - // background: @background-color-highlight; - // .border-radius(@radius-5); - //} - //.track{ - // background-color: @water-mark-color; - // border: 7px solid @background-color-active; - // .border-radius(@radius-12); - //} -} \ No newline at end of file diff --git a/src/less/widget/sortabletable/sortabletable.less b/src/less/widget/sortabletable/sortabletable.less deleted file mode 100644 index 2d88930baf..0000000000 --- a/src/less/widget/sortabletable/sortabletable.less +++ /dev/null @@ -1,15 +0,0 @@ -@import "../../bibase"; - -.bi-sortable-table{ - & .sortable_table_drag_clone { - background: @background-color-light-blue; - top: 0px; - opacity: (0.5); - } - & .drag-header{ - cursor: move; - } - & .insert-help-line { - border-right: 3px dashed @background-color-highlight; - } -} \ No newline at end of file diff --git a/src/less/widget/textarea/textarea.less b/src/less/widget/textarea/textarea.less deleted file mode 100644 index 6a17a6d8a7..0000000000 --- a/src/less/widget/textarea/textarea.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../bibase"; -.bi-text-area{ - & .text-area-editor-text-button-label{ - font-size: @font-size-16; - color: @font-color-tips; - } -} \ No newline at end of file diff --git a/src/less/widget/texttoolbar/alignchooser/texttoolbar.alignchooser.less b/src/less/widget/texttoolbar/alignchooser/texttoolbar.alignchooser.less deleted file mode 100644 index 85da62e50e..0000000000 --- a/src/less/widget/texttoolbar/alignchooser/texttoolbar.alignchooser.less +++ /dev/null @@ -1,11 +0,0 @@ -@import "../../../bibase"; -.bi-text-toolbar-align-chooser{ - & .align-chooser-button{ - &:hover{ - background-color: @background-color-disabled; - } - &.active{ - background-color: @background-color-disabled; - } - } -} \ No newline at end of file diff --git a/src/less/widget/texttoolbar/texttoolbar.less b/src/less/widget/texttoolbar/texttoolbar.less deleted file mode 100644 index ffd4789f65..0000000000 --- a/src/less/widget/texttoolbar/texttoolbar.less +++ /dev/null @@ -1,14 +0,0 @@ -@import "../../bibase"; -.bi-text-toolbar{ - background: @background-color-light; - & .text-toolbar-button { - font-size: @font-size-16; - } - & .text-toolbar-size-chooser-trigger{ - background: @background-color-default; - font-size: @font-size-12; - & a{ - font-size: @font-size-12; - } - } -} \ No newline at end of file diff --git a/src/less/widget/timeinterval/timeinterval.less b/src/less/widget/timeinterval/timeinterval.less deleted file mode 100644 index 9d3a2e1958..0000000000 --- a/src/less/widget/timeinterval/timeinterval.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "../../bibase"; - -.bi-param-time-interval{ - &.time-error .bi-input{ - color:@color-bi-text-warning - } - &.time-error .sign-editor-text{ - color:@color-bi-text-warning - } -} \ No newline at end of file diff --git a/src/less/widget/timesetting/timesetting.day.less b/src/less/widget/timesetting/timesetting.day.less deleted file mode 100644 index c411085f3e..0000000000 --- a/src/less/widget/timesetting/timesetting.day.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../bibase"; -.bi-time-setting-day{ - .operator-button{ - .border-radius(2px); - border: 1px solid @color-bi-border-normal; - } -} \ No newline at end of file diff --git a/src/less/widget/timesetting/timesetting.hour.less b/src/less/widget/timesetting/timesetting.hour.less deleted file mode 100644 index 580e8ac26e..0000000000 --- a/src/less/widget/timesetting/timesetting.hour.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../bibase"; -.bi-time-setting-hour{ - .operator-button{ - .border-radius(2px); - border: 1px solid @color-bi-border-normal; - } -} \ No newline at end of file diff --git a/src/less/widget/treelabel/treelabel.less b/src/less/widget/treelabel/treelabel.less deleted file mode 100644 index a9092777b3..0000000000 --- a/src/less/widget/treelabel/treelabel.less +++ /dev/null @@ -1,5 +0,0 @@ -@import "../../bibase"; - -.bi-tree-label { - font-size: @font-size-14; -} \ No newline at end of file diff --git a/src/less/widget/treelabel/treelabel.view.less b/src/less/widget/treelabel/treelabel.view.less deleted file mode 100644 index 37361cdd8e..0000000000 --- a/src/less/widget/treelabel/treelabel.view.less +++ /dev/null @@ -1,4 +0,0 @@ -@import "../../bibase"; -.bi-tree-label-view { - // min-width: 330px; -} \ No newline at end of file diff --git a/src/widget/base/mask/cancel.loading.mask.js b/src/widget/base/mask/cancel.loading.mask.js deleted file mode 100644 index fe6662e675..0000000000 --- a/src/widget/base/mask/cancel.loading.mask.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @class BI.LoadingCancelMask - * @extend BI.Widget - * 带有取消按钮的正在加载mask - */ -BI.LoadingCancelMask = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LoadingCancelMask.superclass._defaultConfig.apply(this, arguments), {}) - }, - - _init: function () { - BI.LoadingCancelMask.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var cancelButton = BI.createWidget({ - type: "bi.button", - level: "ignore", - width: 100, - height: 30, - text: BI.i18nText("BI-Basic_Cancel") - }); - cancelButton.on(BI.Button.EVENT_CHANGE, function () { - self.fireEvent(BI.LoadingCancelMask.EVENT_VALUE_CANCEL); - self.destroy(); - }); - var mask = BI.Maskers.create(this.getName(), o.masker); - BI.createWidget({ - type: "bi.absolute", - element: mask, - items: [{ - el: { - type: "bi.layout", - cls: "bi-loading-main-background" - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }, { - el: { - type: "bi.center_adapt", - cls: "bi-loading-mask-content", - items: [{ - el: { - type: "bi.vertical", - items: [{ - type: "bi.center_adapt", - cls: "loading-bar-icon", - items: [{ - type: "bi.icon", - width: 208, - height: 30 - }] - }, { - type: "bi.label", - cls: "loading-bar-label", - text: o.text, - height: 30 - }, { - type: "bi.center_adapt", - items: [cancelButton] - }], - vgap: 10 - } - }] - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }] - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); - }); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -BI.LoadingCancelMask.EVENT_VALUE_CANCEL = "EVENT_VALUE_CANCEL"; -$.shortcut("bi.loading_cancel_mask", BI.LoadingCancelMask); \ No newline at end of file diff --git a/src/widget/base/mask/loading.background.js b/src/widget/base/mask/loading.background.js deleted file mode 100644 index 937296bdd7..0000000000 --- a/src/widget/base/mask/loading.background.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @class BI.LoadingBackground - * @extend BI.Widget - * 正在加载mask层 - */ -BI.LoadingBackground = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LoadingBackground.superclass._defaultConfig.apply(this, arguments), { - baseCls: "", - backgroundCls: "loading-background-e50" - }) - }, - - _init: function () { - BI.LoadingBackground.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var mask = BI.Maskers.create(this.getName(), o.masker, {offset: o.offset, container: o.container}); - BI.createWidget({ - type: "bi.center_adapt", - element: mask, - cls: "bi-loading-mask " + o.backgroundCls - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); - }); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -$.shortcut("bi.loading_background", BI.LoadingBackground); \ No newline at end of file diff --git a/src/widget/base/mask/loading.mask.js b/src/widget/base/mask/loading.mask.js deleted file mode 100644 index 1423af0ccd..0000000000 --- a/src/widget/base/mask/loading.mask.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @class BI.LoadingMask - * @extend BI.Widget - * 正在加载mask层 - */ -BI.LoadingMask = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LoadingMask.superclass._defaultConfig.apply(this, arguments), { - baseCls: "" - }); - }, - - _init: function () { - BI.LoadingMask.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var mask = BI.Maskers.create(this.getName(), o.masker, {offset: o.offset, container: o.container}); - BI.createWidget({ - type: "bi.absolute", - element: mask, - items: [{ - el: { - type: "bi.layout", - cls: "bi-loading-main-background" - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }, { - el: { - type: "bi.center_adapt", - cls: "bi-loading-mask-content", - items: [{ - type: "bi.vertical", - items: [{ - type: "bi.center_adapt", - cls: "loading-bar-icon", - items: [{ - type: "bi.icon", - width: 208, - height: 30 - }] - }, { - type: "bi.label", - cls: "loading-bar-label", - text: o.text, - height: 30 - }] - }] - }, - top: 0, - left: 0, - bottom: 0, - right: 0 - }] - }); - BI.Maskers.show(this.getName()); - BI.nextTick(function () { - BI.Maskers.show(self.getName()); - }); - }, - - destroy: function () { - BI.Maskers.remove(this.getName()); - } -}); -$.shortcut("bi.loading_mask", BI.LoadingMask); \ No newline at end of file diff --git a/src/widget/base/segment/button.line.segment.js b/src/widget/base/segment/button.line.segment.js deleted file mode 100644 index 04643ed5a1..0000000000 --- a/src/widget/base/segment/button.line.segment.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 一个button选中的时候下面有条线 - * - * Created by GUY on 2015/9/30. - * @class BI.LineSegmentButton - * @extends BI.BasicButton - */ -BI.LineSegmentButton = BI.inherit(BI.BasicButton, { - - _defaultConfig: function() { - var conf = BI.LineSegmentButton.superclass._defaultConfig.apply(this, arguments); - return BI.extend( conf, { - baseCls : (conf.baseCls ||"")+' bi-line-segment-button bi-list-item-effect', - once: true, - readonly: true, - hgap: 10, - height: 25 - }) - }, - - _init:function() { - BI.LineSegmentButton.superclass._init.apply(this, arguments); - var o = this.options, self = this; - this.text = BI.createWidget({ - type: "bi.label", - element: this, - text: o.text, - height: o.height, - value: o.value, - hgap: o.hgap - }); - - this.line = BI.createWidget({ - type: "bi.layout", - cls: "line-segment-button-line", - height: 3 - }) - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.line, - left: 0, - right: 0, - bottom: 0 - }] - }) - }, - - setSelected: function(v){ - BI.LineSegmentButton.superclass.setSelected.apply(this, arguments); - }, - - setText : function(text) { - BI.LineSegmentButton.superclass.setText.apply(this, arguments); - this.text.setText(text); - }, - - destroy : function() { - BI.LineSegmentButton.superclass.destroy.apply(this, arguments); - } -}); -$.shortcut('bi.line_segment_button', BI.LineSegmentButton); \ No newline at end of file diff --git a/src/widget/base/segment/segment.line.js b/src/widget/base/segment/segment.line.js deleted file mode 100644 index af58cde5d0..0000000000 --- a/src/widget/base/segment/segment.line.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 另一套风格的单选按钮组 - * - * Created by GUY on 2015/9/30. - * @class BI.LineSegment - * @extends BI.Widget - */ -BI.LineSegment = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.LineSegment.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-line-segment", - items: [], - height: 30 - }); - }, - _init: function () { - BI.LineSegment.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isNumber(o.height)) { - this.element.css({height: o.height - 1, lineHeight: (o.height - 1) + 'px'}); - } - this.buttonGroup = BI.createWidget({ - element: this, - type: "bi.button_group", - items: BI.createItems(o.items, { - type: "bi.line_segment_button", - height: o.height - 1 - }), - layout: [ - { - type: "bi.center" - } - ] - }); - this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function(){ - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments) - }); - this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function () { - self.fireEvent(BI.LineSegment.EVENT_CHANGE) - }) - }, - - setValue: function (v) { - this.buttonGroup.setValue(v); - }, - - setEnabledValue: function (v) { - this.buttonGroup.setEnabledValue(v); - }, - - setEnable: function (v) { - BI.LineSegment.superclass.setEnable.apply(this, arguments); - this.buttonGroup.setEnable(v) - }, - - - getValue: function () { - return this.buttonGroup.getValue(); - } -}); -BI.LineSegment.EVENT_CHANGE = "EVENT_CHANGE"; -$.shortcut('bi.line_segment', BI.LineSegment); \ No newline at end of file diff --git a/src/widget/base/tip/tip.helper.js b/src/widget/base/tip/tip.helper.js deleted file mode 100644 index 5c9ea660e4..0000000000 --- a/src/widget/base/tip/tip.helper.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * 拖拽字段的helper - * Created by roy on 15/10/13. - */ -BI.Helper = BI.inherit(BI.Tip, { - _defaultConfig: function () { - return BI.extend(BI.Helper.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-helper", - text: "", - value: "" - }) - }, - - _init: function () { - BI.Helper.superclass._init.apply(this, arguments); - this.populate(); - }, - - modifyContent: function(widget) { - this.empty(); - BI.createWidget({ - type: "bi.left", - element: this, - cls: "dragging-modify", - items: [widget], - lgap: 15 - }); - }, - - populate: function () { - var o = this.options; - this.element.data({helperWidget: this}); - this.empty(); - BI.createWidget({ - element: this, - type: "bi.label", - textAlign: "center", - textHeight: 20, - hgap: 5, - text: o.text, - value: o.value - }); - this.element.removeClass("dragging-modify"); - } -}); -$.shortcut("bi.helper", BI.Helper); \ No newline at end of file diff --git a/src/widget/base/toolbar/toolbar.progress.bar.js b/src/widget/base/toolbar/toolbar.progress.bar.js deleted file mode 100644 index 09454a6bc3..0000000000 --- a/src/widget/base/toolbar/toolbar.progress.bar.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBarBar - * @extends BI.BasicButton - */ -BI.ProgressBarBar = BI.inherit(BI.Single, { - _defaultConfig: function () { - return BI.extend(BI.ProgressBarBar.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar-bar", - height: 24 - }) - }, - _init: function () { - BI.ProgressBarBar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.svg = BI.createWidget({ - type: "bi.svg", - width: 6, - height: 6 - }); - this.svg.circle(3, 3, 3).attr({fill: "#ffffff", "stroke": ""}); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.svg, - right: 10, - top: 9 - }] - }); - this.processor = BI.createWidget({ - type: "bi.progress_bar_processor", - width: "0%", - height: o.height - }); - BI.createWidget({ - type: "bi.vertical", - element: this, - items: [this.processor] - }); - }, - - setValue: function (process) { - this.processor.setValue(process); - - } -}); -$.shortcut("bi.progress_bar_bar", BI.ProgressBarBar); \ No newline at end of file diff --git a/src/widget/base/toolbar/toolbar.progress.js b/src/widget/base/toolbar/toolbar.progress.js deleted file mode 100644 index 10d3904c11..0000000000 --- a/src/widget/base/toolbar/toolbar.progress.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBar - * @extends BI.BasicButton - */ -BI.ProgressBar = BI.inherit(BI.Single, { - _defaultConfig: function () { - return BI.extend(BI.ProgressBar.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar", - height: 24 - }) - }, - _init: function () { - BI.ProgressBar.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.bar = BI.createWidget({ - type: "bi.progress_bar_bar", - height: o.height - }); - this.label = BI.createWidget({ - type: "bi.label", - cls: "progress-bar-label", - width: 50, - height: o.height, - value: "0%" - }); - BI.createWidget({ - type: "bi.htape", - element: this, - items: [{ - el: this.bar - }, { - el: this.label, - width: 50 - }] - }) - }, - - setValue: function (process) { - if (process >= 100) { - process = 100; - this.label.element.addClass("success"); - } else { - this.label.element.removeClass("success"); - } - this.label.setValue(process + "%"); - this.bar.setValue(process); - } -}); -$.shortcut("bi.progress_bar", BI.ProgressBar); \ No newline at end of file diff --git a/src/widget/base/toolbar/toolbar.progress.processor.js b/src/widget/base/toolbar/toolbar.progress.processor.js deleted file mode 100644 index b520489cb6..0000000000 --- a/src/widget/base/toolbar/toolbar.progress.processor.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * guy - * 复选导航条 - * Created by GUY on 2015/12/24. - * @class BI.ProgressBarProcessor - * @extends BI.BasicButton - */ -BI.ProgressBarProcessor = BI.inherit(BI.Single, { - _defaultConfig: function () { - return BI.extend(BI.ProgressBarProcessor.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-progress-bar-processor", - height: 24 - }) - }, - _init: function () { - BI.ProgressBarProcessor.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.svg = BI.createWidget({ - type: "bi.svg", - width: 12, - height: 12 - }); - this.svg.circle(6, 6, 6).attr({fill: "#eaeaea", "stroke": ""}); - - this.dot = this.svg.circle(6, 6, 3).attr({fill: "#ffffff", "stroke": ""}).hide(); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.svg, - right: 7, - top: 6 - }] - }); - }, - - setValue: function (process) { - if (process >= 100) { - process = 100; - this.dot.show(); - this.element.addClass("success"); - } else { - this.dot.hide(); - this.element.removeClass("success"); - } - this.element.width(process + "%"); - } -}); -BI.ProgressBarProcessor.EVENT_CHANGE = "ProgressBarProcessor.EVENT_CHANGE"; -$.shortcut("bi.progress_bar_processor", BI.ProgressBarProcessor); \ No newline at end of file diff --git a/src/widget/date/calendar/combo.month.date.js b/src/widget/date/calendar/combo.month.date.js new file mode 100644 index 0000000000..546acab766 --- /dev/null +++ b/src/widget/date/calendar/combo.month.date.js @@ -0,0 +1,61 @@ +/** + * 日期控件中的月份下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.MonthDateCombo + * @extends BI.Trigger + */ +BI.MonthDateCombo = BI.inherit(BI.Trigger, { + _defaultConfig: function() { + return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-month-combo", + height: 25 + }); + }, + _init: function() { + BI.MonthDateCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.trigger = BI.createWidget({ + type: "bi.date_triangle_trigger" + }); + + this.popup = BI.createWidget({ + type: "bi.month_popup" + }); + + this.popup.on(BI.YearPopup.EVENT_CHANGE, function(){ + self.setValue(self.popup.getValue()); + }) + + + this.combo = BI.createWidget({ + type: "bi.combo", + offsetStyle: "center", + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + minWidth: 85, + stopPropagation: false, + el: this.popup + } + }) + this.combo.on(BI.Combo.EVENT_CHANGE, function(){ + self.combo.hideView(); + self.fireEvent(BI.MonthDateCombo.EVENT_CHANGE); + }); + }, + + setValue: function(v){ + this.trigger.setValue(v + 1); + this.popup.setValue(v); + }, + + getValue: function(){ + return this.popup.getValue(); + } +}); +BI.MonthDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut('bi.month_date_combo', BI.MonthDateCombo); \ No newline at end of file diff --git a/src/widget/date/calendar/combo.year.date.js b/src/widget/date/calendar/combo.year.date.js new file mode 100644 index 0000000000..80d11c1508 --- /dev/null +++ b/src/widget/date/calendar/combo.year.date.js @@ -0,0 +1,66 @@ +/** + * 年份下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.YearDateCombo + * @extends BI.Trigger + */ +BI.YearDateCombo = BI.inherit(BI.Trigger, { + _defaultConfig: function() { + return BI.extend( BI.YearDateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-year-combo", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + height: 25 + }); + }, + _init: function() { + BI.YearDateCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.trigger = BI.createWidget({ + type: "bi.date_triangle_trigger" + }); + + this.popup = BI.createWidget({ + type: "bi.year_popup", + min: o.min, + max: o.max + }); + + this.popup.on(BI.YearPopup.EVENT_CHANGE, function(){ + self.setValue(self.popup.getValue()); + self.combo.hideView(); + self.fireEvent(BI.YearDateCombo.EVENT_CHANGE); + }) + + + this.combo = BI.createWidget({ + type: "bi.combo", + offsetStyle: "center", + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + minWidth: 85, + stopPropagation: false, + el: this.popup + } + }) + this.combo.on(BI.Combo.EVENT_CHANGE, function(){ + self.fireEvent(BI.YearDateCombo.EVENT_CHANGE); + }) + }, + + setValue: function(v){ + this.trigger.setValue(v); + this.popup.setValue(v); + }, + + getValue: function(){ + return this.popup.getValue(); + } +}); +BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut('bi.year_date_combo', BI.YearDateCombo); \ No newline at end of file diff --git a/src/widget/date/calendar/picker.date.js b/src/widget/date/calendar/picker.date.js new file mode 100644 index 0000000000..0ed492429b --- /dev/null +++ b/src/widget/date/calendar/picker.date.js @@ -0,0 +1,127 @@ +/** + * Created by GUY on 2015/9/7. + * @class BI.DatePicker + * @extends BI.Widget + */ +BI.DatePicker = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.DatePicker.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-date-picker", + height: 25, + min: '1900-01-01', //最小日期 + max: '2099-12-31' //最大日期 + }) + }, + + _init: function () { + BI.DatePicker.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this._year = new Date().getFullYear(); + this._month = new Date().getMonth(); + this.left = BI.createWidget({ + type: "bi.icon_button", + cls: "pre-page-h-font", + width: 25, + height: 25 + }); + this.left.on(BI.IconButton.EVENT_CHANGE, function () { + if (self._month === 0) { + self.setValue({ + year: self.year.getValue() - 1, + month: 11 + }) + } else { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() - 1 + }) + } + self.fireEvent(BI.DatePicker.EVENT_CHANGE); + }); + + this.right = BI.createWidget({ + type: "bi.icon_button", + cls: "next-page-h-font", + width: 25, + height: 25 + }); + + this.right.on(BI.IconButton.EVENT_CHANGE, function () { + if (self._month === 11) { + self.setValue({ + year: self.year.getValue() + 1, + month: 0 + }) + } else { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + 1 + }) + } + self.fireEvent(BI.DatePicker.EVENT_CHANGE); + }); + + this.year = BI.createWidget({ + type: "bi.year_date_combo", + min: o.min, + max: o.max + }); + this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + }); + self.fireEvent(BI.DatePicker.EVENT_CHANGE); + }) + this.month = BI.createWidget({ + type: "bi.month_date_combo" + }); + this.month.on(BI.MonthDateCombo.EVENT_CHANGE, function () { + self.setValue({ + year: self.year.getValue(), + month: self.month.getValue() + }); + self.fireEvent(BI.DatePicker.EVENT_CHANGE); + }); + + BI.createWidget({ + type: "bi.htape", + element: this.element, + items: [{ + el: this.left, + width: 25 + }, { + type: "bi.center_adapt", + items: [{ + type: "bi.horizontal", + width: 100, + items: [this.year, this.month] + }] + }, { + el: this.right, + width: 25 + }] + }) + this.setValue({ + year: this._year, + month: this._month + }) + }, + + setValue: function (ob) { + this._year = ob.year; + this._month = ob.month; + this.year.setValue(ob.year); + this.month.setValue(ob.month); + }, + + getValue: function () { + return { + year: this.year.getValue(), + month: this.month.getValue() + } + } +}); +BI.DatePicker.EVENT_CHANGE = "EVENT_CHANGE" +$.shortcut("bi.date_picker", BI.DatePicker); \ No newline at end of file diff --git a/src/widget/date/calendar/popup.calendar.date.js b/src/widget/date/calendar/popup.calendar.date.js new file mode 100644 index 0000000000..a3a5c31696 --- /dev/null +++ b/src/widget/date/calendar/popup.calendar.date.js @@ -0,0 +1,96 @@ +/** + * Created by GUY on 2015/9/7. + * @class BI.DateCalendarPopup + * @extends BI.Widget + */ +BI.DateCalendarPopup = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.DateCalendarPopup.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: "bi-date-calendar-popup", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + selectedTime: null + }) + }, + + _createNav: function (v) { + var date = BI.Calendar.getDateJSONByPage(v); + var calendar = BI.createWidget({ + type: "bi.calendar", + logic: { + dynamic: true + }, + min: this.options.min, + max: this.options.max, + year: date.year, + month: date.month, + day: this.selectedTime.day + }); + return calendar; + }, + + _init: function () { + BI.DateCalendarPopup.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.today = new Date(); + this._year = this.today.getFullYear(); + this._month = this.today.getMonth(); + this._day = this.today.getDate(); + + this.selectedTime = o.selectedTime || { + year: this._year, + month: this._month, + day: this._day + }; + this.datePicker = BI.createWidget({ + type: "bi.date_picker", + min: o.min, + max: o.max + }); + + this.calendar = BI.createWidget({ + direction: "top", + element: this.element, + logic: { + dynamic: true + }, + type: "bi.navigation", + tab: this.datePicker, + cardCreator: BI.bind(this._createNav, this), + + afterCardCreated: function () { + + }, + + afterCardShow: function () { + this.setValue(self.selectedTime); + } + }); + + this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () { + self.selectedTime = self.datePicker.getValue(); + self.selectedTime.day = 1; + self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); + }); + + this.calendar.on(BI.Navigation.EVENT_CHANGE, function () { + self.selectedTime = self.calendar.getValue(); + self.setValue(self.selectedTime); + self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); + }); + }, + + setValue: function (timeOb) { + this.datePicker.setValue(timeOb); + this.calendar.setSelect(BI.Calendar.getPageByDateJSON(timeOb)); + this.calendar.setValue(timeOb); + this.selectedTime = timeOb; + }, + + getValue: function () { + return this.selectedTime; + } +}); +BI.DateCalendarPopup.EVENT_CHANGE = "EVENT_CHANGE"; +$.shortcut("bi.date_calendar_popup", BI.DateCalendarPopup); \ No newline at end of file diff --git a/src/widget/date/calendar/trigger.triangle.date.js b/src/widget/date/calendar/trigger.triangle.date.js new file mode 100644 index 0000000000..379280f215 --- /dev/null +++ b/src/widget/date/calendar/trigger.triangle.date.js @@ -0,0 +1,70 @@ +/** + * 日期控件中的年份或月份trigger + * + * Created by GUY on 2015/9/7. + * @class BI.DateTriangleTrigger + * @extends BI.Trigger + */ +BI.DateTriangleTrigger = BI.inherit(BI.Trigger, { + _const: { + height: 25, + iconWidth: 16, + iconHeight: 13 + }, + + _defaultConfig: function() { + return BI.extend( BI.DateTriangleTrigger.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-date-triangle-trigger pull-down-ha-font cursor-pointer", + height: 25 + }); + }, + _init: function() { + BI.DateTriangleTrigger.superclass._init.apply(this, arguments); + var o = this.options, c = this._const; + this.text = BI.createWidget({ + type: "bi.label", + cls: "list-item-text", + textAlign: "right", + text: o.text, + value: o.value, + height: c.height + }) + this.icon = BI.createWidget({ + type: "bi.icon", + width: c.iconWidth, + height: c.iconHeight + }); + + BI.createWidget({ + type: "bi.center_adapt", + element: this.element, + items: [{ + type: "bi.center_adapt", + width: 50, + height: c.height, + items: [this.text, this.icon] + }] + }) + }, + + setValue: function(v){ + this.text.setValue(v); + }, + + getValue: function(){ + return this.text.getValue(); + }, + + setText: function(v){ + this.text.setText(v); + }, + + getText: function(){ + return this.item.getText(); + }, + + getKey: function(){ + + } +}); +$.shortcut('bi.date_triangle_trigger', BI.DateTriangleTrigger); \ No newline at end of file diff --git a/src/widget/date/combo.date.js b/src/widget/date/combo.date.js new file mode 100644 index 0000000000..a7c326e8e4 --- /dev/null +++ b/src/widget/date/combo.date.js @@ -0,0 +1,59 @@ +/** + * 日期下拉框 + * + * Created by GUY on 2015/9/7. + * @class BI.DateCombo + * @extends BI.Widget + */ +BI.DateCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-date-combo", + height: 30 + }); + }, + _init: function () { + BI.DateCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + + this.trigger = BI.createWidget({ + type: "bi.date_trigger" + }); + + this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK, function () { + self.combo.toggle(); + }); + + this.popup = BI.createWidget({ + type: "bi.date_calendar_popup" + }); + + this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + }); + + this.combo = BI.createWidget({ + type: "bi.combo", + toggle: false, + element: this.element, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, + el: this.trigger, + popup: { + width: 270, + el: this.popup, + stopPropagation: false + } + }) + }, + + setValue: function (v) { + this.trigger.setValue(v); + this.popup.setValue(v); + }, + + getValue: function () { + return this.popup.getValue(); + } +}); +$.shortcut('bi.date_combo', BI.DateCombo); \ No newline at end of file diff --git a/src/widget/date/trigger.date.js b/src/widget/date/trigger.date.js new file mode 100644 index 0000000000..0332f662a7 --- /dev/null +++ b/src/widget/date/trigger.date.js @@ -0,0 +1,265 @@ +BI.DateTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4, + vgap: 2, + triggerWidth: 30, + watermark: BI.i18nText("BI-Unrestricted"), + yearLength: 4, + yearMonthLength: 7 + }, + + _defaultConfig: function () { + return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this, arguments), { + extraCls: "bi-date-trigger", + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + height: 25 + }); + }, + _init: function () { + BI.DateTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.editor = BI.createWidget({ + type: "bi.sign_editor", + height: o.height, + validationChecker: function (v) { + var date = v.match(/\d+/g); + self._autoAppend(v, date); + return self._dateCheck(v) && Date.checkLegal(v) && self._checkVoid({ + year: date[0], + month: date[1], + day: date[2] + }); + }, + quitChecker: function () { + return false; + }, + hgap: c.hgap, + vgap: c.vgap, + allowBlank: true, + watermark: c.watermark, + errorText: function () { + if (self.editor.isEditing()) { + return BI.i18nText("BI-Date_Trigger_Error_Text"); + } + return BI.i18nText("BI-Year_Trigger_Invalid_Text"); + } + }); + this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { + self.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN) + }); + this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.DateTrigger.EVENT_FOCUS); + }); + this.editor.on(BI.SignEditor.EVENT_VALID, function () { + self.fireEvent(BI.DateTrigger.EVENT_VALID); + }); + this.editor.on(BI.SignEditor.EVENT_ERROR, function () { + self.fireEvent(BI.DateTrigger.EVENT_ERROR); + }); + this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () { + var value = self.editor.getState(); + if (BI.isNotNull(value)) { + self.editor.setState(value); + } + + if (BI.isNotEmptyString(value)) { + var date = value.split("-"); + self.store_value = { + type: BICst.MULTI_DATE_CALENDAR, + value:{ + year: date[0] | 0, + month: date[1] - 1, + day: date[2] | 0 + } + }; + } + self.fireEvent(BI.DateTrigger.EVENT_CONFIRM); + }); + this.editor.on(BI.SignEditor.EVENT_SPACE, function () { + if (self.editor.isValid()) { + self.editor.blur(); + } + }); + this.editor.on(BI.SignEditor.EVENT_START, function () { + self.fireEvent(BI.DateTrigger.EVENT_START); + }); + this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { + self.fireEvent(BI.DateTrigger.EVENT_CHANGE); + }); + BI.createWidget({ + type: "bi.htape", + element: this.element, + items: [{ + el: BI.createWidget(), + width: 30 + }, { + el: this.editor + }] + }) + }, + _dateCheck: function (date) { + return Date.parseDateTime(date, "%Y-%x-%d").print("%Y-%x-%d") == date || Date.parseDateTime(date, "%Y-%X-%d").print("%Y-%X-%d") == date || Date.parseDateTime(date, "%Y-%x-%e").print("%Y-%x-%e") == date || Date.parseDateTime(date, "%Y-%X-%e").print("%Y-%X-%e") == date; + }, + _checkVoid: function (obj) { + return !Date.checkVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0]; + }, + _autoAppend: function (v, dateObj) { + var self = this; + var date = Date.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d"); + var yearCheck = function (v) { + return Date.parseDateTime(v, "%Y").print("%Y") == v && date >= self.options.min && date <= self.options.max; + }; + var monthCheck = function (v) { + return Date.parseDateTime(v, "%Y-%X").print("%Y-%X") == v && date >= self.options.min && date <= self.options.max; + }; + if (BI.isNotNull(dateObj) && Date.checkLegal(v)) { + switch (v.length) { + case this._const.yearLength: + if (yearCheck(v)) { + this.editor.setValue(v + "-"); + } + break; + case this._const.yearMonthLength: + if (monthCheck(v)) { + this.editor.setValue(v + "-"); + } + break; + } + } + }, + + setValue: function (v) { + var type, value, self = this; + var date = new Date(); + this.store_value = v; + if (BI.isNotNull(v)) { + type = v.type || BICst.MULTI_DATE_CALENDAR; value = v.value; + if(BI.isNull(value)){ + value = v; + } + } + var _setInnerValue = function (date, text) { + var dateStr = date.print("%Y-%x-%e"); + self.editor.setState(dateStr); + self.editor.setValue(dateStr); + self.setTitle(text + ":" + dateStr); + }; + switch (type) { + case BICst.MULTI_DATE_YEAR_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_PREV]; + date = new Date((date.getFullYear() - 1 * value), date.getMonth(), date.getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_AFTER]; + date = new Date((date.getFullYear() + 1 * value), date.getMonth(), date.getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_BEGIN]; + date = new Date(date.getFullYear(), 0, 1); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_YEAR_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_YEAR_END]; + date = new Date(date.getFullYear(), 11, 31); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_PREV]; + date = new Date().getBeforeMulQuarter(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_AFTER]; + date = new Date().getAfterMulQuarter(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_BEGIN]; + date = new Date().getQuarterStartDate(); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_QUARTER_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_QUARTER_END]; + date = new Date().getQuarterEndDate(); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_PREV]; + date = new Date().getBeforeMultiMonth(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_AFTER]; + date = new Date().getAfterMultiMonth(value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_BEGIN: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_BEGIN]; + date = new Date(date.getFullYear(), date.getMonth(), 1); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_MONTH_END: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_MONTH_END]; + date = new Date(date.getFullYear(), date.getMonth(), (date.getLastDateOfMonth()).getDate()); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_WEEK_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_WEEK_PREV]; + date = date.getOffsetDate(-7 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_WEEK_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_WEEK_AFTER]; + date = date.getOffsetDate(7 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_PREV: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_PREV]; + date = date.getOffsetDate(-1 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_AFTER: + var text = value + BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_AFTER]; + date = date.getOffsetDate(1 * value); + _setInnerValue(date, text); + break; + case BICst.MULTI_DATE_DAY_TODAY: + var text = BICst.MULTI_DATE_SEGMENT_NUM[BICst.MULTI_DATE_DAY_TODAY]; + date = new Date(); + _setInnerValue(date, text); + break; + default: + if (BI.isNull(value) || BI.isNull(value.day)) { + this.editor.setState(""); + this.editor.setValue(""); + this.setTitle(""); + } else { + var dateStr = value.year + "-" + (value.month + 1) + "-" + value.day; + this.editor.setState(dateStr); + this.editor.setValue(dateStr); + this.setTitle(dateStr); + } + break; + } + }, + + getKey: function () { + return this.editor.getValue(); + }, + getValue: function () { + return this.store_value; + } + +}); +BI.DateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.DateTrigger.EVENT_START = "EVENT_START"; +BI.DateTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.DateTrigger.EVENT_CHANGE = "EVENT_CHANGE"; +BI.DateTrigger.EVENT_VALID = "EVENT_VALID"; +BI.DateTrigger.EVENT_ERROR = "EVENT_ERROR"; +BI.DateTrigger.EVENT_TRIGGER_CLICK = "EVENT_TRIGGER_CLICK"; +BI.DateTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; +$.shortcut("bi.date_trigger", BI.DateTrigger); \ No newline at end of file diff --git a/src/widget/muiltitextlabel/group.item.text.label.js b/src/widget/muiltitextlabel/group.item.text.label.js deleted file mode 100644 index a9b9b92e5b..0000000000 --- a/src/widget/muiltitextlabel/group.item.text.label.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Created by fay on 2016/9/14. - */ -BI.TextLabelItemGroup = BI.inherit(BI.ButtonGroup, { - _defaultConfig: function () { - return BI.extend(BI.TextLabelItemGroup.superclass._defaultConfig.apply(this, arguments), { - chooseType: BI.Selection.Multi - }); - }, - - _init: function () { - BI.TextLabelItemGroup.superclass._init.apply(this, arguments); - this._checkBtnStyle(); - }, - - _btnsCreator: function (items) { - var self = this, args = Array.prototype.slice.call(arguments), o = this.options; - var buttons = this._createBtns(items); - args[0] = buttons; - - BI.each(this.behaviors, function (i, behavior) { - behavior.doBehavior.apply(behavior, args); - }); - BI.each(buttons, function (i, btn) { - btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { - if (type === BI.Events.CLICK) { - switch (o.chooseType) { - case BI.ButtonGroup.CHOOSE_TYPE_MULTI: - if (BI.isEmptyString(btn.getValue())) { - self.setValue([]); - } else { - self._checkBtnStyle(); - } - break; - case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: - self.setValue(btn.getValue()); - break; - case BI.ButtonGroup.CHOOSE_TYPE_NONE: - self.setValue([]); - break; - } - self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj); - } - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - }); - btn.on(BI.Events.DESTROY, function () { - BI.remove(self.buttons, btn); - }) - }); - - return buttons; - }, - - _checkBtnStyle: function () { - var self = this; - var flag = BI.isEmptyArray(this.getValue()); - BI.each(this.buttons, function (idx, btn) { - if (flag && BI.isEmptyString(btn.getValue())) { - btn.setSelected(true); - btn.doHighLight(); - } - if (!flag && BI.isEmptyString(btn.getValue())) { - btn.setSelected(false); - btn.unHighLight(); - } - if (btn.isSelected()) { - btn.doHighLight(); - } else { - btn.unHighLight(); - } - }); - }, - - setValue: function (v) { - BI.TextLabelItemGroup.superclass.setValue.apply(this, arguments); - this._checkBtnStyle(); - } -}); - -$.shortcut('bi.text_label_item_group', BI.TextLabelItemGroup); diff --git a/src/widget/muiltitextlabel/text.label.js b/src/widget/muiltitextlabel/text.label.js deleted file mode 100644 index aec51476c8..0000000000 --- a/src/widget/muiltitextlabel/text.label.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * 文本标签 - * - * Created by fay on 2016/9/11. - */ -BI.TextLabel = BI.inherit(BI.Widget, { - - _constant: { - MAX_COLUMN_SIZE: 40 - }, - - _defaultConfig: function () { - return BI.extend(BI.TextLabel.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-label", - title: "" - }) - }, - - _init: function () { - BI.TextLabel.superclass._init.apply(this, arguments); - var self = this, o = this.options; - var title = BI.createWidget({ - type: "bi.label", - text: o.title + ":" - }); - this.container = BI.createWidget({ - type: "bi.text_label_item_group", - items: BI.createItems(o.items.slice(0, this._constant.MAX_COLUMN_SIZE), { - type: "bi.text_button" - }), - layouts: [{ - type: "bi.horizontal", - - }] - }); - - BI.createWidget({ - type: "bi.horizontal", - items: [title, this.container], - element: this - }) - }, - - setValue: function (v) { - this.container.setValue(v); - }, - - getValue: function () { - return this.container.getValue(); - } -}); - -$.shortcut('bi.text_label', BI.TextLabel); \ No newline at end of file diff --git a/src/widget/multistringlist/multistringlist.js b/src/widget/multistringlist/multistringlist.js new file mode 100644 index 0000000000..22583d0266 --- /dev/null +++ b/src/widget/multistringlist/multistringlist.js @@ -0,0 +1,320 @@ +/** + * Created by zcf on 2016/12/14. + */ +BI.MultiStringList = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.MultiStringList.superclass._defaultConfig.apply(this, arguments), { + baseCls: 'bi-multi-string-list', + itemsCreator: BI.emptyFn, + valueFormatter: BI.emptyFn, + height: 25 + }) + }, + _init: function () { + BI.MultiStringList.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + + var assertShowValue = function () { + BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); + self.trigger.getSearcher().setState(self.storeValue); + self.trigger.getCounter().setButtonChecked(self.storeValue); + }; + this.storeValue = {}; + + + this.popup = BI.createWidget({ + type: "bi.multi_select_loader", + cls: "popup-multi-string-list", + itemsCreator: o.itemsCreator, + valueFormatter: o.valueFormatter, + onLoaded: o.onLoaded, + el: { + height: "" + } + }); + this.popup.on(BI.MultiSelectLoader.EVENT_CHANGE, function () { + self.storeValue = this.getValue(); + self._adjust(function () { + assertShowValue(); + self.fireEvent(BI.MultiStringList.EVENT_CHANGE); + }); + }); + + this.trigger = BI.createWidget({ + type: "bi.multi_select_trigger", + height: o.height, + adapter: this.popup, + masker: { + offset: { + left: 1, + top: 0, + right: 2, + bottom: 1 + } + }, + valueFormatter: o.valueFormatter, + itemsCreator: function (op, callback) { + o.itemsCreator(op, function (res) { + if (op.times === 1 && BI.isNotNull(op.keyword)) { + self.trigger.setValue(self.getValue()); + } + callback.apply(self, arguments); + }); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { + self._setStartValue(""); + this.getSearcher().setValue(self.storeValue); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () { + self._setStartValue(""); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { + if (this.getSearcher().hasMatched()) { + var keyword = this.getSearcher().getKeyword(); + self._join({ + type: BI.Selection.Multi, + value: [keyword] + }, function () { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + self._setStartValue(keyword); + assertShowValue(); + self.populate(); + self._setStartValue(""); + self.fireEvent(BI.MultiStringList.EVENT_CHANGE); + }) + } + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { + var last = BI.last(keywords); + keywords = BI.initial(keywords || []); + if (keywords.length > 0) { + self._joinKeywords(keywords, function () { + if (BI.isEndWithBlank(last)) { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + assertShowValue(); + self.popup.populate(); + self._setStartValue(""); + } else { + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + assertShowValue(); + } + }); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) { + if (obj instanceof BI.MultiSelectBar) { + self._joinAll(this.getValue(), function () { + assertShowValue(); + }); + } else { + self._join(this.getValue(), function () {//安徽省 北京 + assertShowValue(); + }); + } + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { + this.getCounter().setValue(self.storeValue); + }); + var div = BI.createWidget({ + type: "bi.layout" + }); + BI.createWidget({ + type: "bi.vtape", + element: this.element, + height: "100%", + width: "100%", + items: [{ + el: this.trigger, + height: 25 + }, { + el: div, + height: 2 + }, { + el: this.popup, + height: "fill" + }] + }); + }, + _defaultState: function () { + this.trigger.stopEditing(); + }, + + _assertValue: function (val) { + val || (val = {}); + val.type || (val.type = BI.Selection.Multi); + val.value || (val.value = []); + }, + + _makeMap: function (values) { + return BI.makeObject(values || []); + }, + + _joinKeywords: function (keywords, callback) { + var self = this, o = this.options; + this._assertValue(this.storeValue); + if (!this._allData) { + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_ALL_DATA + }, function (ob) { + self._allData = BI.pluck(ob.items, "value"); + digest(self._allData); + }) + } else { + digest(this._allData) + } + + function digest(items) { + var selectedMap = self._makeMap(items); + BI.each(keywords, function (i, val) { + if (BI.isNotNull(selectedMap[val])) { + self.storeValue.value[self.storeValue.type === BI.Selection.Multi ? "pushDistinct" : "remove"](val); + } + }); + self._adjust(callback); + } + }, + + _joinAll: function (res, callback) { + var self = this, o = this.options; + this._assertValue(res); + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_ALL_DATA, + keyword: this.trigger.getKey() + }, function (ob) { + var items = BI.pluck(ob.items, "value"); + if (self.storeValue.type === res.type) { + var change = false; + var map = self._makeMap(self.storeValue.value); + BI.each(items, function (i, v) { + if (BI.isNotNull(map[v])) { + change = true; + delete map[v]; + } + }); + change && (self.storeValue.value = BI.values(map)); + self._adjust(callback); + return; + } + var selectedMap = self._makeMap(self.storeValue.value); + var notSelectedMap = self._makeMap(res.value); + var newItems = []; + BI.each(items, function (i, item) { + if (BI.isNotNull(selectedMap[items[i]])) { + delete selectedMap[items[i]]; + } + if (BI.isNull(notSelectedMap[items[i]])) { + newItems.push(item); + } + }); + self.storeValue.value = newItems.concat(BI.values(selectedMap)); + self._adjust(callback); + }) + }, + + _adjust: function (callback) { + var self = this, o = this.options; + if (!this._count) { + o.itemsCreator({ + type: BI.MultiStringList.REQ_GET_DATA_LENGTH + }, function (res) { + self._count = res.count; + adjust(); + callback(); + }); + } else { + adjust(); + callback(); + } + function adjust() { + if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { + self.storeValue = { + type: BI.Selection.Multi, + value: [] + } + } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { + self.storeValue = { + type: BI.Selection.All, + value: [] + } + } + } + }, + + _join: function (res, callback) { + var self = this, o = this.options; + this._assertValue(res); + this._assertValue(this.storeValue); + if (this.storeValue.type === res.type) { + var map = this._makeMap(this.storeValue.value); + BI.each(res.value, function (i, v) { + if (!map[v]) { + self.storeValue.value.push(v); + map[v] = v; + } + }); + var change = false; + BI.each(res.assist, function (i, v) { + if (BI.isNotNull(map[v])) { + change = true; + delete map[v]; + } + }); + change && (this.storeValue.value = BI.values(map)); + self._adjust(callback); + return; + } + this._joinAll(res, callback); + }, + + _setStartValue: function (value) { + this._startValue = value; + this.popup.setStartValue(value); + }, + + // isAllSelected: function () { + // return this.popup.isAllSelected(); + // }, + + resize: function () { + this.trigger.getCounter().adjustView(); + this.trigger.getSearcher().adjustView(); + }, + + setEnable: function (v) { + this.trigger.setEnable(v); + this.popup.setEnable(v); + }, + + setValue: function (v) { + this.storeValue = v || {}; + this._assertValue(this.storeValue); + this.popup.setValue(this.storeValue); + this.trigger.setValue(this.storeValue); + }, + + getValue: function () { + return this.storeValue; + }, + + populate: function () { + this._count = null; + this._allData = null; + this.popup.populate.apply(this.popup, arguments); + this.trigger.populate.apply(this.trigger, arguments); + } +}); + +BI.extend(BI.MultiStringList, { + REQ_GET_DATA_LENGTH: 0, + REQ_GET_ALL_DATA: -1 +}); + +BI.MultiStringList.EVENT_CHANGE = "BI.MultiStringList.EVENT_CHANGE"; +$.shortcut("bi.multi_string_list", BI.MultiStringList); \ No newline at end of file diff --git a/src/widget/multitreelist/multitreelist.js b/src/widget/multitreelist/multitreelist.js new file mode 100644 index 0000000000..2fa3893e78 --- /dev/null +++ b/src/widget/multitreelist/multitreelist.js @@ -0,0 +1,178 @@ +/** + * Created by zcf on 2016/12/20. + */ +BI.MultiTreeList = BI.inherit(BI.Widget, { + constants: { + offset: { + left: 1, + top: 0, + right: 2, + bottom: 1 + } + }, + + _defaultConfig: function () { + return BI.extend(BI.MultiTreeList.superclass._defaultConfig.apply(this, arguments), { + baseCls: 'bi-multi-tree-combo', + itemsCreator: BI.emptyFn, + height: 25 + }); + }, + + _init: function () { + BI.MultiTreeList.superclass._init.apply(this, arguments); + + var self = this, o = this.options; + + var isInit = false; + var want2showCounter = false; + + this.popup = BI.createWidget({ + type: "bi.multi_tree_list_popup", + itemsCreator: o.itemsCreator + }); + + this.popup.on(BI.MultiStringListPopup.EVENT_AFTER_INIT, function () { + self.trigger.getCounter().adjustView(); + isInit = true; + if (want2showCounter === true) { + showCounter(); + } + }); + + this.trigger = BI.createWidget({ + type: "bi.multi_select_trigger", + height: o.height, + adapter: this.popup, + masker: { + offset: this.constants.offset + }, + searcher: { + type: "bi.multi_tree_searcher", + itemsCreator: o.itemsCreator + }, + switcher: { + el: { + type: "bi.multi_tree_check_selected_button" + }, + popup: { + type: "bi.multi_tree_check_pane", + itemsCreator: o.itemsCreator + } + } + }); + + this.storeValue = {value: {}}; + + var isSearching = function () { + return self.trigger.getSearcher().isSearching(); + }; + + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { + self.storeValue = {value: self.popup.getValue()}; + this.setValue(self.storeValue); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () { + self.storeValue = {value: this.getValue()}; + self.trigger.setValue(self.storeValue); + self.popup.setValue(self.storeValue); + BI.nextTick(function () { + self.trigger.populate(); + self.popup.populate(); + }); + }); + function showCounter() { + if (isSearching()) { + self.storeValue = {value: self.trigger.getValue()}; + } else { + self.storeValue = {value: self.popup.getValue()}; + } + self.trigger.setValue(self.storeValue); + } + + this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { + if (want2showCounter === false) { + want2showCounter = true; + } + if (isInit === true) { + want2showCounter = null; + showCounter(); + } + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () { + var val = { + type: BI.Selection.Multi, + value: this.getSearcher().hasChecked() ? {1: 1} : {} + }; + this.getSearcher().setState(val); + this.getCounter().setButtonChecked(val); + }); + + this.popup.on(BI.MultiStringListPopup.EVENT_CHANGE, function () { + showCounter(); + var val = { + type: BI.Selection.Multi, + value: this.hasChecked() ? {1: 1} : {} + }; + self.trigger.getSearcher().setState(val); + self.trigger.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeList.EVENT_CHANGE); + }); + + var div = BI.createWidget({ + type: "bi.layout" + }); + BI.createWidget({ + type: "bi.vtape", + element: this.element, + height: "100%", + width: "100%", + items: [{ + el: this.trigger, + height: 25 + }, { + el: div, + height: 2 + }, { + el: this.popup, + height: "fill" + }] + }) + }, + + _defaultState: function () { + this.trigger.stopEditing(); + }, + + resize: function () { + this.trigger.getCounter().adjustView(); + this.trigger.getSearcher().adjustView(); + }, + + setEnable: function (v) { + this.trigger.setEnable(v); + this.popup.setEnable(v); + }, + + setValue: function (v) { + this.storeValue.value = v || {}; + this.popup.setValue({ + value: v || {} + }); + this.trigger.setValue({ + value: v || {} + }); + }, + + getValue: function () { + return this.storeValue.value; + }, + + populate: function () { + this.trigger.populate.apply(this.trigger, arguments); + this.popup.populate.apply(this.popup, arguments); + } +}); +BI.MultiTreeList.EVENT_CHANGE = "MultiTreeList.EVENT_CHANGE"; +$.shortcut('bi.multi_tree_list', BI.MultiTreeList); \ No newline at end of file diff --git a/src/widget/multitreelist/multitreelist.popup.js b/src/widget/multitreelist/multitreelist.popup.js new file mode 100644 index 0000000000..4f31ea44b7 --- /dev/null +++ b/src/widget/multitreelist/multitreelist.popup.js @@ -0,0 +1,48 @@ +/** + * Created by zcf on 2016/12/21. + */ +BI.MultiStringListPopup=BI.inherit(BI.Widget,{ + _defaultConfig:function () { + return BI.extend(BI.MultiStringListPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-tree-list-popup", + itemsCreator: BI.emptyFn + }); + }, + _init:function () { + BI.MultiStringListPopup.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.popup = BI.createWidget({ + type: "bi.sync_tree", + height: 400, + element:this.element, + itemsCreator: o.itemsCreator + }); + this.popup.on(BI.TreeView.EVENT_AFTERINIT, function () { + self.fireEvent(BI.MultiStringListPopup.EVENT_AFTER_INIT) + }); + this.popup.on(BI.TreeView.EVENT_CHANGE, function () { + self.fireEvent(BI.MultiStringListPopup.EVENT_CHANGE) + }); + }, + + hasChecked: function () { + return this.popup.hasChecked(); + }, + + getValue: function () { + return this.popup.getValue(); + }, + + setValue: function (v) { + v || (v = {}); + this.popup.setValue(v.value); + }, + + populate: function (config) { + this.popup.stroke(config); + } + +}); +BI.MultiStringListPopup.EVENT_AFTER_INIT="BI.MultiStringListPopup.EVENT_AFTER_INIT"; +BI.MultiStringListPopup.EVENT_CHANGE="BI.MultiStringListPopup.EVENT_CHANGE"; +$.shortcut("bi.multi_tree_list_popup",BI.MultiStringListPopup); \ No newline at end of file