Remove mobile apps page

pull/14815/head
jesusbotella 6 years ago
parent f267994eb4
commit 114e5672a3

@ -1,62 +0,0 @@
// MobileApps bars
// --------------------------------------------------
@import '../variables/colors';
@import '../variables/sizes';
.ProgressBars {
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 25px 0;
}
.ProgressBar-container {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
&:not(:last-child) {
margin-bottom: 20px;
}
}
.ProgressBar {
display: block;
position: relative;
width: 380px;
height: 6px;
overflow: hidden;
border-radius: 3px;
background: #F5F5F5;
}
.ProgressBar-bar {
position: absolute;
z-index: 2;
top: 0;
bottom: 0;
left: 0;
min-width: 1%;
margin: 0;
border-radius: 3px;
background: #1181FB;
}
.ProgressBar-bar.is-danger {
background: $cHighlight-negative;
}
.ProgressBar-bar.is-caution {
background: $cHighlight-caution;
}
.ProgressBar-legend {
margin-left: $sMargin-elementInline;
color: $cTypography-secondary;
font-size: $sFontSize-smallUpperCase;
font-weight: $sFontWeight-lighter;
line-height: 12px;
}

@ -1,113 +0,0 @@
// MobileApps items list
// --------------------------------------------------
@import '../variables/colors';
@import '../variables/sizes';
$selectedItemPaddingOnSides: $sMargin-element - 1px;
.MobileAppsList {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
width: 100%;
padding-bottom: 30px;
}
.MobileAppsList-item {
display: flex;
position: relative;
flex-direction: row;
align-items: flex-end;
width: 100%;
padding: $sMargin-element 0;
text-decoration: none;
&:last-child {
margin-bottom: 28px;
}
&:not(:last-child) {
border-bottom: 1px solid $cStructure-softLine;
}
}
.MobileAppsList-itemIcon {
width: 42px;
height: 42px;
margin-right: 20px;
}
.MobileAppsList-statusIcon {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
}
.MobileAppsList-statusIcon--open {
background-color: $cHighlight-positive;
}
.MobileAppsList-statusIcon--dev {
background-color: $cHighlight-alert4;
}
.MobileAppsList-statusIcon--private {
background-color: $cHighlight-negative;
}
.MobileAppsList-itemIcon--img {
border: 0;
}
.MobileAppsList-itemInfo {
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: space-between;
width: 100%;
}
.MobileAppsList-itemInfoName {
display: flex;
flex-direction: column;
align-content: space-between;
justify-content: space-between;
height: 42px;
}
.MobileAppsList-itemInfoTitle {
max-width: 350px;
color: $cHighlight-main;
font-size: 14px;
font-weight: $sFontWeight-normal;
}
.MobileAppsList-itemInfoSubtitle {
max-width: 350px;
color: $cTypography-secondary;
font-size: 13px;
font-weight: 300;
}
.MobileAppsList-details {
display: flex;
flex-direction: column;
align-items: flex-end;
}
.MobileAppsList-details--paragraph {
color: $cTypography-linkSecondary;
font-size: 14px;
font-weight: 300;
}
.MobileAppsList-detail:not(:last-child) {
margin-right: 15px;
}
.MobileAppsList-details--icon {
margin-right: 2px;
font-size: 12px;
}

@ -1,55 +0,0 @@
// MobileApps plan
// --------------------------------------------------
@import '../variables/colors';
@import '../variables/sizes';
.MobilePlan {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 25px 0;
border-bottom: 1px solid rgba(#000, 0.1);
}
.MobilePlan-items {
display: flex;
flex: 1;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.MobilePlan-icon {
width: 40px;
height: 40px;
margin-right: 15px;
border-radius: 4px;
border-color: #73C86B;
color: #73C86B;
line-height: 50px;
text-align: center;
i {
height: 35px;
font-size: 25px;
}
}
.MobilePlan-info {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.MobilePlan-title--lightGreen {
color: $cTypography-paragraphs;
font-size: 16px;
}
.MobilePlan-subtitle {
color: $cTypography-secondary;
font-size: 13px;
font-weight: normal;
}

@ -1,30 +0,0 @@
var cdb = require('cartodb.js-v3');
module.exports = cdb.core.View.extend({
events: {
'change .js-appPlatformsLegendOption': '_changePlatformValue'
},
initialize: function () {
this.model = new cdb.core.Model({
value: ''
});
this._initBinds();
},
_initBinds: function () {
this.model.bind('change:value', this._changeIdPlatformLegends, this);
},
_changePlatformValue: function (ev, ui) {
this.model.set('value', ev.target.value);
},
_changeIdPlatformLegends: function () {
var platforms = this.options.app_platforms;
this.$('.js-appPlatformsLegend').html(platforms[this.model.get('value')]['legend']);
}
});

@ -1,26 +0,0 @@
var cdb = require('cartodb.js-v3');
var BaseDialog = require('../common/views/base_dialog/view');
module.exports = BaseDialog.extend({
events: BaseDialog.extendEvents({
'click .js-ok': '_changeAppType'
}),
className: 'Dialog is-opening',
initialize: function () {
this.elder('initialize');
this.template = cdb.templates.getTemplate('common/views/change_mobile_app_type');
},
render_content: function () {
return this.template();
},
_changeAppType: function () {
this.options.appTypeSelected.prop('checked', true);
this.close();
}
});

@ -1,25 +0,0 @@
var cdb = require('cartodb.js-v3');
var BaseDialog = require('../common/views/base_dialog/view');
module.exports = BaseDialog.extend({
events: BaseDialog.extendEvents({
'submit .js-form': 'close'
}),
className: 'Dialog is-opening',
initialize: function () {
this.elder('initialize');
this.template = cdb.templates.getTemplate('common/views/delete_mobile_app');
},
render_content: function () {
var mobileAppId = this.options.mobileApp.id;
return this.template({
formAction: cdb.config.prefixUrl() + '/your_apps/mobile/' + mobileAppId,
authenticityToken: this.options.authenticityToken
});
}
});

@ -1,94 +0,0 @@
var $ = require('jquery-cdb-v3');
var cdb = require('cartodb.js-v3');
var HeaderView = require('../common/views/dashboard_header_view');
var HeaderViewModel = require('./header_view_model');
var LocalStorage = require('../common/local_storage');
var IconSelector = require('../common/icon_selector_view');
var DeleteMobileApp = require('./delete_mobile_app_view');
var ChangeMobileAppType = require('./change_mobile_app_type_view');
var AppPlatformsLegends = require('./app_platforms_legends');
if (window.trackJs) {
window.trackJs.configure({
userId: window.user_data.username
});
}
/**
* Entry point for the new keys, bootstraps all dependency models and application.
*/
$(function () {
cdb.init(function () {
cdb.templates.namespace = 'cartodb/';
cdb.config.set('url_prefix', window.user_data.base_url);
cdb.config.set(window.config); // import config
$(document.body).bind('click', function () {
cdb.god.trigger('closeDialogs');
});
var currentUser = window.currentUser = new cdb.admin.User(window.user_data);
var mobileApp = window.mobile_app_data;
var headerView = new HeaderView({
el: $('#header'), // pre-rendered in DOM by Rails app
model: currentUser,
viewModel: new HeaderViewModel(),
localStorage: new LocalStorage()
});
headerView.render();
// Avatar
if (this.$('.js-iconSelector').length > 0) {
var iconSelector = new IconSelector({
el: this.$('.js-iconSelector'),
renderModel: new cdb.core.Model({
id: currentUser.get('id'),
name: mobileApp.name,
inputName: this.$('.js-fileIcon').attr('name'),
icon_url: mobileApp.icon_url
}),
iconAcceptedExtensions: window.icon_valid_extensions
});
iconSelector.render();
}
// Mobile app deletion
if (this.$('.js-deleteMobileApp').length > 0) {
this.$('.js-deleteMobileApp').click(function (ev) {
if (ev) {
ev.preventDefault();
}
new DeleteMobileApp({
authenticityToken: window.authenticity_token,
mobileApp: mobileApp,
clean_on_hide: true
}).appendToBody();
});
}
// Mobile app type change
if (this.$('.js-changeMobileAppType').length > 0) {
this.$('.js-changeMobileAppType').click(function (ev) {
var appTypeSelected = $(this);
if (ev) {
ev.preventDefault();
}
new ChangeMobileAppType({
appTypeSelected: appTypeSelected,
mobileApp: mobileApp,
clean_on_hide: true
}).appendToBody();
});
}
if (this.$('.js-appPlatformsLegend').length > 0) {
new AppPlatformsLegends({
el: this.$('.js-MobileAppForm'),
app_platforms: mobileApp['mobile_platforms']
}).render();
}
});
});

@ -1,28 +0,0 @@
var cdb = require('cartodb.js-v3');
/**
* Header view model to handle state for dashboard header view.
*/
module.exports = cdb.core.Model.extend({
breadcrumbTitle: function () {
return 'Configuration';
},
isBreadcrumbDropdownEnabled: function () {
return false;
},
isDisplayingDatasets: function () {
return false;
},
isDisplayingMaps: function () {
return false;
},
isDisplayingLockedItems: function () {
return false;
}
});

@ -483,11 +483,6 @@ var files = {
'lib/assets/javascripts/cartodb/show/**/*.jst.ejs'
],
_mobile_apps_templates: [
'lib/assets/javascripts/cartodb/common/**/*.jst.ejs',
'lib/assets/javascripts/cartodb/mobile_apps/**/*.jst.ejs'
],
_confirmation_templates: [
'lib/assets/javascripts/cartodb/confirmation/confirmation_info.jst.ejs'
],

Loading…
Cancel
Save