PageRenderTime 55ms CodeModel.GetById 33ms RepoModel.GetById 0ms app.codeStats 0ms

/extensions/WikiBhasha/src/js/core/globalSettings.js

https://github.com/ChuguluGames/mediawiki-svn
JavaScript | 949 lines | 806 code | 69 blank | 74 comment | 12 complexity | b7131cad68cb2f7611e91411f071b506 MD5 | raw file
  1. /*
  2. *
  3. * Copyright (c) Microsoft.
  4. *
  5. * This code is licensed under the Apache License, Version 2.0.
  6. * THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
  7. * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
  8. * IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
  9. * PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
  10. *
  11. * The apache license details from
  12. * ‘http://www.apache.org/licenses/’ are reproduced
  13. * in ‘Apache2_license.txt’
  14. *
  15. */
  16. /*
  17. Available Classes:
  18. 1) globalSettings - Includes all the global settings and the methods manipulating these settings.
  19. Also inclused HTML for the UI components of application.
  20. */
  21. // Make sure the base namespace exists.
  22. if (typeof (wikiBhasha.configurations) === "undefined") {
  23. wikiBhasha.configurations = {};
  24. }
  25. (function() {
  26. // includes all the global settings and the methods manipulating these settings.
  27. // also inclused HTML for the UI components of application.
  28. wikiBhasha.configurations.globalSettings = {
  29. //application name
  30. applicationName: "WikiBhasha (Beta)",
  31. //application version
  32. applicationVersion: "1.0 beta",
  33. //image base url: in case of using default path pass 'false' to this variable
  34. imgBaseUrl: false,
  35. //application base URL
  36. baseUrl: "",
  37. //language string files folder path
  38. languageFolder: "lang/",
  39. //themes css folder path
  40. themesFolder: "styles/themes/",
  41. //user language code, english by default
  42. userLanguageCode: "en",
  43. //source language code, english by default
  44. sourceLanguageCode: "en",
  45. //target language code
  46. targetLanguageCode: "",
  47. //Microsoft Translator specific target language code
  48. mtTargetLanguageCode: "",
  49. //target language name, english by default
  50. $targetLanguageName: "english",
  51. //target language name in native language, english by default
  52. targetLanguageDisplayName: "english",
  53. //target language article title
  54. targetLanguageArticleTitle: "",
  55. //source language article title
  56. sourceLanguageArticleTitle: "",
  57. //whether the article is new
  58. isNewArticle: false,
  59. //email id where user can send feedback on WikiBhasha
  60. feedbackEmail: "wikibfb@microsoft.com",
  61. //id of current session
  62. sessionId: 0,
  63. //string to be append at the end of cutoff string.
  64. suffixStringForCutoffString: "...",
  65. //cutoff length to be used for pane titles
  66. paneTitleCutoffLength: 100,
  67. //cutoff length to be used for edit page summery field
  68. summeryFieldCutoffLength: 200,
  69. //WikiBhasha usage monitoring summery field snipet
  70. snippet: "<<WB1.1>>",
  71. //max length of characters allowed by scratch pad window
  72. scratchpadTextMaxLength: 1600,
  73. //application window UI variables
  74. $contentHeight: 0,
  75. $transWinLeft: 0,
  76. $transWinTop: 0,
  77. $transDivWidth: 0,
  78. $transDivHeight: 0,
  79. //pane constant and values
  80. //minimum width on pane collapse
  81. collapsePaneWidth: 65,
  82. //right pane minimum width
  83. rightPaneMinWidth: 420,
  84. //left pane minimum width
  85. leftPaneMinWidth: 360,
  86. //panes' content margin constant
  87. contentMargin: 9,
  88. //pane padding constant when collapsed
  89. collapsePanePadding: 25,
  90. //panes' top padding constant
  91. panesTopPadding: 85,
  92. //splitter related constants
  93. splitterMargin: 5,
  94. $splitterWidth: 10,
  95. splitContainerBottomPadding: 10,
  96. //microsoft translation progress bar height constant
  97. translationBarHeight: 40,
  98. //max length for input fields
  99. inputTextMaxLength: 100,
  100. //"Enter" key code
  101. enterKeyCode: 13,
  102. //default class name to be applied on pane title toolbars in main application UI
  103. paneTitleToolBarDefaultClass: "wbWindowToolbarCenter",
  104. //array of microsoft translator supported languages. [language name, language code, display text]
  105. mtlLanguages: [ ['Arabic', 'ar', 'العربية'],
  106. ['Bulgarian', 'bg', 'български'],
  107. ['Czech', 'cs', 'čeština'],
  108. ['Danish', 'da', 'Dansk'],
  109. ['German', 'de', 'Deutsch'],
  110. ['English', 'en', 'English'],
  111. ['Estonian', 'et', 'Eesti'],
  112. ['Greek', 'el', 'ελληνικά'],
  113. ['Spanish', 'es', 'Español'],
  114. ['French', 'fr', 'Français'],
  115. ['Korean', 'ko', '한국어'],
  116. ['Hindi', 'hi', 'हिन्दी'],
  117. ['Indonesian', 'id', 'Bahasa Indonesia'],
  118. ['Italian', 'it', 'Italiano'],
  119. ['Hebrew', 'he', 'עברית'],
  120. ['HaitianCreole', 'ht', 'Kreyòl ayisyen'],
  121. ['Latvian', 'lv', 'Latviešu'],
  122. ['Lithuanian', 'lt', 'Lietuvių'],
  123. ['Hungarian', 'hu', 'Magyar'],
  124. ['Dutch', 'nl', 'Nederlands'],
  125. ['Japanese', 'ja', '日本語'],
  126. ['Norwegian', 'no', 'Norsk'],
  127. ['Polish', 'pl', 'Polski'],
  128. ['Portugese', 'pt', 'Português'],
  129. ['Romanian', 'ro', 'Română'],
  130. ['Russian', 'ru', 'Русский'],
  131. ['Slovak', 'sk', 'Slovenčina'],
  132. ['Slovenian', 'sl', 'Slovenščina'],
  133. ['Finnish', 'fi', 'Suomi'],
  134. ['Swedish', 'sv', 'Svenska'],
  135. ['Tamil', 'ta', 'தமிழ்'],
  136. ['Thai', 'th', 'ไทย'],
  137. ['Turkish', 'tr', 'Türkçe'],
  138. ['Ukrainian', 'uk', 'Українська'],
  139. ['Vietnamese', 'vi', 'Tiếng Việt'],
  140. ['ChineseSimplified', 'zh-CHS', '简体中文'],
  141. ['ChineseTraditional', 'zh-CHT', '繁體中文']
  142. ],
  143. //array of localized languages supported by application.[language name, language code]
  144. localizedLanguages: [['English', 'en'],
  145. ['German', 'de']],
  146. //array of right to left oriented languages supported by the application
  147. rtlLanguages: [['Hebrew', 'he'],
  148. ['Arabic', 'ar']],
  149. //checks if the given language is supported by the translator
  150. isWikiBhashaSupportedLanguage: function(language) {
  151. var result = false;
  152. $.each(wbGlobalSettings.mtlLanguages, function(intIndex, wbValue) {
  153. if (language === wbValue[1]) {
  154. result = true;
  155. }
  156. });
  157. return result;
  158. },
  159. //checks if the given language is RTL or LTR oriented
  160. isLanguageRTL: function(language) {
  161. var result = false;
  162. $.each(wbGlobalSettings.rtlLanguages, function(intIndex, wbValue) {
  163. if (language === wbValue[1]) {
  164. result = true;
  165. }
  166. });
  167. return result;
  168. },
  169. //gets the user selected language, checks whether localized string are available for the same.
  170. //if not sets 'english' as default
  171. getUserLanguage: function() {
  172. var userlanguage = wbGlobalSettings.targetLanguageCode;
  173. //check user language is supporting localization or not, if not display English
  174. if (!(this.areLocalizedStringsAvailable(userlanguage)) || (null === userlanguage)) {
  175. userlanguage = wbGlobalSettings.sourceLanguageCode;
  176. }
  177. return userlanguage;
  178. },
  179. //sets target language name and display name as per current language code
  180. setTargetLanguageValues: function() {
  181. $.each(wbGlobalSettings.mtlLanguages, function(intIndex, languageValues) {
  182. if (wbGlobalSettings.mtTargetLanguageCode == languageValues[1]) {
  183. wbGlobalSettings.$targetLanguageName = languageValues[0];
  184. wbGlobalSettings.targetLanguageDisplayName = languageValues[2];
  185. }
  186. });
  187. },
  188. //checks the user selected language is supported by the application for localization, if not selects english as default.
  189. areLocalizedStringsAvailable: function(userlanguage) {
  190. var result = false;
  191. $.each(wbGlobalSettings.localizedLanguages, function(intIndex, objValue) {
  192. if (userlanguage === objValue[1]) {
  193. result = true;
  194. }
  195. });
  196. return result;
  197. },
  198. //holds number of times the currently loaded target article been edited through wikiBhasha
  199. wbEditRevisionCount: null,
  200. noWikiAPIcall:null,
  201. noWikiAPIcallback:null,
  202. // Below lines are automatically generated code. DO NOT CHANGE MANUALLY.
  203. //Don not delete below comment as it needed by the HTML Engine to insert HTML code from HTML files.
  204. /*HTML BLOCK BEGIN*/
  205. applicationWindowHTML:'<div id="wbTranslationDiv" >\
  206. <div id="wbLeftMouseOverArea"></div>\
  207. <div id="wbRightMouseOverArea"></div>\
  208. <table id="wbTranslationTable" style="vertical-align:top;" height="100%" width="100%" border="0" cellspacing="0" cellpadding="0" >\
  209. <tr>\
  210. <td class="wbBgTopLeft"><img src="../images/trans.gif" width="8" height="8" alt="" /></td>\
  211. <td class="wbBgTopRight"><img src="../images/trans.gif" width="8" height="8" alt="" /></td>\
  212. </tr>\
  213. <tr>\
  214. <td class="wbBgContentArea" style="vertical-align:top;" >\
  215. <div class="wbLogoContainer" ></div>\
  216. <div class="wbTopButtonsDiv" oncontextmenu="return false;">\
  217. <table style="background-color:Transparent;">\
  218. <tr id="wbHistoryInfo">\
  219. <td>\
  220. <table style="background-color:Transparent;">\
  221. <tr>\
  222. <td style="text-align:right;padding-left:25px" id="wbHistoryLabel" nowrap>History</td>\
  223. <td>\
  224. <select name="History:" id="wbHistoryContainer" class="wbHistorySelect" tabindex="0">\
  225. </select>\
  226. </td>\
  227. </tr>\
  228. </table>\
  229. </td>\
  230. <td>\
  231. <div id="wbTopIcons">\
  232. <ul>\
  233. <li style="width:20px"></li>\
  234. <li><a id="wbSearchButton" class="wbSearchButton" href="#" title="Search" tabindex="0"></a></li>\
  235. <li><a id="wbScratchPadBtn" class="wbScratchPadButton" href="#" title="Scratch Pad" tabindex="0"></a></li>\
  236. <li style="width:20px"></li>\
  237. <li><a id="wbBlue" class="wbBlueSelectedIcon" href="#" title="Theme Blue" tabindex="0"></a></li>\
  238. <li><a id="wbSilver" class="wbSilverIcon" href="#" title="Theme Silver" tabindex="0"></a></li>\
  239. <li><a id="wbBlack" class="wbBlackIcon" href="#" title="Theme Black" tabindex="0"></a></li>\
  240. <li style="width:20px"></li>\
  241. <li><a id="wbFeedbackButton" title="Feedback" href="#" class="wbFeedbackButton" tabindex="0"></a></li>\
  242. <li><a id="wbHelpLink" class="wbHelp" href="#" title="Help" tabindex="0"></a></li>\
  243. <li><a id="wbMaximizeLink" class="wbMaximize" href="#" title="Maximize" tabindex="0"></a></li>\
  244. <li><a id="wbExitLink" class="wbClose" href="#" title="Close" tabindex="0"></a></li>\
  245. </ul>\
  246. </div>\
  247. </td>\
  248. </tr>\
  249. </table>\
  250. </div>\
  251. <div class="wbContentContainer">\
  252. <div id="wbPreviousButton">\
  253. <span id="wbPreviousButtonText">Previous</span>\
  254. </div>\
  255. <div id="wbNextButton">\
  256. <span id="wbNextButtonText">Next</span>\
  257. </div>\
  258. <div class="workflowNavigationBtns" id="workflowNavigationBtns">\
  259. <table id="workflowNavigationBtnsTable" cellpadding="0" cellspacing="0">\
  260. <tr>\
  261. <td class="workflowNavigationBtnsCentre" valign="middle">\
  262. <table cellpadding=0 cellspacing=0>\
  263. <tr id="workFlowStepBtns">\
  264. <td><div class="workFlowBtnNormal">1. Research</div></td>\
  265. <td><div class="workFlowBtnClicked">2. Compose</div></td>\
  266. <td><div class="workFlowBtnNormal">3. Publish</div></td>\
  267. </tr>\
  268. </table>\
  269. </td>\
  270. </tr>\
  271. </table>\
  272. </div>\
  273. <table width="100%" border="0" cellspacing="0" cellpadding="0" style="vertical-align:top;background-color:Transparent;" id="wbTwoPaneOuterWrapper">\
  274. <tr valign="top">\
  275. <td>\
  276. <div id="wbSplitter">\
  277. <div id="wbLeftPane">\
  278. <div id="wbLeftWindowCollapsed" style="display:none" class="wbLeftWindowCollapsed">\
  279. <div style="height:25px;">\
  280. </div>\
  281. <table id="wbLeftCollapsedTable" width="65px" border="0" cellspacing="0" cellpadding="0" class="wbTableBackground">\
  282. <tr>\
  283. <td class="wbWindowTopLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  284. <td class="wbWindowTopCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  285. <td class="wbWindowTopRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  286. </tr>\
  287. <tr>\
  288. <td class="wbWindowToolbarLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  289. <td class="wbCollapseWindowToolbarCenter">\
  290. <div class="wbToolbarRightIcons">\
  291. <input name="" id="wbLeftCollapsedBtn" type="button" value=" " class="wbCollapseRightButton" />\
  292. </div>\
  293. </td>\
  294. <td class="wbWindowToolbarRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  295. </tr>\
  296. <tr>\
  297. <td class="wbWindowContentLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  298. <td class="wbWindowContentCenter"></p>\
  299. <div id="wbLeftCollapseContentDiv" class="wbLeftWindowContent" style="width:50px;"></div>\
  300. </td>\
  301. <td class="wbWindowContentRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  302. </tr>\
  303. <tr>\
  304. <td class="wbWindowBottomLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  305. <td class="wbWindowBottomCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  306. <td class="wbWindowBottomRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  307. </tr>\
  308. </table>\
  309. </div>\
  310. <div id="wbLeftWindow">\
  311. <div id="wbLeftHeaderDiv" class="wbHeader" style="height:20px;">\
  312. </div>\
  313. <table width="100%" border="0" cellspacing="0" cellpadding="0" class="wbTable">\
  314. <tr>\
  315. <td class="wbWindowTopLeft"><img src="../images/trans.gif" width="4" height="5" alt="" /></td>\
  316. <td class="wbWindowTopCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  317. <td class="wbWindowTopRight"><img src="../images/trans.gif" width="4" height="5" alt="" /></td>\
  318. </tr>\
  319. <tr>\
  320. <td class="wbWindowToolbarLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  321. <td class="wbWindowToolbarCenter">\
  322. <div id="wbSourceTabHeaderDiv" class="wbToolbarLeftIcons">\
  323. <div id="wbLeftPaneTitle"></div>\
  324. </div>\
  325. <div class="wbToolbarRightIcons">\
  326. <input id="wbCollapseLeftWindowBtn" type="button" class="wbCollapseButton" tabindex="0" />\
  327. </div>\
  328. </td>\
  329. <td class="wbWindowToolbarRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  330. </tr>\
  331. <tr>\
  332. <td class="wbWindowContentLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  333. <td valign="top" class="wbWindowContentCenter">\
  334. <div id="wbLeftWindowContentDiv" class="wbLeftWindowContent">\
  335. <div id="wbSourceArticleContentDiv" style="word-wrap:break-word;"/>\
  336. </div>\
  337. </td>\
  338. <td class="wbWindowContentRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  339. </tr>\
  340. <tr>\
  341. <td class="wbWindowBottomLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  342. <td class="wbWindowBottomCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  343. <td class="wbWindowBottomRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  344. </tr>\
  345. </table>\
  346. </div>\
  347. </div>\
  348. <div id="wbHandleDiv" style="z-index:1001;position:absolute;height:100%;width:5px;cursor:e-resize" >\
  349. <div style="height:32px;"> </div>\
  350. <div class="wbSplitter">\
  351. </div>\
  352. </div>\
  353. <div id="wbRightPane">\
  354. <div id="wbRightWindowCollapsed" style="display:none" class="wbRightWindowCollapsed">\
  355. <div style="height:25px;">\
  356. </div>\
  357. <table id="wbRightCollapsedTable" width="65px" border="0" cellspacing="0" cellpadding="0" class="wbTableBackground">\
  358. <tr>\
  359. <td class="wbWindowTopLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  360. <td class="wbWindowTopCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  361. <td class="wbWindowTopRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  362. </tr>\
  363. <tr>\
  364. <td class="wbWindowToolbarLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  365. <td class="wbCollapseWindowToolbarCenter">\
  366. <div class="wbToolbarRightIcons">\
  367. <input name="" id="wbRightCollapsedBtn" type="button" value=" " class="wbCollapseButton" tabindex="0"/>\
  368. </div>\
  369. </td>\
  370. <td class="wbWindowToolbarRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  371. </tr>\
  372. <tr>\
  373. <td class="wbWindowContentLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  374. <td class="wbWindowContentCenter">\
  375. <div id="wbRightCollapseContentDiv" class="wbLeftWindowContent" style="width:50px;"></div>\
  376. </td>\
  377. <td class="wbWindowContentRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  378. </tr>\
  379. <tr>\
  380. <td class="wbWindowBottomLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  381. <td class="wbWindowBottomCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  382. <td class="wbWindowBottomRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  383. </tr>\
  384. </table>\
  385. </div>\
  386. <div id="wbRightWindow">\
  387. <div class="wbHeader" style="height:25px;">\
  388. <div class="wikiModeSwitcher">\
  389. <label id="wbToggleCTFLabel" for="wbToggleCTF"><input id="wbToggleCTF" type="checkbox" tabindex="0" />Disable Translation Popup</label>\
  390. <label id="wbToggleLabel" for="wbToggleWikiFormat"><input id="wbToggleWikiFormat" type="checkbox" tabindex="0" />Show Wikiformat</label>\
  391. </div>\
  392. </div>\
  393. <table width="100%" border="0" cellspacing="0" cellpadding="0" class="wbTable">\
  394. <tr>\
  395. <td class="wbWindowTopLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  396. <td class="wbWindowTopCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  397. <td class="wbWindowTopRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  398. </tr>\
  399. <tr>\
  400. <td class="wbWindowToolbarLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  401. <td class="wbWindowToolbarCenter">\
  402. <div class="wbRightPanetoolbarLefticons">\
  403. <input id="wbCollapseRightWindowBtn" type="button" class="wbCollapseRightButton" tabindex="0"/>\
  404. <div id="wbRightPaneTitle"></div>\
  405. </div>\
  406. <div id="wbTargetTabHeaderDiv" class="wbRightPanetoolbarRighticons" >\
  407. <input id="wbConvertEntireArticleBtn" type="button" value="Get the entire article from Source" class="wbGetEntireButton" tabindex="0"/>\
  408. </div>\
  409. </td>\
  410. <td class="wbWindowToolbarRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  411. </tr>\
  412. <tr>\
  413. <td class="wbWindowContentLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  414. <td valign="top" class="wbWindowContentCenter">\
  415. <div id="wbRightWindowContentDiv" class="wbRightWindowContent" >\
  416. <div id="wbTargetArticleComposeDiv" style="word-wrap:break-word;">\
  417. <iframe id="wbComposeIFrame"></iframe>\
  418. </div>\
  419. <div id="wbPreviewLoading" class="wbLoadingDiv"><img src="../images/loading.gif" alt="loading"/> Loading..</div>\
  420. <div id="wbTargetArticlePreviewDiv" />\
  421. </div>\
  422. </td>\
  423. <td class="wbWindowContentRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  424. </tr>\
  425. <tr>\
  426. <td class="wbWindowBottomLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  427. <td class="wbWindowBottomCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  428. <td class="wbWindowBottomRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  429. </tr>\
  430. </table>\
  431. </div>\
  432. </div>\
  433. </div>\
  434. </td>\
  435. </tr>\
  436. </table>\
  437. </div>\
  438. </td>\
  439. <td class="wbBgContentAreaRight"></td>\
  440. </tr>\
  441. <tr>\
  442. <td class="wbBgBottomLeft"><img src="../images/trans.gif" width="8" height="8" alt="" /></td>\
  443. <td class="wbBgBottomRight"><img src="../images/trans.gif" width="8" height="8" alt="" /></td>\
  444. </tr>\
  445. </table>\
  446. <div class="wbContextMenu" style="z-index:100000" id="wbMenu">\
  447. <ul id="wbContextMenuItems" style="direction:ltr;">\
  448. </ul>\
  449. </div>\
  450. <div id="wbSplitHelperDiv" style="position:absolute;" />\
  451. <div id="wbTempIdToStoreWiki" style="display:none" />\
  452. </div>',
  453. bringContentFromPaneWindowHTML:'<div class="wbEmptyContentMessage">\
  454. <img src="/images/bringTranslatedContent.png" usemap="#wbImageMap"/>\
  455. <map name="wbImageMap">\
  456. <area shape ="rect" coords ="145,123,199,146" id="wbBCFPyesButton" />\
  457. <area shape ="rect" coords ="221,123,289,146" id="wbBCFPcancelButton" />\
  458. </map>\
  459. </div>',
  460. chineseLangSelectionHTML:'<div id="wbchineseLangSelectionDiv">\
  461. <div id="wbContent" >\
  462. <div class="wbLogoContainer">\
  463. </div>\
  464. <div style="float:right;"><a id="wbCLSExitWindow" class="wbExit" href="#" title="Close" tabindex="0" oncontextmenu = "return false;"></a>\
  465. </div>\
  466. <table id="wbContentTable" border="0" cellpadding="0" cellspacing="0">\
  467. <tr>\
  468. <td class="wbWindowTopLeft"></td>\
  469. <td class="wbWindowTopCenter"></td>\
  470. <td class="wbWindowTopRight"></td>\
  471. </tr>\
  472. <tr>\
  473. <td class="wbWindowContentLeft" />\
  474. <td class="wbWindowContentCenter">\
  475. <div class="wbSection">\
  476. <div id="wbCollaborativeDiv" class="wbContent">\
  477. Please select the appropriate Chinese language translation system to be used.\
  478. </div>\
  479. <div id="wbIntroDiv" style="margin:20px">\
  480. <div style="text-align:center"><div style="float:left;margin-left:100px"><input type="button" value="简体中文" id="wbCHSLangButton"></div>\
  481. <div style="float:right;margin-right:100px"><input type="button" value="繁體中文" id="wbCHTLangButton"></div></div>\
  482. </div>\
  483. </div>\
  484. </td>\
  485. <td class="wbWindowContentRight" ><img src="../images/trans.gif" width="3" height="3" /></td>\
  486. </tr>\
  487. <tr>\
  488. <td class="wbWindowBottomLeft" ><img src="../images/trans.gif" width="4" height="4" /></td>\
  489. <td class="wbWindowBottomCenter" ><img src="../images/trans.gif" width="4" height="3" /></td>\
  490. <td class="wbWindowBottomRight" ><img src="../images/trans.gif" width="4" height="4" /></td>\
  491. </tr>\
  492. </table>\
  493. </div>\
  494. <div id="wbFooterDiv" style="float:right;"></div>\
  495. </div>',
  496. shareOnExternSystemHTML:'<div id="wbshareOnExternSystemHTMLDiv">\
  497. <div id="wbSWESContent">\
  498. <div id="wbSWESDraggableHandle" class="wbHeaderContainer" style="cursor:move;">\
  499. <div class="wbH3" style="width:300px;float:left">Exiting WikiBhasha...</div>\
  500. <div style="float: right;">\
  501. </div>\
  502. </div>\
  503. <table border="0" cellpadding="0" cellspacing="0" style="margin:5px;width:387px">\
  504. <tr>\
  505. <td class="wbWindowTopLeft" />\
  506. <td class="wbWindowTopCenter" />\
  507. <td class="wbWindowTopRight" />\
  508. </tr>\
  509. <tr>\
  510. <td class="wbWindowContentLeft" />\
  511. <td class="wbWindowContentCenter">\
  512. <div style="clear:both;text-align:left">\
  513. <div class="wbContent" id="wbExitContent">\
  514. <div id="thxMsg"></div>\
  515. <div id="msgTitle"></div>\
  516. <div id="msgText"></div>\
  517. <div id="copyToClipboardDiv"><a href="#" id="copyToClipboard"></a></div>\
  518. </div>\
  519. <div style="padding:5px;" id="wbShareIconsSection"></div>\
  520. <div style="padding:10px;clear:both;width:100%;text-align:center"><input type="button" id="wbSWESExitButton" value="Exit WikiBhasha"></div>\
  521. </div>\
  522. </td>\
  523. <td class="wbWindowContentRight"></td>\
  524. </tr>\
  525. <tr>\
  526. <td class="wbWindowBottomLeft" />\
  527. <td class="wbWindowBottomCenter" />\
  528. <td class="wbWindowBottomRight" />\
  529. </tr>\
  530. </table>\
  531. </div>\
  532. <div id="wbSWESFooterDiv"></div>\
  533. </div>',
  534. feedbackWindowHTML:'<div id="wbFeedbackDiv" >\
  535. <table border="0" cellspacing="0" cellpadding="0" id="wbFeedbackTable" class="wbFeedbackTableBackground">\
  536. <tr>\
  537. <td class="wbWindowTopLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  538. <td class="wbWindowTopCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  539. <td class="wbWindowTopRight"><img src="../images/trans.gif" width="4" height="4" alt=""/></td>\
  540. </tr>\
  541. <tr valign="top">\
  542. <td class="wbWindowToolbarLeft"><img src="../images/trans.gif" width="3" height="3" alt=""/></td>\
  543. <td class="wbWindowToolbarCenter">\
  544. <div id="wbFBDraggableHandle" style="cursor:move;width:85%" class="wbToolbarLeftIcons">\
  545. <div class="wbH3" id="wbFeedbackHeader">Feedback</div>\
  546. </div>\
  547. <div class="wbToolbarRightIcons">\
  548. <a id="wbFBExitWindow" class="wbClose" href="#" title="Close" ></a>\
  549. </div>\
  550. </td>\
  551. <td class="wbWindowToolbarRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  552. </tr>\
  553. <tr valign="top">\
  554. <td class="wbWindowContentLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  555. <td class="wbWindowContentCenter">\
  556. <div id="wbFeedbackFormArea">\
  557. <div id="feedbackQuestionMessage">Before leaving WikiBhasha, would you like to give us feedback?</div>\
  558. <table id="wbFeedbackIconsTable">\
  559. <tbody>\
  560. <tr>\
  561. <td id="wbFeedback0" class="tdHover" data="2" title="Nice Tool!!">\
  562. <img src="../images/feedbackImgForNiceTool.png" id="_feedbackc">\
  563. </td>\
  564. <td rowspan=3>\
  565. <textarea id="wbFeedbackText" cols="30" rows="3" name="wbFeedbackText"></textarea>\
  566. <div id="feedbackNoteHolder">\
  567. <span id="feedbackLimitNoteText">[Limit of the feedback text]</span>\
  568. </div>\
  569. </td>\
  570. </tr>\
  571. <tr>\
  572. <td id="wbFeedback1" class="tdHover" data="1" title="Needs improvement...">\
  573. <img src="../images/feedbackImgForNeedsImprove.png" id="_feedbacka">\
  574. </td>\
  575. </tr>\
  576. <tr>\
  577. <td id="wbFeedback2" class="tdHover" data="0" title="Others">\
  578. <img src="../images/feedbackImgForOthers.png" id="_feedbackb">\
  579. </td>\
  580. </tr>\
  581. </tbody>\
  582. </table>\
  583. <br/>\
  584. <input type="button" id="wbSubmitFeedbackButton" value="Send via email"/>&nbsp;&nbsp;&nbsp;&nbsp;\
  585. <input type="button" id="wbCancelFeedbackButton" value="Cancel"/>\
  586. <span id="wbExitLinkInFeedbackWindow">&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;">Exit WikiBhasha</a></span></div>\
  587. </div>\
  588. <div id="wbFeedbackMsgArea">\
  589. <table id="wbFeedbackMsgAreaTable" width="100%">\
  590. <tbody>\
  591. <tr>\
  592. <td align="center" valign="center">\
  593. <div id="feedBackMessageDiv">Thank you for the feedback.</div>\
  594. </td>\
  595. </tr>\
  596. </tbody>\
  597. </table>\
  598. </div>\
  599. </td>\
  600. <td class="wbWindowContentRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  601. </tr>\
  602. <tr valign="top">\
  603. <td class="wbWindowBottomLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  604. <td class="wbWindowBottomCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  605. <td class="wbWindowBottomRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  606. </tr>\
  607. </table>\
  608. </div>',
  609. languageSelectionWindowHTML:'<div id="wbSelectionDiv">\
  610. <div id="wbContent">\
  611. <div id="wbLSDraggableHandle" class="wbLogoContainer" style="cursor:move;">\
  612. </div>\
  613. <div style="float:right;"><a id="wbExitWindow" class="wbExit" href="#" title="Close" tabindex="0" oncontextmenu = "return false;"></a>\
  614. </div>\
  615. <table id="wbContentTable" border="0" cellpadding="0" cellspacing="0">\
  616. <tr>\
  617. <td class="wbWindowTopLeft"></td>\
  618. <td class="wbWindowTopCenter"></td>\
  619. <td class="wbWindowTopRight"></td>\
  620. </tr>\
  621. <tr>\
  622. <td class="wbWindowContentLeft" />\
  623. <td class="wbWindowContentCenter">\
  624. <div class="wbSection">\
  625. <div id="wbCollaborativeDiv" class="wbContent">\
  626. WikiBhasha is a collaborative platform for creating multilingual content in non-English Wikipedias.\
  627. </div>\
  628. <div id="wbIntroDiv"><div id="wbCurrentLanguageDiv" class="wbheader">You are currently in an English\
  629. Wikipedia article. Do you want to contribute to multilingual article?\
  630. </div>\
  631. <div class="wbContent" id="wbCollaborateContainer">\
  632. <div id="wbContributeDiv" class="wbContributeButtonDiv">\
  633. <input id="wbContributeBtn" name="" class="wbFormButtons" value="Contribute to multilingual version" type="button" tabindex="0" />\
  634. </div>\
  635. <div class="wbExitLink"><a id="wbExitLink" href="#" tabindex="0">Exit WikiBhasha</a>\
  636. </div>\
  637. </div></div>\
  638. <div id="wbLanguageDiv">\
  639. <div id="wbLanguageArticleDiv" class="wbheader">Select the language for the article</div>\
  640. </div>\
  641. <div style="height:10px"><div id="wbSearchLoading" class="wbLoadingDiv" style="margin:3px;text-align:center;width:100%;position:absolute"><img src="../images/loading.gif" alt="Searching" /> Searching...</div></div>\
  642. <div id="wbLanguageOptionsDiv" style="float:left;margin:10px;width:25%">\
  643. <table>\
  644. <tr>\
  645. <td>\
  646. <select id="wbLanguagesDropDown" class="wbFormSelect" size="12">\
  647. <option selected="selected" value="en" tabindex="0">Select Language</option>\
  648. </select>\
  649. </td>\
  650. </tr>\
  651. </table>\
  652. </div>\
  653. <div id="wbOptionDiv" style="float:right;width:65%;margin-top:10px;">\
  654. <div id="wbDetectArticleDiv" class="wbheader">This article is not available in Arabic. Do you want to create the article?</div>\
  655. <div class="wbContent">\
  656. <table>\
  657. <tr>\
  658. <td><div id="wbArticleTitleLabel" style="margin-top:4px;margin-right:3px;float:left">Article Title</div><div style="margin-right:3px;float:left"><input id="wbArticleTitleInput" value="" style="width:190px" type="text" tabindex="0"/></div>\
  659. <div><input id="wbArticleTitleSubmitBtn" value="Create article" class="wbFormButtons" type="button" tabindex="0" style="margin:4px"/></div>\
  660. </td>\
  661. </tr>\
  662. <tr>\
  663. <td colspan="2">\
  664. <p id="wbUserOption"><span class="wbRedtext">Important!</span>Please click on the "WikiBhasha" bookmarklet again on arriving in Arabic Wikipedia.</p>\
  665. </td>\
  666. </tr>\
  667. </table>\
  668. </div>\
  669. </div>\
  670. </div>\
  671. </td>\
  672. <td class="wbWindowContentRight" ><img src="../images/trans.gif" width="3" height="3" /></td>\
  673. </tr>\
  674. <tr>\
  675. <td class="wbWindowBottomLeft" ><img src="../images/trans.gif" width="4" height="4" /></td>\
  676. <td class="wbWindowBottomCenter" ><img src="../images/trans.gif" width="4" height="3" /></td>\
  677. <td class="wbWindowBottomRight" ><img src="../images/trans.gif" width="4" height="4" /></td>\
  678. </tr>\
  679. </table>\
  680. </div>\
  681. <div id="wbFooterDiv"></div>\
  682. </div>',
  683. noSourceArticleInfoWindowHTML:'<div class="wbEmptyContentMessage">\
  684. <img src="/images/noSrcArticle.png" />\
  685. </div>',
  686. scratchpadWindowHTML:'<div id="wbWrapperScratchPad" >\
  687. <table height="100%" border="0" cellspacing="0" cellpadding="0" id="scratchPadTable" width="100%">\
  688. <tr>\
  689. <td class="wbWindowTopLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  690. <td class="wbWindowTopCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  691. <td class="wbWindowTopRight"><img src="../images/trans.gif" width="4" height="4" alt=""/></td>\
  692. </tr>\
  693. <tr valign="top">\
  694. <td class="wbWindowToolbarLeft"><img src="../images/trans.gif" width="3" height="3" alt=""/></td>\
  695. <td class="wbWindowToolbarCenter">\
  696. <div id="wbSPDraggableHandle" style="cursor:move;width:90%" class="wbToolbarLeftIcons">\
  697. <div class="wbH3" id="wbScratchPadHeader">Scratch Pad</div>\
  698. </div>\
  699. <div class="wbToolbarRightIcons">\
  700. <a id="wbSPExitWindow" class="wbClose" href="#" title="Close" ></a>\
  701. </div>\
  702. </td>\
  703. <td class="wbWindowToolbarRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  704. </tr>\
  705. <tr valign="top">\
  706. <td class="wbWindowContentLeft"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  707. <td class="wbWindowContentCenter">\
  708. <div class="wbScratchPadSection">\
  709. <form><div class="wbTranslatedAreaHead" id="wbHeaderRow"><div class="scratchTopLayout" id="wbScratchpadHeadLabelLeft"><h4>Source Text</h4></div>\
  710. <div class="scratchTopButtonLayout"><div style="float:left;width:75px;display:none;text-align:center" id="wbTranslationLoading">\
  711. <img src="../images/loading.gif" alt="Translating"/>\
  712. </div></div>\
  713. <div class="scratchTopLayout" id="wbScratchpadHeadLabelRight"><h4>Translated Text</h4></div><div class="scratchTopButtonLayout">&nbsp;</div></div>\
  714. <div><div class="scratchTopLayout">\
  715. <textarea id="wbSourceText" rows="5" tabindex="0">\
  716. </textarea>\
  717. </div><div class="scratchTopButtonLayout">\
  718. <input id="wbSourceToTargetBtn" type="button" value=">>" /><br />\
  719. <input id="wbTargetToSourceBtn" type="button" value="<<" />\
  720. </div><div class="scratchTopLayout">\
  721. <textarea id="wbTargetText" rows="5" tabindex="0">\
  722. </textarea>\
  723. </div>\
  724. <div class="scratchTopButtonLayout">\
  725. <input id="wbSaveScratchPadContentBtn" type="button" value="Save" tabindex="0"/><br/>\
  726. <input type="reset" value="Reset" tabindex="0"/><br/>\
  727. <input id="wbClearAllBtn" type="button" value="Clear All" tabindex="0" />\
  728. </div>\
  729. </div></form>\
  730. <div id="scratchPadLimitNoteHolder">\
  731. <span class="scratchPadLimitNotePrefix">Note:&nbsp;</span><span id="scratchPadLimitNoteText"></span>\
  732. </div>\
  733. </div>\
  734. <div class="wbScratchPadSectionContent">\
  735. <div id="wbTranslatedArea" style="clear:both;overflow-x: auto; overflow-y: auto; height:150px">\
  736. </div>\
  737. </div>\
  738. </div>\
  739. </td>\
  740. <td class="wbWindowContentRight"><img src="../images/trans.gif" width="3" height="3" alt="" /></td>\
  741. </tr>\
  742. <tr valign="top">\
  743. <td class="wbWindowBottomLeft"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  744. <td class="wbWindowBottomCenter"><img src="../images/trans.gif" width="4" height="3" alt="" /></td>\
  745. <td class="wbWindowBottomRight"><img src="../images/trans.gif" width="4" height="4" alt="" /></td>\
  746. </tr>\
  747. </table>\
  748. </div>',
  749. searchWindowHTML:'<div id="wbSearchDiv">\
  750. <div id="wbContent">\
  751. <div id="wbSearchDraggableHandle" class="wbHeaderContainer" style="cursor:move;">\
  752. <div id="wbSearchHeader" class="wbH3">Search</div>\
  753. <div style="float: right;">\
  754. <a id="wbExitWindow" class="wbSearchExit" href="#" title="Close" oncontextmenu = "return false;"></a>\
  755. </div>\
  756. </div>\
  757. <table id="wbContentTable" border="0" cellpadding="0" cellspacing="0">\
  758. <tr>\
  759. <td class="wbWindowTopLeft" />\
  760. <td class="wbWindowTopCenter" />\
  761. <td class="wbWindowTopRight" />\
  762. </tr>\
  763. <tr>\
  764. <td class="wbWindowContentLeft" />\
  765. <td class="wbWindowContentCenter">\
  766. <div>\
  767. <div id="wbSearchTitle" class="wbContent" style="font-size:9pt;line-height:normal;padding-left:0px;">\
  768. Search for Wikipedia article to be used as a source.\
  769. </div>\
  770. <table id="wbSearchTable" border="0" cellpadding="0" cellspacing="0" width="100%">\
  771. <tr>\
  772. <td>\
  773. <div>\
  774. <div id="wikiBableSearchInputDiv">\
  775. <input id="wbSearchInput" type="text" style="width:350px;margin:10px"/>\
  776. </div>\
  777. <div id="wbSearchLinkDiv">\
  778. <a id="wbSearchLink" class="wbSearchLink" href="#" title="Search" style="margin:9px"></a>\
  779. </div>\
  780. </div>\
  781. </td>\
  782. </tr>\
  783. <tr>\
  784. <td>\
  785. <div id="wbSearchLoading" class="wbLoadingDiv">\
  786. <img src="../images/loading.gif" alt="searching" />Searching...</div>\
  787. </td>\
  788. </tr>\
  789. </table>\
  790. </div>\
  791. </td>\
  792. <td class="wbWindowContentRight"></td>\
  793. </tr>\
  794. <tr>\
  795. <td class="wbWindowContentLeft" />\
  796. <td style="line-height:normal">\
  797. <div id="wbSearchItem" class="wbSearch" />\
  798. </td>\
  799. <td class="wbWindowContentRight"></td>\
  800. </tr>\
  801. <tr>\
  802. <td class="wbWindowBottomLeft" />\
  803. <td class="wbWindowBottomCenter" />\
  804. <td class="wbWindowBottomRight" />\
  805. </tr>\
  806. </table>\
  807. </div>\
  808. <div id="wbFooterDiv"></div>\
  809. </div>',
  810. splashWindowHTML:'<div id="wbSplashWindow">\
  811. <div style="position:absolute; top:95px; left:85px; display:block"><img src="../images/loadingIcon.gif" alt="" /></div>\
  812. <div style="position:absolute; top:98px; left:115px; color:#FFFFFF">Loading...</div>\
  813. </div>',
  814. tooltipWindowHTML:'<table border="0" cellspacing="0" cellpadding="0" style="overflow:auto">\
  815. <tr>\
  816. <td class="wbTooltipContentTD">\
  817. <div class="wbTooltipContent" id="wbDynamicId"></div>\
  818. </td>\
  819. </tr>\
  820. </table>',
  821. wikiMarkupEditWindowHTML:'<div id="wbWikiMarkupEditDiv">\
  822. <div id="wbWikiMarkupEditDraggableHandle">\
  823. <div style="float:left;height:25px;"><ul class="tabs" id="wbWikiMarkupEditDivTab">\
  824. <li id="wbWikiMarkupEditLi"><a href="#" id="wbWikiMarkupEditLink" class="tabs_li">Edit Text</a></li>\
  825. <li id="wbWikiMarkupEditPreviewLi"><a href="#" id="wbWikiMarkupEditPreviewLink" class="tabs_li">Preview</a></li>\
  826. </ul></div>\
  827. <div style="float:right"><a id="wbWikiMarkupEditExit" class="wbExit" href="#" title="Close" oncontextmenu="return false;" style="margin:4px;padding:0;"></a></div>\
  828. </div>\
  829. <div id="wbWikiMarkupEditTabsContainer" class="tab_container">\
  830. <textarea id="wbWikiMarkupEditTab" class="tab_content">\
  831. </textarea>\
  832. <div id="wbWikiMarkupEditPreviewTab" class="tab_content">\
  833. Loading Preview</div>\
  834. <div id="wbWikiMarkupEditSubmitLinks" class="wbWikiMarkupEditBottomLinks">\
  835. <input type="button" id="wbWikiMarkupEditSaveLink" value="Save"/>&nbsp;&nbsp;&nbsp;&nbsp;\
  836. <input type="button" id="wbWikiMarkupEditCancelLink" value="Cancel"/>\
  837. </div>\
  838. </div>\
  839. </div>',
  840. tutorialWindowHTML:'<div id="wbTutorialDiv" class="wbTutorialBgContentArea" >\
  841. <div id="wbTutorialContent">\
  842. <div id="wbTTDraggableHandle" class="wbTutorial" style="cursor:move;">\
  843. </div>\
  844. <div style="float:right;"><a id="wbExitTutorialWindow" class="wbExit" href="#" title="Close" tabindex="0"></a></div>\
  845. <table id="wbTutorialContentTable" border="0" cellpadding="0" cellspacing="0">\
  846. <tr>\
  847. <td class="wbWindowTopLeft" ><img src="../images/trans.gif" width="4" height="4" /></td>\
  848. <td class="wbWindowTopCenter" ><img src="../images/trans.gif" width="4" height="3" /></td>\
  849. <td class="wbWindowTopRight" ><img src="../images/trans.gif" width="4" height="4" /></td>\
  850. </tr>\
  851. <tr>\
  852. <td class="wbWindowContentLeft"><img src="../images/trans.gif" width="3" height="3" /></td>\
  853. <td class="wbWindowContentCenter">\
  854. <div id="wbTutorialText" class="wbTutorialContent"></div>\
  855. </td>\
  856. <td class="wbWindowContentRight" ><img src="../images/trans.gif" width="3" height="3" /></td>\
  857. </tr>\
  858. <tr>\
  859. <td class="wbWindowBottomLeft" ><img src="../images/trans.gif" width="4" height="4" /></td>\
  860. <td class="wbWindowBottomCenter" ><img src="../images/trans.gif" width="4" height="3" /></td>\
  861. <td class="wbWindowBottomRight" ><img src="../images/trans.gif" width="4" height="4" /></td>\
  862. </tr>\
  863. </table>\
  864. <table style="background-color:Transparent">\
  865. <tr>\
  866. <td/>\
  867. <td class="wbTutorialNavigation" >\
  868. <a class="wbTutorialPreviousBtn" id="wbBackBtn" href="#" title="Previous"/>\
  869. <a class="wbTutorialNextBtn" id="wbNextBtn" href="#" title="Next"/>\
  870. </td>\
  871. <td/>\
  872. </tr>\
  873. </table>\
  874. </div>\
  875. </div>'
  876. /*HTML BLOCK END*/
  877. //Don not delete above comment as it needed by the HTML Engine to insert HTML code from HTML files.
  878. };
  879. wbGlobalSettings = wikiBhasha.configurations.globalSettings;
  880. })();