Commit 563757505ba11aa7ecc64197ad7ed16a83ce65fe

Authored by Nikita Kulshreshtha
2 parents 8e1bb7e7 f613b5aa

Merge branch 'slidertextboxannotationmodel' into Develop

400-SOURCECODE/AIAHTML5.Web/app/views/da/da-body-view-list.html
@@ -28,17 +28,7 @@ @@ -28,17 +28,7 @@
28 28
29 <script> 29 <script>
30 $(function () { 30 $(function () {
31 - $("#slider-range-min-2").slider({  
32 - range: "min",  
33 - min: 1,  
34 - max: 60,  
35 - value: 10,  
36 - slide: function (event, ui) {  
37 - $("#amount-2").val(ui.value);  
38 - }  
39 - });  
40 - $("#amount-2").val($("#slider-vertical-2").slider("value"));  
41 - 31 +
42 $(function () { 32 $(function () {
43 $('[data-toggle="tooltip"]').tooltip(); 33 $('[data-toggle="tooltip"]').tooltip();
44 }) 34 })
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
@@ -514,16 +514,7 @@ @@ -514,16 +514,7 @@
514 514
515 515
516 516
517 - $("#slider-range-min-2").slider({  
518 - range: "min",  
519 - min: 1,  
520 - max: 60,  
521 - value: 10,  
522 - slide: function (event, ui) {  
523 - $("#amount-2").val(ui.value);  
524 - }  
525 - });  
526 - $("#amount-2").val($("#slider-vertical-2").slider("value")); 517 +
527 }); 518 });
528 </script> 519 </script>
529 <script> 520 <script>
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
@@ -59,17 +59,7 @@ @@ -59,17 +59,7 @@
59 59
60 <script> 60 <script>
61 $(function () { 61 $(function () {
62 - $("#slider-range-min-2").slider({  
63 - range: "min",  
64 - min: 1,  
65 - max: 60,  
66 - value: 10,  
67 - slide: function (event, ui) {  
68 - $("#amount-2").val(ui.value);  
69 - }  
70 - });  
71 - $("#amount-2").val($("#slider-vertical-2").slider("value"));  
72 - 62 +
73 $(function () { 63 $(function () {
74 $('[data-toggle="tooltip"]').tooltip(); 64 $('[data-toggle="tooltip"]').tooltip();
75 }) 65 })
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -520,7 +520,26 @@ @@ -520,7 +520,26 @@
520 <div> 520 <div>
521 <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" id="paintLine" data-toggle="tooltip" data-placement="top" title="Paint" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></button> 521 <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" id="paintLine" data-toggle="tooltip" data-placement="top" title="Paint" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></button>
522 <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" data-toggle="tooltip" data-placement="top" title="Erase" ng-click="EraseDrawing()"><i class="fa fa-eraser"></i></button>&nbsp; 522 <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" data-toggle="tooltip" data-placement="top" title="Erase" ng-click="EraseDrawing()"><i class="fa fa-eraser"></i></button>&nbsp;
523 - <div class="marginL2 pull-left"><input type="number" id="amount-2" step="1" style="width:60px;height:21px;" min="1" max="60" oninput="Brushsize(this)"></div>&nbsp; 523 + <div style="width: 80px; margin: 0px 0px 0px 4px; display: inline-block;float:left;">
  524 + <div style="width: 58px; float: left;">
  525 + <input type="text" id="btnBrushSize" class="form-control" value="1" style="height:32px;border-radius:0;" oninput="Brushsize(this)">
  526 + </div>
  527 + <div style="width: 22px; float: left;">
  528 + <div style="width: 100%; float: left; height: 16px;">
  529 + <button type="button" id="btnBrushSizeIncrement" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
  530 +
  531 + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png">
  532 + </button>
  533 + </div>
  534 + <div style="width: 100%; float: left; height: 16px;">
  535 + <button type="button" id="btnBrushSizeDecrease" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
  536 + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png">
  537 + </button>
  538 + </div>
  539 + </div>
  540 +
  541 + </div>
  542 +
524 <div class="pull-left" style="width:45%; margin-left:2%;margin-top:5px;"> 543 <div class="pull-left" style="width:45%; margin-left:2%;margin-top:5px;">
525 <div id="slider-range-min-2"></div> 544 <div id="slider-range-min-2"></div>
526 </div> 545 </div>
@@ -1074,22 +1093,19 @@ @@ -1074,22 +1093,19 @@
1074 <script> 1093 <script>
1075 function Brushsize(object) { 1094 function Brushsize(object) {
1076 1095
1077 - if (parseInt(object.value) == 0) {  
1078 - //object.value = 0;  
1079 - object.value = object.value.slice(0, 0);  
1080 -  
1081 - }  
1082 -  
1083 - if (parseInt(object.value) <= parseInt(object.max)) {  
1084 - 1096 + object.value = object.value.replace(/[^0-9]/g, '');
  1097 + if (parseInt(object.value) <= 0) {
  1098 + object.value =1;
  1099 + }
  1100 + if (parseInt(object.value)>=1 && parseInt(object.value) <= 60) {
1085 object.value = object.value; 1101 object.value = object.value;
1086 -  
1087 -  
1088 } 1102 }
1089 - else { 1103 + if(parseInt(object.value) > 60)
  1104 + {
1090 object.value = object.value.slice(0, 1); 1105 object.value = object.value.slice(0, 1);
1091 - 1106 +
1092 } 1107 }
  1108 +
1093 } 1109 }
1094 </script> 1110 </script>
1095 1111
@@ -1153,11 +1169,10 @@ @@ -1153,11 +1169,10 @@
1153 range: "min", 1169 range: "min",
1154 min: 1, 1170 min: 1,
1155 max: 60, 1171 max: 60,
1156 - value: 10, 1172 + value: 1,
1157 slide: function (event, ui) { 1173 slide: function (event, ui) {
1158 1174
1159 - $("#amount-2").val(ui.value);  
1160 - 1175 + $("#btnBrushSize").val(ui.value);
1161 1176
1162 }, 1177 },
1163 stop: function (event, ui) { 1178 stop: function (event, ui) {
@@ -1167,6 +1182,44 @@ @@ -1167,6 +1182,44 @@
1167 } 1182 }
1168 1183
1169 }); 1184 });
  1185 +
  1186 +
  1187 + $("#btnBrushSize").keydown(function () {
  1188 + var brushSizevalue = this.value;
  1189 + $("#slider-range-min-2").slider("value", parseInt(brushSizevalue));
  1190 + });
  1191 + $("#btnBrushSize").keyup(function () {
  1192 + var brushSizevalue = this.value;
  1193 + $("#slider-range-min-2").slider("value", parseInt(brushSizevalue));
  1194 + });
  1195 + $("#btnBrushSizeIncrement").click(function () {
  1196 + var brushIncrementVar = $("#btnBrushSize").val();
  1197 + if (brushIncrementVar >= 60) {
  1198 + $("#slider-range-min-2").slider("value", 60);
  1199 + }
  1200 + else {
  1201 + var brushIncrementedValue = parseInt(brushIncrementVar) + 1;
  1202 + $("#btnBrushSize").val(brushIncrementedValue);
  1203 + $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue));
  1204 + }
  1205 + });
  1206 + $("#btnBrushSizeDecrease").click(function () {
  1207 + var brushDecreaseVar = $("#btnBrushSize").val();
  1208 + if (brushDecreaseVar <= 1) {
  1209 + $("#slider-range-min-2").slider("value", 1);
  1210 + }
  1211 + else {
  1212 + var brushDecrementedValue = parseInt(brushDecreaseVar) - 1;
  1213 + $("#btnBrushSize").val(brushDecrementedValue);
  1214 + $("#slider-range-min-2").slider("value", parseInt(brushDecrementedValue));
  1215 + }
  1216 + });
  1217 + $("#btnBrushSize").val($("#slider-range-min-2").slider("value"));
  1218 +
  1219 +
  1220 +
  1221 +
  1222 +
1170 //$("#slider-range-min-2").on("slidestart", function (event, ui) { 1223 //$("#slider-range-min-2").on("slidestart", function (event, ui) {
1171 1224
1172 // $('.btnCursor').trigger('click'); 1225 // $('.btnCursor').trigger('click');
@@ -1178,7 +1231,6 @@ @@ -1178,7 +1231,6 @@
1178 //}); 1231 //});
1179 // $("#slider-range-min-2").on("slidechange", function (event, ui) { alert("ssasa"); }); 1232 // $("#slider-range-min-2").on("slidechange", function (event, ui) { alert("ssasa"); });
1180 1233
1181 - $("#amount-2").val($("#slider-vertical-2").slider("value"));  
1182 1234
1183 $(function () { 1235 $(function () {
1184 $('[data-toggle="tooltip"]').tooltip(); 1236 $('[data-toggle="tooltip"]').tooltip();