diff --git a/.gitignore b/.gitignore
index 72bc13b67fb..a97e067ab5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,5 @@
*.log
-*.sw*
-.DS_STORE
-.sass-cache/
-bower_components
+.DS_Store
node_modules
dist
-/src/themes/_default-theme.scss
-
/.idea/
-/components
-/vendor
-/material-font
-
-.polymer-qp
diff --git a/.travis.yml b/.travis.yml
index d6b5953025e..6487b9e5466 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,7 +17,7 @@ before_script:
- git config --global user.name "ngMaterial Bot"
script:
- - gulp karma --browsers=Firefox
+ - gulp karma
after_success:
- ./scripts/travis-build-init.sh --sha=$TRAVIS_COMMIT
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 618caa82b37..724fd452652 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,28 +1,74 @@
-
-### 0.10.0-rc1 (2015-06-08)
+
+## 0.10.0 (2015-06-15)
#### Features
-* **menu:** add a basic dropdown menu component ([3f6b4af4](https://github.com/angular/material/commit/3f6b4af4e0c2afe35007f3df9918bbcb6775fc63), closes [#3173](https://github.com/angular/material/issues/3173))
+* **fabSpeedDial:** adds fabSpeedDial component ([e813dcdb](https://github.com/angular/material/commit/e813dcdb))
+* **fabToolbar:** adds fabToolbar component ([30a53c30](https://github.com/angular/material/commit/30a53c30))
+* **menu:** add a basic dropdown menu component ([3f6b4af4](https://github.com/angular/material/commit/3f6b4af4), closes [#3173](https://github.com/angular/material/issues/3173))
+* **select:** add mdOnClose expression eval event ([d7bfc86f](https://github.com/angular/material/commit/d7bfc86f), closes [#3217](https://github.com/angular/material/issues/3217))
+* **tabs:**
+ * replaces unnecessary watches with getter/setter syntax for improved performance ([c806e8be](https://github.com/angular/material/commit/c806e8be))
+ * adds support for `md-autoselect` ([8285e2d0](https://github.com/angular/material/commit/8285e2d0))
#### Breaking Changes
-* The API has changed for `md-icon` - `iconSize` has been changed to `viewBoxSize`
+* The API has changed for `md-icon` - `iconSize` has been
+changed to `viewBoxSize`
+
+ ([f93e117a](https://github.com/angular/material/commit/f93e117a))
#### Bug Fixes
-* **button:** fixes style inconsistencies between `md-buttons` using `a` and `button` under th ([cc07e63d](https://github.com/angular/material/commit/cc07e63dc5a37b5b220691c3cf8e4b3d08bd2500), closes [#2440](https://github.com/angular/material/issues/2440))
-* **icon:** Change iconSize param to viewBoxSize. ([f93e117a](https://github.com/angular/material/commit/f93e117a38d4ccd9fca4f504b4e9d86bc5e8962f), closes [#1679](https://github.com/angular/material/issues/1679), [#3123](https://github.com/angular/material/issues/3123))
-* **icons:** support for ngDirectives using compile phase ([9521a1e0](https://github.com/angular/material/commit/9521a1e03e108e8ac5a5857f18fc67110ba5fae3))
+* **autocomplete:**
+ * prevents an error when passing null instead of an array ([afa213df](https://github.com/angular/material/commit/afa213df))
+ * waits for screen to reposition on focus before locking scrolling ([6bfc31ea](https://github.com/angular/material/commit/6bfc31ea), closes [#2973](https://github.com/angular/material/issues/2973))
+ * fixes typo in autocomplete mouseup method ([67817713](https://github.com/angular/material/commit/67817713))
+ * locks scrolling while autocomplete menu is visible ([deae957b](https://github.com/angular/material/commit/deae957b), closes [#2973](https://github.com/angular/material/issues/2973))
+ * fixes issue where setting a min-length of 0 was not working ([d3f65195](https://github.com/angular/material/commit/d3f65195))
+* **button:** fixes style inconsistencies between `md-buttons` using `a` and `button` under th ([cc07e63d](https://github.com/angular/material/commit/cc07e63d), closes [#2440](https://github.com/angular/material/issues/2440))
+* **checkbox:** adds ability to click links within checkbox ([999e0da2](https://github.com/angular/material/commit/999e0da2), closes [#852](https://github.com/angular/material/issues/852))
+* **icon:** Change iconSize param to viewBoxSize. ([f93e117a](https://github.com/angular/material/commit/f93e117a), closes [#1679](https://github.com/angular/material/issues/1679), [#3123](https://github.com/angular/material/issues/3123))
+* **icons:** support for ngDirectives using compile phase ([9521a1e0](https://github.com/angular/material/commit/9521a1e0))
+* **mdMenu:**
+ * improve aria accessability ([113ad446](https://github.com/angular/material/commit/113ad446))
+ * close on scope $destroy ([67be5ce9](https://github.com/angular/material/commit/67be5ce9), closes [#3189](https://github.com/angular/material/issues/3189))
+ * fix positioning breaking after scroll/resize ([94b03b03](https://github.com/angular/material/commit/94b03b03), closes [#3204](https://github.com/angular/material/issues/3204))
+ * re-enable keyboard controls ([25131532](https://github.com/angular/material/commit/25131532), closes [#3205](https://github.com/angular/material/issues/3205))
+ * fix rc2 complete break ([fb245fb8](https://github.com/angular/material/commit/fb245fb8), closes [#3197](https://github.com/angular/material/issues/3197))
+* **radioButton:** fixes potential theming bug due to CSS specificity ([e8ec2b5e](https://github.com/angular/material/commit/e8ec2b5e))
+* **select:**
+ * fixes screen jump in Firefox ([7b8efe21](https://github.com/angular/material/commit/7b8efe21))
+ * fix focus color not picking up theming ([781a4bcf](https://github.com/angular/material/commit/781a4bcf), closes [#3128](https://github.com/angular/material/issues/3128))
+* **tabs:**
+ * programmatically changing tabs will now adjust pagination to show the selected t ([6d45f104](https://github.com/angular/material/commit/6d45f104), closes [#3139](https://github.com/angular/material/issues/3139))
+ * calls on-select for the initially selected item ([cc1d9d2b](https://github.com/angular/material/commit/cc1d9d2b), closes [#3169](https://github.com/angular/material/issues/3169))
+ * fixes CSS to respect non-truthy values for `md-dynamic-height` ([60197180](https://github.com/angular/material/commit/60197180), closes [#3184](https://github.com/angular/material/issues/3184))
+ * fixes centered tabs for Safari ([25526864](https://github.com/angular/material/commit/25526864), closes [#3198](https://github.com/angular/material/issues/3198))
+ * nested tabs should now work properly when using md-tab-label and md-tab-body ([e3e52c2c](https://github.com/angular/material/commit/e3e52c2c), closes [#3206](https://github.com/angular/material/issues/3206))
+ * fixes infinite digests bug in Firefox ([781929d7](https://github.com/angular/material/commit/781929d7))
+ * fixes issue with tab pagination in Angular 1.4 ([4273f52b](https://github.com/angular/material/commit/4273f52b))
+* **theming:** fixes bugs with progress circular and select theming ([3ac50acc](https://github.com/angular/material/commit/3ac50acc))
### 0.9.8 (2015-06-08)
+#### Bug Fixes
+
+* **tabs:**
+ * prevents tabs from shrinking when used with flexbox ([dd041927](https://github.com/angular/material/commit/dd0419277523a44f8d06e45dc3c31b2afb3c8101), closes [#3011](https://github.com/angular/material/issues/3011))
+ * prevents select/deselect events from firing on destroy ([1ba0686e](https://github.com/angular/material/commit/1ba0686e7b42fef6072d011bf2f61fc3576a2017))
+
+
+
+### 0.9.8-rc1 (2015-06-05)
+
+
#### Features
* **autocomplete:** custom template demo ([7d2deb7e](https://github.com/angular/material/commit/7d2deb7ec702dac7999ae6b0fdba966c497e46ca), closes [#2505](https://github.com/angular/material/issues/2505))
@@ -40,13 +86,11 @@
* Tabs will now require the `md-swipe-content` attribute in order to enable swipe gestures to change tabs in the content area.
+ ([03d01e96](https://github.com/angular/material/commit/03d01e96623de397ef171c063b7a8a56656fe0de))
+
#### Bug Fixes
-* **tabs:**
- * prevents tabs from shrinking when used with flexbox ([dd041927](https://github.com/angular/material/commit/dd0419277523a44f8d06e45dc3c31b2afb3c8101), closes [#3011](https://github.com/angular/material/issues/3011))
- * prevents select/deselect events from firing on destroy ([1ba0686e](https://github.com/angular/material/commit/1ba0686e7b42fef6072d011bf2f61fc3576a2017))
- * fixes continuous `$digest` bug in Firefox when using `md-stretch-tabs` ([5372710a](https://github.com/angular/material/commit/5372710a7a4764a908f08deeb06481ae71e539d3), closes [#3101](https://github.com/angular/material/issues/3101))
* add missing alt attribute to logo in docs ([19ad66d1](https://github.com/angular/material/commit/19ad66d1a5954296de68d3f85d78a3522ff488e5))
* **autocomplete:**
* selecting an item will hide the menu in IE11 ([0c073d10](https://github.com/angular/material/commit/0c073d10a18409d1d1f900951e42ba35df79d81e), closes [#2188](https://github.com/angular/material/issues/2188), [#3008](https://github.com/angular/material/issues/3008))
@@ -60,6 +104,7 @@
* fix for attributes being ignored ([07295879](https://github.com/angular/material/commit/072958796a64c2175de9e4cb0de10a8025f0dc7c))
* increment the value properly when step is a decimal number ([476d068c](https://github.com/angular/material/commit/476d068c6f6e204d2c0797be08346076154a9029), closes [#2015](https://github.com/angular/material/issues/2015))
* **styles:** fixes theming specificy regarding border colors ([264f043e](https://github.com/angular/material/commit/264f043e4220d13f74fef013081c68dcd878c12d))
+* **tabs:** fixes continuous `$digest` bug in Firefox when using `md-stretch-tabs` ([5372710a](https://github.com/angular/material/commit/5372710a7a4764a908f08deeb06481ae71e539d3), closes [#3101](https://github.com/angular/material/issues/3101))
* **tooltip:**
* moves tooltip to the $rootElement rather than body or md-content ([32b0facc](https://github.com/angular/material/commit/32b0facc0b971f12f777f8f7b7392db1e5c5e091))
* tooltip will attach to the body rather than $rootElement ([24ca2966](https://github.com/angular/material/commit/24ca2966cf08a56aad59f4f60b186664fcd7e7f3))
diff --git a/README.md b/README.md
index f1da8f5798b..6bf352f3539 100644
--- a/README.md
+++ b/README.md
@@ -117,8 +117,8 @@ when using online tools such as [CodePen](http://codepen.io/), [Plunkr](http://p
```html
-
-
+
+
@@ -129,22 +129,22 @@ when using online tools such as [CodePen](http://codepen.io/), [Plunkr](http://p
-
-
+
+
```
-> Note that the above sample references the 0.8.3 CDN release. Your version will change based on the latest stable release version.
+> Note that the above sample references the 0.10.0 CDN release. Your version will change based on the latest stable release version.
-Developers seeking the latest, most-current build versions can use [RawGit.com](//rawgit.com) to
+Developers seeking the latest, most-current build versions can use [GitCDN.xyz](//gitcdn.xyz) to
pull directly from the distribution GitHub
[Bower-Material](https://github.com/angular/bower-material) repository:
```html
-
-
+
+
@@ -154,11 +154,9 @@ pull directly from the distribution GitHub
-
-
+
+
```
-> Please note that the above RawGit access is intended **ONLY** for development purposes or sharing
- low-traffic, temporary examples or demos with small numbers of people.
diff --git a/config/build.config.js b/config/build.config.js
index 6567b4b8da4..abf1ebf0592 100644
--- a/config/build.config.js
+++ b/config/build.config.js
@@ -3,7 +3,7 @@ var fs = require('fs');
var versionFile = __dirname + '/../dist/commit';
module.exports = {
- ngVersion: '1.4.0',
+ ngVersion: '1.3.15',
version: pkg.version,
repository: pkg.repository.url
.replace(/^git/,'https')
diff --git a/config/karma.conf.js b/config/karma.conf.js
index 1ed7851b7f5..a6292135965 100644
--- a/config/karma.conf.js
+++ b/config/karma.conf.js
@@ -14,15 +14,17 @@ module.exports = function(config) {
// demos in the tests, and Karma doesn't support advanced
// globbing.
+ 'dist/angular-material.css',
+
'src/core/**/*.js',
'src/components/*/*.js',
'src/components/*/js/*.js',
'src/**/*.spec.js'
-
];
var COMPILED_SRC = [
+ 'dist/angular-material.min.css',
'dist/angular-material.min.js', // Minified source
'src/**/*.spec.js'
];
@@ -45,7 +47,7 @@ module.exports = function(config) {
frameworks: ['jasmine'],
files: dependencies.concat(testSrc),
- logLevel: config.LOG_WARN,
+ logLevel: config.LOG_DEBUG,
port: 9876,
reporters: ['progress'],
colors: true,
@@ -63,7 +65,7 @@ module.exports = function(config) {
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
// - PhantomJS
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
- browsers: ['Chrome'],
+ browsers: ['PhantomJS','Firefox'],
// you can define custom flags
customLaunchers: {
diff --git a/docs/app/css/style.css b/docs/app/css/style.css
index b990f501416..872e7f0703e 100644
--- a/docs/app/css/style.css
+++ b/docs/app/css/style.css
@@ -243,6 +243,7 @@ code:not(.highlight) {
color: white;
cursor: pointer;
display: block;
+ align-items: inherit;
line-height: 40px;
margin: 0;
max-height: 40px;
diff --git a/docs/app/js/app.js b/docs/app/js/app.js
index 7009c4070d4..827c47440b6 100644
--- a/docs/app/js/app.js
+++ b/docs/app/js/app.js
@@ -182,6 +182,11 @@ function(SERVICES, COMPONENTS, DEMOS, PAGES, $location, $rootScope, $http, $wind
name : 'Button',
url: '/CSS/button',
type: 'link'
+ },
+ {
+ name : 'Checkbox',
+ url: '/CSS/checkbox',
+ type: 'link'
}]
},
{
diff --git a/docs/app/partials/menu-toggle.tmpl.html b/docs/app/partials/menu-toggle.tmpl.html
index 67bf3098a8f..3f4a32ebb3c 100644
--- a/docs/app/partials/menu-toggle.tmpl.html
+++ b/docs/app/partials/menu-toggle.tmpl.html
@@ -4,7 +4,7 @@
aria-expanded="{{isOpen()}}">
{{section.name}}
-
+
diff --git a/docs/content/CSS/checkbox.md b/docs/content/CSS/checkbox.md
new file mode 100644
index 00000000000..1e60169de7e
--- /dev/null
+++ b/docs/content/CSS/checkbox.md
@@ -0,0 +1,98 @@
+@ngdoc content
+@name checkbox
+@description
+
+### CSS Styles
+
+The css decalaration of the `` component is:
+
+
+ md-checkbox {
+ margin: 8px;
+ cursor: pointer;
+ padding-left: 18px;
+ padding-right: 0;
+ line-height: 26px;
+ min-width: 18px;
+ min-height: 18px;
+ }
+
+
+#### Ink color
+
+![greencheckbox](https://cloud.githubusercontent.com/assets/1292882/8035909/b2130da0-0dfc-11e5-932f-4424d3b46d5b.PNG)
+
+In order to change the color when the checkbox is checked:
+
+
+
+ Green Checkbox
+
+
+
+
+ md-checkbox.md-checked.green .md-icon {
+ background-color: rgba(0, 255, 0, 0.87);
+ }
+
+
+
+#### Disabled
+
+In order to change the color when a disabled checkbox is checked:
+
+![checkboxdisabledred](https://cloud.githubusercontent.com/assets/1292882/8036177/dc941a86-0dfe-11e5-8892-ac19ec6926fe.PNG)
+
+
+
+
+ Checkbox: Disabled, Checked
+
+
+
+
+md-checkbox.md-checked[disabled].red .md-icon {
+ background-color: rgba(255, 0, 0, 0.26);
+}
+
+
+#### Borders
+In order to add a custom border do the following:
+
+![checkboxcustomborder](https://cloud.githubusercontent.com/assets/1292882/8037214/388dd40c-0e05-11e5-82a7-4bfa2541e968.PNG)
+
+
+
+
+
+ Default Border
+
+
+
+
+ Custom Border
+
+
+
+
+md-checkbox.dotted .md-icon {
+ border-width: 1px;
+ border-style: dashed;
+}
+
+
+
+
+#### Bi-Di
+
+The mdCheckbox directive supports bi-directional specifiers in the `` tag:
+
+![checkboxrtl](https://cloud.githubusercontent.com/assets/1292882/8036091/fb40bcf6-0dfd-11e5-8319-25e68939d1a3.PNG)
+
+
+
+
+
+
+
+
diff --git a/docs/spec/codepen.spec.js b/docs/spec/codepen.spec.js
index 3093d208382..825cc06a28f 100644
--- a/docs/spec/codepen.spec.js
+++ b/docs/spec/codepen.spec.js
@@ -43,14 +43,18 @@ describe('CodepenDataAdapter', function() {
});
it('includes the core angular css', function() {
- expect(data.css_external).toBe('https://rawgit.com/angular/bower-material/master/angular-material.css');
+
+ // NOTE: the release script replaces this localhost reference with
+ // 'https://gitcdn.xyz/repo/angular/bower-material/master/angular-material.css'
+
+ expect(data.css_external).toBe('http://localhost:8080/angular-material.css');
});
it('includes the external js files, including the asset cache required to serve svgs to codepen', function() {
var expected = [
'http://some-url-to-external-js-files-required-for-codepen',
- 'https://rawgit.com/angular/bower-material/master/angular-material.js',
+ 'http://localhost:8080/angular-material.js',
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-114/assets-cache.js'
].join(';');
expect(data.js_external).toBe(expected)
diff --git a/gulp/tasks/build-scss.js b/gulp/tasks/build-scss.js
index 4ba0167225a..31eacda506a 100644
--- a/gulp/tasks/build-scss.js
+++ b/gulp/tasks/build-scss.js
@@ -24,6 +24,16 @@ exports.task = function() {
var streams = [];
var baseVars = fs.readFileSync('src/core/style/variables.scss', 'utf8').toString();
gutil.log("Building css files...");
+
+ // create SCSS file for distribution
+ streams.push(
+ gulp.src(paths)
+ .pipe(util.filterNonCodeFiles())
+ .pipe(filter(['**', '!**/*-theme.scss']))
+ .pipe(concat('angular-material.scss'))
+ .pipe(gulp.dest(dest))
+ );
+
streams.push(
gulp.src(paths)
.pipe(util.filterNonCodeFiles())
diff --git a/gulp/tasks/karma-fast.js b/gulp/tasks/karma-fast.js
new file mode 100644
index 00000000000..d9db0b75fa3
--- /dev/null
+++ b/gulp/tasks/karma-fast.js
@@ -0,0 +1,57 @@
+var gutil = require('gulp-util');
+var karma = require('karma').server;
+var util = require('../util');
+var ROOT = require('../const').ROOT;
+var args = util.args;
+
+// NOTE: `karma-fast` does NOT pre-make a full build of JS and CSS
+// exports.dependencies = ['build'];
+
+exports.task = function (done) {
+ var errorCount = 0;
+ var karmaConfig = {
+ logLevel: 'warn',
+ singleRun: true,
+ autoWatch: false,
+ configFile: ROOT + '/config/karma.conf.js'
+ };
+
+ if ( args.browsers ) {
+ karmaConfig.browsers = args.browsers.trim().split(',');
+ }
+ // NOTE: `karma-fast` does NOT test Firefox by default.
+
+ gutil.log('Running unit tests on unminified source.');
+ karma.start(karmaConfig, captureError(clearEnv,clearEnv));
+
+
+ function clearEnv() {
+ process.env.KARMA_TEST_COMPRESSED = undefined;
+ process.env.KARMA_TEST_JQUERY = undefined;
+
+ if (errorCount > 0) { process.exit(errorCount); }
+ done();
+ }
+
+ /**
+ * For each version of testings (unminified, minified, minified w/ jQuery)
+ * capture the exitCode and update the error count...
+ *
+ * When all versions are done, report any errors that may manifest
+ * [e.g. perhaps in the minified tests]
+ *
+ * NOTE: All versions must pass before the CI server will announce 'success'
+ */
+ function captureError(next,done) {
+ return function(exitCode) {
+ if (exitCode != 0) {
+ gutil.log(gutil.colors.red("Karma exited with the following exit code: " + exitCode));
+ errorCount++;
+ }
+ // Do not process next set of tests if current set had >0 errors.
+ (errorCount > 0) && done() || next();
+ };
+ }
+
+
+};
diff --git a/gulp/tasks/karma-watch.js b/gulp/tasks/karma-watch.js
index 51e7da502c2..c3583270305 100644
--- a/gulp/tasks/karma-watch.js
+++ b/gulp/tasks/karma-watch.js
@@ -2,6 +2,9 @@ var karma = require('karma').server;
var ROOT = require('../const').ROOT;
var args = require('../util').args;
+// Make full build of JS and CSS
+exports.dependencies = ['build'];
+
exports.task = function(done) {
karma.start({
singleRun: false,
diff --git a/gulp/tasks/karma.js b/gulp/tasks/karma.js
index 89b36ee6c4c..ba9615e82a6 100644
--- a/gulp/tasks/karma.js
+++ b/gulp/tasks/karma.js
@@ -4,13 +4,15 @@ var util = require('../util');
var ROOT = require('../const').ROOT;
var args = util.args;
+// Make full build of JS and CSS
+exports.dependencies = ['build'];
+
exports.task = function (done) {
var errorCount = 0;
var karmaConfig = {
logLevel: 'warn',
singleRun: true,
autoWatch: false,
- browsers: args.browsers ? args.browsers.trim().split(',') : ['Chrome'],
configFile: ROOT + '/config/karma.conf.js'
};
@@ -35,8 +37,13 @@ exports.task = function (done) {
}
+ if ( args.browsers ) {
+ karmaConfig.browsers = args.browsers.trim().split(',');
+ } else {
+ karmaConfig.browsers = ['Firefox', 'PhantomJS'];
+ }
+
gutil.log('Running unit tests on unminified source.');
- util.buildJs(true);
karma.start(karmaConfig, captureError(testMinified,clearEnv));
function testMinified() {
diff --git a/gulp/util.js b/gulp/util.js
index bb0b081ebd8..72661ee86fe 100644
--- a/gulp/util.js
+++ b/gulp/util.js
@@ -38,7 +38,7 @@ exports.args = args;
* Builds the entire component library javascript.
* @param {boolean} isRelease Whether to build in release mode.
*/
-function buildJs (isRelease) {
+function buildJs () {
var jsFiles = config.jsBaseFiles.concat([path.join(config.paths, '*.js')]);
gutil.log("building js files...");
diff --git a/gulpfile.js b/gulpfile.js
index d81ba2e37b7..9d9aea4bb58 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -15,6 +15,6 @@ fs.readdirSync('./gulp/tasks')
contents: require('./gulp/tasks/' + filename)
};
})
- .filter(function (file) {
+ .forEach(function (file) {
gulp.task(file.name, file.contents.dependencies, file.contents.task);
});
diff --git a/package.json b/package.json
index 210229caee3..e4656f3f128 100644
--- a/package.json
+++ b/package.json
@@ -1,21 +1,21 @@
{
"name": "angular-material-source",
- "version": "0.10.0-rc1",
+ "version": "0.10.0",
"repository": {
"url": "git://github.com/angular/material.git"
},
"devDependencies": {
- "angular": "^1.3.15 || >1.4.0-beta.0",
- "angular-animate": "^1.3.15 || >1.4.0-beta.0",
- "angular-aria": "^1.3.15 || >1.4.0-beta.0",
- "angular-messages": "^1.3.0 || >1.4.0-beta.0",
- "angular-mocks": "^1.3.0 || >1.4.0-beta.0",
- "angular-route": "^1.3.0 || >1.4.0-beta.0",
+ "angular": "^1.4.0",
+ "angular-animate": "^1.4.0",
+ "angular-aria": "^1.4.0",
+ "angular-messages": "^1.4.0",
+ "angular-mocks": "^1.4.0",
+ "angular-route": "^1.4.0",
"angularytics": "^0.3.0",
"canonical-path": "0.0.2",
"cli-color": "^1.0.0",
"colors": "^1.1.0",
- "conventional-changelog": "0.0.9",
+ "conventional-changelog": "git://github.com/robertmesserle/conventional-changelog.git",
"dgeni": "^0.4.1",
"dgeni-packages": "^0.10.3",
"esprima": "^1.2.2",
@@ -57,5 +57,11 @@
"q": "^1.0.1",
"stream-series": "^0.1.1",
"through2": "^0.6.3"
+ },
+ "scripts": {
+ "prom": "git pull --rebase origin master",
+ "current-branch": "git rev-parse --abbrev-ref HEAD",
+ "merge-base": "git merge-base $(npm run -s current-branch) origin/master",
+ "squash": "git rebase -i $(npm run -s merge-base)"
}
-}
\ No newline at end of file
+}
diff --git a/release.js b/release.js
index f02b088ecfe..cfc689227ff 100644
--- a/release.js
+++ b/release.js
@@ -20,9 +20,9 @@
header();
write('Is this a dry-run? {{"[yes/no]".cyan}} ');
- dryRun = prompt();
+ dryRun = prompt() !== 'no';
- if (dryRun !== 'no') {
+ if (dryRun) {
write('What would you like the old version to be? (default: {{oldVersion.cyan}}) ');
oldVersion = prompt() || oldVersion;
build();
@@ -260,8 +260,9 @@
exec([
'rm -rf dist',
'gulp docs',
- 'sed -i \'\' \'s,http:\\/\\/localhost:8080\\/angular-material,http:\\/\\/cdn.rawgit.com/angular/bower-material/v{{newVersion}}/angular-material,g\' dist/docs/docs.js'
+ 'sed -i \'\' \'s,http:\\/\\/localhost:8080\\/angular-material,https:\\/\\/gitcdn.xyz/repo/angular/bower-material/v{{newVersion}}/angular-material,g\' dist/docs/docs.js'
]);
+
//-- copy files over to site repo
exec([
'rm -rf ./*-rc*',
diff --git a/scripts/gulp-utils.js b/scripts/gulp-utils.js
index 8cdfa9d5410..0f826d5d3c9 100644
--- a/scripts/gulp-utils.js
+++ b/scripts/gulp-utils.js
@@ -11,10 +11,16 @@ var path = require('path');
var getModuleInfo = require('../config/ngModuleData.js');
exports.humanizeCamelCase = function(str) {
- return str.charAt(0).toUpperCase() +
- str.substring(1).replace(/[A-Z]/g, function($1) {
- return ' ' + $1.toUpperCase();
- });
+ switch (str) {
+ case 'fabSpeedDial':
+ return 'FAB Speed Dial';
+ case 'fabToolbar':
+ return 'FAB Toolbar';
+ default:
+ return str.charAt(0).toUpperCase() + str.substring(1).replace(/[A-Z]/g, function($1) {
+ return ' ' + $1.toUpperCase();
+ });
+ }
};
/**
@@ -52,7 +58,8 @@ exports.readModuleDemos = function(moduleName, fileTasks) {
var srcPath = demoFolder.path.substring(demoFolder.path.indexOf('src/') + 4);
var split = srcPath.split('/');
- var demo = {
+ var demo = {
+ ngModule: '',
id: demoId,
css:[], html:[], js:[]
};
@@ -61,7 +68,7 @@ exports.readModuleDemos = function(moduleName, fileTasks) {
.pipe(fileTasks(demoId))
.pipe(through2.obj(function(file, enc, cb) {
if (/index.html$/.test(file.path)) {
- demo.moduleName = moduleName,
+ demo.moduleName = moduleName;
demo.name = path.basename(demoFolder.path);
demo.label = exports.humanizeCamelCase(path.basename(demoFolder.path).replace(/^demo/, ''));
demo.id = demoId;
diff --git a/scripts/snapshot-docs-site.sh b/scripts/snapshot-docs-site.sh
index a5f9b16f4d9..97d3d8b66c5 100755
--- a/scripts/snapshot-docs-site.sh
+++ b/scripts/snapshot-docs-site.sh
@@ -19,7 +19,9 @@ function run {
rm -rf code.material.angularjs.org/HEAD
echo "-- Copying docs site to snapshot..."
- sed -i "s,http://localhost:8080/angular-material,https://cdn.rawgit.com/angular/bower-material/v$VERSION/angular-material,g" dist/docs/docs.js
+ sed -i "s,http://localhost:8080/angular-material,https://gitcdn.xyz/repo/angular/bower-material/v$VERSION/angular-material,g" dist/docs/docs.js
+
+
cp -Rf dist/docs code.material.angularjs.org/HEAD
cd code.material.angularjs.org
diff --git a/src/components/autocomplete/js/autocompleteController.js b/src/components/autocomplete/js/autocompleteController.js
index 633434eecdc..1865544e5c2 100644
--- a/src/components/autocomplete/js/autocompleteController.js
+++ b/src/components/autocomplete/js/autocompleteController.js
@@ -7,9 +7,9 @@ var ITEM_HEIGHT = 41,
MENU_PADDING = 8;
function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $mdTheming, $window,
- $animate, $rootElement) {
+ $animate, $rootElement, $attrs) {
//-- private variables
- var self = this,
+ var ctrl = this,
itemParts = $scope.itemsExpr.split(/ in /i),
itemExpr = itemParts[1],
elements = null,
@@ -24,28 +24,30 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
defineProperty('hidden', handleHiddenChange, true);
//-- public variables
- self.scope = $scope;
- self.parent = $scope.$parent;
- self.itemName = itemParts[0];
- self.matches = [];
- self.loading = false;
- self.hidden = true;
- self.index = null;
- self.messages = [];
- self.id = $mdUtil.nextUid();
+ ctrl.scope = $scope;
+ ctrl.parent = $scope.$parent;
+ ctrl.itemName = itemParts[0];
+ ctrl.matches = [];
+ ctrl.loading = false;
+ ctrl.hidden = true;
+ ctrl.index = null;
+ ctrl.messages = [];
+ ctrl.id = $mdUtil.nextUid();
+ ctrl.isDisabled = null;
+ ctrl.isRequired = null;
//-- public methods
- self.keydown = keydown;
- self.blur = blur;
- self.focus = focus;
- self.clear = clearValue;
- self.select = select;
- self.listEnter = onListEnter;
- self.listLeave = onListLeave;
- self.mouseUp = onMouseup;
- self.getCurrentDisplayValue = getCurrentDisplayValue;
- self.registerSelectedItemWatcher = registerSelectedItemWatcher;
- self.unregisterSelectedItemWatcher = unregisterSelectedItemWatcher;
+ ctrl.keydown = keydown;
+ ctrl.blur = blur;
+ ctrl.focus = focus;
+ ctrl.clear = clearValue;
+ ctrl.select = select;
+ ctrl.listEnter = onListEnter;
+ ctrl.listLeave = onListLeave;
+ ctrl.mouseUp = onMouseup;
+ ctrl.getCurrentDisplayValue = getCurrentDisplayValue;
+ ctrl.registerSelectedItemWatcher = registerSelectedItemWatcher;
+ ctrl.unregisterSelectedItemWatcher = unregisterSelectedItemWatcher;
return init();
@@ -55,6 +57,8 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* Initialize the controller, setup watchers, gather elements
*/
function init () {
+ $mdUtil.initOptionalProperties($scope, $attrs, { searchText: null, selectedItem: null } );
+ $mdTheming($element);
configureWatchers();
$timeout(function () {
gatherElements();
@@ -129,9 +133,9 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
*/
function configureWatchers () {
var wait = parseInt($scope.delay, 10) || 0;
- $scope.$watch('searchText', wait
- ? $mdUtil.debounce(handleSearchText, wait)
- : handleSearchText);
+ $attrs.$observe('disabled', function (value) { ctrl.isDisabled = value; });
+ $attrs.$observe('required', function (value) { ctrl.isRequired = value !== null; });
+ $scope.$watch('searchText', wait ? $mdUtil.debounce(handleSearchText, wait) : handleSearchText);
registerSelectedItemWatcher(selectedItemChange);
$scope.$watch('selectedItem', handleSelectedItemChange);
angular.element($window).on('resize', positionDropdown);
@@ -194,7 +198,12 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* @param oldHidden
*/
function handleHiddenChange (hidden, oldHidden) {
- if (!hidden && oldHidden) positionDropdown();
+ if (!hidden && oldHidden) {
+ positionDropdown();
+ if (elements) $timeout(function () { $mdUtil.disableScrollAround(elements.ul); }, 0, false);
+ } else if (hidden && !oldHidden) {
+ $mdUtil.enableScrolling();
+ }
}
/**
@@ -209,14 +218,14 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
*/
function onListLeave () {
noBlur = false;
- if (!hasFocus) self.hidden = true;
+ if (!hasFocus) ctrl.hidden = true;
}
/**
* When the mouse button is released, send focus back to the input field.
*/
function onMouseup () {
- element.input.focus();
+ elements.input.focus();
}
/**
@@ -228,7 +237,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
if (selectedItem) {
$scope.searchText = getDisplayValue(selectedItem);
}
- if ($scope.itemChange && selectedItem !== previousSelectedItem)
+ if (angular.isFunction($scope.itemChange) && selectedItem !== previousSelectedItem)
$scope.itemChange(getItemScope(selectedItem));
}
@@ -271,20 +280,20 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* @param previousSearchText
*/
function handleSearchText (searchText, previousSearchText) {
- self.index = getDefaultIndex();
+ ctrl.index = getDefaultIndex();
//-- do nothing on init
if (searchText === previousSearchText) return;
//-- clear selected item if search text no longer matches it
if (searchText !== getDisplayValue($scope.selectedItem)) $scope.selectedItem = null;
else return;
//-- trigger change event if available
- if ($scope.textChange && searchText !== previousSearchText)
+ if (angular.isFunction($scope.textChange) && searchText !== previousSearchText)
$scope.textChange(getItemScope($scope.selectedItem));
//-- cancel results if search text is not long enough
if (!isMinLengthMet()) {
- self.loading = false;
- self.matches = [];
- self.hidden = shouldHide();
+ ctrl.loading = false;
+ ctrl.matches = [];
+ ctrl.hidden = shouldHide();
updateMessages();
} else {
handleQuery();
@@ -296,7 +305,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
*/
function blur () {
hasFocus = false;
- if (!noBlur) self.hidden = true;
+ if (!noBlur) ctrl.hidden = true;
}
/**
@@ -307,8 +316,8 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
//-- if searchText is null, let's force it to be a string
if (!angular.isString($scope.searchText)) $scope.searchText = '';
if ($scope.minLength > 0) return;
- self.hidden = shouldHide();
- if (!self.hidden) handleQuery();
+ ctrl.hidden = shouldHide();
+ if (!ctrl.hidden) handleQuery();
}
/**
@@ -318,29 +327,29 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
function keydown (event) {
switch (event.keyCode) {
case $mdConstant.KEY_CODE.DOWN_ARROW:
- if (self.loading) return;
+ if (ctrl.loading) return;
event.preventDefault();
- self.index = Math.min(self.index + 1, self.matches.length - 1);
+ ctrl.index = Math.min(ctrl.index + 1, ctrl.matches.length - 1);
updateScroll();
updateMessages();
break;
case $mdConstant.KEY_CODE.UP_ARROW:
- if (self.loading) return;
+ if (ctrl.loading) return;
event.preventDefault();
- self.index = self.index < 0 ? self.matches.length - 1 : Math.max(0, self.index - 1);
+ ctrl.index = ctrl.index < 0 ? ctrl.matches.length - 1 : Math.max(0, ctrl.index - 1);
updateScroll();
updateMessages();
break;
case $mdConstant.KEY_CODE.TAB:
case $mdConstant.KEY_CODE.ENTER:
- if (self.hidden || self.loading || self.index < 0 || self.matches.length < 1) return;
+ if (ctrl.hidden || ctrl.loading || ctrl.index < 0 || ctrl.matches.length < 1) return;
event.preventDefault();
- select(self.index);
+ select(ctrl.index);
break;
case $mdConstant.KEY_CODE.ESCAPE:
- self.matches = [];
- self.hidden = true;
- self.index = getDefaultIndex();
+ ctrl.matches = [];
+ ctrl.hidden = true;
+ ctrl.index = getDefaultIndex();
break;
default:
}
@@ -373,7 +382,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
function getItemScope (item) {
if (!item) return;
var locals = {};
- if (self.itemName) locals[self.itemName] = item;
+ if (ctrl.itemName) locals[ctrl.itemName] = item;
return locals;
}
@@ -398,7 +407,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* @returns {*}
*/
function getCurrentDisplayValue () {
- return getDisplayValue(self.matches[self.index]);
+ return getDisplayValue(ctrl.matches[ctrl.index]);
}
/**
@@ -418,7 +427,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* @param value
*/
function defineProperty (key, handler, value) {
- Object.defineProperty(self, key, {
+ Object.defineProperty(ctrl, key, {
get: function () { return value; },
set: function (newValue) {
var oldValue = value;
@@ -433,15 +442,16 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* @param index
*/
function select (index) {
- $scope.selectedItem = self.matches[index];
- self.hidden = true;
- self.index = 0;
- self.matches = [];
+ $scope.selectedItem = ctrl.matches[index];
+ ctrl.loading = false;
+ ctrl.hidden = true;
+ ctrl.index = 0;
+ ctrl.matches = [];
//-- force form to update state for validation
$timeout(function () {
elements.$.input.controller('ngModel').$setViewValue(getDisplayValue($scope.selectedItem) ||
$scope.searchText);
- self.hidden = true;
+ ctrl.hidden = true;
});
}
@@ -469,19 +479,19 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
term = searchText.toLowerCase();
if (angular.isArray(items)) {
handleResults(items);
- } else {
- self.loading = true;
+ } else if (items) {
+ ctrl.loading = true;
if (items.success) items.success(handleResults);
if (items.then) items.then(handleResults);
- if (items.error) items.error(function () { self.loading = false; });
+ if (items.error) items.error(function () { ctrl.loading = false; });
}
function handleResults (matches) {
cache[term] = matches;
if (searchText !== $scope.searchText) return; //-- just cache the results if old request
- self.loading = false;
+ ctrl.loading = false;
promise = null;
- self.matches = matches;
- self.hidden = shouldHide();
+ ctrl.matches = matches;
+ ctrl.hidden = shouldHide();
updateMessages();
positionDropdown();
}
@@ -491,7 +501,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* Updates the ARIA messages
*/
function updateMessages () {
- self.messages = [ getCountMessage(), getCurrentDisplayValue() ];
+ ctrl.messages = [ getCountMessage(), getCurrentDisplayValue() ];
}
/**
@@ -499,12 +509,12 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* @returns {*}
*/
function getCountMessage () {
- if (lastCount === self.matches.length) return '';
- lastCount = self.matches.length;
- switch (self.matches.length) {
+ if (lastCount === ctrl.matches.length) return '';
+ lastCount = ctrl.matches.length;
+ switch (ctrl.matches.length) {
case 0: return 'There are no matches available.';
case 1: return 'There is 1 match available.';
- default: return 'There are ' + self.matches.length + ' matches available.';
+ default: return 'There are ' + ctrl.matches.length + ' matches available.';
}
}
@@ -512,8 +522,8 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
* Makes sure that the focused element is within view.
*/
function updateScroll () {
- if (!elements.li[self.index]) return;
- var li = elements.li[self.index],
+ if (!elements.li[ctrl.index]) return;
+ var li = elements.li[ctrl.index],
top = li.offsetTop,
bot = top + li.offsetHeight,
hgt = elements.ul.clientHeight;
@@ -538,12 +548,12 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
}
//-- if results are cached, pull in cached results
if (!$scope.noCache && cache[term]) {
- self.matches = cache[term];
+ ctrl.matches = cache[term];
updateMessages();
} else {
fetchResults(searchText);
}
- if (hasFocus) self.hidden = shouldHide();
+ if (hasFocus) ctrl.hidden = shouldHide();
}
}
diff --git a/src/components/autocomplete/js/autocompleteDirective.js b/src/components/autocomplete/js/autocompleteDirective.js
index 260b850d8d1..879d69a75c0 100644
--- a/src/components/autocomplete/js/autocompleteDirective.js
+++ b/src/components/autocomplete/js/autocompleteDirective.js
@@ -106,7 +106,6 @@ function MdAutocomplete ($mdTheming, $mdUtil) {
return {
controller: 'MdAutocompleteCtrl',
controllerAs: '$mdAutocompleteCtrl',
- link: link,
scope: {
inputName: '@mdInputName',
inputMinlength: '@mdInputMinlength',
@@ -137,17 +136,17 @@ function MdAutocomplete ($mdTheming, $mdUtil) {
role="listbox">\
' + getInputElement() + '\
\