Я использую JqueryUI, и все было в порядке, пока я не попытался оживить его и добавил эффект для отображения и закрытия диалога. Теперь диалог появляется и исчезает в одно мгновение.
Я использую CAKEPHP, если это имеет значение, и у меня все еще есть файл cake.generic.css и опция отладки, но я не понимаю, как это может иметь значение.
вот мой выходной 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>
и JavaScript для диалога:
$("#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");
}
}
});