Skip to content

Commit

Permalink
Merge pull request #32 from civicrm/develop
Browse files Browse the repository at this point in the history
Release 0.1-alpha10 version
  • Loading branch information
AkA84 authored Aug 9, 2017
2 parents 44a8c10 + 4518235 commit 926982a
Show file tree
Hide file tree
Showing 78 changed files with 11,018 additions and 660 deletions.
2 changes: 1 addition & 1 deletion css/bootstrap.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/custom-civicrm.css

Large diffs are not rendered by default.

27 changes: 25 additions & 2 deletions js/enable-select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ CRM.$(function() {
* during DOM changes
*/
var observer = new MutationObserver(debounce(function() {
CRM.$('select:visible:not([class^="ui-datepicker"])').select2();
}, 500));
CRM.$('select:visible:not(.no-select2):not(.crm-form-multiselect)')
.select2({
containerCss: {
display: 'inline-block'
}
})
.on('change', clearSelect2);
}, 50));

observer.observe(document.querySelector('body'), {
childList: true,
Expand All @@ -33,4 +39,21 @@ CRM.$(function() {
}, delay);
};
}

/**
* Walk through all select fields and hide it
* if there isn't any option
*/
function clearSelect2() {
window.setTimeout(function() {
CRM.$('select').each(function(idx, item) {
var id = '#s2id_' + CRM.$(item).attr('id');
var optionsLength = CRM.$(item).find('option').length;

if (optionsLength === 0) {
CRM.$(id).remove();
}
});
}, 50);
}
});
1 change: 1 addition & 0 deletions scss/bootstrap/bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

@import "SCSSROOT/org.civicrm.shoreditch/base/scss/bootstrap";
@import "overrides/style/*";
@import "variants/*";
@import "components/*";
@import "helper";
19 changes: 19 additions & 0 deletions scss/bootstrap/components/_wysiwyg.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
.chr_wysiwyg {
border-bottom: none !important;

/*
* If opacity is 0.65 as per default, then the whole text editor
* looks unavailable to be used. A decision was taken to set the opacity
* of the toolbar buttons to 1 even if they are disabled.
*/
[text-angular-toolbar] {
.btn[disabled] {
opacity: 1;
}
}

.placeholder-text {
opacity: 0.6;
}
}

