From f338d378a297761892daf30e7fcb77e96055880d Mon Sep 17 00:00:00 2001 From: Rael Gugelmin Cunha Date: Sat, 2 Jul 2016 09:02:22 -0300 Subject: [PATCH] Fixing advanced tab preferences (#469) --- scudcloud/resources/scudcloud.js | 2 +- sources/scudcloud-src.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scudcloud/resources/scudcloud.js b/scudcloud/resources/scudcloud.js index 2629b8d..399de58 100644 --- a/scudcloud/resources/scudcloud.js +++ b/scudcloud/resources/scudcloud.js @@ -1 +1 @@ -ScudCloud={unloaded:!0,hasPreference:function(e){return!1},getPreference:function(e){return!1},setPreference:function(e,n){return!1},canShowHtmlNotifications:function(){return!1},call:function(e,n){switch(ScudCloud.log(e,n),e){case"reload":return ScudCloud.reload();case"didStartLoading":return ScudCloud.didStartLoading();case"didFinishLoading":return ScudCloud.didFinishLoading();case"setConnectionStatus":return ScudCloud.setConnectionStatus(n);case"notify":return ScudCloud.notify(n);case"setBadgeCount":return ScudCloud.setBadgeCount(n);case"displayTeam":return ScudCloud.displayTeam(n);case"signInTeam":return ScudCloud.signInTeam()}return!1},reload:function(){window.location.reload()},didStartLoading:function(){},didFinishLoading:function(){TS.ui.banner.close(),ScudCloud.populate(),ScudCloud.unloaded=!1},setConnectionStatus:function(e){switch(e){case"online":desktop.enableMenus(!0);break;default:desktop.enableMenus(!1)}},notify:function(e){desktop.sendMessage(e.title,e.content)},setBadgeCount:function(e){desktop.count(e.all_unread_highlights_cnt,e.all_unread_cnt)},signInTeam:function(){desktop.addTeam()},displayTeam:function(e){},log:function(e,n){try{"object"==typeof n&&(n=JSON.stringify(n))}catch(t){n=""}console.log("ScudCloud."+e+", args: "+n)},populate:function(){setTimeout(function(){desktop.populate(JSON.stringify({channels:ScudCloud.listChannels(),teams:ScudCloud.listTeams(),icon:TS.model.team.icon.image_44}))},500)},createSnippet:function(){return TS.ui.snippet_dialog.start()},listChannels:function(){var e=TS.channels.getUnarchivedChannelsForUser();return e.push(TS.channels.getChannelById(TS.model.active_channel_id)),e},listTeams:function(){var e=TS.getAllTeams();return e[0].team_icon={image_44:TS.model.team.icon.image_44},e},quicklist:function(){desktop.quicklist(ScudCloud.listChannels())},join:function(e){return TS.channels.join(e)},setClipboard:function(e){TS.client.ui.file_pasted_sig.dispatch(e,TS.model.shift_key_pressed)},sendTickle:function(){return TS.ms.sendTickle()},preferences:function(){return TS.ui.prefs_dialog.start()},addTeam:function(){document.location=TS.boot_data.signin_url},getCurrentTeam:function(){var e=TS.getAllTeams();if(null!=e)for(var n=0;e.length;n++)if(e[n].team_url==TS.boot_data.team_url)return e[n].id;return""},logout:function(){document.location=TS.boot_data.logout_url},help:function(){return TS.help_dialog.start()}},document.onpaste=function(e){desktop.pasted(!1)},$("body").delegate('a[href="/files/create/space"]',"click",function(){desktop.open(TS.boot_data.team_url+"files/create/space")}),$("body").delegate("#client-ui","DOMNodeInserted",function(){var e=$(".member_preview_link.member_image.thumb_512");if(e.length>0){var n=e.attr("style");-1==n.indexOf("-webkit-linear-gradient")&&e.attr("style",n.replace("linear-gradient","-webkit-linear-gradient"))}}),$("body").delegate("#channel_calls_button","click",function(){desktop.open(TS.boot_data.team_url+"call/"+TS.model.active_cid)}),window.winssb=TSSSB=ScudCloud,ScudCloud.unloaded&&ScudCloud.didFinishLoading(); \ No newline at end of file +ScudCloud={unloaded:!0,env:{mac_ssb_version:1},hasPreference:function(e){return!1},getPreference:function(e){return!1},setPreference:function(e,n){return!1},canShowHtmlNotifications:function(){return!1},call:function(e,n){switch(ScudCloud.log(e,n),e){case"reload":return ScudCloud.reload();case"didStartLoading":return ScudCloud.didStartLoading();case"didFinishLoading":return ScudCloud.didFinishLoading();case"setConnectionStatus":return ScudCloud.setConnectionStatus(n);case"notify":return ScudCloud.notify(n);case"setBadgeCount":return ScudCloud.setBadgeCount(n);case"displayTeam":return ScudCloud.displayTeam(n);case"signInTeam":return ScudCloud.signInTeam()}return!1},reload:function(){window.location.reload()},didStartLoading:function(){},didFinishLoading:function(){TS.ui.banner.close(),ScudCloud.populate(),ScudCloud.unloaded=!1},setConnectionStatus:function(e){switch(e){case"online":desktop.enableMenus(!0);break;default:desktop.enableMenus(!1)}},notify:function(e){desktop.sendMessage(e.title,e.content)},setBadgeCount:function(e){desktop.count(e.all_unread_highlights_cnt,e.all_unread_cnt)},signInTeam:function(){desktop.addTeam()},displayTeam:function(e){},log:function(e,n){try{"object"==typeof n&&(n=JSON.stringify(n))}catch(t){n=""}console.log("ScudCloud."+e+", args: "+n)},populate:function(){setTimeout(function(){desktop.populate(JSON.stringify({channels:ScudCloud.listChannels(),teams:ScudCloud.listTeams(),icon:TS.model.team.icon.image_44}))},500)},createSnippet:function(){return TS.ui.snippet_dialog.start()},listChannels:function(){var e=TS.channels.getUnarchivedChannelsForUser();return e.push(TS.channels.getChannelById(TS.model.active_channel_id)),e},listTeams:function(){var e=TS.getAllTeams();return e[0].team_icon={image_44:TS.model.team.icon.image_44},e},quicklist:function(){desktop.quicklist(ScudCloud.listChannels())},join:function(e){return TS.channels.join(e)},setClipboard:function(e){TS.client.ui.file_pasted_sig.dispatch(e,TS.model.shift_key_pressed)},sendTickle:function(){return TS.ms.sendTickle()},preferences:function(){return TS.ui.prefs_dialog.start()},addTeam:function(){document.location=TS.boot_data.signin_url},getCurrentTeam:function(){var e=TS.getAllTeams();if(null!=e)for(var n=0;e.length;n++)if(e[n].team_url==TS.boot_data.team_url)return e[n].id;return""},logout:function(){document.location=TS.boot_data.logout_url},help:function(){return TS.help_dialog.start()}},document.onpaste=function(e){desktop.pasted(!1)},$("body").delegate('a[href="/files/create/space"]',"click",function(){desktop.open(TS.boot_data.team_url+"files/create/space")}),$("body").delegate("#client-ui","DOMNodeInserted",function(){var e=$(".member_preview_link.member_image.thumb_512");if(e.length>0){var n=e.attr("style");-1==n.indexOf("-webkit-linear-gradient")&&e.attr("style",n.replace("linear-gradient","-webkit-linear-gradient"))}}),$("body").delegate("#channel_calls_button","click",function(){desktop.open(TS.boot_data.team_url+"call/"+TS.model.active_cid)}),window.winssb=TSSSB=ScudCloud,ScudCloud.unloaded&&ScudCloud.didFinishLoading(); \ No newline at end of file diff --git a/sources/scudcloud-src.js b/sources/scudcloud-src.js index f6ebf24..0839a19 100644 --- a/sources/scudcloud-src.js +++ b/sources/scudcloud-src.js @@ -1,5 +1,7 @@ ScudCloud = { unloaded: true, + // This will fix Preferences > Advanced Options (#469) + env: { mac_ssb_version: 1 }, // App functions hasPreference: function(name){ return false;