Index: branches/5.1.x/core/admin_templates/js/toolbar.js =================================================================== diff -u -N -r13086 -r13113 --- branches/5.1.x/core/admin_templates/js/toolbar.js (.../toolbar.js) (revision 13086) +++ branches/5.1.x/core/admin_templates/js/toolbar.js (.../toolbar.js) (revision 13113) @@ -42,9 +42,10 @@ if (this.Title.match(/([^:]+):(.*)$/)) { // has module set directly this.Title = RegExp.$2; - this.Module = RegExp.$1; + this.Module = RegExp.$1.toLowerCase(); + if (this.Module == 'in-portal') { - this.Module = 'kernel'; + this.Module = 'core'; } } else { @@ -58,7 +59,14 @@ if (typeof(img_path) == 'undefined') { //alert('error: toolbar image path not set'); } - return img_path.replace('#MODULE#', this.Module) + 'toolbar/'; + + var $module_path = this.Module; + + if (this.Module != 'core') { + $module_path = 'modules/' + $module_path; + } + + return img_path.replace('#MODULE#', $module_path) + 'toolbar/'; } ToolBarButton.prototype.GetHTML = function() { @@ -93,18 +101,6 @@ this.SetOnClick(); this.SetOnRightClick() if (this.Hidden) this.Hide(); - - if (!img.complete) { - var real_path = img_path.replace('#MODULE#', this.Module) + 'toolbar/'; - var old_path = img_path.replace('#MODULE#', 'kernel') + 'toolbar/'+this.ToolBar.IconPrefix + this.Title+'.gif'; - real_path = real_path.replace('http://kostja.prod.intechnic.lv/in-portal.RC', '.'); - old_path = old_path.replace('http://kostja.prod.intechnic.lv/in-portal.RC', '.'); - var source = old_path.replace('/core/', '/kernel/').replace('.gif', '*.gif'); - var path = 'cp '+source+' '+real_path; -// prompt('exec: ', path) -// img.src = 'img/bad_button.GIF'; - } -// preg_print_pre(img, /natural|compl/i) } ToolBarButton.prototype.EditTitle = function() {