Template:Test

From AgileApps Support Wiki
Revision as of 00:34, 31 March 2011 by imported>Aeric (→‎Experiment with tight table rows)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Experiment with tight table rows

Old

Data
     

Objects
Indexes
Record Locators
Reports
Database Views

Store data in a powerful "database on steroids".
Rapidly access records. Ensure uniqueness.
Help users identify records they're searching for.
Summarize data in platform objects.
For advanced reports, do queries and joins directly on the database.

New

Data
     
Objects Store data in a powerful "database on steroids".
Indexes Rapidly access records. Ensure uniqueness.
Record Locators Help users identify records they're searching for.
Reports Summarize data in platform objects.
Database Views For advanced reports, do queries and joins directly on the database.

Tight Table Rows

Looking for the magical formula to create rows with no space between them.

  • The 4 padding/margin values = top, right, bottom, left
  • Some browsers respond to margin, others to padding, so both need to be specified
  • Applied to the table, they determine where the borders appear within a larger "box".
  • To apply to individual cells, the border properties need to be specified on each cell
  • The CSS rule below does that, It applies only to <td> elements in tables that specify class="tight-rows":
  table.tight-rows td { 
      padding:0 5px 0 5px; 
      margin:0 5px 0 5px; 
  }
stuff stuff
more more

Horizontal and Vertical Bars

LJ Horizontal ruler:

ATT Ruler:


CSS-styled Ruler:


Normal Ruler:


stuff
foo
bar

  And more stuff:

Link Tests

Test a link to an embedded internal anchor: #end

Test a link that transcludes the host URL from Template:DOCHOST.

Add Line Numbers to Source Code Listings

But make it possible to copy the source code without the line numbers...

<pre>

</pre>

line 1 of code
line 2 of code
line 3 of code
{{{1}}}

This template adds line-numbers to code listings, while making it possible to copy the code without the numbers.

TODO: IN CodeJS, ESCAPE ALL <'s (replace with <)

Usage
  {{Code | {language} |
  code line 1
  code line 2
  etc.
  }}

where:

  • {language} = java, html, xml

How it works:

  1. Create an array called lines, where \n is the delimiter
  2. Create a table with 2 cells
    • Generate numbers, one per line, in first cell (output "i", then increment it)
    • Put code in second cell, where it can be copied

<a name="end"/>