Commit 661173995d67a396d14b74345e321e7e91677c1a

Authored by Birendra
2 parents 0f56619b 8de63810

resolve merge conflict in CB controller.

400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
@@ -36,7 +36,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -36,7 +36,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
36 $("#sidebar-wrapper").on('click', function (event) { 36 $("#sidebar-wrapper").on('click', function (event) {
37 37
38 //4. on click disable menu option 38 //4. on click disable menu option
39 - $scope.$emit("cBEnableDisableMenuOption",""); 39 + $scope.$emit("cBEnableDisableMenuOption", "");
40 }); 40 });
41 41
42 // close all selected open panel in CB 42 // close all selected open panel in CB
@@ -84,14 +84,34 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -84,14 +84,34 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
84 $('#HomeContainerDiv').css('pointer-events', 'none'); 84 $('#HomeContainerDiv').css('pointer-events', 'none');
85 $('#HomeContainerDiv').css('opacity', '0.7'); 85 $('#HomeContainerDiv').css('opacity', '0.7');
86 86
  87 +
  88 + $('#CBTextArea_ifr').css('pointer-events', 'none');
  89 + $('#CBTextArea_ifr').css('opacity', '0.7');
  90 +
  91 +
  92 + $('#jstree').css('pointer-events', 'none');
  93 + $('#jstree').css('opacity', '0.7');
  94 +
  95 + $('#cbEditorTopMenuBar').css('pointer-events', 'none');
  96 + $('#cbEditorTopMenuBar').css('opacity', '0.7');
  97 +
  98 + $('#cbEditorLeftSideBar').css('pointer-events', 'none');
  99 + $('#cbEditorLeftSideBar').css('opacity', '0.7');
  100 +
  101 + $('#cbEditorRightSideBar').css('pointer-events', 'none');
  102 + $('#cbEditorRightSideBar').css('opacity', '0.7');
  103 +
  104 + $('.tox-editor-header').css('pointer-events', 'none');
  105 + $('.tox-editor-header').css('opacity', '0.7');
  106 +
  107 +
87 $timeout(function () { 108 $timeout(function () {
88 109
89 // in case failed default time out 40 second 110 // in case failed default time out 40 second
90 111
91 var opcity = $("#HomeContainerDiv").css("opacity") 112 var opcity = $("#HomeContainerDiv").css("opacity")
92 113
93 - if (opcity != 1)  
94 - { 114 + if (opcity != 1) {
95 $scope.CBEnableUI(); 115 $scope.CBEnableUI();
96 } 116 }
97 }, 40000); 117 }, 40000);
@@ -105,6 +125,25 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -105,6 +125,25 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
105 // CB module enable all 125 // CB module enable all
106 $('#HomeContainerDiv').css('pointer-events', 'auto'); 126 $('#HomeContainerDiv').css('pointer-events', 'auto');
107 $('#HomeContainerDiv').css('opacity', '1'); 127 $('#HomeContainerDiv').css('opacity', '1');
  128 +
  129 + $('#CBTextArea_ifr').css('pointer-events', 'auto');
  130 + $('#CBTextArea_ifr').css('opacity', '1');
  131 +
  132 + $('#jstree').css('pointer-events', 'auto');
  133 + $('#jstree').css('opacity', '1');
  134 +
  135 + $('#cbEditorTopMenuBar').css('pointer-events', 'auto');
  136 + $('#cbEditorTopMenuBar').css('opacity', '1');
  137 +
  138 + $('#cbEditorLeftSideBar').css('pointer-events', 'auto');
  139 + $('#cbEditorLeftSideBar').css('opacity', '1');
  140 +
  141 + $('#cbEditorRightSideBar').css('pointer-events', 'auto');
  142 + $('#cbEditorRightSideBar').css('opacity', '01');
  143 +
  144 + $('.tox-editor-header').css('pointer-events', 'auto');
  145 + $('.tox-editor-header').css('opacity', '1');
  146 +
