diff --git a/src/_h5ai/client/js/inc/core/server.js b/src/_h5ai/client/js/inc/core/server.js
index 7870d219..759b81bb 100644
--- a/src/_h5ai/client/js/inc/core/server.js
+++ b/src/_h5ai/client/js/inc/core/server.js
@@ -20,8 +20,6 @@ modulejs.define('core/server', ['$', '_', 'config'], function ($, _, config) {
callback();
}
});
- } else if (server.backend === 'aai') {
- return modulejs.require('core/server-request-mock-aai')(data, callback);
} else {
callback();
}
@@ -30,121 +28,3 @@ modulejs.define('core/server', ['$', '_', 'config'], function ($, _, config) {
return server;
});
-
-
-
-modulejs.define('core/server-request-mock-aai', ['$', '_', 'core/settings', 'core/format'], function ($, _, allsettings, format) {
-
- var loadText = function (href) {
-
- var deferred = $.Deferred();
-
- $.ajax(href, {dataType: 'text'}).always(function (content) {
-
- content = content.replace ? content : null;
- deferred.resolve(content);
- });
-
- return deferred;
- },
-
- loadJson = function (href) {
-
- var deferred = $.Deferred();
-
- loadText(href).always(function (content) {
-
- var json = content.replace ? JSON.parse(content.replace(/\/\*[\s\S]*?\*\/|\/\/.*?(\n|$)/g, '')) : {};
- deferred.resolve(json);
- });
-
- return deferred;
- },
-
- parse = function (absHref, html) {
-
- html = '
' + html.replace(/^[\s\S]*
|<\/body>[\s\S]*$/g, '') + '';
- var $table = $(html).find('#data-apache-autoindex table');
-
- return _.compact(_.map($table.find('td').closest('tr'), function (tr) {
-
- var $tds = $(tr).find('td'),
- $a = $tds.eq(1).find('a');
-
- return $a.text() === 'Parent Directory' ? null : {
- absHref: absHref + $a.attr('href'),
- time: format.parseDate($tds.eq(2).text(), ['YYYY-MM-DD HH:mm', 'DD-MMM-YYYY HH:mm']),
- size: format.parseSize($tds.eq(3).text())
- };
- }));
- };
-
- return function (data, callback) {
-
- if (data.action === 'get' && data.l10n === true) {
-
- var isoCodes = data.l10nCodes.split(':');
- var isoCode = data.l10nCodes.split(':')[0];
- loadJson(allsettings.h5aiAbsHref + 'conf/l10n/' + isoCode + '.json').done(function (json) {
-
- var result = {code: 0, l10n: {}};
-
- if (json) {
- result.l10n[isoCode] = json;
- }
- callback(result);
- });
-
- } else if (data.action === 'get' && data.custom === true) {
-
- $.when(
- loadText('_h5ai.header.html'),
- loadText('_h5ai.footer.html')
- ).done(function (header, footer) {
-
- callback({
- code: 0,
- custom: {
- header: header,
- footer: footer
- }
- });
- });
-
- } else if (data.action === 'get' && data.entries === true) {
-
- var absHref = data.entriesHref,
- what = data.entriesWhat,
- magicSequence = '=h5ai=',
- reContentType = /^text\/html;h5ai=/;
-
- $.ajax({
- url: absHref,
- type: what === 0 ? 'HEAD' : 'GET',
- complete: function (xhr) {
-
- var entries = [],
- status = xhr.status;
-
- if (status === 200 && reContentType.test(xhr.getResponseHeader('Content-Type'))) {
- status = magicSequence;
- }
-
- if (status === magicSequence && what > 0) {
- entries = parse(absHref, xhr.responseText);
- }
- entries.push({absHref: absHref, status: status, content: what > 0});
-
- callback({
- code: 0,
- entries: entries
- });
- }
- });
-
- } else {
-
- callback();
- }
- };
-});
diff --git a/src/_h5ai/client/js/scripts.js b/src/_h5ai/client/js/scripts.js
index 0b714814..7036d680 100644
--- a/src/_h5ai/client/js/scripts.js
+++ b/src/_h5ai/client/js/scripts.js
@@ -39,52 +39,13 @@
$(function () { modulejs.require('info'); });
- } else if (mode === 'php') {
+ } else {
$.getJSON('.', {action: 'get', options: true, types: true, langs: true, server: true}, function (config) {
modulejs.define('config', config);
$(function () { modulejs.require('main'); });
});
-
- } else if (mode === 'aai') {
-
- var src = $script.attr('src'),
- appHref = src.substr(0, src.length - filename.length),
- loadJson = function (href) {
-
- var deferred = $.Deferred();
-
- $.ajax(href, {dataType: 'text'}).always(function (content) {
-
- var json = content.replace ? JSON.parse(content.replace(/\/\*[\s\S]*?\*\/|\/\/.*?(\n|$)/g, '')) : {};
- deferred.resolve(json);
- });
-
- return deferred;
- };
-
- $.when(
- loadJson(appHref + 'conf/options.json'),
- loadJson(appHref + 'conf/types.json'),
- loadJson(appHref + 'conf/langs.json')
- ).done(function (options, types, langs) {
-
- var config = {
- options: options,
- types: types,
- langs: langs,
- server: {
- backend: mode,
- api: false,
- name: 'apache',
- version: null
- }
- };
-
- modulejs.define('config', config);
- $(function () { modulejs.require('main'); });
- });
}
}());
diff --git a/src/_h5ai/server/aai/aai.htaccess b/src/_h5ai/server/aai/aai.htaccess
deleted file mode 100644
index 497f7381..00000000
--- a/src/_h5ai/server/aai/aai.htaccess
+++ /dev/null
@@ -1,23 +0,0 @@
-################################
-# {{pkg.name}} {{pkg.version}}
-# customized .htaccess
-################################
-
-Options +Indexes
-Options +FollowSymLinks
-
-HeaderName /_{{pkg.name}}/server/aai/header.html
-ReadmeName /_{{pkg.name}}/server/aai/footer.html
-
-IndexIgnore _{{pkg.name}}*
-
-IndexOptions Charset=UTF-8
-IndexOptions FancyIndexing
-IndexOptions FoldersFirst
-IndexOptions HTMLTable
-IndexOptions NameWidth=*
-IndexOptions SuppressDescription
-IndexOptions SuppressHTMLPreamble
-IndexOptions SuppressRules
-IndexOptions Type=text/html;{{pkg.name}}={{pkg.version}}
-IndexOptions XHTML
diff --git a/src/_h5ai/server/aai/footer.html.jade b/src/_h5ai/server/aai/footer.html.jade
deleted file mode 100644
index 4b4a411d..00000000
--- a/src/_h5ai/server/aai/footer.html.jade
+++ /dev/null
@@ -1,3 +0,0 @@
-
-// generated code ends here
-|