From 29f7dc9a2c078495f6a0ed13c531733146528fb4 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Tue, 18 Nov 2008 02:55:25 +0000 Subject: Removed all trailing whitespace from .js and .html files --- demos/functional/js/functional.demo.js | 68 +++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'demos/functional/js/functional.demo.js') diff --git a/demos/functional/js/functional.demo.js b/demos/functional/js/functional.demo.js index 5128d12a6..434316949 100644 --- a/demos/functional/js/functional.demo.js +++ b/demos/functional/js/functional.demo.js @@ -6,38 +6,38 @@ var uid = 0; * @param {Object} model */ var uiRenderDemo = function(model) { - + var title = model.title, renderAt = $(model.renderAt); - + function nl2br( str ) { return str.replace(/([^>])\n/g, '$1
\n'); } - + var js2html = function(code) { var src = (js_beautify(code) || ""); - + //if ($.browser.msie) // src = src.replace(/([^>])\n/g, '$1
\n'); - + return src; }; - + renderAt.append( '

'+ title +'

' ); $.each(model.demos, function(i, demo) { - + /** * Rendering each demo */ if (!demo) return; - + var uiHtmlRendered = $('
'); - + if (model.onRenderStart) model.onRenderStart.apply(window); - + var gid = 'ui-gen-'+uid++, demoBox = $('
'); renderAt.append(demoBox); @@ -45,15 +45,15 @@ var uiRenderDemo = function(model) { var detailsHtml = $( '
' ); - + var descBox = $( '
'+(demo.desc||'')+'
' ); - + var optionsBox = $( '
' ); - + var codesBox = $( '
' ) @@ -62,19 +62,19 @@ var uiRenderDemo = function(model) { var sourceTmpl = $( '
' ); - + var preTmpl = $( '' ); - + var codeTmpl = $( '' ); - + var htmlCode = '', sourceHtml = sourceTmpl.clone(), sourceJs = sourceTmpl.clone(), entitiesHtml = function(html) { return html.replace(//g,">"); }; - + // Render simple HTML if (typeof demo.html == 'string') { uiHtmlRendered.html(demo.html); @@ -82,9 +82,9 @@ var uiRenderDemo = function(model) { } // Render data html by URL if (typeof demo.html == 'object' && demo.html.url) { - + uiHtmlRendered.html(""); - + $.ajax({ type: "GET", url: demo.html.url, @@ -92,26 +92,26 @@ var uiRenderDemo = function(model) { success: function(data) { uiHtmlRendered.html(data); htmlCode = data; - + // set html code view sourceHtml.html(preTmpl.clone().html( codeTmpl.clone().addClass('colored html').html(entitiesHtml(htmlCode)) )); - + $.each(demo.options, function(x, o) { // eval the first source of ').change(function() { var ecode = decodeURIComponent($(this).val()); @@ -137,7 +137,7 @@ var uiRenderDemo = function(model) { select, a, '
', codesBox.append('
JavaScript:
', sourceJs, '
HTML:
', sourceHtml) ) ); - + // population select with the demo options $.each(demo.options, function(x, o) { if (o && o.desc) { @@ -150,28 +150,28 @@ var uiRenderDemo = function(model) { } } }); - + $('#'+gid).find('.colored.javascript').chili(); $('#'+gid).find('.colored.html').chili(); - + // fire renderEnd callback to direct-html-render if (typeof demo.html != 'object' && model.onRenderEnd) model.onRenderEnd.apply(window); - + }); }; var loadDemo = function(comp) { - + $("#dialog").dialog().remove(); - + $('#containerDemo').html(""); - + $("#containerDemo").ajaxError(function(request, settings){ $(this).html("Oops, there is no template file for this component."); }); - + $.get('templates/'+comp+'.html', function(data) { $('#containerDemo').html(data); }); - + }; \ No newline at end of file -- cgit v1.2.3