Skip to content

Commit 3eb11dc

Browse files
committed
Merge branch 'master' into 8958-arcgis-oids
2 parents a2d0f7a + 921358b commit 3eb11dc

File tree

55 files changed

+773
-2944
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+773
-2944
lines changed

app/assets/stylesheets/common/create/create_footer.css.scss

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
padding: 16px 40px;
2222
background: $cStructure-grayBkg;
2323
min-height: 72px; // To have same consistent height regardless if the footer has buttons or not
24+
@include display-flex();
25+
@include justify-content(space-between, space-between);
26+
@include align-items(baseline, baseline);
2427
}
2528
@media (min-width: $sMedia-tablet) { .CreateDialog-footerInner { width: $sMedia-tablet } }
2629
@media (min-width: 940px) { .CreateDialog-footerInner { width: 940px } }

app/assets/stylesheets/common/datepicker.css.scss

+2-3
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ $sDates-defaultWidth: 434px;
143143
.DatePicker-calendar {
144144
width: 422px;
145145
height: 196px;
146-
margin: 16px 18px 0;
146+
margin: 16px 18px;
147147
font-size: 11px;
148148
cursor: default;
149149
}
@@ -211,8 +211,7 @@ tbody.datepickerMonths td.datepickerSelected{
211211
.datepickerGoPrev a,
212212
.datepickerMonth a {
213213
text-align: center;
214-
height: 20px;
215-
line-height: 20px;
214+
line-height: 11px;
216215
color:#666666;
217216
text-transform: uppercase;
218217
font-weight:bold;

app/assets/stylesheets/common/option-card.css.scss

+8-7
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
max-height: 200px;
4646
text-align: left;
4747
color: #2E3C43;
48-
background-color: #f9f9f9;
48+
background-color: $cStructure-grayBkg;
4949
overflow: hidden;
50+
font-family: monospace;
5051
}
5152
.OptionCard--codeRequest pre { white-space: pre-wrap }
5253
.OptionCard--codeResult { padding-bottom: 0 }
@@ -98,9 +99,9 @@
9899
bottom: 0;
99100
width: 100%;
100101
left: 0;
101-
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(#f9f9f9,0.04)), color-stop(100%, rgba(#f9f9f9,0.95)));
102-
background-image: -webkit-linear-gradient(top, rgba(#f9f9f9,0.04) 0%, rgba(#f9f9f9,0.95) 100%);
103-
background-image: -moz-linear-gradient(top, rgba(#f9f9f9,0.04) 0%, rgba(#f9f9f9,0.95) 100%);
104-
background-image: -o-linear-gradient(top, rgba(#f9f9f9,0.04) 0%, rgba(#f9f9f9,0.95) 100%);
105-
background-image: linear-gradient(top, rgba(#f9f9f9,0.04) 0%,rgba(#f9f9f9,0.95) 100%);
106-
}
102+
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba($cStructure-grayBkg, 0.04)), color-stop(100%, rgba($cStructure-grayBkg, 0.95)));
103+
background-image: -webkit-linear-gradient(top, rgba($cStructure-grayBkg, 0.04) 0%, rgba($cStructure-grayBkg, 0.95) 100%);
104+
background-image: -moz-linear-gradient(top, rgba($cStructure-grayBkg, 0.04) 0%, rgba($cStructure-grayBkg, 0.95) 100%);
105+
background-image: -o-linear-gradient(top, rgba($cStructure-grayBkg, 0.04) 0%, rgba($cStructure-grayBkg, 0.95) 100%);
106+
background-image: linear-gradient(top, rgba($cStructure-grayBkg, 0.04) 0%,rgba($cStructure-grayBkg, 0.95) 100%);
107+
}

app/assets/stylesheets/editor-3/custom-list.css.scss

+3
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@
4747
cursor: default;
4848
}
4949
}
50+
.CustomList-itemLink {
51+
width: 100%;
52+
}

app/assets/stylesheets/editor/edit_field.css.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@
159159
&:before {
160160
content: '';
161161
position: absolute;
162-
left: 50%;
163-
top: 6px;
162+
left: 102px;
163+
top: 8px;
164164
height: 24px;
165165
width: 1px;
166166
background: #E5E5E5;
167167
}
168-
}
168+
}

app/controllers/carto/api/organization_presenter.rb

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ def to_poro
3636
:obs_snapshot_block_price => @organization.obs_snapshot_block_price,
3737
:obs_general_quota => @organization.obs_general_quota,
3838
:obs_general_block_price => @organization.obs_general_block_price,
39+
:geocoder_provider => @organization.geocoder_provider,
40+
:isolines_provider => @organization.isolines_provider,
41+
:routing_provider => @organization.routing_provider,
3942
:map_view_quota => @organization.map_view_quota,
4043
:twitter_datasource_quota => @organization.twitter_datasource_quota,
4144
:map_view_block_price => @organization.map_view_block_price,

app/controllers/carto/api/user_presenter.rb

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ def data(options = {})
105105
monthly_use: @user.organization_user? ? @user.organization.get_here_isolines_calls : @user.get_here_isolines_calls,
106106
hard_limit: @user.hard_here_isolines_limit?
107107
},
108+
geocoder_provider: @user.geocoder_provider,
109+
isolines_provider: @user.isolines_provider,
110+
routing_provider: @user.routing_provider,
108111
obs_snapshot: {
109112
quota: @user.organization_user? ? @user.organization.obs_snapshot_quota : @user.obs_snapshot_quota,
110113
block_price: @user.organization_user? ? @user.organization.obs_snapshot_block_price : @user.obs_snapshot_block_price,

app/models/concerns/cartodb_central_synchronizable.rb

+7-4
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def allowed_attributes_from_central(action)
6969
:google_maps_key, :google_maps_private_key, :auth_username_password_enabled,
7070
:auth_google_enabled, :here_isolines_quota, :here_isolines_block_price,
7171
:obs_snapshot_quota, :obs_snapshot_block_price, :obs_general_quota,
72-
:obs_general_block_price, :salesforce_datasource_enabled]
72+
:obs_general_block_price, :salesforce_datasource_enabled, :geocoder_provider,
73+
:isolines_provider, :routing_provider]
7374
when :update
7475
[:seats, :viewer_seats, :quota_in_bytes, :display_name, :description, :website,
7576
:discus_shortname, :twitter_username, :geocoding_quota, :map_view_quota,
@@ -79,7 +80,8 @@ def allowed_attributes_from_central(action)
7980
:google_maps_key, :google_maps_private_key, :auth_username_password_enabled,
8081
:auth_google_enabled, :here_isolines_quota, :here_isolines_block_price,
8182
:obs_snapshot_quota, :obs_snapshot_block_price, :obs_general_quota,
82-
:obs_general_block_price, :salesforce_datasource_enabled]
83+
:obs_general_block_price, :salesforce_datasource_enabled, :geocoder_provider,
84+
:isolines_provider, :routing_provider]
8385
end
8486
elsif self.is_a?(::User)
8587
[:account_type, :admin, :crypted_password, :database_host,
@@ -100,7 +102,8 @@ def allowed_attributes_from_central(action)
100102
:obs_general_quota, :obs_general_block_price, :soft_obs_general_limit,
101103
:mobile_xamarin, :mobile_custom_watermark, :mobile_offline_maps,
102104
:mobile_gis_extension, :mobile_max_open_users, :mobile_max_private_users,
103-
:salesforce_datasource_enabled, :viewer]
105+
:salesforce_datasource_enabled, :viewer, :geocoder_provider,
106+
:isolines_provider, :routing_provider]
104107
end
105108
end
106109

