Skip to content

Commit 349c99a

Browse files
committed
update modules version
2 parents e85538a + fd8dd3e commit 349c99a

12 files changed

+445
-1
lines changed

at/Gruntfile.js

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
module.exports = function(grunt) {
2+
var pkg = grunt.file.readJSON('package.json');
3+
4+
grunt.initConfig({
5+
pkg: pkg,
6+
7+
download: {
8+
options: {
9+
dest: 'src'
10+
},
11+
js: {
12+
options: {
13+
transform: function(code) {
14+
return [
15+
'define(function(require, exports, module) {',
16+
"require('caret');",
17+
"var jQuery = require('$');",
18+
code.replace('window.jQuery', 'jQuery'),
19+
"});"
20+
].join('\n');
21+
}
22+
},
23+
url: 'https://raw.github.com/ichord/At.js/v<%= pkg.version%>/dist/js/jquery.atwho.js',
24+
name: 'atwho.js'
25+
},
26+
css: {
27+
options: {
28+
transform: function(code) {
29+
return [
30+
code
31+
].join('\n');
32+
}
33+
},
34+
url: 'https://raw.github.com/ichord/At.js/v<%= pkg.version%>/dist/css/jquery.atwho.css',
35+
name: 'atwho.css'
36+
}
37+
}
38+
});
39+
40+
grunt.loadGlobalTasks('spm-build');
41+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
42+
43+
grunt.loadTasks('../_tasks/download/tasks');
44+
grunt.registerTask('build', ['download', 'spm-build']);
45+
46+
};

