diff options
author | Rael <rael.gc@gmail.com> | 2015-10-15 05:34:36 -0300 |
---|---|---|
committer | Rael <rael.gc@gmail.com> | 2015-10-15 05:34:36 -0300 |
commit | f4b1884893763ad1cadaf26acf6aa9eacea55af1 (patch) | |
tree | 0f858af8feb4ace3e1c319a8f2f7b4858d3d562a | |
parent | 14cb4ea373ee81c95fa21a6050bc47aef4f71d6c (diff) | |
download | scudcloud-f4b1884893763ad1cadaf26acf6aa9eacea55af1.zip scudcloud-f4b1884893763ad1cadaf26acf6aa9eacea55af1.tar.gz scudcloud-f4b1884893763ad1cadaf26acf6aa9eacea55af1.tar.bz2 |
Restoring overrideNotification JS
-rw-r--r-- | scudcloud-1.0/resources/scudcloud.js | 2 | ||||
-rw-r--r-- | scudcloud-1.0/scudcloud-src.js | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/scudcloud-1.0/resources/scudcloud.js b/scudcloud-1.0/resources/scudcloud.js index 537b93f..d98e42d 100644 --- a/scudcloud-1.0/resources/scudcloud.js +++ b/scudcloud-1.0/resources/scudcloud.js @@ -1 +1 @@ -var ScudCloud={overrideNotifications:function(){TS.ui.growls.no_notifications=!1,TS.ui.growls.checkPermission=function(){return!0},TS.ui.growls.getPermissionLevel=function(){return"granted"},TS.ui.growls.show=function(n,e){desktop.sendMessage(n,e)},TS.ui.banner.close()},overrideConnect:function(){TS.ms.connected_sig.add(function(){ScudCloud.connect(!0)}),TS.ms.disconnected_sig.add(function(){ScudCloud.connect(!1)})},overrideBanner:function(){ScudCloud.showBanner=TS.ui.banner.show,TS.ui.banner.show=function(){ScudCloud.showBanner(),ScudCloud.overrideNotifications()}},connect:function(n){desktop.enableMenus(n),n&&desktop.populate(JSON.stringify({channels:ScudCloud.listChannels(),teams:ScudCloud.listTeams(),icon:TS.model.team.icon.image_44}))},count:function(){var n=0;return $("span.unread_highlight").not(".hidden").each(function(){n+=new Number($(this).text().replace("+",""))}),n},createSnippet:function(){return TS.ui.snippet_dialog.start()},listChannels:function(){return TS.channels.getUnarchivedChannelsForUser()},listTeams:function(){var n=TS.getAllTeams();return n[0].team_icon={image_44:TS.model.team.icon.image_44},n},quicklist:function(){desktop.quicklist(ScudCloud.listChannels())},join:function(n){return TS.channels.join(n)},setClipboard:function(n){TS.client.ui.file_pasted_sig.dispatch(n,TS.model.shift_key_pressed)},preferences:function(){return TS.ui.prefs_dialog.start()},addTeam:function(){document.location=TS.boot_data.signin_url},getCurrentTeam:function(){var n=TS.getAllTeams();if(null!=n)for(var e=0;n.length;e++)if(n[e].team_url==TS.boot_data.team_url)return n[e].id;return""},logout:function(){document.location=TS.boot_data.logout_url},help:function(){return TS.help_dialog.start()},isConnected:function(){return"undefined"!=typeof TS&&"undefined"!=typeof TS.model&&TS.model.ms_connected}};"undefined"!=typeof TS&&(document.onpaste=function(){desktop.pasted(!1)},ScudCloud.overrideConnect(),ScudCloud.overrideBanner()); +var ScudCloud={overrideNotifications:function(){TS.ui.growls.no_notifications=!1,TS.ui.growls.checkPermission=function(){return!0},TS.ui.growls.getPermissionLevel=function(){return"granted"},TS.ui.growls.show=function(n,e){desktop.sendMessage(n,e)},TS.ui.banner.close()},overrideConnect:function(){TS.ms.connected_sig.add(function(){ScudCloud.connect(!0)}),TS.ms.disconnected_sig.add(function(){ScudCloud.connect(!1)})},overrideBanner:function(){ScudCloud.showBanner=TS.ui.banner.show,TS.ui.banner.show=function(){ScudCloud.showBanner(),ScudCloud.overrideNotifications()}},connect:function(n){desktop.enableMenus(n),n&&desktop.populate(JSON.stringify({channels:ScudCloud.listChannels(),teams:ScudCloud.listTeams(),icon:TS.model.team.icon.image_44}))},count:function(){var n=0;return $("span.unread_highlight").not(".hidden").each(function(){n+=new Number($(this).text().replace("+",""))}),n},createSnippet:function(){return TS.ui.snippet_dialog.start()},listChannels:function(){return TS.channels.getUnarchivedChannelsForUser()},listTeams:function(){var n=TS.getAllTeams();return n[0].team_icon={image_44:TS.model.team.icon.image_44},n},quicklist:function(){desktop.quicklist(ScudCloud.listChannels())},join:function(n){return TS.channels.join(n)},setClipboard:function(n){TS.client.ui.file_pasted_sig.dispatch(n,TS.model.shift_key_pressed)},preferences:function(){return TS.ui.prefs_dialog.start()},addTeam:function(){document.location=TS.boot_data.signin_url},getCurrentTeam:function(){var n=TS.getAllTeams();if(null!=n)for(var e=0;n.length;e++)if(n[e].team_url==TS.boot_data.team_url)return n[e].id;return""},logout:function(){document.location=TS.boot_data.logout_url},help:function(){return TS.help_dialog.start()},isConnected:function(){return"undefined"!=typeof TS&&"undefined"!=typeof TS.model&&TS.model.ms_connected}};"undefined"!=typeof TS&&(document.onpaste=function(){desktop.pasted(!1)},ScudCloud.overrideNotifications(),ScudCloud.overrideConnect(),ScudCloud.overrideBanner()); diff --git a/scudcloud-1.0/scudcloud-src.js b/scudcloud-1.0/scudcloud-src.js index bd6e303..aec5d57 100644 --- a/scudcloud-1.0/scudcloud-src.js +++ b/scudcloud-1.0/scudcloud-src.js @@ -73,6 +73,7 @@ var ScudCloud = { }; if("undefined" != typeof TS){ document.onpaste = function(e){desktop.pasted(false);}; + ScudCloud.overrideNotifications(); ScudCloud.overrideConnect(); ScudCloud.overrideBanner(); } |