From c55c3d014a28714a47050d973a6ab709379e6dd6 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Thu, 24 Mar 2016 11:57:55 +0100 Subject: [PATCH] Dev: moved template.css to styles-public --- application/controllers/admin/templates.php | 2 + application/controllers/survey/index.php | 1 + .../css => styles-public}/template.css | 0 templates/default/config.xml | 2 - templates/minimal-config.xml | 1 - templates/news_paper/config.xml | 4 +- templates/news_paper/css/template.css | 850 ------------------ templates/ubuntu_orange/config.xml | 4 +- templates/ubuntu_orange/css/template.css | 850 ------------------ 9 files changed, 5 insertions(+), 1709 deletions(-) rename {templates/default/css => styles-public}/template.css (100%) delete mode 100644 templates/news_paper/css/template.css delete mode 100644 templates/ubuntu_orange/css/template.css diff --git a/application/controllers/admin/templates.php b/application/controllers/admin/templates.php index 7b0562e856d..808b6755a02 100644 --- a/application/controllers/admin/templates.php +++ b/application/controllers/admin/templates.php @@ -952,6 +952,8 @@ protected function _initialise($templatename, $screenname, $editfile, $showsumma // User templates (are published only if exists) $oEditedTemplate->config->files->css->filename[]="../../../styles-public/bootstrap-for-template-editor.css"; $oEditedTemplate->config->files->js->filename[]="../../../scripts/bootstrap-for-template-editor.js"; + + $oEditedTemplate->config->files->css->filename[]="../../styles-public/template.css"; } //App()->getClientScript()->reset(); diff --git a/application/controllers/survey/index.php b/application/controllers/survey/index.php index ea9bd494a76..7e4a6dbdd63 100644 --- a/application/controllers/survey/index.php +++ b/application/controllers/survey/index.php @@ -62,6 +62,7 @@ public function run() if($oTemplate->cssFramework == 'bootstrap') { App()->bootstrap->register(); + App()->getClientScript()->registerCssFile( Yii::app()->getBaseUrl(true).'/styles-public/template.css' ); } useFirebug(); diff --git a/templates/default/css/template.css b/styles-public/template.css similarity index 100% rename from templates/default/css/template.css rename to styles-public/template.css diff --git a/templates/default/config.xml b/templates/default/config.xml index 813139869af..47950609c60 100644 --- a/templates/default/config.xml +++ b/templates/default/config.xml @@ -28,7 +28,6 @@ css/jquery-ui-custom.css css/bootstrap-slider.css css/flat_and_modern.css - css/template.css scripts/template.js @@ -59,7 +58,6 @@ css/flat_and_modern.css - css/template.css scripts/template.js diff --git a/templates/minimal-config.xml b/templates/minimal-config.xml index 5cef30c1ce9..a1f89daee61 100644 --- a/templates/minimal-config.xml +++ b/templates/minimal-config.xml @@ -25,7 +25,6 @@ - template.css template-rtl.css jquery-ui.css jquery-ui-custom.css diff --git a/templates/news_paper/config.xml b/templates/news_paper/config.xml index 7f1ee84618d..58725b6682e 100644 --- a/templates/news_paper/config.xml +++ b/templates/news_paper/config.xml @@ -27,7 +27,6 @@ css/jquery-ui-custom.css css/bootstrap-slider.css css/news_paper.css - css/template.css scripts/template.js @@ -47,7 +46,7 @@ files/logo.png - + files/logo.png - + css/ubuntu_orange.css - css/template.css scripts/template.js diff --git a/templates/ubuntu_orange/css/template.css b/templates/ubuntu_orange/css/template.css deleted file mode 100644 index fddc8de4478..00000000000 --- a/templates/ubuntu_orange/css/template.css +++ /dev/null @@ -1,850 +0,0 @@ - body - { - /*padding-top: 50px; now define in JS to fit any title length */ - padding-bottom: 10px; - } - -div[id^="group-"]>div { - background-color: #fff; - margin-bottom: 1em; - border: none; - } - - div[id^="group-"]>div.group-container { - background-color: transparent; - } - -.language-changer { - background-color: #fff; - padding: 1em; -} - -#topContainer { - position: absolute; - /*top: 55px; now define in JS to fit any title length */ - width: 100%; - padding: 1em; - border-bottom: none; -} - -.progress { - height: 21px; - margin-bottom: 0px; -} - -#surveynametitle { - font-size: 4em; -} - -#surveydescription, #surveynametitle, #welcome-container h1 { - color: #2c3e50; - text-align: center; -} - -.group-name { - -} - -#surveydescription, .group-name { - color: #2c3e50; -} - -#main-row, #welcome-container { - background-color: transparent; -} - /** - * Navigator - */ - - #navigator-container { - margin-top: 4em; - padding-top: 1em; - padding-bottom: 1em; - } - #navigator-container>div - { - } - - #main-col { - margin-top: 1em; - } - -.row { -} - - .col-centered{ - float: none; - margin: 0 auto; - } - - -/** -* navigator -*/ -#loadallbtn{ - white-space: normal; -} - - -.label-col { - min-width: 10%; - position: relative; - min-height: 1px; - padding-left: 15px; - padding-right: 15px; -} - -li.responsive-content -{ - display: block; - position: relative; - float: left; - width: 100%; -} - - - -/** -* no more tables -*/ - -@media only screen and (max-width: 800px) { - - /* Force table to not be like tables anymore */ - .no-more-tables table, - .no-more-tables thead, - .no-more-tables tbody, - .no-more-tables th, - .no-more-tables td, - .no-more-tables tr { - display: block; - } - - .no-more-tables table.subquestions-list td { - text-align: left; - } - - /* Hide table headers (but not display: none;, for accessibility) */ - .no-more-tables thead tr { - position: absolute; - top: -9999px; - left: -9999px; - } - - .no-more-tables tr { border: 1px solid #ccc; padding: 1em ; } - - /* Line header ; color is h4 color */ - .no-more-tables tr th { font-size: 1.1em; text-align: center; color: #317eac;} - - .no-more-tables .checkbox { - position: relative; - top: 6px; - } - - .no-more-tables td { - /* Behave like a "row" */ - min-height: 2em; - border: none; - position: relative; - /*padding-left: 95%;*/ - padding-bottom: 1em; - white-space: normal; - text-align:left; - } - - .array-multi-flexi .no-more-tables td, .no-more-tables-array-dual-dropdown-layout td, .no-more-tables-array-multi-text td{ - padding-left: 0%; - } - - - .no-more-tables td:before { - /* Now like a table header */ - position: absolute; - /* Top/left values mimic padding */ - top: 6px; - left: 6px; - width: 45%; - padding-right: 10px; - white-space: nowrap; - text-align:left; - font-weight: bold; - } - - /* - Label the data - */ - /*.no-more-tables td:before { content: attr(data-title); }*/ - - .no-more-tables-10-point tr{ - padding-bottom: 100px; - } - - .no-more-tables-10-point td{ - width: 2em; - margin: 0px; - padding: 0px; - float: left; - text-align:left; - } - - - .no-more-tables-10-point td:before { - /* Now like a table header */ - position: relative; - left: 2px; - /* Top/left values mimic padding */ - } -} - - - -/** -* slider -**/ -.numeric-multi ul.slider.computed { - width: 22em; -} - -.numeric-multi ul.computed li label,.numeric-multi ul.slider.computed li label - { - padding-right: 0%; -} - -.numeric-multi div.multinum-slider { - width: auto; - float: left; - margin-top: 1.5em; - margin-bottom: 0.2em; -} - -/** UI Slider **/ -.numeric-multi label.slider-label { - display: table-cell; - width: auto !important; - padding: 0 1em 0.2em 0; - margin-top: 1.3em; - vertical-align: middle; -} - -.numeric-multi .ui-slider-handle { - top: -0.35em; -} - -.ui-slider-1 { - width: 200px; - height: 9px; - margin-bottom: 20px; -} - -.ui-slider-2 { - width: 200px; - height: 23px; - position: relative; - background-image: url(../../images/slider-bg-2.png); - background-repeat: no-repeat; - background-position: center center; -} - -.slider_callout { - height: 20px; - width: 100px; - overflow: hidden; - position: absolute; - top: -20px; - margin-left: -3px; - color: #284a6e; - font-size: 90%; - font-weight: bold; - text-align: left; -} - -.slider_showmin { - float: left; - width: 50px; - margin: 15px 0 0 -0.3em; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 0.7em; - font-weight: normal; - text-align: left; -} - -.slider_showmax { - float: right; - width: 50px; - margin: 15px -0.3em 0 0; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 0.7em; - font-weight: normal; - text-align: right; -} - -.slider_lefttext { - display: table-cell; - padding-top: 1.5em; - padding-right: 11px; - padding-bottom: 3px; - vertical-align: top; - text-align: right; - font-size: 0.9em; -} - -.slider_righttext { - display: table-cell; - padding-top: 1.5em; - padding-left: 11px; - padding-bottom: 3px; - vertical-align: top; - font-size: 0.9em; -} - -.withslider { - margin-bottom: 30px; -} - - - - -/** -* Radio / Check box buttons -*/ - -input[type="checkbox"], -input[type="radio"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 0; -} - - -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - line-height: normal; -} - - -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; -} - - - - -.radio, -.checkbox { - position: relative; - display: block; - margin-top: 10px; - margin-bottom: 10px; -} -.radio label, -.checkbox label { - min-height: 23px; - 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-left: -20px; - margin-top: 4px \9; -} -.radio + .radio, -.checkbox + .checkbox { - margin-top: -5px; -} -.radio-inline, -.checkbox-inline { - position: relative; - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - vertical-align: middle; - font-weight: normal; - 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; -} - - - -.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: #4caf50; -} - - - -.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: #ff9800; -} - -.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: #e51c23; -} - - -@media (min-width: 768px) { - .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; - } - - - .navbar-form .radio, - .navbar-form .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio label, - .navbar-form .checkbox label { - padding-left: 0; - } - .navbar-form .radio input[type="radio"], - .navbar-form .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - - - .questions-list tbody tr { - height: 3em; - } - -} - - -.form-horizontal .radio, -.form-horizontal .checkbox, -.form-horizontal .radio-inline, -.form-horizontal .checkbox-inline { - margin-top: 0; - margin-bottom: 0; - padding-top: 7px; -} -.form-horizontal .radio, -.form-horizontal .checkbox { - min-height: 30px; -} - - -[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-addon input[type="radio"], -.input-group-addon input[type="checkbox"] { - margin-top: 0; -} - - -.radio label, -.radio-inline label, -.checkbox label, -.checkbox-inline label { - padding-left: 25px; -} -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="radio"], -.checkbox-inline input[type="radio"], -.radio input[type="checkbox"], -.radio-inline input[type="checkbox"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - margin-left: -25px; -} -input[type="radio"], -.radio input[type="radio"], -.radio-inline input[type="radio"] { - position: relative; - margin-top: 6px; - margin-right: 4px; - vertical-align: top; - border: none; - background-color: transparent; - -webkit-appearance: none; - appearance: none; - cursor: pointer; -} -input[type="radio"]:focus, -.radio input[type="radio"]:focus, -.radio-inline input[type="radio"]:focus { - outline: none; -} -input[type="radio"]:before, -.radio input[type="radio"]:before, -.radio-inline input[type="radio"]:before, -input[type="radio"]:after, -.radio input[type="radio"]:after, -.radio-inline input[type="radio"]:after { - content: ""; - display: block; - width: 18px; - height: 18px; - border-radius: 50%; - -webkit-transition: 240ms; - -o-transition: 240ms; - transition: 240ms; -} -input[type="radio"]:before, -.radio input[type="radio"]:before, -.radio-inline input[type="radio"]:before { - position: absolute; - left: 0; - top: -3px; - background-color: #2196f3; - -webkit-transform: scale(0); - -ms-transform: scale(0); - -o-transform: scale(0); - transform: scale(0); -} -input[type="radio"]:after, -.radio input[type="radio"]:after, -.radio-inline input[type="radio"]:after { - position: relative; - top: -3px; - border: 2px solid #666666; -} -input[type="radio"]:checked:before, -.radio input[type="radio"]:checked:before, -.radio-inline input[type="radio"]:checked:before { - -webkit-transform: scale(0.5); - -ms-transform: scale(0.5); - -o-transform: scale(0.5); - transform: scale(0.5); -} -input[type="radio"]:disabled:checked:before, -.radio input[type="radio"]:disabled:checked:before, -.radio-inline input[type="radio"]:disabled:checked:before { - background-color: #bbbbbb; -} -input[type="radio"]:checked:after, -.radio input[type="radio"]:checked:after, -.radio-inline input[type="radio"]:checked:after { - border-color: #2196f3; -} -input[type="radio"]:disabled:after, -.radio input[type="radio"]:disabled:after, -.radio-inline input[type="radio"]:disabled:after, -input[type="radio"]:disabled:checked:after, -.radio input[type="radio"]:disabled:checked:after, -.radio-inline input[type="radio"]:disabled:checked:after { - border-color: #bbbbbb; -} - - -input[type="checkbox"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - position: relative; - border: none; - margin-bottom: -4px; - -webkit-appearance: none; - appearance: none; - cursor: pointer; -} -input[type="checkbox"]:focus, -.checkbox input[type="checkbox"]:focus, -.checkbox-inline input[type="checkbox"]:focus { - outline: none; -} -input[type="checkbox"]:focus:after, -.checkbox input[type="checkbox"]:focus:after, -.checkbox-inline input[type="checkbox"]:focus:after { - border-color: #2196f3; -} -input[type="checkbox"]:after, -.checkbox input[type="checkbox"]:after, -.checkbox-inline input[type="checkbox"]:after { - content: ""; - display: block; - width: 18px; - height: 18px; - margin-top: -2px; - margin-right: 5px; - border: 2px solid #666666; - border-radius: 2px; - -webkit-transition: 240ms; - -o-transition: 240ms; - transition: 240ms; -} -input[type="checkbox"]:checked:before, -.checkbox input[type="checkbox"]:checked:before, -.checkbox-inline input[type="checkbox"]:checked:before { - content: ""; - position: absolute; - top: 0; - left: 6px; - display: table; - width: 6px; - height: 12px; - border: 2px solid #fff; - border-top-width: 0; - border-left-width: 0; - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); -} -input[type="checkbox"]:checked:after, -.checkbox input[type="checkbox"]:checked:after, -.checkbox-inline input[type="checkbox"]:checked:after { - background-color: #2196f3; - border-color: #2196f3; -} -input[type="checkbox"]:disabled:after, -.checkbox input[type="checkbox"]:disabled:after, -.checkbox-inline input[type="checkbox"]:disabled:after { - border-color: #bbbbbb; -} -input[type="checkbox"]:disabled:checked:after, -.checkbox input[type="checkbox"]:disabled:checked:after, -.checkbox-inline input[type="checkbox"]:disabled:checked:after { - background-color: #bbbbbb; - border-color: transparent; -} -.has-warning input:not([type=checkbox]), -.has-warning .form-control, -.has-warning input.form-control[readonly], -.has-warning input[type=text][readonly], -.has-warning [type=text].form-control[readonly], -.has-warning input:not([type=checkbox]):focus, -.has-warning .form-control:focus { - border-bottom: none; - -webkit-box-shadow: inset 0 -2px 0 #ff9800; - box-shadow: inset 0 -2px 0 #ff9800; -} -.has-error input:not([type=checkbox]), -.has-error .form-control, -.has-error input.form-control[readonly], -.has-error input[type=text][readonly], -.has-error [type=text].form-control[readonly], -.has-error input:not([type=checkbox]):focus, -.has-error .form-control:focus { - border-bottom: none; - -webkit-box-shadow: inset 0 -2px 0 #e51c23; - box-shadow: inset 0 -2px 0 #e51c23; -} -.has-success input:not([type=checkbox]), -.has-success .form-control, -.has-success input.form-control[readonly], -.has-success input[type=text][readonly], -.has-success [type=text].form-control[readonly], -.has-success input:not([type=checkbox]):focus, -.has-success .form-control:focus { - border-bottom: none; - -webkit-box-shadow: inset 0 -2px 0 #4caf50; - box-shadow: inset 0 -2px 0 #4caf50; -} - - -#indexcontainer {display : none;} - -.radio-list li -{ - display: block; - clear: both; -} - -.checkbox, .radio -{ - float: left; -} - -.label-radio span -{ - display: inline-block; - padding-top: 3px; -} - -.question-item .other-label -{ - margin: 0px; - padding: 0px; -} - - -/** - * Array question - */ -table.question.subquestion-list.questions-list th,table.question.subquestion-list.questions-list tr, table.subquestions-list th, table.subquestions-list td -{ - text-align: center; -} - -table.question.subquestion-list.questions-list tr.answers-list th -{ - text-align: left; -} - -/** - * For em-type - */ - .strong - { - font-weight: bold; - font-size: 1.2em; - display: inline-block; - padding: 0.2em; - } - - .hide-tip - { - display: none; - } - -/** - * Surveys list - */ -.surveys-list { - margin-top: 1em; - list-style: none; -} -.surveys-list li { - padding: 0.5em; -} -.surveys-list li a { - margin-left: 0.5em; -} - -#surveys-list-jumbotron { - text-align: center; -} - -#outerframeContainer { - min-height: 80%; -} - -#surveyListFooter { - width: 100%; - text-align: center; - margin-bottom: 0; - padding-bottom: 0; - margin-top: 10px; -} - -#surveyListFooter div{ - -} - -html, body { - height: 100%; -} - -/** - * Gender buttons - */ - -/* Not selected */ -.gender-button button{ - box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.16), 2px 2px 2px 0 rgba(0, 0, 0, 0.12); - margin-left: 1em; -} - -/* selected */ -.gender-button .btn:focus { - box-shadow: none; -} - -.gender-button .btn:focus .gender-text{ - text-decoration: underline; -} - -/* General */ -.gender-button .btn span { - display: block; -} - -html body .navbar.navbar-default.navbar-fixed-top { - z-index: 2000; -} - -.gender-button .gender-icon { - font-size: 2em; -} - -.navbar-brand { - height: auto; -}