From b9b0395927f9a7754046db344abd9bb7fd338edc Mon Sep 17 00:00:00 2001 From: Raghavendra Kamath Date: Tue, 20 Feb 2018 17:31:35 +0530 Subject: [PATCH] Add webform css and add event loop on homepage --- .../public/css/bootstrap-for-webform.css | 1710 +++++++++++++++++ foundation/public/css/erpnext-org-theme.css | 70 +- foundation/public/less/erpnext-org-theme.less | 71 +- foundation/templates/base.html | 7 +- foundation/website/css/web_form.css | 52 + .../website/doctype/web_form/__init__.py | 0 .../doctype/web_form/templates/web_form.html | 383 ++++ .../web_form/templates/web_form_row.html | 4 + .../doctype/web_form/test_records.json | 48 + .../website/doctype/web_form/test_web_form.py | 68 + .../website/doctype/web_form/web_form.js | 80 + .../website/doctype/web_form/web_form.json | 1217 ++++++++++++ .../website/doctype/web_form/web_form.py | 485 +++++ .../doctype/web_form_field/__init__.py | 0 .../web_form_field/web_form_field.json | 432 +++++ .../doctype/web_form_field/web_form_field.py | 9 + foundation/www/index.html | 32 +- foundation/www/index.py | 10 + 18 files changed, 4617 insertions(+), 61 deletions(-) create mode 100644 foundation/public/css/bootstrap-for-webform.css create mode 100644 foundation/website/css/web_form.css create mode 100644 foundation/website/doctype/web_form/__init__.py create mode 100644 foundation/website/doctype/web_form/templates/web_form.html create mode 100644 foundation/website/doctype/web_form/templates/web_form_row.html create mode 100644 foundation/website/doctype/web_form/test_records.json create mode 100644 foundation/website/doctype/web_form/test_web_form.py create mode 100644 foundation/website/doctype/web_form/web_form.js create mode 100644 foundation/website/doctype/web_form/web_form.json create mode 100644 foundation/website/doctype/web_form/web_form.py create mode 100644 foundation/website/doctype/web_form_field/__init__.py create mode 100644 foundation/website/doctype/web_form_field/web_form_field.json create mode 100644 foundation/website/doctype/web_form_field/web_form_field.py create mode 100644 foundation/www/index.py diff --git a/foundation/public/css/bootstrap-for-webform.css b/foundation/public/css/bootstrap-for-webform.css new file mode 100644 index 00000000..951b2028 --- /dev/null +++ b/foundation/public/css/bootstrap-for-webform.css @@ -0,0 +1,1710 @@ +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #d1d8dd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #d1d8dd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #d1d8dd; +} +.table .table { + background-color: #fff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #d1d8dd; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #d1d8dd; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-child(odd) { + background-color: #f9f9f9; +} +.table-hover > tbody > tr:hover { + background-color: #f5f5f5; +} +table col[class*="col-"] { + position: static; + display: table-column; + float: none; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + display: table-cell; + float: none; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: transparent; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: rgba(0, 0, 0, 0); +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: transparent; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: rgba(0, 0, 0, 0); +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: transparent; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: rgba(0, 0, 0, 0); +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: transparent; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: rgba(0, 0, 0, 0); +} +.table-responsive { + min-height: .01%; + overflow-x: auto; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #d1d8dd; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 5px; + font-size: 14px; + line-height: 1.42857143; + color: #555; +} +.form-control { + display: block; + width: 100%; + height: 30px; + padding: 4px 10px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #d1d8dd; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #ced5db; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(206, 213, 219, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(206, 213, 219, .6); +} +.form-control:focus { + border-color: #ced5db; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 3px rgba(206, 213, 219, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 3px rgba(206, 213, 219, .6); +} +.form-control::-moz-placeholder { + color: #d1d8dd; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #d1d8dd; +} +.form-control::-webkit-input-placeholder { + color: #d1d8dd; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + cursor: not-allowed; + background-color: #eee; + opacity: 1; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"], + input[type="time"], + input[type="datetime-local"], + input[type="month"] { + line-height: 30px; + } + input[type="date"].input-sm, + input[type="time"].input-sm, + input[type="datetime-local"].input-sm, + input[type="month"].input-sm, + .input-group-sm input[type="date"], + .input-group-sm input[type="time"], + .input-group-sm input[type="datetime-local"], + .input-group-sm input[type="month"] { + line-height: 30px; + } + input[type="date"].input-lg, + input[type="time"].input-lg, + input[type="datetime-local"].input-lg, + input[type="month"].input-lg, + .input-group-lg input[type="date"], + .input-group-lg input[type="time"], + .input-group-lg input[type="datetime-local"], + .input-group-lg input[type="month"] { + line-height: 46px; + } +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; +} +.radio label, +.checkbox label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-top: 4px \9; + margin-left: -20px; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} +.form-control-static { + padding-top: 5px; + padding-bottom: 5px; + margin-bottom: 0; +} +.form-control-static.input-lg, +.form-control-static.input-sm { + padding-right: 0; + padding-left: 0; +} +.input-sm { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm { + height: 30px; + line-height: 30px; +} +textarea.input-sm, +select[multiple].input-sm { + height: auto; +} +.form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.form-group-sm .form-control { + height: 30px; + line-height: 30px; +} +textarea.form-group-sm .form-control, +select[multiple].form-group-sm .form-control { + height: auto; +} +.input-lg { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.input-lg { + height: 46px; + line-height: 46px; +} +textarea.input-lg, +select[multiple].input-lg { + height: auto; +} +.form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.form-group-lg .form-control { + height: 46px; + line-height: 46px; +} +textarea.form-group-lg .form-control, +select[multiple].form-group-lg .form-control { + height: auto; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 37.5px; +} +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 30px; + height: 30px; + line-height: 30px; + text-align: center; + pointer-events: none; +} +.input-lg + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px; +} +.input-sm + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #98d85b; +} +.has-success .form-control { + border-color: #98d85b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-success .form-control:focus { + border-color: #7ece32; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ccecad; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ccecad; +} +.has-success .input-group-addon { + color: #98d85b; + background-color: transparent; + border-color: #98d85b; +} +.has-success .form-control-feedback { + color: #98d85b; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #ffa00a; +} +.has-warning .form-control { + border-color: #ffa00a; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-warning .form-control:focus { + border-color: #d68300; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ffc870; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ffc870; +} +.has-warning .input-group-addon { + color: #ffa00a; + background-color: transparent; + border-color: #ffa00a; +} +.has-warning .form-control-feedback { + color: #ffa00a; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #ff5858; +} +.has-error .form-control { + border-color: #ff5858; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-error .form-control:focus { + border-color: #ff2525; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ffbebe; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ffbebe; +} +.has-error .input-group-addon { + color: #ff5858; + background-color: transparent; + border-color: #ff5858; +} +.has-error .form-control-feedback { + color: #ff5858; +} +.has-feedback label ~ .form-control-feedback { + top: 25px; +} +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #6b8196; +} +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .form-control-static { + display: inline-block; + } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; + } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 5px; + margin-top: 0; + margin-bottom: 0; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 25px; +} +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 5px; + margin-bottom: 0; + text-align: right; + } +} +.form-horizontal .has-feedback .form-control-feedback { + right: 15px; +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 14.3px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + } +} +.btn { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus, +.btn.focus, +.btn:active.focus, +.btn.active.focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus, +.btn.focus { + color: inherit; + text-decoration: none; +} +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; +} +.btn-default { + color: inherit; + background-color: #f0f4f7; + border-color: transparent; +} +.btn-default:hover, +.btn-default:focus, +.btn-default.focus, +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: inherit; + background-color: #cfdce5; + border-color: rgba(0, 0, 0, 0); +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #f0f4f7; + border-color: transparent; +} +.btn-default .badge { + color: #f0f4f7; + background-color: inherit; +} +.btn-primary { + color: #fff; + background-color: #5e64ff; + border-color: #444bff; +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary.focus, +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #2b33ff; + border-color: #0711ff; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #5e64ff; + border-color: #444bff; +} +.btn-primary .badge { + color: #5e64ff; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #98d85b; + border-color: #8bd346; +} +.btn-success:hover, +.btn-success:focus, +.btn-success.focus, +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #7ece32; + border-color: #6db22a; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #98d85b; + border-color: #8bd346; +} +.btn-success .badge { + color: #98d85b; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #8d99a6; + border-color: #7f8c9b; +} +.btn-info:hover, +.btn-info:focus, +.btn-info.focus, +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #707f90; + border-color: #616e7c; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #8d99a6; + border-color: #7f8c9b; +} +.btn-info .badge { + color: #8d99a6; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #ffa00a; + border-color: #f09300; +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning.focus, +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #d68300; + border-color: #b26d00; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #ffa00a; + border-color: #f09300; +} +.btn-warning .badge { + color: #ffa00a; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #ff5858; + border-color: #ff3f3f; +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger.focus, +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #ff2525; + border-color: #ff0101; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #ff5858; + border-color: #ff3f3f; +} +.btn-danger .badge { + color: #ff5858; + background-color: #fff; +} +.btn-link { + font-weight: normal; + color: #36414c; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #161b1f; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #777; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; + visibility: hidden; +} +.collapse.in { + display: block; + visibility: visible; +} +tr.collapse.in { + display: table-row; +} +tbody.collapse.in { + display: table-row-group; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-transition-duration: .35s; + -o-transition-duration: .35s; + transition-duration: .35s; + -webkit-transition-property: height, visibility; + -o-transition-property: height, visibility; + transition-property: height, visibility; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px solid; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #d8dfe5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f0f4f7; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: inherit; + text-decoration: none; + background-color: #f0f4f7; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px solid; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child > .btn:last-child, +.btn-group > .btn-group:first-child > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:last-child > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-left-radius: 4px; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +.btn-group-justified > .btn-group .dropdown-menu { + left: auto; +} +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-right: 0; + padding-left: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 4px 10px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #555; + text-align: center; + background-color: #f0f4f7; + border: 1px solid #d1d8dd; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + margin-left: -1px; +} +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-size: 12px; + font-weight: normal; + line-height: 1.4; + visibility: visible; + filter: alpha(opacity=0); + opacity: 0; +} +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9; +} +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + text-decoration: none; + background-color: #000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-left .tooltip-arrow { + right: 5px; + bottom: 0; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} diff --git a/foundation/public/css/erpnext-org-theme.css b/foundation/public/css/erpnext-org-theme.css index 1fe2dedc..65785b7a 100644 --- a/foundation/public/css/erpnext-org-theme.css +++ b/foundation/public/css/erpnext-org-theme.css @@ -1,4 +1,5 @@ @import "reset.css"; +/*@import (css) "bootstrap-temp.css";*/ .indicator, .indicator-right { background: none; @@ -360,7 +361,6 @@ hr { font-size: 0.75rem; } .footer-end a { - text-decoration: underline; color: #8D99A6; } .footer-end a:hover { @@ -371,6 +371,47 @@ hr { margin-right: .5em; } /* loaned from bootstrap*/ +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #8d99a6; + text-align: left; +} +th { + text-align: left; +} +.note-popover .popover-content > .btn-group, +.panel-heading.note-toolbar > .btn-group { + margin-top: 5px; + margin-right: 5px; + margin-left: 0; +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.note-popover .popover-content, +.panel-heading.note-toolbar { + padding: 0 0 5px 5px; + margin: 0; +} +.panel-default > .panel-heading { + color: #333; + background-color: #F7FAFC; + border-color: #d1d8dd; +} +.panel-heading, +.panel-body { + padding-left: 1rem; +} +.panel-heading { + padding: .5rem 1rem; + border-bottom: 1px solid transparent; + border-top-left-radius: .25em; + border-top-right-radius: .25em; +} .modal-open .modal { overflow-x: hidden; overflow-y: auto; @@ -467,27 +508,6 @@ hr { border: 1px solid transparent; border-radius: .25em; } -.table-bordered { - border: 1px solid #d1d8dd; -} -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #d1d8dd; -} -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: .5em; - vertical-align: top; - border-top: 1px solid #EBEFF2; -} .btn-block { display: block; width: 100%; @@ -682,6 +702,12 @@ img.blog-cover-image, .media-heading { margin-top: 0; } +.with-border { + border: 1px solid #d1d8dd; + border-radius: 0.25em; + padding: 1rem; + margin-bottom: 2rem; +} /* individual elements */ .domain-links { font-size: 1.5rem; diff --git a/foundation/public/less/erpnext-org-theme.less b/foundation/public/less/erpnext-org-theme.less index d3412399..ea69a226 100644 --- a/foundation/public/less/erpnext-org-theme.less +++ b/foundation/public/less/erpnext-org-theme.less @@ -1,4 +1,5 @@ @import (css) "reset.css"; +/*@import (css) "bootstrap-temp.css";*/ @import "variables.less"; @import "indicator.less"; @@ -231,9 +232,12 @@ a { } +.list-circle { + list-style: circle; +} + .bulleted-list { margin: 0; - list-style: circle; padding-left: 1em; li { @@ -337,7 +341,6 @@ hr { } .footer-end a{ - text-decoration: underline; color: @text-muted; &:hover{ color: #fff; @@ -351,6 +354,44 @@ hr { /* loaned from bootstrap*/ +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #8d99a6; + text-align: left; +} +th { + text-align: left; +} + +.note-popover .popover-content > .btn-group, .panel-heading.note-toolbar > .btn-group { + margin-top: 5px; + margin-right: 5px; + margin-left: 0; +} +.btn-group, .btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.note-popover .popover-content, .panel-heading.note-toolbar { + padding: 0 0 5px 5px; + margin: 0; +} +.panel-default > .panel-heading { + color: #333; + background-color:@panel-bg; + border-color: @border-color; +} +.panel-heading, .panel-body { + padding-left: 1rem; +} +.panel-heading { + padding: .5rem 1rem; + border-bottom: 1px solid transparent; + border-top-left-radius: .25em; + border-top-right-radius: .25em; +} .modal-open .modal { overflow-x: hidden; overflow-y: auto; @@ -453,20 +494,6 @@ hr { border-radius: .25em; } -.table-bordered { - border: @border; -} - -.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { - border: @border; -} - -.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { - padding: .5em; - vertical-align: top; - border-top: 1px solid @light-border-color; -} - .btn-block { display: block; width: 100%; @@ -676,7 +703,7 @@ img.blog-cover-image, .blog-text img, .screenshot { .media { display: flex; padding: 1.5rem; - background: #fafbfc; + background: @light-bg; margin-bottom: 1.5rem; border-radius: .25em; border: 1px solid lightgray; @@ -689,7 +716,15 @@ img.blog-cover-image, .blog-text img, .screenshot { .media-heading { margin-top: 0; } -.media-object { +.with-border { + border: @border; + border-radius: 0.25em; + padding: 1rem; + margin-bottom: 2rem; + &:hover{ + border-color: @text-light:; + background-color: @light-bg; + } } /* individual elements */ diff --git a/foundation/templates/base.html b/foundation/templates/base.html index 108b4d11..e447117a 100644 --- a/foundation/templates/base.html +++ b/foundation/templates/base.html @@ -17,12 +17,14 @@ {%- block head -%} {% block meta_block %}{% endblock %} + {% if path != '' %} + {% endif %} {%- endblock -%} - {# loading required JS for login #} - - {# loading required JS for login #}
diff --git a/foundation/website/css/web_form.css b/foundation/website/css/web_form.css new file mode 100644 index 00000000..5b006cda --- /dev/null +++ b/foundation/website/css/web_form.css @@ -0,0 +1,52 @@ +.introduction { + border-bottom: 1px solid #e1e9f0; + padding: 15px; + padding-top: 0px; + margin-left: -15px; + margin-right: -15px; + margin-bottom: 15px; +} + +.form-group label { + font-weight: normal; +} + +input[type='checkbox'] { + margin-top: 3px; +} + +.checkbox label { + font-size: 12px; +} + +.web-form-page, .web-form-page .section { + padding: 20px 0px; +} + +.web-form-grid-row input, .web-form-grid-row select { + border: 0px; + padding: 0px; +} +.web-form-grid-row input:focus, .web-form-grid-row select:focus { + box-shadow: none; +} +.web-form-grid-row .form-group { + margin: 0px; +} + +.slide-progress { + /*border-top: 1px solid #d1d8dd;*/ + margin-top: -10px; +} +.slide-progress .fa-fw { + vertical-align: middle; + margin-right: 9px; + padding-left: 2px; + cursor: pointer; +} +.slide-progress .icon-circle-blank { + font-size: 12px; +} +.slide-progress .icon-circle { + font-size: 14px; +} diff --git a/foundation/website/doctype/web_form/__init__.py b/foundation/website/doctype/web_form/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/foundation/website/doctype/web_form/templates/web_form.html b/foundation/website/doctype/web_form/templates/web_form.html new file mode 100644 index 00000000..c7476bc2 --- /dev/null +++ b/foundation/website/doctype/web_form/templates/web_form.html @@ -0,0 +1,383 @@ +{% extends "foundation/templates/web.html" %} + +{% block title %}{{ _(title) }}{% endblock %} + +{% block header %} +

{{ _(title) }}

+{% endblock %} + +{% block breadcrumbs %} +{% if has_header and login_required %} +{% include "templates/includes/breadcrumbs.html" %} +{% endif %} +{% endblock %} + +{% block header_actions %} + {% if not read_only and has_header %} +
+ {% if login_required -%} + + {{ _("Cancel") }} + {%- endif %} + {% if not is_list %} + + {% endif %} +
+ {% endif %} + {% if is_list %} +
+ + {{ _("New") }} + +
+ {% endif %} + {%- if allow_print and not is_list and not _login_required -%} + + {%- endif -%} +{% endblock %} + +{% block page_content %} +
+ {% if introduction_text %} hello +

{{ _(introduction_text) }}

+ {% endif %} +
+
+{% if _login_required %} + +{% elif is_list %} + {% include "templates/includes/list/list.html" %} + +{% else %} +
+ +{%- macro properties(field) %} + name="{{ field.fieldname }}" data-fieldname="{{ field.fieldname }}" + {% if field.placeholder -%} placeholder="{{ _(field.placeholder) }}" {%- endif %} + data-label="{{ _(field.label) }}" data-fieldtype="{{ field.fieldtype }}" + data-doctype="{{ field.parent }}" data-default="{{ field.default or "" }}" + {{ field.reqd and "data-reqd=1" or "" }} + {{ (read_only or field.read_only) and "disabled" or "" }} +{% endmacro -%} + +{%- macro value(field, _doc) -%} + {%- if _doc -%} + {%- set _value = _doc.get(field.fieldname) or frappe.form_dict.get(field.fieldname) -%} + {%- else -%} + {%- set _value = frappe.form_dict.get(field.fieldname) or field.default -%} + {%- endif -%} + {{ "" if _value==None else _value }} +{%- endmacro -%} + +{%- macro help(field) -%} + {% if field.description -%} + {{ _(field.description) }} + {%- endif -%} +{%- endmacro %} + +{% macro label(field) %} + +{% endmacro %} + +{% macro render_field(field, _doc=None, with_label=True) %} + {% if field.hidden %} + + {% elif field.fieldtype == "HTML" %} +
+ {% if field.options %}{{ field.options }}{% endif %} +
+ {% elif field.fieldtype in ("Data", "Date", "Datetime", "Int", "Float") %} +
+ {% if with_label %}{{ label(field) }}{% endif %} + + {{ help(field) }} +
+ {% elif field.fieldtype=="Link" %} +
+ {% if with_label %}{{ label(field) }}{% endif %} + + {{ help(field) }} +
+ {% elif field.fieldtype=="Select" %} +
+ {% if with_label %}{{ label(field) }}{% endif %} + + {{ help(field) }} +
+ {% elif field.fieldtype in ("Text", "Small Text") %} +
+ {% if with_label %}{{ label(field) }}{% endif %} + {{ help(field) }} + +
+ {% elif field.fieldtype == "Text Editor" %} +
+ {% if with_label %}{{ label(field) }}{% endif %} + {{ help(field) }} +
{{ value(field, _doc) }}
+
+ {% elif field.fieldtype=="Attach" %} +
+ {% if with_label %}{{ label(field) }}{% endif %} + {% if value(field, _doc) -%} +

+ + {{ _doc.get(field.fieldname) }} + +
+

+ {%- endif %} +

+ +

+ {{ _("Max attachment size is {0}MB").format(max_attachment_size) }} +

+

+ {{ help(field) }} +
+ {% elif field.fieldtype=="Check" %} +
+
+ {% if with_label %} + + {% endif %} + {{ help(field) }} +
+
+ {% endif %} +{% endmacro %} + +{% macro render_row(field, d=None, hidden=False) %} + + {% for df in frappe.get_meta(field.options).fields %} + {% if df.in_list_view %} + <{{ 'th' if d==None else 'td' }} style="width: {{ (df.columns or 2) * 8.3333 }}%;"> + {% if d!=None %} + {{ render_field(df, d, False) }} + {% else %} + {{ _(df.label) }} + {% endif %} + + {% endif %} + {% endfor %} + + {% if d!=None %} + + {% endif %} + + +{% endmacro %} + +{% macro render_table(field) %} + {{ label(field) }} +
+ + + {{ render_row(field) }} + + + {{ render_row(field, {}, True) }} + {% if doc and doc.get(field.fieldname) %} + {% for d in doc.get(field.fieldname) %} + {{ render_row(field, d) }} + {% endfor %} + {% endif %} + +
+
+

+{% endmacro %} + + +{% if not frappe.form_dict.new and layout|len > 1 %} +
+ {% for page in layout %} + + {% endfor %} +
+{% endif %} + +
+ {% if frappe.form_dict.name and web_page_link_text %} + + {% endif %} + + {% for page in layout %} + {% set last_page = True if loop.index == layout|len else False %} +
+ {% if page.label %} +

{{ _(page.label) }}

+ {% endif %} + {% if page.description %} +

{{ _(page.description) }}

+
+ {% endif %} + + {% for section in page.sections %} +
+ {% if section.label %} +
{{ _(section.label) }}
+ {{ _(section.description) }} + {% endif %} +
+ {% for column in section.columns %} +
+ {% for field in column %} + {% if field.fieldtype=='Table' %} + {{ render_table(field) }} + {% else %} + {{ render_field(field, doc) }} + {% endif %} + {% endfor %} +
+ {% endfor %} +
+
+ {% endfor %} + {% if last_page and accept_payment %} +
+ {% if not doc.paid %} + {% if payment_button_help %} +
+ {{ payment_button_help }}
+ {% endif %} + + {{ payment_button_label or "Pay"}} + {% else %} +
{{ _("Payment Complete") }}
+ {% endif %} +
+ {% endif %} + +
+ {% if layout|len > 1 %} +

+ {{ _("Page {0} of {1}").format(loop.index, layout|len) }}

+ {% endif %} +
+

+ {%- if loop.index > 1 -%} + + {%- endif -%} + + {% if (loop.index == layout|len or frappe.form_dict.new) %} + {% if not read_only %} + + {% endif %} + {% elif layout|len > 1 %} + + {% endif %} +

+
+
+ {% endfor %} + +
+ +{% if allow_comments and not frappe.form_dict.new -%} +
+

+

{{ _("Comments") }}

+ {% include 'templates/includes/comments/comments.html' %} +
+{%- endif %} +{% endif %} +
+{% endblock %} + +{% block script %} + + + + + +{% endblock %} + +{% block style %} + + + +{% endblock %} diff --git a/foundation/website/doctype/web_form/templates/web_form_row.html b/foundation/website/doctype/web_form/templates/web_form_row.html new file mode 100644 index 00000000..2b999819 --- /dev/null +++ b/foundation/website/doctype/web_form/templates/web_form_row.html @@ -0,0 +1,4 @@ +
+ {{ title }} +
+ \ No newline at end of file diff --git a/foundation/website/doctype/web_form/test_records.json b/foundation/website/doctype/web_form/test_records.json new file mode 100644 index 00000000..080217e8 --- /dev/null +++ b/foundation/website/doctype/web_form/test_records.json @@ -0,0 +1,48 @@ +[{ + "allow_comments": 0, + "allow_edit": 1, + "allow_multiple": 1, + "doc_type": "Event", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": "Add events", + "login_required": 1, + "name": "manage-events", + "owner": "Administrator", + "page_name": "manage-events", + "published": 1, + "success_url": "/manage-events", + "title": "Manage Events", + "web_form_fields": [ + { + "doctype": "Web Form Field", + "fieldname": "subject", + "fieldtype": "Data", + "hidden": 0, + "idx": 1, + "label": "Title", + "read_only": 0, + "reqd": 1 + }, + { + "doctype": "Web Form Field", + "fieldname": "starts_on", + "fieldtype": "Date", + "hidden": 0, + "idx": 2, + "label": "Event Date", + "read_only": 0, + "reqd": 1 + }, + { + "doctype": "Web Form Field", + "fieldname": "description", + "fieldtype": "Text", + "hidden": 0, + "idx": 3, + "label": "Description", + "read_only": 0, + "reqd": 0 + } + ] +}] diff --git a/foundation/website/doctype/web_form/test_web_form.py b/foundation/website/doctype/web_form/test_web_form.py new file mode 100644 index 00000000..ab2af2fb --- /dev/null +++ b/foundation/website/doctype/web_form/test_web_form.py @@ -0,0 +1,68 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +import frappe +import unittest, json + +from frappe.website.render import build_page +from frappe.website.doctype.web_form.web_form import accept + +test_records = frappe.get_test_records('Web Form') + +class TestWebForm(unittest.TestCase): + def setUp(self): + frappe.conf.disable_website_cache = True + frappe.local.path = None + + def tearDown(self): + frappe.conf.disable_website_cache = False + frappe.local.path = None + + def test_basic(self): + frappe.set_user("Guest") + html = build_page("manage-events") + self.assertTrue('