27 lines
730 B
JavaScript
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); |