@@ -126,7 +129,7 @@ def allowed_attributes_to_central(action)
126129
:google_maps_key, :google_maps_private_key, :here_isolines_quota, :here_isolines_block_price,
127130
:soft_here_isolines_limit, :obs_snapshot_quota, :obs_snapshot_block_price, :soft_obs_snapshot_limit,
128131
:obs_general_quota, :obs_general_block_price, :soft_obs_general_limit,
129-
:viewer
132+
:viewer, :geocoder_provider, :isolines_provider, :routing_provider
130133
)
131134
case action
132135
when :create

app/models/organization.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ def to_poro
289289
:obs_snapshot_block_price => self.obs_snapshot_block_price,
290290
:obs_general_quota => self.obs_general_quota,
291291
:obs_general_block_price => self.obs_general_block_price,
292+
:geocoder_provider => self.geocoder_provider,
293+
:isolines_provider => self.isolines_provider,
294+
:routing_provider => self.routing_provider,
292295
:seats => self.seats,
293296
:twitter_username => self.twitter_username,
294297
:location => self.twitter_username,
@@ -409,7 +412,10 @@ def save_metadata
409412
'obs_general_quota', obs_general_quota,
410413
'google_maps_client_id', google_maps_key,
411414
'google_maps_api_key', google_maps_private_key,
412-
'period_end_date', period_end_date
415+
'period_end_date', period_end_date,
416+
'geocoder_provider', geocoder_provider,
417+
'isolines_provider', isolines_provider,
418+
'routing_provider', routing_provider
413419
end
414420

