Subversion Repositories SmartDukaan

Rev

Rev 25189 | Rev 25191 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25189 Rev 25190
Line 806... Line 806...
806
    	
806
    	
807
    	$("#logout").click(function(){
807
    	$("#logout").click(function(){
808
    		localStorage.profile = undefined;
808
    		localStorage.profile = undefined;
809
    	});
809
    	});
810
 
810
 
-
 
811
	#if($isAdmin)
-
 
812
	#else
811
	#set($partnerInvestment = $investments.get("investment"))	
813
	#set($partnerInvestment = $investments.get("investment"))	
812
	saleAmount = numberToComma($partnerInvestment.getSalesAmount());
814
	saleAmount = numberToComma($partnerInvestment.getSalesAmount());
813
	minimumInvestmentAmount = numberToComma($partnerInvestment.getMinInvestment());
815
	minimumInvestmentAmount = numberToComma($partnerInvestment.getMinInvestment());
814
	totalInvestedAmount = numberToComma($partnerInvestment.getTotalInvestment());
816
	totalInvestedAmount = numberToComma($partnerInvestment.getTotalInvestment());
815
	shortPercentage = numberToComma($partnerInvestment.getShortPercentage());
817
	shortPercentage = numberToComma($partnerInvestment.getShortPercentage());
Line 818... Line 820...
818
	inStockAmount = numberToComma($partnerInvestment.getInStockAmount());
820
	inStockAmount = numberToComma($partnerInvestment.getInStockAmount());
819
	walletAmount = numberToComma($partnerInvestment.getWalletAmount());
821
	walletAmount = numberToComma($partnerInvestment.getWalletAmount());
820
	shortAmount = numberToComma($partnerInvestment.getShortInvestment());
822
	shortAmount = numberToComma($partnerInvestment.getShortInvestment());
821
	minAmountToBeAdded = numberToComma($partnerInvestment.getMinAmountToBeAdded());
823
	minAmountToBeAdded = numberToComma($partnerInvestment.getMinAmountToBeAdded());
822
 	isInvestmentOk = $isInvestmentOk;
824
 	isInvestmentOk = $isInvestmentOk;
823
      
825
    #end  
824
	$(function(){
826
	$(function(){
825
		if (navigator.geolocation) {
827
		if (navigator.geolocation) {
826
	        navigator.geolocation.getCurrentPosition(showPosition);
828
	        navigator.geolocation.getCurrentPosition(showPosition);
827
	    } else { 
829
	    } else { 
828
	        console.log("Geolocation is not supported by browser.");
830
	        console.log("Geolocation is not supported by browser.");
Line 834... Line 836...
834
		});
836
		});
835
	});
837
	});
836
	
838
	
837
	hasGift=$hasGift;
839
	hasGift=$hasGift;
838
	giftItemId = $giftItemId;
840
	giftItemId = $giftItemId;
839
	$(function() {
-
 
840
		/*var ctx = document.getElementById("weeklyInvestmentSummary").getContext("2d");
-
 
841
		var myChart = new Chart(ctx, investmentChart);*/
-
 
842
	$("#dashboard-paginated .next").on(
-
 
843
			'click',
-
 
844
			function() { 
-
 
845
			console.log("Hello")
-
 
846
			  loadPaginatedNextItems('/getPaginatedNotificationData', null,
-
 
847
						'dashboard-paginated', 'dashboard-paginated-table',
-
 
848
						'dashboard-paginated-container');
-
 
849
			
-
 
850
				$(this).blur();
-
 
851
			});
-
 
852
 
-
 
853
	$("#dashboard-paginated .previous").on(
-
 
854
			'click',
-
 
855
			function() {
-
 
856
			
-
 
857
		   
-
 
858
		     loadPaginatedPreviousItems('/getPaginatedNotificationData', null,
-
 
859
				'dashboard-paginated', 'dashboard-paginated-table',
-
 
860
						'dashboard-paginated-container');
-
 
861
		    
-
 
862
				$(this).blur();
-
 
863
			});
-
 
864
		});	
