Property changes on: trunk/extensions/MetavidWiki/includes/MV_EditSequencePage.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 1 | + native |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/jquery/plugins/jquery.contextMenu.js |
— | — | @@ -1,211 +1,211 @@ |
2 | | -// jQuery Context Menu Plugin
|
3 | | -//
|
4 | | -// Version 1.00
|
5 | | -//
|
6 | | -// Cory S.N. LaViska
|
7 | | -// A Beautiful Site (http://abeautifulsite.net/)
|
8 | | -//
|
9 | | -// Visit http://abeautifulsite.net/notebook/80 for usage and more information
|
10 | | -//
|
11 | | -// Terms of Use
|
12 | | -//
|
13 | | -// This software is licensed under a Creative Commons License and is copyrighted
|
14 | | -// (C)2008 by Cory S.N. LaViska.
|
15 | | -//
|
16 | | -// For details, visit http://creativecommons.org/licenses/by/3.0/us/
|
17 | | -//
|
18 | | -(function($){
|
19 | | - $.extend({
|
20 | | -
|
21 | | - contextMenu: function(o, callback) {
|
22 | | - // Defaults
|
23 | | - if( o.menu == undefined ) return false;
|
24 | | - if( o.inSpeed == undefined ) o.inSpeed = 150;
|
25 | | - if( o.outSpeed == undefined ) o.outSpeed = 75;
|
26 | | - // 0 needs to be -1 for expected results (no fade)
|
27 | | - if( o.inSpeed == 0 ) o.inSpeed = -1;
|
28 | | - if( o.outSpeed == 0 ) o.outSpeed = -1;
|
29 | | - // Loop each context menu
|
30 | | - $(this).each( function() {
|
31 | | - var el = $(this);
|
32 | | - var offset = $(el).offset();
|
33 | | - // Add contextMenu class
|
34 | | - $('#' + o.menu).addClass('contextMenu');
|
35 | | - // Simulate a true right click
|
36 | | - $(this).mousedown( function(e) {
|
37 | | - var evt = e;
|
38 | | - $(this).mouseup( function(e) {
|
39 | | - var srcElement = $(this);
|
40 | | - $(this).unbind('mouseup');
|
41 | | - if( evt.button == 2 ) {
|
42 | | - // Hide context menus that may be showing
|
43 | | - $(".contextMenu").hide();
|
44 | | - // Get this context menu
|
45 | | - var menu = $('#' + o.menu);
|
46 | | -
|
47 | | - if( $(el).hasClass('disabled') ) return false;
|
48 | | -
|
49 | | - // Detect mouse position
|
50 | | - var d = {}, x, y;
|
51 | | - if( self.innerHeight ) {
|
52 | | - d.pageYOffset = self.pageYOffset;
|
53 | | - d.pageXOffset = self.pageXOffset;
|
54 | | - d.innerHeight = self.innerHeight;
|
55 | | - d.innerWidth = self.innerWidth;
|
56 | | - } else if( document.documentElement &&
|
57 | | - document.documentElement.clientHeight ) {
|
58 | | - d.pageYOffset = document.documentElement.scrollTop;
|
59 | | - d.pageXOffset = document.documentElement.scrollLeft;
|
60 | | - d.innerHeight = document.documentElement.clientHeight;
|
61 | | - d.innerWidth = document.documentElement.clientWidth;
|
62 | | - } else if( document.body ) {
|
63 | | - d.pageYOffset = document.body.scrollTop;
|
64 | | - d.pageXOffset = document.body.scrollLeft;
|
65 | | - d.innerHeight = document.body.clientHeight;
|
66 | | - d.innerWidth = document.body.clientWidth;
|
67 | | - }
|
68 | | - (e.pageX) ? x = e.pageX : x = e.clientX + d.scrollLeft;
|
69 | | - (e.pageY) ? y = e.pageY : x = e.clientY + d.scrollTop;
|
70 | | -
|
71 | | - // Show the menu
|
72 | | - $(document).unbind('click');
|
73 | | - $(menu).css({ top: y, left: x }).fadeIn(o.inSpeed);
|
74 | | - // Hover events
|
75 | | - $(menu).find('A').mouseover( function() {
|
76 | | - $(menu).find('LI.hover').removeClass('hover');
|
77 | | - $(this).parent().addClass('hover');
|
78 | | - }).mouseout( function() {
|
79 | | - $(menu).find('LI.hover').removeClass('hover');
|
80 | | - });
|
81 | | -
|
82 | | - // Keyboard
|
83 | | - $(document).keypress( function(e) {
|
84 | | - switch( e.keyCode ) {
|
85 | | - case 38: // up
|
86 | | - if( $(menu).find('LI.hover').size() == 0 ) {
|
87 | | - $(menu).find('LI:last').addClass('hover');
|
88 | | - } else {
|
89 | | - $(menu).find('LI.hover').removeClass('hover').prevAll('LI:not(.disabled)').eq(0).addClass('hover');
|
90 | | - if( $(menu).find('LI.hover').size() == 0 ) $(menu).find('LI:last').addClass('hover');
|
91 | | - }
|
92 | | - break;
|
93 | | - case 40: // down
|
94 | | - if( $(menu).find('LI.hover').size() == 0 ) {
|
95 | | - $(menu).find('LI:first').addClass('hover');
|
96 | | - } else {
|
97 | | - $(menu).find('LI.hover').removeClass('hover').nextAll('LI:not(.disabled)').eq(0).addClass('hover');
|
98 | | - if( $(menu).find('LI.hover').size() == 0 ) $(menu).find('LI:first').addClass('hover');
|
99 | | - }
|
100 | | - break;
|
101 | | - case 13: // enter
|
102 | | - $(menu).find('LI.hover A').trigger('click');
|
103 | | - break;
|
104 | | - case 27: // esc
|
105 | | - $(document).trigger('click');
|
106 | | - break
|
107 | | - }
|
108 | | - });
|
109 | | -
|
110 | | - // When items are selected
|
111 | | - $('#' + o.menu).find('A').unbind('click');
|
112 | | - $('#' + o.menu).find('LI:not(.disabled) A').click( function() {
|
113 | | - $(document).unbind('click').unbind('keypress');
|
114 | | - $(".contextMenu").hide();
|
115 | | - // Callback
|
116 | | - if( callback ) callback( $(this).attr('href').substr(1), $(srcElement), {x: x - offset.left, y: y - offset.top, docX: x, docY: y} );
|
117 | | - return false;
|
118 | | - });
|
119 | | -
|
120 | | - // Hide bindings
|
121 | | - setTimeout( function() { // Delay for Mozilla
|
122 | | - $(document).click( function() {
|
123 | | - $(document).unbind('click').unbind('keypress');
|
124 | | - $(menu).fadeOut(o.outSpeed);
|
125 | | - return false;
|
126 | | - });
|
127 | | - }, 0);
|
128 | | - }
|
129 | | - });
|
130 | | - });
|
131 | | -
|
132 | | - // Disable text selection
|
133 | | - if( $.browser.mozilla ) {
|
134 | | - $('#' + o.menu).each( function() { $(this).css({ 'MozUserSelect' : 'none' }); });
|
135 | | - } else if( $.browser.msie ) {
|
136 | | - $('#' + o.menu).each( function() { $(this).bind('selectstart.disableTextSelect', function() { return false; }); });
|
137 | | - } else {
|
138 | | - $('#' + o.menu).each(function() { $(this).bind('mousedown.disableTextSelect', function() { return false; }); });
|
139 | | - }
|
140 | | - // Disable browser context menu (requires both selectors to work in IE/Safari + FF/Chrome)
|
141 | | - $(el).add('UL.contextMenu').bind('contextmenu', function() { return false; });
|
142 | | -
|
143 | | - });
|
144 | | - return $(this);
|
145 | | - },
|
146 | | -
|
147 | | - // Disable context menu items on the fly
|
148 | | - disableContextMenuItems: function(o) {
|
149 | | - if( o == undefined ) {
|
150 | | - // Disable all
|
151 | | - $(this).find('LI').addClass('disabled');
|
152 | | - return( $(this) );
|
153 | | - }
|
154 | | - $(this).each( function() {
|
155 | | - if( o != undefined ) {
|
156 | | - var d = o.split(',');
|
157 | | - for( var i = 0; i < d.length; i++ ) {
|
158 | | - $(this).find('A[href="' + d[i] + '"]').parent().addClass('disabled');
|
159 | | -
|
160 | | - }
|
161 | | - }
|
162 | | - });
|
163 | | - return( $(this) );
|
164 | | - },
|
165 | | -
|
166 | | - // Enable context menu items on the fly
|
167 | | - enableContextMenuItems: function(o) {
|
168 | | - if( o == undefined ) {
|
169 | | - // Enable all
|
170 | | - $(this).find('LI.disabled').removeClass('disabled');
|
171 | | - return( $(this) );
|
172 | | - }
|
173 | | - $(this).each( function() {
|
174 | | - if( o != undefined ) {
|
175 | | - var d = o.split(',');
|
176 | | - for( var i = 0; i < d.length; i++ ) {
|
177 | | - $(this).find('A[href="' + d[i] + '"]').parent().removeClass('disabled');
|
178 | | -
|
179 | | - }
|
180 | | - }
|
181 | | - });
|
182 | | - return( $(this) );
|
183 | | - },
|
184 | | -
|
185 | | - // Disable context menu(s)
|
186 | | - disableContextMenu: function() {
|
187 | | - $(this).each( function() {
|
188 | | - $(this).addClass('disabled');
|
189 | | - });
|
190 | | - return( $(this) );
|
191 | | - },
|
192 | | -
|
193 | | - // Enable context menu(s)
|
194 | | - enableContextMenu: function() {
|
195 | | - $(this).each( function() {
|
196 | | - $(this).removeClass('disabled');
|
197 | | - });
|
198 | | - return( $(this) );
|
199 | | - },
|
200 | | -
|
201 | | - // Destroy context menu(s)
|
202 | | - destroyContextMenu: function() {
|
203 | | - // Destroy specified context menus
|
204 | | - $(this).each( function() {
|
205 | | - // Disable action
|
206 | | - $(this).unbind('mousedown').unbind('mouseup');
|
207 | | - });
|
208 | | - return( $(this) );
|
209 | | - }
|
210 | | -
|
211 | | - });
|
| 2 | +// jQuery Context Menu Plugin |
| 3 | +// |
| 4 | +// Version 1.00 |
| 5 | +// |
| 6 | +// Cory S.N. LaViska |
| 7 | +// A Beautiful Site (http://abeautifulsite.net/) |
| 8 | +// |
| 9 | +// Visit http://abeautifulsite.net/notebook/80 for usage and more information |
| 10 | +// |
| 11 | +// Terms of Use |
| 12 | +// |
| 13 | +// This software is licensed under a Creative Commons License and is copyrighted |
| 14 | +// (C)2008 by Cory S.N. LaViska. |
| 15 | +// |
| 16 | +// For details, visit http://creativecommons.org/licenses/by/3.0/us/ |
| 17 | +// |
| 18 | +(function($){ |
| 19 | + $.extend({ |
| 20 | + |
| 21 | + contextMenu: function(o, callback) { |
| 22 | + // Defaults |
| 23 | + if( o.menu == undefined ) return false; |
| 24 | + if( o.inSpeed == undefined ) o.inSpeed = 150; |
| 25 | + if( o.outSpeed == undefined ) o.outSpeed = 75; |
| 26 | + // 0 needs to be -1 for expected results (no fade) |
| 27 | + if( o.inSpeed == 0 ) o.inSpeed = -1; |
| 28 | + if( o.outSpeed == 0 ) o.outSpeed = -1; |
| 29 | + // Loop each context menu |
| 30 | + $(this).each( function() { |
| 31 | + var el = $(this); |
| 32 | + var offset = $(el).offset(); |
| 33 | + // Add contextMenu class |
| 34 | + $('#' + o.menu).addClass('contextMenu'); |
| 35 | + // Simulate a true right click |
| 36 | + $(this).mousedown( function(e) { |
| 37 | + var evt = e; |
| 38 | + $(this).mouseup( function(e) { |
| 39 | + var srcElement = $(this); |
| 40 | + $(this).unbind('mouseup'); |
| 41 | + if( evt.button == 2 ) { |
| 42 | + // Hide context menus that may be showing |
| 43 | + $(".contextMenu").hide(); |
| 44 | + // Get this context menu |
| 45 | + var menu = $('#' + o.menu); |
| 46 | + |
| 47 | + if( $(el).hasClass('disabled') ) return false; |
| 48 | + |
| 49 | + // Detect mouse position |
| 50 | + var d = {}, x, y; |
| 51 | + if( self.innerHeight ) { |
| 52 | + d.pageYOffset = self.pageYOffset; |
| 53 | + d.pageXOffset = self.pageXOffset; |
| 54 | + d.innerHeight = self.innerHeight; |
| 55 | + d.innerWidth = self.innerWidth; |
| 56 | + } else if( document.documentElement && |
| 57 | + document.documentElement.clientHeight ) { |
| 58 | + d.pageYOffset = document.documentElement.scrollTop; |
| 59 | + d.pageXOffset = document.documentElement.scrollLeft; |
| 60 | + d.innerHeight = document.documentElement.clientHeight; |
| 61 | + d.innerWidth = document.documentElement.clientWidth; |
| 62 | + } else if( document.body ) { |
| 63 | + d.pageYOffset = document.body.scrollTop; |
| 64 | + d.pageXOffset = document.body.scrollLeft; |
| 65 | + d.innerHeight = document.body.clientHeight; |
| 66 | + d.innerWidth = document.body.clientWidth; |
| 67 | + } |
| 68 | + (e.pageX) ? x = e.pageX : x = e.clientX + d.scrollLeft; |
| 69 | + (e.pageY) ? y = e.pageY : x = e.clientY + d.scrollTop; |
| 70 | + |
| 71 | + // Show the menu |
| 72 | + $(document).unbind('click'); |
| 73 | + $(menu).css({ top: y, left: x }).fadeIn(o.inSpeed); |
| 74 | + // Hover events |
| 75 | + $(menu).find('A').mouseover( function() { |
| 76 | + $(menu).find('LI.hover').removeClass('hover'); |
| 77 | + $(this).parent().addClass('hover'); |
| 78 | + }).mouseout( function() { |
| 79 | + $(menu).find('LI.hover').removeClass('hover'); |
| 80 | + }); |
| 81 | + |
| 82 | + // Keyboard |
| 83 | + $(document).keypress( function(e) { |
| 84 | + switch( e.keyCode ) { |
| 85 | + case 38: // up |
| 86 | + if( $(menu).find('LI.hover').size() == 0 ) { |
| 87 | + $(menu).find('LI:last').addClass('hover'); |
| 88 | + } else { |
| 89 | + $(menu).find('LI.hover').removeClass('hover').prevAll('LI:not(.disabled)').eq(0).addClass('hover'); |
| 90 | + if( $(menu).find('LI.hover').size() == 0 ) $(menu).find('LI:last').addClass('hover'); |
| 91 | + } |
| 92 | + break; |
| 93 | + case 40: // down |
| 94 | + if( $(menu).find('LI.hover').size() == 0 ) { |
| 95 | + $(menu).find('LI:first').addClass('hover'); |
| 96 | + } else { |
| 97 | + $(menu).find('LI.hover').removeClass('hover').nextAll('LI:not(.disabled)').eq(0).addClass('hover'); |
| 98 | + if( $(menu).find('LI.hover').size() == 0 ) $(menu).find('LI:first').addClass('hover'); |
| 99 | + } |
| 100 | + break; |
| 101 | + case 13: // enter |
| 102 | + $(menu).find('LI.hover A').trigger('click'); |
| 103 | + break; |
| 104 | + case 27: // esc |
| 105 | + $(document).trigger('click'); |
| 106 | + break |
| 107 | + } |
| 108 | + }); |
| 109 | + |
| 110 | + // When items are selected |
| 111 | + $('#' + o.menu).find('A').unbind('click'); |
| 112 | + $('#' + o.menu).find('LI:not(.disabled) A').click( function() { |
| 113 | + $(document).unbind('click').unbind('keypress'); |
| 114 | + $(".contextMenu").hide(); |
| 115 | + // Callback |
| 116 | + if( callback ) callback( $(this).attr('href').substr(1), $(srcElement), {x: x - offset.left, y: y - offset.top, docX: x, docY: y} ); |
| 117 | + return false; |
| 118 | + }); |
| 119 | + |
| 120 | + // Hide bindings |
| 121 | + setTimeout( function() { // Delay for Mozilla |
| 122 | + $(document).click( function() { |
| 123 | + $(document).unbind('click').unbind('keypress'); |
| 124 | + $(menu).fadeOut(o.outSpeed); |
| 125 | + return false; |
| 126 | + }); |
| 127 | + }, 0); |
| 128 | + } |
| 129 | + }); |
| 130 | + }); |
| 131 | + |
| 132 | + // Disable text selection |
| 133 | + if( $.browser.mozilla ) { |
| 134 | + $('#' + o.menu).each( function() { $(this).css({ 'MozUserSelect' : 'none' }); }); |
| 135 | + } else if( $.browser.msie ) { |
| 136 | + $('#' + o.menu).each( function() { $(this).bind('selectstart.disableTextSelect', function() { return false; }); }); |
| 137 | + } else { |
| 138 | + $('#' + o.menu).each(function() { $(this).bind('mousedown.disableTextSelect', function() { return false; }); }); |
| 139 | + } |
| 140 | + // Disable browser context menu (requires both selectors to work in IE/Safari + FF/Chrome) |
| 141 | + $(el).add('UL.contextMenu').bind('contextmenu', function() { return false; }); |
| 142 | + |
| 143 | + }); |
| 144 | + return $(this); |
| 145 | + }, |
| 146 | + |
| 147 | + // Disable context menu items on the fly |
| 148 | + disableContextMenuItems: function(o) { |
| 149 | + if( o == undefined ) { |
| 150 | + // Disable all |
| 151 | + $(this).find('LI').addClass('disabled'); |
| 152 | + return( $(this) ); |
| 153 | + } |
| 154 | + $(this).each( function() { |
| 155 | + if( o != undefined ) { |
| 156 | + var d = o.split(','); |
| 157 | + for( var i = 0; i < d.length; i++ ) { |
| 158 | + $(this).find('A[href="' + d[i] + '"]').parent().addClass('disabled'); |
| 159 | + |
| 160 | + } |
| 161 | + } |
| 162 | + }); |
| 163 | + return( $(this) ); |
| 164 | + }, |
| 165 | + |
| 166 | + // Enable context menu items on the fly |
| 167 | + enableContextMenuItems: function(o) { |
| 168 | + if( o == undefined ) { |
| 169 | + // Enable all |
| 170 | + $(this).find('LI.disabled').removeClass('disabled'); |
| 171 | + return( $(this) ); |
| 172 | + } |
| 173 | + $(this).each( function() { |
| 174 | + if( o != undefined ) { |
| 175 | + var d = o.split(','); |
| 176 | + for( var i = 0; i < d.length; i++ ) { |
| 177 | + $(this).find('A[href="' + d[i] + '"]').parent().removeClass('disabled'); |
| 178 | + |
| 179 | + } |
| 180 | + } |
| 181 | + }); |
| 182 | + return( $(this) ); |
| 183 | + }, |
| 184 | + |
| 185 | + // Disable context menu(s) |
| 186 | + disableContextMenu: function() { |
| 187 | + $(this).each( function() { |
| 188 | + $(this).addClass('disabled'); |
| 189 | + }); |
| 190 | + return( $(this) ); |
| 191 | + }, |
| 192 | + |
| 193 | + // Enable context menu(s) |
| 194 | + enableContextMenu: function() { |
| 195 | + $(this).each( function() { |
| 196 | + $(this).removeClass('disabled'); |
| 197 | + }); |
| 198 | + return( $(this) ); |
| 199 | + }, |
| 200 | + |
| 201 | + // Destroy context menu(s) |
| 202 | + destroyContextMenu: function() { |
| 203 | + // Destroy specified context menus |
| 204 | + $(this).each( function() { |
| 205 | + // Disable action |
| 206 | + $(this).unbind('mousedown').unbind('mouseup'); |
| 207 | + }); |
| 208 | + return( $(this) ); |
| 209 | + } |
| 210 | + |
| 211 | + }); |
212 | 212 | })(jQuery); |
\ No newline at end of file |
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/jquery/plugins/jquery.contextMenu.js |
___________________________________________________________________ |
Added: svn:eol-style |
213 | 213 | + native |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/jquery/plugins/jqueryContextMenu.html |
— | — | @@ -1,195 +1,195 @@ |
2 | | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
3 | | -
|
4 | | -<html xmlns="http://www.w3.org/1999/xhtml">
|
5 | | -
|
6 | | - <head>
|
7 | | - <title>jQuery Context Menu Plugin Demo</title>
|
8 | | - <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
9 | | -
|
10 | | - <style type="text/css">
|
11 | | - BODY,
|
12 | | - HTML {
|
13 | | - padding: 0px;
|
14 | | - margin: 0px;
|
15 | | - }
|
16 | | - BODY {
|
17 | | - font-family: Verdana, Arial, Helvetica, sans-serif;
|
18 | | - font-size: 11px;
|
19 | | - background: #FFF;
|
20 | | - padding: 15px;
|
21 | | - }
|
22 | | -
|
23 | | - H1 {
|
24 | | - font-family: Georgia, serif;
|
25 | | - font-size: 20px;
|
26 | | - font-weight: normal;
|
27 | | - }
|
28 | | -
|
29 | | - H2 {
|
30 | | - font-family: Georgia, serif;
|
31 | | - font-size: 16px;
|
32 | | - font-weight: normal;
|
33 | | - margin: 0px 0px 10px 0px;
|
34 | | - }
|
35 | | -
|
36 | | - #myDiv {
|
37 | | - width: 150px;
|
38 | | - border: solid 1px #2AA7DE;
|
39 | | - background: #6CC8EF;
|
40 | | - padding: 1em .5em;
|
41 | | - margin: 1em;
|
42 | | - float: left;
|
43 | | - }
|
44 | | -
|
45 | | - #myList {
|
46 | | - margin: 1em;
|
47 | | - float: left;
|
48 | | - }
|
49 | | -
|
50 | | - #myList UL {
|
51 | | - padding: 0px;
|
52 | | - margin: 0em 1em;
|
53 | | - }
|
54 | | -
|
55 | | - #myList LI {
|
56 | | - width: 100px;
|
57 | | - border: solid 1px #CCC;
|
58 | | - background: #EEE;
|
59 | | - padding: 2px 5px;
|
60 | | - margin: 2px 0px;
|
61 | | - list-style: none;
|
62 | | - }
|
63 | | -
|
64 | | - #options {
|
65 | | - clear: left;
|
66 | | - }
|
67 | | -
|
68 | | - #options INPUT {
|
69 | | - font-family: Verdana, Arial, Helvetica, sans-serif;
|
70 | | - font-size: 11px;
|
71 | | - width: 150px;
|
72 | | - }
|
73 | | -
|
74 | | - </style>
|
75 | | -
|
76 | | - <script src="http://abeautifulsite.net/includes/jquery.js" type="text/javascript"></script>
|
77 | | - <script src="jquery.contextMenu.js" type="text/javascript"></script>
|
78 | | - <link href="jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
79 | | -
|
80 | | - <script type="text/javascript">
|
81 | | -
|
82 | | - $(document).ready( function() {
|
83 | | -
|
84 | | - // Show menu when #myDiv is clicked
|
85 | | - $("#myDiv").contextMenu({
|
86 | | - menu: 'myMenu'
|
87 | | - },
|
88 | | - function(action, el, pos) {
|
89 | | - alert(
|
90 | | - 'Action: ' + action + '\n\n' +
|
91 | | - 'Element ID: ' + $(el).attr('id') + '\n\n' +
|
92 | | - 'X: ' + pos.x + ' Y: ' + pos.y + ' (relative to element)\n\n' +
|
93 | | - 'X: ' + pos.docX + ' Y: ' + pos.docY+ ' (relative to document)'
|
94 | | - );
|
95 | | - });
|
96 | | -
|
97 | | - // Show menu when a list item is clicked
|
98 | | - $("#myList UL LI").contextMenu({
|
99 | | - menu: 'myMenu'
|
100 | | - }, function(action, el, pos) {
|
101 | | - alert(
|
102 | | - 'Action: ' + action + '\n\n' +
|
103 | | - 'Element text: ' + $(el).text() + '\n\n' +
|
104 | | - 'X: ' + pos.x + ' Y: ' + pos.y + ' (relative to element)\n\n' +
|
105 | | - 'X: ' + pos.docX + ' Y: ' + pos.docY+ ' (relative to document)'
|
106 | | - );
|
107 | | - });
|
108 | | -
|
109 | | - // Disable menus
|
110 | | - $("#disableMenus").click( function() {
|
111 | | - $('#myDiv, #myList UL LI').disableContextMenu();
|
112 | | - $(this).attr('disabled', true);
|
113 | | - $("#enableMenus").attr('disabled', false);
|
114 | | - });
|
115 | | -
|
116 | | - // Enable menus
|
117 | | - $("#enableMenus").click( function() {
|
118 | | - $('#myDiv, #myList UL LI').enableContextMenu();
|
119 | | - $(this).attr('disabled', true);
|
120 | | - $("#disableMenus").attr('disabled', false);
|
121 | | - });
|
122 | | -
|
123 | | - // Disable cut/copy
|
124 | | - $("#disableItems").click( function() {
|
125 | | - $('#myMenu').disableContextMenuItems('#cut,#copy');
|
126 | | - $(this).attr('disabled', true);
|
127 | | - $("#enableItems").attr('disabled', false);
|
128 | | - });
|
129 | | -
|
130 | | - // Enable cut/copy
|
131 | | - $("#enableItems").click( function() {
|
132 | | - $('#myMenu').enableContextMenuItems('#cut,#copy');
|
133 | | - $(this).attr('disabled', true);
|
134 | | - $("#disableItems").attr('disabled', false);
|
135 | | - });
|
136 | | -
|
137 | | - });
|
138 | | -
|
139 | | - </script>
|
140 | | - </head>
|
141 | | -
|
142 | | - <body>
|
143 | | -
|
144 | | - <h1>jQuery Context Menu Plugin Demo</h1>
|
145 | | - <p>
|
146 | | - This plugin lets you add context menu functionality to your web applications.
|
147 | | - </p>
|
148 | | -
|
149 | | - <p>
|
150 | | - <strong>Tip:</strong> Try using your keyboard to make a selection.
|
151 | | - </p>
|
152 | | -
|
153 | | - <p>
|
154 | | - <a href="https://www.mediawiki.org/notebook.php?article=69">Back to the project page</a>
|
155 | | - </p>
|
156 | | -
|
157 | | - <h2>Demo</h2>
|
158 | | -
|
159 | | - <div id="myDiv">
|
160 | | - Right click for the standard context menu
|
161 | | - </div>
|
162 | | -
|
163 | | - <div id="myList">
|
164 | | - <ul>
|
165 | | - <li>Item 1</li>
|
166 | | - <li>Item 2</li>
|
167 | | - <li>Item 3</li>
|
168 | | - <li>Item 4</li>
|
169 | | - <li>Item 5</li>
|
170 | | - <li>Item 6</li>
|
171 | | - </ul>
|
172 | | - </div>
|
173 | | -
|
174 | | - <div id="options">
|
175 | | - <p>
|
176 | | - <input type="button" id="disableItems" value="Disable Cut/Copy" />
|
177 | | - <input type="button" id="enableItems" value="Enable Cut/Copy" disabled="disabled" />
|
178 | | - </p>
|
179 | | -
|
180 | | - <p>
|
181 | | - <input type="button" id="disableMenus" value="Disable Context Menus" />
|
182 | | - <input type="button" id="enableMenus" value="Enable Context Menus" disabled="disabled" />
|
183 | | - </p>
|
184 | | - </div>
|
185 | | -
|
186 | | - <ul id="myMenu" class="contextMenu">
|
187 | | - <li class="edit"><a href="#edit">Edit</a></li>
|
188 | | - <li class="cut separator"><a href="#cut">Cut</a></li>
|
189 | | - <li class="copy"><a href="#copy">Copy</a></li>
|
190 | | - <li class="paste"><a href="#paste">Paste</a></li>
|
191 | | - <li class="delete"><a href="#delete">Delete</a></li>
|
192 | | - <li class="quit separator"><a href="#quit">Quit</a></li>
|
193 | | - </ul>
|
194 | | -
|
195 | | - </body>
|
| 2 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | + |
| 4 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 5 | + |
| 6 | + <head> |
| 7 | + <title>jQuery Context Menu Plugin Demo</title> |
| 8 | + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
| 9 | + |
| 10 | + <style type="text/css"> |
| 11 | + BODY, |
| 12 | + HTML { |
| 13 | + padding: 0px; |
| 14 | + margin: 0px; |
| 15 | + } |
| 16 | + BODY { |
| 17 | + font-family: Verdana, Arial, Helvetica, sans-serif; |
| 18 | + font-size: 11px; |
| 19 | + background: #FFF; |
| 20 | + padding: 15px; |
| 21 | + } |
| 22 | + |
| 23 | + H1 { |
| 24 | + font-family: Georgia, serif; |
| 25 | + font-size: 20px; |
| 26 | + font-weight: normal; |
| 27 | + } |
| 28 | + |
| 29 | + H2 { |
| 30 | + font-family: Georgia, serif; |
| 31 | + font-size: 16px; |
| 32 | + font-weight: normal; |
| 33 | + margin: 0px 0px 10px 0px; |
| 34 | + } |
| 35 | + |
| 36 | + #myDiv { |
| 37 | + width: 150px; |
| 38 | + border: solid 1px #2AA7DE; |
| 39 | + background: #6CC8EF; |
| 40 | + padding: 1em .5em; |
| 41 | + margin: 1em; |
| 42 | + float: left; |
| 43 | + } |
| 44 | + |
| 45 | + #myList { |
| 46 | + margin: 1em; |
| 47 | + float: left; |
| 48 | + } |
| 49 | + |
| 50 | + #myList UL { |
| 51 | + padding: 0px; |
| 52 | + margin: 0em 1em; |
| 53 | + } |
| 54 | + |
| 55 | + #myList LI { |
| 56 | + width: 100px; |
| 57 | + border: solid 1px #CCC; |
| 58 | + background: #EEE; |
| 59 | + padding: 2px 5px; |
| 60 | + margin: 2px 0px; |
| 61 | + list-style: none; |
| 62 | + } |
| 63 | + |
| 64 | + #options { |
| 65 | + clear: left; |
| 66 | + } |
| 67 | + |
| 68 | + #options INPUT { |
| 69 | + font-family: Verdana, Arial, Helvetica, sans-serif; |
| 70 | + font-size: 11px; |
| 71 | + width: 150px; |
| 72 | + } |
| 73 | + |
| 74 | + </style> |
| 75 | + |
| 76 | + <script src="http://abeautifulsite.net/includes/jquery.js" type="text/javascript"></script> |
| 77 | + <script src="jquery.contextMenu.js" type="text/javascript"></script> |
| 78 | + <link href="jquery.contextMenu.css" rel="stylesheet" type="text/css" /> |
| 79 | + |
| 80 | + <script type="text/javascript"> |
| 81 | + |
| 82 | + $(document).ready( function() { |
| 83 | + |
| 84 | + // Show menu when #myDiv is clicked |
| 85 | + $("#myDiv").contextMenu({ |
| 86 | + menu: 'myMenu' |
| 87 | + }, |
| 88 | + function(action, el, pos) { |
| 89 | + alert( |
| 90 | + 'Action: ' + action + '\n\n' + |
| 91 | + 'Element ID: ' + $(el).attr('id') + '\n\n' + |
| 92 | + 'X: ' + pos.x + ' Y: ' + pos.y + ' (relative to element)\n\n' + |
| 93 | + 'X: ' + pos.docX + ' Y: ' + pos.docY+ ' (relative to document)' |
| 94 | + ); |
| 95 | + }); |
| 96 | + |
| 97 | + // Show menu when a list item is clicked |
| 98 | + $("#myList UL LI").contextMenu({ |
| 99 | + menu: 'myMenu' |
| 100 | + }, function(action, el, pos) { |
| 101 | + alert( |
| 102 | + 'Action: ' + action + '\n\n' + |
| 103 | + 'Element text: ' + $(el).text() + '\n\n' + |
| 104 | + 'X: ' + pos.x + ' Y: ' + pos.y + ' (relative to element)\n\n' + |
| 105 | + 'X: ' + pos.docX + ' Y: ' + pos.docY+ ' (relative to document)' |
| 106 | + ); |
| 107 | + }); |
| 108 | + |
| 109 | + // Disable menus |
| 110 | + $("#disableMenus").click( function() { |
| 111 | + $('#myDiv, #myList UL LI').disableContextMenu(); |
| 112 | + $(this).attr('disabled', true); |
| 113 | + $("#enableMenus").attr('disabled', false); |
| 114 | + }); |
| 115 | + |
| 116 | + // Enable menus |
| 117 | + $("#enableMenus").click( function() { |
| 118 | + $('#myDiv, #myList UL LI').enableContextMenu(); |
| 119 | + $(this).attr('disabled', true); |
| 120 | + $("#disableMenus").attr('disabled', false); |
| 121 | + }); |
| 122 | + |
| 123 | + // Disable cut/copy |
| 124 | + $("#disableItems").click( function() { |
| 125 | + $('#myMenu').disableContextMenuItems('#cut,#copy'); |
| 126 | + $(this).attr('disabled', true); |
| 127 | + $("#enableItems").attr('disabled', false); |
| 128 | + }); |
| 129 | + |
| 130 | + // Enable cut/copy |
| 131 | + $("#enableItems").click( function() { |
| 132 | + $('#myMenu').enableContextMenuItems('#cut,#copy'); |
| 133 | + $(this).attr('disabled', true); |
| 134 | + $("#disableItems").attr('disabled', false); |
| 135 | + }); |
| 136 | + |
| 137 | + }); |
| 138 | + |
| 139 | + </script> |
| 140 | + </head> |
| 141 | + |
| 142 | + <body> |
| 143 | + |
| 144 | + <h1>jQuery Context Menu Plugin Demo</h1> |
| 145 | + <p> |
| 146 | + This plugin lets you add context menu functionality to your web applications. |
| 147 | + </p> |
| 148 | + |
| 149 | + <p> |
| 150 | + <strong>Tip:</strong> Try using your keyboard to make a selection. |
| 151 | + </p> |
| 152 | + |
| 153 | + <p> |
| 154 | + <a href="https://www.mediawiki.org/notebook.php?article=69">Back to the project page</a> |
| 155 | + </p> |
| 156 | + |
| 157 | + <h2>Demo</h2> |
| 158 | + |
| 159 | + <div id="myDiv"> |
| 160 | + Right click for the standard context menu |
| 161 | + </div> |
| 162 | + |
| 163 | + <div id="myList"> |
| 164 | + <ul> |
| 165 | + <li>Item 1</li> |
| 166 | + <li>Item 2</li> |
| 167 | + <li>Item 3</li> |
| 168 | + <li>Item 4</li> |
| 169 | + <li>Item 5</li> |
| 170 | + <li>Item 6</li> |
| 171 | + </ul> |
| 172 | + </div> |
| 173 | + |
| 174 | + <div id="options"> |
| 175 | + <p> |
| 176 | + <input type="button" id="disableItems" value="Disable Cut/Copy" /> |
| 177 | + <input type="button" id="enableItems" value="Enable Cut/Copy" disabled="disabled" /> |
| 178 | + </p> |
| 179 | + |
| 180 | + <p> |
| 181 | + <input type="button" id="disableMenus" value="Disable Context Menus" /> |
| 182 | + <input type="button" id="enableMenus" value="Enable Context Menus" disabled="disabled" /> |
| 183 | + </p> |
| 184 | + </div> |
| 185 | + |
| 186 | + <ul id="myMenu" class="contextMenu"> |
| 187 | + <li class="edit"><a href="#edit">Edit</a></li> |
| 188 | + <li class="cut separator"><a href="#cut">Cut</a></li> |
| 189 | + <li class="copy"><a href="#copy">Copy</a></li> |
| 190 | + <li class="paste"><a href="#paste">Paste</a></li> |
| 191 | + <li class="delete"><a href="#delete">Delete</a></li> |
| 192 | + <li class="quit separator"><a href="#quit">Quit</a></li> |
| 193 | + </ul> |
| 194 | + |
| 195 | + </body> |
196 | 196 | </html> |
\ No newline at end of file |
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/jquery/plugins/jqueryContextMenu.html |
___________________________________________________________________ |
Added: svn:eol-style |
197 | 197 | + native |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/jquery/plugins/jquery.contextMenu.css |
— | — | @@ -1,62 +1,62 @@ |
2 | | -/* Generic context menu styles */
|
3 | | -.contextMenu {
|
4 | | - position: absolute;
|
5 | | - width: 120px;
|
6 | | - z-index: 99999;
|
7 | | - border: solid 1px #CCC;
|
8 | | - background: #EEE;
|
9 | | - padding: 0px;
|
10 | | - margin: 0px;
|
11 | | - display: none;
|
12 | | -}
|
13 | | -
|
14 | | -.contextMenu LI {
|
15 | | - list-style: none;
|
16 | | - padding: 0px;
|
17 | | - margin: 0px;
|
18 | | -}
|
19 | | -
|
20 | | -.contextMenu A {
|
21 | | - color: #333;
|
22 | | - text-decoration: none;
|
23 | | - display: block;
|
24 | | - line-height: 20px;
|
25 | | - height: 20px;
|
26 | | - background-position: 6px center;
|
27 | | - background-repeat: no-repeat;
|
28 | | - outline: none;
|
29 | | - padding: 1px 5px;
|
30 | | - padding-left: 28px;
|
31 | | -}
|
32 | | -
|
33 | | -.contextMenu LI.hover A {
|
34 | | - color: #FFF;
|
35 | | - background-color: #3399FF;
|
36 | | -}
|
37 | | -
|
38 | | -.contextMenu LI.disabled A {
|
39 | | - color: #AAA;
|
40 | | - cursor: default;
|
41 | | -}
|
42 | | -
|
43 | | -.contextMenu LI.hover.disabled A {
|
44 | | - background-color: transparent;
|
45 | | -}
|
46 | | -
|
47 | | -.contextMenu LI.separator {
|
48 | | - border-top: solid 1px #CCC;
|
49 | | -}
|
50 | | -
|
51 | | -/*
|
52 | | - Adding Icons
|
53 | | -
|
54 | | - You can add icons to the context menu by adding
|
55 | | - classes to the respective LI element(s)
|
56 | | -*/
|
57 | | -
|
58 | | -.contextMenu LI.edit A { background-image: url(images/page_white_edit.png); }
|
59 | | -.contextMenu LI.cut A { background-image: url(images/cut.png); }
|
60 | | -.contextMenu LI.copy A { background-image: url(images/page_white_copy.png); }
|
61 | | -.contextMenu LI.paste A { background-image: url(images/page_white_paste.png); }
|
62 | | -.contextMenu LI.delete A { background-image: url(images/page_white_delete.png); }
|
63 | | -.contextMenu LI.quit A { background-image: url(images/door.png); }
|
| 2 | +/* Generic context menu styles */ |
| 3 | +.contextMenu { |
| 4 | + position: absolute; |
| 5 | + width: 120px; |
| 6 | + z-index: 99999; |
| 7 | + border: solid 1px #CCC; |
| 8 | + background: #EEE; |
| 9 | + padding: 0px; |
| 10 | + margin: 0px; |
| 11 | + display: none; |
| 12 | +} |
| 13 | + |
| 14 | +.contextMenu LI { |
| 15 | + list-style: none; |
| 16 | + padding: 0px; |
| 17 | + margin: 0px; |
| 18 | +} |
| 19 | + |
| 20 | +.contextMenu A { |
| 21 | + color: #333; |
| 22 | + text-decoration: none; |
| 23 | + display: block; |
| 24 | + line-height: 20px; |
| 25 | + height: 20px; |
| 26 | + background-position: 6px center; |
| 27 | + background-repeat: no-repeat; |
| 28 | + outline: none; |
| 29 | + padding: 1px 5px; |
| 30 | + padding-left: 28px; |
| 31 | +} |
| 32 | + |
| 33 | +.contextMenu LI.hover A { |
| 34 | + color: #FFF; |
| 35 | + background-color: #3399FF; |
| 36 | +} |
| 37 | + |
| 38 | +.contextMenu LI.disabled A { |
| 39 | + color: #AAA; |
| 40 | + cursor: default; |
| 41 | +} |
| 42 | + |
| 43 | +.contextMenu LI.hover.disabled A { |
| 44 | + background-color: transparent; |
| 45 | +} |
| 46 | + |
| 47 | +.contextMenu LI.separator { |
| 48 | + border-top: solid 1px #CCC; |
| 49 | +} |
| 50 | + |
| 51 | +/* |
| 52 | + Adding Icons |
| 53 | + |
| 54 | + You can add icons to the context menu by adding |
| 55 | + classes to the respective LI element(s) |
| 56 | +*/ |
| 57 | + |
| 58 | +.contextMenu LI.edit A { background-image: url(images/page_white_edit.png); } |
| 59 | +.contextMenu LI.cut A { background-image: url(images/cut.png); } |
| 60 | +.contextMenu LI.copy A { background-image: url(images/page_white_copy.png); } |
| 61 | +.contextMenu LI.paste A { background-image: url(images/page_white_paste.png); } |
| 62 | +.contextMenu LI.delete A { background-image: url(images/page_white_delete.png); } |
| 63 | +.contextMenu LI.quit A { background-image: url(images/door.png); } |
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/jquery/plugins/jquery.contextMenu.css |
___________________________________________________________________ |
Added: svn:eol-style |
64 | 64 | + native |