Skip to content

Commit

Permalink
Merge branch 'catalogs_view_filter' of github.com:CalamityC/rdmo into…
Browse files Browse the repository at this point in the history
… catalogs_view_filter
  • Loading branch information
CalamityC committed Nov 23, 2023
2 parents a553038 + efa3fd6 commit acb741a
Show file tree
Hide file tree
Showing 7 changed files with 1,993 additions and 0 deletions.
24 changes: 24 additions & 0 deletions rdmo/projects/static/projects/css/project.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@import 'core/css/variables';

.project-header {
.table > tbody > tr:first-child > td {
border-top: none;
}
}

.table {
margin-bottom: 0;
}

.project-update {
.fa {
float: right;
margin-right: 8px;
}
}

.table {
.fa-sign-out {
width: 11px;
}
}
304 changes: 304 additions & 0 deletions rdmo/projects/static/projects/css/project_questions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,304 @@
@import 'core/css/variables';

.project-questions-form-title {
margin-bottom: 15px;
line-height: 34px;
}
.project-questions-form {

@media (min-width: $screen-sm-max) {
min-height: 900px;
}

.questionset-head {
margin-bottom: 20px;

.help-block {
margin-top: 10px;
}
.set-buttons {
margin-top: 10px;
margin-bottom: 30px;
}
}
h2 {
margin-top: 70px;
}
.well {
margin-top: 10px;
}
.help-text {
margin-bottom: 10px;
}
.form-group {
margin-bottom: 20px;
}
.add-field-button .help-block {
margin: 0;
}
.add-set-button {
margin-bottom: 20px;
}

a {
&.add-valueset,
&.add-valueset:hover {
color: $success-color;
}

&.add-valueset:hover {
color: white;
background-color: $success-color;
}
}

.questions-buttons {
margin-top: 20px;
}

.questions-block {
position: relative;

border: 1px solid rgb(204, 204, 204);
border-radius: 4px;

padding: 20px 20px 0 20px;
margin-bottom: 20px;

.remove-set {
opacity: 0.8;
line-height: 20px;
font-size: 14px;

position: absolute;
z-index: 5;
top: 3px;
right: 5px;

&:hover {
opacity: 1;
}
&:focus {
outline: 0;
}
}
}

.collection {
position: relative;
margin-bottom: 10px;

select {
-webkit-appearance: none;
-moz-appearance: none;
-o-appearance: none;
appearance: none;
}
}

.default-value {
color: #999;
}

input[type='radio'].default-value,
input[type='range'].default-value {
opacity: 0.5;
}

.options {
position: absolute;
top: 7px;
right: 7px;
z-index: 5;

.unlock,
.erase,
.close {
opacity: 0.8;
line-height: 20px;
font-size: 14px;
}

.close {
margin-left: 2px;
}

.unlock:hover,
.erase:hover,
.close:hover {
opacity: 1;
}
.unlock:focus,
.erase:focus,
.close:focus {
outline: 0;
}

.badge-default-value {
color: #999;
border: 1px solid #999;
background-color: white;
margin-top: -2px;
}
}

.form-label,
label {
margin-bottom: 10px;
}

.radio,
.checkbox {
margin: 0;

label {
margin-right: 10px;
margin-bottom: 5px;
padding-left: 25px;
line-height: 30px;
}
&:last-child label {
margin-bottom: 0;
}
input[type='checkbox'],
input[type='radio'] {
margin-top: 8px;
margin-left: -25px;
}
input[type='text'] {
display: inline-block;
width: 200px;
}
}
.radio {
&.yesno {
label {
margin-bottom: 0;
line-height: 20px;
}
input[type='radio'] {
margin-top: 3px;
}
}
a.remove-link {
top: 2px;
}
}

.radio-control,
.checkbox-control,
.file-control {
border: 1px solid #ccc;
border-radius: 4px;

padding: 6px 12px;
margin: 0;
}

.file-control {
display: block;
width: 100%;
font-weight: normal;


input[type="file"] {
display: inline-block;
outline: 0;
}

p:last-child,
ul:last-child {
margin-bottom: 0;
}
}

.range-display {
display: inline-block;
min-width: 80px;
}

.autocomplete {
position: relative;

ul {
position: absolute;
z-index: 1030;
margin-top: 4px;
width: 100%;
overflow-y: auto;
background-color: white;
border: 1px solid #ccc;
border-radius: 4px;

li {
list-style: none;
cursor: pointer;
padding: 4px 15px;
border-bottom: 1px solid #ccc;

&.active,
&.active:hover {
color: white;
background-color: $link-color;
}

&:hover {
background-color: $navigation-dropdown-hover-background-color;
}
&:last-child {
border-bottom: none;
}
}
}

.locked {
cursor: default;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}

.breadcrumb {
margin-top: 20px;
margin-bottom: 12px;

background-color: transparent;
border: 1px solid #ccc;
}
}

.project-questions-overview {
line-height: 24px;

h4 {
line-height: 20px;
margin-top: 20px;
margin-bottom: 10px;
}
a {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
ul {
margin-left: 0;
}
li ul li {
margin-left: 20px;
}
li.active {
margin-left: 0;
}
li.active a:before {
float: left;
width: 20px;
text-align: right;
content: '\2192\0000a0'; /* right-arrow followed by a space */
}
}

.project-progress {
margin-bottom: 10px;
}
23 changes: 23 additions & 0 deletions rdmo/projects/static/projects/css/projects.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@import 'core/css/variables';

.projects-table {
margin-bottom: 0;
}

.projects-search {
position: relative;

.projects-search-reset {
display: block;
position: absolute;
top: 7px;
right: 7px;
z-index: 1020;

opacity: 0.8;
line-height: 20px;
font-size: 14px;

margin-left: 2px;
}
}
8 changes: 8 additions & 0 deletions rdmo/projects/static/projects/js/project_questions/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
angular.module('project_questions', ['core'])

.config(['$locationProvider', function($locationProvider) {

// set $location to not use #
$locationProvider.html5Mode(true);

}]);
13 changes: 13 additions & 0 deletions rdmo/projects/static/projects/js/project_questions/controllers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
angular.module('project_questions')

.controller('QuestionsController', ['$scope', '$filter', 'QuestionsService', function($scope, $filter, QuestionsService) {

$scope.service = QuestionsService;

$scope.checkCheckbox = function(event) {
var checkbox = angular.element('input[type="checkbox"]', angular.element(event.target).parent())[0];
if (checkbox.checked !== true) {
checkbox.click();
}
};
}]);
Loading

0 comments on commit acb741a

Please sign in to comment.