Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
328 changed files
with
26,935 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
@hide | ||
@page canui CanUI | ||
@parent index 4 | ||
|
||
CanUI is a __BETA__ UI library for | ||
CanJS and jQuery. It's designed to be lightweight, | ||
with limited options, but flexible enough | ||
to be extended and mixed for richness. | ||
|
||
Here's what's inside: | ||
|
||
- [jQuery.fn.can\_ui\_layout\_wrap Wrap] - Wrap elements | ||
- [jQuery.fn.can\_ui\_layout\_fill Fill] - makes complex layouts easy. | ||
- [can.ui.nav.Accordion Accordion] - an accordion widget. | ||
- [can.ui.layout.Sortable Sortable] - sort elements. | ||
- [can.ui.nav.Slider Slider] - a slider | ||
- [can.ui.layout.Bgiframe Bgiframe] - adds a background iframe to stop IE's input element 'bleed' problem. | ||
- [can.ui.layout.Positionable Positionable] - Allows you to position an element relative to another element. | ||
- [can.ui.layout.Split Split] - a splitter widget | ||
- [can.ui.layout.Block Block] - makes an element fill up another element or window. | ||
- [can.ui.layout.Resize Resize] - allows resizing of widgets | ||
- [can.ui.layout.TableScroll TableScroll] - makes a tbody scroll. | ||
- [can.ui.layout.Modal Modal] - creates a modal | ||
- [can.ui.nav.Selectable Selectable] - keyboard and mouse navigation. | ||
|
||
## Demo | ||
|
||
The following shows almost all of the above controls in action: | ||
|
||
@demo canui/demo.html | ||
|
||
## Installing | ||
|
||
If you are using github, you can simply add `mxui` as a submodule | ||
the same way you added `steal`, `jquerymx`, etc. Simply | ||
fork and clone | ||
[https://github.com/jupiterjs/mxui https://github.com/jupiterjs/mxui]. | ||
|
||
You can also install Mxui from the command line. Run: | ||
|
||
./js steal/getjs mxui | ||
|
||
If you only want part of MXUI, you can install that like: | ||
|
||
./js steal/getjs mxui/layout/fill | ||
|
||
|
||
|
||
## In Progress | ||
|
||
We also have the following widgets which we are working on: | ||
|
||
- Grid - a basic grid | ||
- Tree - a basic tree | ||
- Combobox - a rich combobox | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
var path = require("path"), | ||
spawn = require("child_process").spawn, | ||
rootPath = path.join(__dirname, "../../"), | ||
exec = function (cmd, args, callback, options) { | ||
console.log(cmd + ' ' + args.join(' ')); | ||
var spawned = spawn(cmd, args, options || {}); | ||
|
||
spawned.stdout.pipe(process.stdout, { end : false }); | ||
spawned.stderr.pipe(process.stderr, { end : false }); | ||
|
||
spawned.on('exit', function () { | ||
callback(); | ||
}); | ||
}, | ||
// Additional files to deploy to a release directory | ||
deployFiles = { | ||
'split/split.css' : 'split.css', | ||
'resizable/resizable.css' : 'resizable.css' | ||
}; | ||
|
||
desc('Runs make.js to build the application'); | ||
task('build', function (params) { | ||
var executable = process.platform == 'win32' ? 'js.bat' : './js'; | ||
console.log('Building...'); | ||
exec(executable, ['canui/build/make.js'], function () { | ||
complete(); | ||
}, { cwd : rootPath }); | ||
}, { async : true }); | ||
|
||
namespace('deploy', function () { | ||
desc('Checkout gh-pages branch and update latest release'); | ||
task('latest', [ 'build' ], function () { | ||
console.log('Cloning CanUI repository'); | ||
exec('git', ['clone', 'git@github.com:jupiterjs/canui.git'], function () { | ||
exec('git', ['checkout', 'gh-pages'], function() { | ||
jake.cpR(path.join(rootPath + 'canui/dist/canui.js'), './canui/release/latest/canui.js'); | ||
exec('git', ['commit', '-a', '-m', '"Updating release"'], function() { | ||
exec('git', ['push', 'origin', 'gh-pages'], function () { | ||
exec('rm', [ '-rf', './canui' ], function() {}); | ||
}, { cwd : './canui' }); | ||
}, { cwd : './canui' }); | ||
complete(); | ||
}, { cwd : './canui' }); | ||
}); | ||
}, { async : true }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
load("steal/rhino/rhino.js"); | ||
steal('steal/build/pluginify', function() { | ||
|
||
var out = "canui/dist/", | ||
excludes = [ 'steal/dev', | ||
'can/', | ||
'jquery/', | ||
'jquery', | ||
'steal/less' ]; | ||
|
||
steal.File(out).mkdirs(); | ||
|
||
// Create full library | ||
steal.build.pluginify('canui/canui.js', { | ||
out: out + "canui.js", | ||
skipCallbacks: true, | ||
exclude : excludes, | ||
shim : { 'jquery' : 'jQuery', 'can/util' : 'can' } | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
steal( | ||
'canui/table_scroll', | ||
'canui/fills', | ||
'canui/selectable', | ||
'canui/split', | ||
'canui/list', | ||
'canui/grid', | ||
'canui/positionable', | ||
'canui/resizable' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | ||
"http://www.w3.org/TR/html4/strict.dtd"> | ||
<html lang="en"> | ||
<head> | ||
<title>fill</title> | ||
<style type='text/css'> | ||
body{ | ||
font-family: Helvetica,"Lucida Grande","Lucida Sans",Arial,Helvetica,sans-serif; | ||
} | ||
|
||
div { | ||
overflow: hidden; | ||
} | ||
|
||
#container { | ||
width: 480px; | ||
height: 250px; | ||
background-color: #EFEFEF; | ||
} | ||
|
||
#top { | ||
background-color: yellow; | ||
margin-bottom: 10px; | ||
padding: 10px; | ||
} | ||
|
||
#bottom { | ||
background-color: #66CCFF; | ||
margin-top: 10px; | ||
padding: 10px; | ||
} | ||
|
||
#fill { | ||
background-color: green; | ||
padding: 10px; | ||
margin: 10px; | ||
} | ||
|
||
#resizer { | ||
background-color: blue; | ||
cursor: pointer; | ||
position: absolute; | ||
left: 450px; | ||
padding: 5px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="demo-html"> | ||
<h1>Fills</h1> | ||
|
||
<div id="container"> | ||
<div id="top">Longer text that might be wraped but everything still looks right.</div> | ||
<div id="fill">#fill</div> | ||
<div id="bottom">A bottom sibling.</div> | ||
</div> | ||
<div id="resizer"></div> | ||
|
||
</div> | ||
|
||
|
||
<script type='text/javascript' | ||
src='../../steal/steal.js'> | ||
</script> | ||
<script type='text/javascript' id="demo-source"> | ||
steal('canui/fills', 'jquery/event/drag').then(function () { | ||
var offset = $('#container').offset(); | ||
$('#resizer').css('top', offset.top + $('#container').height()) | ||
.css('left', offset.left + $('#container').width()) | ||
.on('dragmove', function(ev, drag) { | ||
$('#container') | ||
.width(drag.location.x()) | ||
.height(drag.location.y() - offset.top) | ||
.trigger('resize'); | ||
}); | ||
|
||
$('#fill').fills('#container'); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.