Skip to content

Commit

Permalink
Merge pull request #238 from yandex-ui/issue-232
Browse files Browse the repository at this point in the history
Fix #232 ns.update должен дать возможность опредять yate-модуль для нало...
  • Loading branch information
doochik committed Apr 17, 2014
2 parents 1cef181 + fadc488 commit 2edc85a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/ns.update.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ ns.Update.prototype._update = function(async) {
// если пустое дерево, то ничего не реднерим,
// но кидаем события и скрываем/открываем блоки
if (!ns.object.isEmpty(tree.views)) {
node = ns.tmpl(tree, null, '');
node = this.render(tree, this.params, this.layout);
ns.log.debug('[ns.Update]', 'start()', this.id, 'new node', node.cloneNode(true));
}

Expand All @@ -252,7 +252,21 @@ ns.Update.prototype._update = function(async) {
}
};

// --------------------------------------------------------------------------------------------------------------- //
/**
* Рендерит дерево видов.
* @description
* Этот метод является точкой расширения в приложении.
* Если приложение использует yate-модули или другой шаблонизатор,
* то ему надо переопределить этот метод.
* @param {object} tree Дерево видов.
* @param {object} params Параметры страницы.
* @param {object} layout Раскладка страницы.
* @returns {HTMLElement}
*/
ns.Update.prototype.render = function(tree, params, layout) {
/* jshint unused: false */
return ns.tmpl(tree, null, '');
};

/**
* @return {Boolean} true in case another update was created after current update.
Expand Down

0 comments on commit 2edc85a

Please sign in to comment.