108 } 147 }
109 148
110 }); 149 });
@@ -382,7 +421,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -382,7 +421,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
382 421
383 $timeout(function () { 422 $timeout(function () {
384 $scope.TinyMCEPanelclick(); 423 $scope.TinyMCEPanelclick();
385 - },1000); 424 + }, 1000);
386 425
387 } 426 }
388 427
@@ -391,15 +430,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -391,15 +430,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
391 $("#CBTinyMCEPanel").on('click', function (event) { 430 $("#CBTinyMCEPanel").on('click', function (event) {
392 431
393 //3. on click disable menu option 432 //3. on click disable menu option
394 - $scope.$emit("cBEnableDisableMenuOption",""); 433 + $scope.$emit("cBEnableDisableMenuOption", "");
395 }); 434 });
396 } 435 }
397 436
398 437
399 - $scope.myeditorclick=function() { 438 + $scope.myeditorclick = function () {
400 439
401 //1. disable menu options 440 //1. disable menu options
402 - $scope.$emit("cBEnableDisableMenuOption",""); 441 + $scope.$emit("cBEnableDisableMenuOption", "");
403 442
404 } 443 }
405 444
@@ -487,31 +526,28 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -487,31 +526,28 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
487 526
488 if ($scope.SelectedNotes != "" && $scope.SelectedNotes != undefined) { 527 if ($scope.SelectedNotes != "" && $scope.SelectedNotes != undefined) {
489 tinymce.get("CBTextArea").setContent($scope.SelectedNotes); 528 tinymce.get("CBTextArea").setContent($scope.SelectedNotes);
490 - $scope.LoadModuleName = [];  
491 - $scope.Slidenumber = $scope.selectedNodeSingleObj._id; 529 + $scope.LoadModuleName = [];
  530 + $scope.Slidenumber = $scope.selectedNodeSingleObj._id;
492 531
493 setTimeout(function () { 532 setTimeout(function () {
494 if ($scope.selectedNodeSingleObj.windows != "") { 533 if ($scope.selectedNodeSingleObj.windows != "") {
495 $scope.loadContentOfSelectedSlide($scope.selectedNodeSingleObj._id) 534 $scope.loadContentOfSelectedSlide($scope.selectedNodeSingleObj._id)
496 535
497 } 536 }
498 - else  
499 - { 537 + else {
500 $scope.CBEnableUI(); 538 $scope.CBEnableUI();
501 539
502 } 540 }
503 - },200); 541 + }, 200);
504 //$scope.CBEnableUI(); 542 //$scope.CBEnableUI();
505 } 543 }
506 - else  
507 - { 544 + else {
508 tinymce.get("CBTextArea").setContent(""); 545 tinymce.get("CBTextArea").setContent("");
509 $scope.CBEnableUI(); 546 $scope.CBEnableUI();
510 } 547 }
511 548
512 } 549 }
513 - else  
514 - { 550 + else {
515 $scope.CBEnableUI(); 551 $scope.CBEnableUI();
516 } 552 }
517 } 553 }
@@ -580,7 +616,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -580,7 +616,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
580 //document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length; 616 //document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length;
581 document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSiblingObjs).length; 617 document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSiblingObjs).length;
582 } 618 }
583 - else{ 619 + else {
584 document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length; 620 document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length;
585 } 621 }
586 } 622 }
@@ -824,7 +860,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -824,7 +860,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
824 var newSummary = document.getElementById('cbRenameSummary').value; 860 var newSummary = document.getElementById('cbRenameSummary').value;
825 var newversion = document.getElementById('cbRenameVersionNo').value; 861 var newversion = document.getElementById('cbRenameVersionNo').value;
826 var newSectionText = document.getElementById('cbRenameSectionTitle').value; 862 var newSectionText = document.getElementById('cbRenameSectionTitle').value;
827 - if (newSectionText == ""){ 863 + if (newSectionText == "") {
828 newSectionText = $scope.selectedNodeSingleObj._label; 864 newSectionText = $scope.selectedNodeSingleObj._label;
829 } 865 }
830 var newSlideName = ("<span id=" + nodeid + " class='ng-binding ng-scope'>" + newSectionText + "</span>"); 866 var newSlideName = ("<span id=" + nodeid + " class='ng-binding ng-scope'>" + newSectionText + "</span>");
@@ -1268,15 +1304,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1268,15 +1304,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1268 $rootScope.contentNotesForSaveCB = remaingNotesForCB; 1304 $rootScope.contentNotesForSaveCB = remaingNotesForCB;
1269 1305
1270 1306
1271 - traverseTreeSelectedSingleObj($rootScope.stru, cbCurrentId); 1307 + traverseTreeSelectedSingleObj($rootScope.stru, cbCurrentId);
1272 1308
1273 if ($scope.selectedNodeSingleObj._isBranch == "false") { 1309 if ($scope.selectedNodeSingleObj._isBranch == "false") {
1274 - $rootScope.contentNotesForSaveCB.push(  
1275 - {  
1276 - "notes": notesForSelectedSlide,  
1277 - "windows": windowsInSelectedSlide,  
1278 - "_id": cbCurrentId  
1279 - }); 1310 + $rootScope.contentNotesForSaveCB.push(
  1311 + {
  1312 + "notes": notesForSelectedSlide,
  1313 + "windows": windowsInSelectedSlide,
  1314 + "_id": cbCurrentId
  1315 + });
1280 } 1316 }
1281 1317
1282 else if ($scope.selectedNodeSingleObj._isBranch == "true" && $scope.selectedNodeSingleObj._isRoot == "true") { 1318 else if ($scope.selectedNodeSingleObj._isBranch == "true" && $scope.selectedNodeSingleObj._isRoot == "true") {
@@ -1286,7 +1322,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1286,7 +1322,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1286 { 1322 {
1287 "windows": windowsInSelectedSlide, 1323 "windows": windowsInSelectedSlide,
1288 "summary": $scope.selectedNodeSingleObj.summary, 1324 "summary": $scope.selectedNodeSingleObj.summary,
1289 - "author": $scope.selectedNodeSingleObj.author, 1325 + "author": $scope.selectedNodeSingleObj.author,
1290 "modified": $scope.selectedNodeSingleObj.modified, 1326 "modified": $scope.selectedNodeSingleObj.modified,
1291 "password": "", 1327 "password": "",
1292 "version": $scope.selectedNodeSingleObj.version, 1328 "version": $scope.selectedNodeSingleObj.version,
@@ -1316,7 +1352,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1316,7 +1352,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1316 $rootScope.cbDynamicContents = $rootScope.contentNotesForSaveCB; 1352 $rootScope.cbDynamicContents = $rootScope.contentNotesForSaveCB;
1317 $rootScope.note = $rootScope.contentNotesForSaveCB; 1353 $rootScope.note = $rootScope.contentNotesForSaveCB;
1318 1354
1319 - console.log($rootScope.contentNotesForSaveCB); 1355 + console.log($rootScope.contentNotesForSaveCB);
1320 1356
1321 } 1357 }
1322 1358
@@ -1333,7 +1369,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1333,7 +1369,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1333 //$rootScope.contentNotesForSaveCB = $rootScope.cbJsonData.slideshow.content.element; 1369 //$rootScope.contentNotesForSaveCB = $rootScope.cbJsonData.slideshow.content.element;
1334 $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents 1370 $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents
1335 } 1371 }
1336 - $rootScope.updatedContentFromEditor(cbCurrentId); 1372 + $rootScope.updatedContentFromEditor(cbCurrentId);
1337 1373
1338 $rootScope.dynamicUpdatedJsonForSaveCB = 1374 $rootScope.dynamicUpdatedJsonForSaveCB =
1339 { 1375 {
@@ -1374,12 +1410,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1374,12 +1410,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1374 else { 1410 else {
1375 1411
1376 $(document).execCommand("SaveAs", true, filename); 1412 $(document).execCommand("SaveAs", true, filename);
1377 - document.execCommand("SaveAs", true, filename);  
1378 - angular.element(document.execCommand("SaveAs", false, filename)).scope(); 1413 + document.execCommand("SaveAs", true, filename);
  1414 + angular.element(document.execCommand("SaveAs", false, filename)).scope();
1379 1415
1380 //var e = document.createEvent('MouseEvents'), 1416 //var e = document.createEvent('MouseEvents'),
1381 //a = document.createElement('a'); 1417 //a = document.createElement('a');
1382 - // a.download = filename; 1418 + // a.download = filename;
1383 //a.href = window.URL.createObjectURL(blob); 1419 //a.href = window.URL.createObjectURL(blob);
1384 //a.dataset.downloadurl = ['text/json', a.download, a.href].join(':'); 1420 //a.dataset.downloadurl = ['text/json', a.download, a.href].join(':');
1385 //e.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); 1421 //e.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
@@ -1390,19 +1426,19 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1390,19 +1426,19 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1390 //$rootScope.contentNotesForSaveCB = []; 1426 //$rootScope.contentNotesForSaveCB = [];
1391 //$rootScope.structureObjForSaveCB = []; 1427 //$rootScope.structureObjForSaveCB = [];
1392 1428
1393 - // $http({ method: 'Post', url: $scope.fileName }).success(function (data) {  
1394 - // localStorage.setItem("cbJsonDataObject", JSON.stringify(data));  
1395 - // $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject"));  
1396 - // $rootScope.cbDynamicJsonData = data;  
1397 - // //$scope.getCBsummary();  
1398 - // $rootScope.cbJsonData.slideshow.content.element = "Eement data";  
1399 - // $rootScope.cbDynamicJsonData.slideshow.content.element = "slideshow element data";  
1400 - // $rootScope.note = "save data"  
1401 - // //$scope.openCurriculumDetail();  
1402 - // })  
1403 - //.error(function (data, status, headers, config) {  
1404 - // console.log(data);  
1405 - //}); 1429 + // $http({ method: 'Post', url: $scope.fileName }).success(function (data) {
  1430 + // localStorage.setItem("cbJsonDataObject", JSON.stringify(data));
  1431 + // $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject"));
  1432 + // $rootScope.cbDynamicJsonData = data;
  1433 + // //$scope.getCBsummary();
  1434 + // $rootScope.cbJsonData.slideshow.content.element = "Eement data";
  1435 + // $rootScope.cbDynamicJsonData.slideshow.content.element = "slideshow element data";
  1436 + // $rootScope.note = "save data"
  1437 + // //$scope.openCurriculumDetail();
  1438 + // })
  1439 + //.error(function (data, status, headers, config) {
  1440 + // console.log(data);
  1441 + //});
1406 }; 1442 };
1407 1443
1408 $scope.addSection = function (currentid, AddSecionId) { 1444 $scope.addSection = function (currentid, AddSecionId) {
@@ -1419,14 +1455,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1419,14 +1455,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1419 if (currentid == "-225638207") { 1455 if (currentid == "-225638207") {
1420 $rootScope.selectedNodeSingle.push( 1456 $rootScope.selectedNodeSingle.push(
1421 { 1457 {
1422 - "structure": {  
1423 - "structure": [  
1424 - ],  
1425 - "_label": "New Section",  
1426 - "_id": AddSecionId,  
1427 - "_isRoot": "false",  
1428 - "_isBranch": "true",  
1429 - "_isLocked": "false" 1458 + "structure": {
  1459 + "structure": [
  1460 + ],
  1461 + "_label": "New Section",
  1462 + "_id": AddSecionId,
  1463 + "_isRoot": "false",
  1464 + "_isBranch": "true",
  1465 + "_isLocked": "false"
1430 } 1466 }
1431 1467
1432 }); 1468 });
@@ -1481,11 +1517,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1481,11 +1517,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1481 // }); 1517 // });
1482 //} 1518 //}
1483 //else { 1519 //else {
1484 - for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) {  
1485 - if ($rootScope.structureObjForSaveCB[i]._id == currentid) {  
1486 - $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure'];  
1487 - } 1520 + for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) {
  1521 + if ($rootScope.structureObjForSaveCB[i]._id == currentid) {
  1522 + $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure'];
1488 } 1523 }
  1524 + }
1489 //} 1525 //}
1490 } 1526 }
1491 // setTimeout(function () { traverseTreeForSetIcons($rootScope.stru, currentid); }, 1500); 1527 // setTimeout(function () { traverseTreeForSetIcons($rootScope.stru, currentid); }, 1500);
@@ -1510,13 +1546,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1510,13 +1546,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1510 "_isBranch": "false", 1546 "_isBranch": "false",
1511 "_isLocked": "false" 1547 "_isLocked": "false"
1512 }); 1548 });
1513 - $rootScope.structureObjForSaveCB.push({ 1549 + $rootScope.structureObjForSaveCB.push({
1514 "_label": "NEW Slide1", 1550 "_label": "NEW Slide1",
1515 "_id": AddSlideId, 1551 "_id": AddSlideId,
1516 "_isRoot": "false", 1552 "_isRoot": "false",
1517 "_isBranch": "false", 1553 "_isBranch": "false",
1518 "_isLocked": "false" 1554 "_isLocked": "false"
1519 - }); 1555 + });
1520 } 1556 }
1521 else { 1557 else {
1522 $scope.selectedNodeSingleObj['structure'].push({ 1558 $scope.selectedNodeSingleObj['structure'].push({
@@ -1543,11 +1579,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1543,11 +1579,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1543 // }); 1579 // });
1544 //} 1580 //}
1545 //else { 1581 //else {
1546 - for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) {  
1547 - if ($rootScope.structureObjForSaveCB[i]._id == currentid) {  
1548 - $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure'];  
1549 - } 1582 + for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) {
  1583 + if ($rootScope.structureObjForSaveCB[i]._id == currentid) {
  1584 + $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure'];
1550 } 1585 }
  1586 + }
1551 //} 1587 //}
1552 } 1588 }
1553 // setTimeout(function () { traverseTreeForSetIcons($rootScope.stru, currentid); }, 3000); 1589 // setTimeout(function () { traverseTreeForSetIcons($rootScope.stru, currentid); }, 3000);
@@ -1620,7 +1656,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1620,7 +1656,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1620 .from(content) 1656 .from(content)
1621 .where("_id == " + id) 1657 .where("_id == " + id)
1622 .select(); 1658 .select();
1623 - // console.log('contenctForSelectedSlide' + contenctForSelectedSlide[0].notes) 1659 + // console.log('contenctForSelectedSlide' + contenctForSelectedSlide[0].notes)
1624 var windowsInSelectedSlide = contenctForSelectedSlide[0].windows; 1660 var windowsInSelectedSlide = contenctForSelectedSlide[0].windows;
1625 1661
1626 var allwindowData = windowsInSelectedSlide.window; 1662 var allwindowData = windowsInSelectedSlide.window;
@@ -1724,49 +1760,49 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1724,49 +1760,49 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1724 1760
1725 if ($scope.LoadModuleName != undefined) { 1761 if ($scope.LoadModuleName != undefined) {
1726 1762
1727 - var index = $scope.LoadModuleName.indexOf(name);  
1728 - if (index != -1) {  
1729 - // remove module which one is loaded  
1730 - $scope.LoadModuleName.splice(index, 1);  
1731 - } 1763 + var index = $scope.LoadModuleName.indexOf(name);
  1764 + if (index != -1) {
  1765 + // remove module which one is loaded
  1766 + $scope.LoadModuleName.splice(index, 1);
  1767 + }
1732 1768
1733 - if ($scope.LoadModuleName.length > 0) {  
1734 - var nextmodulename = $scope.LoadModuleName[0];  
1735 - $scope.loadModuleWithCB(nextmodulename); 1769 + if ($scope.LoadModuleName.length > 0) {
  1770 + var nextmodulename = $scope.LoadModuleName[0];
  1771 + $scope.loadModuleWithCB(nextmodulename);
1736 1772
1737 - }  
1738 - else { //Added Code by sandeep for user story-52696  
1739 - $("#viwerSelect").empty();  
1740 - var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']");  
1741 - if (modulePanel != undefined && modulePanel != null) {  
1742 - // $('#viwerSelect').append('<option selected value="' + 0 + '">' + "Select Viewer" + '</option>');  
1743 -  
1744 - //Added code by sandeep for fixed Bug-58066  
1745 - if (modulePanel.length > 0) {  
1746 - $('#viwerSelect').show();  
1747 - }  
1748 - }  
1749 - else {  
1750 - $('#viwerSelect').hide();  
1751 - }  
1752 - for (var i = 0 ; i < modulePanel.length; i++) {  
1753 - var paneld = modulePanel[i].id;  
1754 - var panelTitle = document.getElementById(paneld).childNodes[0].innerText;  
1755 - $('#viwerSelect').append('<option value="' + paneld + '">' + panelTitle + '</option>');  
1756 - } 1773 + }
  1774 + else { //Added Code by sandeep for user story-52696
  1775 + $("#viwerSelect").empty();
  1776 + var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']");
  1777 + if (modulePanel != undefined && modulePanel != null) {
  1778 + // $('#viwerSelect').append('<option selected value="' + 0 + '">' + "Select Viewer" + '</option>');
1757 1779
1758 - $scope.CBEnableUI();  
1759 - // scroll down to first panel 1780 + //Added code by sandeep for fixed Bug-58066
1760 if (modulePanel.length > 0) { 1781 if (modulePanel.length > 0) {
1761 - if (modulePanel[0].id != undefined) {  
1762 - var lastpanel = modulePanel[0].id;  
1763 - //$('body,html').animate({ scrollTop: $('#' + lastpanel).position().top }, 1000);  
1764 - }  
1765 - }  
1766 -  
1767 - 1782 + $('#viwerSelect').show();
  1783 + }
  1784 + }
  1785 + else {
  1786 + $('#viwerSelect').hide();
  1787 + }
  1788 + for (var i = 0 ; i < modulePanel.length; i++) {
  1789 + var paneld = modulePanel[i].id;
  1790 + var panelTitle = document.getElementById(paneld).childNodes[0].innerText;
  1791 + $('#viwerSelect').append('<option value="' + paneld + '">' + panelTitle + '</option>');
  1792 + }
  1793 +
  1794 + $scope.CBEnableUI();
  1795 + // scroll down to first panel
  1796 + if (modulePanel.length > 0) {
  1797 + if (modulePanel[0].id != undefined) {
  1798 + var lastpanel = modulePanel[0].id;
  1799 + //$('body,html').animate({ scrollTop: $('#' + lastpanel).position().top }, 1000);
  1800 + }
1768 } 1801 }
1769 1802
  1803 +
  1804 + }
  1805 +
1770 } 1806 }
1771 1807
1772 }); 1808 });
@@ -1954,24 +1990,23 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1954,24 +1990,23 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1954 1990
1955 } 1991 }
1956 $scope.loadDissectibleAnatomyModule = function (moduleName) { 1992 $scope.loadDissectibleAnatomyModule = function (moduleName) {
1957 - var DAData = ModuleService.getModuleData(moduleName); 1993 + var DAData = ModuleService.getModuleData(moduleName);
1958 1994
1959 - if (DAData != undefined && DAData.length > 0) {  
1960 - $rootScope.isCallFromOtherModule = true; 1995 + if (DAData != undefined && DAData.length > 0) {
  1996 + $rootScope.isCallFromOtherModule = true;
1961 1997
1962 - var daSectionExist = document.getElementById('daCustomModuleDiv'); 1998 + var daSectionExist = document.getElementById('daCustomModuleDiv');
1963 1999
1964 - if (daSectionExist==null){  
1965 - $('#cbparentcustomDiv').append($('<div id="daCustomModuleDiv"></div>'));  
1966 - $e = $('#daCustomModuleDiv').append("<da-directive></da-directive>");  
1967 - $compile($e)($scope);  
1968 - }  
1969 - else  
1970 - {  
1971 - // open new da panel on same slide by open resource  
1972 - $rootScope.openDABodyViewMain();  
1973 - } 2000 + if (daSectionExist == null) {
  2001 + $('#cbparentcustomDiv').append($('<div id="daCustomModuleDiv"></div>'));
  2002 + $e = $('#daCustomModuleDiv').append("<da-directive></da-directive>");
  2003 + $compile($e)($scope);
  2004 + }
  2005 + else {
  2006 + // open new da panel on same slide by open resource
  2007 + $rootScope.openDABodyViewMain();
1974 } 2008 }
  2009 + }
1975 2010
1976 } 2011 }
1977 2012
@@ -2045,13 +2080,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2045,13 +2080,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2045 findKeyForChange($rootScope.contentNotesForSaveCB, currentId); 2080 findKeyForChange($rootScope.contentNotesForSaveCB, currentId);
2046 $scope.selectedKey.windows.window = []; 2081 $scope.selectedKey.windows.window = [];
2047 2082
2048 - for (var s = 0; s < $scope.updatedWindowListForSaveCB.length; s++)  
2049 - { 2083 + for (var s = 0; s < $scope.updatedWindowListForSaveCB.length; s++) {
2050 var arrToStrWinObj = JSON.stringify($scope.updatedWindowListForSaveCB[s]); 2084 var arrToStrWinObj = JSON.stringify($scope.updatedWindowListForSaveCB[s]);
2051 $scope.selectedKey.windows.window.push(arrToStrWinObj); 2085 $scope.selectedKey.windows.window.push(arrToStrWinObj);
2052 } 2086 }
2053 - $scope.updatedWindowListForSaveCB = [];  
2054 - console.log($scope.selectedKey.windows.window); 2087 + $scope.updatedWindowListForSaveCB = [];
  2088 + console.log($scope.selectedKey.windows.window);