415421
def require_organization_owner_presence!

app/models/organization/organization_decorator.rb

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def data(options = {})
2929
quota: self.here_isolines_quota,
3030
monthly_use: self.get_here_isolines_calls
3131
},
32+
geocoder_provider: self.geocoder_provider,
33+
isolines_provider: self.isolines_provider,
34+
routing_provider: self.routing_provider,
3235
obs_snapshot: {
3336
quota: obs_snapshot_quota,
3437
monthly_use: get_obs_snapshot_calls

app/models/user.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,10 @@ def save_metadata
898898
'soft_obs_general_limit', soft_obs_general_limit,
899899
'google_maps_client_id', google_maps_key,
900900
'google_maps_api_key', google_maps_private_key,
901-
'period_end_date', period_end_date
901+
'period_end_date', period_end_date,
902+
'geocoder_provider', geocoder_provider,
903+
'isolines_provider', isolines_provider,
904+
'routing_provider', routing_provider
902905
end
903906

904907
def get_auth_tokens

app/models/user/user_decorator.rb

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ def data(options = {})
4444
monthly_use: self.organization_user? ? self.organization.get_here_isolines_calls : self.get_here_isolines_calls,
4545
hard_limit: self.hard_here_isolines_limit?
4646
},
47+
geocoder_provider: self.geocoder_provider,
48+
isolines_provider: self.isolines_provider,
49+
routing_provider: self.routing_provider,
4750
obs_snapshot: {
4851
quota: organization_user? ? organization.obs_snapshot_quota : obs_snapshot_quota,
4952
block_price: organization_user? ? organization.obs_snapshot_block_price : obs_snapshot_block_price,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Sequel.migration do
2+
up do
3+
alter_table(:users) do
4+
add_column :geocoder_provider, :text
5+
add_column :isolines_provider, :text
6+
add_column :routing_provider, :text
7+
end
8+
alter_table(:organizations) do
9+
add_column :geocoder_provider, :text
10+
add_column :isolines_provider, :text
11+
add_column :routing_provider, :text
12+
end
13+
end
14+
15+
down do
16+
alter_table(:users) do
17+
drop_column :geocoder_provider
18+
drop_column :isolines_provider
19+
drop_column :routing_provider
20+
end
21+
alter_table(:organizations) do
22+
drop_column :geocoder_provider
23+
drop_column :isolines_provider
24+
drop_column :routing_provider
25+
end
26+
end
27+
end

lib/assets/javascripts/cartodb/common/dialogs/add_custom_basemap/mapbox/enter_url.jst.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="ImportPanel">
22
<div class="ImportPanel-header">
3-
<h3 class="ImportPanel-headerTitle">Insert your Mapbox URL</h3>
3+
<h3 class="CDB-Text CDB-Size-large u-mainTextColor u-secondaryTextColor u-bSpace--m">Insert your Mapbox URL</h3>
44
</div>
55
<div class="Form-row">
66
<div class="Form-rowLabel">

lib/assets/javascripts/cartodb/common/dialogs/add_custom_basemap/nasa/nasa.jst.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="ImportPanel">
22
<div class="ImportPanel-header">
3-
<h3 class="ImportPanel-headerTitle">Basemaps provided by NASA Worldview</h3>
4-
<h3 class="ImportPanel-headerDescription">Select a date from which you want a global basemap.</h3>
3+
<h3 class="CDB-Text CDB-Size-large u-mainTextColor u-secondaryTextColor u-bSpace--m">Basemaps provided by NASA Worldview</h3>
4+
<p class="CDB-Text CDB-Size-medium u-altTextColor u-bSpace--xl ImportPanel-headerDescription">Select a date from which you want a global basemap.</p>
55
</div>
66
<div class="Form-row Form-row--centered">
77
<div class="Form-rowData Form-rowData--short Form-rowData--alignLeft">

lib/assets/javascripts/cartodb/common/dialogs/add_custom_basemap/tile_json/tile_json.jst.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="ImportPanel">
22
<div class="ImportPanel-header">
3-
<h3 class="ImportPanel-headerTitle">Insert your TileJSON URL</h3>
3+
<h3 class="CDB-Text CDB-Size-large u-mainTextColor u-secondaryTextColor u-bSpace--m">Insert your TileJSON URL</h3>
44
</div>
55
<div class="Form-row">
66
<div class="Form-rowLabel">

lib/assets/javascripts/cartodb/common/dialogs/add_custom_basemap/wms/enter_url.jst.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="ImportPanel">
22
<div class="ImportPanel-header">
3-
<h3 class="ImportPanel-headerTitle">Insert your WMS/WMTS URL</h3>
4-
<p class="ImportPanel-headerDescription">A list of available layers will be shown below.</p>
3+
<h3 class="CDB-Text CDB-Size-large u-mainTextColor u-secondaryTextColor u-bSpace--m">Insert your WMS/WMTS URL</h3>
4+
<p class="CDB-Text CDB-Size-medium u-altTextColor u-bSpace--xl ImportPanel-headerDescription">A list of available layers will be shown below.</p>
55
</div>
66
<div class="Form-row">
77
<div class="Form-rowLabel">

lib/assets/javascripts/cartodb/common/dialogs/add_custom_basemap/xyz/xyz.jst.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="ImportPanel">
22
<div class="ImportPanel-header">
3-
<h3 class="ImportPanel-headerTitle">Insert your XYZ URL</h3>
3+
<h3 class="CDB-Text CDB-Size-large u-mainTextColor u-secondaryTextColor u-bSpace--m">Insert your XYZ URL</h3>
44
</div>
55
<div class="Form-row">
66
<div class="Form-rowLabel">

lib/assets/javascripts/cartodb/common/dialogs/api_call.jst.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="Dialog-header u-inner">
1+
<div class="CDB-Text Dialog-header u-inner">
22
<div class="Dialog-headerIcon Dialog-headerIcon--neutral Dialog-headerIcon--small">
33
<i class="CDB-IconFont CDB-IconFont-markup"></i>
44
</div>
@@ -28,7 +28,7 @@
2828
</div>
2929

3030
<div class="Dialog-footer Dialog-footer--simple u-inner">
31-
<button class="Button Button--secondary Dialog-footerBtn cancel">
31+
<button class="CDB-Text CDB-Button CDB-Button--secondary u-upperCase CDB-Size-medium cancel">
3232
<span>Close</span>
3333
</button>
3434
</div>

lib/assets/javascripts/cartodb/common/dialogs/export/export_template.jst.ejs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="js-start">
2-
<div class="Dialog-header u-inner">
2+
<div class="CDB-Text Dialog-header u-inner">
33
<div class="Dialog-headerIcon Dialog-headerIcon--neutral">
44
<i class="CDB-IconFont CDB-IconFont-cloudDownArrow"></i>
55
</div>
@@ -10,7 +10,7 @@
1010
<% } %>
1111
</div>
1212
13-
<div class="Dialog-body">
13+
<div class="CDB-Text Dialog-body">
1414
<div class="OptionCards">
1515
<% _.each( formats, function( format ){ %>
1616
<div data-format="<%- format.format %>"
@@ -26,17 +26,17 @@
2626
</div>
2727
2828
<div class="Dialog-footer Dialog-footer--simple u-inner">
29-
<button class="cancel Button Button--secondary Dialog-footerBtn">
30-
<span>cancel</span>
29+
<button class="CDB-Text CDB-Button CDB-Button--secondary CDB-Size-medium u-upperCase cancel">
30+
<span>Cancel</span>
3131
</button>
3232
</div>
3333
</div>
3434
35-
<div class="js-preparing-download" style="display: none;">
35+
<div class="CDB-Text js-preparing-download" style="display: none;">
3636
<%- preparingDownloadContent %>
3737
</div>
3838
39-
<div class="js-error" style="display: none;"></div>
39+
<div class="CDB-Text js-error" style="display: none;"></div>
4040
4141
<form class="hack" method="POST" action="<%- url %>">
4242
<input type="hidden" class="filename" name="filename" />

lib/assets/javascripts/cartodb/common/dialogs/export/public_export_template.jst.ejs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="js-start">
2-
<div class="Dialog-header u-inner">
2+
<div class="CDB-Text Dialog-header u-inner">
33
<div class="Dialog-headerIcon Dialog-headerIcon--neutral">
44
<i class="CDB-IconFont CDB-IconFont-cloudDownArrow"></i>
55
</div>
@@ -10,7 +10,7 @@
1010
<% } %>
1111
</div>
1212
13-
<div class="Dialog-body">
13+
<div class="CDB-Text Dialog-body">
1414
<% if (hasBounds) { %>
1515
<div class="OptionCheck">
1616
<div class="Checkbox js-bounds">
@@ -35,17 +35,17 @@
3535
</div>
3636
3737
<div class="Dialog-footer Dialog-footer--simple u-inner">
38-
<button class="cancel Button Button--secondary Dialog-footerBtn">
39-
<span>cancel</span>
38+
<button class="CDB-Text CDB-Button CDB-Button--secondary CDB-Size-medium u-upperCase cancel">
39+
<span>Cancel</span>
4040
</button>
4141
</div>
4242
</div>
4343
44-
<div class="js-preparing-download" style="display: none;">
44+
<div class="CDB-Text js-preparing-download" style="display: none;">
4545
<%- preparingDownloadContent %>
4646
</div>
4747
48-
<div class="js-error" style="display: none;"></div>
48+
<div class="CDB-Text js-error" style="display: none;"></div>
4949
5050
<form class="hack" method="POST" action="<%- url %>">
5151
<input type="hidden" class="filename" name="filename" />

lib/assets/javascripts/cartodb/common/dialogs/export_map/templates/confirm.jst.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<span class="CDB-Button-Text CDB-Text is-semibold CDB-Size-medium u-upperCase">Cancel</span>
1212
</button>
1313

14-
<button class="js-ok CDB-Button CDB-Button--primary CDB-Button--big is-disabled">
14+
<button class="js-ok CDB-Button CDB-Button--primary CDB-Button--big">
1515
<span class="CDB-Button-Text CDB-Text is-semibold CDB-Size-medium u-upperCase">Ok, export</span>
1616
</button>
1717
</div>

lib/assets/javascripts/cartodb/common/dialogs/export_map/templates/download.jst.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div>
88

99
<div class="Dialog-footer Dialog-footer--simple u-inner">
10-
<button class="js-download Button Button--main">
11-
<span>Download</span>
10+
<button class="js-download CDB-Text CDB-Button CDB-Button--primary">
11+
<span class="CDB-Button-Text CDB-Text is-semibold CDB-Size-medium u-upperCase">Download</span>
1212
</button>
1313
</div>

lib/assets/javascripts/cartodb/common/dialogs/map/image_picker/box_template.jst.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="ImportPanel ImportPanelService js-import-panel">
22
<div class="ImportPanel-header">
3-
<h3 class="ImportPanel-headerTitle">Connect with Box</h3>
4-
<p class="ImportPanel-headerDescription">JPG, GIF, PNG, SVG formats are supported </p>
3+
<h3 class="CDB-Text CDB-Size-large u-mainTextColor u-secondaryTextColor u-bSpace--m">Connect with Box</h3>
4+
<p class="CDB-Text CDB-Size-medium u-altTextColor u-bSpace--xl ImportPanel-headerDescription">JPG, GIF, PNG, SVG formats are supported </p>
55
</div>
66
<div class="ImportPanel-body">
77
<div class="ImportPanel-bodyWrapper">

lib/assets/javascripts/cartodb/common/dialogs/map/image_picker/dropbox_template.jst.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="ImportPanel ImportPanelService js-import-panel">
22
<div class="ImportPanel-header">
3-
<h3 class="ImportPanel-headerTitle">Connect with Dropbox</h3>
4-
<p class="ImportPanel-headerDescription">JPG, GIF, PNG, SVG formats are supported </p>
3+
<h3 class="CDB-Text CDB-Size-large u-mainTextColor u-secondaryTextColor u-bSpace--m">Connect with Dropbox</h3>
4+
<p class="CDB-Text CDB-Size-medium u-altTextColor u-bSpace--xl ImportPanel-headerDescription">JPG, GIF, PNG, SVG formats are supported </p>
55
</div>
66
<div class="ImportPanel-body">
77
<div class="ImportPanel-bodyWrapper">

0 commit comments

Comments
 (0)