')
+ .appendTo(self.$table),
$comment = $('| ')
- .addClass('OxComment')
- .html(trim(section.comment)),
+ .addClass('OxComment OxSerif')
+ .html(trim(section.comment))
+ .appendTo($section),
$code = $(' | ')
.addClass('OxCode')
.append(
Ox.SyntaxHighlighter({
+ replace: self.options.replaceCode,
source: trim(section.code)
})
)
- $section
- .append($comment)
- .append($code)
- .appendTo(self.$table);
+ .appendTo($section);
});
});
diff --git a/source/Ox.UI/js/Code/Ox.SyntaxHighlighter.js b/source/Ox.UI/js/Code/Ox.SyntaxHighlighter.js
index 3abb83d9..ceb62ca2 100644
--- a/source/Ox.UI/js/Code/Ox.SyntaxHighlighter.js
+++ b/source/Ox.UI/js/Code/Ox.SyntaxHighlighter.js
@@ -8,6 +8,9 @@ Ox.SyntaxHighlighter Syntax Highlighter
options Options
lineLength If larger than zero, show edge of page
offset First line number
+ replace <[[]]|[]> Array of replacements
+ Each array element is an array of two arguments to be passed to the
+ replace function, like [str, str], [regexp, str] or [regexp, fn]
showLinebreaks If true, show linebreaks
showLineNumbers If true, show line numbers
showWhitespace If true, show whitespace
@@ -25,6 +28,7 @@ Ox.SyntaxHighlighter = function(options, self) {
.defaults({
lineLength: 0,
offset: 1,
+ replace: [],
showLinebreaks: false,
showLineNumbers: false,
showTabs: false,
@@ -100,6 +104,11 @@ Ox.SyntaxHighlighter = function(options, self) {
)
.appendTo(that);
}
+
+ self.options.replace.forEach(function(replace) {
+ source = source.replace(replace[0], replace[1])
+ });
+
$source = Ox.Element()
.addClass('OxSourceCode')
.html(source)
@@ -125,6 +134,22 @@ Ox.SyntaxHighlighter = function(options, self) {
}
}
+ setTimeout(function() {
+ $('.foobar > span').css({
+ textDecoration: 'underline'
+ })
+ $('.foobar').css({
+ //background: 'rgb(255, 255, 128)',
+ borderRadius: '2px',
+ cursor: 'pointer'
+ }).bind({
+ click: function() {
+ window.location.hash = 'documentation/' + $(this).attr('title');
+ }
+ })
+
+ }, 1000)
+
self.setOption = function(key, value) {
renderSource();
};
diff --git a/source/Ox.UI/js/Form/Ox.Label.js b/source/Ox.UI/js/Form/Ox.Label.js
index 16a1b257..8b35313c 100644
--- a/source/Ox.UI/js/Form/Ox.Label.js
+++ b/source/Ox.UI/js/Form/Ox.Label.js
@@ -32,7 +32,7 @@ Ox.Label = function(options, self) {
)
.css(Ox.extend(self.options.width == 'auto' ? {} : {
width: self.options.width - (
- self.options.style == 'rounded' ? 14 : 6
+ self.options.style == 'rounded' ? 14 : 8
) + 'px'
}, {
textAlign: self.options.textAlign
@@ -43,7 +43,11 @@ Ox.Label = function(options, self) {
if (key == 'title') {
that.html(value);
} else if (key == 'width') {
- that.css({width: self.options.width - 14 + 'px'});
+ that.css({
+ width: self.options.width - (
+ self.options.style == 'rounded' ? 14 : 8
+ ) + 'px'
+ });
}
};
diff --git a/source/Ox.UI/themes/classic/css/classic.css b/source/Ox.UI/themes/classic/css/classic.css
index 08bb7c63..16237522 100644
--- a/source/Ox.UI/themes/classic/css/classic.css
+++ b/source/Ox.UI/themes/classic/css/classic.css
@@ -314,6 +314,9 @@ Forms
color: rgb(192, 64, 64);
}
+.OxThemeClassic .OxLabel.OxSquare {
+ background: rgb(240, 240, 240);
+}
.OxThemeClassic .OxLabel.OxDisabled {
color: rgb(128, 128, 128);
}
diff --git a/source/Ox.UI/themes/modern/css/modern.css b/source/Ox.UI/themes/modern/css/modern.css
index 98c2f1e2..3ab2bef5 100644
--- a/source/Ox.UI/themes/modern/css/modern.css
+++ b/source/Ox.UI/themes/modern/css/modern.css
@@ -256,7 +256,7 @@ Forms
color: rgb(192, 192, 192);
}
-.OxThemeModern .OxInputLabel {
+.OxThemeModern .OxInput\ {
color: rgb(192, 192, 192);
}
.OxThemeModern .OxButton,
@@ -305,6 +305,9 @@ Forms
color: rgb(255, 64, 64);
}
+.OxThemeModern .OxLabel.OxSquare {
+ background: rgb(16, 16, 16);
+}
.OxThemeModern .OxLabel.OxDisabled {
color: rgb(128, 128, 128);
}
diff --git a/source/Ox/png/OxJS16.png b/source/Ox/png/OxJS16.png
deleted file mode 100644
index da56604f..00000000
Binary files a/source/Ox/png/OxJS16.png and /dev/null differ
diff --git a/source/Ox/png/OxJS256.png b/source/Ox/png/OxJS256.png
deleted file mode 100644
index 2baeefd2..00000000
Binary files a/source/Ox/png/OxJS256.png and /dev/null differ
diff --git a/source/Ox/png/OxJS64.png b/source/Ox/png/OxJS64.png
deleted file mode 100644
index b8086b7c..00000000
Binary files a/source/Ox/png/OxJS64.png and /dev/null differ
|