2055 } 2089 }
2056 2090
2057 $scope.saveCIWindowActivity_Old = function (keyName, value) { 2091 $scope.saveCIWindowActivity_Old = function (keyName, value) {
@@ -2112,7 +2146,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2112,7 +2146,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2112 for (i in o) { 2146 for (i in o) {
2113 2147
2114 if (o[i] !== null && typeof (o[i]) == "object") { 2148 if (o[i] !== null && typeof (o[i]) == "object") {
2115 - if (o[i]._id == keyname) { 2149 + if (o[i]._id == keyname) {
2116 $scope.selectedKey = o[i]; 2150 $scope.selectedKey = o[i];
2117 } 2151 }
2118 findKeyForChange(o[i], keyname); 2152 findKeyForChange(o[i], keyname);
@@ -2202,7 +2236,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2202,7 +2236,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2202 2236
2203 containsCapturedContent: true,//$rootScope.TheeDWindowData[i] // N 2237 containsCapturedContent: true,//$rootScope.TheeDWindowData[i] // N
2204 //annotationData: "",//$rootScope.TheeDWindowData[i] N 2238 //annotationData: "",//$rootScope.TheeDWindowData[i] N
2205 - contextMenu:{ lockResize: true, hideTitleBar: true, hideToolBar: false, hideLeftBar: false, hideTopToolBar: false }, 2239 + contextMenu: { lockResize: true, hideTitleBar: true, hideToolBar: false, hideLeftBar: false, hideTopToolBar: false },
2206 position: { 2240 position: {
2207 top: $rootScope.TheeDWindowData[i].top, 2241 top: $rootScope.TheeDWindowData[i].top,
2208 left: $rootScope.TheeDWindowData[i].left, 2242 left: $rootScope.TheeDWindowData[i].left,
@@ -2221,7 +2255,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2221,7 +2255,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2221 windowListId: 0, //$rootScope.TheeDWindowData[i] // N 2255 windowListId: 0, //$rootScope.TheeDWindowData[i] // N
2222 threeDData: $rootScope.TheeDWindowData[i].threeDAnatomyData, 2256 threeDData: $rootScope.TheeDWindowData[i].threeDAnatomyData,
2223 contentPath: $rootScope.TheeDWindowData[i].ImagePath, 2257 contentPath: $rootScope.TheeDWindowData[i].ImagePath,
2224 - scrollPosition: { vertical: $rootScope.TheeDWindowData[i].verticalScroll ? 0 : 0 , horizontal: 0 }, 2258 + scrollPosition: { vertical: $rootScope.TheeDWindowData[i].verticalScroll ? 0 : 0, horizontal: 0 },
2225 2259
2226 }); 2260 });
2227 } 2261 }
@@ -2314,8 +2348,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2314,8 +2348,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2314 } 2348 }
2315 if(isNotSaved) 2349 if(isNotSaved)
2316 $rootScope.AAWindowData = []; 2350 $rootScope.AAWindowData = [];
2317 - }  
2318 } 2351 }
  2352 + }
