diff options
| author | Jules Laplace <jules@okfoc.us> | 2017-04-02 18:56:39 +0200 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2017-04-02 18:56:52 +0200 |
| commit | 4e0a5729f0437902f83ada7033625c359bf88ab6 (patch) | |
| tree | 02ddfeafe4f45898ec23c1bdf69501a9967fe9fa /StoneIsland/www/js/lib/products/ProductView.js | |
| parent | 130870e76a8173b1e2563b93ce8a01bdc3fd7d46 (diff) | |
make product title wider if it is long
Diffstat (limited to 'StoneIsland/www/js/lib/products/ProductView.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ProductView.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 1c05c629..a261218d 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -16,6 +16,7 @@ var ProductView = ScrollableView.extend({ this.gallery = new GalleryView () this.scroller = new IScroll('#product', app.iscroll_options) + this.$productHeader = this.$(".product-header") this.$num = this.$(".num") this.$title = this.$(".title") this.$type = this.$(".type") @@ -169,6 +170,8 @@ var ProductView = ScrollableView.extend({ this.$type.html(type) this.$price.html(price) this.$body.html(body) + + this.$productHeader.toggleClass("wide", title.length > 30) var fits_large = !! this.fitLargeCodes[this.code] app.product.$fit.toggle( fits_large ) |
