UNPKG

@liedekef/ftable

Version:

Modern, lightweight, jQuery-free CRUD table for dynamic AJAX-powered tables.

612 lines (611 loc) 19.9 kB
/* fTable metro style theme - Purple */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300; src: local('Open Sans Light'), local('OpenSans-Light'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTRa1RVmPjeKy21_GQJaLlJI.woff) format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 300; src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxrsuoFAk0leveMLeqYtnfAY.woff) format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/u-WUoqrET9fUeobQW7jkRT8E0i7KZn-EPnyo3HZu7kw.woff) format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/xjAJXh38I15wypJXxuGMBtIh4imgI8P11RFo6YPCPC0.woff) format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNSha1RVmPjeKy21_GQJaLlJI.woff) format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxmWeb5PoA5ztb49yLyUzH1A.woff) format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzBa1RVmPjeKy21_GQJaLlJI.woff) format('woff'); } @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 700; src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxoUt79146ZFaIJxILcpzmhI.woff) format('woff'); } div.ftable-main-container { position: relative; } div.ftable-main-container div.ftable-title { position: relative; text-align: left; } div.ftable-main-container div.ftable-title div.ftable-toolbar { bottom: 0px; right: 0px; position: absolute; display: inline-block; margin-right: 5px; } div.ftable-main-container div.ftable-title div.ftable-toolbar .ftable-toolbar-item { position: relative; display: inline-block; margin: 0px 0px 0px 5px; cursor: pointer; font-size: 0.9em; padding: 2px; border: none; } div.ftable-main-container div.ftable-title div.ftable-toolbar .ftable-toolbar-item span.ftable-toolbar-item-icon { display: inline-block; margin: 2px; vertical-align: middle; width: 16px; height: 16px; } div.ftable-main-container div.ftable-title div.ftable-toolbar .ftable-toolbar-item span.ftable-toolbar-item-icon.ftable-toolbar-item-add-record { display: inline-flex; align-items: center; background-color: transparent; justify-content: center; width: 16px; height: 16px; } div.ftable-main-container div.ftable-title div.ftable-toolbar .ftable-toolbar-item span.ftable-toolbar-item-icon.ftable-toolbar-item-add-record::before { content: "➕"; font-size: 14px; } div.ftable-main-container div.ftable-title div.ftable-toolbar .ftable-toolbar-item span.ftable-toolbar-item-text { display: inline-block; margin: 2px; vertical-align: middle; } div.ftable-main-container table.ftable { width: 100%; } div.ftable-main-container table.ftable thead th { padding: 0px 3px 0px 6px; vertical-align: middle; text-align: left; } div.ftable-main-container table.ftable thead th.ftable-column-header { height: 1px; /* this is so the heigth of the div inside can be set to 100% */ } div.ftable-main-container table.ftable thead th.ftable-column-header div.ftable-column-header-container { position: relative; display: table; /* display table so the inside elements can be easily aligned vertically */ width: 100%; /* width=100% is redundant for regular div, but for display table it is needed */ height: 100% !important; /* height at 100% so the resize bar in it will have full height too */ } div.ftable-main-container table.ftable thead th.ftable-column-header div.ftable-column-header-container span.ftable-column-header-text { display: table-cell; vertical-align: middle; /* this works since we have display=table-cell */ padding-top: 4px; padding-bottom: 3px; } div.ftable-main-container table.ftable thead th.ftable-column-header div.ftable-column-header-container div.ftable-column-resize-handler { position: absolute; display: table-cell; vertical-align: middle; height: 100%; /* so the resize bar fills the whole height */ width: 8px; right: -8px; z-index: 2; cursor: col-resize; } div.ftable-main-container table.ftable thead th.ftable-command-column-header { text-align: center; width: 1%; } div.ftable-main-container table.ftable thead th.ftable-column-header-select { text-align: center; width: 1%; } div.ftable-main-container table.ftable thead th.ftable-column-header-select input { cursor: pointer; } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable { cursor: pointer; } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable .ftable-sortable-text { padding-right: 20px; /* Space for sort indicator */ } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable .ftable-column-header-container { position: relative; } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable .ftable-column-header-container::before, div.ftable-main-container table.ftable thead th.ftable-column-header-sortable .ftable-column-header-container::after { content: ''; position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.1em; color: #999; opacity: 0.7; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable .ftable-column-header-container::before { content: '▲'; right: 0.55em; } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable .ftable-column-header-container::after { content: '▼'; right: 0px; } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable.ftable-column-header-sorted-asc .ftable-column-header-container::before { color: #222; opacity: 1; font-weight: bold; } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable.ftable-column-header-sorted-asc .ftable-column-header-container::after { opacity: 0.7; } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable.ftable-column-header-sorted-desc .ftable-column-header-container::after { color: #222; opacity: 1; font-weight: bold; } div.ftable-main-container table.ftable thead th.ftable-column-header-sortable.ftable-column-header-sorted-desc .ftable-column-header-container::before { opacity: 0.7; } div.ftable-main-container table.ftable tbody tr > td .ftable-command-button { margin: 5px; padding: 0px; cursor: pointer; border: none; display: inline; } div.ftable-main-container table.ftable tbody tr > td .ftable-command-button span { display: none; } div.ftable-main-container table.ftable tbody tr > td.ftable-command-column { text-align: center; vertical-align: middle; } div.ftable-main-container table.ftable tbody tr > td.ftable-selecting-column { text-align: center; vertical-align: middle; } div.ftable-main-container table.ftable tbody tr > td.ftable-selecting-column input { cursor: pointer; } div.ftable-main-container table.ftable tbody tr > td .ftable-edit-command-button { width: 16px; height: 16px; background-color: transparent; } div.ftable-main-container table.ftable tbody tr > td .ftable-edit-command-button::before { content: "📝"; font-size: 14px; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; } div.ftable-main-container table.ftable tbody tr > td .ftable-clone-command-button { width: 16px; height: 16px; background-color: transparent; } div.ftable-main-container table.ftable tbody tr > td .ftable-clone-command-button::before { content: "📋"; font-size: 14px; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; } div.ftable-main-container table.ftable tbody tr > td .ftable-delete-command-button { width: 16px; height: 16px; background-color: transparent; } div.ftable-main-container table.ftable tbody tr > td .ftable-delete-command-button::before { content: "🗑️ "; font-size: 14px; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; } div.ftable-main-container table.ftable tbody tr.ftable-no-data-row { text-align: center; } div.ftable-main-container > div.ftable-bottom-panel { position: relative; min-height: 24px; text-align: left; } div.ftable-main-container > div.ftable-bottom-panel div.ftable-right-area { right: 0px; top: 0px; bottom: 0px; position: absolute; } div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list { display: inline-block; } div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number, div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-space, div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-first, div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-last, div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-previous, div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-next, div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-active { padding: 2px 5px; display: inline-block; cursor: pointer; } div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-space, div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-active, div.ftable-main-container > div.ftable-bottom-panel .ftable-page-list .ftable-page-number-disabled { cursor: default; } div.ftable-main-container > div.ftable-bottom-panel span.ftable-page-size-change { margin-left: 5px; } div.ftable-main-container > div.ftable-bottom-panel span.ftable-goto-page { margin-left: 5px; } div.ftable-main-container > div.ftable-bottom-panel span.ftable-goto-page input[type=text] { width: 22px; } div.ftable-main-container > div.ftable-bottom-panel span.ftable-page-info { vertical-align: middle; } div.ftable-main-container div.ftable-column-resize-bar { opacity: 0.5; filter: alpha(opacity=50); position: absolute; width: 1px; background-color: #000; } form.ftable-dialog-form div.ftable-input-field-container { padding: 2px 0px 3px 0px; border-bottom: 1px solid #ddd; } form.ftable-dialog-form div.ftable-input-field-container:last-child { border: none; } form.ftable-dialog-form div.ftable-input-label { padding: 2px 3px; font-size: 1.1em; color: #666; } form.ftable-dialog-form div.ftable-input { padding: 2px; } form.ftable-dialog-form div.ftable-date-input { /* No additional style */ } form.ftable-dialog-form div.ftable-text-input { /* No additional style */ } form.ftable-dialog-form span.ftable-option-text-clickable { position: relative; top: -2px; } form.ftable-dialog-form div.ftable-textarea-input textarea { width: 300px; min-height: 60px; } form.ftable-dialog-form div.ftable-checkbox-input span, form.ftable-dialog-form div.ftable-radio-input span { padding-left: 4px; } form.ftable-dialog-form div.ftable-radio-input input, form.ftable-dialog-form div.ftable-checkbox-input input, form.ftable-dialog-form span.ftable-option-text-clickable { cursor: pointer; } .ftable-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 1000; display: none; } .ftable-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 20px; border-radius: 5px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); z-index: 1001; max-width: 90%; max-height: 90vh; overflow: auto; } .ftable-modal-header { margin-bottom: 15px; margin-top: 0px; padding-bottom: 10px; border-bottom: 1px solid #eee; } .ftable-modal-footer { margin-top: 15px; padding-top: 10px; border-top: 1px solid #eee; text-align: right; } .ftable-modal-close { position: absolute; top: 10px; right: 10px; cursor: pointer; font-size: 28px; font-weight: bold; color: #aaa; } .ftable-busy-modal { padding: 0px; } .ftable-dialog-button { opacity: 0.8; border: 1px solid #ccc; padding: 5px; margin: 5px; } .ftable-dialog-button:hover { background-color: #dedede; } div.ftable-busy-message { cursor: wait; margin: 0px; } div.ftable-contextmenu-overlay { position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 100; } .ftable-table-div { display: block; overflow-x: auto; } .ftable-table-div > table { overflow: hidden; } .ftable-toolbarsearch { width: 90%; min-width: fit-content; } th.ftable-toolbarsearch-reset { text-align: center !important; } div.ftable-column-selection-container { position: absolute; border: 1px solid #C8C8C8; background: #fff; color: #000; z-index: 101; padding: 5px; } div.ftable-column-selection-container ul.ftable-column-select-list { margin: 0px; padding: 0px; list-style: none; } div.ftable-column-selection-container ul.ftable-column-select-list li { margin: 0px; padding: 2px 0px; } div.ftable-column-selection-container ul.ftable-column-select-list li label span { position: relative; top: -1px; margin-left: 4px; } div.ftable-column-selection-container ul.ftable-column-select-list li input[type="checkbox"] { cursor: pointer; } .ftable-yesno-check-wrapper { display: flex; align-items: center; } .ftable-yesno-check-text, .ftable-yesno-check-fixedlabel { margin-left: 4px; } .ftable-yesno-check-text:before { content: attr(data-no); } .ftable-yesno-check-input:checked ~ .ftable-yesno-check-text:before { content: attr(data-yes); } div.ftable-main-container { font-family: 'Segoe UI Semilight', 'Open Sans', Verdana, Arial, Helvetica, sans-serif; font-weight: 300; font-size: 14px; background: #fff; line-height: 1.3; } div.ftable-main-container div.ftable-title { background-color: #3e1a98; padding-left: 10px; } div.ftable-main-container div.ftable-title div.ftable-title-text { font-family: 'Segoe UI Semilight', 'Open Sans', Verdana, Arial, Helvetica, sans-serif; font-weight: 300; font-size: 19px; line-height: 34px; color: #fff; } div.ftable-main-container div.ftable-title div.ftable-toolbar { bottom: 0px; right: 0px; position: absolute; } div.ftable-main-container div.ftable-title div.ftable-toolbar span.ftable-toolbar-item { background-color: #4824a2; color: white; } div.ftable-main-container div.ftable-title div.ftable-toolbar span.ftable-toolbar-item.ftable-toolbar-item-hover { background-color: #4f2ba9; padding-bottom: 6px; } div.ftable-main-container table.ftable { border: 1px solid #603cba; border-collapse: collapse; border-spacing: 0; } div.ftable-main-container table.ftable > thead { background-color: #603cba; } div.ftable-main-container table.ftable > thead th { font-family: 'Segoe UI Semilight', 'Open Sans', Verdana, Arial, Helvetica, sans-serif; font-weight: 300; font-size: 15px; color: #fff; } div.ftable-main-container table.ftable > thead th.ftable-column-header div.ftable-column-header-container { height: 24px; margin-left: 4px; } div.ftable-main-container table.ftable > thead th.ftable-column-header div.ftable-column-header-container div.ftable-column-resize-handler { height: 28px; } div.ftable-main-container table.ftable > thead th.ftable-column-header div.ftable-column-header-container span.ftable-column-header-text { margin-top: 2px; } div.ftable-main-container table.ftable > tbody > tr { background-color: #fff; } div.ftable-main-container table.ftable > tbody > tr > td { border: 1px solid #ddd; } div.ftable-main-container table.ftable > tbody > tr.ftable-data-row > td { padding: 4px; } div.ftable-main-container table.ftable > tbody > tr.ftable-row-even { background-color: #f9f9f9; } div.ftable-main-container table.ftable > tbody > tr:hover { background: #e8eaef; } div.ftable-main-container table.ftable > tbody > tr.ftable-row-selected { color: #fff; background-color: #825edc; } div.ftable-main-container table.ftable > tbody > tr.ftable-row-created { background-color: #936fed; } div.ftable-main-container table.ftable > tbody > tr.ftable-row-updated { background-color: #936fed; } div.ftable-main-container table.ftable > tbody > tr.ftable-row-deleting { background-color: #e51400; color: #fff; } div.ftable-main-container table.ftable > tbody > tr.ftable-child-row > td { padding: 2px; background-color: #fff; } div.ftable-main-container div.ftable-bottom-panel { background-color: #4f2ba9; color: #fff; min-height: 22.9px; font-size: 13px; border: 1px solid #603cba; border-top: none; } div.ftable-main-container div.ftable-bottom-panel .ftable-page-list { margin: 1px 0px 0px 0px; } div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-space, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-first, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-last, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-previous, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-next, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-active { background-color: #603cba; margin: 1px; padding: 2px 5px; color: #fff; } div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number:hover, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-first:hover, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-last:hover, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-previous:hover, div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-next:hover { background-color: #825edc; } div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-disabled { opacity: 0.75; filter: alpha(opacity=75); color: #ccc; cursor: default; } div.ftable-main-container div.ftable-bottom-panel .ftable-page-list .ftable-page-number-disabled:hover { background-color: #603cba; } div.ftable-main-container div.ftable-bottom-panel span.ftable-page-info { display: inline-block; padding: 4px; } div.ftable-main-container div.ftable-bottom-panel span.ftable-page-size-change { display: inline-block; padding: 2px 0px 2px 0px; } div.ftable-main-container div.ftable-bottom-panel span.ftable-goto-page { display: inline-block; padding: 2px 0px 2px 0px; } form.ftable-dialog-form { font-family: 'Segoe UI Semilight', 'Open Sans', Verdana, Arial, Helvetica, sans-serif; font-weight: 400; font-size: 14px; }