Your IP : 18.219.40.177
/**
* Модуль обрабатывает ссылки на документацию
*
*/
var App = App || {};
App.Help = function(window, $, EventMgr) {
'use strict';
var init = function() {
EventMgr.on($mainWrapper(), helpLinkSelector, 'click', showHelp);
},
$mainWrapper = function() {
return $('#main-wrapper');
},
helpLinkSelector = '.help',
showHelp = function(e) {
var type = this.getAttribute('data-help-type'),
helpChain = this.getAttribute('data-help'),
func = $('.tab-content_st_active').attr('data-func'),
url;
e = e || window.event;
e.preventDefault();
if (type - 0 === 2 || type === 'default') {
window.open(pageInfo.url + '?func=help&topic=' + func + '&path=' + helpChain + '&newwindow=yes');
} else if (type === 'external') {
url = this.getAttribute('data-help-func');
App.u.openInNewWindow(url);
}
};
return {
init: init
};
}(window, $, EventMgr);