J'utilise JqueryUI et tout allait bien jusqu'à ce que j'essaie de l'animer et d'ajouter un effet pour montrer et fermer le dialogue. Maintenant, la boîte de dialogue apparaît et disparaît en un instant. J'utilise CAKEPHP, si c'est le cas et toujours avec cake.generic.css et l'option de débogage, mais je ne vois pas comment cela pourrait avoir de l'importance.La boîte de dialogue jquery disparaît si j'utilise l'effet
ici est ma sortie code html:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
<link type="text/css" href="/css/blitzer/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="/js/unprocessed.js"></script>
<table>
<tr>
<th><a href="/unprocessed/index/page:1/sort:id/direction:asc">ID</a></th>
<th><a href="/unprocessed/index/page:1/sort:artist/direction:asc">Artist</a></th>
<th><a href="/unprocessed/index/page:1/sort:title/direction:asc">Title</a></th>
<th><a href="/unprocessed/index/page:1/sort:path/direction:asc">Path</a></th>
<th><a href="/unprocessed/index/page:1/sort:filename/direction:asc">Filename</a></th>
<th>Actions</th>
</tr>
<tr id='row7'>
<td>7</td>
<td><div id='artistfield7'>Не в въведено</div> </td>
<td><div id='titlefield7'>Не е въведено</div> </td>
<td>e0aa1b15c9066822d2149664dd799f0b326.mp3 </td>
<td>110.Dimana&DJ Damjan - S teb shte prodylzha - remix.mp3 </td>
<td>
<div class='actionscontainer' songid='7'>
<div class="approve">Approve</div>
<div class="edit">Edit</div>
<div class="delete">Delete</div>
</div>
</td>
</tr>
<tr id='row6'>
<td>6</td>
<td><div id='artistfield6'>Не в въведено</div> </td>
<td><div id='titlefield6'>Не е въведено</div> </td>
<td>e0aa1b15c9066822d2149664dd799f0b192.mp3 </td>
<td>116.Ivana - Nedej - remix.mp3 </td>
<td>
<div class='actionscontainer' songid='6'>
<div class="approve">Approve</div>
<div class="edit">Edit</div>
<div class="delete">Delete</div>
</div>
</td>
</tr>
<tr id='row5'>
<td>5</td>
<td><div id='artistfield5'>Не в въведено</div> </td>
<td><div id='titlefield5'>Не е въведено</div> </td>
<td>e0aa1b15c9066822d2149664dd799f0b148.mp3 </td>
<td>105.Glorija - Hipnoza.mp3 </td>
<td>
<div class='actionscontainer' songid='5'>
<div class="approve">Approve</div>
<div class="edit">Edit</div>
<div class="delete">Delete</div>
</div>
</td>
</tr>
<tr id='row1'>
<td>1</td>
<td><div id='artistfield1'>Не в въведено12</div> </td>
<td><div id='titlefield1'>Не е въведено</div> </td>
<td>87f037741115ba77a8774f769b625f91716.mp3 </td>
<td>Cage The Elephant - Ain't No Rest For The Wicked.mp3 </td>
<td>
<div class='actionscontainer' songid='1'>
<div class="approve">Approve</div>
<div class="edit">Edit</div>
<div class="delete">Delete</div>
</div>
</td>
</tr>
</table>
<div class="disabled"></div><div class="disabled"></div>
1 of 1
<div id="dialog">
</div>
<div id="editform">
<input id='editid' type='hidden' value=''/>
Artist
<input type="text" id='editartist' size="255" value=""><br>
Title
<input type="text" id='edittitle' size="255" value=""><br>
</div><!-- 0.1914s --><table class="cake-sql-log" id="cakeSqlLog_12707049104bbd6b0e4bf0b5_15761383" summary="Cake SQL Log" cellspacing="0" border = "0">
<caption>(default) 3 queries took 1 ms</caption>
<thead>
<tr><th>Nr</th><th>Query</th><th>Error</th><th>Affected</th><th>Num. rows</th><th>Took (ms)</th></tr>
</thead>
<tbody>
<tr><td>1</td><td>DESCRIBE `unprocesseds`</td><td></td><td style = "text-align: right">5</td><td style = "text-align: right">5</td><td style = "text-align: right">1</td></tr>
<tr><td>2</td><td>SELECT COUNT(*) AS `count` FROM `unprocesseds` AS `Unprocessed` WHERE 1 = 1 </td><td></td><td style = "text-align: right">1</td><td style = "text-align: right">1</td><td style = "text-align: right">0</td></tr>
<tr><td>3</td><td>SELECT `Unprocessed`.`id`, `Unprocessed`.`artist`, `Unprocessed`.`title`, `Unprocessed`.`path`, `Unprocessed`.`filename` FROM `unprocesseds` AS `Unprocessed` WHERE 1 = 1 ORDER BY `Unprocessed`.`id` desc LIMIT 25</td><td></td><td style = "text-align: right">4</td><td style = "text-align: right">4</td><td style = "text-align: right">0</td></tr>
</tbody></table>
et le javascript pour la boîte de dialogue:
$("#editform").dialog({
autoOpen: false,
show:'blind',
hide:'explode',
buttons:{
"Save Edits": function(){
var edid= ($('#editid').val());
var edar=($('#editartist').val());
var edtl=($('#edittitle').val());
$.post("edit/"+edid, { artist: edar, title: edtl }, function(data){
$("#artistfield"+edid).html(edar);
$("#titlefield"+edid).html(edtl);
$("#editform").dialog('close');
}, "json");
}
}
});
Besoin de voir votre balisage javascript/html pour donner une réponse quelconque ici –
J'ai joint le code il ya quelques minutes – vasion
Brat samo shtoto slushash DJ Damian zasluvawash da ti se pomogne. LOL –