From e956a496806a9703985a1220effa39dc76140f64 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Thu, 18 Oct 2012 23:08:48 +0200 Subject: [PATCH] More changes to enable smart browsing. --- src/_h5ai/client/js/inc/core/entry.js | 5 --- src/_h5ai/client/js/inc/core/location.js | 2 +- src/_h5ai/client/js/inc/ext/crumb.js | 7 +---- src/_h5ai/client/js/inc/ext/custom.js | 2 -- src/_h5ai/client/js/inc/ext/download.js | 4 +-- src/_h5ai/client/js/inc/ext/dropbox.js | 4 +-- src/_h5ai/client/js/inc/ext/preview-img.js | 14 ++++++--- src/_h5ai/client/js/inc/ext/preview-txt.js | 14 ++++++--- src/_h5ai/client/js/inc/ext/statusbar.js | 21 +++++++------ src/_h5ai/client/js/inc/ext/thumbnails.js | 20 +++++++----- src/_h5ai/client/js/inc/ext/title.js | 21 ++++++++----- src/_h5ai/client/js/inc/ext/tree.js | 36 +++++++++++++--------- src/_h5ai/client/js/inc/main.js | 4 +-- src/_h5ai/client/js/inc/view/items.js | 5 +-- 14 files changed, 85 insertions(+), 74 deletions(-) delete mode 100644 src/_h5ai/client/js/inc/core/entry.js diff --git a/src/_h5ai/client/js/inc/core/entry.js b/src/_h5ai/client/js/inc/core/entry.js deleted file mode 100644 index 03e374a4..00000000 --- a/src/_h5ai/client/js/inc/core/entry.js +++ /dev/null @@ -1,5 +0,0 @@ - -modulejs.define('core/entry', ['core/location'], function (location) { - - return location.getItem(); -}); diff --git a/src/_h5ai/client/js/inc/core/location.js b/src/_h5ai/client/js/inc/core/location.js index 8a870525..4e12a2a2 100644 --- a/src/_h5ai/client/js/inc/core/location.js +++ b/src/_h5ai/client/js/inc/core/location.js @@ -76,7 +76,7 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event newAbsHref = encodedHref(newAbsHref); if (absHref !== newAbsHref) { absHref = newAbsHref; - event.pub('location.changed', absHref); + event.pub('location.changed', getItem()); notify.set('loading...'); modulejs.require('core/refresh')(function () { notify.set(); }); diff --git a/src/_h5ai/client/js/inc/ext/crumb.js b/src/_h5ai/client/js/inc/ext/crumb.js index 72ebfbd3..b4656b50 100644 --- a/src/_h5ai/client/js/inc/ext/crumb.js +++ b/src/_h5ai/client/js/inc/ext/crumb.js @@ -105,12 +105,7 @@ modulejs.define('ext/crumb', ['_', '$', 'core/settings', 'core/resource', 'core/ // event.sub('entry.removed', onContentChanged); event.sub('entry.changed', onContentChanged); - event.sub('location.changed', function () { - - onLocationChanged(location.getItem()); - }); - - onLocationChanged(location.getItem()); + event.sub('location.changed', onLocationChanged); }; init(); diff --git a/src/_h5ai/client/js/inc/ext/custom.js b/src/_h5ai/client/js/inc/ext/custom.js index 649fcc70..33df86e8 100644 --- a/src/_h5ai/client/js/inc/ext/custom.js +++ b/src/_h5ai/client/js/inc/ext/custom.js @@ -34,8 +34,6 @@ modulejs.define('ext/custom', ['_', '$', 'core/settings', 'core/server', 'core/e $('