Commit 472d4436 authored by Alexander.Trofimov's avatar Alexander.Trofimov

slide/themes/Themes to function-closure

parent 70e9e3d5
......@@ -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",
......
......@@ -3633,9 +3633,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;
......
......@@ -192,28 +192,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; };
// ---------------------------------------------------------------
......@@ -1183,3 +1183,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;
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;
......@@ -467,10 +465,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;
......
"use strict";
(function(window, undefined){
var _presentation_editor_themes = [];
_presentation_editor_themes[0] = {
......@@ -67,3 +69,8 @@ _presentation_editor_themes[10] = {
Url: "/theme11/",
Thumbnail: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAAAmCAYAAAC1Q9c1AAAG5UlEQVRoQ+2ae0gVaRjG32OaFpldNLqYRTcrwiQo2W6mbi6mLGtG4IJR6P6xIWEEXWWXNYoulhjY4qULCpuGy6opuCHmlmB/hCUUGFLRvbTM7lbW7Pe8OKc503hmzk3PgfPBwfKbmTPfb573fZ/3G02SGOQdTiVg8kJ1Kk++mBeq85l6obqAqReqF6orCLjgmt6c6oXqAgIuuKTdSu3s7KRHjx7xLUVERJCPj48Lbs8zL2k31KSkJKqrq+NV19bWUmJiomcScMFd2wX18ePHNHXqVBo+fDi9f/+egQKskfHlyxf68OEDffr0iT9Q+MiRI8nf39/I6R5xjF1QDxw4QLt27aKtW7dSUVERg719+zZNmzbNvGgZXm9vrxniu3fvBoQCqMHBwTRq1CiPAGftJu2COmfOHOro6KCGhgYqKSmh8vJy2rFjB38ATlaiUTq+vr4UGBjIQKFaTx82Q7106RKtXLmSxo8fT/fv36fq6mpKTU1llV24cIH8/PwGZPLixQs6f/48tbW10cuXLznkoe6EhARCjjaZTOZzxYORoHakB3Hc1wkPIG4z1E2bNtHp06dpw4YNtHv3burr66Po6Gh6/vw5HT16lNasWaO57Pr6etqzZw+9fftWcz42NpbOnDkjQeVC7RYQBVgpKCiIH5z4t9sDNgwVqoEy58+fzyF+9uxZtlIYBw8epFOnTtGSJUuotLSUfzdixAgO5YCAALpz5w4tWrSIHwAeRHp6OoWEhEjIw2VlZaa8vDzC9ffv309r1661lnelKVOmIBrcGqwhqG/evCFUfIDM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iE6bzrcZ6oQJE7gDUo6hhioaEQnpRBnyUCdaYQHWJiADiQN2DUqWP9bUbAFVXYCGWn3Wvl9+kEJFDFS5SKXFc9UakDZgK7HPqwb8DdSfcho176Pqt1j6L/lHzbnof2qopOFnzbmM7/+iP34p05z7vTiNkv5u0ZyrTfmOev/8QXMu4Nd/OeVoWSfx6hz50ynqNPpARORKIoLN3+mxUKFG5Q6VvfnTKDi94wRUScBlsB4LVblIUdGlhw8fYv92UBWqvAelN/bYnCovyNkFSU+R1gqZ8MdflYptvHHjxslJ1+K8V69eSXjzqX4Zp/flalsCi2LE/yGMsd8q/40Aqi1aYq33UsIqsWVyVoXXW5PevFzoTaIH5zeV6nCCWQZMZ94wQAOQbLIB2t6XeINR4fUgquflTs7idQqefH/nMWi5CaYd3YxstvFTr8VEDhVvYgftHo3CFX8KBS9r+h+3SM28ZOCggQAAAABJRU5ErkJggg=="
};
//--------------------------------------------------------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