From af878fffc1d8d671a8c5b1141d7fb27cbce911b7 Mon Sep 17 00:00:00 2001 From: jakub-g Date: Wed, 7 May 2014 10:30:01 +0200 Subject: [PATCH] Make samples keyboard accessible Close#169 --- docs/_css/samples.less | 9 +++++ docs/samples/clickhandler/clickhandler.hsp | 2 +- docs/samples/component3/pagination.hsp | 6 +-- docs/samples/conditions/conditions.hsp | 34 ++++++++--------- docs/samples/cssclass/cssclass.hsp | 6 +-- docs/samples/dynpath/dynpath.hsp | 4 +- docs/samples/dyntemplates/dyntemplates.hsp | 2 +- docs/samples/let/let.hsp | 2 +- docs/samples/list1/list.hsp | 8 ++-- docs/samples/list2/list.hsp | 6 +-- docs/samples/listupdate/list.hsp | 43 +++++++++++----------- docs/samples/logs/logs.hsp | 6 +-- docs/samples/panel/panel.hsp | 6 +-- docs/samples/simplelist/simplelist.hsp | 2 +- docs/samples/tabbar/tabbar.hsp | 2 +- docs/samples/textarea/textarea.hsp | 2 +- 16 files changed, 74 insertions(+), 66 deletions(-) diff --git a/docs/_css/samples.less b/docs/_css/samples.less index d881dbe..e472dd5 100644 --- a/docs/_css/samples.less +++ b/docs/_css/samples.less @@ -153,6 +153,15 @@ label.fieldlabel { display: inline-block; } +.noTextSelection { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + /* ************************************ */ /* Clock sample */ diff --git a/docs/samples/clickhandler/clickhandler.hsp b/docs/samples/clickhandler/clickhandler.hsp index e2a9b76..88beb47 100644 --- a/docs/samples/clickhandler/clickhandler.hsp +++ b/docs/samples/clickhandler/clickhandler.hsp @@ -1,7 +1,7 @@ var msg={text:""}, count=-1; {template message(msg)} -
+
{if msg.isWarning}
WARNING: 
{/if} {msg.text}
diff --git a/docs/samples/component3/pagination.hsp b/docs/samples/component3/pagination.hsp index 4022be7..915d50d 100644 --- a/docs/samples/component3/pagination.hsp +++ b/docs/samples/component3/pagination.hsp @@ -46,15 +46,15 @@ var Pagination=klass({ {template pagination using p:Pagination} {/template} diff --git a/docs/samples/conditions/conditions.hsp b/docs/samples/conditions/conditions.hsp index b26913d..48448af 100644 --- a/docs/samples/conditions/conditions.hsp +++ b/docs/samples/conditions/conditions.hsp @@ -2,24 +2,24 @@ var klass=require("hsp/klass"); // nt is an instance of NumberTester {template test(nt)} -
- Number: {nt.number}   - {if nt.number==0} - (Number equals zero) - {else if nt.number>0} - (Number is greater than zero) - {else} - (Number is less than zero) - {/if} -
- Condition using ternary operator: Number is - - {nt.number>0? "strictly positive" : "negative or null"} - -
+
+ Number: {nt.number} + {if nt.number==0} + (Number equals zero) + {else if nt.number>0} + (Number is greater than zero) + {else} + (Number is less than zero) + {/if} +
+ Condition using ternary operator: Number is + + {nt.number>0? "strictly positive" : "negative or null"} + +
{/template} diff --git a/docs/samples/cssclass/cssclass.hsp b/docs/samples/cssclass/cssclass.hsp index 627745a..5ba17e0 100644 --- a/docs/samples/cssclass/cssclass.hsp +++ b/docs/samples/cssclass/cssclass.hsp @@ -1,9 +1,9 @@ {template message(msg)} // onselectstart: prevent double-click selection on a elements
- Change Urgency - - Set "Personal" - - Set "Professional" + Change Urgency - + Set "Personal" - + Set "Professional"
Message: {msg.text}
diff --git a/docs/samples/dynpath/dynpath.hsp b/docs/samples/dynpath/dynpath.hsp index c21efd8..8dfcff5 100644 --- a/docs/samples/dynpath/dynpath.hsp +++ b/docs/samples/dynpath/dynpath.hsp @@ -13,9 +13,9 @@
{/foreach}
- Update columns B&C + Update columns B&C  -  - Show/Hide columns C + Show/Hide columns C {/template} // create dummy data diff --git a/docs/samples/dyntemplates/dyntemplates.hsp b/docs/samples/dyntemplates/dyntemplates.hsp index 7b9817f..711f5c6 100644 --- a/docs/samples/dyntemplates/dyntemplates.hsp +++ b/docs/samples/dyntemplates/dyntemplates.hsp @@ -1,5 +1,5 @@ {template test(ctxt)} -
Change template
+
Change template
<#ctxt.view ctxt="{ctxt}"/> {/template} diff --git a/docs/samples/let/let.hsp b/docs/samples/let/let.hsp index 70f3393..a14c4aa 100644 --- a/docs/samples/let/let.hsp +++ b/docs/samples/let/let.hsp @@ -10,7 +10,7 @@ p11 is of course not visible in the 2nd element scope {/if} - Change Model + Change Model {/template} var model={ diff --git a/docs/samples/list1/list.hsp b/docs/samples/list1/list.hsp index bff54ff..b9d97ac 100644 --- a/docs/samples/list1/list.hsp +++ b/docs/samples/list1/list.hsp @@ -23,7 +23,7 @@ var ListController = klass({ {if !lc.content} Empty list {else} -