Commit a5b01cb804852ba1122a7ffd39174dd57bd370a6

Authored by Birendra Kumar
1 parent 7be3b80d

Export image bug fixed for new license

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -404,8 +404,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
404 404 }
405 405  
406 406  
407   - // disable export image option for demo and for cross the Image limit
408   - if (result.LicenseInfo.LicenseTypeId == 5 || result.UserExportImageDetail.isExportImage == false) {
  407 + // disable export image option for demo account
  408 + if (result.LicenseInfo.LicenseTypeId == 5 ) {
409 409 $rootScope.exportImage = "exportImage";
410 410 }
411 411  
... ... @@ -693,10 +693,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
693 693 }
694 694  
695 695  
696   - // disable export image option for demo and for cross the Image limit
697   - if(result.LicenseInfo.LicenseTypeId==5 || result.UserExportImageDetail.isExportImage==false)
  696 + // disable export image option for demo account
  697 + if(result.LicenseInfo.LicenseTypeId==5)
698 698 {
699   - $rootScope.exportImage = "disableSubMenu";
  699 + $rootScope.exportImage = "exportImage";
700 700 }
701 701  
702 702 $rootScope.userData = result;
... ... @@ -5429,25 +5429,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5429 5429  
5430 5430 };
5431 5431  
5432   - $rootScope.ShowExportImageWindow = function () {
5433   -
5434   - var $ua = navigator.userAgent;
5435   - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
5436   - $(".export-image-ipad").modal("show").draggable({ handle: ".modal-header" });
5437   -
5438   - $(".modal-backdrop").css("opacity", ".5");
5439   - $(".modal-backdrop").css("z-index", "1200001");
5440   - }
5441   - else {
5442   - $(".export-image").modal("show").draggable({ handle: ".modal-header" });
5443   -
5444   - $(".modal-backdrop").css("opacity", ".5");
5445   - $(".modal-backdrop").css("z-index", "1200001");
5446   - }
5447   - };
5448   -
5449   -
5450   -
  5432 +
5451 5433 $rootScope.ShowPrintWindow = function () { // Print Active Viewer
5452 5434 html2canvas($("#canvasDiv"), {
5453 5435 onrendered: function (canvas) {
... ... @@ -5828,7 +5810,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5828 5810 'Title': null,
5829 5811 'ModuleName': null,
5830 5812 'ImageName': null,
5831   - 'OriginalFileName': null
  5813 + 'OriginalFileName': null,
  5814 + 'LimitOverMessage': 'This License has exceeded the maximum limit of export image.<br>Please contact administrator.'
5832 5815  
5833 5816 });
5834 5817  
... ... @@ -5884,6 +5867,42 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5884 5867  
5885 5868 }
5886 5869  
  5870 + $rootScope.ShowExportImageWindow = function () {
  5871 +
  5872 + var userid = $rootScope.userData.Id;
  5873 + var isExportedImage = $scope.GetUserExportImageData(userid, 'isExportImage');
  5874 +
  5875 + if (isExportedImage)
  5876 + {
  5877 + var $ua = navigator.userAgent;
  5878 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  5879 + $(".export-image-ipad").modal("show").draggable({ handle: ".modal-header" });
  5880 +
  5881 + $(".modal-backdrop").css("opacity", ".5");
  5882 + $(".modal-backdrop").css("z-index", "1200001");
  5883 + }
  5884 + else
  5885 + {
  5886 + $(".export-image").modal("show").draggable({ handle: ".modal-header" });
  5887 +
  5888 + $(".modal-backdrop").css("opacity", ".5");
  5889 + $(".modal-backdrop").css("z-index", "1200001");
  5890 + }
  5891 +
  5892 + }
  5893 + else
  5894 + {
  5895 + var exptAlertMessage = $scope.GetUserExportImageData(userid, 'LimitOverMessage');
  5896 +
  5897 + $(".export-image-message").modal("show").draggable({ handle: ".modal-header" });
  5898 +
  5899 + $(".modal-backdrop").css("opacity", ".5");
  5900 + $(".modal-backdrop").css("z-index", "1200001");
  5901 + document.getElementById("expMessage").innerHTML = exptAlertMessage;
  5902 +
  5903 + }
  5904 +
  5905 + };
5887 5906  
5888 5907 $rootScope.SaveImagefile = function () {
5889 5908 $("#canvasDiv").append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
... ... @@ -5924,10 +5943,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5924 5943 $scope.UpdateUserExportImageData(userid,'isExportImage',result.isExportImage);
5925 5944  
5926 5945 // disable export image option when export Image limit over
5927   - if(result.isExportImage==false)
5928   - {
5929   - $rootScope.exportImage = "disableSubMenu";
5930   - }
  5946 + //if(result.isExportImage==false)
  5947 + //{
  5948 + // $rootScope.exportImage = "exportImage";
  5949 + //}
5931 5950 }
5932 5951  
5933 5952 }),
... ...
400-SOURCECODE/AIAHTML5.Web/index.aspx
... ... @@ -1120,6 +1120,36 @@
1120 1120 </div>
1121 1121 </div>
1122 1122 </div>
  1123 +
  1124 + <!--Export Image Alert Model-->
  1125 + <div class="modal fade export-image-message ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  1126 + style="z-index: 1200002;">
  1127 + <div class="modal-dialog modal-sm" role="document" style="width: 450px;">
  1128 + <div class="modal-content">
  1129 + <div class="modal-header annotation-modal-header ui-draggable-handle">
  1130 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  1131 + <h4 class="modal-title" id="">Alert Message!</h4>
  1132 + </div>
  1133 + <div class="modal-body">
  1134 + <div class="row paddTopbtm15">
  1135 + <div class="col-sm-12">
  1136 + <div class="form-group">
  1137 + <label id="expMessage" style="font-weight:normal"></label>
  1138 + </div>
  1139 + </div>
  1140 + </div>
  1141 +
  1142 + </div>
  1143 + <div class="modal-footer">
  1144 + <div class="row">
  1145 + <div class="col-sm-12"><button id="btnAlert" class="btn btn-primary" data-dismiss="modal" type="button">Ok</button></div>
  1146 + </div>
  1147 + </div>
  1148 +
  1149 + </div>
  1150 + </div>
  1151 + </div>
  1152 +
1123 1153 <!--Print Active Viewer-->
1124 1154 <div class="print-box-active portrait-box-active" id="printBox" style="display: none;">
1125 1155 <div id="printDivContent">
... ...