add arrayeditable demo

This commit is contained in:
rolux 2012-01-16 14:05:41 +05:30
parent 47061543ea
commit 43cfc1f0b5
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>OxJS ArrayEditable Demo</title
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="../../dev/Ox.js"></script>
<script type="text/javascript" src="js/arrayeditable.js"></script>
</head>
<body>
</body>
</html>

View file

@ -0,0 +1,23 @@
Ox.load('UI', function() {
var items = [
{editable: true, value: 'The <b><i><u>firefox.</u></i></b> jumps over the lazy fox.'},
{editable: true, value: 'The lazy fox jumps over the <a href="http://mozilla.org">firefox</a>.'}
],
$box = Ox.Element()
.css({width: '256px', height: '512px', padding: '8px', background: 'rgb(224, 224, 224)'})
.appendTo(Ox.$body),
$arrayEditableInput = Ox.ArrayEditable({
items: items
})
.css({background: 'rgb(240, 240, 240)', boxShadow: '0 0 1px black'})
.appendTo($box),
$arrayEditableTextarea = Ox.ArrayEditable({
items: items,
maxHeight: 256,
type: 'textarea'
})
.css({marginTop: '8px', background: 'rgb(240, 240, 240)', boxShadow: '0 0 1px black'})
.appendTo($box);
});