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