PageRenderTime 53ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/Documentation/Help/scripts/LanguageFilter.js

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