2011-02-08 17:52:53 -08:00
|
|
|
|
(function($) {
|
|
|
|
|
$(function() {
|
2011-02-11 15:33:33 -08:00
|
|
|
|
$("<div id='debug-control'><ul><li id='debug-shape-templates'>shape templates</li><li id='debug-shape-zones'>Zones</li></ul><div id='debug-control-toggle'>»</div></div>")
|
2011-02-08 17:52:53 -08:00
|
|
|
|
.appendTo("body");
|
2011-02-11 15:33:33 -08:00
|
|
|
|
$("#debug-shape-templates").click(function () {
|
2011-02-08 17:52:53 -08:00
|
|
|
|
var _this = $(this);
|
|
|
|
|
$("html").toggleClass(_this.attr("id"));
|
|
|
|
|
$(this).toggleClass("debug-active");
|
|
|
|
|
});
|
2011-02-11 15:33:33 -08:00
|
|
|
|
$("#debug-shape-zones").click(function () {
|
|
|
|
|
var _this = $(this);
|
|
|
|
|
$("html").toggleClass(_this.attr("id"));
|
|
|
|
|
$(this).toggleClass("debug-active");
|
|
|
|
|
});
|
|
|
|
|
$("#debug-control-toggle").click(function () {
|
2011-02-08 17:52:53 -08:00
|
|
|
|
var _this = $(this), open = "debug-open";
|
|
|
|
|
if (_this.is("."+open)) {
|
|
|
|
|
_this.prev().hide("fast", function() {_this.removeClass(open).html("»");});
|
|
|
|
|
} else {
|
|
|
|
|
_this.prev().show("fast", function() {_this.addClass(open).html("«");});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
})(jQuery);
|