Browse Source

fixes issue in displaying some code example without class uI

Former-commit-id: 8e054c76568dc5c52263fe137235dd471c2ef740
Former-commit-id: 1eaf30680788b1a0f67270e2510bb0795b1d0e8c
beta
Jack Lukic 12 years ago
parent
commit
805ebbaba5
  1. 5
      node/src/documents/elements/button.html
  2. 4
      node/src/documents/elements/icon.html
  3. 10
      node/src/files/javascript/semantic.js

5
node/src/documents/elements/button.html

@ -255,7 +255,7 @@ type : 'UI Element'
<div class="example">
<h4 class="ui header">Labeled Icon</h4>
<p>Groups can be formatted as labeled icons</p>
<div class="ui labeled vertical icon buttons">
<div class="ui vertical labeled icon buttons">
<div class="ui button"><i class="icon pause"></i> Pause</div>
<div class="ui button"><i class="icon play"></i> Play</div>
<div class="ui button"><i class="icon shuffle"></i> Shuffle</div>
@ -266,7 +266,7 @@ type : 'UI Element'
<div class="example">
<h4 class="ui header">Fluid</h4>
<p>Groups can be divided evenly to fit parent</p>
<div class="ui five fluid buttons">
<div class="five fluid ui buttons">
<div class="ui button">One</div>
<div class="ui button">Two</div>
<div class="ui button">Three</div>
@ -283,7 +283,6 @@ type : 'UI Element'
<div class="ui button">Two</div>
<div class="ui button">Three</div>
</div>
<div class="blue large icon ui buttons">
</div>

4
node/src/documents/elements/icon.html

@ -251,9 +251,9 @@ type : 'UI Element'
<div class="example">
<h4 class="ui header">Link</h4>
<p>An icon can be formatted as a link</p>
<i class="link close icon"></i>
<i class="close icon link"></i>
<br>
<i class="link inverted users icon"></i>
<i class="help circle icon link"></i>
</div>

10
node/src/files/javascript/semantic.js

@ -112,16 +112,16 @@ semantic.ready = function() {
var
$example = $(this).closest('.example'),
$header = $example.children('.ui.header:first-of-type, p:first-of-type'),
$demo = $example.children().not($header).not('i.code:first-child, .annotated, .ignore'),
$demo = $example.children().not($header).not('i.code:first-child, .annotated, br, .ignore'),
$annotated = $example.find('.annotated'),
$code = $annotated.find('.code'),
whiteSpace = new RegExp('\\n\\s{4}', 'g'),
code = ''
;
// if ui has wrapper use that
if($demo.filter('.ui').size() === 0) {
$demo = $example.children().eq(3).children();
}
// if($demo.filter('.ui').size() === 0) {
// $demo = $example.children().eq(3).children();
// }
// add source if doesnt exist and initialize
if($annotated.size() === 0) {
$annotated = $('<div/>')
@ -132,7 +132,7 @@ semantic.ready = function() {
if( $code.size() === 0) {
$demo
.each(function(){
if($(this).hasClass('ui')) {
if($(this).not('br')) {
code += $(this).get(0).outerHTML + "\n";
}
})

Loading…
Cancel
Save