Merged from 1.7
This commit is contained in:
@@ -150,7 +150,8 @@ main_class.prototype.mk_button = function(tag, imgSrc, attributes, imgAttributes
|
||||
var container = document.createElement(tag);
|
||||
container.style.cursor = 'pointer';
|
||||
var image = document.createElement('img');
|
||||
image.setAttribute('src', main.portal.strings['wwwroot']+imgSrc);
|
||||
|
||||
image.setAttribute('src', main.portal.strings['pixpath']+imgSrc);
|
||||
container.appendChild(image);
|
||||
|
||||
if (attributes != null) {
|
||||
|
||||
@@ -86,6 +86,7 @@ class jsportal {
|
||||
$output .= " main.portal.id = ".$courseid.";\n";
|
||||
$output .= " main.portal.blocks = new Array(".$blocksoutput.");\n";
|
||||
$output .= " main.portal.strings['wwwroot']='".$CFG->wwwroot."';\n";
|
||||
$output .= " main.portal.strings['pixpath']='".$CFG->pixpath."';\n";
|
||||
$output .= " main.portal.strings['update']='".get_string('update')."';\n";
|
||||
$output .= " main.portal.strings['deletecheck']='".get_string('deletecheck','','_var_')."';\n";
|
||||
$output .= " main.portal.strings['resource']='".get_string('resource')."';\n";
|
||||
|
||||
@@ -197,10 +197,10 @@ block_class.prototype.reset_regions = function(){
|
||||
|
||||
block_class.prototype.init_buttons = function(){
|
||||
|
||||
var viewbutton = main.mk_button('a','/pix/t/hide.gif',[['class','icon hide']]);
|
||||
var viewbutton = main.mk_button('a', '/t/hide.gif',[['class','icon hide']]);
|
||||
YAHOO.util.Event.addListener(viewbutton,'click',this.toggle_hide,this,true);
|
||||
|
||||
var deletebutton = main.mk_button('a','/pix/t/delete.gif',[['class','icon delete']]);
|
||||
var deletebutton = main.mk_button('a', '/t/delete.gif',[['class','icon delete']]);
|
||||
YAHOO.util.Event.addListener(deletebutton,'click',this.delete_button,this,true);
|
||||
|
||||
|
||||
|
||||
@@ -87,19 +87,19 @@ section_class.prototype.init_buttons = function() {
|
||||
}
|
||||
|
||||
if (!this.isWeekFormat) {
|
||||
var highlightbutton = main.mk_button('div', '/pix/i/marker.gif');
|
||||
var highlightbutton = main.mk_button('div', '/i/marker.gif');
|
||||
YAHOO.util.Event.addListener(highlightbutton, 'click', this.mk_marker, this, true);
|
||||
commandContainer.appendChild(highlightbutton);
|
||||
this.highlightButton = highlightbutton;
|
||||
}
|
||||
var viewbutton = main.mk_button('div', '/pix/i/hide.gif');
|
||||
var viewbutton = main.mk_button('div', '/i/hide.gif');
|
||||
YAHOO.util.Event.addListener(viewbutton, 'click', this.toggle_hide, this,true);
|
||||
commandContainer.appendChild(viewbutton);
|
||||
this.viewButton = viewbutton;
|
||||
}
|
||||
|
||||
section_class.prototype.add_handle = function() {
|
||||
var handleRef = main.mk_button('a', '/pix/i/move_2d.gif', [['style','cursor:move']]);
|
||||
var handleRef = main.mk_button('a', '/i/move_2d.gif', [['style','cursor:move']]);
|
||||
YAHOO.util.Dom.generateId(handleRef, 'sectionHandle');
|
||||
|
||||
this.handle = handleRef;
|
||||
@@ -516,7 +516,7 @@ resource_class.prototype.init_buttons = function() {
|
||||
commandContainer.innerHTML = '';
|
||||
|
||||
//add move-handle
|
||||
var handleRef = main.mk_button('a', '/pix/i/move_2d.gif',
|
||||
var handleRef = main.mk_button('a', '/i/move_2d.gif',
|
||||
[['style', 'cursor:move']], [['height', '11'], ['width', '11'],
|
||||
['hspace', '2'], ['border', '0']]);
|
||||
|
||||
@@ -529,14 +529,14 @@ resource_class.prototype.init_buttons = function() {
|
||||
commandContainer.appendChild(updateButton);
|
||||
|
||||
//add rest
|
||||
var button = main.mk_button('a', '/pix/t/delete.gif');
|
||||
var button = main.mk_button('a', '/t/delete.gif');
|
||||
YAHOO.util.Event.addListener(button, 'click', this.delete_button, this, true);
|
||||
commandContainer.appendChild(button);
|
||||
|
||||
if (this.hidden) {
|
||||
var button = main.mk_button('a', '/pix/t/show.gif');
|
||||
var button = main.mk_button('a', '/t/show.gif');
|
||||
} else {
|
||||
var button = main.mk_button('a', '/pix/t/hide.gif');
|
||||
var button = main.mk_button('a', '/t/hide.gif');
|
||||
}
|
||||
YAHOO.util.Event.addListener(button, 'click', this.toggle_hide, this, true);
|
||||
commandContainer.appendChild(button);
|
||||
@@ -693,10 +693,10 @@ activity_class.prototype.init_activity = function(id, group, config, parentObj)
|
||||
}
|
||||
}
|
||||
|
||||
activity_class.prototype.groupImages = ['/pix/t/groupn.gif', '/pix/t/groups.gif', '/pix/t/groupv.gif'];
|
||||
activity_class.prototype.groupImages = ['/t/groupn.gif', '/t/groups.gif', '/t/groupv.gif'];
|
||||
|
||||
activity_class.prototype.init_activity_button = function() {
|
||||
var button = main.mk_button('a',this.groupImages[this.currentGroup]);
|
||||
var button = main.mk_button('a', this.groupImages[this.currentGroup]);
|
||||
YAHOO.util.Event.addListener(button,'click',this.toggle_group,this,true);
|
||||
this.commandContainer.appendChild(button);
|
||||
this.groupButton = button;
|
||||
|
||||
Reference in New Issue
Block a user