1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 18:29:40 +02:00

Add unobserve equivalent in jQuery

This commit is contained in:
Afterster 2013-11-21 00:35:17 +01:00
parent 8573544594
commit 14caca09c7
4 changed files with 9 additions and 3 deletions

View file

@ -58,7 +58,7 @@ class Ajax
}
$observe = "<script type=\"text/javascript\">";
$observe .= "$($source_txt).$method(function(e){" . $action . ";});";
$observe .= "$($source_txt).on('$method', function(){" . $action . ";});";
$observe .= "</script>";
return $observe;

View file

@ -27,12 +27,18 @@ $(document).ajaxComplete(function () {
// Post the contents of a form.
function ajaxPost(url, input, source) {
//$('#' + input)
if ($(source)) {
$(source).off('click', function(){ ajaxPost(url, input, source); });
}
$.ajax(url, { success: processContents, type: 'post', data: $('#'+input).serialize() });
} // ajaxPost
// ajaxPut
// Get response from the specified URL.
function ajaxPut(url, source) {
if ($(source)) {
$(source).off('click', function(){ ajaxPut(url, source); });
}
$.ajax(url, { success: processContents, type: 'post', dataType: 'xml' });
} // ajaxPut

View file

@ -64,7 +64,7 @@ var SearchRow = {
$('searchtable').appendChild(row);
rowCount++;
$(cells[3]).click(function(e){if(rowCount > 1) { Element.remove(this.parentNode); rowCount--; }});
$(cells[3]).on('click', function(){if(rowCount > 1) { Element.remove(this.parentNode); rowCount--; }});
rowIter++;
},

View file

@ -164,7 +164,7 @@ foreach ($playlist->urls as $item) {
swfPath: "<?php echo Config::get('web_path'); ?>/modules/jplayer/",
supplied: "<?php echo join(",", $jtypes); ?>",
audioFullScreen: true,
solution: "html5, flash",
solution: "html, flash",
size: {
<?php
if ($iframed) {