Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Commit

Permalink
add caption-side as style attribute so stylesheet is not required
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed Nov 22, 2018
1 parent 5d3fff4 commit ae472e8
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 30 deletions.
12 changes: 0 additions & 12 deletions dist/css/tableexport.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@
*
*/

/*-----------------------------------/
/* CAPTION POSITIONS
/*----------------------------------*/

.top {
caption-side: top;
}

.bottom {
caption-side: bottom;
}

/*-----------------------------------/
/* BUTTON CUSTOM CLASSES
/*----------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/.top{caption-side:top}.bottom{caption-side:bottom}.button-default,.button-default:active,.button-default:focus,.button-default:hover{text-decoration:none}.button-default{font:bold 12px sans-serif;color:#222;cursor:pointer;padding:5px;margin:5px}.button-default.csv:before,.button-default.txt:before,.button-default.xls:before,.button-default.xlsx:before{content:none}.csv,.txt,.xls,.xlsx{margin:4px 0}.csv:before,.txt:before,.xls:before,.xlsx:before{margin-right:10px;padding:11px 15px 12px;box-shadow:1px 1px 2px rgba(0,0,0,.2)}.xlsx:before{content:"";background:#006400 url(../img/xlsx.svg) no-repeat center}.xls:before{content:"";background:green url(../img/xls.svg) no-repeat center}.csv:before{content:"";background:#00f url(../img/csv.svg) no-repeat center}.txt:before{content:"";background:purple url(../img/txt.svg) no-repeat center}
*/.button-default,.button-default:active,.button-default:focus,.button-default:hover{text-decoration:none}.button-default{font:bold 12px sans-serif;color:#222;cursor:pointer;padding:5px;margin:5px}.button-default.csv:before,.button-default.txt:before,.button-default.xls:before,.button-default.xlsx:before{content:none}.csv,.txt,.xls,.xlsx{margin:4px 0}.csv:before,.txt:before,.xls:before,.xlsx:before{margin-right:10px;padding:11px 15px 12px;box-shadow:1px 1px 2px rgba(0,0,0,.2)}.xlsx:before{content:"";background:#006400 url(../img/xlsx.svg) no-repeat center}.xls:before{content:"";background:green url(../img/xls.svg) no-repeat center}.csv:before{content:"";background:#00f url(../img/csv.svg) no-repeat center}.txt:before{content:"";background:purple url(../img/txt.svg) no-repeat center}
3 changes: 2 additions & 1 deletion dist/js/tableexport.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
caption[0].appendChild(exportButton);
} else {
caption = document.createElement('caption');
caption.className = settings.bootstrapSettings.bootstrapSpacing + settings.position + ' ' + self.defaultCaptionClass;
caption.className = settings.bootstrapSettings.bootstrapSpacing + self.defaultCaptionClass;
caption.style = 'caption-side: ' + settings.position;
caption.appendChild(exportButton);
el.insertBefore(caption, el.firstChild);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tableexport.min.js

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions src/stable/css/tableexport.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@
*
*/

/*-----------------------------------/
/* CAPTION POSITIONS
/*----------------------------------*/

.top {
caption-side: top;
}

.bottom {
caption-side: bottom;
}

/*-----------------------------------/
/* BUTTON CUSTOM CLASSES
/*----------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion src/stable/css/tableexport.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/.top{caption-side:top}.bottom{caption-side:bottom}.button-default,.button-default:active,.button-default:focus,.button-default:hover{text-decoration:none}.button-default{font:bold 12px sans-serif;color:#222;cursor:pointer;padding:5px;margin:5px}.button-default.csv:before,.button-default.txt:before,.button-default.xls:before,.button-default.xlsx:before{content:none}.csv,.txt,.xls,.xlsx{margin:4px 0}.csv:before,.txt:before,.xls:before,.xlsx:before{margin-right:10px;padding:11px 15px 12px;box-shadow:1px 1px 2px rgba(0,0,0,.2)}.xlsx:before{content:"";background:#006400 url(../img/xlsx.svg) no-repeat center}.xls:before{content:"";background:green url(../img/xls.svg) no-repeat center}.csv:before{content:"";background:#00f url(../img/csv.svg) no-repeat center}.txt:before{content:"";background:purple url(../img/txt.svg) no-repeat center}
*/.button-default,.button-default:active,.button-default:focus,.button-default:hover{text-decoration:none}.button-default{font:bold 12px sans-serif;color:#222;cursor:pointer;padding:5px;margin:5px}.button-default.csv:before,.button-default.txt:before,.button-default.xls:before,.button-default.xlsx:before{content:none}.csv,.txt,.xls,.xlsx{margin:4px 0}.csv:before,.txt:before,.xls:before,.xlsx:before{margin-right:10px;padding:11px 15px 12px;box-shadow:1px 1px 2px rgba(0,0,0,.2)}.xlsx:before{content:"";background:#006400 url(../img/xlsx.svg) no-repeat center}.xls:before{content:"";background:green url(../img/xls.svg) no-repeat center}.csv:before{content:"";background:#00f url(../img/csv.svg) no-repeat center}.txt:before{content:"";background:purple url(../img/txt.svg) no-repeat center}
3 changes: 2 additions & 1 deletion src/stable/js/tableexport.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
caption[0].appendChild(exportButton);
} else {
caption = document.createElement('caption');
caption.className = settings.bootstrapSettings.bootstrapSpacing + settings.position + ' ' + self.defaultCaptionClass;
caption.className = settings.bootstrapSettings.bootstrapSpacing + self.defaultCaptionClass;
caption.style = 'caption-side: ' + settings.position;
caption.appendChild(exportButton);
el.insertBefore(caption, el.firstChild);
}
Expand Down
2 changes: 1 addition & 1 deletion src/stable/js/tableexport.min.js

Large diffs are not rendered by default.

0 comments on commit ae472e8

Please sign in to comment.