1 | /*! |
---|
2 | * jQuery contextMenu - Plugin for simple contextMenu handling |
---|
3 | * |
---|
4 | * Version: git-master |
---|
5 | * |
---|
6 | * Authors: Rodney Rehm, Addy Osmani (patches for FF) |
---|
7 | * Web: http://medialize.github.com/jQuery-contextMenu/ |
---|
8 | * |
---|
9 | * Licensed under |
---|
10 | * MIT License http://www.opensource.org/licenses/mit-license |
---|
11 | * GPL v3 http://opensource.org/licenses/GPL-3.0 |
---|
12 | * |
---|
13 | */ |
---|
14 | |
---|
15 | .context-menu-list { |
---|
16 | margin:0; |
---|
17 | padding:0; |
---|
18 | min-width: 120px; |
---|
19 | max-width: 250px; |
---|
20 | display: inline-block; |
---|
21 | position: absolute; |
---|
22 | list-style-type: none; |
---|
23 | |
---|
24 | border: 1px solid #DDD; |
---|
25 | background: #EEE; |
---|
26 | |
---|
27 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); |
---|
28 | -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); |
---|
29 | -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); |
---|
30 | -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); |
---|
31 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); |
---|
32 | |
---|
33 | font-family: Verdana, Arial, Helvetica, sans-serif; |
---|
34 | font-size: 11px; |
---|
35 | } |
---|
36 | |
---|
37 | .context-menu-item { |
---|
38 | padding: 2px 2px 2px 24px; |
---|
39 | background-color: #EEE; |
---|
40 | position: relative; |
---|
41 | -webkit-user-select: none; |
---|
42 | -moz-user-select: -moz-none; |
---|
43 | -ms-user-select: none; |
---|
44 | user-select: none; |
---|
45 | } |
---|
46 | |
---|
47 | .context-menu-separator { |
---|
48 | padding-bottom:0; |
---|
49 | border-bottom: 1px solid #DDD; |
---|
50 | } |
---|
51 | |
---|
52 | .context-menu-item > label > input, |
---|
53 | .context-menu-item > label > textarea { |
---|
54 | -webkit-user-select: text; |
---|
55 | -moz-user-select: text; |
---|
56 | -ms-user-select: text; |
---|
57 | user-select: text; |
---|
58 | } |
---|
59 | |
---|
60 | .context-menu-item.hover { |
---|
61 | cursor: pointer; |
---|
62 | background-color: #39F; |
---|
63 | } |
---|
64 | |
---|
65 | .context-menu-item.disabled { |
---|
66 | color: #666; |
---|
67 | } |
---|
68 | |
---|
69 | .context-menu-input.hover, |
---|
70 | .context-menu-item.disabled.hover { |
---|
71 | cursor: default; |
---|
72 | background-color: #EEE; |
---|
73 | } |
---|
74 | |
---|
75 | .context-menu-submenu:after { |
---|
76 | content: ">"; |
---|
77 | color: #666; |
---|
78 | position: absolute; |
---|
79 | top: 0; |
---|
80 | right: 3px; |
---|
81 | z-index: 1; |
---|
82 | } |
---|
83 | |
---|
84 | /* icons |
---|
85 | #protip: |
---|
86 | In case you want to use sprites for icons (which I would suggest you do) have a look at |
---|
87 | http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement |
---|
88 | .context-menu-item.icon:before {} |
---|
89 | */ |
---|
90 | .context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; } |
---|
91 | .context-menu-item.icon-edit { background-image: url(images/page_white_edit.png); } |
---|
92 | .context-menu-item.icon-cut { background-image: url(images/cut.png); } |
---|
93 | .context-menu-item.icon-copy { background-image: url(images/page_white_copy.png); } |
---|
94 | .context-menu-item.icon-paste { background-image: url(images/page_white_paste.png); } |
---|
95 | .context-menu-item.icon-delete { background-image: url(images/page_white_delete.png); } |
---|
96 | .context-menu-item.icon-add { background-image: url(images/page_white_add.png); } |
---|
97 | .context-menu-item.icon-quit { background-image: url(images/door.png); } |
---|
98 | |
---|
99 | /* vertically align inside labels */ |
---|
100 | .context-menu-input > label > * { vertical-align: top; } |
---|
101 | |
---|
102 | /* position checkboxes and radios as icons */ |
---|
103 | .context-menu-input > label > input[type="checkbox"], |
---|
104 | .context-menu-input > label > input[type="radio"] { |
---|
105 | margin-left: -17px; |
---|
106 | } |
---|
107 | .context-menu-input > label > span { |
---|
108 | margin-left: 5px; |
---|
109 | } |
---|
110 | |
---|
111 | .context-menu-input > label, |
---|
112 | .context-menu-input > label > input[type="text"], |
---|
113 | .context-menu-input > label > textarea, |
---|
114 | .context-menu-input > label > select { |
---|
115 | display: block; |
---|
116 | width: 100%; |
---|
117 | |
---|
118 | -webkit-box-sizing: border-box; |
---|
119 | -moz-box-sizing: border-box; |
---|
120 | -ms-box-sizing: border-box; |
---|
121 | -o-box-sizing: border-box; |
---|
122 | box-sizing: border-box; |
---|
123 | } |
---|
124 | |
---|
125 | .context-menu-input > label > textarea { |
---|
126 | height: 100px; |
---|
127 | } |
---|
128 | .context-menu-item > .context-menu-list { |
---|
129 | display: none; |
---|
130 | /* re-positioned by js */ |
---|
131 | right: -5px; |
---|
132 | top: 5px; |
---|
133 | } |
---|
134 | |
---|
135 | .context-menu-item.hover > .context-menu-list { |
---|
136 | display: block; |
---|
137 | } |
---|
138 | |
---|
139 | .context-menu-accesskey { |
---|
140 | text-decoration: underline; |
---|
141 | } |
---|