Commit 240cd47a47786420b9b9eb23aebb7a92fd8bbf61

Authored by unknown
1 parent e165b8c7

Annotation: Color in the selected color box should be black by default.

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -6800,7 +6800,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6800 6800  
6801 6801 $("#text_area").val('');
6802 6802 $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
6803   -
  6803 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
  6804 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
6804 6805  
6805 6806 $("#text-italic").removeClass("ActiveFormattingButtonClass");
6806 6807  
... ... @@ -6849,7 +6850,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6849 6850  
6850 6851 $("#annotationTextModal").modal("toggle");
6851 6852 $('.btnCursor').trigger('click');
6852   -
  6853 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
  6854 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
6853 6855 $("#text_area").val('');
6854 6856  
6855 6857 $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
... ... @@ -7011,8 +7013,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7011 7013 $("#text_area").css("color", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor);
7012 7014 $("#text_area").css("font-family", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontFamily);
7013 7015 $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].TextDecoration);
7014   -
7015   -
  7016 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor });
  7017 + // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" });
  7018 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
7016 7019  
7017 7020  
7018 7021 //adding text text decoration active class in text edit pop-up
... ... @@ -7132,7 +7135,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7132 7135 $("#text_area").val('');
7133 7136 $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
7134 7137  
7135   -
  7138 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
7136 7139 $("#text-italic").removeClass("ActiveFormattingButtonClass");
7137 7140  
7138 7141 $("#text-bold").removeClass("ActiveFormattingButtonClass");
... ... @@ -7255,8 +7258,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7255 7258 $("#text_area").css("color", _modifiedFontColor);
7256 7259 $("#text_area").css("font-family", _modifiedFontFamily);
7257 7260 $("#text_area").css("text-decoration", _modifiedFontDecoration);
7258   -
7259   -
  7261 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor });
  7262 + // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" });
  7263 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
7260 7264  
7261 7265 //adding text text decoration active class in text edit pop-up
7262 7266 if (_modifiedFontDecoration == "underline") {
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -42,7 +42,9 @@
42 42 <!--Annotation Toolbar: Jcanvas-->
43 43 <style>
44 44  
45   -
  45 + /*.ActiveDefaultColorAnnotation {
  46 + background-color: #000000!important;
  47 + }*/
46 48 .ActiveFormattingButtonClass {
47 49 background-color: #1B92D0 !important;
48 50 }
... ... @@ -1199,12 +1201,14 @@
1199 1201 <script type="text/javascript">
1200 1202 $(function () {
1201 1203 var colpick = $('.demo').each(function () {
  1204 +
1202 1205 $(this).minicolors({
1203 1206 control: $(this).attr('data-control') || 'hue',
1204 1207 inline: $(this).attr('data-inline') === 'true',
1205 1208 letterCase: 'lowercase',
1206 1209 opacity: false,
1207 1210 change: function (hex, opacity) {
  1211 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").removeClass("ActiveDefaultColorAnnotation");
1208 1212 if (!hex) return;
1209 1213 if (opacity) hex += ', ' + opacity;
1210 1214 try {
... ... @@ -1338,6 +1342,8 @@
1338 1342  
1339 1343 <script>
1340 1344 $(document).ready(function () {
  1345 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
  1346 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
1341 1347 var borderWidth = 1;
1342 1348 var borderColor = "#000";
1343 1349 $("#borderWidthCanvasElement").change(function () {
... ... @@ -1353,9 +1359,10 @@
1353 1359 }
1354 1360 });
1355 1361  
  1362 +
1356 1363  
1357 1364 $('.borderColorCanvasPreview').each(function () {
1358   -
  1365 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
1359 1366 $(this).minicolors({
1360 1367 control: $(this).attr('data-control') || 'hue',
1361 1368 defaultValue: $(this).attr('data-defaultValue') || '',
... ... @@ -1371,8 +1378,8 @@
1371 1378 if (opacity) value += ', ' + opacity;
1372 1379 if (typeof console === 'object') {
1373 1380 console.log(value);
1374   -
1375   - borderColor = value;
  1381 +
  1382 + borderColor = value;
1376 1383 $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
1377 1384  
1378 1385  
... ... @@ -1381,12 +1388,12 @@
1381 1388 theme: 'bootstrap'
1382 1389 });
1383 1390  
  1391 +
1384 1392 });
1385 1393  
1386 1394  
1387   -
1388 1395 $('.outerBackgroundColor').each(function () {
1389   -
  1396 +
1390 1397 $(this).minicolors({
1391 1398 control: $(this).attr('data-control') || 'hue',
1392 1399 defaultValue: $(this).attr('data-defaultValue') || '',
... ...