diff --git a/src/_h5ai/client/js/inc/model/entry.js b/src/_h5ai/client/js/inc/model/entry.js index d1e3cb6e..8e2defb4 100644 --- a/src/_h5ai/client/js/inc/model/entry.js +++ b/src/_h5ai/client/js/inc/model/entry.js @@ -1,5 +1,5 @@ -modulejs.define('model/entry', ['$', '_', 'config', 'core/types', 'core/event', 'core/settings', 'core/server', 'core/location'], function ($, _, config, types, event, settings, server, location) { +modulejs.define('model/entry', ['_', 'core/types', 'core/event', 'core/settings', 'core/server', 'core/location'], function (_, types, event, settings, server, location) { var reEndsWithSlash = /\/$/, @@ -129,14 +129,6 @@ modulejs.define('model/entry', ['$', '_', 'config', 'core/types', 'core/event', callback(self); }); } - }, - - init = function () { - - _.each(config.entries || [], function (entry) { - - getEntry(entry.absHref, entry.time, entry.size, entry.status, entry.content); - }); }; @@ -268,9 +260,6 @@ modulejs.define('model/entry', ['$', '_', 'config', 'core/types', 'core/event', } }); - - init(); - return { get: getEntry, remove: removeEntry diff --git a/src/_h5ai/client/js/scripts.js b/src/_h5ai/client/js/scripts.js index ea476ec2..164f5fbc 100644 --- a/src/_h5ai/client/js/scripts.js +++ b/src/_h5ai/client/js/scripts.js @@ -39,10 +39,16 @@ } else { - $.getJSON('.', {action: 'get', options: true, types: true, langs: true, server: true, entries: true}, function (config) { + $.ajax({ + url: '.', + data: {action: 'get', options: true, types: true, langs: true, server: true}, + type: 'POST', + dataType: 'json', + success: function (config) { - modulejs.define('config', config); - $(function () { modulejs.require('main'); }); + modulejs.define('config', config); + $(function () { modulejs.require('main'); }); + } }); }