PHP Classes

File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/tinymce/AddOnManager.js

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/tinymce/AddOnManager.js   Download  
File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/tinymce/AddOnManager.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 7 years ago
Size: 1,449 bytes
 

Contents

Class file image Download
module("tinymce.AddOnManager", { teardown: function() { Utils.unpatch(tinymce.dom.ScriptLoader.ScriptLoader); tinymce.AddOnManager.languageLoad = true; tinymce.AddOnManager.language = 'en'; } }); test('requireLangPack', function() { var languagePackUrl; Utils.patch(tinymce.dom.ScriptLoader.ScriptLoader, 'add', function(origFunc, url) { languagePackUrl = url; }); function getLanguagePackUrl(language, languages) { languagePackUrl = null; tinymce.AddOnManager.language = language; tinymce.AddOnManager.PluginManager.requireLangPack('plugin', languages); return languagePackUrl; } tinymce.AddOnManager.PluginManager.urls.plugin = '/root'; equal(getLanguagePackUrl('sv_SE'), '/root/langs/sv_SE.js'); equal(getLanguagePackUrl('sv_SE', 'sv,en,us'), '/root/langs/sv.js'); equal(getLanguagePackUrl('sv_SE', 'sv_SE,en_US'), '/root/langs/sv_SE.js'); equal(getLanguagePackUrl('sv'), '/root/langs/sv.js'); equal(getLanguagePackUrl('sv', 'sv'), '/root/langs/sv.js'); equal(getLanguagePackUrl('sv', 'sv,en,us'), '/root/langs/sv.js'); equal(getLanguagePackUrl('sv', 'en,sv,us'), '/root/langs/sv.js'); equal(getLanguagePackUrl('sv', 'en,us,sv'), '/root/langs/sv.js'); strictEqual(getLanguagePackUrl('sv', 'en,us'), null); strictEqual(getLanguagePackUrl(null, 'en,us'), null); strictEqual(getLanguagePackUrl(null), null); tinymce.AddOnManager.languageLoad = false; strictEqual(getLanguagePackUrl('sv', 'sv'), null); });