Mise en forme des labels et champs de la fiche personnage séparément
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Gérer l'apparence de son forum :: Archives des problèmes avec l'apparence du forum
Page 1 sur 1 • Partagez
Mise en forme des labels et champs de la fiche personnage séparément
Détails techniques
Version du forum : phpBB2
Poste occupé : Fondateur
Navigateur(s) concerné(s) : Google Chrome
Personnes concernées par le problème : Moi uniquement
Lien du forum : http://moonlight-test.forumactif.com/
Description du problème
Rebonjour !Je n'arrête plus les questions décidément :')
Alors voilà, m'étant attaquée au profil, j'aimerais désormais mettre en forme la fiche personnage. Le problème est que j'arrive effectivement à la mettre en forme, mais je n'arrive pas à séparer la mise en forme des labels et des champs en tant que tels.
Voici donc le template profile_view_body :
- Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<div class="PFIL"><div class="namePFIL colorPFIL">{USERNAME}</div>
<script type="text/javascript">//<![CDATA[
$( document ).ready(function() {$('.colorPFIL').each(function(){var color = $(this).children().css("color");
$(this).closest('.namePFIL').css("background-color", color);});});//]]></script>
<div class="firstbox">
<div class="avPFIL">
<div id="adminPFIL">
<!-- BEGIN switch_auth_user -->
<div><span>{L_ADMINISTRATE_USER} :</span><br/>{ADMINISTRATE_USER}{BAN_USER}</div>
<!-- END switch_auth_user --><div>
<!-- BEGIN switch_dhow_mp -->
<span>{L_PRIVATE_MSG} :</span> {PRIVATE_MSG}
<!-- END switch_dhow_mp --></div></div><span id="avatar_membre">{AVATAR_IMG}</span></div>
<div class="lstPFIL"><span>{L_LAST_VISITED} :</span><br/> {LAST_VISIT_TIME}</div>
<div class="infos-supp"></div>
</div>
<div class="boxPFIL">
<div class="firstline"><a rel="nofollow" href="/sta/{PUSERNAME}"><div class="sbjPFIL">{L_TOPICS}</div></a>
<a rel="nofollow" href="/spa/{PUSERNAME}"><div class="sbjPFIL">{L_POSTS}</div></a>
<a rel="nofollow" href="/privmsg?mode=post&u={CUR_USER_ID}"><div class="sbjPFIL">Envoyer un MP</div></a></div>
<div class="boxprofil"><div class="abtPFIL"><div class="titreprofil">Blablabla</div>
<!-- BEGIN profile_field --><div class="infos-posteur"><div id="field_id{profile_field.ID}"><div>
<span class="gen">{profile_field.LABEL}</span> <br/>{profile_field.CONTENT}</div></div></div>
<!-- END profile_field --></div>
<div id="ktactPFIL"><div class="titreprofil">Blablabla</div><br/>
<!-- BEGIN switch_rpg --> <!-- BEGIN rpg_fields -->
{switch_rpg.rpg_fields.F_NAME}<br/> <span class="contenuerp">{switch_rpg.rpg_fields.F_VALUE_NEW}</span><br/><br/>
<!-- END rpg_fields --> <!-- END switch_rpg -->
</div>
<div class="contactprofil"> <div class="titreprofil">Blablabla</div>
<!-- BEGIN contact_field -->
<div class="ktactPFIL">{contact_field.CONTENT}</div><!-- END contact_field -->
</div>
</div> </div>
<!-- BEGIN switch_rpg -->
<div class="boxRPG"><div style="text-align:center">{RPG_IMAGE}</div><br/>
{U_ADMIN_RPG}
</div>
<!-- END switch_rpg -->
<!-- BEGIN switch_admin_user_comment_active --><span class="gen">{L_COMMENTS} :</span><br /><span class="gensmall">{L_MODS_AND_ADMINS}</span> {ADMIN_USER_COMMENT}<!-- END switch_admin_user_comment_active -->
</div>
</table>
<br />
<script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
$('[id^=field_id]').each(function(){
if ( $(this).find('.field_editable').is('span, div') )
{
$(this).hover(function()
{
if( $(this).find('.field_editable.invisible').is('span, div') )
{
$(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="{AJAX_EDIT_IMG}" /></div>');
$(this).find('.ajax-profil_edit').attr({
alt: "{L_FIELD_EDIT_VALUE}",
title: "{L_FIELD_EDIT_VALUE}"
}).click(function(){
$(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="{AJAX_VALID_IMG}" class="ajax-profil_valid" />').find('input,select');
$(this).prev().find('.ajax-profil_valid').attr({
alt: "{L_VALIDATE}",
title: "{L_VALIDATE}"
}).click(function(){
var content = new Array();
$(this).parent().find('[name]').each(function(){
var type_special = $(this).is('input[type=radio],input[type=checkbox]');
if ( (type_special && $(this).is(':checked')) || !type_special )
{
content.push(new Array($(this).attr('name'), $(this).attr('value')));
}
});
var id_name = $(this).parents('[id^=field_id]').attr('id');
var id = id_name.substring(8, id_name.length);
$.post(
"{U_AJAX_PROFILE}",
{id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
function(data){
$.each(data, function(i, item){
$('[id=field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
});
},
"json"
);
});
$(this).remove();
});
}
},function()
{
if( $(this).find('.field_editable.invisible').is('span, div') )
{
$(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
$(this).find('.ajax-profil_edit').remove();
}
});
}
});
});
//]]>
</script>
<script type="text/javascript">
$(function(){
$('.boxprofil').find('.infos-posteur').each(function(){
var id=$(this).find('div:first').attr('id');
$(this).addClass(id);
});});
</script>
<script type="text/javascript">$(function(){
$('span.label').each(function(){
$(this).html($(this).html().replace(":", ''));
});
});</script>
J'ai bien essayé de rajouter une class à chacune des deux variables mais rien y fait, cela ne change rien :/
Merci à celui/celle qui saura quoi faire
Re: Mise en forme des labels et champs de la fiche personnage séparément
Hello Under the Moon,
pour la partie RPG:
Tu renseignes ceci:
Les divs doivent se trouver à l'intérieure des commentaires afin de prendre en compte toutes les fiches:
Concernant la div receveuse:
Je lui ai ajouté une class:
Puis le script(ajouté dans ton template):
qui va rechercher toutes les class présentes et va les modifier en:
Pour la première:
Tu auras alors l'id plus la class (pour la première):
ton template modifié:
a++
pour la partie RPG:
Tu renseignes ceci:
- Code:
<div id="ktactPFIL"><div class="titreprofil">Blablabla</div><br/>
<!-- BEGIN switch_rpg --> <!-- BEGIN rpg_fields -->
{switch_rpg.rpg_fields.F_NAME}<br/> <span class="contenuerp">{switch_rpg.rpg_fields.F_VALUE_NEW}</span><br/><br/>
<!-- END rpg_fields --> <!-- END switch_rpg -->
</div>
Les divs doivent se trouver à l'intérieure des commentaires afin de prendre en compte toutes les fiches:
- Code:
<!-- BEGIN switch_rpg --> <!-- BEGIN rpg_fields -->
<div id="ktactPFIL"><div class="titreprofil">Blablabla</div><br/>
{switch_rpg.rpg_fields.F_NAME}<br/> <span class="contenuerp">{switch_rpg.rpg_fields.F_VALUE_NEW}</span><br/><br/>
</div>
<!-- END rpg_fields --> <!-- END switch_rpg -->
Concernant la div receveuse:
- Code:
<div id="ktactPFIL">
Je lui ai ajouté une class:
- Code:
<div id="ktactPFIL" class="M14_rpg">
Puis le script(ajouté dans ton template):
- Code:
<script>$(function(){$( ".M14_rpg ").attr( "class", function(div) {
return "Number_" +div;})});</script>
qui va rechercher toutes les class présentes et va les modifier en:
Pour la première:
- Code:
Number_0
- Code:
Number_1
Tu auras alors l'id plus la class (pour la première):
- Code:
#ktactPFIL.Number_0{TA CSS}
ton template modifié:
- Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<div class="PFIL"><div class="namePFIL colorPFIL">{USERNAME}</div>
<script type="text/javascript">//<![CDATA[
$( document ).ready(function() {$('.colorPFIL').each(function(){var color = $(this).children().css("color");
$(this).closest('.namePFIL').css("background-color", color);});});//]]></script>
<div class="firstbox">
<div class="avPFIL">
<div id="adminPFIL">
<!-- BEGIN switch_auth_user -->
<div><span>{L_ADMINISTRATE_USER} :</span><br/>{ADMINISTRATE_USER}{BAN_USER}</div>
<!-- END switch_auth_user --><div>
<!-- BEGIN switch_dhow_mp -->
<span>{L_PRIVATE_MSG} :</span> {PRIVATE_MSG}
<!-- END switch_dhow_mp --></div></div><span id="avatar_membre">{AVATAR_IMG}</span></div>
<div class="lstPFIL"><span>{L_LAST_VISITED} :</span><br/> {LAST_VISIT_TIME}</div>
<div class="infos-supp"></div>
</div>
<div class="boxPFIL">
<div class="firstline"><a rel="nofollow" href="/sta/{PUSERNAME}"><div class="sbjPFIL">{L_TOPICS}</div></a>
<a rel="nofollow" href="/spa/{PUSERNAME}"><div class="sbjPFIL">{L_POSTS}</div></a>
<a rel="nofollow" href="/privmsg?mode=post&u={CUR_USER_ID}"><div class="sbjPFIL">Envoyer un MP</div></a></div>
<div class="boxprofil"><div class="abtPFIL"><div class="titreprofil">Blablabla</div>
<!-- BEGIN profile_field --><div class="infos-posteur"><div id="field_id{profile_field.ID}"><div>
<span class="gen">{profile_field.LABEL}</span> <br/>{profile_field.CONTENT}</div></div></div>
<!-- END profile_field --></div>
<!-- BEGIN switch_rpg --> <!-- BEGIN rpg_fields -->
<div id="ktactPFIL" class="M14_rpg"><div class="titreprofil">Blablabla</div><br/>
{switch_rpg.rpg_fields.F_NAME}
<br/> <span class="contenuerp">{switch_rpg.rpg_fields.F_VALUE_NEW}</span><br/><br/>
</div>
<!-- END rpg_fields --> <!-- END switch_rpg -->
<script>$(function(){$( ".M14_rpg ").attr( "class", function(div) {
return "Number_" +div;})});</script>
<div class="contactprofil"> <div class="titreprofil">Blablabla</div>
<!-- BEGIN contact_field -->
<div class="ktactPFIL">{contact_field.CONTENT}</div><!-- END contact_field -->
</div>
</div> </div>
<!-- BEGIN switch_rpg -->
<div class="boxRPG"><div style="text-align:center">{RPG_IMAGE}</div><br/>
{U_ADMIN_RPG}
</div>
<!-- END switch_rpg -->
<!-- BEGIN switch_admin_user_comment_active --><span class="gen">{L_COMMENTS} :</span><br />
<span class="gensmall">{L_MODS_AND_ADMINS}</span> {ADMIN_USER_COMMENT}<!-- END switch_admin_user_comment_active -->
</div>
</table>
<br />
<script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
$('[id^=field_id]').each(function(){
if ( $(this).find('.field_editable').is('span, div') )
{
$(this).hover(function()
{
if( $(this).find('.field_editable.invisible').is('span, div') )
{
$(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="{AJAX_EDIT_IMG}" /></div>');
$(this).find('.ajax-profil_edit').attr({
alt: "{L_FIELD_EDIT_VALUE}",
title: "{L_FIELD_EDIT_VALUE}"
}).click(function(){
$(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="{AJAX_VALID_IMG}" class="ajax-profil_valid" />').find('input,select');
$(this).prev().find('.ajax-profil_valid').attr({
alt: "{L_VALIDATE}",
title: "{L_VALIDATE}"
}).click(function(){
var content = new Array();
$(this).parent().find('[name]').each(function(){
var type_special = $(this).is('input[type=radio],input[type=checkbox]');
if ( (type_special && $(this).is(':checked')) || !type_special )
{
content.push(new Array($(this).attr('name'), $(this).attr('value')));
}
});
var id_name = $(this).parents('[id^=field_id]').attr('id');
var id = id_name.substring(8, id_name.length);
$.post(
"{U_AJAX_PROFILE}",
{id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
function(data){
$.each(data, function(i, item){
$('[id=field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
});
},
"json"
);
});
$(this).remove();
});
}
},function()
{
if( $(this).find('.field_editable.invisible').is('span, div') )
{
$(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
$(this).find('.ajax-profil_edit').remove();
}
});
}
});
});
//]]>
</script>
<script type="text/javascript">
$(function(){
$('.boxprofil').find('.infos-posteur').each(function(){
var id=$(this).find('div:first').attr('id');
$(this).addClass(id);
});});
</script>
<script type="text/javascript">$(function(){
$('span.label').each(function(){
$(this).html($(this).html().replace(":", ''));
});
});</script>
a++
Invité- Invité
Re: Mise en forme des labels et champs de la fiche personnage séparément
Hey! Merci pour ta réponse
J'ai donc fait comme décrit, mais c'est toute la colonne id ktactPFIL qui prend la class Number_0
Tous les span titre de la fiche de personnage (donc "Description du personnage" ou "motif de notoriété" et les autres) sont toujours aussi intouchables :/
J'ai modifié mon template, je le remet donc là ^^
J'ai donc fait comme décrit, mais c'est toute la colonne id ktactPFIL qui prend la class Number_0
Tous les span titre de la fiche de personnage (donc "Description du personnage" ou "motif de notoriété" et les autres) sont toujours aussi intouchables :/
J'ai modifié mon template, je le remet donc là ^^
- Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<div class="PFIL"><div class="namePFIL colorPFIL">{USERNAME}</div>
<script type="text/javascript">//<![CDATA[
$( document ).ready(function() {$('.colorPFIL').each(function(){var color = $(this).children().css("color");
$(this).closest('.namePFIL').css("background-color", color);});});//]]></script>
<div class="firstbox">
<div class="avPFIL">
<div id="adminPFIL">
<!-- BEGIN switch_auth_user -->
<div><span>{L_ADMINISTRATE_USER} :</span><br/>{ADMINISTRATE_USER}{BAN_USER}</div>
<!-- END switch_auth_user --><div>
<!-- BEGIN switch_dhow_mp -->
<span>{L_PRIVATE_MSG} :</span> {PRIVATE_MSG}
<!-- END switch_dhow_mp --></div></div><span id="avatar_membre">{AVATAR_IMG}</span></div>
<div class="lstPFIL"><span>{L_LAST_VISITED} :</span><br/> {LAST_VISIT_TIME}</div>
<div class="infos-supp"></div>
</div>
<div class="boxPFIL">
<div class="firstline"><a rel="nofollow" href="/sta/{PUSERNAME}"><div class="sbjPFIL">{L_TOPICS}</div></a>
<a rel="nofollow" href="/spa/{PUSERNAME}"><div class="sbjPFIL">{L_POSTS}</div></a>
<a rel="nofollow" href="/privmsg?mode=post&u={CUR_USER_ID}"><div class="sbjPFIL">Envoyer un MP</div></a></div>
<div class="boxprofil"><div class="abtPFIL"><div class="titreprofil">Blablabla</div>
<!-- BEGIN profile_field --><div class="infos-posteur"><div id="field_id{profile_field.ID}"><div>
<span class="gen">{profile_field.LABEL}</span> <br/>{profile_field.CONTENT}</div></div></div>
<!-- END profile_field --></div>
<div id="ktactPFIL" class="M14_rpg"><div class="titreprofil">Blablabla</div><br/>
<!-- BEGIN switch_rpg --> <!-- BEGIN rpg_fields -->
{switch_rpg.rpg_fields.F_NAME}<br/> <span class="contenuerp">{switch_rpg.rpg_fields.F_VALUE_NEW}</span><br/><br/>
<!-- END rpg_fields --> <!-- END switch_rpg -->
</div>
<div class="contactprofil"> <div class="titreprofil">Blablabla</div>
<!-- BEGIN contact_field -->
<div class="ktactPFIL">{contact_field.CONTENT}</div><!-- END contact_field -->
</div>
</div> </div>
<!-- BEGIN switch_rpg -->
<div class="boxRPG"><div style="text-align:center">{RPG_IMAGE}</div><br/>
{U_ADMIN_RPG}
</div>
<!-- END switch_rpg -->
<!-- BEGIN switch_admin_user_comment_active --><span class="gen">{L_COMMENTS} :</span><br /><span class="gensmall">{L_MODS_AND_ADMINS}</span> {ADMIN_USER_COMMENT}<!-- END switch_admin_user_comment_active -->
</div>
</table>
<br />
<script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
$('[id^=field_id]').each(function(){
if ( $(this).find('.field_editable').is('span, div') )
{
$(this).hover(function()
{
if( $(this).find('.field_editable.invisible').is('span, div') )
{
$(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="{AJAX_EDIT_IMG}" /></div>');
$(this).find('.ajax-profil_edit').attr({
alt: "{L_FIELD_EDIT_VALUE}",
title: "{L_FIELD_EDIT_VALUE}"
}).click(function(){
$(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="{AJAX_VALID_IMG}" class="ajax-profil_valid" />').find('input,select');
$(this).prev().find('.ajax-profil_valid').attr({
alt: "{L_VALIDATE}",
title: "{L_VALIDATE}"
}).click(function(){
var content = new Array();
$(this).parent().find('[name]').each(function(){
var type_special = $(this).is('input[type=radio],input[type=checkbox]');
if ( (type_special && $(this).is(':checked')) || !type_special )
{
content.push(new Array($(this).attr('name'), $(this).attr('value')));
}
});
var id_name = $(this).parents('[id^=field_id]').attr('id');
var id = id_name.substring(8, id_name.length);
$.post(
"{U_AJAX_PROFILE}",
{id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
function(data){
$.each(data, function(i, item){
$('[id=field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
});
},
"json"
);
});
$(this).remove();
});
}
},function()
{
if( $(this).find('.field_editable.invisible').is('span, div') )
{
$(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
$(this).find('.ajax-profil_edit').remove();
}
});
}
});
});
//]]>
</script>
<script type="text/javascript">
$(function(){
$('.boxprofil').find('.infos-posteur').each(function(){
var id=$(this).find('div:first').attr('id');
$(this).addClass(id);
});});
</script>
<script type="text/javascript">$(function(){
$('span.label').each(function(){
$(this).html($(this).html().replace(":", ''));
});
});</script>
<script>$(function(){$( ".M14_rpg ").attr( "class", function(div) {
return "Number_" +div;})});</script>
Re: Mise en forme des labels et champs de la fiche personnage séparément
Hello Under the Moon,
alors on va changer le script et la position de la div contenant chaque feuille de personnage:
Ton template modifié:
Tu devrais avoir ce genre de class:
Pour la première feuille de personnage:
a++
alors on va changer le script et la position de la div contenant chaque feuille de personnage:
- Code:
<div class="M14_rpg"> {switch_rpg.rpg_fields.F_NAME}
Ton template modifié:
- Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<div class="PFIL"><div class="namePFIL colorPFIL">{USERNAME}</div>
<script type="text/javascript">//<![CDATA[
$( document ).ready(function() {$('.colorPFIL').each(function(){var color = $(this).children().css("color");
$(this).closest('.namePFIL').css("background-color", color);});});//]]></script>
<div class="firstbox">
<div class="avPFIL">
<div id="adminPFIL">
<!-- BEGIN switch_auth_user -->
<div><span>{L_ADMINISTRATE_USER} :</span><br/>{ADMINISTRATE_USER}{BAN_USER}</div>
<!-- END switch_auth_user --><div>
<!-- BEGIN switch_dhow_mp -->
<span>{L_PRIVATE_MSG} :</span> {PRIVATE_MSG}
<!-- END switch_dhow_mp --></div></div><span id="avatar_membre">{AVATAR_IMG}</span></div>
<div class="lstPFIL"><span>{L_LAST_VISITED} :</span><br/> {LAST_VISIT_TIME}</div>
<div class="infos-supp"></div>
</div>
<div class="boxPFIL">
<div class="firstline"><a rel="nofollow" href="/sta/{PUSERNAME}"><div class="sbjPFIL">{L_TOPICS}</div></a>
<a rel="nofollow" href="/spa/{PUSERNAME}"><div class="sbjPFIL">{L_POSTS}</div></a>
<a rel="nofollow" href="/privmsg?mode=post&u={CUR_USER_ID}"><div class="sbjPFIL">Envoyer un MP</div></a></div>
<div class="boxprofil"><div class="abtPFIL"><div class="titreprofil">Blablabla</div>
<!-- BEGIN profile_field --><div class="infos-posteur"><div id="field_id{profile_field.ID}"><div>
<span class="gen">{profile_field.LABEL}</span> <br/>{profile_field.CONTENT}</div></div></div>
<!-- END profile_field --></div>
<div id="ktactPFIL"><div class="titreprofil">Blablabla</div><br/>
<!-- BEGIN switch_rpg --> <!-- BEGIN rpg_fields -->
<div class="M14_rpg"> {switch_rpg.rpg_fields.F_NAME}<br/> <span class="contenuerp">{switch_rpg.rpg_fields.F_VALUE_NEW}</span><br/><br/></div>
<!-- END rpg_fields --> <!-- END switch_rpg -->
</div>
<div class="contactprofil"> <div class="titreprofil">Blablabla</div>
<!-- BEGIN contact_field -->
<div class="ktactPFIL">{contact_field.CONTENT}</div><!-- END contact_field -->
</div>
</div> </div>
<!-- BEGIN switch_rpg -->
<div class="boxRPG"><div style="text-align:center">{RPG_IMAGE}</div><br/>
{U_ADMIN_RPG}
</div>
<!-- END switch_rpg -->
<!-- BEGIN switch_admin_user_comment_active --><span class="gen">{L_COMMENTS} :</span><br /><span class="gensmall">{L_MODS_AND_ADMINS}</span> {ADMIN_USER_COMMENT}<!-- END switch_admin_user_comment_active -->
</div>
</table>
<br />
<script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
$('[id^=field_id]').each(function(){
if ( $(this).find('.field_editable').is('span, div') )
{
$(this).hover(function()
{
if( $(this).find('.field_editable.invisible').is('span, div') )
{
$(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="{AJAX_EDIT_IMG}" /></div>');
$(this).find('.ajax-profil_edit').attr({
alt: "{L_FIELD_EDIT_VALUE}",
title: "{L_FIELD_EDIT_VALUE}"
}).click(function(){
$(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="{AJAX_VALID_IMG}" class="ajax-profil_valid" />').find('input,select');
$(this).prev().find('.ajax-profil_valid').attr({
alt: "{L_VALIDATE}",
title: "{L_VALIDATE}"
}).click(function(){
var content = new Array();
$(this).parent().find('[name]').each(function(){
var type_special = $(this).is('input[type=radio],input[type=checkbox]');
if ( (type_special && $(this).is(':checked')) || !type_special )
{
content.push(new Array($(this).attr('name'), $(this).attr('value')));
}
});
var id_name = $(this).parents('[id^=field_id]').attr('id');
var id = id_name.substring(8, id_name.length);
$.post(
"{U_AJAX_PROFILE}",
{id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
function(data){
$.each(data, function(i, item){
$('[id=field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
});
},
"json"
);
});
$(this).remove();
});
}
},function()
{
if( $(this).find('.field_editable.invisible').is('span, div') )
{
$(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
$(this).find('.ajax-profil_edit').remove();
}
});
}
});
});
//]]>
</script>
<script type="text/javascript">
$(function(){
$('.boxprofil').find('.infos-posteur').each(function(){
var id=$(this).find('div:first').attr('id');
$(this).addClass(id);
});});
</script>
<script type="text/javascript">$(function(){
$('span.label').each(function(){
$(this).html($(this).html().replace(":", ''));
});
});</script>
<script>$(function() {
for (var field = $('.M14_rpg'), i = 0, j = field.length; i < j; i++) {
field[i].className += ' field_' + $('.gen', field[i]).text().toLowerCase().replace(/ : /, '').replace(/[^a-z0-9]/g, function(s) {
var c = s.charCodeAt(0);
if (c == 32) return '-';
return '__' + ('000' + c.toString(16)).slice(-4);
});
}
});
</script>
Tu devrais avoir ce genre de class:
Pour la première feuille de personnage:
- Code:
M14_rpg field_titre-1
- Code:
M14_rpg field_titre-2
a++
Invité- Invité
Re: Mise en forme des labels et champs de la fiche personnage séparément
C'est exactement ce qu'il me fallait Encore une fois merci !
Sujets similaires
» Styles des champs - agrandir les champs de la fiche personnage
» FORMULAIRE: Mise en forme des champs remplis
» Récupérer les champs des profils pour mise en forme
» ModernBB | Modifier la mise en forme des champs d'un profil
» Transformation des labels (champs de profil)
» FORMULAIRE: Mise en forme des champs remplis
» Récupérer les champs des profils pour mise en forme
» ModernBB | Modifier la mise en forme des champs d'un profil
» Transformation des labels (champs de profil)
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Gérer l'apparence de son forum :: Archives des problèmes avec l'apparence du forum
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum