diff --git a/app/scripts/controllers/main.js b/app/scripts/controllers/main.js index 736d1ea..e5a2f13 100644 --- a/app/scripts/controllers/main.js +++ b/app/scripts/controllers/main.js @@ -9,7 +9,7 @@ define(['app'], function (app) { $scope.designPartText = 'views/design_part/text.html?ver='+VERSION; $scope.designPartDefault = 'views/design_part/default.html?ver='+VERSION; var currentTShirtKey = 0; - var placeTShirt; + var placeTShirtKey = ''; var tShirtColorFirstKey = 0; $scope.tShirtChoiceBackFrontKey = 'front'; $scope.tShirtColorKey = tShirtColorFirstKey; @@ -23,7 +23,8 @@ define(['app'], function (app) { if(typeof _routeParams.tShirt != 'undefined') currentTShirtKey = _routeParams.tShirt - 1; if(typeof _routeParams.place != 'undefined') - placeTShirt = _routeParams.place; + placeTShirtKey = _routeParams.place; + console.log(placeTShirtKey); /** @@ -31,6 +32,8 @@ define(['app'], function (app) { * @param: id * @return: object */ + $scope.placeTshirt = $t_shirt.getTShirtPlace(currentTShirtKey, placeTShirtKey); + console.log($scope.placeTshirt); $scope.tShirtColor = $t_shirt.getTShirtColor(currentTShirtKey); $rootScope.tShirtColorCode = $scope.tShirtColor[tShirtColorFirstKey].code; $scope.tShirtColorName = $scope.tShirtColor[tShirtColorFirstKey].name; diff --git a/app/scripts/services/tshirt.js b/app/scripts/services/tshirt.js index 1405329..35f95d7 100644 --- a/app/scripts/services/tshirt.js +++ b/app/scripts/services/tshirt.js @@ -12,15 +12,15 @@ define(['app'], function (app) { image: '' }, place_design: { - 'place_1' : { + place_1 : { 'face' : 'front', 'place' : 't_shirt_p_1' }, - 'place_2' : { - 'face' : 'front', + place_2 : { + 'face' : 'back', 'place' : 't_shirt_p_2' }, - 'place_3' : { + place_3 : { 'face' : 'front', 'place' : 't_shirt_p_3' } @@ -60,7 +60,16 @@ define(['app'], function (app) { gender: '', image: '' }, - place_design: {}, + place_design: { + place_1 : { + 'face' : 'front', + 'place' : 't_shirt_p_1' + }, + place_2 : { + 'face' : 'front', + 'place' : 't_shirt_p_2' + } + }, color: [ { name: 'color:03 GRAY', @@ -146,10 +155,10 @@ define(['app'], function (app) { return DATA[key]['color']; }, getTShirtPlace : function(key, place) { - if(typeof DATA[key].place_design.place == 'undefined' || typeof DATA[key].place_design.place == 'null') + if(typeof DATA[key].place_design[place] == 'undefined' || typeof DATA[key].place_design[place] == 'null') return []; - return DATA[key].place_design.place; + return DATA[key].place_design[place]; }, getAll: function(){ diff --git a/app/styles/main.css b/app/styles/main.css index 807d6b3..cdf275c 100644 --- a/app/styles/main.css +++ b/app/styles/main.css @@ -1,6 +1,7 @@ /* Space out content a bit */ @import "../fonts/font.css"; @import "../fonts/font_canvas/font-canvas.css"; +@import "placedesign.css"; html{ height:100%; width:100%; @@ -323,20 +324,6 @@ aside .step .finish-design button{ width: 100%; } -#preview-design { - position: absolute; - width: 190px; - height: 200px; - border: dashed 2px #DDD; - top: 180px; - /*left: 200px;*/ - cursor: pointer; -} - -#preview-design img { - width: 150px; -} - #tshirt-content .tshirt-choice{ } @@ -807,18 +794,11 @@ footer ul.nav-footer li a{ } @media (max-width: 1200px) { - #preview-design { - left: 155px; - } + } @media (max-width: 990px) { - #preview-design { - /*left: 115px;*/ - width: 110px; - height: 160px; - top: 110px; - } + } @media (max-width: 762px) and (min-width: 600px) { diff --git a/app/styles/placedesign.css b/app/styles/placedesign.css new file mode 100644 index 0000000..e39cc97 --- /dev/null +++ b/app/styles/placedesign.css @@ -0,0 +1,32 @@ +#preview-design { + position: absolute; + width: 190px; + height: 200px; + border: dashed 2px #DDD; + top: 180px; + /*left: 200px;*/ + cursor: pointer; +} + +#preview-design img { + width: 150px; +} + +@media (max-width: 1200px) { + #preview-design { + left: 155px; + } +} + +@media (max-width: 990px) { + #preview-design { + /*left: 115px;*/ + width: 110px; + height: 160px; + top: 110px; + } +} + +.t_shirt_p_1{ + +} \ No newline at end of file diff --git a/app/views/main.html b/app/views/main.html index 520116a..490798a 100644 --- a/app/views/main.html +++ b/app/views/main.html @@ -149,7 +149,7 @@
-
+