mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
5cee39ed70
commit
d3511f1f82
@ -1559,6 +1559,8 @@ module.CropActions = actions.Actions({
|
|||||||
|
|
||||||
// XXX not sure if we actually need this...
|
// XXX not sure if we actually need this...
|
||||||
cropFlatten: ['Crop/Flatten',
|
cropFlatten: ['Crop/Flatten',
|
||||||
|
{browseMode: function(){
|
||||||
|
return this.data.ribbon_order.length <= 1 && 'disabled' }},
|
||||||
function(list){ this.data.length > 0 && this.crop(list, true) }],
|
function(list){ this.data.length > 0 && this.crop(list, true) }],
|
||||||
cropRibbon: ['Crop/Crop ribbon',
|
cropRibbon: ['Crop/Crop ribbon',
|
||||||
function(ribbon, flatten){
|
function(ribbon, flatten){
|
||||||
|
|||||||
@ -213,7 +213,8 @@ var ImageMarkActions = actions.Actions({
|
|||||||
|| !('selected' in this.data.tags)){
|
|| !('selected' in this.data.tags)){
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
return this.data.tags['selected'].slice()
|
//return this.data.tags['selected'].slice()
|
||||||
|
return this.data.getImages(this.data.tags['selected'])
|
||||||
},
|
},
|
||||||
|
|
||||||
markedInRibbon: ['- Mark|Ribbon/',
|
markedInRibbon: ['- Mark|Ribbon/',
|
||||||
@ -232,6 +233,8 @@ var ImageMarkActions = actions.Actions({
|
|||||||
function(mode){ this.nextTagged('selected', mode) }],
|
function(mode){ this.nextTagged('selected', mode) }],
|
||||||
|
|
||||||
cropMarked: ['Mark|Crop/Crop $marked images',
|
cropMarked: ['Mark|Crop/Crop $marked images',
|
||||||
|
{browseMode: function(target){
|
||||||
|
return this.marked.length == 0 && 'disabled' }},
|
||||||
function(flatten){ this.cropTagged('selected', 'any', flatten) }],
|
function(flatten){ this.cropTagged('selected', 'any', flatten) }],
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -402,7 +405,8 @@ var ImageBookmarkActions = actions.Actions({
|
|||||||
|| !('bookmark' in this.data.tags)){
|
|| !('bookmark' in this.data.tags)){
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
return this.data.tags['bookmark'].slice()
|
//return this.data.tags['bookmark'].slice()
|
||||||
|
return this.data.getImages(this.data.tags['bookmark'])
|
||||||
},
|
},
|
||||||
|
|
||||||
prevBookmarked: ['Bookmark|Navigate/Previous bookmarked image',
|
prevBookmarked: ['Bookmark|Navigate/Previous bookmarked image',
|
||||||
@ -411,6 +415,8 @@ var ImageBookmarkActions = actions.Actions({
|
|||||||
function(mode){ this.nextTagged('bookmark', mode) }],
|
function(mode){ this.nextTagged('bookmark', mode) }],
|
||||||
|
|
||||||
cropBookmarked: ['Bookmark|Crop/Crop $bookmarked images',
|
cropBookmarked: ['Bookmark|Crop/Crop $bookmarked images',
|
||||||
|
{browseMode: function(target){
|
||||||
|
return this.bookmarked.length == 0 && 'disabled' }},
|
||||||
function(flatten){ this.cropTagged('bookmark', 'any', flatten) }],
|
function(flatten){ this.cropTagged('bookmark', 'any', flatten) }],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -1548,6 +1548,10 @@ var WidgetTestActions = actions.Actions({
|
|||||||
return function(){
|
return function(){
|
||||||
console.log('<<<', [].slice.call(arguments)) }}],
|
console.log('<<<', [].slice.call(arguments)) }}],
|
||||||
|
|
||||||
|
testActionDisabled: ['Test/$Disabled test action',
|
||||||
|
{browseMode: function(){ return 'disabled' }},
|
||||||
|
function(){}],
|
||||||
|
|
||||||
// Usage Examples:
|
// Usage Examples:
|
||||||
// .testDrawer() - show html in base drawer...
|
// .testDrawer() - show html in base drawer...
|
||||||
// .testDrawer('Header', 'paragraph') - show html with custom text...
|
// .testDrawer('Header', 'paragraph') - show html with custom text...
|
||||||
|
|||||||
@ -2982,6 +2982,7 @@ var BrowserPrototype = {
|
|||||||
// NOTE: 'none' will always return an empty jQuery object, to get
|
// NOTE: 'none' will always return an empty jQuery object, to get
|
||||||
// the selection state before deselecting use .select('!')
|
// the selection state before deselecting use .select('!')
|
||||||
// NOTE: this uses .filter(..) for string and regexp matching...
|
// NOTE: this uses .filter(..) for string and regexp matching...
|
||||||
|
// NOTE: this will not select disabled elements (XXX)
|
||||||
select: function(elem, filtering){
|
select: function(elem, filtering){
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
var pattern = '.list .item'
|
var pattern = '.list .item'
|
||||||
@ -3037,6 +3038,11 @@ var BrowserPrototype = {
|
|||||||
browser.find('.path .dir.cur').text(elem.find('.text').text())
|
browser.find('.path .dir.cur').text(elem.find('.text').text())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX not sure if this is correct...
|
||||||
|
if(elem.hasClass('disabled')){
|
||||||
|
return $()
|
||||||
|
}
|
||||||
|
|
||||||
// handle scroll position...
|
// handle scroll position...
|
||||||
var p = elem.scrollParent()
|
var p = elem.scrollParent()
|
||||||
var S = p.scrollTop()
|
var S = p.scrollTop()
|
||||||
@ -3455,7 +3461,8 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
// if text is empty, skip action...
|
// if text is empty, skip action...
|
||||||
if(txt != ''){
|
if(txt != ''){
|
||||||
path.push(elem.find('.text').text())
|
//path.push(elem.find('.text').text())
|
||||||
|
path.push(txt)
|
||||||
|
|
||||||
var res = this.open(path)
|
var res = this.open(path)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user