-
 
865
	</script>
-
 
866
	
-
 
867
		<script>
-
 
868
function initGauge(){
841
 	function initGauge(){
869
	monthDays=$monthDays;
842
		monthDays=$monthDays;
870
	var opts = {
843
		var opts = {
871
	  angle: 0, // The span of the gauge arc
844
		  angle: 0, // The span of the gauge arc
872
	  lineWidth: 0.1, // The line thickness
845
		  lineWidth: 0.1, // The line thickness
873
	  radiusScale: 0.5, // Relative radius
846
		  radiusScale: 0.5, // Relative radius
874
	  pointer: {
847
		  pointer: {
875
	    length: 0.6, // // Relative to gauge radius
848
		    length: 0.6, // // Relative to gauge radius
876
	    strokeWidth: 0.035, // The thickness
849
		    strokeWidth: 0.035, // The thickness
877
	    color: '#000000' // Fill color
850
		    color: '#000000' // Fill color
878
	  },
851
		  },
879
	  limitMax: true,     // If false, max value increases automatically if value > maxValue
852
		  limitMax: true,     // If false, max value increases automatically if value > maxValue
880
	  limitMin: true,     // If true, the min value of the gauge will be fixed
853
		  limitMin: true,     // If true, the min value of the gauge will be fixed
881
	  colorStart: '#6FADCF',   // Colors
854
		  colorStart: '#6FADCF',   // Colors
882
	  colorStop: '#8FC0DA',    // just experiment with them
855
		  colorStop: '#8FC0DA',    // just experiment with them
883
	  strokeColor: '#E0E0E0',  // to see which ones work best for you
856
		  strokeColor: '#E0E0E0',  // to see which ones work best for you
884
	  generateGradient: true,
857
		  generateGradient: true,
885
	  highDpiSupport: true,     // High resolution support
858
		  highDpiSupport: true,     // High resolution support
886
	  staticZones: [
859
		  staticZones: [
887
		   {strokeStyle: "#F03E3E", min: 0, max: 8/monthDays}, // Red from 100 to 130
860
			   {strokeStyle: "#F03E3E", min: 0, max: 8/monthDays}, // Red from 100 to 130
888
		   {strokeStyle: "#FFDD00", min: 8/monthDays, max: 12/monthDays}, // Yellow
861
			   {strokeStyle: "#FFDD00", min: 8/monthDays, max: 12/monthDays}, // Yellow
889
		   {strokeStyle: "#30B32D", min: 12/monthDays, max: 1}, // Green
862
			   {strokeStyle: "#30B32D", min: 12/monthDays, max: 1}, // Green
890
		],
863
			],
891
			  
864
				  
892
	  
865
		  
893
	};
866
		};
894
	var target = document.getElementById('gaugeElement'); // your canvas element
867
		var target = document.getElementById('gaugeElement'); // your canvas element
895
	var gauge = new Gauge(target).setOptions(opts); // create sexy gauge!
868
		var gauge = new Gauge(target).setOptions(opts); // create sexy gauge!
896
	gauge.maxValue = 1; // set max gauge value
869
		gauge.maxValue = 1; // set max gauge value
897
	gauge.setMinValue(0);  // Prefer setter over gauge.minValue = 0
870
		gauge.setMinValue(0);  // Prefer setter over gauge.minValue = 0
898
	gauge.animationSpeed = 32; // set animation speed (32 is default value)
871
		gauge.animationSpeed = 32; // set animation speed (32 is default value)
899
	gauge.set($investments.get("okDays")); // set actual value
872
		gauge.set($investments.get("okDays")); // set actual value
900
		
873
		
901
}
874
	}
902
	$(function(){
875
	$(function(){
903
	
876
	
904
		initGauge();
877
		initGauge();
905
		$("li.accessories").on('click', function(){
878
		$("li.accessories").on('click', function(){
906
			if(!$(this).hasClass('active')) {
879
			if(!$(this).hasClass('active')) {