|
@@ -891,12 +891,16 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
|
|
|
$('.dz-drag-hover').removeClass('dz-drag-hover');
|
|
$('.dz-drag-hover').removeClass('dz-drag-hover');
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ var openImporter = function (path) {
|
|
|
|
|
+ self.loadApp('importer');
|
|
|
|
|
+ self.getActiveAppViewModel(function (vm) {
|
|
|
|
|
+ vm.createWizard.source.path(path);
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
self.dropzoneComplete = function (path) {
|
|
self.dropzoneComplete = function (path) {
|
|
|
if (path.toLowerCase().endsWith('.csv')){
|
|
if (path.toLowerCase().endsWith('.csv')){
|
|
|
- self.loadApp('importer');
|
|
|
|
|
- self.getActiveAppViewModel(function (vm) {
|
|
|
|
|
- vm.createWizard.source.path(path);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ openImporter(path);
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
huePubSub.publish('open.link', '/filebrowser/view=' + path);
|
|
huePubSub.publish('open.link', '/filebrowser/view=' + path);
|
|
@@ -904,6 +908,8 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
|
|
|
$('.dz-drag-hover').removeClass('dz-drag-hover');
|
|
$('.dz-drag-hover').removeClass('dz-drag-hover');
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ huePubSub.subscribe('open.in.importer', openImporter);
|
|
|
|
|
+
|
|
|
// prepend /hue to all the link on this page
|
|
// prepend /hue to all the link on this page
|
|
|
$('a[href]').each(function () {
|
|
$('a[href]').each(function () {
|
|
|
var link = $(this).attr('href');
|
|
var link = $(this).attr('href');
|