Skip to content

Commit

Permalink
Merge pull request #229 from bloomberg/blp_dev
Browse files Browse the repository at this point in the history
blp_dev onto blp_prod
  • Loading branch information
vishalya authored Dec 6, 2017
2 parents 0c7dc7d + b611500 commit 8a0645b
Show file tree
Hide file tree
Showing 126 changed files with 2,134 additions and 553 deletions.
Binary file added app/assets/images/menu-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 82 additions & 1 deletion app/assets/stylesheets/bloomberg/bloomberg_style.scss

Large diffs are not rendered by default.

34 changes: 22 additions & 12 deletions app/assets/stylesheets/bloomberg/mixins.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
//Buttons
@mixin actionButton {
background-color: $nTeal7;
border: 1px solid $Black;
border-radius: 2px;
//color buttons
@mixin colorButton($bg_default, $bg_hover, $bg_pressed, $bg_disabled) {
color: $nGrey1;
-webkit-user-select: none;
background: $bg_default;

&:hover {
background-color: $nTeal6;
color: white;
background: $bg_hover;

}
&:active {
background-color: $nTeal8;
color: white;
}

&.blp-button-pressed, &:active {
background: $bg_pressed;
}

&.disabled {
color: $nGrey8;
background: $bg_disabled;
}
}


//Buttons
@mixin actionButton {
@include colorButton($nTeal7, $nTeal6, $nTeal8, #456d71);
}

//bloomberg theme
//button
Expand All @@ -26,6 +35,7 @@
color: $nGrey1;
cursor: default;
font-size: 13px;
font-family: AvenirNext_demi;
height: 19px;
line-height: 17px;
padding: 0px 6px;
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/common/buttons.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ $cHighlight-mainHover: rgba(#007FBD, 1);
.Button--toolbar {
height: 27px;
line-height: 25px;
margin-right: 4px;
padding: 0px 12px;
margin-right: 6px;
}

.Button--toolbar-negative {
Expand Down
78 changes: 0 additions & 78 deletions app/assets/stylesheets/common/default.css.scss

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions app/assets/stylesheets/common/header.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,19 @@ $cHeader-dark: rgba(#3A91D7, 1);
display: flex;
}
.Header-navigationToggleItem {
background: #444444;
background: $nGrey13;
font-family: AvenirNext_demi;
padding: 0;
width: 50%;
display: inline-block;
text-align: center;
border: 1px solid #000000;
&:hover {
background-color: $btn_background_hover;
color: $nGrey1;
cursor: default;

}
&.selected {
background: #005AB5;
color: white;
Expand All @@ -73,7 +80,7 @@ $cHeader-dark: rgba(#3A91D7, 1);
}
& a {
padding: 3px 0 3px 0;
color: #d8d8d8;
color: $nGrey4;
display: block;
width: 100%;
}
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/common/left-menu.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
height: 100%;
width: 200px;
border-right: 1px solid $Black;
background-color: $nGrey16;
background-color: $nGrey17;
}

.LeftMenuScrollable {
Expand Down Expand Up @@ -44,6 +44,7 @@

.CategoryCount {
float: right;
color: $nGrey6;
}
}
.CategoryTree {
Expand Down
50 changes: 17 additions & 33 deletions app/assets/stylesheets/common/map-card.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

$sBorderCompensation: 2px;
$opacityTransition: 250ms;
$sEditButtonSize: 50px;
$sEditButtonSize: 80px;

.MapCard {
position: relative;
width: $sCard-width - 10px - $sBorderCompensation;
margin: 0 auto;
background-color: $nGrey14;
background-color: $nGrey16;
}
.MapCard.MapCard--borderless .MapCard-header:after {
display: none;
Expand Down Expand Up @@ -117,14 +117,14 @@ $sEditButtonSize: 50px;
}
.MapCard--selectable {
&:hover {
background-color: $nGrey16;
background-color: $nGrey12;
.MapviewsGraph-bar {
cursor: pointer;
fill: rgba(#FFFFFF, 1);
}
}
&.is-selected {
background-color: $nGrey13;
background-color: $SelectionBlue4;

.MapviewsGraph-bar {
cursor: pointer;
Expand All @@ -151,19 +151,6 @@ $sEditButtonSize: 50px;
.MapCard-header--compact {
height: 130px;
}
.MapCard-header:after,
.MapCard.MapCard--squared .MapCard-header.MapCard-header--fake:after {
@include opacity(0.1);
content: ' ';
position: absolute;
left: 0;
right: 0;
bottom: 0;
display: block;
height: 2px;
background: #000000;
z-index: 2;
}

.MapCard-header--fake,
.MapCard.MapCard--squared .MapCard-header--fake {
Expand Down Expand Up @@ -273,30 +260,27 @@ $sEditButtonSize: 50px;
.MapCard-itemTitlePermission { background-color: $cStructure-mainBkg }
.MapCard-editButton {
position: absolute;
top: 0;
right: 18px;
top: -120px;
left: calc(50% - 40px);
width: $sEditButtonSize;
height: $sEditButtonSize;
background: #0090d7;
background: rgba(255,255,255,.50);
border-radius: $sEditButtonSize;
color: #fff;
text-decoration:none;
text-align: center;
line-height:$sEditButtonSize;
font-size: 20px;
@include opacity(0);
@include css3-prefix(box-sizing, border-box);
@include transition(opacity, $opacityTransition);
@include transition(top, 200ms, ease-in);
&:hover {
background: #0082C2;
text-decoration: none;
color:#fff;
}
font-size: 35px;
display: none;
}
.MapCard:hover .MapCard-editButton {
@include opacity(1);
top: -$sEditButtonSize/2;
.MapCard:hover {
.MapCard-header {
opacity: .75;
}
.MapCard-editButton {
display: block;
color: $White;
}
}
.MapCard-contentBodyRow--flex {
@include display-flex();
Expand Down
49 changes: 49 additions & 0 deletions app/assets/stylesheets/map/overlays.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,55 @@
strong { font-weight: 700; }
}

&.BWHaasGrotesk-55Fixed .content > .text {
font-family: 'BWHaasGrotesk-55Fixed', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasGrotesk-65Fixed .content > .text {
font-family: 'BWHaasGrotesk-65Fixed', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasHead-25XThin .content > .text {
font-family: 'BWHaasHead-25XThin', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasHead-55Roman .content > .text {
font-family: 'BWHaasHead-55Roman', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasHead-65Medium .content > .text {
font-family: 'BWHaasHead-65Medium', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasHead-75Bold .content > .text {
font-family: 'BWHaasHead-75Bold', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasHead-95Black .content > .text {
font-family: 'BWHaasHead-95Black', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasText-55Roman .content > .text {
font-family: 'BWHaasText-55Roman', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasText-65Medium .content > .text {
font-family: 'BWHaasText-65Medium', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

&.BWHaasText-75Bold .content > .text {
font-family: 'BWHaasText-75Bold', sans-serif; font-weight: 400;
strong { font-weight: 700; }
}

}

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/old_common
Submodule old_common updated from 7e8cb6 to d3b550
8 changes: 5 additions & 3 deletions app/assets/stylesheets/table/export_image_view.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}
.CanvasExport .ExportHelper.ExportHelper--header,
.CanvasExport .ExportHelper.ExportHelper--attribution {
opacity: 0.6;
opacity: 1.0;
}
.CanvasExport.ui-resizable > div.ui-resizable-handle,
.ExportImageView-Header,
Expand All @@ -120,9 +120,8 @@
top: 0;
left: 0;
width: 100%;
padding: 10px;
box-sizing: border-box;
background: rgba(#000, 0.75);
background: rgba(#000, 0.0);
}
.ExportHelper.ExportHelper--attribution {
@include transition(opacity, 500ms, ease-in-out);
Expand Down Expand Up @@ -152,11 +151,14 @@
color: #FFF;
font-size: 15px;
font-weight: bold;
line-height: normal;
width: 100%;
}
.ExportHelperDescription {
color: #FFF;
font-size: 13px;
line-height: 19px;
width: 100%;
}

.Button--advancedExport {
Expand Down
42 changes: 36 additions & 6 deletions app/assets/stylesheets/table/header/header_navigation.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
// Global error element
div.globalerror {
position: absolute;
top:17px;
top:60px;
left:0;
bottom:0;
width:100%;
height:30px;
height:35px;
padding:0;
pointer-events: none;
overflow:hidden;
Expand All @@ -50,15 +50,45 @@
width:auto;
line-height:30px;
padding: 0px 12px;
color: $nAmber5;
background-color: $nGrey14;
border: 1px solid $nGrey7;

@keyframes blink {
0% { opacity: 0.1; }
20% { opacity: 1.0; }
100% { opacity: 0.1; }
}

&.error {
color: $nRed4;
background: $White;
color: $SaturatedRed;
}

&.warn {
color: #555;
background-color: rgba(#FFFFBF, 0.90);
color: $SaturatedOrange;
}

&.loading {
width: 100px;

span {
animation-name: blink;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-fill-mode: both;
}
span:nth-child(2) {
animation-delay: .1s;
}
span:nth-child(3) {
animation-delay: .2s;
}
span:nth-child(4) {
animation-delay: .3s;
}
span:nth-child(5) {
animation-delay: .4s;
}
}

img {
Expand Down
14 changes: 12 additions & 2 deletions app/connectors/importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,18 @@ def exists_user_table_for_user_id(table_name, user_id)
end

def common_data_table(table_name)
@common_data_user ||= Carto::User.find_by_username(Cartodb.config[:common_data]["username"])
@common_data_user.visualizations.where(privacy: 'public', type: 'table', name: table_name).first
if common_data_user
common_data_user.visualizations.where(privacy: 'public', type: 'table', name: table_name).first
end
end

def common_data_user
return @common_data_user if @common_data_user

common_data_config = Cartodb.config[:common_data]
username = common_data_config && common_data_config['username']

@common_data_user = Carto::User.find_by_username(username)
end

attr_reader :runner, :table_registrar, :quota_checker, :database, :data_import_id
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/json/maps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def update
begin
updated = @stats_aggregator.timing('save') do
@map.update(params.slice(:provider, :bounding_box_sw, :bounding_box_ne, :center, :zoom, :table_id, \
:view_bounds_sw, :view_bounds_ne, :legends, :scrollwheel))
:view_bounds_sw, :view_bounds_ne, :legends, :scrollwheel, :lock_pan, :lock_zoom))
end

unless updated == false
Expand Down
Loading

0 comments on commit 8a0645b

Please sign in to comment.