updated docs + some fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-11-28 05:31:38 +03:00
parent de083ab8e2
commit 776ec87ebc
2 changed files with 22 additions and 8 deletions

View File

@ -139,12 +139,18 @@ function loadJSON(path){
// //
// //
// Events emitted on logger if passed: // Events emitted on logger if passed:
// - path <path> - path currently being processed
// - files-found <n> <files> - number and list of files found (XXX do we need this?)
// - queued <path> - json file path queued for loading // - queued <path> - json file path queued for loading
// - loaded <path> - done loading json file path // - files-queued <n> <queue> - number of files queued and index (XXX do we need this?)
// - loaded <keyword> <path> - done loading json file path
// - loaded <keyword>-diff <path>
// - done loading json file path (diff file)
// - index <path> <data> - done loading index at path // - index <path> <data> - done loading index at path
// - error <err> - an error occurred... // - error <err> - an error occurred...
// //
// //
//
// NOTE: this is fairly generic and does not care about the type of data // NOTE: this is fairly generic and does not care about the type of data
// or it's format as long as it's JSON and the file names comply // or it's format as long as it's JSON and the file names comply
// with the scheme above... // with the scheme above...
@ -271,7 +277,7 @@ function(path, logger){
} }
}) })
logger && logger.emit('files-queued', queued) logger && logger.emit('files-queued', queued, index)
// load... // load...
Promise Promise

View File

@ -2633,7 +2633,8 @@ var makeActionLister = function(list, filter, pre_order){
} }
}) })
var o = overlay.Overlay($('body'), // XXX get the correct parent...
var o = overlay.Overlay(that.ribbons.viewer,
list(null, actions, path) list(null, actions, path)
.open(function(evt){ .open(function(evt){
if(!closingPrevented){ if(!closingPrevented){
@ -2695,7 +2696,7 @@ var ActionTreeActions = actions.Actions({
make('c/') make('c/')
} }
var o = overlay.Overlay($('body'), var o = overlay.Overlay(this.ribbons.viewer,
browse.makePathList(null, { browse.makePathList(null, {
'a/*': list, 'a/*': list,
'b/*': list, 'b/*': list,
@ -2737,7 +2738,7 @@ var ActionTreeActions = actions.Actions({
var that = this var that = this
var o = overlay.Overlay($('body'), var o = overlay.Overlay(this.ribbons.viewer,
require('./lib/widget/browse-walk').makeWalk(null, '/', false, false) require('./lib/widget/browse-walk').makeWalk(null, '/', false, false)
.open(function(evt, path){ .open(function(evt, path){
@ -2757,8 +2758,10 @@ var ActionTreeActions = actions.Actions({
&& parent.focus() && parent.focus()
}) })
}], }],
// XXX use this.ribbons.viewer as base...
drawerTest: ['Interface|Test/Drawer widget test', drawerTest: ['Interface|Test/Drawer widget test',
function(){ function(){
// XXX use this.ribbons.viewer as base...
drawer.Drawer($('body'), drawer.Drawer($('body'),
$('<div>') $('<div>')
.css({ .css({
@ -2777,6 +2780,9 @@ var ActionTreeActions = actions.Actions({
// XXX needs cleanup... // XXX needs cleanup...
// XXX need a clean constructor strategy -- this and ui.js are a mess... // XXX need a clean constructor strategy -- this and ui.js are a mess...
// XXX use this.ribbons.viewer as base...
// XXX BUG: when using this.ribbons.viewer as base some actions leak
// between the two viewers...
showTaggedInDrawer: ['Interface|Test/Show tagged in drawer', showTaggedInDrawer: ['Interface|Test/Show tagged in drawer',
function(tag){ function(tag){
tag = tag || 'bookmark' tag = tag || 'bookmark'
@ -2788,6 +2794,8 @@ var ActionTreeActions = actions.Actions({
height: H, height: H,
background: 'black', background: 'black',
}) })
// XXX use this.ribbons.viewer as base...
// XXX when using viewer zoom and other stuff get leaked...
var widget = drawer.Drawer($('body'), var widget = drawer.Drawer($('body'),
$('<div>') $('<div>')
.css({ .css({