# HG changeset patch # User hertzhaft # Date 1296083510 -3600 # Node ID ab8054bba8d397ceb786375635cc77075e215744 # Parent fe2bb8f926be93b21fb76cde1161f0339ad689bd console debug div for IE diff -r fe2bb8f926be -r ab8054bba8d3 client/digitallibrary/jquery/img/make_icon.cmd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/digitallibrary/jquery/img/make_icon.cmd Thu Jan 27 00:11:50 2011 +0100 @@ -0,0 +1,11 @@ +@echo off +setlocal + +rem saxon embedded.svg embedded_icons.xsl + +set ink=C:\prog_mr\inkscape-0.48.1\inkscape.exe + +%ink% embedded\svg\%1.svg --export-png=embedded\16\%1.png -w16 -h16 +%ink% embedded\svg\%1.svg --export-png=embedded\32\%1.png -w32 -h32 + +endlocal \ No newline at end of file diff -r fe2bb8f926be -r ab8054bba8d3 client/digitallibrary/jquery/jquery-test-embedded.html --- a/client/digitallibrary/jquery/jquery-test-embedded.html Wed Jan 26 23:43:39 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-embedded.html Thu Jan 27 00:11:50 2011 +0100 @@ -104,19 +104,19 @@ - +
- +
- +
diff -r fe2bb8f926be -r ab8054bba8d3 client/digitallibrary/jquery/jquery.digilib.js --- a/client/digitallibrary/jquery/jquery.digilib.js Wed Jan 26 23:43:39 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Thu Jan 27 00:11:50 2011 +0100 @@ -6,30 +6,12 @@ // fallback for console.log calls if (typeof(console) === 'undefined') { var console = { - log : function(){ - var $debug = $('#debug'); - if (!$debug) return; - var args = Array.prototype.slice.call(arguments); - var argstr = args.join(' '); - $debug.append('
' + argstr + '
'); - }, - debug : function(){ - // debug for MSIE etc - var $debug = $('#debug'); - if (!$debug) return; - var args = Array.prototype.slice.call(arguments); - var argstr = args.join(' '); - $debug.append('
' + argstr + '
'); - }, - error : function(){ - var $debug = $('#debug'); - if (!$debug) return; - var args = Array.prototype.slice.call(arguments); - var argstr = args.join(' '); - $debug.append('
' + argstr + '
'); - } - }; -} + log : function(){}, + debug : function(){}, + error : function(){} + }; + var customConsole = true; +}; (function($) { var buttons = { @@ -1214,6 +1196,25 @@ return parseInt(10000 * x, 10) / 10000; }; + // fallback for console.log calls + if (customConsole) { + var logFunction = function(type) { + return function(){ + var $debug = $('#debug'); // debug div + if (!$debug) return; + var args = Array.prototype.slice.call(arguments); + var argtext = args.join(' '); + var $logDiv = $('
'); + $logDiv.addClass(type); + $logDiv.text(argtext); + $debug.append($logDiv); + }; + }; + console.log = logFunction('_log'); + console.debug = logFunction('_debug'); + console.error = logFunction('_error'); + }; + // hook plugin into jquery $.fn.digilib = function(action) { if (actions[action]) { @@ -1230,5 +1231,5 @@ $.error( 'action ' + action + ' does not exist on jQuery.digilib' ); } }; - + })(jQuery); \ No newline at end of file