materio-base-legacy/js/materio_page_title.js
bachy 948913bc82 Page title
Signed-off-by: bachy <git@g-u-i.net>
2012-11-09 11:51:55 +01:00

27 lines
730 B
JavaScript

// @codekit-prepend "gui.js"
(function($) {
MaterioPageTitle = function(){
function init(){
$(document).bind('materio-page-title-refresh-block', onRefreshBlock);
};
function onRefreshBlock(event){
trace('onRefreshBlock', event);
// var url = Drupal.settings.basePath+Drupal.settings.pathPrefix+'materio_page_title/refresh/block';
// $.getJSON(url, function(json){
// trace('page title json', json);
// $('#block-materio-page-title-materio-page-title').replaceWith(json.block);
// });
if(typeof event.title !== 'undefined')
$('#block-materio-page-title-materio-page-title h1').html(event.title);
};
init();
};
var materiopagetitle = new MaterioPageTitle();
})(jQuery);