Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ProductTypeImage

  • Loading branch information...
commit 283fd3150166099ddeb325bf7117f56ac2889242 1 parent f721bd6
@ezmilhouse ezmilhouse authored
Showing with 25 additions and 0 deletions.
  1. +25 −0 sprd/view/ProductTypeImage.js
View
25 sprd/view/ProductTypeImage.js
@@ -0,0 +1,25 @@
+define([
+ 'xaml!sprd/view/Image'
+], function (Image) {
+
+ return Image.inherit('app.view.ProductTypeImage', {
+
+ $classAttributes : ['productType'],
+
+ imageUrl : function () {
+ if (this.$.productType) {
+ return this.extendUrlWithSizes(this.$.productType.$.resources[0].href);
+ }
+ return null;
+ }.onChange('width', 'height', 'productType'),
+
+ alt : function () {
+ if (this.$.productType) {
+ return this.$.productType.$.name;
+ }
+ return null;
+ }
+
+ });
+
+});
Please sign in to comment.
Something went wrong with that request. Please try again.