Commit 6de45bdc authored by Boris Kocherov's avatar Boris Kocherov

fix folder path, fix appcache extension

parent 8600259f
...@@ -182,7 +182,6 @@ ...@@ -182,7 +182,6 @@
.push(function (response) { .push(function (response) {
var scopes, i, x, scope, bt_folder = {}, size= 0; var scopes, i, x, scope, bt_folder = {}, size= 0;
context._id_dict["/bt/"] = bt_folder;
function add_metafile(fname, body) { function add_metafile(fname, body) {
var type = typeof body, var type = typeof body,
...@@ -207,6 +206,10 @@ ...@@ -207,6 +206,10 @@
context._options = response.target.response; context._options = response.target.response;
context._options.id_prefix = context._options.id_prefix || ""; context._options.id_prefix = context._options.id_prefix || "";
context._options.version = context._options.version || "001"; context._options.version = context._options.version || "001";
context.path_prefix_meta = '/' + context._options.name + '/bt/';
context.path_prefix_file = '/' + context._options.name +
'/PathTemplateItem/';
context._id_dict[context.path_prefix_meta] = bt_folder;
context._path_templates = {}; context._path_templates = {};
scopes = context._options.scopes || {}; scopes = context._options.scopes || {};
for (i = 0; i < scopes.length; i += 1) { for (i = 0; i < scopes.length; i += 1) {
...@@ -329,7 +332,7 @@ ...@@ -329,7 +332,7 @@
} }
} }
} }
path = "/PathTemplateItem/" + path + "/"; path = context.path_prefix_file + path + "/";
if (!context._id_dict.hasOwnProperty(path)) { if (!context._id_dict.hasOwnProperty(path)) {
context._id_dict[path] = {}; context._id_dict[path] = {};
} }
...@@ -340,7 +343,7 @@ ...@@ -340,7 +343,7 @@
context._id_dict[path][xmldoc.id + '.xml'] = xmldoc; context._id_dict[path][xmldoc.id + '.xml'] = xmldoc;
} }
} }
context._id_dict["/bt/"].template_path_list = context._id_dict[context.path_prefix_meta].template_path_list =
string2blob(path_templates.join("\n")); string2blob(path_templates.join("\n"));
// generate appcache as list of all packaged files // generate appcache as list of all packaged files
...@@ -353,8 +356,8 @@ ...@@ -353,8 +356,8 @@
text_content: "CACHE MANIFEST\nCACHE:\n" + text_content: "CACHE MANIFEST\nCACHE:\n" +
generated_appcache.join("\n") + "\nNETWORK:\n*" generated_appcache.join("\n") + "\nNETWORK:\n*"
}; };
context._id_dict["/PathTemplateItem/web_page_module/"] context._id_dict[context.path_prefix_file + "web_page_module/"]
[xmldoc.id + ".appcache"] = string2blob(generateZopeData(xmldoc)); [xmldoc.id + ".xml"] = string2blob(generateZopeData(xmldoc));
}); });
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment