@voplus/morpho-document 6.1.55 → 6.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/DocumentListView/DocumentListView2.d.ts +1 -1
- package/es/components/DocumentListView/DocumentListView2.js +84 -37
- package/es/components/DocumentListView/DocumentListView2.js.map +1 -1
- package/es/components/DocumentListView/index.less +22 -4
- package/es/views/TreeView/index.js +3 -6
- package/es/views/TreeView/index.js.map +1 -1
- package/es/views/TreeView/index.less +3 -5
- package/package.json +1 -1
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import React, { useMemo, useState } from "react";
|
|
2
|
+
import { Button, message } from "antd";
|
|
3
|
+
import { State } from "./state";
|
|
4
|
+
import { toJS } from "mobx";
|
|
2
5
|
import { DocumentListContext, DocumentListContextState, } from "../../data/contexts/DocumentListContext";
|
|
6
|
+
import { useRenderOnChange } from "@voplus/morpho-ui";
|
|
7
|
+
import { useFrame } from "../ViewFrame/ViewFrameContext";
|
|
3
8
|
import { DocumentStatusFilter, FlagFilter } from "../../controls/filters";
|
|
4
|
-
import
|
|
5
|
-
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
|
6
|
-
import {
|
|
7
|
-
import React, { useMemo, useState } from "react";
|
|
9
|
+
import { useAutoUpdateListData, useDocumentListEffect, useDocumentStore, useSelectNodeInfoService, } from "@voplus/morpho-document-core";
|
|
10
|
+
import { BatchContext, BatchContextState, ListDataContext, useCreateListDataState, } from "@voplus/morpho-ui/es/data";
|
|
11
|
+
import { BatchHeader, DeleteButton, SelectButton, LockButton, UnLockButton, } from "@voplus/morpho-ui/es/components/layout/ListView/headers";
|
|
8
12
|
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
|
9
13
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
10
|
-
import {
|
|
11
|
-
import { toJS } from "mobx";
|
|
12
|
-
import { Button } from "antd";
|
|
14
|
+
import { faFolderTree, faTableColumns } from "@fortawesome/pro-solid-svg-icons";
|
|
13
15
|
import { useViewLayoutContext } from "@voplus/morpho-ui/es/components/layout/DefaultViewLayout/ViewLayoutContext";
|
|
14
16
|
import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
|
|
15
|
-
import
|
|
16
|
-
import DocumentItemFrame from "../../controls/DocumentItemFrame";
|
|
17
|
+
import AddDropDown2 from "@voplus/morpho-ui/es/components/layout/ListView/controls/AddDropDown2";
|
|
17
18
|
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
|
19
|
+
import DocumentItemFrame from "../../controls/DocumentItemFrame";
|
|
20
|
+
import DocumentItem from "../DocumentItem/DocumentItem2";
|
|
18
21
|
import NewDocumentForm from "../NewDocumentForm";
|
|
19
|
-
import
|
|
20
|
-
import { useFrame } from "../ViewFrame/ViewFrameContext";
|
|
21
|
-
import { useRenderOnChange } from "@voplus/morpho-ui";
|
|
22
|
+
import "./index.less";
|
|
22
23
|
const DocumentList = (props) => {
|
|
23
24
|
const frame = useFrame();
|
|
24
|
-
const
|
|
25
|
+
const store = useDocumentStore();
|
|
26
|
+
const select = useSelectNodeInfoService();
|
|
25
27
|
const asideContext = useAsideContentContext();
|
|
26
28
|
const layoutContext = useViewLayoutContext();
|
|
27
|
-
const state = useMemo(() => new State(
|
|
29
|
+
const state = useMemo(() => new State(store), [props.id]);
|
|
28
30
|
const [active, setActive] = useState(null);
|
|
29
|
-
/**当前要加载documentlist id*/
|
|
31
|
+
/**当前要加载documentlist DocumentItem id*/
|
|
30
32
|
state.onBreadCrumb(state.id ? state.id : props.id);
|
|
31
33
|
/**把store 传给子级 DocumentItem*/
|
|
32
34
|
const [listoptions] = useState(new DocumentListContextState());
|
|
@@ -47,6 +49,8 @@ const DocumentList = (props) => {
|
|
|
47
49
|
: [{ c: "ParentNodeId", o: "=", l: "And", v1: state.id }],
|
|
48
50
|
},
|
|
49
51
|
}, [props.id, frame === null || frame === void 0 ? void 0 : frame.Exclude]);
|
|
52
|
+
// 多选相关迁移
|
|
53
|
+
const batch = useMemo(() => new BatchContextState(list), [state.id]);
|
|
50
54
|
listoptions.onDriveClick = (id) => {
|
|
51
55
|
// runInAction(() => (state.id = id));
|
|
52
56
|
state.onBreadCrumb(id);
|
|
@@ -60,27 +64,70 @@ const DocumentList = (props) => {
|
|
|
60
64
|
useAutoUpdateListData(list, (d) => d.parentId === state.id);
|
|
61
65
|
return observe(() => (React.createElement(DocumentListContext.Provider, { value: listoptions },
|
|
62
66
|
React.createElement(ListDataContext.Provider, { value: list },
|
|
63
|
-
React.createElement(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
React.createElement(BatchContext.Provider, { value: batch },
|
|
68
|
+
React.createElement("div", { className: "document-list-view" },
|
|
69
|
+
props.headerVisible && (React.createElement(ListHeaderTool, { addAble: false, batchProps: {
|
|
70
|
+
visible: true,
|
|
71
|
+
props: {
|
|
72
|
+
buttons: [
|
|
73
|
+
React.createElement(DeleteButton, { execute: onDelete, key: "DeleteButton" }),
|
|
74
|
+
React.createElement(SelectButton, { execute: onMove, key: "SelectButton" }),
|
|
75
|
+
React.createElement(LockButton, { execute: onLock, key: "LockButton" }),
|
|
76
|
+
React.createElement(UnLockButton, { execute: onUnLock, key: "UnLockButton" }),
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
}, filterViewProps: {
|
|
80
|
+
columns: [React.createElement(DocumentStatusFilter, { key: "Status" }), React.createElement(FlagFilter, { key: "Flag" })],
|
|
81
|
+
}, sortOptions: [
|
|
82
|
+
{ label: "Name", value: "Name" },
|
|
83
|
+
{ label: "Create Date", value: "CreateDate" },
|
|
84
|
+
], rightExtra: () => (React.createElement(React.Fragment, null,
|
|
85
|
+
frame.documentType === "Board" && (React.createElement(Button, { className: "table-view-btn", onClick: () => frame.navigate(null, "default") },
|
|
86
|
+
React.createElement(FAIcon, { icon: faTableColumns }))),
|
|
87
|
+
React.createElement(Button, { className: "tree-view-btn", onClick: () => frame.navigate(null, "tree") },
|
|
88
|
+
React.createElement(FAIcon, { icon: faFolderTree })),
|
|
89
|
+
React.createElement(AddDropDown2, { btnType: "text", onClick: () => asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(NewDocumentForm, { parentId: state.id }), {
|
|
90
|
+
span: (layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.asideColSpan) ? layoutContext.asideColSpan : 12,
|
|
91
|
+
}) }))) })),
|
|
92
|
+
React.createElement(BatchHeader.CheckGroup, null,
|
|
93
|
+
React.createElement(ListView, { renderId: state.id, asideable: false, headerProps: { visible: false }, renderItem: ({ item }) => (React.createElement(DocumentItemFrame, { key: item.id, onClick: () => setActive(item.id), frameProps: {
|
|
94
|
+
active: active === item.id,
|
|
95
|
+
borderProps: { location: "right", color: "rgb(38, 135, 253)", size: "2px" },
|
|
96
|
+
} },
|
|
97
|
+
React.createElement(DocumentItem, { id: item.id, multiple: batch.multiple }))), onItemDriveClick: (id) => console.log(id, "---id") }))))))));
|
|
98
|
+
function onDelete(state) {
|
|
99
|
+
if (!state.ids.length) {
|
|
100
|
+
message.info("Nothing to choice");
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
store.delete(state.ids, { DeleteChilds: true });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** check move */
|
|
107
|
+
async function onMove(state) {
|
|
108
|
+
if (!state.ids.length) {
|
|
109
|
+
message.info("Nothing to choice");
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
// store.cut(state.ids);
|
|
113
|
+
select.add(state.ids);
|
|
114
|
+
}
|
|
115
|
+
async function onLock(state) {
|
|
116
|
+
if (!state.ids.length) {
|
|
117
|
+
message.info("Nothing to choice");
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
store.lock(state.ids, { error: "message" });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
async function onUnLock(state) {
|
|
124
|
+
if (!state.ids.length) {
|
|
125
|
+
message.info("Nothing to choice");
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
store.unlock(state.ids, { error: "message" });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
84
131
|
};
|
|
85
132
|
DocumentList.defaultProps = {
|
|
86
133
|
headerVisible: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentListView2.js","sourceRoot":"","sources":["../../../src/components/DocumentListView/DocumentListView2.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DocumentListView2.js","sourceRoot":"","sources":["../../../src/components/DocumentListView/DocumentListView2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACN,mBAAmB,EACnB,wBAAwB,GACxB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAEN,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,YAAY,EACZ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AC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACP,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC7C,CAAC;IACF,CAAC;IAED,KAAK,UAAU,QAAQ,CAAC,KAAwB;QAC/C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACP,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC/C,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,YAAY,CAAC,YAAY,GAAG;IAC3B,aAAa,EAAE,IAAI;CACnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -8,16 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
.list-view-header-tool {
|
|
10
10
|
padding: 20px;
|
|
11
|
+
|
|
11
12
|
.tree-view-btn,
|
|
12
13
|
.table-view-btn {
|
|
13
14
|
color: #868686;
|
|
14
15
|
border: 1px solid #868686;
|
|
15
16
|
padding: 0 10px;
|
|
16
17
|
margin-left: 10px;
|
|
17
|
-
|
|
18
|
-
color: @primary-color;
|
|
19
|
-
border-color: @primary-color;
|
|
20
|
-
}
|
|
18
|
+
|
|
21
19
|
&:hover {
|
|
22
20
|
color: @primary-color;
|
|
23
21
|
border-color: @primary-color;
|
|
@@ -25,6 +23,14 @@
|
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
|
|
26
|
+
.ant-checkbox-group {
|
|
27
|
+
height: 100%;
|
|
28
|
+
|
|
29
|
+
.list-view___gDzHz {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
28
34
|
.search-header-tool {
|
|
29
35
|
.ant-input-outlined {
|
|
30
36
|
// width: 310px;
|
|
@@ -35,23 +41,29 @@
|
|
|
35
41
|
.document-item .file-type svg {
|
|
36
42
|
color: @primary-color;
|
|
37
43
|
}
|
|
44
|
+
|
|
38
45
|
.document-table-list {
|
|
39
46
|
flex: 1;
|
|
40
47
|
height: 100%;
|
|
41
48
|
}
|
|
49
|
+
|
|
42
50
|
.table-list-card {
|
|
43
51
|
height: 100%;
|
|
44
52
|
border: none;
|
|
45
53
|
padding: 0 20px 20px;
|
|
54
|
+
|
|
46
55
|
.tools-card-content .ant-table {
|
|
47
56
|
padding: 0;
|
|
48
57
|
}
|
|
58
|
+
|
|
49
59
|
.tool-bar {
|
|
50
60
|
text-align: right;
|
|
51
61
|
}
|
|
62
|
+
|
|
52
63
|
.ant-table-cell {
|
|
53
64
|
color: #5d5d5d;
|
|
54
65
|
}
|
|
66
|
+
|
|
55
67
|
.doucment-table-item-subject {
|
|
56
68
|
font-weight: bold;
|
|
57
69
|
display: -webkit-box;
|
|
@@ -60,6 +72,7 @@
|
|
|
60
72
|
overflow: hidden;
|
|
61
73
|
text-overflow: ellipsis;
|
|
62
74
|
}
|
|
75
|
+
|
|
63
76
|
.doucment-table-item-by {
|
|
64
77
|
color: #5d5d5d;
|
|
65
78
|
font-weight: 500;
|
|
@@ -67,23 +80,28 @@
|
|
|
67
80
|
cursor: pointer;
|
|
68
81
|
display: flex;
|
|
69
82
|
align-items: center;
|
|
83
|
+
|
|
70
84
|
.ant-avatar {
|
|
71
85
|
width: 30px;
|
|
72
86
|
height: 30px;
|
|
73
87
|
border-radius: 2px;
|
|
74
88
|
}
|
|
89
|
+
|
|
75
90
|
.doucment-table-item-name {
|
|
76
91
|
flex: 1;
|
|
77
92
|
margin-left: 8px;
|
|
78
93
|
}
|
|
79
94
|
}
|
|
95
|
+
|
|
80
96
|
.doucment-table-status-label {
|
|
81
97
|
color: #5d5d5d;
|
|
82
98
|
background: #f0f0f0;
|
|
99
|
+
|
|
83
100
|
&.draft,
|
|
84
101
|
&.draft:hover {
|
|
85
102
|
background: #def3ff;
|
|
86
103
|
}
|
|
104
|
+
|
|
87
105
|
&.readonly,
|
|
88
106
|
&.readonly:hover {
|
|
89
107
|
background: #ffe8e8;
|
|
@@ -6,7 +6,7 @@ import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/head
|
|
|
6
6
|
import DocumentSortableTree from "../../components/DocumentSortableTree";
|
|
7
7
|
import { DocumentTypeFilter } from "../../controls/filters";
|
|
8
8
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
9
|
-
import { faList
|
|
9
|
+
import { faList } from "@fortawesome/pro-solid-svg-icons";
|
|
10
10
|
import DocumentPropertiesView from "@voplus/morpho-document-core/es/components/DocumentPropertiesView";
|
|
11
11
|
import { State } from "./state";
|
|
12
12
|
import { runInAction } from "mobx";
|
|
@@ -30,11 +30,8 @@ const TreeView = (props) => {
|
|
|
30
30
|
c.reset();
|
|
31
31
|
runInAction(() => (state.filterType = undefined));
|
|
32
32
|
},
|
|
33
|
-
}, rightExtra: () => (React.createElement(
|
|
34
|
-
React.createElement(
|
|
35
|
-
React.createElement(FAIcon, { icon: faList })),
|
|
36
|
-
React.createElement(Button, { className: "tree-view-btn current", onClick: () => frame.navigate(null, "tree") },
|
|
37
|
-
React.createElement(FAIcon, { icon: faFolderTree })))) }),
|
|
33
|
+
}, rightExtra: () => (React.createElement(Button, { className: "table-view-btn", onClick: () => frame.navigate(null, "explorer") },
|
|
34
|
+
React.createElement(FAIcon, { icon: faList }))) }),
|
|
38
35
|
React.createElement(DocumentSortableTree, { id: props.id, defaultRoot: true, exclude: frame === null || frame === void 0 ? void 0 : frame.Exclude, filterType: state.filterType, isAside: state.isAside, onDocumentSelected: onDocumentSelected })))));
|
|
39
36
|
function onDocumentSelected(id) {
|
|
40
37
|
asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(DocumentPropertiesView, { id: id }), { span: 12 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/views/TreeView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,cAAc,MAAM,wEAAwE,CAAC;AACpG,OAAO,oBAAoB,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/views/TreeView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,cAAc,MAAM,wEAAwE,CAAC;AACpG,OAAO,oBAAoB,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAgB,MAAM,kCAAkC,CAAC;AACxE,OAAO,sBAAsB,MAAM,mEAAmE,CAAC;AACvG,OAAO,EAAE,K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AG,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC;oBACnD,CAAC;iBACD,EACD,UAAU,EAAE,GAAG,EAAE,CAAC,CACjB,oBAAC,MAAM,IAAC,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;oBACjF,oBAAC,MAAM,IAAC,IAAI,EAAE,MAAM,GAAI,CAChB,CACT,GACA;YACF,oBAAC,oBAAoB,IACpB,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,WAAW,QACX,OAAO,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,EACvB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,kBAAkB,EAAE,kBAAkB,GACrC,CACG,CACoB,CAC3B,CAAC,CAAC;IAEH,SAAS,kBAAkB,CAAC,EAAU;QACrC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,oBAAC,sBAAsB,IAAC,EAAE,EAAE,EAAE,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1E,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -5,18 +5,16 @@
|
|
|
5
5
|
height: 100%;
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
|
+
|
|
8
9
|
.list-view-header-tool {
|
|
9
10
|
padding: 0 20px 20px;
|
|
10
|
-
|
|
11
|
+
|
|
11
12
|
.table-view-btn {
|
|
12
13
|
color: #868686;
|
|
13
14
|
border: 1px solid #868686;
|
|
14
15
|
padding: 0 10px;
|
|
15
16
|
margin-left: 10px;
|
|
16
|
-
|
|
17
|
-
color: @primary-color;
|
|
18
|
-
border-color: @primary-color;
|
|
19
|
-
}
|
|
17
|
+
|
|
20
18
|
&:hover {
|
|
21
19
|
color: @primary-color;
|
|
22
20
|
border-color: @primary-color;
|