From 4099a24cfaba2f3cfb1ceb5bb4d1e82309d1ff1c Mon Sep 17 00:00:00 2001 From: Pieter Sheth-Voss Date: Thu, 4 Jun 2015 12:05:26 -0400 Subject: [PATCH] Default gray125 style per pull request #3 --- bits/92_stylebuilder.js | 4 ++-- example2.js | 3 +++ xlsx.js | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 example2.js diff --git a/bits/92_stylebuilder.js b/bits/92_stylebuilder.js index 51a77a9..5976ad0 100644 --- a/bits/92_stylebuilder.js +++ b/bits/92_stylebuilder.js @@ -100,14 +100,14 @@ if (!defaultStyle.font) defaultStyle.font = {name: 'Calibri', sz: '12'}; if (!defaultStyle.font.name) defaultStyle.font.name = 'Calibri'; if (!defaultStyle.font.sz) defaultStyle.font.sz = 11; - if (!defaultStyle.fill) defaultStyle.fill = { fgColor: { patternType: "none"}}; + if (!defaultStyle.fill) defaultStyle.fill = { patternType: "none", fgColor: {}}; if (!defaultStyle.border) defaultStyle.border = {}; if (!defaultStyle.numFmt) defaultStyle.numFmt = 0; this.defaultStyle = defaultStyle; var gray125Style = JSON.parse(JSON.stringify(defaultStyle)); - gray125Style.fill = { fgColor: { patternType: "gray125"}} + gray125Style.fill = {patternType: "gray125", fgColor: { }} this.addStyles([defaultStyle, gray125Style]); return this; diff --git a/example2.js b/example2.js new file mode 100644 index 0000000..9ec0979 --- /dev/null +++ b/example2.js @@ -0,0 +1,3 @@ +/** + * Created by pieter on 5/26/15. + */ diff --git a/xlsx.js b/xlsx.js index 1ef424a..faaf85f 100644 --- a/xlsx.js +++ b/xlsx.js @@ -12106,14 +12106,14 @@ var XmlNode = (function () { if (!defaultStyle.font) defaultStyle.font = {name: 'Calibri', sz: '12'}; if (!defaultStyle.font.name) defaultStyle.font.name = 'Calibri'; if (!defaultStyle.font.sz) defaultStyle.font.sz = 11; - if (!defaultStyle.fill) defaultStyle.fill = { fgColor: { patternType: "none"}}; + if (!defaultStyle.fill) defaultStyle.fill = { patternType: "none", fgColor: {}}; if (!defaultStyle.border) defaultStyle.border = {}; if (!defaultStyle.numFmt) defaultStyle.numFmt = 0; this.defaultStyle = defaultStyle; var gray125Style = JSON.parse(JSON.stringify(defaultStyle)); - gray125Style.fill = { fgColor: { patternType: "gray125"}} + gray125Style.fill = {patternType: "gray125", fgColor: { }} this.addStyles([defaultStyle, gray125Style]); return this;