Função editar rápido
4 participantes
Fórum dos Fóruns :: Ajuda e atendimento ao utilizador :: Questões sobre a aparência do fórum :: Questões resolvidas sobre a aparência do fórum
Página 1 de 1 • Compartilhe
Função editar rápido
Qual é minha questão:
Olá,
Eu utilizei este código para colocar o Editar Rápido:
Se possível desejava que a caixa onde mostra "Editar Rápido - Editar Normal" fica-se debaixo do botão de "Edit".
Endereço do meu fórum:
http://www.suportedesign.net
Versão do fórum:
PUNBB
Olá,
Eu utilizei este código para colocar o Editar Rápido:
- Código:
$(function(){
$('head').append('<style>#locsdeidit [name="subject"], #locsdeidit [name="topic_color"]{display:none}#locsdeidit textarea{width: 70% !important;height: 900px !important;}#locsdeidit input:hover{background:rgba(200,200,200,0.2)}#locsdeidit input{margin-bottom:1%;margin-top:1%;padding:5px 15px;border:1px solid black;cursor:pointer;background:rgba(200,200,200,0.4)}</style>');
$('a[href*="mode=editpost"]').click(function(){
if($(this).parents('.post').find('#contedit').length){
$('#contedit').fadeOut().remove();
}else{
$('#contedit').remove();
mylinkpathname = $(this).attr('href');
$(this).after('
<div id="contedit" style="box-shadow:0 0 10px grey;border:1px solid #555;margin-left:7%;padding:10px 15px;background:#f4f4f4;position:absolute;z-index:999;margin-top: 1%;margin-left: 981px;margin-top: -0px;">
<p><div id="normedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;border-bottom:1px solid grey;margin-bottom:1%;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Normal)</div></p>
<p><div id="rapidedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Rápido)</div></p>
</div>
');
$('#rapidedit').bind('click', function(){
if($(this).parents('.post').find('#locsdeidit').length){
$('#locsdeidit').remove()}else{$('#locsdeidit').remove();
$(this).parents('.post').find('.post-entry').after('<div style="padding-left: 1.79%;" id="locsdeidit"><img src="http://www.wingshootingusa.org/2012/Images/loading_transparent.gif"></div>');
$('#locsdeidit').hide().fadeIn();
$.get(mylinkpathname, function(locg){
var html0 = $('.frm-form .frm-input', locg).html();
var html1 = $('.frm-form .frm-textarea', locg).html();
var html2 = $('.frm-form .frm-buttons', locg).html();
var htmlfinal = '<form onsubmit="return vB_Editor[\'text_editor\'].prepare_submit(0,0)" name="post" method="post" action="/post" enctype="multipart/form-data">' + html0 + html1 + html2 + '</form>';
$('#locsdeidit').html(htmlfinal);
});
jQuery('html,body').animate({scrollTop: jQuery('#locsdeidit').offset().top}, 1000);
$('#contedit').remove();
}
});
$('#normedit').bind('click', function(){
window.open(mylinkpathname, '_self')
});
$('#contedit').hide().fadeIn();
}
return false;
});
});
Se possível desejava que a caixa onde mostra "Editar Rápido - Editar Normal" fica-se debaixo do botão de "Edit".
Endereço do meu fórum:
http://www.suportedesign.net
Versão do fórum:
PUNBB
Re: Função editar rápido
Olá!
Altere o código pelo abaixo:
Altere o código pelo abaixo:
- Código:
$(function(){
$('head').append('<style>#locsdeidit [name="subject"], #locsdeidit [name="topic_color"]{display:none}#locsdeidit textarea{width: 70% !important;height: 900px !important;}#locsdeidit input:hover{background:rgba(200,200,200,0.2)}#locsdeidit input{margin-bottom:1%;margin-top:1%;padding:5px 15px;border:1px solid black;cursor:pointer;background:rgba(200,200,200,0.4)}</style>');
$('a[href*="mode=editpost"]').click(function(){
if($(this).parents('.post').find('#contedit').length){
$('#contedit').fadeOut().remove();
}else{
$('#contedit').remove();
mylinkpathname = $(this).attr('href');
$(this).after('
<div id="contedit" style="box-shadow:0 0 10px grey;border:1px solid #555;margin-left:7%;padding:10px 15px;background:#f4f4f4;position:absolute;z-index:999;margin-top: 1%;margin-left: 981px;margin-top: -0px;">
<p><div id="normedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;border-bottom:1px solid grey;margin-bottom:1%;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Normal)</div></p>
<p><div id="rapidedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Rápido)</div></p>
</div>
');
$('#rapidedit').bind('click', function(){
if($(this).parents('.post').find('#locsdeidit').length){
$('#locsdeidit').remove()}else{$('#locsdeidit').remove();
$(this).parents('.post').find('.post-entry').after('<div style="padding-left: 12%;" id="locsdeidit"><img src="http://www.wingshootingusa.org/2012/Images/loading_transparent.gif"></div>');
$('#locsdeidit').hide().fadeIn();
$.get(mylinkpathname, function(locg){
var html0 = $('.frm-form .frm-input', locg).html();
var html1 = $('.frm-form .frm-textarea', locg).html();
var html2 = $('.frm-form .frm-buttons', locg).html();
var htmlfinal = '<form onsubmit="return vB_Editor[\'text_editor\'].prepare_submit(0,0)" name="post" method="post" action="/post" enctype="multipart/form-data">' + html0 + html1 + html2 + '</form>';
$('#locsdeidit').html(htmlfinal);
});
jQuery('html,body').animate({scrollTop: jQuery('#locsdeidit').offset().top}, 1000);
$('#contedit').remove();
}
});
$('#normedit').bind('click', function(){
window.open(mylinkpathname, '_self')
});
$('#contedit').hide().fadeIn();
}
return false;
});
});
Re: Função editar rápido
Olá,
Continua igual
Continua igual
Re: Função editar rápido
Olá!
Altere pelo abaixo:
Altere pelo abaixo:
- Código:
$(function(){
$('head').append('<style>#locsdeidit [name="subject"], #locsdeidit [name="topic_color"]{display:none}#locsdeidit textarea{width: 70% !important;height: 900px !important;}#locsdeidit input:hover{background:rgba(200,200,200,0.2)}#locsdeidit input{margin-bottom:1%;margin-top:1%;padding:0px 5px;border:1px solid black;cursor:pointer;background:rgba(200,200,200,0.4)}</style>');
$('a[href*="mode=editpost"]').click(function(){
if($(this).parents('.post').find('#contedit').length){
$('#contedit').fadeOut().remove();
}else{
$('#contedit').remove();
mylinkpathname = $(this).attr('href');
$(this).after('
<div id="contedit" style="box-shadow:0 0 10px grey;border:1px solid #555;margin-left:0%;padding:10px 15px;background:#f4f4f4;position:absolute;z-index:999;margin-top: 1%;margin-left: 981px;margin-top: -0px;">
<p><div id="normedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;border-bottom:1px solid grey;margin-bottom:1%;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Normal)</div></p>
<p><div id="rapidedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Rápido)</div></p>
</div>
');
$('#rapidedit').bind('click', function(){
if($(this).parents('.post').find('#locsdeidit').length){
$('#locsdeidit').remove()}else{$('#locsdeidit').remove();
$(this).parents('.post').find('.post-entry').after('<div style="padding-left: 12%;" id="locsdeidit"><img src="http://www.wingshootingusa.org/2012/Images/loading_transparent.gif"></div>');
$('#locsdeidit').hide().fadeIn();
$.get(mylinkpathname, function(locg){
var html0 = $('.frm-form .frm-input', locg).html();
var html1 = $('.frm-form .frm-textarea', locg).html();
var html2 = $('.frm-form .frm-buttons', locg).html();
var htmlfinal = '<form onsubmit="return vB_Editor[\'text_editor\'].prepare_submit(0,0)" name="post" method="post" action="/post" enctype="multipart/form-data">' + html0 + html1 + html2 + '</form>';
$('#locsdeidit').html(htmlfinal);
});
jQuery('html,body').animate({scrollTop: jQuery('#locsdeidit').offset().top}, 1000);
$('#contedit').remove();
}
});
$('#normedit').bind('click', function(){
window.open(mylinkpathname, '_self')
});
$('#contedit').hide().fadeIn();
}
return false;
});
});
Re: Função editar rápido
Continua igual ...
Re: Função editar rápido
Troque por esse
- Código:
$(function(){
$('head').append('<style>#locsdeidit [name="subject"], #locsdeidit [name="topic_color"]{display:none}#locsdeidit textarea{width: 70% !important;height: 900px !important;}#locsdeidit input:hover{background:rgba(200,200,200,0.2)}#locsdeidit input{margin-bottom:1%;margin-top:1%;padding:0px 5px;border:1px solid black;cursor:pointer;background:rgba(200,200,200,0.4)}</style>');
$('a[href*="mode=editpost"]').click(function(){
if($(this).parents('.post').find('#contedit').length){
$('#contedit').fadeOut().remove(x);
}else{
$('#contedit').remove();
mylinkpathname = $(this).attr('href');
$(this).after('
<div id="contedit" style="box-shadow:0 0 10px grey;border:1px solid #555;margin-left:0%;padding:10px 15px;background:#f4f4f4;position:absolute;z-index:999;margin-top: 1%;margin-left: 981px;margin-top: -0px;">
<p><div id="normedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;border-bottom:1px solid grey;margin-bottom:1%;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Normal)</div></p>
<p><div id="rapidedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Rápido)</div></p>
</div>
');
$('#rapidedit').bind('click', function(){
if($(this).parents('.post').find('#locsdeidit').length){
$('#locsdeidit').remove()}else{$('#locsdeidit').remove();
$(this).parents('.post').find('.post-entry').after('<div style="padding-left: 12%;" id="locsdeidit"><img src="http://www.wingshootingusa.org/2012/Images/loading_transparent.gif"></div>');
$('#locsdeidit').hide().fadeIn();
$.get(mylinkpathname, function(locg){
var html0 = $('.frm-form .frm-input', locg).html();
var html1 = $('.frm-form .frm-textarea', locg).html();
var html2 = $('.frm-form .frm-buttons', locg).html();
var htmlfinal = '<form onsubmit="return vB_Editor[\'text_editor\'].prepare_submit(0,0)" name="post" method="post" action="/post" enctype="multipart/form-data">' + html0 + html1 + html2 + '</form>';
$('#locsdeidit').html(htmlfinal);
});
jQuery('html,body').animate({scrollTop: jQuery('#locsdeidit').offset().top}, 1000);
$('#contedit').remove();
}
});
$('#normedit').bind('click', function(){
window.open(mylinkpathname, '_self')
});
$('#contedit').hide().fadeIn();
}
return false;
});
});
Re: Função editar rápido
Continua igual
Re: Função editar rápido
Saudações!
Aceda à teu painel administrativo:
Painel de Controle Visualização Imagens e Cores Cores Folha de Estilo CSS
Código:
Atenciosamente,
Sennior!
Aceda à teu painel administrativo:
Painel de Controle Visualização Imagens e Cores Cores Folha de Estilo CSS
Código:
- Código:
#contedit {
position: absolute !Important;
left: 196px !important;
}
Atenciosamente,
Sennior!
Re: Função editar rápido
Saudações!
Tente este código:
Tente este código:
- Código:
$(function(){
$('head').append('<style>#locsdeidit [name="subject"], #locsdeidit [name="topic_color"]{display:none}#locsdeidit textarea{width: 70% !important;height: 900px !important;}#locsdeidit input:hover{background:rgba(200,200,200,0.2)}#locsdeidit input{margin-bottom:1%;margin-top:1%;padding:5px 15px;border:1px solid black;cursor:pointer;background:rgba(200,200,200,0.4)}</style>');
$('a[href*="mode=editpost"]').click(function(){
if($(this).parents('.post').find('#contedit').length){
$('#contedit').fadeOut().remove();
}else{
$('#contedit').remove();
mylinkpathname = $(this).attr('href');
$(this).after('
<div id="contedit" style="box-shadow:0 0 10px grey;border:1px solid #555;margin-left:6%;padding:10px 15px;background:#f4f4f4;position:absolute;z-index:999;margin-top: 1%;margin-left: 901px;margin-top: -0px;">
<p><div id="normedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;border-bottom:1px solid grey;margin-bottom:1%;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Normal)</div></p>
<p><div id="rapidedit" onmouseout="$(this).css(\'background\',\'rgba(255,255,255,0.8)\')" onmouseover="$(this).css(\'background\',\'rgba(200,200,200,0.5)\')" style="font-weight:bold;color:#7D7D7D;transition:all 0.4s;padding:10px 15px;background:rgba(255,255,255,0.8);cursor:pointer;">Editar (Rápido)</div></p>
</div>
');
$('#rapidedit').bind('click', function(){
if($(this).parents('.post').find('#locsdeidit').length){
$('#locsdeidit').remove()}else{$('#locsdeidit').remove();
$(this).parents('.post').find('.post-entry').after('<div style="padding-left: 1.79%;" id="locsdeidit"><img src="http://www.wingshootingusa.org/2012/Images/loading_transparent.gif"></div>');
$('#locsdeidit').hide().fadeIn();
$.get(mylinkpathname, function(locg){
var html0 = $('.frm-form .frm-input', locg).html();
var html1 = $('.frm-form .frm-textarea', locg).html();
var html2 = $('.frm-form .frm-buttons', locg).html();
var htmlfinal = '<form onsubmit="return vB_Editor[\'text_editor\'].prepare_submit(0,0)" name="post" method="post" action="/post" enctype="multipart/form-data">' + html0 + html1 + html2 + '</form>';
$('#locsdeidit').html(htmlfinal);
});
jQuery('html,body').animate({scrollTop: jQuery('#locsdeidit').offset().top}, 1000);
$('#contedit').remove();
}
});
$('#normedit').bind('click', function(){
window.open(mylinkpathname, '_self')
});
$('#contedit').hide().fadeIn();
}
return false;
});
});
Re: Função editar rápido
Perfeito HugoPimenta resolvido !
Fórum dos Fóruns :: Ajuda e atendimento ao utilizador :: Questões sobre a aparência do fórum :: Questões resolvidas sobre a aparência do fórum
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos