PageRenderTime 61ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 17ms app.codeStats 0ms

/Documentation/Help/scripts/LanguageFilter.js

#
JavaScript | 27 lines | 22 code | 5 blank | 0 comment | 1 complexity | 41d24825681921f76bf3081241cfc9e9 MD5 | raw file
 1
 2function LanguageFilterController() {
 3        this.tabCollections = new Array();
 4        this.blockCollections = new Array();
 5        this.tabCollectionIds = new Array();
 6        this.blockCollectionIds = new Array();
 7}
 8
 9LanguageFilterController.prototype.registerTabbedArea = function(tabCollection, blockCollection, tabCollectionId, blockCollectionId) {
10        this.tabCollections.push(tabCollection);
11        this.blockCollections.push(blockCollection);
12        this.tabCollectionIds.push(tabCollectionId);
13        this.blockCollectionIds.push(blockCollectionId);
14}
15
16LanguageFilterController.prototype.switchLanguage = function(languageId) {
17        for(var i=0; i<this.tabCollections.length; i++) {
18          var tabs = this.tabCollections[i];
19          var blocks = this.blockCollections[i];
20          tabs.toggleClass('x-lang',languageId,'activeTab','tab');
21          blocks.toggleStyle('x-lang',languageId,'display','block','none');
22        }
23}
24
25LanguageFilterController.prototype.switchLanguage2 = function(languageId) {
26
27}