link: function()

in signature/src/main/webapp/js/directives.js [23:56]


	        link: function(scope, elm, attr) {

	            attr.$observe('statusText', function(val) {
                    var text = "";
                    var status = isNaN(val) ? 0 : parseInt(val);
                    switch(status){
                        case 1:
                            text = "Submitted";
                        break;
                        case 2:
                            text = "Signing";
                        break;
                        case 3:
                            text = "Signed";
                        break;
                        case 4:
                            text = "Rejected";
                        break;
                        case 5:
                            text = "Waiting";
                        break;
                        case 6:
                            text = "Cancelled";
                            break;
                        case 7:
                            text = "Archiving";
                        break;
                        case 8:
                            text = "Archived";
                        break;
                    }
                    elm.html(text);
	            });
	        }