Page title

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-11-09 11:51:55 +01:00
parent b1bf1c9387
commit 948913bc82
12 changed files with 178 additions and 25 deletions

27
js/materio_page_title.js Normal file
View File

@@ -0,0 +1,27 @@
// @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);