-
Notifications
You must be signed in to change notification settings - Fork 418
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
1 parent
bad4a29
commit 76461f6
Showing
24 changed files
with
7,877 additions
and
281 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,3 @@ | ||
{ | ||
"directory": "app/components" | ||
} |
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,21 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
* text=auto |
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,25 @@ | ||
{ | ||
"node": true, | ||
"browser": true, | ||
"es5": true, | ||
"esnext": true, | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"indent": 2, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"quotmark": "single", | ||
"regexp": true, | ||
"undef": true, | ||
"unused": true, | ||
"strict": true, | ||
"trailing": true, | ||
"smarttabs": true, | ||
"globals": { | ||
"angular": false | ||
} | ||
} |
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,193 @@ | ||
'use strict'; | ||
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | ||
var mountFolder = function (connect, dir) { | ||
return connect.static(require('path').resolve(dir)); | ||
}; | ||
|
||
module.exports = function (grunt) { | ||
// load all grunt tasks | ||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | ||
|
||
// configurable paths | ||
var yeomanConfig = { | ||
app : 'app', | ||
dist: 'dist' | ||
}; | ||
|
||
try { | ||
yeomanConfig.app = require('./component.json').appPath || yeomanConfig.app; | ||
} catch (e) { | ||
} | ||
|
||
grunt.initConfig({ | ||
yeoman : yeomanConfig, | ||
watch : { | ||
livereload: { | ||
files: [ | ||
'<%= yeoman.app %>/{,*/}*.html', | ||
'{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css', | ||
'{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js', | ||
'<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' | ||
], | ||
tasks: ['livereload'] | ||
} | ||
}, | ||
connect: { | ||
options : { | ||
port : 9000, | ||
// Change this to '0.0.0.0' to access the server from outside. | ||
hostname: 'localhost' | ||
}, | ||
livereload: { | ||
options: { | ||
middleware: function (connect) { | ||
return [ | ||
lrSnippet, | ||
mountFolder(connect, '.tmp'), | ||
mountFolder(connect, yeomanConfig.app) | ||
]; | ||
} | ||
} | ||
}, | ||
test : { | ||
options: { | ||
middleware: function (connect) { | ||
return [ | ||
mountFolder(connect, '.tmp'), | ||
mountFolder(connect, 'test') | ||
]; | ||
} | ||
} | ||
} | ||
}, | ||
open : { | ||
server: { | ||
url: 'http://localhost:<%= connect.options.port %>' | ||
} | ||
}, | ||
clean : { | ||
dist : { | ||
files: [ | ||
{ | ||
dot: false, | ||
src: [ | ||
'.tmp', | ||
'<%= yeoman.dist %>' | ||
] | ||
} | ||
] | ||
}, | ||
server: '.tmp' | ||
}, | ||
jshint : { | ||
options: { | ||
jshintrc: '.jshintrc' | ||
}, | ||
all : [ | ||
'Gruntfile.js', | ||
'<%= yeoman.app %>/scripts/{,*/}*.js' | ||
] | ||
}, | ||
karma : { | ||
unit: { | ||
configFile: 'karma.conf.js', | ||
singleRun : true | ||
} | ||
}, | ||
cssmin : { | ||
dist: { | ||
expand: true, | ||
cwd : '<%= yeoman.dist %>', | ||
src : ['*.css', '!*.min.css'], | ||
dest : '<%= yeoman.dist %>', | ||
ext : '.min.css' | ||
} | ||
}, | ||
ngmin : { | ||
dist: { | ||
expand: true, | ||
cwd : '<%= yeoman.dist %>', | ||
src : ['*.js', '!*.min.js'], | ||
dest : '<%= yeoman.dist %>', | ||
ext : '.min.js' | ||
} | ||
}, | ||
uglify : { | ||
dist: { | ||
expand: true, | ||
cwd : '<%= yeoman.dist %>', | ||
src : ['*.min.js'], | ||
dest : '<%= yeoman.dist %>', | ||
ext : '.min.js' | ||
} | ||
}, | ||
copy : { | ||
dist: { | ||
files: [ | ||
{ | ||
expand : true, | ||
flatten: true, | ||
dot : true, | ||
dest : '<%= yeoman.dist %>', | ||
src : [ | ||
'README.md', | ||
'bower.json' | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
ngtemplates: { | ||
dist: { | ||
options: { | ||
base : '<%= yeoman.app %>', | ||
module: 'datePicker' | ||
}, | ||
src : '<%= yeoman.app %>/templates/*.html', | ||
dest : '.tmp/templates.js' | ||
} | ||
}, | ||
concat: { | ||
options: { | ||
separator: '\n' | ||
}, | ||
js: { | ||
src: ['<%= yeoman.app %>/scripts/module.js','.tmp/templates.js'], | ||
dest: '<%= yeoman.dist %>/index.js' | ||
}, | ||
css: { | ||
src: ['<%= yeoman.app %>/styles/date.css'], | ||
dest: '<%= yeoman.dist %>/index.css' | ||
} | ||
} | ||
}); | ||
|
||
grunt.renameTask('regarde', 'watch'); | ||
|
||
grunt.registerTask('server', [ | ||
'clean:server', | ||
'livereload-start', | ||
'connect:livereload', | ||
'open', | ||
'watch' | ||
]); | ||
|
||
grunt.registerTask('test', [ | ||
'clean:server', | ||
'connect:test', | ||
'karma' | ||
]); | ||
|
||
grunt.registerTask('build', [ | ||
'clean:dist', | ||
'jshint', | ||
'ngtemplates', | ||
'concat', | ||
'cssmin', | ||
'ngmin', | ||
'uglify', | ||
'copy:dist' | ||
]); | ||
|
||
grunt.registerTask('default', ['build']); | ||
}; |
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,93 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<title></title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width"> | ||
<!-- build:css styles/main.css --> | ||
<link rel="stylesheet" href="styles/bootstrap.css"> | ||
<link rel="stylesheet" href="styles/date.css"/> | ||
<!-- endbuild --> | ||
</head> | ||
<body ng-app="sample"> | ||
|
||
<div class="row-fluid"> | ||
<div class="span6"> | ||
<h2>Calendar</h2> | ||
|
||
<h3>views</h3> | ||
<h5>default</h5> | ||
<pre><div date-picker="start"></div> </pre> | ||
<div date-picker="start"></div> | ||
<h5>year</h5> | ||
<pre><div date-picker="start" <strong>year</strong>></div> </pre> | ||
<div date-picker="start" year></div> | ||
<h5>month</h5> | ||
<pre><div date-picker="start <strong>month</strong>></div> </pre> | ||
<div date-picker="start" month></div> | ||
<h5>date</h5> | ||
<pre><div date-picker="start" <strong>date</strong>></div> </pre> | ||
<div date-picker="start" date></div> | ||
<h5>hours</h5> | ||
<pre><div date-picker="start" <strong>hours</strong>></div> </pre> | ||
<div date-picker="start" hours></div> | ||
<h5>minutes</h5> | ||
<pre><div date-picker="start" <strong>minutes</strong>></div> </pre> | ||
<div date-picker="start" minutes></div> | ||
</div> | ||
<div class="span6"> | ||
<h3>Input</h3> | ||
<h5>default</h5> | ||
<pre><input type="datetime" <strong>ng-model="model" date-time</strong>></div> </pre> | ||
<input type="datetime" date-time ng-model="start"> | ||
<h5>Input format</h5> | ||
<pre><input type="datetime" ng-model="model" date-time <strong>format="long"</strong>></div> </pre> | ||
<input type="datetime" date-time ng-model="end" hours format="short"> | ||
<h5>A button</h5> | ||
<pre ng-non-bindable><div class="dropdown"> | ||
<a class="dropdown-toggle btn btn-danger"> | ||
pick a date: {{(date|date)}} | ||
</a> | ||
<div class="dropdown-menu" ng-click="$event.preventDefault();$event.stopPropagation()"> | ||
<div date-picker="date" class="datetimepicker"></div> | ||
</div> | ||
</div></pre> | ||
<div class="dropdown"> | ||
<a class="dropdown-toggle btn btn-danger"> | ||
pick a date: {{(date|date)}} | ||
</a> | ||
|
||
<div class="dropdown-menu" ng-click="$event.preventDefault();$event.stopPropagation()"> | ||
<div date-picker="date"></div> | ||
</div> | ||
</div> | ||
<h5>Date range</h5> | ||
<pre><div date-range start="start" end="end" ></div> </pre> | ||
<div date-range start="a" end="b" style="position: relative; z-index:0"></div> | ||
<h5>Date range button</h5> | ||
|
||
<div class="dropdown"> | ||
<a class="dropdown-toggle btn btn-danger"> | ||
{{(a|date)||"pick start"}} - {{(b|date)||"pick end"}} | ||
</a> | ||
|
||
<div class="dropdown-menu" ng-click="$event.preventDefault();$event.stopPropagation()"> | ||
<div date-range start="a" end="b"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script src="components/jquery/jquery.js"></script> | ||
<script src="components/angular/angular.js"></script> | ||
<script src="components/angular-bootstrap/ui-bootstrap.js"></script> | ||
<!-- build:js module.min.js --> | ||
<script src="scripts/module.js"></script> | ||
<!-- endbuild --> | ||
<script> | ||
angular.module('sample', ['datePicker', 'ui.bootstrap']); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.