diff options
author | Florian Hülsmann <fh@cbix.de> | 2012-04-02 20:18:16 +0400 |
---|---|---|
committer | Florian Hülsmann <fh@cbix.de> | 2012-04-02 20:18:16 +0400 |
commit | fe19aeba61d0f2760f77d1911d31100bfa00b331 (patch) | |
tree | 9a5338f9f594f5cf4c749828b6bdc8150a26ae15 /files_sgfviewer | |
parent | ceb102555fa12d70a1fcb010b6225f708e37138b (diff) |
removed swap file viewer.js~
Diffstat (limited to 'files_sgfviewer')
-rw-r--r-- | files_sgfviewer/js/viewer.js~ | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/files_sgfviewer/js/viewer.js~ b/files_sgfviewer/js/viewer.js~ deleted file mode 100644 index dd1068e8b..000000000 --- a/files_sgfviewer/js/viewer.js~ +++ /dev/null @@ -1,56 +0,0 @@ -function viewSgf(dir, file) { - - //tinker a valid sgf URL for the eidogo lib - var location=window.location.protocol+"//"+document.domain+OC.filePath('files','ajax','dow$ - - $('.actions,#file_action_panel').fadeOut('slow').promise().done(function() { - // sgf action toolbar - var sgfToolbarHtml = '<div class="crumb last">'+file+'</div>'; - // Change breadcrumb classes - $('#controls .last').removeClass('last'); - $('#controls').append(sgfToolbarHtml); - }); - - - // fade out file list - $('table').fadeOut('slow').promise().done(function(){; - // inject div container to load the player - var sgfviewer ='<div id="player-container" style="margin-top:45px;"></div>'; - $('table').after(sgfviewer); - - // load sgf player - var player = new eidogo.Player({ - container:"player-container", - theme:"standard", - sgfUrl: location, - enableShortcuts: true, - problemMode: false, - showComments: true, - showPlayerInfo: true, - showGameInfo: true, - showTools: true, - markCurrent: true, - markVariations: true - }); - }); - -} - - -// do the file manager file extension recognition magic -$(document).ready(function() { - if(typeof FileActions!=='undefined'){ - - var supportedMimes = new Array( - 'application/sgf'); - for (var i = 0; i < supportedMimes.length; ++i){ - var mime = supportedMimes[i]; - FileActions.register(mime,'View','',function(filename){ - viewSgf($('#dir').val(),filename); - }); - FileActions.setDefault(mime,'View'); - } - } - -}); - |