From c5642056e4fe54a03760f064b76071f1119c0812 Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 28 Aug 2014 20:05:35 -0400 Subject: [PATCH] Fixes code formatting of table examples --- server/documents/collections/table.html.eco | 174 ++++++++++++-------- server/files/javascript/header.js | 53 ++++++ 2 files changed, 161 insertions(+), 66 deletions(-) create mode 100644 server/files/javascript/header.js diff --git a/server/documents/collections/table.html.eco b/server/documents/collections/table.html.eco index c6497ac7a..2e434fba0 100755 --- a/server/documents/collections/table.html.eco +++ b/server/documents/collections/table.html.eco @@ -40,10 +40,12 @@ themes : ['Default'] - - - - + + + + + + @@ -66,11 +68,13 @@ themes : ['Default'] - + + +
NameRegistration DateE-mail addressPremium Plan
NameRegistration DateE-mail addressPremium Plan
-
- Add User -
-
+
+ Add User +
+
@@ -82,9 +86,11 @@ themes : ['Default']

A cell or row may let a user know whether a value is good or bad

- - - + + + + + @@ -117,9 +123,11 @@ themes : ['Default']

A cell or row may attention the user to an error or a negative value

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -151,9 +159,11 @@ themes : ['Default']

A cell or row may warn a user

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -185,9 +195,11 @@ themes : ['Default']

A cell or row can be active or selected by a user

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -218,9 +230,11 @@ themes : ['Default']

A cell can be disabled

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -255,9 +269,11 @@ themes : ['Default']

A table can stripe alternate rows of content with a darker color to increase contrast

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -289,9 +305,11 @@ themes : ['Default']

A table may be divided each row into separate cells

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -323,9 +341,11 @@ themes : ['Default']

A table can reduce its complexity to increase readability.

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -349,9 +369,11 @@ themes : ['Default']
NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -454,9 +476,11 @@ themes : ['Default']

By default tables take the size of their container. A collapsing takes up only as much space as its rows.

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -488,9 +512,11 @@ themes : ['Default']

A table can be given a color to distinguish it from other tables.

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -522,9 +548,11 @@ themes : ['Default']

A tables colors can be inverted

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -553,9 +581,11 @@ themes : ['Default']
NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -614,9 +644,11 @@ themes : ['Default']
NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -647,9 +679,11 @@ themes : ['Default']

A table may sometimes need to be more padded for legibility

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -668,9 +702,11 @@ themes : ['Default']
NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -691,9 +727,11 @@ themes : ['Default']

A table may sometimes need to be more compact to make more rows visible at a time

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -804,9 +842,11 @@ themes : ['Default']

A table can also be small or large

NameStatusNotes
NameStatusNotes
- - - + + + + + @@ -835,9 +875,11 @@ themes : ['Default']
NameStatusNotes
NameStatusNotes
- - - + + + + + diff --git a/server/files/javascript/header.js b/server/files/javascript/header.js new file mode 100644 index 000000000..c1c3df483 --- /dev/null +++ b/server/files/javascript/header.js @@ -0,0 +1,53 @@ +semantic.header = {}; + +// ready event +semantic.header.ready = function() { + + // selector cache + var + $increaseFont = $('.font .increase'), + $decreaseFont = $('.font .decrease'), + + // alias + handler + ; + + // event handlers + handler = { + font: { + + increase: function() { + var + $container = $(this).parent().next('.ui.segment'), + fontSize = parseInt( $container.css('font-size'), 10) + ; + $container + .css('font-size', fontSize + 1) + ; + }, + decrease: function() { + var + $container = $(this).parent().next('.ui.segment'), + fontSize = parseInt( $container.css('font-size'), 10) + ; + $container + .css('font-size', fontSize - 1) + ; + } + } + }; + + $increaseFont + .on('click', handler.font.increase) + ; + $decreaseFont + .on('click', handler.font.decrease) + ; + +}; + + +// attach ready event +$(document) + .ready(semantic.header.ready) +; \ No newline at end of file
NameStatusNotes
NameStatusNotes