Commit 27271a45 authored by Alexander.Trofimov's avatar Alexander.Trofimov

slide/themes/Themes to function-closure

parent d8ceebcf
......@@ -66,6 +66,8 @@
"../common/wordcopypaste.js",
"../slide/apiDefines.js",
"../slide/themes/Themes.js",
"../slide/Drawing/ThemeLoader.js",
"../word/Editor/Serialize2.js",
"../word/Editor/Styles.js",
......
......@@ -3657,9 +3657,9 @@ asc_docs_api.prototype.OpenDocumentEndCallback = function()
theme_load_info.Layouts[j] = _masters[i].sldLayoutLst[j];
var th_info = {};
th_info["Name"] = "Doc Theme " + i;
th_info["Url"] = "";
th_info["Thumbnail"] = _masters[i].ImageBase64;
th_info.Name = "Doc Theme " + i;
th_info.Url = "";
th_info.Thumbnail = _masters[i].ImageBase64;
var th = new CAscThemeInfo(th_info);
this.ThemeLoader.Themes.DocumentThemes[this.ThemeLoader.Themes.DocumentThemes.length] = th;
......
......@@ -216,28 +216,28 @@ CAscSlideProps.prototype.put_LockRemove = function(v){this.lockRemove = v;}
function CAscThemeInfo(themeInfo)
{
this.Obj = themeInfo;
this.ThemeInfo = themeInfo;
this.Index = -1000;
}
CAscThemeInfo.prototype.get_Name = function() { return this.Obj["Name"]; }
CAscThemeInfo.prototype.get_Url = function() { return this.Obj["Url"]; }
CAscThemeInfo.prototype.get_Image = function() { return this.Obj["Thumbnail"]; }
CAscThemeInfo.prototype.get_Index = function() { return this.Index; }
CAscThemeInfo.prototype.get_Name = function() { return this.ThemeInfo.Name; };
CAscThemeInfo.prototype.get_Url = function() { return this.ThemeInfo.Url; };
CAscThemeInfo.prototype.get_Image = function() { return this.ThemeInfo.Thumbnail; };
CAscThemeInfo.prototype.get_Index = function() { return this.Index; };
function CAscThemes()
{
this.EditorThemes = [];
this.DocumentThemes = [];
var _count = _presentation_editor_themes.length;
var _count = AscCommon._presentation_editor_themes.length;
for (var i = 0; i < _count; i++)
{
this.EditorThemes[i] = new CAscThemeInfo(_presentation_editor_themes[i]);
this.EditorThemes[i] = new CAscThemeInfo(AscCommon._presentation_editor_themes[i]);
this.EditorThemes[i].Index = i;
}
}
CAscThemes.prototype.get_EditorThemes = function(){ return this.EditorThemes; }
CAscThemes.prototype.get_DocumentThemes = function(){ return this.DocumentThemes; }
CAscThemes.prototype.get_EditorThemes = function(){ return this.EditorThemes; };
CAscThemes.prototype.get_DocumentThemes = function(){ return this.DocumentThemes; };
// ---------------------------------------------------------------
......@@ -1207,3 +1207,9 @@ function CAscTableStyle()
CAscTableStyle.prototype.get_Id = function(){ return this.Id; }
CAscTableStyle.prototype.get_Image = function(){ return this.Image; }
CAscTableStyle.prototype.get_Type = function(){ return this.Type; }
//------------------------------------------------------------export----------------------------------------------------
CAscThemeInfo.prototype['get_Name'] = CAscThemeInfo.prototype.get_Name;
CAscThemeInfo.prototype['get_Url'] = CAscThemeInfo.prototype.get_Url;
CAscThemeInfo.prototype['get_Image'] = CAscThemeInfo.prototype.get_Image;
CAscThemeInfo.prototype['get_Index'] = CAscThemeInfo.prototype.get_Index;
......@@ -22,9 +22,7 @@
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
if (undefined === window['Asc']) {
window['Asc'] = {};
}
window['Asc'] = window['Asc'] || {};
window['Asc']['asc_docs_api'] = asc_docs_api;
asc_docs_api.prototype['asc_GetFontThumbnailsPath'] = asc_docs_api.prototype.asc_GetFontThumbnailsPath;
asc_docs_api.prototype['pre_Save'] = asc_docs_api.prototype.pre_Save;
......@@ -491,10 +489,6 @@ CAscSlideProps.prototype['get_LockTranzition'] = CAscSlideProps.prototype.get_Lo
CAscSlideProps.prototype['put_LockTranzition'] = CAscSlideProps.prototype.put_LockTranzition;
CAscSlideProps.prototype['get_LockRemove'] = CAscSlideProps.prototype.get_LockRemove;
CAscSlideProps.prototype['put_LockRemove'] = CAscSlideProps.prototype.put_LockRemove;
CAscThemeInfo.prototype['get_Name'] = CAscThemeInfo.prototype.get_Name;
CAscThemeInfo.prototype['get_Url'] = CAscThemeInfo.prototype.get_Url;
CAscThemeInfo.prototype['get_Image'] = CAscThemeInfo.prototype.get_Image;
CAscThemeInfo.prototype['get_Index'] = CAscThemeInfo.prototype.get_Index;
CAscThemes.prototype['get_EditorThemes'] = CAscThemes.prototype.get_EditorThemes;
CAscThemes.prototype['get_DocumentThemes'] = CAscThemes.prototype.get_DocumentThemes;
window['Asc']['CAscChartProp'] = CAscChartProp;
......
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"use strict";
(function(window, undefined){
var _presentation_editor_themes = [];
_presentation_editor_themes[0] = {
......@@ -90,4 +92,9 @@ _presentation_editor_themes[10] = {
Name: "turtle",
Url: "/theme11/",
Thumbnail: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAAAmCAYAAAC1Q9c1AAAG5UlEQVRoQ+2ae0gVaRjG32OaFpldNLqYRTcrwiQo2W6mbi6mLGtG4IJR6P6xIWEEXWWXNYoulhjY4qULCpuGy6opuCHmlmB/hCUUGFLRvbTM7lbW7Pe8OKc503hmzk3PgfPBwfKbmTPfb573fZ/3G02SGOQdTiVg8kJ1Kk++mBeq85l6obqAqReqF6orCLjgmt6c6oXqAgIuuKTdSu3s7KRHjx7xLUVERJCPj48Lbs8zL2k31KSkJKqrq+NV19bWUmJiomcScMFd2wX18ePHNHXqVBo+fDi9f/+egQKskfHlyxf68OEDffr0iT9Q+MiRI8nf39/I6R5xjF1QDxw4QLt27aKtW7dSUVERg719+zZNmzbNvGgZXm9vrxniu3fvBoQCqMHBwTRq1CiPAGftJu2COmfOHOro6KCGhgYqKSmh8vJy2rFjB38ATlaiUTq+vr4UGBjIQKFaTx82Q7106RKtXLmSxo8fT/fv36fq6mpKTU1llV24cIH8/PwGZPLixQs6f/48tbW10cuXLznkoe6EhARCjjaZTOZzxYORoH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yHKsLlRs6926dYs2btxIO3fu5JtGgVEOJVT8HsdevnyZoBiYeriJI0eOUEVFBStWHtiYga9dtmwZRUVF8RxAT5482SGwyK8imtwXqnp1CGu1gReeUxLbf7qLgGW7e/cu9/+hoaEOwxuI/PTp06Wh3ITRVaozoTokP4Mna/lWdHbYIUPEqBsSsT8hoaHBHoW8We6og7AZqrryY63o/Yd6oEDBUonQN0eMcCMSnIiIEN0oUt6/qBdQuhm0iE6bzrcZ6oQJE7gDUo6hhioaEQnpRBnyUCdaYQHWJiADiQN2DUqWP9bUbAFVXYCGWn3Wvl9+kEJFDFS5SKXFc9UakDZgK7HPqwb8DdSfcho176Pqt1j6L/lHzbnof2qopOFnzbmM7/+iP34p05z7vTiNkv5u0ZyrTfmOev/8QXMu4Nd/OeVoWSfx6hz50ynqNPpARORKIoLN3+mxUKFG5Q6VvfnTKDi94wRUScBlsB4LVblIUdGlhw8fYv92UBWqvAelN/bYnCovyNkFSU+R1gqZ8MdflYptvHHjxslJ1+K8V69eSXjzqX4Zp/flalsCi2LE/yGMsd8q/40Aqi1aYq33UsIqsWVyVoXXW5PevFzoTaIH5zeV6nCCWQZMZ94wQAOQbLIB2t6XeINR4fUgquflTs7idQqefH/nMWi5CaYd3YxstvFTr8VEDhVvYgftHo3CFX8KBS9r+h+3SM28ZOCggQAAAABJRU5ErkJggg=="
};
\ No newline at end of file
};
//--------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon']._presentation_editor_themes = _presentation_editor_themes;
})(window);
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