Skip to content
Snippets Groups Projects
Select Git revision
  • 658ab35a1d007bfe3cffdb071aeeef96605299d4
  • class default protected
2 results

GettingFamiliar.ipynb

Blame
  • Forked from Zeynep Hakguder / csce478
    Source project has a limited visibility.
    view.js 1.44 KiB
    addLoadEvent(onLoadViewRequest);
    
    function onLoadViewRequest()
    {
        var tabBar = getElementsByClassName('tabBar');
        tabBar = tabBar[0];
    
        var tabs = tabBar.getElementsByTagName('a');
        for (var i = 0; i < tabs.length; i++) {
            tabs[i].onclick = viewRequestSelectTab;
        }
    }
    
    function viewRequestSelectTab()
    {
        var commentsContent = document.getElementById('commentsContent');
        var editorCommentsContent = document.getElementById('editorCommentsContent');
        var privateCommentsContent = document.getElementById('privateCommentsContent');
    
        var commentsTab = document.getElementById('commentsTab');
        var editorCommentsTab = document.getElementById('editorCommentsTab');
        var privateCommentsTab = document.getElementById('privateCommentsTab');
    
        commentsContent.style.display = 'none';
        editorCommentsContent.style.display = 'none';
        privateCommentsContent.style.display = 'none';
    
        commentsTab.className = '';
        editorCommentsTab.className = '';
        privateCommentsTab.className = '';
    
        this.className = 'selected';
        var ajax = new AjaxClient();
        ajax.sendRequest('/Request/SetCommentTab/' + this.id);
    
        if (this.id == 'commentsTab') {
            commentsContent.style.display = 'block';
        } else if (this.id == 'editorCommentsTab') {
            editorCommentsContent.style.display = 'block';
        } else if (this.id == 'privateCommentsTab') {
            privateCommentsContent.style.display = 'block';
        }
    
        return false;
    }