mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
some cleanup and refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
655c58be91
commit
239d4a86d7
@ -365,6 +365,8 @@ stretching in width... */
|
||||
border: solid 5px red;
|
||||
background: none;
|
||||
z-index: 100;
|
||||
/* pass events through... (do we need IE10-?) */
|
||||
pointer-events: none;
|
||||
}
|
||||
.marker {
|
||||
width: 50px;
|
||||
|
||||
@ -519,6 +519,9 @@ stretching in width... */
|
||||
border: solid 5px red;
|
||||
background: none;
|
||||
z-index: 100;
|
||||
|
||||
/* pass events through... (do we need IE10-?) */
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.marker {
|
||||
|
||||
@ -107,6 +107,7 @@ core.ImageGridFeatures.Feature('viewer-testing', [
|
||||
'ui-url-history',
|
||||
|
||||
'ui-browse-actions',
|
||||
'ui-context-action-menu',
|
||||
'ui-widget-test',
|
||||
|
||||
// ui control...
|
||||
|
||||
@ -347,6 +347,9 @@ module.StatusBar = core.ImageGridFeatures.Feature({
|
||||
tag: 'ui-status-bar',
|
||||
depends: [
|
||||
'ui',
|
||||
|
||||
// XXX this is here to enable context menu...
|
||||
'ui-browse-actions',
|
||||
],
|
||||
|
||||
actions: StatusBarActions,
|
||||
|
||||
@ -179,6 +179,54 @@ module.BrowseActions = core.ImageGridFeatures.Feature({
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
var ContextActionMenu =
|
||||
module.ContextActionMenu = core.ImageGridFeatures.Feature({
|
||||
title: '',
|
||||
doc: '',
|
||||
|
||||
tag: 'ui-context-action-menu',
|
||||
depends: [
|
||||
'ui-browse-actions',
|
||||
],
|
||||
|
||||
handlers: [
|
||||
['updateImage',
|
||||
function(){
|
||||
var that = this
|
||||
var img = this.ribbons.getImage(gid)
|
||||
|
||||
!img.data('context-menu')
|
||||
&& img
|
||||
.data('context-menu', true)
|
||||
.on('contextmenu', function(){
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
that.browseActions('/Image/')
|
||||
})
|
||||
}],
|
||||
['load',
|
||||
function(){
|
||||
var that = this
|
||||
var viewer = this.ribbons.viewer
|
||||
|
||||
!viewer.data('context-menu')
|
||||
&& viewer
|
||||
.data('context-menu', true)
|
||||
.on('contextmenu', function(){
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
that.browseActions()
|
||||
})
|
||||
}],
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// XXX make this not applicable to production...
|
||||
|
||||
|
||||
@ -23,6 +23,10 @@ var OverlayClassPrototype = {
|
||||
.on(options.nonPropagatedEvents.join(' '), function(){
|
||||
event.stopPropagation()
|
||||
})
|
||||
.on('contextmenu', function(){
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
})
|
||||
.append($('<div>')
|
||||
.addClass('content')
|
||||
.click(function(){
|
||||
@ -31,7 +35,6 @@ var OverlayClassPrototype = {
|
||||
.on('contextmenu', function(){
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
return false
|
||||
})
|
||||
.append(client))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user