aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-03-05 18:19:53 +0100
committerRobert Jaros <rjaros@finn.pl>2019-03-05 18:19:53 +0100
commitf96b7263a4ad5409b9d8eeea8e7b6359085203d1 (patch)
treee58caf1b4628347b83144fb5a04a7087401ee1ba /kvision-modules
parent7f551dd4494ed3585180dcf06b5a8ce347019826 (diff)
downloadkvision-f96b7263a4ad5409b9d8eeea8e7b6359085203d1.tar.gz
kvision-f96b7263a4ad5409b9d8eeea8e7b6359085203d1.tar.bz2
kvision-f96b7263a4ad5409b9d8eeea8e7b6359085203d1.zip
Refactor kvision-bootstrap module.
Diffstat (limited to 'kvision-modules')
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt6
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css4
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/resources/css/style.css154
3 files changed, 162 insertions, 2 deletions
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt
index 105fa507..01e1f3c3 100644
--- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt
+++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt
@@ -33,17 +33,19 @@ internal object KVManagerBootstrap {
private val bootstrapWebpack = try {
val bootswatch = links.asList().find { it.getAttribute("href")?.contains("bootstrap.min.css") ?: false }
if (bootswatch != null) {
+ require("bootstrap-webpack!./js/bootstrap.config.js")
if (bootswatch.getAttribute("href")?.contains("/paper/") == true) {
require("./css/paper.css")
}
- require("bootstrap-webpack!./js/bootstrap.config.js")
+ require("./css/style.css")
} else {
require("bootstrap-webpack")
+ require("./css/style.css")
}
} catch (e: Throwable) {
}
private val fontAwesomeWebpack = try {
- require("font-awesome-webpack")
+ require("font-awesome-webpack-4")
} catch (e: Throwable) {
}
private val awesomeBootstrapCheckbox = try {
diff --git a/kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css b/kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css
index 6e923117..1c783608 100644
--- a/kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css
+++ b/kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css
@@ -10,3 +10,7 @@ body {
.radio label, .checkbox label {
white-space: nowrap;
}
+
+.modal-title {
+ font-size: 18px;
+}
diff --git a/kvision-modules/kvision-bootstrap/src/main/resources/css/style.css b/kvision-modules/kvision-bootstrap/src/main/resources/css/style.css
new file mode 100644
index 00000000..fbb6f00a
--- /dev/null
+++ b/kvision-modules/kvision-bootstrap/src/main/resources/css/style.css
@@ -0,0 +1,154 @@
+.splitpanel-vertical {
+ display: flex;
+ flex-direction: row;
+ overflow: auto;
+}
+
+.splitpanel-vertical > *:first-child {
+ max-width: calc(100% - 9px);
+}
+
+.splitpanel-vertical > * {
+ flex: 0 0 auto;
+ overflow: auto;
+}
+
+.splitpanel-vertical > *:last-child {
+ flex: 1 1 auto;
+ overflow: auto;
+}
+
+.splitpanel-horizontal {
+ display: flex;
+ flex-direction: column;
+ overflow: auto;
+}
+
+.splitpanel-horizontal > *:first-child {
+ max-height: calc(100% - 9px);
+}
+
+.splitpanel-horizontal > * {
+ flex: 0 0 auto;
+ overflow: auto;
+}
+
+.splitpanel-horizontal > *:last-child {
+ flex: 1 1 auto;
+ overflow: auto;
+}
+
+
+.splitter-vertical {
+ flex: 0 0 auto;
+ width: 9px;
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAhCAQAAABOpSL+AAAAIklEQVR4AWMwbb/PdR+JZDD9f1/oPhI5sgVGBSruc9xHIgGdSQqqQJGkRgAAAABJRU5ErkJggg==') center center no-repeat #cecece;
+ cursor: col-resize;
+}
+
+.splitter-horizontal {
+ flex: 0 0 auto;
+ height: 9px;
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAICAQAAADdTl4aAAAAIElEQVQoz2MwrTD9TxFsZ7jPcV+IIsjFQAUw6hFqegQA+xzRHT2p7pEAAAAASUVORK5CYII=') center center no-repeat #cecece;
+ cursor: row-resize;
+}
+
+.trix-control {
+ overflow-y: auto;
+}
+
+trix-toolbar .trix-button-group {
+ margin-bottom: 3px;
+}
+
+.form-inline .form-group {
+ margin-right:6px;
+}
+
+.form-inline .checkbox, .form-inline .radio {
+ margin-right:6px;
+}
+
+.form-inline .form-group .form-control, .navbar-form .form-group .form-control {
+ margin-left:6px;
+}
+
+.form-horizontal .checkbox, .form-horizontal .radio {
+ padding-left: 25px;
+}
+
+.form-inline .form-group trix-editor.form-control {
+ margin-left: 0px;
+ width: 100%;
+}
+
+.form-inline .form-group, .form-inline .control-label {
+ vertical-align: top;
+}
+
+.bootstrap-touchspin .input-group-btn-vertical> .input-sm {
+ padding: 7px 10px;
+ height: 6px;
+}
+
+.bootstrap-touchspin .input-group-btn-vertical> .input-lg {
+ height: 24px;
+}
+
+.kv-spinner-btn-none .input-group-btn-vertical {
+ display: none;
+}
+
+.kv-spinner-btn-none .form-control {
+ border-radius: 4px !important;
+}
+
+.kv-spinner-btn-vertical .form-control {
+ border-radius: 4px 0px 0px 4px !important;
+}
+
+.kv-radiogroup .radio {
+ margin-top: -5px;
+}
+
+.kv-radiogroup-inline label {
+ margin-right: 10px;
+}
+
+.kv-radio-checkbox {
+ padding-left: 7px;
+}
+
+.kv-window {
+ border-radius: 0px;
+}
+
+.kv-window .modal-header {
+ height: 40px;
+ padding: 10px 15px 5px 15px;
+}
+
+.kv-window .modal-header .modal-title {
+ white-space: nowrap;
+}
+
+ul.dropdown-menu li a {
+ cursor: pointer;
+}
+
+.col-nopadding {
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.kv-preview-thumb .btn, .kv-zoom-actions .btn, .file-zoom-dialog .floating-buttons .btn {
+ padding: 5px 8px;
+}
+
+.file-drop-zone.clickable:hover {
+ border: 1px dashed #999;
+}
+
+.file-drop-zone.clickable:focus {
+ border: 1px solid #5acde2;
+}