.chr_wysiwyg__action {
Expand All @@ -15,6 +30,10 @@

.btn-link {
margin-top: 5px;

&[disabled] {
opacity: 0.6;
}
}

.fa {
Expand Down
13 changes: 13 additions & 0 deletions scss/bootstrap/components/civicase/_collapsible-fieldset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.crm_collapsible-content{
padding: 10px;

.crm_collapsible-content__title {
margin-bottom: 10px;
text-transform: uppercase;

.fa {
color: $gray-darker;
margin-right: 10px;
}
}
}
38 changes: 38 additions & 0 deletions scss/bootstrap/components/civicase/_notification-badge.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.crm_notification-badge {
background: $brand-primary;
border-radius: $border-radius-base;
color: $crm-white;
display: inline-block;
font-size: $font-size-base;
line-height: 14px;
padding: 5px 8px;
text-align: center;
vertical-align: middle;
white-space: nowrap;

&:hover {
color: $crm-white;
opacity: 0.8;
text-decoration: none;
}
}

.crm_notification-badge__info {
background: $brand-info;
color: $crm-white;
}

.crm_notification-badge__success {
background: $brand-success;
color: $crm-white;
}

.crm_notification-badge__warning {
background: $brand-warning;
color: $crm-white;
}

.crm_notification-badge__danger {
background: $brand-danger;
color: $crm-white;
}
11 changes: 11 additions & 0 deletions scss/bootstrap/overrides/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
$box-shadow: 0 3px 18px 0 rgba(48, 40, 40, 0.25);
$crm-form-control-shadow: inset 0 0 3px 0 rgba(0,0,0,0.2);
$crm-nested-table-box-shadow: 0 1px 13px 0px rgba(144, 144, 144, 0.25);
$crm-box-shadow-sub-panel: 0 7px 16px 1px rgba(0,0,0,0.1);
$crm-box-shadow-inset: inset 0 -1px 18px -3px rgba(148,148,148,0.62);
$crm-select2-box-shadow-inset: inset 0 0 9px -5px rgb(51, 51, 51);
$crm-modal-footer-shadow: inset 0 8px 21px -6px rgba(148, 148, 148, 0.4);

//== CiviCRM Page
//
Expand All @@ -18,6 +23,9 @@ $crm-page-topbar-bg-light: #656C80;
$crm-page-topbar-color: #fff !default;
$crm-page-topbar-item-padding: 15px !default;
$crm-accordion-header-color: #f3f6f7;
$crm-dasboard-header: #5D677B;
$crm-h3-color: #525966;
$crm-wizard-border: #eff3f5;

//
// Variables override
Expand Down Expand Up @@ -50,6 +58,7 @@ $brand-success: #8EC68A !default;
$brand-info: #5bc0de !default;
$brand-warning: #ECA67F !default;
$brand-danger: #E6807F !default;
$crm-help-success: #d1e5ce;
$crm-brand-primary-light: lighten(desaturate(adjust-hue($brand-primary, 4.9301), 34.7499), 45.6863) !default;
$crm-brand-primary-lighter: lighten(desaturate(adjust-hue(#3ab1c9, -10.0699), 36.9721), 48.2353) !default;

Expand All @@ -75,6 +84,7 @@ $body-bg: $crm-background !default;
$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
$font-family-base: "Open Sans", $font-family-sans-serif !default;

$font-size-small: 12px !default;
$font-size-base: 13px !default;
$font-size-medium: 14px !default;
$font-size-xs: 9px !default;
Expand Down Expand Up @@ -117,6 +127,7 @@ $padding-base-horizontal: 10px !default;

$border-radius-base: 2px !default;
$border-radius-small: $border-radius-base !default;
$border-radius-child: 4px !default;


//== Tables
Expand Down
43 changes: 0 additions & 43 deletions scss/bootstrap/overrides/style/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,46 +102,3 @@
background-color: lighten(desaturate(adjust-hue($gray-dark, 0.6298), 0.0390), 5.4902);
}
}

.btn-default-outline {

@include button-outline-variant($crm-white);
color: $crm-white !important;
border-color: $crm-white !important;

.open &,
&:hover,
&:active {
background-color: $crm-white !important;
color: $crm-dark-blue !important;
}
}

.btn-primary-outline {
@include button-outline-variant($btn-primary-bg);
}

.btn-secondary-outline {
@include button-outline-variant($gray-darker, $gray-dark);
border-color: $gray-darker !important;

&:hover {
color: #ffffff !important;
}
}

.btn-info-outline {
@include button-outline-variant($btn-info-bg);
}

.btn-success-outline {
@include button-outline-variant($btn-success-bg);
}

.btn-warning-outline {
@include button-outline-variant($btn-warning-bg);
}

.btn-danger-outline {
@include button-outline-variant($btn-danger-bg);
}
45 changes: 45 additions & 0 deletions scss/bootstrap/variants/_outlined-buttons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@import "../mixins/button-outline-variant";
@import "../mixins/hover";
@import "../overrides/variables";

.btn-default-outline {
@include button-outline-variant($crm-white);
color: $crm-white !important;
border-color: $crm-white !important;

.open &,
&:hover,
&:active {
background-color: $crm-white !important;
color: $crm-dark-blue !important;
}
}

.btn-primary-outline {
@include button-outline-variant($btn-primary-bg);
}

.btn-secondary-outline {
@include button-outline-variant($gray-darker, $gray-dark);
border-color: $gray-darker !important;

&:hover {
color: #ffffff !important;
}
}

.btn-info-outline {
@include button-outline-variant($btn-info-bg);
}

.btn-success-outline {
@include button-outline-variant($btn-success-bg);
}

.btn-warning-outline {
@include button-outline-variant($btn-warning-bg);
}

.btn-danger-outline {
@include button-outline-variant($btn-danger-bg);
}
39 changes: 39 additions & 0 deletions scss/civicrm/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* It use for calculate height and width the element
*/

@mixin calc($property, $expression, $content:null) {
#{$property}: -moz-calc(#{$expression}) $content;
#{$property}: -webkit-calc(#{$expression}) $content;
#{$property}: calc(#{$expression}) $content;
}

/*
* Mixin for Box sizing
*/

@mixin border-box() {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

/*
* A transformation is an effect that lets an element change shape, size and position.
*/

@mixin transform($transforms) {
-moz-transform: $transforms;
-ms-transform: $transforms;
-o-transform: $transforms;
-webkit-transform: $transforms;
transform: $transforms;
}

/*
* The translate() CSS function moves the position of the element on the plane. This transformation is characterized by a vector whose coordinates define how much it moves in each direction.
*/

@mixin translate ($x, $y) {
@include transform(translate($x, $y));
}
34 changes: 34 additions & 0 deletions scss/civicrm/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,38 @@ $datepicker-border-color: rgba(0, 0, 0, 0.15);
$datepicker-gray-dark: #535a67;
$datepicker-gray-darker: #525966;

$select2-inner-background: #f1f5f6;

$contact-avatar: 90px;

$crm-checkbox-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2);
$crm-contribute-form-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
$crm-form-item-shadow: 0 3px 6px 0 rgba(48, 40, 40, 0.25);
$crm-form-layout-shadow: 0 3px 18px 0 rgba(48, 40, 40, 0.25);
$crm-input-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2) inset;
$crm-search-input-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
$crm-tab-shadow: 0 9px 9px 0 rgba(48, 40, 40, 0.25);

$crm-black-olive-color: #3E3E3E;
$crm-blue-light: #58b7d1;
$crm-blue-light-color: #5897FB;
$crm-cancel-color: #555;
$crm-dark-gray-color: #70716b;
$crm-green-color: #B0D730;
$crm-light-gray-color: #818c97;
$crm-light-green-color: #BEDEBB;

$font-family-fontawesome: 'FontAwesome';

$crm-font-weight-td: 100 !default;

$crm-min-width: 1005px;
$crm-max-width: 1504px;
$crm-min-lg-width: 1505px;
$crm-sm-th-width: 200px;

$fa-var-alert: '\f06a';
$fa-var-info-msg: '\f05a';
$fa-var-success: '\f00c';
$fa-caret-down: '\f078';
$fa-caret-right: '\f054';
Loading

0 comments on commit 926982a

Please sign in to comment.