Location: PHPKode > projects > ezStats for XBOX Live > ezStats2_xbl/admin/templates/signatures.html
<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
		(function($) {
			$.extend({
				save_settings: function(elem, action) {
					// AJAX starten
					$.ajax({
						type:     "POST",
						url:      "action.php",
						dataType: "json",
						data: {
							action: action,
							sid:    "$sid",
							input:  {
								name: elem.attr("name"),
								value:  elem.val()
							}
						},
						beforeSend: function() {
							$('aside').stop(true, true).hide().text('%saving% ...').fadeIn();
						},
						error: function(data) {
							if (data && data.responseText)
								$('aside').text("").html(data.responseText).fadeIn();
						},
						success:    function(data) {
							if (data && data.message) 
								 $('aside').text(data.message);
							else $('aside').fadeOut();
							
							// Weiterleiten, falls Parameter uebergeben wurde
							if (data && data.href) document.location.href = data.href;
						}
					});
				},
				
				reset_settings: function(input) {
					$.ajax({
						type:     "POST",
						url:      "action.php",
						dataType: "json",
						data: {
							sid: "$sid",
							action: "signatures",
							input: "reset_settings"
						},
						error: function(data) {
							if (data && data.responseText) $('aside').text("").html(data.responseText).fadeIn();
						},
						success: function(data) {
							document.location.href = "index.php?signatures&sid=$sid";
						}
					});
				},
				
				update_signatures: function() {
					var node = $('#updatenotes > div');
					
					// AJAX starten
					$.ajax({
						type:     "POST",
						url:      "signatures.php",
						dataType: "json",
						data: {
							request: "admin",
						},
						beforeSend: function () {
							node.eq("0").hide();
							node.eq("1").show();
							node.eq("2").hide();
						},
						error: function(data) {
							if (data && data.responseText)
								$('aside').text("").html(data.responseText).fadeIn();
						},
						success: function(data) {
							// Ergebnis ausgeben
							if (data && data.message) {
								node.eq("1").hide();
								node.eq("2").html(data.message).fadeIn();
							}
							if (data && data.time) {
								$('#updatesignatures span').text(data.time).fadeIn();
							}
						}
					});
				}
			});
		})(jQuery);
		
		// Signaturen aktivieren
		$('[rel=settings] :input').bind("keyup change", function(e) {
			$.save_settings($(this), "settings");
		});
		
		// Signaturen aktualisieren
		$('#updatesignatures .button').click(function(e) {
			e.preventDefault();
			$.update_signatures();
		});
		
		// Signaturen modifizieren
		$('[rel=modify] :input').bind("keyup change", function(e) {
			$.save_settings($(this), "signatures");
		});
		
		// Signaturen zuruecksetzen
		$('[rel=modify] a.button').live("click", function(e) {
			e.preventDefault();
			var link = $(this);
			
			link
				.addClass("delete")
				.text(link.attr("delphrase"))
				.mouseout(function() {
					$(this)
						.removeClass("delete")
						.text(link.attr("defphrase"))
						.unbind();
				})
				.click(function() {
					$.reset_settings();
				});
			
		});
		
	});
</script>
<!-- Phrase signatures_chmod nicht vergessen!!! -->

<!-- Signaturen aktivieren -->
<section rel="settings">
	<h1>%signatures_activate%</h1>
	<form>
		<fieldset>
			<ul>
				<li>
					<label for="ov_signatures">%signatures_activate%:</label>
					<input type="radio" name="signatures" value="1" /> %activated% 
					<input type="radio" name="signatures" value="0" /> %deactivated% 
					<legend>%signatures_settings_desc%</legend>
				</li>
			</ul>
		</fieldset>
	</form>
</section>

<!-- Signaturen aktualisieren -->
<div rel="settings">
	<article id="updatesignatures">
		<h1>%signatures_update%</h1>
		<ul>
			<li>
				<a href="update_signatures" class="button">%signatures_update_now%</a>
				<legend style="margin: 0">%lastupdate%: <span>$sig_lastupdate</span></legend>
			</li>
			<li>&nbsp;</li>
			<li>
				<input class="fleft" type="text" size="3" name="sig_updatecount" id="sig_updatecount" value="$var->sig_updatecount" /> 
				<legend style="margin: 0">&nbsp;&nbsp;&nbsp;%signatures_updatecount%</legend>
			</li>
		</ul>
	</article>

	<article id="updatenotes" style="min-height: 160px;">
		<h2>&nbsp;</h2>
		<div>
			<p>%update_help_1% <a href="http://www.setcronjob.com">setcronjob.com</a>.</p>
			<p>%update_help_2% [<a href="signatures.php">%update_help_3%</a>]</p>
		</div>
		<div class="hidden">
			<div class="bigloader"></div>
			<p>&nbsp;</p><p>$message</p>
		</div>
		<div></div>
	</article>

	<div class="clear"></div>
</div>

<!-- Signaturen modifizieren -->
<div rel="modify">
	<article style="width: 300px">
		<h1>%signatures_modify%</h1>
		<p>%signatures_text1%</p>
		<p>%style_text3% (<a href="http://code.google.com/p/ezstats/issues/list">ezStats Support</a>)</a></p>
		<p>%style_text4%</p>
		<p><a class="button" defphrase="%reset%" delphrase="%reset%?" action="reset" href="#">%reset%</a></p>
	</article>

	<article style="width: 500px">
		<h2>%signatures_type% Max</h2>
		<ul rel="max"></ul>
		<div>&nbsp;</div>
		
		<h2>%signatures_type% Med</h2>
		<ul rel="med"></ul>
		<div>&nbsp;</div>
		
		<h2>%signatures_type% Min</h2>
		<ul rel="min"></ul>
		<div>&nbsp;</div>
		
		<h2>%signatures_type% X01</h2>
		<ul rel="x01"></ul>
		<div>&nbsp;</div>
	</article>

	<div class="clear"></div>
</div>
Return current item: ezStats for XBOX Live