diff --git a/Gemfile.lock b/Gemfile.lock index bd710ccfa..fbe0a0f03 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.2) + CFPropertyList (3.0.3) activesupport (4.2.11.3) i18n (~> 0.7) minitest (~> 5.1) @@ -16,8 +16,8 @@ GEM json (>= 1.5.1) atomos (0.1.3) aws-eventstream (1.1.0) - aws-partitions (1.399.0) - aws-sdk-core (3.109.3) + aws-partitions (1.402.0) + aws-sdk-core (3.110.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) @@ -25,7 +25,7 @@ GEM aws-sdk-kms (1.39.0) aws-sdk-core (~> 3, >= 3.109.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.85.0) + aws-sdk-s3 (1.86.0) aws-sdk-core (~> 3, >= 3.109.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) @@ -87,7 +87,7 @@ GEM dotenv (2.7.6) emoji_regex (3.2.1) escape (0.0.4) - excon (0.78.0) + excon (0.78.1) faraday (1.1.0) multipart-post (>= 1.2, < 3) ruby2_keywords @@ -97,7 +97,7 @@ GEM faraday_middleware (1.0.0) faraday (~> 1.0) fastimage (2.2.0) - fastlane (2.168.0) + fastlane (2.170.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) aws-sdk-s3 (~> 1.0) diff --git a/app/controllers/companies/edit.js b/app/controllers/companies/edit.js index d99067b28..ee9aecbdf 100644 --- a/app/controllers/companies/edit.js +++ b/app/controllers/companies/edit.js @@ -2,6 +2,11 @@ import Ember from "ember"; export default Ember.Controller.extend({ messageBox: Ember.inject.service(), + + isInvalidCompanyName: Ember.computed("model.company.name", function() { + return this.get("model.company.name").trim().length === 0; + }), + actions: { back() { this.get("model.company").rollbackAttributes(); @@ -10,7 +15,12 @@ export default Ember.Controller.extend({ this.get("model.id") ); }, + updateCompany() { + if (this.get("isInvalidCompanyName")) { + return; + } + let company = this.get("model.company"); let offer = this.get("model"); company.set("name", this.get("model.company.name")); diff --git a/app/controllers/companies/new.js b/app/controllers/companies/new.js index 9f64847a4..59f828218 100644 --- a/app/controllers/companies/new.js +++ b/app/controllers/companies/new.js @@ -4,6 +4,10 @@ export default Ember.Controller.extend({ offerId: Ember.computed.alias("model.id"), messageBox: Ember.inject.service(), + isInvalidCompanyName: Ember.computed("name", function() { + return this.get("name").trim().length === 0; + }), + actions: { back() { this.get("model.company") && @@ -13,8 +17,9 @@ export default Ember.Controller.extend({ this.get("model.id") ); }, + saveCompanyAndOffer() { - if (!this.get("name")) { + if (this.get("isInvalidCompanyName")) { return; } let offer = this.get("model"); diff --git a/app/styles/templates/components/_canned-messages-overlay.scss b/app/styles/templates/components/_canned-messages-overlay.scss index d42d37c86..2512c3653 100644 --- a/app/styles/templates/components/_canned-messages-overlay.scss +++ b/app/styles/templates/components/_canned-messages-overlay.scss @@ -21,7 +21,19 @@ } .clear-search { - margin-right: 5%; + width: 1.5rem; + padding: 0.5rem; + margin-top: -0.5rem; + padding-right: 3rem; + + @media #{$small-only} { + padding-right: 1.5rem; + } + + @media #{$medium-only} { + padding-right: 2rem; + } + } } diff --git a/app/templates/companies/edit.hbs b/app/templates/companies/edit.hbs index 8005b337a..bf6af33a3 100644 --- a/app/templates/companies/edit.hbs +++ b/app/templates/companies/edit.hbs @@ -19,10 +19,12 @@