remove more dead code

This commit is contained in:
mntmn
2020-04-09 16:22:17 +02:00
parent 01a6bec80e
commit 3edde7c53c
8 changed files with 6 additions and 259 deletions

View File

@@ -133,14 +133,6 @@ function load_spaces(id, is_home, on_success, on_error) {
}, on_error);
}
function load_importables(user, on_success, on_error) {
load_resource("get", "/users/"+user._id+"/importables", null, on_success, on_error);
}
function import_zip(user, filename, on_success, on_error) {
load_resource("get", "/users/"+user._id+"/import?zip="+filename, null, on_success, on_error);
}
function load_history(s, on_success, on_error) {
load_resource("get", "/spaces/"+ s._id +"/digest", null, on_success, on_error);
}

View File

@@ -9,19 +9,12 @@ SpacedeckAccount = {
account_tab: 'invoices',
password_change_error: null,
feedback_text: "",
importables: [], // spacedeck.com zip import files
},
methods: {
show_account: function() {
this.activate_dropdown('account');
},
start_zip_import: function(f) {
if (confirm("Your archive will be imported in the background. This can take a few minutes. You can continue using Spacedeck in the meantime.")) {
import_zip(this.user, f);
}
},
account_save_user_digest: function(val) {
this.user.prefs_email_digest = val;
this.save_user(function() {

View File

@@ -108,27 +108,6 @@ var SpacedeckSpaces = {
space_auth = get_query_param("spaceAuth");
var userReady = function() {
if (get_query_param("embedded")) {
this.embedded = true;
this.guest_signup_enabled = true;
if (get_query_param("publish_cta")) {
this.publish_cta = get_query_param("publish_cta");
}
if (get_query_param("nosocial")) {
this.social_bar = false;
}
}
if (get_query_param("confirm") && this.logged_in) {
var token = get_query_param("confirm");
confirm_user(this.user, token, function() {
this.redirect_to("/spaces/"+space_id+"?show_access=1");
}.bind(this), function() {
alert("An error occured confirming your email with the given token.");
});
return;
}
this.close_dropdown();
this.active_space_loaded = false;
@@ -156,9 +135,7 @@ var SpacedeckSpaces = {
load_space(space_id, function(space, role) {
document.title = space.name;
this.active_space_role = role || "viewer"; //via req header from backend
this.space_embed_html = "<iframe width=\"1024\" height=\"768\" seamless src=\""+ENV.webEndpoint+"/spaces/"+space._id+"?embedded=1\"></iframe>";
this.active_space_role = role || "viewer"; // via req header from backend
if (!is_home) {
load_members(space, function(members) {

View File

@@ -31,12 +31,6 @@ SpacedeckUsers = {
if (on_success) {
on_success(user);
}
// see spacedeck_account.js
load_importables(this.user, function(files) {
this.importables = files;
}.bind(this));
}.bind(this), function() {
// error
this.loading_user = false;