27
js/materio_page_title.js
Normal file
27
js/materio_page_title.js
Normal 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);
|
||||
Reference in New Issue
Block a user