Commit f3d3c6e9 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

добавлен класс для передачи миниатюр форматированных таблиц

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48363 954022d7-b5bf-4e40-9824-e11837661b57
parent 54d0c880
...@@ -56,6 +56,24 @@ ...@@ -56,6 +56,24 @@
asc_setVisible: function (val) { this.visible = val; } asc_setVisible: function (val) { this.visible = val; }
}; };
function formatTablePictures (options) {
if ( !(this instanceof formatTablePictures) ) {return new formatTablePictures(options);}
this.name = options.name;
this.displayName = options.displayName;
this.type = options.type;
this.image = options.image;
}
formatTablePictures.prototype = {
constructor: formatTablePictures,
asc_getName: function () { return this.name; },
asc_getDisplayName: function () { return this.displayName; },
asc_getType: function () { return this.type; },
asc_getImage: function () { return this.image; }
};
function AutoFiltersOptions () { function AutoFiltersOptions () {
if ( !(this instanceof AutoFiltersOptions) ) {return new AutoFiltersOptions();} if ( !(this instanceof AutoFiltersOptions) ) {return new AutoFiltersOptions();}
...@@ -1529,6 +1547,7 @@ ...@@ -1529,6 +1547,7 @@
canvas.height = '46'; canvas.height = '46';
var customStyles = wb.TableStyles.CustomStyles; var customStyles = wb.TableStyles.CustomStyles;
var result = []; var result = [];
var options;
var n = 0; var n = 0;
if(customStyles) if(customStyles)
{ {
...@@ -1536,13 +1555,14 @@ ...@@ -1536,13 +1555,14 @@
{ {
if(customStyles[i].table) if(customStyles[i].table)
{ {
result[n] = options =
{ {
name: i, name: i,
displayName: i, displayName: i,
type: 'custom', type: 'custom',
image: this._drawSmallIconTable(canvas,customStyles[i]) image: this._drawSmallIconTable(canvas,customStyles[i])
}; };
result[n] = new formatTablePictures(options);
n++; n++;
} }
} }
...@@ -1554,13 +1574,14 @@ ...@@ -1554,13 +1574,14 @@
{ {
if(defaultStyles[i].table) if(defaultStyles[i].table)
{ {
result[n] = options =
{ {
name: i, name: i,
displayName: i, displayName: i,
type: 'default', type: 'default',
image: this._drawSmallIconTable(canvas,defaultStyles[i]) image: this._drawSmallIconTable(canvas,defaultStyles[i])
}; };
result[n] = new formatTablePictures(options);
n++; n++;
} }
} }
...@@ -5041,5 +5062,12 @@ ...@@ -5041,5 +5062,12 @@
prot["asc_getIsTitle"] = prot.asc_getIsTitle; prot["asc_getIsTitle"] = prot.asc_getIsTitle;
prot["asc_setRange"] = prot.asc_setRange; prot["asc_setRange"] = prot.asc_setRange;
prot["asc_setIsTitle"] = prot.asc_setIsTitle; prot["asc_setIsTitle"] = prot.asc_setIsTitle;
window["Asc"]["formatTablePictures"] = window["Asc"].formatTablePictures = formatTablePictures;
prot = formatTablePictures.prototype;
prot["asc_getName"] = prot.asc_getName;
prot["asc_getDisplayName"] = prot.asc_getDisplayName;
prot["asc_getType"] = prot.asc_getType;
prot["asc_getImage"] = prot.asc_getImage;
} }
)(jQuery, window); )(jQuery, 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