HTML: Changing the files extensions to js

These are actually javascript files containing js objects and not json
files.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Gehad elrobey 2014-08-28 11:12:21 +03:00 committed by Dirk Hohndel
parent abfa4f2108
commit 3925aed5ea
2 changed files with 8 additions and 8 deletions

View file

@ -93,10 +93,10 @@ void DiveLogExportDialog::exportHtmlInit(const QString &filename)
mainDir.mkdir(file.fileName() + "_files"); mainDir.mkdir(file.fileName() + "_files");
QString exportFiles = file.fileName() + "_files"; QString exportFiles = file.fileName() + "_files";
QString json_dive_data = exportFiles + QDir::separator() + "file.json"; QString json_dive_data = exportFiles + QDir::separator() + "file.js";
QString json_settings = exportFiles + QDir::separator() + "settings.json"; QString json_settings = exportFiles + QDir::separator() + "settings.js";
QString translation = exportFiles + QDir::separator() + "translation.json"; QString translation = exportFiles + QDir::separator() + "translation.js";
QString stat_file = exportFiles + QDir::separator() + "stat.json"; QString stat_file = exportFiles + QDir::separator() + "stat.js";
QString photos_directory = exportFiles + QDir::separator() + "photos" + QDir::separator(); QString photos_directory = exportFiles + QDir::separator() + "photos" + QDir::separator();
mainDir.mkdir(photos_directory); mainDir.mkdir(photos_directory);
exportFiles += "/"; exportFiles += "/";

View file

@ -31,19 +31,19 @@ function load_scripts()
document.getElementsByTagName("head")[0].appendChild(fileref); document.getElementsByTagName("head")[0].appendChild(fileref);
fileref=document.createElement('script'); fileref=document.createElement('script');
fileref.setAttribute("src", location.pathname + "_files/file.json"); fileref.setAttribute("src", location.pathname + "_files/file.js");
document.getElementsByTagName("head")[0].appendChild(fileref); document.getElementsByTagName("head")[0].appendChild(fileref);
fileref=document.createElement('script'); fileref=document.createElement('script');
fileref.setAttribute("src", location.pathname + "_files/stat.json"); fileref.setAttribute("src", location.pathname + "_files/stat.js");
document.getElementsByTagName("head")[0].appendChild(fileref); document.getElementsByTagName("head")[0].appendChild(fileref);
fileref=document.createElement('script'); fileref=document.createElement('script');
fileref.setAttribute("src", location.pathname + "_files/translation.json"); fileref.setAttribute("src", location.pathname + "_files/translation.js");
document.getElementsByTagName("head")[0].appendChild(fileref); document.getElementsByTagName("head")[0].appendChild(fileref);
fileref=document.createElement('script'); fileref=document.createElement('script');
fileref.setAttribute("src", location.pathname + "_files/settings.json"); fileref.setAttribute("src", location.pathname + "_files/settings.js");
document.getElementsByTagName("head")[0].appendChild(fileref); document.getElementsByTagName("head")[0].appendChild(fileref);
load_script_sync("list_lib.js"); load_script_sync("list_lib.js");