update right click menu
This commit is contained in:
@@ -52,4 +52,8 @@
|
||||
//= require js/datatables/dataTables.keyTable.min.js
|
||||
//= require js/datatables/dataTables.responsive.min.js
|
||||
//= require js/datatables/responsive.bootstrap.min.js
|
||||
//= require js/datatables/dataTables.scroller.min.js
|
||||
//= require js/datatables/dataTables.scroller.min.js
|
||||
|
||||
// Right Click Event
|
||||
|
||||
//= require contextmenu
|
||||
15
app/assets/javascripts/contextmenu.js
Normal file
15
app/assets/javascripts/contextmenu.js
Normal file
@@ -0,0 +1,15 @@
|
||||
function CheckLocation(){
|
||||
$(document).mousedown(function(e){
|
||||
// context menu 가 아닌 다른 영역을 클릭한경우 판단
|
||||
if ($(e.target).parents(".contextmenu").length !== 0)
|
||||
return;
|
||||
$(".contextmenu").hide();
|
||||
$(document).unbind('mousedown');
|
||||
});
|
||||
}
|
||||
function ShowContextMenu(className){
|
||||
$("."+className).css({
|
||||
left:event.pageX+"px",
|
||||
top:event.pageY+"px"
|
||||
}).show();
|
||||
}
|
||||
@@ -14,7 +14,10 @@
|
||||
*
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//Right Click Event
|
||||
@import "contextmenu";
|
||||
|
||||
@import "bootstrap-sprockets";
|
||||
@import "bootstrap";
|
||||
|
||||
|
||||
37
app/assets/stylesheets/contextmenu.css
Normal file
37
app/assets/stylesheets/contextmenu.css
Normal file
@@ -0,0 +1,37 @@
|
||||
@CHARSET "EUC-KR";
|
||||
|
||||
.contextmenu {
|
||||
border:1px solid #565656;
|
||||
background-color:#f5f5f5;
|
||||
color:#333;
|
||||
font-size:11px;
|
||||
position:absolute;
|
||||
display:none;
|
||||
z-index:100;
|
||||
}
|
||||
.contextmenu ul {
|
||||
list-style:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.contextmenu ul li {
|
||||
line-height:13px;
|
||||
}
|
||||
|
||||
.menuitem {
|
||||
padding:5px 15px 5px 15px;
|
||||
white-space:nowrap;
|
||||
cursor:default;
|
||||
}
|
||||
|
||||
.hover {
|
||||
background-color:#0088cc;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.divider {
|
||||
margin:2px 3px;
|
||||
border-top:1px solid #ccc;
|
||||
border-bottom:1px solid #fff;
|
||||
}
|
||||
Reference in New Issue
Block a user