2319 2353
2320 //Save DISSECTIBLE_ANATOMY activity for CB 2354 //Save DISSECTIBLE_ANATOMY activity for CB
2321 $scope.saveDAWindowActivity = function (isNotSaved) { 2355 $scope.saveDAWindowActivity = function (isNotSaved) {
@@ -2329,7 +2363,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2329,7 +2363,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2329 highlightOptionsSelectedId: 0, 2363 highlightOptionsSelectedId: 0,
2330 selectedStructureID: 0,//N 2364 selectedStructureID: 0,//N
2331 contentDescriptorId: 0, 2365 contentDescriptorId: 0,
2332 - callOuts: $rootScope.DaWindowData[i].CurriculumTermData, 2366 + callOuts: $rootScope.DaWindowData[i].CurriculumTermData,
2333 //hideAllPins: $rootScope.DaWindowData[i].isHidePinBtnClicked, 2367 //hideAllPins: $rootScope.DaWindowData[i].isHidePinBtnClicked,
2334 //selectedCallouts: $rootScope.DaWindowData[i].CBselectedpinCordinate, 2368 //selectedCallouts: $rootScope.DaWindowData[i].CBselectedpinCordinate,
2335 layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1, 2369 layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1,
@@ -2351,7 +2385,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2351,7 +2385,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2351 }, 2385 },
2352 id: $rootScope.DaWindowData[i].voId, 2386 id: $rootScope.DaWindowData[i].voId,
2353 //showSelectedPins: $rootScope.DaWindowData[i].isShowSelectedSystemPinsClicked, 2387 //showSelectedPins: $rootScope.DaWindowData[i].isShowSelectedSystemPinsClicked,
2354 - // hideCallOuts: false,//N 2388 + // hideCallOuts: false,//N
2355 //showAllPins: $rootScope.DaWindowData[i].isShowBodyWithCBPinData,//N 2389 //showAllPins: $rootScope.DaWindowData[i].isShowBodyWithCBPinData,//N
2356 //scaleIndex: 0,//N 2390 //scaleIndex: 0,//N
2357 //bodySystemId: $rootScope.DaWindowData[i].SelectedSystemID, 2391 //bodySystemId: $rootScope.DaWindowData[i].SelectedSystemID,
@@ -2366,9 +2400,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2366,9 +2400,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2366 //contextMenu: { hideLeftBar: false, hideTitleBar: false, hideTopToolBar: false, lockResize: false }, 2400 //contextMenu: { hideLeftBar: false, hideTitleBar: false, hideTopToolBar: false, lockResize: false },
2367 //activePinArray: $rootScope.DaWindowData[i].activePinArray, // Selected PINID on Body 2401 //activePinArray: $rootScope.DaWindowData[i].activePinArray, // Selected PINID on Body
2368 //sliderVal: $rootScope.DaWindowData[i].sliderVal, 2402 //sliderVal: $rootScope.DaWindowData[i].sliderVal,
2369 - zoom: $rootScope.DaWindowData[i].zoomInOut, 2403 + zoom: $rootScope.DaWindowData[i].zoomInOut,
2370 skinId: $rootScope.DaWindowData[i].curentEthnicity, 2404 skinId: $rootScope.DaWindowData[i].curentEthnicity,
2371 - isResizeLock: false , //.isResizeLock,//N 2405 + isResizeLock: false, //.isResizeLock,//N
2372 mode: $rootScope.DaWindowData[i].mode, 2406 mode: $rootScope.DaWindowData[i].mode,
2373 windowListId: 0,//windowData.windowListId,//25 2407 windowListId: 0,//windowData.windowListId,//25
2374 canvasVScrollX: $rootScope.DaWindowData[i].CanvasDivTopPosition, 2408 canvasVScrollX: $rootScope.DaWindowData[i].CanvasDivTopPosition,
@@ -2410,6 +2444,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2410,6 +2444,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2410 $scope.selectedKey.windows.window.push(arrToStrWinObj); 2444 $scope.selectedKey.windows.window.push(arrToStrWinObj);
2411 2445
2412 } 2446 }
  2447 +
2413 } 2448 }
2414 $scope.updatedWindowListForSaveCB = []; 2449 $scope.updatedWindowListForSaveCB = [];
2415 console.log($rootScope.contentNotesForSaveCB); 2450 console.log($rootScope.contentNotesForSaveCB);
400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/curriculum-builder-TinyMCEjspanel.html
@@ -3,19 +3,19 @@ @@ -3,19 +3,19 @@
3 3
4 <div class="col-sm-12 nopadding" ng-controller="CurrBuildController"> 4 <div class="col-sm-12 nopadding" ng-controller="CurrBuildController">
5 <div class="col-sm-12 nopadding"> 5 <div class="col-sm-12 nopadding">
6 - <div class="form-inline"> 6 + <div class="form-inline" id="cbEditorTopMenuBar">
7 <!-- <button class="btn btn-primary btn-sm"> 7 <!-- <button class="btn btn-primary btn-sm">
8 <img src="../../../content/images/CB/anchor-icon.png" alt="" title=""> 8 <img src="../../../content/images/CB/anchor-icon.png" alt="" title="">
9 </button> --> 9 </button> -->
10 10
11 <button class="btn btn-black btn-sm" title="Rename Slide" onclick="cbRenameModelShow()"> 11 <button class="btn btn-black btn-sm" title="Rename Slide" onclick="cbRenameModelShow()">
12 - <img src="../../../content/images/CB/icon-tasks.png" alt="" > 12 + <img src="../../../content/images/CB/icon-tasks.png" alt="">
13 </button> 13 </button>
14 <button class="btn btn-black btn-sm" title="Lock" onclick="cbPasswordModelShow()"> 14 <button class="btn btn-black btn-sm" title="Lock" onclick="cbPasswordModelShow()">
15 <img src="../../../content/images/CB/icon-lock.png" /> 15 <img src="../../../content/images/CB/icon-lock.png" />
16 </button> 16 </button>
17 <button class="btn btn-black btn-sm" title="Back" onclick="cbBack()"> 17 <button class="btn btn-black btn-sm" title="Back" onclick="cbBack()">
18 - <img src="../../../content/images/CB/icon-back.png" alt="" > 18 + <img src="../../../content/images/CB/icon-back.png" alt="">
19 </button> 19 </button>
20 <button class="btn btn-black btn-sm" title="Forward" onclick="cbNext()"> 20 <button class="btn btn-black btn-sm" title="Forward" onclick="cbNext()">
21 <img src="../../../content/images/CB/icon-next.png" alt=""> 21 <img src="../../../content/images/CB/icon-next.png" alt="">
@@ -36,9 +36,9 @@ @@ -36,9 +36,9 @@
36 </select>--> 36 </select>-->
37 <label class="font13" id="slideNumber" style="color:#fff !important">Slide 01 of 06</label> 37 <label class="font13" id="slideNumber" style="color:#fff !important">Slide 01 of 06</label>
38 </div> 38 </div>
39 - <button class="btn btn-black btn-sm " id="hideShowEditor" onclick="editorHideShow()" title="Show/Hide Note"><img title="" alt="" src="../../../content/images/CB/icon-note.png"></button> 39 + <button class="btn btn-black btn-sm " id="hideShowEditor" onclick="editorHideShow()" title="Show/Hide Note"><img title="" alt="" src="../../../content/images/CB/icon-note.png"></button>
40 40
41 - <select id='viwerSelect' onchange="viwerSelectOnChange(this)" title="Captured Viewers"> </select> 41 + <select id='viwerSelect' onchange="viwerSelectOnChange(this)" title="Captured Viewers"> </select>
42 </div> 42 </div>
43 </div> 43 </div>
44 <div class="col-sm-1 nopadding" id="cbEditorLeftSideBar"> 44 <div class="col-sm-1 nopadding" id="cbEditorLeftSideBar">
@@ -56,48 +56,48 @@ @@ -56,48 +56,48 @@
56 56
57 57
58 </div> 58 </div>
59 - <div class="col-sm-11 nopadding" id="cbEditorRightSideBar">  
60 - <textarea id="CBTextArea" style="margin-top: 37px;"></textarea>  
61 - </div>  
62 - 59 + <div class="col-sm-11 nopadding" id="cbEditorRightSideBar">
  60 + <textarea id="CBTextArea" style="margin-top: 37px;"></textarea>
63 </div> 61 </div>
64 62
  63 +</div>
  64 +
