Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/05/2009, 06:09
kyu24
 
Fecha de Ingreso: mayo-2009
Mensajes: 40
Antigüedad: 15 años, 11 meses
Puntos: 0
Respuesta: no me funciona el combo que he creado

injection_graph_func.js (parte 1)
Código:
var skype_injection_path = 'chrome://skype_ff_toolbar_win/content/';
var skype_tool = null;

/*window.addEventListener("click",skype_click_handler,true);
function skype_click_handler(event)
{
	if (skype_tool)
		skype_tool.closemenu();
	//HideSkypeMenuFull();
} */

//CALL BUTTON
var SkypeActiveCallButtonPart = 0;
function SkypeSetCallButtonPart(obj)
{
	if (obj.getAttribute('id') == '__skype_highlight_id_left')
	{
		SkypeActiveCallButtonPart = 0;
	}
	else if (obj.getAttribute('id') == '__skype_highlight_id_right')
	{
		SkypeActiveCallButtonPart = 1;
	}
}

function SkypeSetCallButton(obj, hl, isInternational, isFax)
{
	var cb_part_l = null;
	var cb_part_ml = null;
	var cb_part_mr = null;
	var cb_part_r = null;
	if (obj.getAttribute('rtl') == 'false')
	{
		cb_part_l = obj.firstChild.firstChild;
		cb_part_ml = obj.firstChild.lastChild;
		cb_part_mr = obj.lastChild.firstChild;
		cb_part_r = obj.lastChild.lastChild;

		cb_flag = obj.firstChild.lastChild.firstChild;
		if (cb_flag && cb_flag.isSameNode(obj.firstChild.firstChild.firstChild) == true)
			cb_flag = null;
	}
	else
	{
		cb_part_l = obj.lastChild.lastChild;
		cb_part_ml = obj.lastChild.firstChild;
		cb_part_mr = obj.firstChild.lastChild;
		cb_part_r = obj.firstChild.firstChild;

		cb_flag = obj.lastChild.firstChild.lastChild;
		if (cb_flag && cb_flag.isSameNode(obj.lastChild.lastChild.lastChild) == true)
			cb_flag = null;
	}

	if (hl == 1)
	{
		cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_l.gif')";
		if (cb_part_l.isSameNode(cb_part_ml) != true)
			cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_m.gif')";
		cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_m.gif')";


		if (isInternational == "0")
		{
			if (SkypeActiveCallButtonPart == 0)    //left
			{
				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseonflag_r"+(isFax?"_fax":"")+".gif')";
				//shadow
				if (cb_flag)
				{
					cb_flag.style.top = '1px';
					cb_flag.style.left = '1px';
					/*top right bottom left*/
					cb_flag.style.padding = '1px 0px 0px 1px';//'2px 0px 0px 0px';
				}
			}
			else                            //right
			{
				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_r"+(isFax?"_fax":"")+".gif')";
				//flag
				if (cb_flag)
				{
					cb_flag.style.top = '0px';
					cb_flag.style.left = '0px';
					cb_flag.style.padding = '0px 1px 1px 0px';//'0px 1px 1px 0px';
					cb_flag.style.margin = '0px 0px 2px 0px;';
				}
			}
		}
		else
		{
			cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_r"+(isFax?"_fax":"")+".gif')";
			//flag
			if (cb_flag)
			{
				cb_flag.style.top = '0px';
				cb_flag.style.left = '0px';
				cb_flag.style.padding = '0px 1px 1px 0px';
				cb_flag.style.margin = '0px 0px 2px 0px;';
			}
		}
	}
	else
	{
		cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_l.gif')";
		if (cb_part_l.isSameNode(cb_part_ml) != true)
			cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_m.gif')";
		cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_m.gif')";
		cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_r"+(isFax?"_fax":"")+".gif')";

		//flag
		if (cb_flag)
		{
			cb_flag.style.top = '0px';
			cb_flag.left = '0px';
			cb_flag.style.padding = '0px 1px 1px 0px';
			cb_flag.style.margin = '0px 0px 2px 0px;';
		}
	}
}
var skype_cb_l = '';
var skype_cb_m = '';
var skype_cb_r = '';

function SkypeSetCallButtonPressed(obj, pr, isInternational, isFax)
{
	var cb_part_l = null;
	var cb_part_ml = null;
	var cb_part_mr = null;
	var cb_part_r = null;
	if (obj.getAttribute('rtl') == 'false')
	{
		cb_part_l = obj.firstChild.firstChild;
		cb_part_ml = obj.firstChild.lastChild;
		cb_part_mr = obj.lastChild.firstChild;
		cb_part_r = obj.lastChild.lastChild;

		cb_flag = obj.firstChild.lastChild.firstChild;
		if (cb_flag && cb_flag.isSameNode(obj.firstChild.firstChild.firstChild) == true)
			cb_flag = null;
	}
	else
	{
		cb_part_l = obj.lastChild.lastChild;
		cb_part_ml = obj.lastChild.firstChild;
		cb_part_mr = obj.firstChild.lastChild;
		cb_part_r = obj.firstChild.firstChild;

		cb_flag = obj.lastChild.firstChild.lastChild;
		if (cb_flag && cb_flag.isSameNode(obj.lastChild.lastChild.lastChild) == true)
			cb_flag = null;
	}
	if (pr == 1)
	{
		skype_cb_l = cb_part_l.style.backgroundImage;//getAttribute('src');
		skype_cb_m = cb_part_mr.style.backgroundImage;
		skype_cb_r = cb_part_r.style.backgroundImage;//getAttribute('src');

		if (isInternational == "0")
		{
			if (SkypeActiveCallButtonPart == 0)    //left
			{
				//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
				cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
				if (cb_part_l.isSameNode(cb_part_ml) != true)
					cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
			}
			else                            //right
			{
				//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
				cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
				if (cb_part_l.isSameNode(cb_part_ml) != true)
					cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
				cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
				//obj.lastChild.lastChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif');
				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif')";
			}
		}
		else
		{
			//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
			cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
			if (cb_part_l.isSameNode(cb_part_ml) != true)
				cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
			cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
				//obj.lastChild.lastChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif');
			cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif')";
		}
	}
	else
	{
		//obj.firstChild.firstChild.setAttribute('src', skype_cb_l);
		cb_part_l.style.backgroundImage = skype_cb_l;
		if (cb_part_l.isSameNode(cb_part_ml) != true)
			cb_part_ml.style.backgroundImage = skype_cb_m;
		cb_part_mr.style.backgroundImage = skype_cb_m;
		//obj.lastChild.lastChild.setAttribute('src', skype_cb_r);
		cb_part_r.style.backgroundImage = skype_cb_r;
	}
}