From: aditya-nambiar Date: Sat, 14 Jun 2014 19:05:41 +0000 (-0400) Subject: Disabling Works X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=82aa3267818548e679bcf8e985ec45d73acba5f3;p=civicrm-core.git Disabling Works --- diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 697c87de92..fccb824c92 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -63,12 +63,18 @@ link: function(scope, element, attrs) { $(element).parent().parent().parent().tabs(scope.$eval(attrs.nexttab)); - //$(element).parent().parent().parent().tabs({disabled:[1,2,3]}); + var myarr = new Array(1,2,3) + $(element).parent().parent().parent().tabs({disabled:myarr}); //$(element).parent().parent().parent().tabs({"enable":1}); $(element).on("click",function() { scope.adi=scope.adi +1; - // $(element).parent().parent().parent().tabs({"enable":scope.adi}); + var myArray1 = new Array( ); + for ( var i = scope.adi+1; i < 4; i++ ) { + myArray1.push(i); + console.log( "try " + i ); + } + $(element).parent().parent().parent().tabs( "option", "disabled", myArray1 ); $(element).parent().parent().parent().tabs({active:scope.adi}); console.log("adiroxxx"); });