replace prototype.js with jquery, i think everything is working...
1
.gitignore
vendored
|
@ -9,3 +9,4 @@ README
|
||||||
*.phpproj
|
*.phpproj
|
||||||
*.sln
|
*.sln
|
||||||
*.v11.suo
|
*.v11.suo
|
||||||
|
*.suo
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Ajax {
|
||||||
$source_txt = $source;
|
$source_txt = $source;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$source_txt = "'$source'";
|
$source_txt = "'#$source'";
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's a post then we need to stop events
|
// If it's a post then we need to stop events
|
||||||
|
@ -64,7 +64,7 @@ class Ajax {
|
||||||
}
|
}
|
||||||
|
|
||||||
$observe = "<script type=\"text/javascript\">";
|
$observe = "<script type=\"text/javascript\">";
|
||||||
$observe .= "Event.observe($source_txt,'$method',function(e){" . $action . ";});";
|
$observe .= "$($source_txt).$method(function(e){" . $action . ";});";
|
||||||
$observe .= "</script>";
|
$observe .= "</script>";
|
||||||
|
|
||||||
return $observe;
|
return $observe;
|
||||||
|
|
|
@ -16,40 +16,23 @@
|
||||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
// Some cutesy flashing thing while we run
|
// Some cutesy flashing thing while we run
|
||||||
Ajax.Responders.register({
|
$(document).ajaxSend(function () {
|
||||||
onCreate: function(){
|
$('#ajax-loading').show();
|
||||||
$('ajax-loading').style.display = 'block';
|
});
|
||||||
},
|
$(document).ajaxComplete(function () {
|
||||||
onComplete: function() {
|
$('#ajax-loading').hide();
|
||||||
$('ajax-loading').style.display = 'none';
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// ajaxPost
|
// ajaxPost
|
||||||
// Post the contents of a form.
|
// Post the contents of a form.
|
||||||
function ajaxPost(url, input, source) {
|
function ajaxPost(url, input, source) {
|
||||||
if ($(source)) {
|
$.ajax(url, { success: processContents, type: 'post', data: input });
|
||||||
Event.stopObserving(source, 'click', function() { ajaxPost(url, input, source); });
|
|
||||||
}
|
|
||||||
|
|
||||||
new Ajax.Request(url, {
|
|
||||||
method: 'post',
|
|
||||||
parameters: $(input).serialize(true),
|
|
||||||
onSuccess: processContents
|
|
||||||
});
|
|
||||||
} // ajaxPost
|
} // ajaxPost
|
||||||
|
|
||||||
// ajaxPut
|
// ajaxPut
|
||||||
// Get response from the specified URL.
|
// Get response from the specified URL.
|
||||||
function ajaxPut(url, source) {
|
function ajaxPut(url, source) {
|
||||||
if ($(source)) {
|
$.ajax(url, { success: processContents, type: 'post', dataType: 'xml' });
|
||||||
Event.stopObserving(source, 'click', function(){ ajaxPut(url, source); });
|
|
||||||
}
|
|
||||||
|
|
||||||
new Ajax.Request(url, {
|
|
||||||
method: 'put',
|
|
||||||
onSuccess: processContents
|
|
||||||
});
|
|
||||||
} // ajaxPut
|
} // ajaxPut
|
||||||
|
|
||||||
// ajaxState
|
// ajaxState
|
||||||
|
@ -65,16 +48,8 @@ function ajaxState(url, input) {
|
||||||
|
|
||||||
// processContents
|
// processContents
|
||||||
// Iterate over a response and do any updates we received.
|
// Iterate over a response and do any updates we received.
|
||||||
function processContents(transport) {
|
function processContents(data, status) {
|
||||||
$A(transport.responseXML.getElementsByTagName('content')).each(updateElement);
|
$(data).find("content").each(function () {
|
||||||
|
$('#' + $(this).attr('div')).html($(this).text())
|
||||||
|
})
|
||||||
} // processContents
|
} // processContents
|
||||||
|
|
||||||
// updateElement
|
|
||||||
// This isn't an anonymous function because I'm ornery. Does the actual
|
|
||||||
// updates for processContents.
|
|
||||||
function updateElement(contentXML) {
|
|
||||||
var newID = contentXML.getAttribute('div');
|
|
||||||
if($(newID)) {
|
|
||||||
$(newID).update(contentXML.firstChild.nodeValue);
|
|
||||||
}
|
|
||||||
} // updateElement
|
|
||||||
|
|
|
@ -32,18 +32,17 @@ function flipField(field) {
|
||||||
// updateText
|
// updateText
|
||||||
// Changes the specified elements innards. Used for the catalog mojo fluff.
|
// Changes the specified elements innards. Used for the catalog mojo fluff.
|
||||||
function updateText(field, value) {
|
function updateText(field, value) {
|
||||||
$(field).innerHTML = value;
|
$('#'+field).html(value);
|
||||||
} // updateText
|
} // updateText
|
||||||
|
|
||||||
// toggleVisible
|
// toggleVisible
|
||||||
// Toggles display type between block and none. Used for ajax loading div.
|
// Toggles display type between block and none. Used for ajax loading div.
|
||||||
function toggleVisible(element) {
|
function toggleVisible(element) {
|
||||||
|
var target = $('#' + element);
|
||||||
if ($(element).style.display == 'block') {
|
if (target.is(':visible')) {
|
||||||
$(element).style.display = 'none';
|
target.hide();
|
||||||
}
|
} else {
|
||||||
else {
|
target.show();
|
||||||
$(element).style.display = 'block';
|
|
||||||
}
|
}
|
||||||
} // toggleVisible
|
} // toggleVisible
|
||||||
|
|
||||||
|
@ -95,9 +94,9 @@ function popupWindow(url) {
|
||||||
|
|
||||||
// This is kind of ugly. Let's not mess with it too much.
|
// This is kind of ugly. Let's not mess with it too much.
|
||||||
function check_inline_song_edit(type, song) {
|
function check_inline_song_edit(type, song) {
|
||||||
var target = type + '_select_' + song;
|
var target = '#' + type + '_select_' + song;
|
||||||
if ($(target).options[$(target).selectedIndex].value == -1) {
|
if ($(target + ' option:selected').val() == -1) {
|
||||||
$(target).innerHTML = '<input type="textbox" name="' + type + '_name" value="New ' + type + '" />';
|
$(target).replaceWith('<input type="textbox" name="' + type + '_name" value="New ' + type + '" />');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
BIN
modules/jquery/animated-overlay.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
modules/jquery/images/animated-overlay.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
modules/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
modules/jquery/images/ui-bg_flat_75_ffffff_40x100.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
modules/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
modules/jquery/images/ui-bg_glass_65_ffffff_1x400.png
Normal file
After Width: | Height: | Size: 207 B |
BIN
modules/jquery/images/ui-bg_glass_75_dadada_1x400.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
modules/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
modules/jquery/images/ui-bg_glass_95_fef1ec_1x400.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
modules/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Normal file
After Width: | Height: | Size: 280 B |
BIN
modules/jquery/images/ui-icons_222222_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
modules/jquery/images/ui-icons_2e83ff_256x240.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
modules/jquery/images/ui-icons_454545_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
modules/jquery/images/ui-icons_888888_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
modules/jquery/images/ui-icons_cd0a0a_256x240.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
9597
modules/jquery/jquery-1.9.1.js
vendored
Normal file
5
modules/jquery/jquery-ui-1.10.3.min.css
vendored
Normal file
7
modules/jquery/jquery-ui-1.10.3.min.js
vendored
Normal file
7059
modules/prototype/prototype.js
vendored
|
@ -42,7 +42,8 @@ if (Config::get('use_rss')) { ?>
|
||||||
<?php require_once Config::get('prefix') . '/templates/stylesheets.inc.php'; ?>
|
<?php require_once Config::get('prefix') . '/templates/stylesheets.inc.php'; ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="<?php echo $web_path; ?>/modules/prototype/prototype.js" language="javascript" type="text/javascript"></script>
|
<script src="<?php echo $web_path; ?>/modules/jquery/jquery-1.9.1.js" language="javascript" type="text/javascript"></script>
|
||||||
|
<script src="<?php echo $web_path; ?>/modules/jquery/jquery-ui-1.10.3.min.js" language="javascript" type="text/javascript"></script>
|
||||||
<script src="<?php echo $web_path; ?>/lib/javascript/base.js" language="javascript" type="text/javascript"></script>
|
<script src="<?php echo $web_path; ?>/lib/javascript/base.js" language="javascript" type="text/javascript"></script>
|
||||||
<script src="<?php echo $web_path; ?>/lib/javascript/ajax.js" language="javascript" type="text/javascript"></script>
|
<script src="<?php echo $web_path; ?>/lib/javascript/ajax.js" language="javascript" type="text/javascript"></script>
|
||||||
<!-- rfc3514 implementation -->
|
<!-- rfc3514 implementation -->
|
||||||
|
|
|
@ -30,6 +30,7 @@ function refresh()
|
||||||
{
|
{
|
||||||
<?php echo Ajax::action($ajax_url, ''); ?>;
|
<?php echo Ajax::action($ajax_url, ''); ?>;
|
||||||
}
|
}
|
||||||
|
$(document).ready(function() {
|
||||||
new PeriodicalExecuter(refresh, refreshInterval);
|
window.setInterval(refresh(), refreshInterval);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|