at/README.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
**An autocompletion library to autocomplete mentions, smileys etc. just like on Github or Twitter!** [![Build Status](https://travis-ci.org/ichord/At.js.png)](https://travis-ci.org/ichord/At.js)
2+
3+
#### Notice
4+
5+
At.js now **depends on** [Caret.js](https://github.com/ichord/Caret.js).
6+
7+
This branch has been updated to `v0.4.x`. Please read **CHANGELOG.md** for more details.
8+
English Documentation will keep improving. Maybe **you can do me a favor?**
9+
10+
### Demo
11+
12+
http://ichord.github.com/At.js
13+
14+
15+
### Features Preview
16+
17+
* Supports HTML5 [**contentEditable**](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_Editable) elements (NOT include IE 8)
18+
* Can listen to any character and not just '@'. Can set up multiple listeners for different characters with different behavior and data
19+
* Listener events can be bound to multiple inputors.
20+
* Format returned data using templates
21+
* Keyboard controls in addition to mouse
22+
- `Tab` or `Enter` keys select the value
23+
- `Up` and `Down` navigate between values (and `Ctrl-P` and `Ctrl-N` also)
24+
- `Right` and `left` will re-search the keyword.
25+
* Custom data handlers and template renderers using a group of configurable callbacks
26+
* Supports AMD
27+
28+
### Requirements
29+
30+
* jQuery >= 1.7.0.
31+
* [Caret.js](https://github.com/ichord/Caret.js)
32+
(You can use `Component` or `Bower` to install it.)
33+
34+
### Documentation
35+
https://github.com/ichord/At.js/wiki
36+
37+
### Integrating with your Application
38+
39+
Simply include the following files in your HTML and you are good to go.
40+
41+
```html
42+
<link href="css/jquery.atwho.css" rel="stylesheet">
43+
<script src="http://code.jquery.com/jquery.js"></script>
44+
<script src="js/jquery.caret.js"></script>
45+
<script src="js/jquery.atwho.js"></script>
46+
```
47+
48+
```javascript
49+
$('#inputor').atwho({
50+
at: "@",
51+
data:['Peter', 'Tom', 'Anne']
52+
})
53+
```
54+
55+
#### Bower & Component
56+
For installing using Bower you can use `jquery.atwho` and for Component please use `ichord/At.js`.
57+
58+
#### Rails
59+
You can include At.js in your `Rails` application using the gem [`jquery-atwho-rails`](https://github.com/ichord/jquery-atwho-rails).
60+
61+
62+
### Version History
63+
64+
* branch `stable-v0.3` with tag `v0.3.3`
65+
* branch `stable-v0.2` with tag `v0.2.x`
66+
* branch `stable-v0.1.x` and tag `v0.1.7`
67+
68+
### Core Team Members
69+
70+
* [@ichord](https://twitter.com/_ichord)
71+
72+
#### PS
73+
Let me know if you are using **At.js**. It will motivate me to work harder.
74+
And if you like **At.js**, just email me and add your website [here](https://github.com/ichord/At.js/wiki/Sites)
75+
Hope you like it, Thanks! :)
76+
77+
---
78+
79+
Project is a member of the [OSS Manifesto](http://ossmanifesto.org/).

at/package.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"family": "jquery",
3+
"name": "at",
4+
"version": "0.4.9",
5+
"package": "https://github.com/ichord/At.js/blob/master/package.json",
6+
"description": "Add Github like mentions autocomplete to your application.",
7+
"homepage": "https://github.com/ichord/At.js",
8+
"author": "Harold.luo <[email protected]>",
9+
"maintainers": [{
10+
"name": "Harold.luo",
11+
"url": "https://github.com/ichord",
12+
"email": "[email protected]"
13+
}],
14+
"repository": {
15+
"type": "git",
16+
"url": "https://github.com/ichord/at.js"
17+
},
18+
"bugs": "https://github.com/ichord/at.js/issues",
19+
"licenses": [{
20+
"type": "MIT",
21+
"url": "http://www.opensource.org/licenses/mit-license.php"
22+
}],
23+
"keywords": [],
24+
"spm": {
25+
"alias": {
26+
"$": "$",
27+
"caret": "jquery/caret/0.0.8/caret"
28+
},
29+
"output": ["atwho.js", "atwho.css"]
30+
}
31+
}

at/spec.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
define(function(require) {
2+
3+
describe('at.js', function() {
4+
5+
it('should has atwho method', function() {
6+
require('./dist/atwho');
7+
var $ = require('$');
8+
expect($.fn.atwho).to.be.a('function');
9+
});
10+
});
11+
12+
});

caret/Gruntfile.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = function(grunt) {
2+
var pkg = grunt.file.readJSON('package.json');
3+
4+
grunt.initConfig({
5+
pkg: pkg,
6+
7+
download: {
8+
options: {
9+
dest: 'src'
10+
},
11+
js: {
12+
options: {
13+
transform: function(code) {
14+
return [
15+
'define(function(require, exports, module) {',
16+
"var jQuery = require('$');",
17+
code.replace('window.jQuery', 'jQuery'),
18+
"});"
19+
].join('\n');
20+
}
21+
},
22+
url: 'https://raw.github.com/ichord/Caret.js/v<%= pkg.version%>/src/jquery.caret.js',
23+
name: 'caret.js'
24+
}
25+
}
26+
});
27+
28+
var config = require('spm-build').config;
29+
grunt.loadGlobalTasks('spm-build');
30+
grunt.util._.merge(grunt.config.data, config);
31+
32+
grunt.loadTasks('../_tasks/download/tasks');
33+
grunt.registerTask('build', ['download', 'spm-build']);
34+
};

caret/README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Caret.js
2+
========
3+
4+
Get caret postion or offset from inputor
5+
6+
This is the core function that working in [At.js](http://ichord.github.com/At.js).
7+
Now, It just become an simple jquery plugin so that everybody can use it.
8+
And, of course, **At.js** is using this plugin too.
9+
10+
* support iframe context
11+
12+
Live Demo
13+
=========
14+
15+
http://ichord.github.com/Caret.js/
16+
17+
18+
Usage
19+
=====
20+
21+
```javascript
22+
23+
// Get caret position
24+
// not working in `contentEditable` mode
25+
$('#inputor').caret('position'); // => {left: 15, top: 30, height: 20}
26+
$('#inputor').caret('iframe', iframe1).caret('position')
27+
28+
// Get caret offset
29+
$('#inputor').caret('offset'); // => {left: 300, top: 400, height: 20}
30+
31+
var fixPos = 20
32+
// Get position of the 20th char in the inputor.
33+
// not working in `contentEditable` mode
34+
$('#inputor').caret('position', fixPos);
35+
36+
// Get offset of the 20th char.
37+
// not working in `contentEditable` mode
38+
$('#inputor').caret('offset', fixPos);
39+
40+
// more
41+
42+
// Get caret position from first char in inputor.
43+
$('#inputor').caret('pos'); // => 15
44+
45+
// Set caret position in the inputor
46+
// not working in contentEditable mode
47+
$('#inputor').caret('pos', 15);
48+
49+
// set iframe context
50+
// oftenly you don't need to set iframe context because caret.js will find the iframe object automatically
51+
// but some iframe editor will prevent caret.js to finding for security reasons,
52+
// so you may have to set the iframe manually
53+
$('#inputor').caret({iframe: theIframe});
54+
$('#inputor').caret('offset');
55+
$('#inputor').caret('pos', 15);
56+
57+
```

caret/package.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"family": "jquery",
3+
"name": "caret",
4+
"version": "0.0.8",
5+
"package": "https://github.com/ichord/Caret.js/blob/master/package.json",
6+
"description": "Get caret position and offset from inputor",
7+
"homepage": "https://github.com/ichord/Caret.js",
8+
"author": "Harold.luo <[email protected]>",
9+
"maintainers": [{
10+
"name": "Harold.luo",
11+
"url": "https://github.com/ichord",
12+
"email": "[email protected]"
13+
}],
14+
"repository": {
15+
"type": "git",
16+
"url": "https://github.com/ichord/Caret.js"
17+
},
18+
"bugs": "https://github.com/ichord/Caret.js/issues",
19+
"licenses": [{
20+
"type": "MIT",
21+
"url": "http://www.opensource.org/licenses/mit-license.php"
22+
}],
23+
"keywords": [
24+
"jquery",
25+
"caret",
26+
"offset",
27+
"position"
28+
],
29+
"spm": {
30+
"alias": {
31+
"$": "$"
32+
},
33+
"output": {
34+
"caret.js": "."
35+
}
36+
}
37+
}

caret/spec.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
define(function(require) {
2+
3+
describe('caret.js', function() {
4+
5+
it('should has caret method', function() {
6+
require('./dist/caret');
7+
var $ = require('$');
8+
expect($.fn.caret).to.be.a('function');
9+
});
10+
});
11+
12+
});

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
var modules = [
3939
'handsontable', 'select2', 'spectrum', 'jquery', 'datatables',
40-
'easing', 'color', 'treetable'
40+
'easing', 'color', 'treetable', 'caret', 'at'
4141
]
4242

4343
var specs = []

tablesorter/Gruntfile.js

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
module.exports = function(grunt) {
2+
var pkg = grunt.file.readJSON('package.json');
3+
4+
grunt.initConfig({
5+
pkg: pkg,
6+
7+
download: {
8+
options: {
9+
dest: 'src'
10+
},
11+
tablesorter: {
12+
options: {
13+
transform: function(code) {
14+
return [
15+
'define(function(require, exports, module) {',
16+
"var jQuery = require('$');",
17+
code,
18+
"});"
19+
].join('\n');
20+
}
21+
},
22+
url: 'https://raw.github.com/Mottie/tablesorter/v<%= pkg.version%>/js/jquery.tablesorter.js',
23+
name: 'tablesorter.js'
24+
},
25+
widgets: {
26+
options: {
27+
transform: function(code) {
28+
return [
29+
'define(function(require, exports, module) {',
30+
"var jQuery = require('$');",
31+
code,
32+
"});"
33+
].join('\n');
34+
}
35+
},
36+
url: 'https://raw.github.com/Mottie/tablesorter/v<%= pkg.version%>/js/jquery.tablesorter.widgets.js',
37+
name: 'widgets.js'
38+
},
39+
metadata: {
40+
options: {
41+
transform: function(code) {
42+
return [
43+
'define(function(require, exports, module) {',
44+
"var jQuery = require('$');",
45+
code,
46+
"});"
47+
].join('\n');
48+
}
49+
},
50+
url: 'https://raw.github.com/Mottie/tablesorter/v<%= pkg.version%>/js/jquery.metadata.js',
51+
name: 'metadata.js'
52+
},
53+
formatter: {
54+
options: {
55+
transform: function(code) {
56+
return [
57+
'define(function(require, exports, module) {',
58+
"var jQuery = require('$');",
59+
code,
60+
"});"
61+
].join('\n');
62+
}
63+
},
64+
url: 'https://raw.github.com/Mottie/tablesorter/v<%= pkg.version%>/js/jquery.tablesorter.widgets-filter-formatter.js',
65+
name: 'widgets-filter-formatter.js'
66+
}
67+
}
68+
});
69+
70+
grunt.loadTasks('../_tasks/download/tasks');
71+
grunt.registerTask('default', ['download']);
72+
};

0 commit comments

Comments
 (0)