Commit 463231ee authored by Boris Kocherov's avatar Boris Kocherov

rename view view_folder

parent 4b630912
view
\ No newline at end of file
view
\ No newline at end of file
view
\ No newline at end of file
view
\ No newline at end of file
......@@ -12,6 +12,12 @@
"scopes": [
{
"prefix": "onlyoffice/web-apps/",
"excluded_paths": [
"apps/common/main/lib/view/",
"apps/documenteditor/main/app/view/",
"apps/presentationeditor/main/app/view/",
"apps/spreadsheeteditor/main/app/view/"
],
"paths": [
"apps/css.js",
"apps/promise.js",
......
......@@ -319,6 +319,57 @@ DocsAPI.DocEditor.version = function () {
}
}
})
.push(function () {
return jIO.util.ajax({
type: "GET",
url: "onlyoffice.gadget.appcache"
});
})
.push(undefined, function (error) {
return;
})
.push(function (response) {
/*configure requeryjs for rename
view and edit to view_folder and edit_folder
in dependencies
*/
if (!response) {
return;
}
var text = response.target.responseText,
relative_url_list = text.split('\r\n'),
i,
new_url,
old_url,
config = {};
if (relative_url_list.length === 1) {
relative_url_list = text.split('\n');
}
if (relative_url_list.length === 1) {
relative_url_list = text.split('\r');
}
for (i = 0; i < relative_url_list.length; i += 1) {
if (
relative_url_list[i] !== "" &&
relative_url_list[i].charAt(0) !== '#' &&
relative_url_list[i].charAt(0) !== ' ') {
relative_url_list[i].replace("\r", "");
new_url = relative_url_list[i]
.replace('onlyoffice/web-apps/apps/', '')
.replace(/\.[^.]*$/, '');
old_url = new_url
.replace(/(^|\/)view_folder\//g,"$1view/")
.replace(/(^|\/)edit_folder\//g,"$1edit/");
if (old_url !== new_url) {
config[old_url] = [
new_url,
old_url
];
}
}
}
require.config({paths: config});
})
.push(function () {
var app_url, sdk_deps = ["promise!sdk_async_loader"];
if (!g.props.value_zip_storage) {
......
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