Blame view

app/scripts/controllers/main.js 712 Bytes
c87bc1f33   TRUONG   first commit: ini...
1
2
  define(['app'], function (app) {
  	'use strict';
6f105dbd5   Truong LD   add source code i...
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  	app.controller('MainCtrl', function ($scope, $illustration) {
  		$scope.showIllustration = function(tab){
  			$scope.isShowLeftPanel = tab;
  			switch (tab){
  				case 'illustration': {
  					$scope.IllustrationList = $illustration.getAll();
  					$scope.illustrationSelectConfig = {
  						allowClear:true
  					}
  					break;
  				}
  				// case: ''
  			}
  		}
87c93a029   Dang YoungWorld   add modal
17
18
  		$scope.modalTShirtDesign = function() {
  			// console.log($('#tshirt-design').length);
5fe93ca88   Dang YoungWorld   Theme modal
19
20
21
22
23
24
  			$('#tshirt-design').modal(
  				{
  					backdrop: 'static',
  					keyboard: false
  				}
  			);
6f105dbd5   Truong LD   add source code i...
25
  			$scope.showIllustration('default');
5fe93ca88   Dang YoungWorld   Theme modal
26
27
28
  		};
  		$scope.modalClose = function(){
  			$('#tshirt-design').modal('hide');
87c93a029   Dang YoungWorld   add modal
29
  		}
c87bc1f33   TRUONG   first commit: ini...
30
31
  	});
  });