65 65
66 <script type="text/javascript"> 66 <script type="text/javascript">
67 67
68 $(document).ready(function () { 68 $(document).ready(function () {
69 - tinymce.remove();  
70 - tinymce.init({  
71 - selector: "#CBTextArea",  
72 - init_instance_callback: function (editor) {  
73 - editor.on('click', function (e) {  
74 - myeditorclick();  
75 -  
76 - });  
77 - editor.setContent('');  
78 - },  
79 - setup: function (editor) {  
80 - editor.on('init', function () {  
81 - //birendra  
82 - // call after initilization  
83 - callEditorOnInit();  
84 - });  
85 - },  
86 - plugins: 'advlist, lists, autolink, link, anchor, print, preview, searchreplace, fullscreen, hr',  
87 - menubar: 'file edit view insert format',  
88 - toolbar: 'undo redo |fontsizeselect fontselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist | forecolor backcolor | link anchor | formatselect |strikethrough | outdent indent | removeformat | fullscreen preview print',  
89 - height: 482,  
90 - toolbar_drawer: 'sliding',  
91 - content_style: ".mce-content-body {font-size:14pt;font-family:Arial;}"  
92 -  
93 - }); 69 + tinymce.remove();
  70 + tinymce.init({
  71 + selector: "#CBTextArea",
  72 + init_instance_callback: function (editor) {
  73 + editor.on('click', function (e) {
  74 + myeditorclick();
  75 +
  76 + });
  77 + editor.setContent('');
  78 + },
  79 + setup: function (editor) {
  80 + editor.on('init', function () {
  81 + //birendra
  82 + // call after initilization
  83 + callEditorOnInit();
  84 + });
  85 + },
  86 + plugins: 'advlist, lists, autolink, link, anchor, print, preview, searchreplace, fullscreen, hr',
  87 + menubar: 'file edit view insert format',
  88 + toolbar: 'undo redo |fontsizeselect fontselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist | forecolor backcolor | link anchor | formatselect |strikethrough | outdent indent | removeformat | fullscreen preview print',
  89 + height: 482,
  90 + toolbar_drawer: 'sliding',
  91 + content_style: ".mce-content-body {font-size:14pt;font-family:Arial;}"
  92 +
  93 + });
94 94
95 }); 95 });
96 - 96 +
97 97
98 //Modified code by Sandeep for fixed bug TicketNo: 49226(6) 98 //Modified code by Sandeep for fixed bug TicketNo: 49226(6)
99 - function editorHideShow() {  
100 - 99 + function editorHideShow() {
  100 +
101 $("#cbEditorRightSideBar").toggle(); 101 $("#cbEditorRightSideBar").toggle();
102 $("#cbEditorLeftSideBar").toggle(); 102 $("#cbEditorLeftSideBar").toggle();
103 } 103 }
@@ -111,21 +111,17 @@ @@ -111,21 +111,17 @@
111 111
112 } 112 }
113 113
114 - function cbBack()  
115 - { 114 + function cbBack() {
116 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbBack(); 115 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbBack();
117 } 116 }
118 - function cbNext()  
119 - { 117 + function cbNext() {
120 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbNext(); 118 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbNext();
121 119
122 } 120 }
123 - function CBAddNewSlide()  
124 - { 121 + function CBAddNewSlide() {
125 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().CBAddSlide(); 122 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().CBAddSlide();
126 } 123 }
127 - function CBDeleteSlide()  
128 - { 124 + function CBDeleteSlide() {
129 125
130 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().showDeleteSlideModel(); 126 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().showDeleteSlideModel();
131 } 127 }
@@ -138,7 +134,7 @@ @@ -138,7 +134,7 @@
138 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().myeditorclick(); 134 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().myeditorclick();
139 } 135 }
140 136
141 - //Added Code by Sandeep for User Story-52695 137 + //Added Code by Sandeep for User Story-52695
142 //function captureScreen() { 138 //function captureScreen() {
143 139
144 // angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().captureScreen(); 140 // angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().captureScreen();
@@ -149,6 +145,6 @@ @@ -149,6 +145,6 @@
149 function viwerSelectOnChange(obj) { 145 function viwerSelectOnChange(obj) {
150 146
151 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().viwerSelectOnChange(obj); 147 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().viwerSelectOnChange(obj);
152 - } 148 + }
153 149
154 - </script> 150 +</script>
400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/color-picker/jquery.minicolors.min.js
1 -/*  
2 - * jQuery MiniColors: A tiny color picker built on jQuery  
3 - *  
4 - * Copyright Cory LaViska for A Beautiful Site, LLC. (http://www.abeautifulsite.net/)  
5 - *  
6 - * Licensed under the MIT license: http://opensource.org/licenses/MIT  
7 - *  
8 - */jQuery&&function(e){function t(t,n){var r=e('<div class="minicolors" />'),i=e.minicolors.defaults;if(t.data("minicolors-initialized"))return;n=e.extend(!0,{},i,n);r.addClass("minicolors-theme-"+n.theme).toggleClass("minicolors-with-opacity",n.opacity);n.position!==undefined&&e.each(n.position.split(" "),function(){r.addClass("minicolors-position-"+this)});t.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",n).prop("size",7).wrap(r).after('<div class="minicolors-panel minicolors-slider-'+n.control+'">'+'<div class="minicolors-slider">'+'<div class="minicolors-picker"></div>'+"</div>"+'<div class="minicolors-opacity-slider">'+'<div class="minicolors-picker"></div>'+"</div>"+'<div class="minicolors-grid">'+'<div class="minicolors-grid-inner"></div>'+'<div class="minicolors-picker"><div></div></div>'+"</div>"+"</div>");if(!n.inline){t.after('<span class="minicolors-swatch"><span class="minicolors-swatch-color"></span></span>');t.next(".minicolors-swatch").on("click",function(e){e.preventDefault();t.focus()})}t.parent().find(".minicolors-panel").on("selectstart",function(){return!1}).end();n.inline&&t.parent().addClass("minicolors-inline");u(t,!1);t.data("minicolors-initialized",!0)}function n(e){var t=e.parent();e.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input");t.before(e).remove()}function r(e){var t=e.parent(),n=t.find(".minicolors-panel"),r=e.data("minicolors-settings");if(!e.data("minicolors-initialized")||e.prop("disabled")||t.hasClass("minicolors-inline")||t.hasClass("minicolors-focus"))return;i();t.addClass("minicolors-focus");n.stop(!0,!0).fadeIn(r.showSpeed,function(){r.show&&r.show.call(e.get(0))})}function i(){e(".minicolors-input").each(function(){var t=e(this),n=t.data("minicolors-settings"),r=t.parent();if(n.inline)return;r.find(".minicolors-panel").fadeOut(n.hideSpeed,function(){r.hasClass("minicolors-focus")&&n.hide&&n.hide.call(t.get(0));r.removeClass("minicolors-focus")})})}function s(e,t,n){var r=e.parents(".minicolors").find(".minicolors-input"),i=r.data("minicolors-settings"),s=e.find("[class$=-picker]"),u=e.offset().left,a=e.offset().top,f=Math.round(t.pageX-u),l=Math.round(t.pageY-a),c=n?i.animationSpeed:0,h,p,d,v;if(t.originalEvent.changedTouches){f=t.originalEvent.changedTouches[0].pageX-u;l=t.originalEvent.changedTouches[0].pageY-a}f<0&&(f=0);l<0&&(l=0);f>e.width()&&(f=e.width());l>e.height()&&(l=e.height());if(e.parent().is(".minicolors-slider-wheel")&&s.parent().is(".minicolors-grid")){h=75-f;p=75-l;d=Math.sqrt(h*h+p*p);v=Math.atan2(p,h);v<0&&(v+=Math.PI*2);if(d>75){d=75;f=75-75*Math.cos(v);l=75-75*Math.sin(v)}f=Math.round(f);l=Math.round(l)}e.is(".minicolors-grid")?s.stop(!0).animate({top:l+"px",left:f+"px"},c,i.animationEasing,function(){o(r,e)}):s.stop(!0).animate({top:l+"px"},c,i.animationEasing,function(){o(r,e)})}function o(e,t){function n(e,t){var n,r;if(!e.length||!t)return null;n=e.offset().left;r=e.offset().top;return{x:n-t.offset().left+e.outerWidth()/2,y:r-t.offset().top+e.outerHeight()/2}}var r,i,s,o,u,f,l,h=e.val(),d=e.attr("data-opacity"),v=e.parent(),g=e.data("minicolors-settings"),y=v.find(".minicolors-swatch"),b=v.find(".minicolors-grid"),w=v.find(".minicolors-slider"),E=v.find(".minicolors-opacity-slider"),S=b.find("[class$=-picker]"),x=w.find("[class$=-picker]"),T=E.find("[class$=-picker]"),N=n(S,b),C=n(x,w),k=n(T,E);if(t.is(".minicolors-grid, .minicolors-slider")){switch(g.control){case"wheel":o=b.width()/2-N.x;u=b.height()/2-N.y;f=Math.sqrt(o*o+u*u);l=Math.atan2(u,o);l<0&&(l+=Math.PI*2);if(f>75){f=75;N.x=69-75*Math.cos(l);N.y=69-75*Math.sin(l)}i=p(f/.75,0,100);r=p(l*180/Math.PI,0,360);s=p(100-Math.floor(C.y*(100/w.height())),0,100);h=m({h:r,s:i,b:s});w.css("backgroundColor",m({h:r,s:i,b:100}));break;case"saturation":r=p(parseInt(N.x*(360/b.width()),10),0,360);i=p(100-Math.floor(C.y*(100/w.height())),0,100);s=p(100-Math.floor(N.y*(100/b.height())),0,100);h=m({h:r,s:i,b:s});w.css("backgroundColor",m({h:r,s:100,b:s}));v.find(".minicolors-grid-inner").css("opacity",i/100);break;case"brightness":r=p(parseInt(N.x*(360/b.width()),10),0,360);i=p(100-Math.floor(N.y*(100/b.height())),0,100);s=p(100-Math.floor(C.y*(100/w.height())),0,100);h=m({h:r,s:i,b:s});w.css("backgroundColor",m({h:r,s:i,b:100}));v.find(".minicolors-grid-inner").css("opacity",1-s/100);break;default:r=p(360-parseInt(C.y*(360/w.height()),10),0,360);i=p(Math.floor(N.x*(100/b.width())),0,100);s=p(100-Math.floor(N.y*(100/b.height())),0,100);h=m({h:r,s:i,b:s});b.css("backgroundColor",m({h:r,s:100,b:100}))}e.val(c(h,g.letterCase))}if(t.is(".minicolors-opacity-slider")){g.opacity?d=parseFloat(1-k.y/E.height()).toFixed(2):d=1;g.opacity&&e.attr("data-opacity",d)}y.find("SPAN").css({backgroundColor:h,opacity:d});a(e,h,d)}function u(e,t){var n,r,i,s,o,u,f,l=e.parent(),d=e.data("minicolors-settings"),v=l.find(".minicolors-swatch"),y=l.find(".minicolors-grid"),b=l.find(".minicolors-slider"),w=l.find(".minicolors-opacity-slider"),E=y.find("[class$=-picker]"),S=b.find("[class$=-picker]"),x=w.find("[class$=-picker]");n=c(h(e.val(),!0),d.letterCase);n||(n=c(h(d.defaultValue,!0),d.letterCase));r=g(n);t||e.val(n);if(d.opacity){i=e.attr("data-opacity")===""?1:p(parseFloat(e.attr("data-opacity")).toFixed(2),0,1);isNaN(i)&&(i=1);e.attr("data-opacity",i);v.find("SPAN").css("opacity",i);o=p(w.height()-w.height()*i,0,w.height());x.css("top",o+"px")}v.find("SPAN").css("backgroundColor",n);switch(d.control){case"wheel":u=p(Math.ceil(r.s*.75),0,y.height()/2);f=r.h*Math.PI/180;s=p(75-Math.cos(f)*u,0,y.width());o=p(75-Math.sin(f)*u,0,y.height());E.css({top:o+"px",left:s+"px"});o=150-r.b/(100/y.height());n===""&&(o=0);S.css("top",o+"px");b.css("backgroundColor",m({h:r.h,s:r.s,b:100}));break;case"saturation":s=p(5*r.h/12,0,150);o=p(y.height()-Math.ceil(r.b/(100/y.height())),0,y.height());E.css({top:o+"px",left:s+"px"});o=p(b.height()-r.s*(b.height()/100),0,b.height());S.css("top",o+"px");b.css("backgroundColor",m({h:r.h,s:100,b:r.b}));l.find(".minicolors-grid-inner").css("opacity",r.s/100);break;case"brightness":s=p(5*r.h/12,0,150);o=p(y.height()-Math.ceil(r.s/(100/y.height())),0,y.height());E.css({top:o+"px",left:s+"px"});o=p(b.height()-r.b*(b.height()/100),0,b.height());S.css("top",o+"px");b.css("backgroundColor",m({h:r.h,s:r.s,b:100}));l.find(".minicolors-grid-inner").css("opacity",1-r.b/100);break;default:s=p(Math.ceil(r.s/(100/y.width())),0,y.width());o=p(y.height()-Math.ceil(r.b/(100/y.height())),0,y.height());E.css({top:o+"px",left:s+"px"});o=p(b.height()-r.h/(360/b.height()),0,b.height());S.css("top",o+"px");y.css("backgroundColor",m({h:r.h,s:100,b:100}))}e.data("minicolors-initialized")&&a(e,n,i)}function a(e,t,n){var r=e.data("minicolors-settings"),i=e.data("minicolors-lastChange");if(!i||i.hex!==t||i.opacity!==n){e.data("minicolors-lastChange",{hex:t,opacity:n});if(r.change)if(r.changeDelay){clearTimeout(e.data("minicolors-changeTimeout"));e.data("minicolors-changeTimeout",setTimeout(function(){r.change.call(e.get(0),t,n)},r.changeDelay))}else r.change.call(e.get(0),t,n);e.trigger("change").trigger("input")}}function f(t){var n=h(e(t).val(),!0),r=b(n),i=e(t).attr("data-opacity");if(!r)return null;i!==undefined&&e.extend(r,{a:parseFloat(i)});return r}function l(t,n){var r=h(e(t).val(),!0),i=b(r),s=e(t).attr("data-opacity");if(!i)return null;s===undefined&&(s=1);return n?"rgba("+i.r+", "+i.g+", "+i.b+", "+parseFloat(s)+")":"rgb("+i.r+", "+i.g+", "+i.b+")"}function c(e,t){return t==="uppercase"?e.toUpperCase():e.toLowerCase()}function h(e,t){e=e.replace(/[^A-F0-9]/ig,"");if(e.length!==3&&e.length!==6)return"";e.length===3&&t&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);return"#"+e}function p(e,t,n){e<t&&(e=t);e>n&&(e=n);return e}function d(e){var t={},n=Math.round(e.h),r=Math.round(e.s*255/100),i=Math.round(e.b*255/100);if(r===0)t.r=t.g=t.b=i;else{var s=i,o=(255-r)*i/255,u=(s-o)*(n%60)/60;n===360&&(n=0);if(n<60){t.r=s;t.b=o;t.g=o+u}else if(n<120){t.g=s;t.b=o;t.r=s-u}else if(n<180){t.g=s;t.r=o;t.b=o+u}else if(n<240){t.b=s;t.r=o;t.g=s-u}else if(n<300){t.b=s;t.g=o;t.r=o+u}else if(n<360){t.r=s;t.g=o;t.b=s-u}else{t.r=0;t.g=0;t.b=0}}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}function v(t){var n=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];e.each(n,function(e,t){t.length===1&&(n[e]="0"+t)});return"#"+n.join("")}function m(e){return v(d(e))}function g(e){var t=y(b(e));t.s===0&&(t.h=360);return t}function y(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),i=r-n;t.b=r;t.s=r!==0?255*i/r:0;t.s!==0?e.r===r?t.h=(e.g-e.b)/i:e.g===r?t.h=2+(e.b-e.r)/i:t.h=4+(e.r-e.g)/i:t.h=-1;t.h*=60;t.h<0&&(t.h+=360);t.s*=100/255;t.b*=100/255;return t}function b(e){e=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:e>>16,g:(e&65280)>>8,b:e&255}}e.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",hide:null,hideSpeed:100,inline:!1,letterCase:"lowercase",opacity:!1,position:"bottom left",show:null,showSpeed:100,theme:"default"}};e.extend(e.fn,{minicolors:function(s,o){switch(s){case"destroy":e(this).each(function(){n(e(this))});return e(this);case"hide":i();return e(this);case"opacity":if(o===undefined)return e(this).attr("data-opacity");e(this).each(function(){u(e(this).attr("data-opacity",o))});return e(this);case"rgbObject":return f(e(this),s==="rgbaObject");case"rgbString":case"rgbaString":return l(e(this),s==="rgbaString");case"settings":if(o===undefined)return e(this).data("minicolors-settings");e(this).each(function(){var t=e(this).data("minicolors-settings")||{};n(e(this));e(this).minicolors(e.extend(!0,t,o))});return e(this);case"show":r(e(this).eq(0));return e(this);case"value":if(o===undefined)return e(this).val();e(this).each(function(){u(e(this).val(o))});return e(this);default:s!=="create"&&(o=s);e(this).each(function(){t(e(this),o)});return e(this)}}});e(document).on("mousedown.minicolors touchstart.minicolors",function(t){e(t.target).parents().add(t.target).hasClass("minicolors")||i()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(t){var n=e(this);t.preventDefault();e(document).data("minicolors-target",n);s(n,t,!0)}).on("mousemove.minicolors touchmove.minicolors",function(t){var n=e(document).data("minicolors-target");n&&s(n,t)}).on("mouseup.minicolors touchend.minicolors",function(){e(this).removeData("minicolors-target")}).on("mousedown.minicolors touchstart.minicolors",".minicolors-swatch",function(t){var n=e(this).parent().find(".minicolors-input");t.preventDefault();r(n)}).on("focus.minicolors",".minicolors-input",function(){var t=e(this);if(!t.data("minicolors-initialized"))return;r(t)}).on("blur.minicolors",".minicolors-input",function(){var t=e(this),n=t.data("minicolors-settings");if(!t.data("minicolors-initialized"))return;t.val(h(t.val(),!0));t.val()===""&&t.val(h(n.defaultValue,!0));t.val(c(t.val(),n.letterCase))}).on("keydown.minicolors",".minicolors-input",function(t){var n=e(this);if(!n.data("minicolors-initialized"))return;switch(t.keyCode){case 9:i();break;case 13:case 27:i();n.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var t=e(this);if(!t.data("minicolors-initialized"))return;u(t,!0)}).on("paste.minicolors",".minicolors-input",function(){var t=e(this);if(!t.data("minicolors-initialized"))return;setTimeout(function(){u(t,!0)},1)})}(jQuery);  
9 \ No newline at end of file 1 \ No newline at end of file
  2 +(function (c) { "function" === typeof define && define.amd ? define(["jquery"], c) : "object" === typeof exports ? module.exports = c(require("jquery")) : c(jQuery) })(function (c) {
  3 + function L(a, b) {
  4 + var d = c('<div class="minicolors" />'), e = c.minicolors.defaults, m; if (!a.data("minicolors-initialized")) {
  5 + b = c.extend(!0, {}, e, b); d.addClass("minicolors-theme-" + b.theme).toggleClass("minicolors-with-opacity", b.opacity); void 0 !== b.position && c.each(b.position.split(" "), function () { d.addClass("minicolors-position-" + this) }); e = "rgb" ===
  6 + b.format ? b.opacity ? "25" : "20" : b.keywords ? "11" : "7"; a.addClass("minicolors-input").data("minicolors-initialized", !1).data("minicolors-settings", b).prop("size", e).wrap(d).after('<div class="minicolors-panel minicolors-slider-' + b.control + '"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>');
  7 + b.inline || (a.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>'), a.next(".minicolors-input-swatch").on("click", function (b) { b.preventDefault(); a.focus() })); e = a.parent().find(".minicolors-panel"); e.on("selectstart", function () { return !1 }).end(); if (b.swatches && 0 !== b.swatches.length) {
  8 + e.addClass("minicolors-with-swatches"); var l = c('<ul class="minicolors-swatches"></ul>').appendTo(e); for (m = 0; m < b.swatches.length; ++m) {
  9 + if ("object" ===
  10 + c.type(b.swatches[m])) { e = b.swatches[m].name; var h = b.swatches[m].color } else e = "", h = b.swatches[m]; h = p(h) ? q(h, !0) : u(x(h, !0)); c('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" title="' + e + '"></span></li>').appendTo(l).data("swatch-color", b.swatches[m]).find(".minicolors-swatch-color").css({ backgroundColor: B(h), opacity: h.a }); b.swatches[m] = h
  11 + }
  12 + } b.inline && a.parent().addClass("minicolors-inline"); w(a, !1); a.data("minicolors-initialized", !0)
  13 + }
  14 + } function E(a) {
  15 + var b = a.parent();
  16 + a.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"); b.before(a).remove()
  17 + } function C(a) { c("#modeleditstyle").draggable("disable"); var b = a.parent(), d = b.find(".minicolors-panel"), e = a.data("minicolors-settings"); !a.data("minicolors-initialized") || a.prop("disabled") || b.hasClass("minicolors-inline") || b.hasClass("minicolors-focus") || (z(), b.addClass("minicolors-focus"), d.stop(!0, !0).fadeIn(e.showSpeed, function () { e.show && e.show.call(a.get(0)) })) }
  18 + function z() { c(".minicolors-focus").each(function () { var a = c(this), b = a.find(".minicolors-input"), d = a.find(".minicolors-panel"), e = b.data("minicolors-settings"); d.fadeOut(e.hideSpeed, function () { c("#modeleditstyle").draggable("enable"); e.hide && e.hide.call(b.get(0)); a.removeClass("minicolors-focus") }) }) } function F(a, b, d) {
  19 + var e = a.parents(".minicolors").find(".minicolors-input"), c = e.data("minicolors-settings"), l = a.find("[class$=-picker]"), h = a.offset().left, k = a.offset().top, g = Math.round(b.pageX - h), f = Math.round(b.pageY -
  20 + k); d = d ? c.animationSpeed : 0; b.originalEvent.changedTouches && (g = b.originalEvent.changedTouches[0].pageX - h, f = b.originalEvent.changedTouches[0].pageY - k); 0 > g && (g = 0); 0 > f && (f = 0); g > a.width() && (g = a.width()); f > a.height() && (f = a.height()); a.parent().is(".minicolors-slider-wheel") && l.parent().is(".minicolors-grid") && (h = 75 - g, k = 75 - f, b = Math.sqrt(h * h + k * k), h = Math.atan2(k, h), 0 > h && (h += 2 * Math.PI), 75 < b && (b = 75, g = 75 - 75 * Math.cos(h), f = 75 - 75 * Math.sin(h)), g = Math.round(g), f = Math.round(f)); a.is(".minicolors-grid") ? l.stop(!0).animate({
  21 + top: f +
  22 + "px", left: g + "px"
  23 + }, d, c.animationEasing, function () { G(e, a) }) : l.stop(!0).animate({ top: f + "px" }, d, c.animationEasing, function () { G(e, a) })
  24 + } function G(a, b) {
  25 + function d(a, b) { if (!a.length || !b) return null; var d = a.offset().left; var e = a.offset().top; return { x: d - b.offset().left + a.outerWidth() / 2, y: e - b.offset().top + a.outerHeight() / 2 } } var e = a.val(); var c = a.attr("data-opacity"); var l = a.parent(); var h = a.data("minicolors-settings"); var k = l.find(".minicolors-swatch"); var g = l.find(".minicolors-grid"); var r = l.find(".minicolors-slider"),
  26 + p = l.find(".minicolors-opacity-slider"); var n = g.find("[class$=-picker]"); var t = r.find("[class$=-picker]"), q = p.find("[class$=-picker]"); n = d(n, g); t = d(t, r); q = d(q, p); if (b.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")) {
  27 + switch (h.control) {
  28 + case "wheel": e = g.width() / 2 - n.x; l = g.height() / 2 - n.y; g = Math.sqrt(e * e + l * l); e = Math.atan2(l, e); 0 > e && (e += 2 * Math.PI); 75 < g && (g = 75, n.x = 69 - 75 * Math.cos(e), n.y = 69 - 75 * Math.sin(e)); c = f(g / .75, 0, 100); k = f(180 * e / Math.PI, 0, 360); n = f(100 - Math.floor(t.y * (100 / r.height())),
  29 + 0, 100); e = v({ h: k, s: c, b: n }); r.css("backgroundColor", v({ h: k, s: c, b: 100 })); break; case "saturation": k = f(parseInt(n.x * (360 / g.width()), 10), 0, 360); c = f(100 - Math.floor(t.y * (100 / r.height())), 0, 100); n = f(100 - Math.floor(n.y * (100 / g.height())), 0, 100); e = v({ h: k, s: c, b: n }); r.css("backgroundColor", v({ h: k, s: 100, b: n })); l.find(".minicolors-grid-inner").css("opacity", c / 100); break; case "brightness": k = f(parseInt(n.x * (360 / g.width()), 10), 0, 360); c = f(100 - Math.floor(n.y * (100 / g.height())), 0, 100); n = f(100 - Math.floor(t.y * (100 / r.height())),
  30 + 0, 100); e = v({ h: k, s: c, b: n }); r.css("backgroundColor", v({ h: k, s: c, b: 100 })); l.find(".minicolors-grid-inner").css("opacity", 1 - n / 100); break; default: k = f(360 - parseInt(t.y * (360 / r.height()), 10), 0, 360), c = f(Math.floor(n.x * (100 / g.width())), 0, 100), n = f(100 - Math.floor(n.y * (100 / g.height())), 0, 100), e = v({ h: k, s: c, b: n }), g.css("backgroundColor", v({ h: k, s: 100, b: 100 }))
  31 + } c = h.opacity ? parseFloat(1 - q.y / p.height()).toFixed(2) : 1; H(a, e, c)
  32 + } else k.find("span").css({ backgroundColor: e, opacity: c }), D(a, e, c)
  33 + } function H(a, b, d) {
  34 + var e = a.parent(),
  35 + c = a.data("minicolors-settings"); e = e.find(".minicolors-input-swatch"); c.opacity && a.attr("data-opacity", d); if ("rgb" === c.format) { b = p(b) ? q(b, !0) : u(x(b, !0)); d = "" === a.attr("data-opacity") ? 1 : f(parseFloat(a.attr("data-opacity")).toFixed(2), 0, 1); if (isNaN(d) || !c.opacity) d = 1; b = 1 >= a.minicolors("rgbObject").a && b && c.opacity ? "rgba(" + b.r + ", " + b.g + ", " + b.b + ", " + parseFloat(d) + ")" : "rgb(" + b.r + ", " + b.g + ", " + b.b + ")" } else p(b) && (b = I(b)), b = A(b, c.letterCase); a.val(b); e.find("span").css({ backgroundColor: b, opacity: d }); D(a,
  36 + b, d)
  37 + } function w(a, b) {
  38 + var d; var e = a.parent(); var m = a.data("minicolors-settings"); var l = e.find(".minicolors-input-swatch"); var h = e.find(".minicolors-grid"), k = e.find(".minicolors-slider"); var g = e.find(".minicolors-opacity-slider"); var r = h.find("[class$=-picker]"), u = k.find("[class$=-picker]"), n = g.find("[class$=-picker]"); if (p(a.val())) { var t = I(a.val()); (d = f(parseFloat(J(a.val())).toFixed(2), 0, 1)) && a.attr("data-opacity", d) } else t = A(x(a.val(), !0), m.letterCase); t || (t = A(K(m.defaultValue, !0), m.letterCase));
  39 + d = M(t); var w = m.keywords ? c.map(m.keywords.split(","), function (a) { return c.trim(a.toLowerCase()) }) : []; w = "" !== a.val() && -1 < c.inArray(a.val().toLowerCase(), w) ? A(a.val()) : p(a.val()) ? q(a.val()) : t; b || a.val(w); if (m.opacity) { var y = "" === a.attr("data-opacity") ? 1 : f(parseFloat(a.attr("data-opacity")).toFixed(2), 0, 1); isNaN(y) && (y = 1); a.attr("data-opacity", y); l.find("span").css("opacity", y); g = f(g.height() - g.height() * y, 0, g.height()); n.css("top", g + "px") } "transparent" === a.val().toLowerCase() && l.find("span").css("opacity",
  40 + 0); l.find("span").css("backgroundColor", t); switch (m.control) {
  41 + case "wheel": e = f(Math.ceil(.75 * d.s), 0, h.height() / 2); l = d.h * Math.PI / 180; m = f(75 - Math.cos(l) * e, 0, h.width()); g = f(75 - Math.sin(l) * e, 0, h.height()); r.css({ top: g + "px", left: m + "px" }); g = 150 - d.b / (100 / h.height()); "" === t && (g = 0); u.css("top", g + "px"); k.css("backgroundColor", v({ h: d.h, s: d.s, b: 100 })); break; case "saturation": m = f(5 * d.h / 12, 0, 150); g = f(h.height() - Math.ceil(d.b / (100 / h.height())), 0, h.height()); r.css({ top: g + "px", left: m + "px" }); g = f(k.height() - d.s * (k.height() /
  42 + 100), 0, k.height()); u.css("top", g + "px"); k.css("backgroundColor", v({ h: d.h, s: 100, b: d.b })); e.find(".minicolors-grid-inner").css("opacity", d.s / 100); break; case "brightness": m = f(5 * d.h / 12, 0, 150); g = f(h.height() - Math.ceil(d.s / (100 / h.height())), 0, h.height()); r.css({ top: g + "px", left: m + "px" }); g = f(k.height() - d.b * (k.height() / 100), 0, k.height()); u.css("top", g + "px"); k.css("backgroundColor", v({ h: d.h, s: d.s, b: 100 })); e.find(".minicolors-grid-inner").css("opacity", 1 - d.b / 100); break; default: m = f(Math.ceil(d.s / (100 / h.width())),
  43 + 0, h.width()), g = f(h.height() - Math.ceil(d.b / (100 / h.height())), 0, h.height()), r.css({ top: g + "px", left: m + "px" }), g = f(k.height() - d.h / (360 / k.height()), 0, k.height()), u.css("top", g + "px"), h.css("backgroundColor", v({ h: d.h, s: 100, b: 100 }))
  44 + } a.data("minicolors-initialized") && D(a, w, y)
  45 + } function D(a, b, d) {
  46 + var e = a.data("minicolors-settings"), c = a.data("minicolors-lastChange"), f; if (!c || c.value !== b || c.opacity !== d) {
  47 + a.data("minicolors-lastChange", { value: b, opacity: d }); if (e.swatches && 0 !== e.swatches.length) {
  48 + c = p(b) ? q(b, !0) : u(b);
  49 + var h = -1; for (f = 0; f < e.swatches.length; ++f) if (c.r === e.swatches[f].r && c.g === e.swatches[f].g && c.b === e.swatches[f].b && c.a === e.swatches[f].a) { h = f; break } a.parent().find(".minicolors-swatches .minicolors-swatch").removeClass("selected"); -1 !== h && a.parent().find(".minicolors-swatches .minicolors-swatch").eq(f).addClass("selected")
  50 + } e.change && (e.changeDelay ? (clearTimeout(a.data("minicolors-changeTimeout")), a.data("minicolors-changeTimeout", setTimeout(function () { e.change.call(a.get(0), b, d) }, e.changeDelay))) : e.change.call(a.get(0),
  51 + b, d)); a.trigger("change").trigger("input")
  52 + }
  53 + } function N(a) { var b = c(a).attr("data-opacity"); p(c(a).val()) ? a = q(c(a).val(), !0) : (a = x(c(a).val(), !0), a = u(a)); if (!a) return null; void 0 !== b && c.extend(a, { a: parseFloat(b) }); return a } function O(a, b) { var d = c(a).attr("data-opacity"); if (p(c(a).val())) var e = q(c(a).val(), !0); else e = x(c(a).val(), !0), e = u(e); if (!e) return null; void 0 === d && (d = 1); return b ? "rgba(" + e.r + ", " + e.g + ", " + e.b + ", " + parseFloat(d) + ")" : "rgb(" + e.r + ", " + e.g + ", " + e.b + ")" } function A(a, b) {
  54 + return "uppercase" ===
  55 + b ? a.toUpperCase() : a.toLowerCase()
  56 + } function x(a, b) { a = a.replace(/^#/g, ""); if (!a.match(/^[A-F0-9]{3,6}/ig) || 3 !== a.length && 6 !== a.length) return ""; 3 === a.length && b && (a = a[0] + a[0] + a[1] + a[1] + a[2] + a[2]); return "#" + a } function q(a, b) {
  57 + var d = a.replace(/[^\d,.]/g, "").split(","); d[0] = f(parseInt(d[0], 10), 0, 255); d[1] = f(parseInt(d[1], 10), 0, 255); d[2] = f(parseInt(d[2], 10), 0, 255); d[3] && (d[3] = f(parseFloat(d[3], 10), 0, 1)); return b ? d[3] ? { r: d[0], g: d[1], b: d[2], a: d[3] } : { r: d[0], g: d[1], b: d[2] } : "undefined" !== typeof d[3] && 1 >= d[3] ? "rgba(" +
  58 + d[0] + ", " + d[1] + ", " + d[2] + ", " + d[3] + ")" : "rgb(" + d[0] + ", " + d[1] + ", " + d[2] + ")"
  59 + } function K(a, b) { return p(a) ? q(a) : x(a, b) } function f(a, b, d) { a < b && (a = b); a > d && (a = d); return a } function p(a) { return (a = a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i)) && 4 === a.length ? !0 : !1 } function J(a) { return (a = a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i)) && 6 === a.length ? a[4] : "1" } function I(a) {
  60 + return (a = a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i)) &&
  61 + 4 === a.length ? "#" + ("0" + parseInt(a[1], 10).toString(16)).slice(-2) + ("0" + parseInt(a[2], 10).toString(16)).slice(-2) + ("0" + parseInt(a[3], 10).toString(16)).slice(-2) : ""
  62 + } function B(a) { var b = [a.r.toString(16), a.g.toString(16), a.b.toString(16)]; c.each(b, function (a, c) { 1 === c.length && (b[a] = "0" + c) }); return "#" + b.join("") } function v(a) {
  63 + var b, d; var c = Math.round(a.h); var f = Math.round(255 * a.s / 100); a = Math.round(255 * a.b / 100); if (0 === f) c = b = d = a; else {
  64 + f = (255 - f) * a / 255; var l = c % 60 * (a - f) / 60; 360 === c && (c = 0); 60 > c ? (c = a, d = f, b = f + l) :
  65 + 120 > c ? (b = a, d = f, c = a - l) : 180 > c ? (b = a, c = f, d = f + l) : 240 > c ? (d = a, c = f, b = a - l) : 300 > c ? (d = a, b = f, c = f + l) : 360 > c ? (c = a, b = f, d = a - l) : d = b = c = 0
  66 + } return B({ r: Math.round(c), g: Math.round(b), b: Math.round(d) })
  67 + } function M(a) { a = u(a); var b = { h: 0, s: 0, b: 0 }, c = Math.max(a.r, a.g, a.b), e = c - Math.min(a.r, a.g, a.b); b.b = c; b.s = 0 !== c ? 255 * e / c : 0; b.h = 0 !== b.s ? a.r === c ? (a.g - a.b) / e : a.g === c ? 2 + (a.b - a.r) / e : 4 + (a.r - a.g) / e : -1; b.h *= 60; 0 > b.h && (b.h += 360); b.s *= 100 / 255; b.b *= 100 / 255; 0 === b.s && (b.h = 360); return b } function u(a) {
  68 + a = parseInt(-1 < a.indexOf("#") ? a.substring(1) :
  69 + a, 16); return { r: a >> 16, g: (a & 65280) >> 8, b: a & 255 }
  70 + } c.minicolors = { defaults: { animationSpeed: 50, animationEasing: "swing", change: null, changeDelay: 0, control: "hue", defaultValue: "", format: "hex", hide: null, hideSpeed: 100, inline: !1, keywords: "", letterCase: "lowercase", opacity: !1, position: "bottom", show: null, showSpeed: 100, theme: "default", swatches: [] } }; c.extend(c.fn, {
  71 + minicolors: function (a, b) {
  72 + switch (a) {
  73 + case "destroy": return c(this).each(function () { E(c(this)) }), c(this); case "hide": return z(), c(this); case "opacity": if (void 0 ===
  74 + b) return c(this).attr("data-opacity"); c(this).each(function () { w(c(this).attr("data-opacity", b)) }); return c(this); case "rgbObject": return N(c(this), "rgbaObject" === a); case "rgbString": case "rgbaString": return O(c(this), "rgbaString" === a); case "settings": if (void 0 === b) return c(this).data("minicolors-settings"); c(this).each(function () { var a = c(this).data("minicolors-settings") || {}; E(c(this)); c(this).minicolors(c.extend(!0, a, b)) }); return c(this); case "show": return C(c(this).eq(0)), c(this); case "value": if (void 0 ===
  75 + b) return c(this).val(); c(this).each(function () { "object" === typeof b && null !== b ? (void 0 !== b.opacity && c(this).attr("data-opacity", f(b.opacity, 0, 1)), b.color && c(this).val(b.color)) : c(this).val(b); w(c(this)) }); return c(this); default: return "create" !== a && (b = a), c(this).each(function () { L(c(this), b) }), c(this)
  76 + }
  77 + }
  78 + }); c([document]).on("mousedown.minicolors touchstart.minicolors", function (a) { c(a.target).parents().add(a.target).hasClass("minicolors") || z() }).on("mousedown.minicolors touchstart.minicolors", ".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",
  79 + function (a) { var b = c(this); a.preventDefault(); c(a.delegateTarget).data("minicolors-target", b); F(b, a, !0) }).on("mousemove.minicolors touchmove.minicolors", function (a) { var b = c(a.delegateTarget).data("minicolors-target"); b && F(b, a) }).on("mouseup.minicolors touchend.minicolors", function () { c(this).removeData("minicolors-target") }).on("click.minicolors", ".minicolors-swatches li", function (a) {
  80 + a.preventDefault(); var b = c(this); a = b.parents(".minicolors").find(".minicolors-input"); b = b.data("swatch-color"); H(a, b,
  81 + J(b)); w(a)
  82 + }).on("mousedown.minicolors touchstart.minicolors", ".minicolors-input-swatch", function (a) { var b = c(this).parent().find(".minicolors-input"); a.preventDefault(); C(b) }).on("focus.minicolors", ".minicolors-input", function () { var a = c(this); a.data("minicolors-initialized") && C(a) }).on("blur.minicolors", ".minicolors-input", function () {
  83 + var a = c(this), b = a.data("minicolors-settings"); if (a.data("minicolors-initialized")) {
  84 + var d = b.keywords ? c.map(b.keywords.split(","), function (a) { return c.trim(a.toLowerCase()) }) :
  85 + []; if ("" !== a.val() && -1 < c.inArray(a.val().toLowerCase(), d)) var e = a.val(); else d = p(a.val()) ? q(a.val(), !0) : (d = x(a.val(), !0)) ? u(d) : null, e = null === d ? b.defaultValue : "rgb" === b.format ? b.opacity ? q("rgba(" + d.r + "," + d.g + "," + d.b + "," + a.attr("data-opacity") + ")") : q("rgb(" + d.r + "," + d.g + "," + d.b + ")") : B(d); d = b.opacity ? a.attr("data-opacity") : 1; "transparent" === e.toLowerCase() && (d = 0); a.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity", d); a.val(e); "" === a.val() && a.val(K(b.defaultValue, !0)); a.val(A(a.val(),
  86 + b.letterCase))
  87 + }
  88 + }).on("keydown.minicolors", ".minicolors-input", function (a) { var b = c(this); if (b.data("minicolors-initialized")) switch (a.which) { case 9: z(); break; case 13: case 27: z(), b.blur() } }).on("keyup.minicolors", ".minicolors-input", function () { var a = c(this); a.data("minicolors-initialized") && w(a, !0) }).on("paste.minicolors", ".minicolors-input", function () { var a = c(this); a.data("minicolors-initialized") && setTimeout(function () { w(a, !0) }, 1) })
  89 +});
10 \ No newline at end of file 90 \ No newline at end of file