define(['jQuery', 'listViewStyle'], function ($) { var currentConfig; function remove(page, index) { require(['confirm'], function (confirm) { confirm(Globalize.translate('MessageConfirmPathSubstitutionDeletion'), Globalize.translate('HeaderConfirmDeletion')).then(function () { ApiClient.getServerConfiguration().then(function (config) { config.PathSubstitutions.splice(index, 1); ApiClient.updateServerConfiguration(config).then(function () { reload(page); }); }); }); }); } function addSubstitution(page, config) { config.PathSubstitutions.push({ From: $('#txtFrom', page).val(), To: $('#txtTo', page).val() }); } function reloadPathMappings(page, config) { var index = 0; var html = config.PathSubstitutions.map(function (map) { var mapHtml = ''; mapHtml += '