-
-
Save mainyaa/65de1deaed72c1be5f9f to your computer and use it in GitHub Desktop.
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
diff --git c/Gruntfile.js w/Gruntfile.js | |
index ceb2da6..616c010 100644 | |
--- c/Gruntfile.js | |
+++ w/Gruntfile.js | |
@@ -333,6 +333,17 @@ module.exports = function (grunt) { | |
'styles/fonts/*' | |
] | |
}, { | |
+ // app/bower_components/{polymer,core-*,paper-*} -> static/views/elemnets | |
+ expand: true, | |
+ dot: true, | |
+ cwd: '<%= yeoman.app %>/bower_components', | |
+ dest: '<%= yeoman.dist %>/elements', | |
+ src: [ | |
+ 'polymer/*.{html,js,map,css,png,svg}', | |
+ 'core-*/*.{html,js,map,css,png,svg}', | |
+ 'paper-*/*.{html,js,map,css,png,svg}' | |
+ ] | |
+ }, { | |
// view/index.html -> /index.html | |
expand: true, | |
cwd: '<%= yeoman.app %>/views', | |
@@ -529,6 +540,22 @@ module.exports = function (grunt) { | |
commitFiles: ['package.json', 'bower.json'], | |
pushTo: 'origin' | |
} | |
+ }, | |
+ vulcanize: { | |
+ server: { | |
+ options: { | |
+ csp: true, | |
+ excludes: { | |
+ imports: [ | |
+ "elements/paper-button/paper-button.html", | |
+ "elements/paper-checkbox/paper-checkbox.html" | |
+ ] | |
+ } | |
+ }, | |
+ files: { | |
+ '<%= yeoman.dist %>/elements/elements-build.html': '<%= yeoman.dist %>/elements.html' | |
+ }, | |
+ } | |
} | |
}); | |
@@ -570,6 +597,7 @@ module.exports = function (grunt) { | |
'cssmin', | |
'uglify', | |
'usemin', | |
+ 'vulcanize', | |
'string-replace:dev', | |
'string-replace:style' | |
]); | |
@@ -588,6 +616,7 @@ module.exports = function (grunt) { | |
'cssmin', | |
'uglify', | |
'usemin', | |
+ 'vulcanize', | |
'string-replace:dev', | |
'string-replace:style' | |
]); | |
diff --git c/app/elements.html w/app/elements.html | |
new file mode 100644 | |
index 0000000..afb3f39 | |
--- /dev/null | |
+++ w/app/elements.html | |
@@ -0,0 +1,4 @@ | |
+<!DOCTYPE html> | |
+<link rel="import" href="elements/paper-button/paper-button.html"> | |
+<link rel="import" href="elements/paper-checkbox/paper-checkbox.html"> | |
+ | |
diff --git c/app/prepare.html w/app/prepare.html | |
index 40d6b86..a2ab228 100644 | |
--- c/app/prepare.html | |
+++ w/app/prepare.html | |
@@ -32,6 +32,7 @@ | |
<!-- build:js({.tmp,app}) scripts/vendors.js --> | |
<script src="bower_components/jquery/dist/jquery.min.js"></script> | |
+ <script src="bower_components/platform/platform.js"></script> | |
<script src="bower_components/angular/angular.min.js"></script> | |
<script src="bower_components/pubnub/web/pubnub.min.js"></script> | |
<script src="bower_components/lodash/dist/lodash.compat.js"></script> | |
diff --git c/app/scripts/bizmsg/controllers/signinController.coffee w/app/scripts/bizmsg/controllers/signinController.coffee | |
index 59b181d..6ebbe1e 100644 | |
--- c/app/scripts/bizmsg/controllers/signinController.coffee | |
+++ w/app/scripts/bizmsg/controllers/signinController.coffee | |
@@ -60,6 +60,7 @@ class SigninCtrl | |
# ログイン | |
signin: (form) => | |
+ return if form.$invalid | |
params = _.pick @$scope.user, ['mail', 'code'] | |
params.platform = 'web' | |
@@ -78,6 +79,7 @@ class SigninCtrl | |
# ユーザー登録&認証コード送信 | |
signup: (form) => | |
+ return if form.$invalid | |
params = _.pick @$scope.user, ['mail', 'firstName', 'lastName', 'firstNamePhonetic', 'lastNamePhonetic'] | |
@usersService.post(params).then( | |
(success) => | |
diff --git c/app/styles/bizmsg/app.scss w/app/styles/bizmsg/app.scss | |
index 91fc9ad..83cb9d3 100644 | |
--- c/app/styles/bizmsg/app.scss | |
+++ w/app/styles/bizmsg/app.scss | |
@@ -19,6 +19,7 @@ | |
@import | |
"module/main", | |
+ "module/paper-button", | |
"module/signin", | |
"module/footer", | |
"module/navbar", | |
diff --git c/app/styles/bizmsg/module/_main.scss w/app/styles/bizmsg/module/_main.scss | |
index 400014f..808bb35 100644 | |
--- c/app/styles/bizmsg/module/_main.scss | |
+++ w/app/styles/bizmsg/module/_main.scss | |
@@ -100,6 +100,7 @@ button { | |
background: $color-button-disable; | |
} | |
} | |
+ | |
img { | |
user-select: none; | |
} | |
diff --git c/app/styles/bizmsg/module/_paper-button.scss w/app/styles/bizmsg/module/_paper-button.scss | |
new file mode 100644 | |
index 0000000..04a5db2 | |
--- /dev/null | |
+++ w/app/styles/bizmsg/module/_paper-button.scss | |
@@ -0,0 +1,30 @@ | |
+ | |
+paper-button.theme-blue { | |
+ margin: 0; | |
+ padding: 0; | |
+ border: solid 1px $color-button-primary; | |
+ border-radius: $global-radius; | |
+ height: 38px; | |
+ line-height: 38px; | |
+ outline: none; | |
+ color: $color-background; | |
+ background: $color-button-primary; | |
+ font-size: 1.4rem; | |
+ text-align: center; | |
+ user-select: none; | |
+ | |
+ &::shadow #content > span { | |
+ margin: 0; | |
+ } | |
+ | |
+ &:hover, &:focus, &:active { | |
+ border-color: $color-button-primary-active; | |
+ background: $color-button-primary-active; | |
+ } | |
+ | |
+ &[disabled] { | |
+ border-color: $color-button-disable; | |
+ background: $color-button-disable; | |
+ } | |
+} | |
+ | |
diff --git c/app/styles/bizmsg/module/_signin.scss w/app/styles/bizmsg/module/_signin.scss | |
index ab2e71d..72490db 100644 | |
--- c/app/styles/bizmsg/module/_signin.scss | |
+++ w/app/styles/bizmsg/module/_signin.scss | |
@@ -76,6 +76,13 @@ | |
font-size: 2rem; | |
} | |
+ paper-button.theme-blue { | |
+ width: 100%; | |
+ height: 58px; | |
+ line-height: 58px; | |
+ font-size: 2rem; | |
+ } | |
+ | |
.signin-form-button-signup { | |
height: auto; | |
min-height: 58px; | |
diff --git c/app/views/index.html w/app/views/index.html | |
index cc07d2b..9fe9cf0 100644 | |
--- c/app/views/index.html | |
+++ w/app/views/index.html | |
@@ -29,6 +29,7 @@ | |
<!--<![endif]--> | |
<script src="/scripts/vendors.js?<%= version =>"></script> | |
+ <link rel="import" href="/elements/elements-build.html"> | |
<script src="/scripts/bizmsg.js?<%= version =>"></script> | |
<!-- devcode: !production --> | |
<script src="//localhost:35729/livereload.js"></script> | |
diff --git c/app/views/signup_code.html w/app/views/signup_code.html | |
index dafa9b2..ca30872 100644 | |
--- c/app/views/signup_code.html | |
+++ w/app/views/signup_code.html | |
@@ -11,10 +11,10 @@ | |
</div> | |
<div class="signin-form-field" ng-hide="isSignin"> | |
<p><a href="" data-reveal-id="termsModal">利用規約・プライバシーポリシー</a></p> | |
- <button class="signin-form-button-signup" ng-disabled="signupCode.$invalid">利用規約およびプライバシーポリシーに同意して登録</button> | |
+ <paper-button class="theme-blue" role="submit" ng-disabled="signupCode.$invalid" label="利用規約およびプライバシーポリシーに同意して登録" ng-click="signin(signupCode)"></paper-button> | |
</div> | |
<div class="signin-form-field" ng-show="isSignin"> | |
- <button ng-disabled="signupCode.$invalid">ログイン</button> | |
+ <paper-button class="theme-blue" role="submit" ng-disabled="signupCode.$invalid" label="ログイン" ng-click="signin(signupCode)"></paper-button> | |
</div> | |
</form> | |
<div class="signin-box-footer"> | |
@@ -27,7 +27,7 @@ | |
<p>アカウントが登録されました!</p> | |
<div class="layout-signin-form"> | |
<div class="signin-form-field"> | |
- <button ng-click="goHomeAndReload()">チャット画面へ進む</button> | |
+ <paper-button class="theme-blue" role="submit" label="チャット画面へ進む" ng-click="goHomeAndReload()"></paper-button> | |
</div> | |
</div> | |
</div> | |
diff --git c/app/views/signup_mail.html w/app/views/signup_mail.html | |
index deaa826..ad18d66 100644 | |
--- c/app/views/signup_mail.html | |
+++ w/app/views/signup_mail.html | |
@@ -7,7 +7,7 @@ | |
<p class="signin-form-error" ng-show="signinForm.mail.$error.notFreeMail">このメールアドレスは利用できません</p> | |
</div> | |
<div class="signin-form-field"> | |
- <button type="submit" ng-disabled="signinForm.$invalid">認証コードを送信</button> | |
+ <paper-button class="theme-blue" role="button" ng-disabled="signinForm.$invalid" label="認証コードを送信" ng-click="attempt(signinForm)"></paper-button> | |
</div> | |
</form> | |
</div> | |
diff --git c/app/views/signup_name.html w/app/views/signup_name.html | |
index 751d2d1..6c3e57c 100644 | |
--- c/app/views/signup_name.html | |
+++ w/app/views/signup_name.html | |
@@ -25,7 +25,7 @@ | |
<p class="signin-form-error" ng-show="(signupName.lastNamePhonetic.$dirty && signupName.lastNamePhonetic.$invalid) || (signupName.firstNamePhonetic.$dirty && signupName.firstNamePhonetic.$invalid)">ふりがなはひらがなでご入力ください</p> | |
</div> | |
<div class="signin-form-field"> | |
- <button type="submit" ng-disabled="signupName.$invalid">次へ</button> | |
+ <paper-button class="theme-blue" role="button" ng-disabled="signupName.$invalid" label="次へ" ng-click="signup(signupName)"></paper-button> | |
</div> | |
</form> | |
</div> | |
diff --git c/bower.json w/bower.json | |
index d360c9c..be65327 100644 | |
--- c/bower.json | |
+++ w/bower.json | |
@@ -22,7 +22,10 @@ | |
"angular-moment": "~0.5.2", | |
"angular-lodash": "*", | |
"visibilityjs": "~1.2.1", | |
- "angular-smooth-scroll": "git://github.com/d-oliveros/angular-smooth-scroll.git" | |
+ "angular-smooth-scroll": "git://github.com/d-oliveros/angular-smooth-scroll.git", | |
+ "polymer": "Polymer/polymer#~0.3.3", | |
+ "core-elements": "Polymer/core-elements#~0.3.3", | |
+ "paper-elements": "Polymer/paper-elements#~0.3.3" | |
}, | |
"devDependencies": { | |
"angular-mocks": "1.2.14", | |
diff --git c/package.json w/package.json | |
index 9aa860d..fe1aa87 100644 | |
--- c/package.json | |
+++ w/package.json | |
@@ -7,60 +7,61 @@ | |
}, | |
"dependencies": {}, | |
"devDependencies": { | |
- "coffee-script": "~1.7.1", | |
- "mocha": "~1.17.1", | |
"bower": "~1.2.8", | |
+ "chai-jquery": "~1.1.2", | |
+ "coffee-script": "~1.7.1", | |
"grunt": "~0.4.2", | |
- "grunt-contrib-copy": "~0.5.0", | |
- "grunt-contrib-concat": "~0.3.0", | |
+ "grunt-autoprefixer": "~0.6.5", | |
+ "grunt-bump": "0.0.13", | |
+ "grunt-concurrent": "~0.4.3", | |
+ "grunt-connect-rewrite": "^0.2.1", | |
+ "grunt-contrib-clean": "~0.5.0", | |
"grunt-contrib-coffee": "~0.10.0", | |
- "grunt-contrib-uglify": "~0.3.2", | |
- "grunt-contrib-jshint": "~0.8.0", | |
- "grunt-contrib-cssmin": "~0.7.0", | |
+ "grunt-contrib-concat": "~0.3.0", | |
"grunt-contrib-connect": "~0.6.0", | |
- "grunt-contrib-clean": "~0.5.0", | |
+ "grunt-contrib-copy": "~0.5.0", | |
+ "grunt-contrib-cssmin": "~0.7.0", | |
"grunt-contrib-htmlmin": "~0.1.3", | |
"grunt-contrib-imagemin": "~0.2.0", | |
+ "grunt-contrib-jshint": "~0.8.0", | |
+ "grunt-contrib-uglify": "~0.3.2", | |
"grunt-contrib-watch": "~0.5.3", | |
- "grunt-sass": "~0.12.1", | |
- "grunt-autoprefixer": "~0.6.5", | |
- "grunt-usemin": "~2.0.2", | |
- "grunt-svgmin": "~0.3.1", | |
- "grunt-rev": "~0.1.0", | |
- "grunt-concurrent": "~0.4.3", | |
+ "grunt-conventional-changelog": "~1.1.0", | |
"grunt-devcode": "0.0.4-c", | |
+ "grunt-docco2": "~0.1.5", | |
"grunt-google-cdn": "~0.2.2", | |
- "grunt-ngmin": "~0.0.3", | |
"grunt-html2js": "~0.2.4", | |
- "grunt-conventional-changelog": "~1.1.0", | |
- "grunt-docco2": "~0.1.5", | |
- "grunt-styledocco": "~0.1.2", | |
- "load-grunt-tasks": "~0.3.0", | |
- "time-grunt": "~0.2.9", | |
"grunt-karma": "~0.8.0", | |
+ "grunt-newer": "^0.7.0", | |
+ "grunt-ngmin": "~0.0.3", | |
+ "grunt-plato": "~0.2.1", | |
+ "grunt-rev": "~0.1.0", | |
+ "grunt-s3": "~0.2.0-alpha.3", | |
+ "grunt-sass": "~0.12.1", | |
+ "grunt-string-replace": "~0.2.7", | |
+ "grunt-styledocco": "~0.1.2", | |
+ "grunt-svgmin": "~0.3.1", | |
+ "grunt-usemin": "~2.0.2", | |
+ "grunt-vulcanize": "^0.3.0", | |
"karma": "~0.12.8", | |
- "karma-ng-scenario": "~0.1.0", | |
- "karma-script-launcher": "~0.1.0", | |
- "karma-firefox-launcher": "~0.1.0", | |
+ "karma-chai": "0.0.2", | |
+ "karma-chai-jquery": "~0.1.0", | |
+ "karma-chai-plugins": "~0.1.3", | |
"karma-chrome-launcher": "~0.1.0", | |
- "karma-html2js-preprocessor": "~0.1.0", | |
- "karma-requirejs": "~0.2.1", | |
"karma-coffee-preprocessor": "git+https://github.com/johanneswuerbach/karma-coffee-preprocessor#patch-1", | |
- "karma-phantomjs-launcher": "~0.1.0", | |
- "karma-ng-html2js-preprocessor": "~0.1.0", | |
+ "karma-coverage": "git+https://github.com/mainyaa/karma-coverage.git#update-dependencies", | |
+ "karma-firefox-launcher": "~0.1.0", | |
+ "karma-html2js-preprocessor": "~0.1.0", | |
"karma-mocha": "~0.1.1", | |
- "karma-chai": "0.0.2", | |
+ "karma-ng-html2js-preprocessor": "~0.1.0", | |
+ "karma-ng-scenario": "~0.1.0", | |
+ "karma-phantomjs-launcher": "~0.1.0", | |
+ "karma-requirejs": "~0.2.1", | |
+ "karma-script-launcher": "~0.1.0", | |
"karma-sinon-chai": "~0.1.1", | |
- "karma-coverage": "git+https://github.com/mainyaa/karma-coverage.git#update-dependencies", | |
- "chai-jquery": "~1.1.2", | |
- "karma-chai-jquery": "~0.1.0", | |
- "karma-chai-plugins": "~0.1.3", | |
- "grunt-string-replace": "~0.2.7", | |
- "grunt-s3": "~0.2.0-alpha.3", | |
- "grunt-bump": "0.0.13", | |
- "grunt-plato": "~0.2.1", | |
- "grunt-connect-rewrite": "^0.2.1", | |
- "grunt-newer": "^0.7.0" | |
+ "load-grunt-tasks": "~0.3.0", | |
+ "mocha": "~1.17.1", | |
+ "time-grunt": "~0.2.9" | |
}, | |
"engines": { | |
"node": ">=0.8.0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment