Przeglądaj źródła

Merge branch '塔里木分支' of 123.57.209.16:bjquanjiang/DigitalScholl into 塔里木分支

新疆影视学院高职
liangkun 2 lat temu
rodzic
commit
ad510fa84a
100 zmienionych plików z 6140 dodań i 383 usunięć
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentPre/OpenLessonPlanOfElectiveStudentPre.js
  2. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentPre/form/form.js
  3. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentSelected/OpenLessonPlanOfElectiveStudentSelected.js
  4. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentSelected/form/form.js
  5. +0
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.css
  6. +0
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.html
  7. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.js
  8. +0
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/form/form.css
  9. +0
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/form/form.html
  10. +5
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/form/form.js
  11. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs
  12. +7
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentEntity.cs
  13. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentIBLL.cs
  14. +111
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemController.cs
  15. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.cshtml
  16. +38
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js
  17. +39
    -29
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/QRPrint.cshtml
  18. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs
  19. +20
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs
  20. +64
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchStuController.cs
  21. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml
  22. +15
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
  23. +9
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml
  24. +20
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js
  25. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.cshtml
  26. +11
    -16
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.js
  27. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.cshtml
  28. +5
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.js
  29. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.cshtml
  30. +16
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.js
  31. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Index.js
  32. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Statistics.cshtml
  33. +177
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Statistics.js
  34. +42
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/StatisticsTeach.cshtml
  35. +147
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/StatisticsTeach.js
  36. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.cshtml
  37. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.js
  38. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.cshtml
  39. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.js
  40. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/DepartmentController.cs
  41. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/img1.png
  42. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  43. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  44. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AssetManagementSystem/Ass_AssetsInfoItemApi.cs
  45. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EvalApi.cs
  46. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OpenLessonPlanOfElectiveStudentApi.cs
  47. +26
    -14
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TransferApi.cs
  48. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Website/Web.config
  49. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Language/app.config
  50. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/app.config
  51. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemEntity.cs
  52. +12
    -12
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs
  53. +57
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
  54. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
  55. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs
  56. +8
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs
  57. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanTime/Exam_ExamPlanTimeEntity.cs
  58. +67
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs
  59. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuBLL.cs
  60. +23
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuEntity.cs
  61. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuIBLL.cs
  62. +202
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuService.cs
  63. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Learun.Util.csproj
  64. +133
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Web/QRCodeHelper.cs
  65. +73
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Web/ZipHelper.cs
  66. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/packages.config
  67. +16
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/.hbuilderx/launch.json
  68. +2
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js
  69. +15
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json
  70. +195
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/ScanAssetQRCode/from.vue
  71. +47
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/ScanAssetQRCode/list.vue
  72. +0
    -237
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/list.vue
  73. +4
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/OpenLessonPlanOfElectiveStudent/from.vue
  74. +243
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/OpenLessonPlanOfElectiveStudent/list.vue
  75. +68
    -0
      Learun.Framework.Ultimate V7/Quanjiang.DigitalSchool.Aspose/Quanjiang.DigitalSchool.Aspose.csproj
  76. +11
    -0
      Learun.Framework.Ultimate V7/Quanjiang.DigitalSchool.Aspose/app.config
  77. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/.signature.p7s
  78. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/Aspose.Cells.20.10.0.nupkg
  79. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/Help/Aspose.Cells For .NET Documentation.chm
  80. +103
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/License/thirdpartylicenses.Aspose.Cells.for.NET.pdf
  81. +687
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/acwmain.js
  82. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b1.gif
  83. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b2.gif
  84. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b3.gif
  85. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b4.gif
  86. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b5.gif
  87. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b6.gif
  88. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b7.gif
  89. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b8.gif
  90. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/collapse.gif
  91. +377
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/colordlg.htm
  92. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/dot.gif
  93. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/dropdown.gif
  94. BIN
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/expand.gif
  95. +59
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/findDlg.htm
  96. +986
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/findDlg.js
  97. +175
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/fontdlg.htm
  98. +564
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/fontdlg.js
  99. +169
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/fontdlg_l.htm
  100. +643
    -0
      Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/fontdlg_l.js

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentPre/OpenLessonPlanOfElectiveStudentPre.js Wyświetl plik

@@ -1,4 +1,4 @@
(function () {
(function () {
var weekChina = ["一", "二", "三", "四", "五", "六", "日"];
var begin = '';
var end = '';
@@ -116,7 +116,7 @@
_postData.keyValue = item.Id;
_postData.StuNo = JSON.parse(localStorage.userinfo).baseinfo.account;
learun.layer.loading(true, '正在取消报名...');
learun.httppost(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/CancelPre', _postData, (data, info) => {
learun.httppost(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/CancelPre', _postData, (data, info) => {
if (data) {// 成功
learun.layer.toast(info);
page.grid.reload();


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentPre/form/form.js Wyświetl plik

@@ -1,4 +1,4 @@
(function () {
(function () {
var keyValue = '';
var weekChina = ["一", "二", "三", "四", "五", "六", "日"];
var $header = null;
@@ -23,7 +23,7 @@
_postData.keyValue = keyValue;
_postData.StuNo = JSON.parse(localStorage.userinfo).baseinfo.account;
learun.layer.loading(true, '正在提交报名数据');
learun.httppost(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/SignInPre', _postData, (data,info) => {
learun.httppost(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/SignInPre', _postData, (data,info) => {
learun.layer.loading(false);
if (data) {// 表单数据保存成功
learun.layer.toast(info);
@@ -38,7 +38,7 @@
$page.find('.lr-form-container').setFormRead();
// 获取表单数据
learun.layer.loading(true, '获取表单数据');
learun.httpget(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form', keyValue, (data) => {
learun.httpget(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/form', keyValue, (data) => {
if (data) {
for (var id in data) {
if (data[id].length) {


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentSelected/OpenLessonPlanOfElectiveStudentSelected.js Wyświetl plik

@@ -1,4 +1,4 @@
(function () {
(function () {
var weekChina = ["一", "二", "三", "四", "五", "六", "日"];
var begin = '';
var end = '';
@@ -47,7 +47,7 @@
if (true) {
_postParam.queryJson = JSON.stringify({ StuNo: JSON.parse(localStorage.userinfo).baseinfo.account});
}
learun.httpget(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/studentpagelist', _postParam, (data) => {
learun.httpget(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/studentpagelist', _postParam, (data) => {
$page.find('.lr-badge').text('0');
if (data) {
$page.find('.lr-badge').text(data.records);


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentSelected/form/form.js Wyświetl plik

@@ -1,4 +1,4 @@
(function () {
(function () {
var keyValue = '';
var weekChina = ["一", "二", "三", "四", "五", "六", "日"];
var $header = null;
@@ -18,7 +18,7 @@
$page.find('.lr-form-container').setFormRead();
// 获取表单数据
learun.layer.loading(true, '获取表单数据');
learun.httpget(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form', keyValue, (data) => {
learun.httpget(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/form', keyValue, (data) => {
if (data) {
for (var id in data) {
if (data[id].length) {


Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.css → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.css Wyświetl plik


Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.html → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.html Wyświetl plik


Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.js → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/OpenLessonPlanOfElectiveStudent.js Wyświetl plik

@@ -47,7 +47,7 @@
if (true) {
_postParam.queryJson = JSON.stringify({ StuNo: JSON.parse(localStorage.userinfo).baseinfo.account, StuMajorNo: JSON.parse(localStorage.userinfo).baseinfo.majorno, StuGrade: JSON.parse(localStorage.userinfo).baseinfo.grade });
}
learun.httpget(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/pagelist', _postParam, (data) => {
learun.httpget(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/pagelist', _postParam, (data) => {
$page.find('.lr-badge').text('0');
if (data) {
$page.find('.lr-badge').text(data.records);
@@ -106,7 +106,7 @@
return '';
},
rowClick: function (item, $item, $page) {// 列表行点击触发方法
learun.nav.go({ path: 'EducationalAdministration/OpenLessonPlanOfElectiveStudent/form', title: '查看详情', type: 'right', param: { keyValue: item.Id } });
learun.nav.go({ path: 'OpenLessonPlanOfElectiveStudent/form', title: '查看详情', type: 'right', param: { keyValue: item.Id } });
},
btnClick: function (item, $item, $page) {// 左滑按钮点击事件
learun.layer.confirm('确定要取消报名吗?', function (_index) {
@@ -115,7 +115,7 @@
_postData.keyValue = item.Id;
_postData.StuNo = JSON.parse(localStorage.userinfo).baseinfo.account;
learun.layer.loading(true, '正在取消报名...');
learun.httppost(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/Cancel', _postData, (data, info) => {
learun.httppost(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/Cancel', _postData, (data, info) => {
if (data) {// 成功
learun.layer.toast(info);
page.grid.reload();

Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form/form.css → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/form/form.css Wyświetl plik


Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form/form.html → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/form/form.html Wyświetl plik


Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form/form.js → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/OpenLessonPlanOfElectiveStudent/form/form.js Wyświetl plik

@@ -1,4 +1,4 @@
(function () {
(function () {
var keyValue = '';
var weekChina = ["一", "二", "三", "四", "五", "六", "日"];
var $header = null;
@@ -23,13 +23,13 @@
_postData.keyValue = keyValue;
_postData.StuNo = JSON.parse(localStorage.userinfo).baseinfo.account;
learun.layer.loading(true, '正在提交报名数据');
learun.httppost(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/SignInByMobile', _postData, (data, info) => {
learun.httppost(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/SignInByMobile', _postData, (data, info) => {
if (data) {// 表单数据保存成功
//判断队列结果
var timer = setInterval(function () {
learun.httppost(
config.webapi +
'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/GetApplyResult',
'learun/OpenLessonPlanOfElectiveStudent/GetApplyResult',
_postData,
(
dataresult, inforesult) => {
@@ -37,7 +37,7 @@
clearInterval(timer);
learun.layer.toast(inforesult);
learun.nav.closeCurrent();
var prepage = learun.nav.getpage('EducationalAdministration/OpenLessonPlanOfElectiveStudent');
var prepage = learun.nav.getpage('OpenLessonPlanOfElectiveStudent');
prepage.grid.reload();
});
}, 5000);
@@ -49,7 +49,7 @@
$page.find('.lr-form-container').setFormRead();
// 获取表单数据
learun.layer.loading(true, '获取表单数据');
learun.httpget(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form', keyValue, (data) => {
learun.httpget(config.webapi + 'learun/OpenLessonPlanOfElectiveStudent/form', keyValue, (data) => {
if (data) {
for (var id in data) {
if (data[id].length) {

+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs Wyświetl plik

@@ -432,6 +432,30 @@ namespace Learun.Application.Organization
}
}
}
/// <summary>
/// 保存部门信息(新增、修改)
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="departmentEntity">部门实体</param>
/// <returns></returns>
public void SaveEntity2(string keyValue, DepartmentEntity departmentEntity)
{
try
{
departmentService.SaveEntity(keyValue, departmentEntity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public List<DepartmentEntity> GetAllList()
{


+ 7
- 2
Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentEntity.cs Wyświetl plik

@@ -172,6 +172,11 @@ namespace Learun.Application.Organization
/// <returns></returns>
[Column("F_ORDER")]
public int? F_Order { get; set; }
/// <summary>
/// 发送标识(对接第三方人脸系统)
/// </summary>
[Column("SENDFLAG")]
public bool? SendFlag { get; set; }
#endregion

#region 扩展操作
@@ -200,8 +205,8 @@ namespace Learun.Application.Organization
this.F_ModifyDate = DateTime.Now;

UserInfo userInfo = LoginUserInfo.Get();
this.F_ModifyUserId = userInfo.userId;
this.F_ModifyUserName = userInfo.realName;
this.F_ModifyUserId = userInfo?.userId;
this.F_ModifyUserName = userInfo?.realName;
}
#endregion
}


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentIBLL.cs Wyświetl plik

@@ -89,6 +89,13 @@ namespace Learun.Application.Organization
/// <param name="departmentEntity">部门实体</param>
/// <returns></returns>
void SaveEntity(string keyValue, DepartmentEntity departmentEntity);
/// <summary>
/// 保存部门信息(新增、修改)
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="departmentEntity">部门实体</param>
/// <returns></returns>
void SaveEntity2(string keyValue, DepartmentEntity departmentEntity);
#endregion

List<DepartmentEntity> GetAllList();


+ 111
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemController.cs Wyświetl plik

@@ -3,6 +3,11 @@ using System.Data;
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Web.Mvc;
using System.Collections.Generic;
using ZipOneCode.ZipProvider;
using System.Linq;
using System.Drawing;
using System.IO;
using System;

namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
@@ -64,8 +69,31 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
return View();
}
[HttpGet]
public ActionResult QRPrint()
public ActionResult QRPrint(string keyValue)
{
var lists = new List<Ass_AssetsInfoItemEntity>();
if (!string.IsNullOrEmpty(keyValue))
{
foreach (var item in keyValue.Split(','))
{
var entity = ass_AssetsInfoItemIBLL.GetAss_AssetsInfoItemEntity(item);
if (entity != null)
{
lists.Add(entity);
//读图片
var d = QRCodeHelper.ProcessRequest(entity.AIId, @"~\Content\images\img1.png", "在册登记明细", entity.AIASSName + entity.AICode);
FileStream fs = new FileStream(d.resultImgPath, FileMode.Open, FileAccess.Read);
int length = (int)fs.Length;
byte[] image = new byte[length];
fs.Read(image, 0, length);
var src = "data:image/jepg;base64," + Convert.ToBase64String(image);
entity.ImgBase64String = src;
fs.Close();
}
}
}
ViewBag.Lists = lists;

return View();
}
#endregion
@@ -225,6 +253,88 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
ass_AssetsInfoItemIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 批量生成二维码
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult GetQRCode(string keyValue,Pagination pagination)
{
//TODO:文件夹压缩成zip
//var a = @"D:\Job\test\zip";
//var aa = string.Format(@"{0}.zip", a);
//ZipHelper.CreateZip(a, aa);

//TODO:生成带logo二维码
//var resultImgPath = QRCodeHelper.ProcessRequest("demo", @"~\Content\images\img1.png");

//TODO:生成二维码,并打包
//var dArr = new List<string>();
//for (int i = 0; i < 5; i++)
//{
// var d = QRCodeHelper.ProcessRequest("demo" + i, @"~\Content\images\img1.png", "demo" + i);
// if (dArr.IndexOf(d) == -1)
// {
// dArr.Add(d);
// }
//}
//foreach (var item in dArr)
//{
// ZipHelper.CreateZip(item, item + ".zip");
//}

//图片保存文件夹地址
var dArr = new List<string>();
//明细数据
var lists = new List<Ass_AssetsInfoItemEntity>();
if (!string.IsNullOrEmpty(keyValue))
{
foreach (var item in keyValue.Split(','))
{
var entity = ass_AssetsInfoItemIBLL.GetAss_AssetsInfoItemEntity(item);
if (entity != null)
{
lists.Add(entity);
}
}
}
else
{
var data = ass_AssetsInfoItemIBLL.GetPageList(pagination, "{}");
lists = data.ToList();
}
foreach (var item in lists)
{
var d = QRCodeHelper.ProcessRequest(item.AIId, @"~\Content\images\img1.png", "在册登记明细", item.AIASSName + item.AICode);
if (dArr.IndexOf(d.resultImgDirectoryPath) == -1)
{
dArr.Add(d.resultImgDirectoryPath);
}
}
foreach (var item in dArr)
{
ZipHelper.CreateZip(item, item + ".zip");
}

return Success("操作成功!二维码图片地址为:" + string.Join(",", dArr),dArr);

}
/// <summary>
/// 批量生成二维码下载
/// </summary>
/// <param name="path"></param>
[HttpPost]
public void DownFile(string path)
{
path = string.Format(@"{0}{1}", path, ".zip");
if (FileDownHelper.FileExists(path))
{
FileDownHelper.DownLoadold(path, path.Substring(path.LastIndexOf(@"\") + 1));
}
}
#endregion

}


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.cshtml Wyświetl plik

@@ -80,6 +80,9 @@
<a id="lr_detail" class="btn btn-default"><i class="fa fa-bars"></i>&nbsp;查看出入记录</a>
<a id="lr_usedetail" class="btn btn-default"><i class="fa fa-bars"></i>&nbsp;查看使用人员记录</a>
</div>
<div class=" btn-group btn-group-sm">
<a id="lr_getqrcode" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;批量生成二维码</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>


+ 38
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js Wyświetl plik

@@ -34,7 +34,7 @@ var bootstrap = function ($, learun) {
nodeClick: function (item) {
page.search({ AIASSClass: item.value });
}
});
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 400, 400);
@@ -65,7 +65,8 @@ var bootstrap = function ($, learun) {
height: 80
});
$("#lr_printBar").on('click', function () {
var keyValue = $('#gridtable').jfGridValue('AICode');
//var keyValue = $('#gridtable').jfGridValue('AICode');
var keyValue = $('#gridtable').jfGridValue('AIId');
var AName = $('#gridtable').jfGridValue('AIASSName');
if (learun.checkrow(keyValue)) {
//todo 打印标签
@@ -86,7 +87,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({
id: 'formcardprint',
title: '打印二维码',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/QRPrint?keyValue=' + keyValue+'&aName='+escape(AName),
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/QRPrint?keyValue=' + keyValue + '&aName=' + escape(AName),
width: 700,
height: 300,
btn: null,
@@ -184,6 +185,39 @@ var bootstrap = function ($, learun) {
}
});

//生成二维码
$('#lr_getqrcode').on('click', function () {
//console.log($('#gridtable')[0].dfop.running);
var keyValue = $('#gridtable').jfGridValue('AIId');
//js方法:
//if (keyValue != null && keyValue != "" && keyValue != undefined) {
// //console.log("有选中");
//} else {
// //console.log("无选中");
// if ($('#gridtable')[0].dfop.running.rowdata.length > 100) {
// learun.alert.warning("最多可以选择100条数据!");
// return false;
// }
// var bb = new Array();
// for (var i = 0; i < $('#gridtable')[0].dfop.running.rowdata.length; i++) {
// bb.push($('#gridtable')[0].dfop.running.rowdata[i]["jfgridRowData"]["AIId"]);
// }
// keyValue = bb.toString();
//}

learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetQRCode', { keyValue: keyValue, pagination: $('#gridtable')[0].dfop.running.pageparam }, function (res) {
//console.log(res);
if (res && res.code == "200") {
//top.layer.alert("二维码图片地址为:" + res.data, { icon: 7, title: "提示", yes: function (index) { layer.close(index) } });

//下载文件
for (var i = 0; i < res.data.length; i++) {
learun.download({ url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/DownFile', param: { path: res.data[i], __RequestVerificationToken: $.lrToken }, method: 'POST' });
}
}
});
});

},
// 初始化列表
initGird: function () {
@@ -377,7 +411,7 @@ var bootstrap = function ($, learun) {
mainId: 'AIId',
isMultiselect: true,
isPage: true,
sidx: 'AICodeNum'
sidx: 'AICodeNum',
});
page.search();
},


+ 39
- 29
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/QRPrint.cshtml Wyświetl plik

@@ -1,4 +1,5 @@
<!DOCTYPE html>
@using Learun.Application.TwoDevelopment.AssetManagementSystem
<!DOCTYPE html>


<html>
@@ -23,38 +24,47 @@
</head>

<body style="">
<div id="qrcodeBox" style="text-align:center;margin-top:20px;">
<div class="qrcodeBox" style="display:inline-block">
<div id="qrcode" style="margin:0 auto 5px;"></div>
<div class="qrcodeTxt" style="font-size:12px;"></div>
<div id="qrcodeBox" style="text-align:center;margin-top:20px;">
@*<div class="qrcodeBox" style="display:inline-block">
<div id="qrcode" style="margin:0 auto 5px;"></div>
<div class="qrcodeTxt" style="font-size:12px;"></div>
</div>*@

@foreach (Ass_AssetsInfoItemEntity item in ViewBag.Lists)
{
<div style="margin-bottom:20px;">
<img src="@item.ImgBase64String"/>
<div style="font-size:12px;">@item.AIASSName@item.AICode</div>
</div>
}

</div>
</div>
<div id="btnprint" type="button" class="btns" value="打印">打印</div>
<script>
//标签打印
var qrcode = new QRCode(document.getElementById("qrcode"), {
width: 80,
height: 80
});
var keyValue = request('keyValue');//二维码
var aName = request('aName');
$('.qrcodeTxt').html(unescape( aName));
$(function () {
qrcode.makeCode(keyValue);
$("#btnprint").on("click", function () {
AddPrintContent3()
});
<div id="btnprint" type="button" class="btns" value="打印">打印</div>
<script>
//标签打印
//var qrcode = new QRCode(document.getElementById("qrcode"), {
// width: 142,
// height: 142
//});
//var keyValue = request('keyValue');//二维码
//var aName = request('aName');
//$('.qrcodeTxt').html(unescape(aName));
$(function () {
//qrcode.makeCode(keyValue);
$("#btnprint").on("click", function () {
AddPrintContent3()
});


});
// 打印表单
});
// 打印表单

function AddPrintContent3() {
$('#btnprint').css('display', 'none')
window.print();
$('#btnprint').css('display', 'block')
}
</script>
function AddPrintContent3() {
$('#btnprint').css('display', 'none')
window.print();
$('#btnprint').css('display', 'block')
}
</script>
</body>

</html>

+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs Wyświetl plik

@@ -357,6 +357,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers

return Success("操作成功!");
}

/// <summary>
/// 审核所有考试课程
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult CheckAllPlanLesson(string keyValue)
{
var res = exam_ExamPlanLessonIBLL.CheckAllPlanLesson(keyValue);
if (!res.flag)
{
return Fail(res.str);
}

return Success("操作成功!");
}
#endregion

}


+ 20
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs Wyświetl plik

@@ -21,7 +21,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL();
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL();
private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL();
private StuInfoBasicIBLL StuInfoBasicIBLL = new StuInfoBasicBLL();

#region 视图功能

@@ -152,7 +151,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
[HttpGet]
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForLesson(string pagination, string queryJson)
{
@@ -227,6 +226,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success(data);
}


/// <summary>
/// 获取考试记录安排时间数据
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetExamDateSel(string EPLId)
{
var data = exam_ExamPlanLessonIBLL.GetExamDateSel(EPLId);
return Success(data);
}
#endregion

#region 提交数据
@@ -334,12 +345,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}

entity.EPLId = keyValue;
//判断考试时间是否冲突
//var res = exam_ExamPlanLessonIBLL.IsExamTimeClash(entity);
//if (res.flag && !string.IsNullOrEmpty(res.lessonname))
//{
// return Fail("考试时间与课程(" + res.lessonname + ")冲突!");
//}

//判断考试时间是否冲突,同一专业同一时间段只能安排一门考试课程
var res = exam_ExamPlanLessonIBLL.IsAllowSave(entity);
if (!res.flag && !string.IsNullOrEmpty(res.str))
{
return Fail(res.str);
}

//保存
exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity);


+ 64
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchStuController.cs Wyświetl plik

@@ -3,6 +3,7 @@ using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
@@ -16,6 +17,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public class HealthPunchStuController : MvcControllerBase
{
private HealthPunchStuIBLL healthPunchStuIBLL = new HealthPunchStuBLL();
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();

#region 视图功能

@@ -37,6 +39,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Statistics()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
/// <returns></returns>
[HttpGet]
public ActionResult StatisticsTeach()
{
return View();
}
#endregion

#region 获取数据
@@ -78,6 +99,49 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
return Success(jsonData);
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetStatistics(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = healthPunchStuIBLL.GetStatistics(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetStatisticsTeach(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = healthPunchStuIBLL.GetStatisticsTeach(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
#endregion

#region 提交数据


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml Wyświetl plik

@@ -2,7 +2,7 @@
ViewBag.Title = "考试记录表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
@@ -72,6 +72,7 @@
<li id="lr_examclass"><a><i></i>&nbsp;<span class="lrlt">一键安排班级</span></a></li>
<li id="lr_examroom"><a><i></i>&nbsp;<span class="lrlt">一键安排考场</span></a></li>
<li id="lr_examteacher"><a><i></i>&nbsp;<span class="lrlt">一键安排监考老师</span></a></li>
<li id="lr_checkAll"><a><i></i>&nbsp;<span class="lrlt">一键审核所有考试课程</span></a></li>
</ul>
</div>



+ 15
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js Wyświetl plik

@@ -237,7 +237,21 @@ var bootstrap = function ($, learun) {
});
}
});

//一键审核所有考试课程
$('#lr_checkAll').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认审核所有考试课程!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/CheckAllPlanLesson', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

//老师时间管理
$('#lr_teacherTimeManage').on('click', function () {


+ 9
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml Wyświetl plik

@@ -4,16 +4,20 @@
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanLesson">
<div class="lr-form-item-title">考试时间<font face="宋体">*</font></div>
<div id="ExamDateSel" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanLesson" style="display: none;">
<div class="lr-form-item-title">考试日期<font face="宋体">*</font></div>
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" />
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson">
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson" style="display: none;">
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div>
<input id="ExamTimeStart" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00"/>
<input id="ExamTimeStart" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson">
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson" style="display: none;">
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>
<input id="ExamTimeEnd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00"/>
<input id="ExamTimeEnd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js")

+ 20
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js Wyświetl plik

@@ -15,17 +15,36 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
$('#ExamDateSel').lrselect({
placeholder: "请选择考试时间",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetExamDateSel?EPLId='+keyValue,
value: 'edate',
text: 'edate',
select: function(item) {
if (item) {
$('#ExamDate').val(item.ExamDate);
$('#ExamTimeStart').val(item.ExamTimeStart);
$('#ExamTimeEnd').val(item.ExamTimeEnd);
}
}
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
if (!!data[id] && !!data[id].ExamDate) {
var edate=learun.formatDate(data[id].ExamDate,'yyyy-MM-dd')+" "+data[id].ExamTimeStart+'-'+data[id].ExamTimeEnd;
$('#ExamDateSel').lrselectSet(edate);
}
}
});
}


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.cshtml Wyświetl plik

@@ -12,10 +12,10 @@
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime">
<div class="lr-form-item-title">考试时间段<font face="宋体">*</font></div>
<input id="ExamTimeStart" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" style="width: 45%; float: left;" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ExamTimeStart').trigger('change'); } })" />
<div class="lr-form-item-title">时间段<font face="宋体">*</font></div>
<input id="ExamTimeStart" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" style="width: 45%; float: left;" data-dateFmt="yyyy-MM-dd hh:mm" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ExamTimeStart').trigger('change'); } })" />
<span>&nbsp;&nbsp; —</span>
<input id="ExamTimeEnd" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" style="width: 45%; float: right;" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ExamTimeEnd').trigger('change'); } })" />
<input id="ExamTimeEnd" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" style="width: 45%; float: right;" data-dateFmt="yyyy-MM-dd hh:mm" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ExamTimeEnd').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime">
<div class="lr-form-item-title">不能监考的老师<font face="宋体">*</font></div>


+ 11
- 16
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.js Wyświetl plik

@@ -22,15 +22,15 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text',
select: function (item) {
if (item) {
$('#EmpNo').lrselectRefresh({
//type: 'multiple',
//placeholder: "请选择老师",
//allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList?AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(),
value: 'EmpNo',
text: 'EmpName'
});
if (!!item) {
var Semester = $('#Semester').lrselectGet();
if (!!Semester) {
$('#EmpNo').lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList?AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + Semester,
value: 'EmpNo',
text: 'EmpName'
});
}
}
}
});
@@ -41,12 +41,9 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text',
select: function(item) {
if (item) {
select: function (item) {
if (!!item) {
$('#EmpNo').lrselectRefresh({
//type: 'multiple',
//placeholder: "请选择老师",
//allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList?AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(),
value: 'EmpNo',
text: 'EmpName'
@@ -56,9 +53,7 @@ var bootstrap = function ($, learun) {
});
$('#EmpNo').lrselect({
type: 'multiple',
placeholder: "请选择老师",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList',
value: 'EmpNo',
text: 'EmpName'
});


+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.cshtml Wyświetl plik

@@ -30,7 +30,6 @@
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>*@
</div>
</div>
</div>


+ 5
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.js Wyświetl plik

@@ -108,10 +108,14 @@ var bootstrap = function ($, learun) {
keyId: 'empno',
callback: function (_data) {
name += _data['empname'] + ",";
if (name.indexOf(',') != -1) {
callback(name.substring(0, name.length - 1));
} else {
callback(name);
}
}
});
}
callback(name.substring(0, name.length - 1));
} else {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.cshtml Wyświetl plik

@@ -7,9 +7,9 @@
<div class="lr-form-item-title">学生姓名</div>
<input id="StuNo" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="HealthPunchStu" >
<div class="col-xs-6 lr-form-item" data-table="HealthPunchStu">
<div class="lr-form-item-title">体温上报<font face="宋体">*</font></div>
<input id="Temperature" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" />
<input id="Temperature" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="HealthPunchStu" >
<div class="lr-form-item-title">打卡所在地址<font face="宋体">*</font></div>


+ 16
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.js Wyświetl plik

@@ -23,7 +23,7 @@ var bootstrap = function ($, learun) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
@@ -41,6 +41,21 @@ var bootstrap = function ($, learun) {
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
var Num = $('#Temperature').val();
var NumOne = Num.split('.');
if (NumOne.length != 2) {
learun.alert.warning("请填写正确的体温!例如 : 36.0或37.5");
return false;
}
if (Num < 33 || Num > 44) {
learun.alert.warning("请填写正确的体温!");
return false;
}
Num = Num.substring(2);
if (Num.length != 2) {
learun.alert.warning("请填写正确的体温!例如 : 36.0或37.5");
return false;
}
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/PunchCard?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Index.js Wyświetl plik

@@ -114,7 +114,7 @@ var bootstrap = function ($, learun) {
},
{ label: "年级", name: "Grade", width: 100, align: "left" },
{ label: "联系方式", name: "Phone", width: 100, align: "left" },
{ label: "阶段", name: "Temperature", width: 100, align: "left" },
{ label: "体温", name: "Temperature", width: 100, align: "left" },
{ label: "打卡所在地址", name: "Address", width: 200, align: "left" },
{ label: "打卡时间", name: "CreateTime", width: 140, align: "left" },
{ label: "备注", name: "Remark", width: 200, align: "left" },


+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Statistics.cshtml Wyświetl plik

@@ -0,0 +1,61 @@
@{
ViewBag.Title = "健康打卡时段";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">院校</div>
<div id="F_School"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">班级</div>
<div id="ClassNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学工号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">打卡状态</div>
<div id="IsStatus"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 禁/启用</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 禁用</a>*@
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HealthPunchStu/Statistics.js")

+ 177
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Statistics.js Wyświetl plik

@@ -0,0 +1,177 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-06-17 09:17
* 描 述:健康打卡时段
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '昨天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59', 'd', -1) } },
{ name: '前天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -2) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59', 'd', -2) } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '0',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#F_School').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
$('#IsStatus').lrselect({
data: [{ text: "未打卡", value: "0" }, { text: "缺卡", value: "1" }, { text: "已打卡", value: "2" }],
text: "text",
value: "value"
})
$('#MajorNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
value: "majorno",
text: "majorname",
param: { strWhere: "1=1 AND CheckMark=1 order by majorno asc" },
select: function (item) {
if (item) {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno asc" }
});
} else {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno asc" }
});
}
}
});
$('#ClassNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1" },
value: "classno",
text: "classname"
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/GetStatistics',
headData: [
{
label: "院校", name: "F_School", width: 130, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
key: value,
keyId: 'f_companyid',
callback: function (_data) {
callback(_data['f_fullname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 130, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班级", name: "ClassNo", width: 90, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: "学工号", name: "StuNo", width: 90, align: "left" },
{ label: "学生姓名", name: "StuName", width: 150, align: "left" },
{ label: "联系方式", name: "Phone", width: 100, align: "left" },
{
label: "日期", name: "DKDate", width: 90, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{ label: "早打卡地址", name: "Address1", width: 200, align: "left" },
{ label: "午打卡地址", name: "Address2", width: 200, align: "left" },
{ label: "晚打卡地址", name: "Address3", width: 200, align: "left" },
{ label: "早体温", name: "Temperature1", width: 80, align: "left" },
{ label: "午体温", name: "Temperature2", width: 80, align: "left" },
{ label: "晚体温", name: "Temperature3", width: 80, align: "left" },
{
label: "打卡状态", name: "Num", width: 100, align: "left",
formatter: function (cellvalue) {
if (cellvalue == 0) {
return '<span class=\"label label-danger\">未打卡</span>';
} else if (cellvalue < "3") {
return '<span class=\"label label-warning\">缺卡</span>';
} else if (cellvalue == "3") {
return "<span class=\"label label-success\">已打卡</span>";
}
}
},
],
mainId: 'ID',
isPage: true,
sidx: 'DKDate desc,MajorNo asc,ClassNo asc',

});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 42
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/StatisticsTeach.cshtml Wyświetl plik

@@ -0,0 +1,42 @@
@{
ViewBag.Title = "健康打卡时段";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学工号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">打卡状态</div>
<div id="IsStatus"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HealthPunchStu/StatisticsTeach.js")

+ 147
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/StatisticsTeach.js Wyświetl plik

@@ -0,0 +1,147 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-06-17 09:17
* 描 述:健康打卡时段
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '昨天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59', 'd', -1) } },
{ name: '前天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -2) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59', 'd', -2) } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '0',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#IsStatus').lrselect({
data: [{ text: "未打卡", value: "0" }, { text: "缺卡", value: "1" }, { text: "已打卡", value: "2" }],
text: "text",
value: "value"
})
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/GetStatisticsTeach',
headData: [
{
label: "院校", name: "F_School", width: 130, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
key: value,
keyId: 'f_companyid',
callback: function (_data) {
callback(_data['f_fullname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 130, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班级", name: "ClassNo", width: 90, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: "学工号", name: "StuNo", width: 90, align: "left" },
{ label: "学生姓名", name: "StuName", width: 150, align: "left" },
{ label: "联系方式", name: "Phone", width: 100, align: "left" },
{
label: "日期", name: "DKDate", width: 90, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{ label: "早打卡地址", name: "Address1", width: 200, align: "left" },
{ label: "午打卡地址", name: "Address2", width: 200, align: "left" },
{ label: "晚打卡地址", name: "Address3", width: 200, align: "left" },
{ label: "早体温", name: "Temperature1", width: 80, align: "left" },
{ label: "午体温", name: "Temperature2", width: 80, align: "left" },
{ label: "晚体温", name: "Temperature3", width: 80, align: "left" },
{
label: "打卡状态", name: "Num", width: 100, align: "left",
formatter: function (cellvalue) {
if (cellvalue == 0) {
return '<span class=\"label label-danger\">未打卡</span>';
} else if (cellvalue < "3") {
return '<span class=\"label label-warning\">缺卡</span>';
} else if (cellvalue == "3") {
return "<span class=\"label label-success\">已打卡</span>";
}
}
},
],
mainId: 'ID',
isPage: true,
sidx: 'DKDate desc,MajorNo asc,ClassNo asc',

});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.cshtml Wyświetl plik

@@ -15,7 +15,7 @@
<div class="lr-form-item-title">描述<font face="宋体">*</font></div>
<div id="Description" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="HealthPunchTime" >
<div class="col-xs-6 lr-form-item" data-table="HealthPunchTime" style="display: none; ">
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div>
<div id="CheckMark" isvalid="yes" checkexpession="NotNull" ></div>
</div>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.js Wyświetl plik

@@ -17,7 +17,7 @@ var bootstrap = function ($, learun) {
bind: function () {
$('#Description').lrDataItemSelect({ code: 'HealthPunchType' });
$('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' });
$('#CheckMark').lrselectSet("1");
$('#CheckMark').lrselectSet("0");
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName);
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.cshtml Wyświetl plik

@@ -33,7 +33,7 @@
</div>
<div class="col-xs-6 lr-form-item" data-table="LessonInfo">
<div class="lr-form-item-title">学分<font face="宋体">*</font></div>
<input id="StudyScore" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
<input id="StudyScore" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" />
</div>
<div class="col-xs-6 lr-form-item" data-table="LessonInfo">
<div class="lr-form-item-title">周理论学时<font face="宋体">*</font></div>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.js Wyświetl plik

@@ -88,7 +88,7 @@ var bootstrap = function ($, learun) {
_postData.keyValue = keyValue;
_postData.StuNo = learun.clientdata.get(['userinfo']).enCode;
$.ajax({
url: WebApiUrl + '/Learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/SignIn',
url: WebApiUrl + '/Learun/OpenLessonPlanOfElectiveStudent/SignIn',
data: _postData,
type: "POST",
dataType: "json",


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/DepartmentController.cs Wyświetl plik

@@ -150,6 +150,8 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
return Fail("部门编号已存在!");
}
}
//发送标识false
entity.SendFlag = false;
departmentIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}


BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/img1.png Wyświetl plik

Przed Po
Szerokość: 394  |  Wysokość: 351  |  Rozmiar: 59 KiB

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Wyświetl plik

@@ -1028,6 +1028,8 @@
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\StatisticsTeach.js" />
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\Statistics.js" />
<Content Include="Areas\EducationalAdministration\Views\JournalSend\FormOfDC.js" />
<Content Include="Areas\EducationalAdministration\Views\JournalSend\IndexOfDC.js" />
<Content Include="Areas\EducationalAdministration\Views\LeaveSchoolA\Form.js" />
@@ -7862,6 +7864,8 @@
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\FormTime.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\IndexElective.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormOfElective.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\Statistics.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\StatisticsTeach.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Wyświetl plik

@@ -192,6 +192,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Bootstraper.cs" />
<Compile Include="Modules\AssetManagementSystem\Ass_AssetsInfoItemApi.cs" />
<Compile Include="Modules\AttendanceApi.cs" />
<Compile Include="Modules\AnnexesApiWx.cs" />
<Compile Include="Modules\BaseNoLoginApi.cs" />


+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AssetManagementSystem/Ass_AssetsInfoItemApi.cs Wyświetl plik

@@ -0,0 +1,47 @@
using Learun.Application.Base.SystemModule;
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using Learun.Util;
using Nancy;
using System;
using System.Collections.Generic;
using System.IO;

namespace Learun.Application.WebApi.Modules
{
public class Ass_AssetsInfoItemApi : BaseApi
{
public Ass_AssetsInfoItemApi()
: base("/learun/adms/AssetManagementSystem/Ass_AssetsInfoItem")
{
Get["/getEntity"] = GetEntity;
}
private Ass_AssetsInfoItemIBLL ass_AssetsInfoItemIBLL = new Ass_AssetsInfoItemBLL();
private Ass_AssetsInfoIBLL ass_AssetsInfoIBLL = new Ass_AssetsInfoBLL();

/// <summary>
/// 获取资产信息
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetEntity(dynamic _)
{
var keyValue = this.GetReqData();
var entity = ass_AssetsInfoItemIBLL.GetAss_AssetsInfoItemEntity(keyValue);
if (entity != null)
{
entity.ACode = ass_AssetsInfoIBLL.GetAss_AssetsInfoEntity(entity.AId)?.ACode;
}
else
{
entity = new Ass_AssetsInfoItemEntity();
}
var result = new
{
Ass_AssetsInfoItemEntity = entity
};

return Success(result);
}

}
}

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EvalApi.cs Wyświetl plik

@@ -17,7 +17,7 @@ namespace Learun.Application.WebApi.Modules
public class EvalApi : BaseApi
{
public EvalApi()
: base("/learun/eval")
: base("/learun/adms/eval")
{
Get["/paper"] = GetPaper;// 获取组织机构数据映射表
Get["/studentlist"] = GetStudentList;


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OpenLessonPlanOfElectiveStudentApi.cs Wyświetl plik

@@ -27,7 +27,7 @@ namespace Learun.Application.WebApi
/// 注册接口
/// <summary>
public OpenLessonPlanOfElectiveStudentApi()
: base("/Learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent")
: base("/Learun/OpenLessonPlanOfElectiveStudent")
{
Get["/pagelist"] = GetPageList;
Get["/studentpagelist"] = StudentGetPageList;


+ 26
- 14
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TransferApi.cs Wyświetl plik

@@ -27,7 +27,7 @@ namespace Learun.Application.WebApi
{
private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL();
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
private CdDeptIBLL cdDeptIBLL = new CdDeptBLL();
private DepartmentIBLL departmentIBLL = new DepartmentBLL();
private UserIBLL userIBLL = new UserBLL();

/// <summary>
@@ -37,7 +37,7 @@ namespace Learun.Application.WebApi
: base("/TransferApi/BasicInfo")
{
//发送部门基础信息
Get["/sendDeptInfo"] = SendDeptInfo;
Get["/sendDepartmentInfo"] = SendDepartmentInfo;
//发送教师基础信息
Get["/sendTeacherInfo"] = SendTeacherInfo;
//发送学生基础信息
@@ -79,7 +79,7 @@ namespace Learun.Application.WebApi
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response SendDeptInfo(dynamic _)
public Response SendDepartmentInfo(dynamic _)
{
var result = new List<string>();

@@ -88,26 +88,32 @@ namespace Learun.Application.WebApi
//调登录接口拿到cookie
GetCookie();
}
var deptList = cdDeptIBLL.GetAllList();
foreach (var item in deptList)
var departmentList = departmentIBLL.GetAllList().Where(x => x.SendFlag == false);
foreach (var item in departmentList)
{
var param = new
{
ParentCode = "iccsid",
ParentCode = string.IsNullOrEmpty(item.F_ParentId) || item.F_ParentId == "0" ? "iccsid" : (departmentIBLL.GetEntity(item.F_ParentId) == null ? "iccsid" : departmentIBLL.GetEntity(item.F_ParentId)?.F_EnCode),
pageSize = 10,
Name = "部门5",
Code = "5",
Name = item.F_FullName,
Code = item.F_EnCode,
};
var responseSend = SendRequestWithCookie("POST", "application/json;charset=utf-8", @"http://172.70.0.4:8088/fastgate/department", Encoding.UTF8, JsonConvert.SerializeObject(param));
var responseSendObj = JsonConvert.DeserializeObject<dynamic>(responseSend);

result.Add("部门编号" + item.DeptNo + ",新增接口结果:" + responseSendObj.ErrCode + responseSendObj.ErrMsg);
result.Add("部门编号" + item.F_EnCode + ",新增接口结果:" + responseSendObj.ErrCode + responseSendObj.ErrMsg);

if (responseSendObj.ErrCode == 200)
{
//第三方新增成功,修改表-发送标识为true
//TODO:
var entity = departmentIBLL.GetEntity(item.F_DepartmentId);
if (entity != null)
{
entity.SendFlag = true;
departmentIBLL.SaveEntity2(entity.F_DepartmentId, entity);
}
}
else if (responseSendObj.ErrCode == 1010) //{ "ErrCode":1010,"ErrMsg":"登录状态已失效"}
{
@@ -119,19 +125,25 @@ namespace Learun.Application.WebApi
//调修改接口
var param2 = new
{
Code = "5",
Name = "部门bm5",
Code = item.F_EnCode,
Name = item.F_FullName,
pageSize = 10,
};
var responseSend2 = SendRequestWithCookie("PUT", "application/json;charset=utf-8", @"http://172.70.0.4:8088/fastgate/department", Encoding.UTF8, JsonConvert.SerializeObject(param2));
var responseSendObj2 = JsonConvert.DeserializeObject<dynamic>(responseSend2);

result.Add("部门编号" + item.DeptNo + ",修改接口结果:" + responseSendObj2.ErrCode + responseSendObj2.ErrMsg);
result.Add("部门编号" + item.F_EnCode + ",修改接口结果:" + responseSendObj2.ErrCode + responseSendObj2.ErrMsg);

if (responseSendObj2.ErrCode == 200)
{
//第三方修改成功,修改表-发送标识为true
//TODO:
var entity = departmentIBLL.GetEntity(item.F_DepartmentId);
if (entity != null)
{
entity.SendFlag = true;
departmentIBLL.SaveEntity2(entity.F_DepartmentId, entity);
}
}
else
{
@@ -172,7 +184,7 @@ namespace Learun.Application.WebApi
var param = BuildQuery2(parameters, "----WebKitFormBoundaryAOT8GpQYYAP9jgGf");
var contentType = "multipart/form-data; boundary=----WebKitFormBoundaryAOT8GpQYYAP9jgGf";

var responseSend = SendRequestWithCookie("POST",contentType, @"http://172.70.0.4:8088/fastgate/person", Encoding.UTF8, param);
var responseSend = SendRequestWithCookie("POST", contentType, @"http://172.70.0.4:8088/fastgate/person", Encoding.UTF8, param);
var responseSendObj = JsonConvert.DeserializeObject<dynamic>(responseSend);

result.Add("教师编号,新增接口结果:" + responseSendObj.ErrCode + responseSendObj.ErrMsg);


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Website/Web.config Wyświetl plik

@@ -69,6 +69,18 @@
<publisherPolicy apply="no" />
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.webServer>


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Language/app.config Wyświetl plik

@@ -6,6 +6,18 @@
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/app.config Wyświetl plik

@@ -6,6 +6,18 @@
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>

+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemEntity.cs Wyświetl plik

@@ -389,6 +389,24 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
/// </summary>
[NotMapped]
public string AIPhoto { get; set; }

/// <summary>
/// 资产名称
/// </summary>
[NotMapped]
public string AName { get; set; }
/// <summary>
/// 资产编号
/// </summary>
[NotMapped]
public string ACode { get; set; }

/// <summary>
/// 批量生成二维码base64字符串
/// </summary>
[NotMapped]
public string ImgBase64String { get; set; }

#endregion
}
}


+ 12
- 12
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs Wyświetl plik

@@ -274,7 +274,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
t.AContent
");
strSql.Append(" FROM Ass_AssetsInfoItem a LEFT JOIN dbo.Ass_AssetsInfo t ON a.AId=t.AId ");
strSql.Append(" WHERE a.AIASSState<>2 ");
strSql.Append(" WHERE (a.AIASSState <> 2 or a.AIASSState is null) ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
@@ -313,24 +313,24 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
try
{
var result = this.BaseRepository().FindEntity<Ass_AssetsInfoItemEntity>(keyValue);

var assInfo = this.BaseRepository().FindEntity<Ass_AssetsInfoEntity>(a => a.AName == result.AIASSName);
if (assInfo != null)
if (result != null)
{
if (assInfo.APhoto != null)
var assInfo = this.BaseRepository().FindEntity<Ass_AssetsInfoEntity>(a => a.AName == result.AIASSName);
if (assInfo != null)
{
string photoPath = this.BaseRepository()
.FindEntity<AnnexesFileEntity>(a => a.F_FolderId == assInfo.APhoto)?.F_FilePath;
if (!string.IsNullOrEmpty(photoPath))
if (assInfo.APhoto != null)
{
photoPath = "/" + photoPath.Substring(photoPath.IndexOf("Resource"));
result.AIPhoto = photoPath;
string photoPath = this.BaseRepository()
.FindEntity<AnnexesFileEntity>(a => a.F_FolderId == assInfo.APhoto)?.F_FilePath;
if (!string.IsNullOrEmpty(photoPath))
{
photoPath = "/" + photoPath.Substring(photoPath.IndexOf("Resource"));
result.AIPhoto = photoPath;
}
}
}
}


return result;
}
catch (Exception ex)


+ 57
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs Wyświetl plik

@@ -80,6 +80,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

public IEnumerable<Exam_ExamPlanTimeEntity> GetExamDateSel(string EPLId)
{
try
{
return exam_ExamPlanLessonService.GetExamDateSel(EPLId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Exam_ExamPlanLesson表实体数据
/// </summary>
@@ -260,7 +280,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

public (bool flag, string str) IsAllowSave(Exam_ExamPlanLessonEntity entity)
{
try
{
return exam_ExamPlanLessonService.IsAllowSave(entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 判断考试时间是否冲突
/// </summary>
@@ -303,6 +340,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public (bool flag, string str) CheckAllPlanLesson(string EPId)
{
try
{
return exam_ExamPlanLessonService.CheckAllPlanLesson(EPId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs Wyświetl plik

@@ -23,6 +23,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
IEnumerable<Exam_ExamPlanLessonEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<Exam_ExamPlanLessonEntity> GetPageListForLesson(Pagination pagination, string queryJson);
IEnumerable<Exam_ExamPlanLessonEntity> GetListByEPId(string EPId);
IEnumerable<Exam_ExamPlanTimeEntity> GetExamDateSel(string EPLId);
/// <summary>
/// 获取Exam_ExamPlanLesson表实体数据
/// </summary>
@@ -54,8 +55,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity entity);

(bool flag, string msg) PlanLessonTimeByEPId(string keyValue);
(bool flag, string str) IsAllowSave(Exam_ExamPlanLessonEntity entity);
(bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity);
(bool flag, string str) CheckAllPlanLesson(string keyValue);
#endregion

}


+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs Wyświetl plik

@@ -148,6 +148,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取考试记录安排时间数据
/// </summary>
/// <param name="EPLId"></param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanTimeEntity> GetExamDateSel(string EPLId)
{
try
{
var epLesson = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanLessonEntity>(EPLId);
string sql = $"Select Id,ExamDate,ExamTimeStart,ExamTimeEnd,CONVERT(nvarchar(10),ExamDate,120)+' '+ExamTimeStart+'-'+ ExamTimeEnd as edate from [dbo].[Exam_ExamPlanTime] where epid='{epLesson.EPId}' ";

var lessonno = epLesson.LessonNo;
if (epLesson.LessonNo.Contains("("))
{
lessonno = epLesson.LessonNo.Split('(')[0];
}

//查询课程信息
var lessoninfo = this.BaseRepository("CollegeMIS").FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,l.* from lessoninfo l
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{lessonno}' ").FirstOrDefault();
if (lessoninfo != null)
{
if (lessoninfo.LessonTypeName.Contains("公开") || lessoninfo.LessonTypeName.Contains("公共"))
{
sql += " and examtype='2'";
}
else
{
sql += " and examtype='1'";
}
}

sql += " order by cast((CONVERT(nvarchar(10),ExamDate,120)+' '+ExamTimeStart) as datetime)";
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanTimeEntity>(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Exam_ExamPlanLesson表实体数据
/// </summary>
@@ -468,6 +517,51 @@ SELECT t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t
}
}

/// <summary>
/// 判断考试时间是否冲突
/// </summary>
/// <param name="entity"></param>
public (bool flag, string str) IsAllowSave(Exam_ExamPlanLessonEntity entity)
{
try
{
var ExamPlanLesson = this.BaseRepository("CollegeMIS")
.FindEntity<Exam_ExamPlanLessonEntity>(entity.EPLId);
//考试课程数据
var EPLessonList = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,info.TeachMajorNo,t.* from Exam_ExamPlanLesson t
join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo
left join LessonInfo info on t.LessonNo=info.LessonNo
left join CdLessonType ltype on info.LessonTypeId=ltype.LTId
where t.EPId='{ExamPlanLesson.EPId}' and info.CheckMark=1 ");
if (ExamPlanLesson.LessonNo.Contains("("))
{
EPLessonList = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,info.TeachMajorNo,t.* from Exam_ExamPlanLesson t
join Exam_ExamLesson elesson on left(t.LessonNo,charindex('(',t.LessonNo)-1)=elesson.LessonNo
left join LessonInfo info on left(t.LessonNo,charindex('(',t.LessonNo)-1)=info.LessonNo
left join CdLessonType ltype on info.LessonTypeId=ltype.LTId
where t.EPId='{ExamPlanLesson.EPId}' and info.CheckMark=1 ");
}
var EPLesson = EPLessonList.Where(x => x.EPLId == ExamPlanLesson.EPLId).FirstOrDefault();
if (EPLessonList.ToList().Exists(x => x.EPLId != entity.EPLId && x.TeachMajorNo == EPLesson.TeachMajorNo && x.ExamLength == EPLesson.ExamLength && x.ExamDate != null && x.ExamDate == entity.ExamDate && x.ExamTime == entity.ExamTime))
{
return (false, "同专业同时段只能安排一门课程!");
}

return (true, "");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 自动生成考试课程排考时间
/// </summary>
@@ -590,6 +684,40 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId
}
}

/// <summary>
/// 一键审核考试课程
/// </summary>
/// <param name="EPId"></param>
/// <returns></returns>
public (bool flag, string str) CheckAllPlanLesson(string EPId)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
var list = db.FindList<Exam_ExamPlanLessonEntity>($"select * FROM Exam_ExamPlanLesson where epid='{EPId}' and examdate is not null and ExamTime is not null and SeatCount>0 and realstucount>0 and SeatCount>=realstucount");
var EPLIds = string.Join("','", list.Select(x => x.EPLId).ToList());
string sql = $"update Exam_ExamPlanLesson set ELCheckMark='1' where EPLId in ('{EPLIds}')";
db.ExecuteBySql(sql);
//更新排考记录表是否生成字段
string updsql = $"update Exam_ExamPlan set EPGenarate=0 where EPId='{EPId}'";
db.ExecuteBySql(updsql);
db.Commit();
return (true, "");
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}


+ 8
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs Wyświetl plik

@@ -439,7 +439,7 @@ where l.EPLId='{EPLId}'";
from Exam_ExamPlanRoom a
join Exam_ExamPlanLesson b on a.EPLId = b.EPLId
where b.EPId = '{EPId}'");
db.BeginTrans();
//老师时间管理
var examTeacherTime = db.FindList<Exam_ExamTeacherTimeEntity>();
@@ -454,9 +454,15 @@ where l.EPLId='{EPLId}'";
foreach (var epLesson in examLessonList)
{
List<string> empnos = new List<string>();
var LessonNo = epLesson.LessonNo;
if (LessonNo.Contains("("))
{
LessonNo = LessonNo.Split('(')[0];
}

//查询课程信息
var lessoninfo = db.FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,l.* from lessoninfo l
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{epLesson.LessonNo}' ").FirstOrDefault();
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{LessonNo}' ").FirstOrDefault();
if (lessoninfo != null && !lessoninfo.LessonTypeName.Contains("公共") && !lessoninfo.LessonTypeName.Contains("公开"))
{
//如果是专业课,监考老师不能添加这门课的代课老师


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanTime/Exam_ExamPlanTimeEntity.cs Wyświetl plik

@@ -69,6 +69,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段
[NotMapped]
public string edate { get; set; }

#endregion
}
}


+ 67
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs Wyświetl plik

@@ -62,28 +62,87 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
if (!queryParam["EPLId"].IsEmpty())
{
//排考安排课程表Id
var ELEntity = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanEntity>($@"select * from Exam_ExamPlan where EPId=(
select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString()}')").FirstOrDefault();
//考试课程数据
var EPLEntity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanLessonEntity>(queryParam["EPLId"].ToString());
//排考安排课程表 获取学年学期
var ELEntity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(EPLEntity.EPId);
if (ELEntity != null)
{
strSql.Append($" AND t.AcademicYearNo = '{ELEntity.AcademicYearNo}' ");
strSql.Append($" AND t.Semester = '{ELEntity.Semester}' ");
}

var empSql = $@"SELECT DISTINCT EPLId, STUFF( (SELECT ',' + empno FROM Exam_ExamPlanRoom WHERE EPLId = T.EPLId FOR XML PATH('') ), 1, 1, '') AS empno FROM Exam_ExamPlanRoom AS T
where EPLId ='{queryParam["EPLId"].ToString()}'";
//同一考试课程下考场的监考老师不重复
var empSql = "SELECT DISTINCT EPLId, STUFF( (SELECT ',' + empno FROM Exam_ExamPlanRoom WHERE 1=1 ";
if (!queryParam["EPRId"].IsEmpty())
{
empSql += $" and EPRId<>'{queryParam["EPRId"].ToString()}'";
empSql += $" and EPRId<>'{queryParam["EPRId"].ToString()}'";
}

empSql += $@" and EPLId = T.EPLId FOR XML PATH('') ), 1, 1, '') AS empno FROM Exam_ExamPlanRoom AS T
where EPLId ='{queryParam["EPLId"].ToString()}'";
var obj = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(empSql).Select(x => x.EmpNo).Distinct().ToList();
if (obj != null && obj.Count > 0)
{
var empNo = string.Join("','", obj[0].ToString().Split(',').Distinct());
strSql.Append($" AND t.EmpNo not in ('{empNo}')");
}

//筛选掉考试时间冲突的老师和专业课的代课老师
List<string> empnos = new List<string>();
var LessonNo = EPLEntity.LessonNo;
if (LessonNo.Contains("("))
{
LessonNo = LessonNo.Split('(')[0];
}
//查询课程信息
var lessoninfo = this.BaseRepository("CollegeMIS").FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,l.* from lessoninfo l
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{LessonNo}' ").FirstOrDefault();
if (lessoninfo != null && !lessoninfo.LessonTypeName.Contains("公共") && !lessoninfo.LessonTypeName.Contains("公开"))
{
//如果是专业课,监考老师不能添加这门课的代课老师
var teachClass = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(
$"select distinct EmpNo from TeachClass where AcademicYearNo='{ELEntity.AcademicYearNo}' and Semester='{ELEntity.Semester}' and lessonno='{LessonNo}'");
var empno = teachClass.Select(x => x.EmpNo).ToList();
empnos = empnos.Union(empno).ToList();
}

if (EPLEntity.ExamDate != null && EPLEntity.ExamTime.Contains("-"))
{
//当前考试课程考试时间
var examtimeStart = Convert.ToDateTime(EPLEntity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + (EPLEntity.ExamTime).Split('-')[0]);
var examtimeEnd = Convert.ToDateTime(EPLEntity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + EPLEntity.ExamTime.Split('-')[1]);

//查询这个时间段不能监考的老师
var empnoTime = this.BaseRepository("CollegeMIS").FindList<Exam_ExamTeacherTimeEntity>(x =>
(examtimeStart >= x.ExamTimeStart && examtimeStart <= x.ExamTimeEnd) || (examtimeEnd >= x.ExamTimeStart && examtimeEnd <= x.ExamTimeEnd)).Select(x => x.EmpNo).ToList();
foreach (var empno in empnoTime)
{
empnos = empnos.Union(empno.Split(',').ToList()).ToList();
}

//查询已安排的监考老师数据
var examRoomByDateSql = $@"select a.EmpNo,b.ExamDate,b.ExamTime from [dbo].[Exam_ExamPlanRoom] a
join Exam_ExamPlanLesson b on a.EPLId = b.EPLId
where a.EmpNo is not null and b.ExamDate='{EPLEntity.ExamDate}' and a.EPLId<>'{queryParam["EPLId"].ToString()}'";
var examRoomsByDateList = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(examRoomByDateSql).ToList();
foreach (var examRoom in examRoomsByDateList)
{
var examRoomTime1 = Convert.ToDateTime(examRoom.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examRoom.ExamTime.Split('-')[0]);
var examRoomTime2 = Convert.ToDateTime(examRoom.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examRoom.ExamTime.Split('-')[1]);

//此处判断当前考场时间是否在考试课程排考时间的开始前30分钟到结束后30分钟
if ((examRoomTime1 >= examtimeStart.AddMinutes(-30) && examRoomTime1 <= examtimeEnd.AddMinutes(30)) || (examRoomTime2 >= examtimeStart.AddMinutes(-30) && examRoomTime2 <= examtimeEnd.AddMinutes(30)))
{
empnos.Add(examRoom.EmpNo);
}
}
if (empnos.Count() > 0)
{
string nos = string.Join("','", empnos);
strSql.Append($" AND t.EmpNo not in ('{nos}')");
}
}

}
if (!queryParam["SqlParameter"].IsEmpty())
{
@@ -111,7 +170,7 @@ select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString(
/// <param name="Semester"></param>
/// <returns></returns>
public IEnumerable<Exam_InvigilateTeacherEntity> GetList(string AcademicYearNo, int? Semester)
{
{
try
{
return this.BaseRepository("CollegeMIS").FindList<Exam_InvigilateTeacherEntity>(x => x.AcademicYearNo == AcademicYearNo && x.Semester == Semester);


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuBLL.cs Wyświetl plik

@@ -67,6 +67,54 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 统计数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<HealthPunchStuEntity> GetStatistics(Pagination pagination, string queryJson)
{
try
{
return healthPunchStuService.GetStatistics(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 统计数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<HealthPunchStuEntity> GetStatisticsTeach(Pagination pagination, string queryJson)
{
try
{
return healthPunchStuService.GetStatisticsTeach(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据


+ 23
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuEntity.cs Wyświetl plik

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 日 期:2022-06-17 11:00
/// 描 述:体温上报
/// </summary>
public class HealthPunchStuEntity
public class HealthPunchStuEntity
{
#region 实体成员
/// <summary>
@@ -139,7 +139,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段

[NotMapped]
public string Address1 { get; set; }
[NotMapped]
public string Address2 { get; set; }
[NotMapped]
public string Address3 { get; set; }

[NotMapped]
public string Temperature1 { get; set; }
[NotMapped]
public string Temperature2 { get; set; }
[NotMapped]
public string Temperature3 { get; set; }
[NotMapped]
public string Num { get; set; }
#endregion

public class StuList
{
public string StuName { get; set; }
public string StuNo { get; set; }
}
}
}


+ 14
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuIBLL.cs Wyświetl plik

@@ -27,6 +27,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <returns></returns>
HealthPunchStuEntity GetHealthPunchStuEntity(string keyValue);
/// <summary>
/// 统计数据
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
IEnumerable<HealthPunchStuEntity> GetStatistics(Pagination pagination, string queryJson);
/// <summary>
/// 教师统计数据
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
IEnumerable<HealthPunchStuEntity> GetStatisticsTeach(Pagination pagination, string queryJson);
#endregion

#region 提交数据


+ 202
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuService.cs Wyświetl plik

@@ -4,6 +4,7 @@ using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
@@ -76,6 +77,207 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<HealthPunchStuEntity> GetStatistics(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
var queryParam = queryJson.ToJObject();
// 虚拟参数
string sql1 = " ";
string sql2 = " ";
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
sql1 = " and DkDate >= '" + queryParam["StartTime"].ToDate()
+ "' and DkDate <= '" + queryParam["EndTime"].ToDate() + "' ";
}
if (!queryParam["F_School"].IsEmpty())
{
sql2 = " and F_School ='" + queryParam["F_School"].ToString() + "' ";
}
if (!queryParam["MajorNo"].IsEmpty())
{
sql2 += " and MajorNo ='" + queryParam["MajorNo"].ToString() + "'";
}
if (!queryParam["ClassNo"].IsEmpty())
{
sql2 += " and ClassNo ='" + queryParam["ClassNo"].ToString() + "'";
}

if (!queryParam["StuNo"].IsEmpty())
{
sql2 += " and StuNo like '%" + queryParam["StuNo"].ToString() + "%'";
}
if (!queryParam["StuName"].IsEmpty())
{
sql2 += " and StuName like '%" + queryParam["StuName"].ToString() + "%'";
}
if (!queryParam["IsStatus"].IsEmpty())
{
string Num = queryParam["IsStatus"].ToString();
if (Num == "0")
{
sql2 += " and t.num = '" + Num + "' ";
}
else if (Num == "1")
{
sql2 += " and t.num < '3' and t.num <> '0' ";
}
else if (Num == "2")
{
sql2 += " and t.num = '3' ";
}
}

strSql.Append(@" select * from (
select zb.F_SchoolId as F_School,zb.MajorNo,zb.ClassNo,zb.StuNo,zb.StuName,zb.mobile,isnull(fb.DkDate,Getdate()) as DkDate,
fb.Address1,fb.Address2,fb.Address3,fb.Temperature1,fb.Temperature2,fb.Temperature3,isnull(fb.Num,0) as Num from StuInfoBasic zb
left join (
select hps.*,aa.address as Address1,aa.Temperature as Temperature1 ,bb.address as Address2,bb.Temperature as Temperature2,cc.address as Address3 ,cc.Temperature
as Temperature3,dd.Num from (
select StuNo,StuName,DkDate from HealthPunchStu hps where 1=1 " + sql1 + "");
strSql.Append(@" group by StuNo,StuName,DkDate) hps
left join (select * from HealthPunchStu where 1=1 " + sql1 + "");
strSql.Append(@" ) AA on AA.StuNo=hps.StuNo and AA.StuName=hps.StuName and AA.dkType=1
left join (select * from HealthPunchStu where 1=1 " + sql1 + "");
strSql.Append(@" ) BB on BB.StuNo=hps.Stuno and BB.StuName=hps.StuName and BB.dkType=2
left join (select * from HealthPunchStu where 1=1 " + sql1 + "");
strSql.Append(@" ) CC on CC.StuNo=hps.Stuno and CC.StuName=hps.StuName and CC.dkType=3
left join (select Stuno,Count(*) as num from HealthPunchStu hps where 1=1 " + sql1 + " ");
strSql.Append(@" group by Stuno ) dd on dd.StuNo=hps.Stuno
) fb on fb.Stuno = zb.stuno and fb.StuName = zb.StuName
)t where 1= 1 " + sql1 + sql2 + " ");
return this.BaseRepository("CollegeMIS").FindList<HealthPunchStuEntity>(strSql.ToString(), pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<HealthPunchStuEntity> GetStatisticsTeach(Pagination pagination, string queryJson)
{
try
{
var account = LoginUserInfo.Get().account;
var classinfo = this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(x => x.ClassDiredctorNo == account).ToList();
var strSql = new StringBuilder();
var queryParam = queryJson.ToJObject();
// 虚拟参数
string sql1 = " ";
string sql2 = " ";
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
sql1 = " and DkDate >= '" + queryParam["StartTime"].ToDate()
+ "' and DkDate <= '" + queryParam["EndTime"].ToDate() + "' ";
}
if (classinfo.Count > 0)
{
var classno = classinfo.FirstOrDefault();
if (classinfo.Count == 1)
{
sql2 += " and ClassNo ='" + classno.ClassNo + "'";
}
else
{
sql2 += " and (";
for (int i = 0; i < classinfo.Count; i++)
{
if (i == 0)
{
sql2 += " classno ='" + classinfo[i].ClassNo + "' ";
}
else
{
sql2 += " or classno ='" + classinfo[i].ClassNo + "' ";
}
}
sql2 += ")";
}
}
else
{
sql2 += " and t.num = '-1' ";
}
if (!queryParam["ClassNo"].IsEmpty())
{
sql2 += " and ClassNo ='" + queryParam["ClassNo"].ToString() + "'";
}
if (!queryParam["StuNo"].IsEmpty())
{
sql2 += " and StuNo like '%" + queryParam["StuNo"].ToString() + "%'";
}
if (!queryParam["StuName"].IsEmpty())
{
sql2 += " and StuName like '%" + queryParam["StuName"].ToString() + "%'";
}
if (!queryParam["IsStatus"].IsEmpty())
{
string Num = queryParam["IsStatus"].ToString();
if (Num == "0")
{
sql2 += " and t.num = '" + Num + "' ";
}
else if (Num == "1")
{
sql2 += " and t.num < '3' and t.num <> '0' ";
}
else if (Num == "2")
{
sql2 += " and t.num = '3' ";
}
}

strSql.Append(@" select * from (
select zb.F_SchoolId as F_School,zb.MajorNo,zb.ClassNo,zb.StuNo,zb.StuName,zb.mobile,isnull(fb.DkDate,Getdate()) as DkDate,
fb.Address1,fb.Address2,fb.Address3,fb.Temperature1,fb.Temperature2,fb.Temperature3,isnull(fb.Num,0) as Num from StuInfoBasic zb
left join (
select hps.*,aa.address as Address1,aa.Temperature as Temperature1 ,bb.address as Address2,bb.Temperature as Temperature2,cc.address as Address3 ,cc.Temperature
as Temperature3,dd.Num from (
select StuNo,StuName,DkDate from HealthPunchStu hps where 1=1 " + sql1 + "");
strSql.Append(@" group by StuNo,StuName,DkDate) hps
left join (select * from HealthPunchStu where 1=1 " + sql1 + "");
strSql.Append(@" ) AA on AA.StuNo=hps.StuNo and AA.StuName=hps.StuName and AA.dkType=1
left join (select * from HealthPunchStu where 1=1 " + sql1 + "");
strSql.Append(@" ) BB on BB.StuNo=hps.Stuno and BB.StuName=hps.StuName and BB.dkType=2
left join (select * from HealthPunchStu where 1=1 " + sql1 + "");
strSql.Append(@" ) CC on CC.StuNo=hps.Stuno and CC.StuName=hps.StuName and CC.dkType=3
left join (select Stuno,Count(*) as num from HealthPunchStu hps where 1=1 " + sql1 + " ");
strSql.Append(@" group by Stuno ) dd on dd.StuNo=hps.Stuno
) fb on fb.Stuno = zb.stuno and fb.StuName = zb.StuName
)t where 1= 1 " + sql1 + sql2 + " ");
return this.BaseRepository("CollegeMIS").FindList<HealthPunchStuEntity>(strSql.ToString(), pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Learun.Util.csproj Wyświetl plik

@@ -81,6 +81,9 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="ThoughtWorks.QRCode, Version=1.0.4778.30637, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\ThoughtWorks.QRCode.1.1.0\lib\ThoughtWorks.QRCode.dll</HintPath>
</Reference>
<Reference Include="Yahoo.Yui.Compressor">
<HintPath>..\..\..\packages\YUICompressor.NET.2.7.0.0\lib\NET20\Yahoo.Yui.Compressor.dll</HintPath>
</Reference>
@@ -128,8 +131,10 @@
<Compile Include="Ueditor\UeditorPathFormatter.cs" />
<Compile Include="Ueditor\UeditorUploadConfig.cs" />
<Compile Include="Ueditor\UeditorUploadResult.cs" />
<Compile Include="Web\QRCodeHelper.cs" />
<Compile Include="Web\CodeRuleEnum.cs" />
<Compile Include="Web\HttpMethods.cs" />
<Compile Include="Web\ZipHelper.cs" />
<Compile Include="Web\JsCssHelper.cs" />
<Compile Include="Web\FilterMode.cs" />
<Compile Include="Web\LoginUserInfo.cs" />


+ 133
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Web/QRCodeHelper.cs Wyświetl plik

@@ -0,0 +1,133 @@
using System;
using System.Web;
using ThoughtWorks.QRCode.Codec;
using ThoughtWorks.QRCode.Codec.Data;
using ThoughtWorks.QRCode.Codec.Util;
using System.IO;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections.Generic;

namespace Learun.Util
{
public class QRCodeHelper
{
/// <summary>
/// 生成带图片的二维码
/// </summary>
/// <param name="qrcodeText">二维码内容</param>
/// <param name="imagePath">二维码上logo图片地址</param>
/// <param name="savePath"></param>
/// <param name="imageName">二维码图片名称</param>
public static Result ProcessRequest(string qrcodeText,string imagePath,string savePath,string imageName)
{
//最终图片保存路径
var resultImgPath = string.Empty;
//最终图片文件夹保存路径
var resultImgDirectoryPath = string.Empty;

if (!string.IsNullOrEmpty(qrcodeText))
{
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder();
qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;//设置编码模式(注意:BYTE能支持中文,ALPHA_NUMERIC扫描出来的都是数字)
qrCodeEncoder.QRCodeScale = 4;//设置编码测量度(值越⼤⽣成的⼆维码图⽚像素越⾼)
qrCodeEncoder.QRCodeVersion = 0;//设置编码版本(注意:设置为0主要是防止编码的字符串太长时发生错误)
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.H;//设置编码错误纠正(有4个等级:H-L-M-Q)
System.Drawing.Image image = qrCodeEncoder.Encode(qrcodeText);
System.IO.MemoryStream MStream = new System.IO.MemoryStream();
image.Save(MStream, System.Drawing.Imaging.ImageFormat.Png);
System.IO.MemoryStream MStream1 = new System.IO.MemoryStream();
CombinImage(image, HttpContext.Current.Server.MapPath(imagePath)).Save(MStream1, System.Drawing.Imaging.ImageFormat.Png);
//保存图片到本地文件夹
System.Drawing.Image img = System.Drawing.Image.FromStream(MStream1);
//string imgDirectoryPath = System.IO.Path.Combine(Config.GetValue("AnnexesFile"), "带logo图片二维码", DateTime.Now.ToString("yyyyMMddHHmm"));
string imgDirectoryPath = System.IO.Path.Combine(Config.GetValue("AnnexesFile"), "带logo图片二维码", savePath);
if (!System.IO.Directory.Exists(imgDirectoryPath))
{
System.IO.Directory.CreateDirectory(imgDirectoryPath);
}
string imgPath = System.IO.Path.Combine(imgDirectoryPath, imageName + ".png");
img.Save(imgPath, System.Drawing.Imaging.ImageFormat.Png);
resultImgDirectoryPath = imgDirectoryPath;
resultImgPath = imgPath;

//HttpContext.Current.Response.ClearContent();
//HttpContext.Current.Response.ContentType = "image/png";
//HttpContext.Current.Response.BinaryWrite(MStream1.ToArray());
//image.Dispose();
MStream.Dispose();
MStream1.Dispose();

}
//HttpContext.Current.Response.Flush();
//HttpContext.Current.Response.End();

var result = new Result()
{
resultImgPath = resultImgPath,
resultImgDirectoryPath = resultImgDirectoryPath
};

return result;
}
/// <summary>
/// 调用此函数后使此两种图片合并,类似相册,有个
/// 背景图,中间贴自己的目标图片
/// </summary>
/// <param name="imgBack">粘贴的源图片</param>
/// <param name="destImg">粘贴的目标图片</param>
public static Image CombinImage(Image imgBack, string destImg)
{
Image img = Image.FromFile(destImg); //照片图片
if (img.Height != 30 || img.Width != 30)
{
img = KiResizeImage(img, 30, 30, 0);
}
Graphics g = Graphics.FromImage(imgBack);
g.DrawImage(imgBack, 0, 0, imgBack.Width, imgBack.Height);
//g.DrawImage(imgBack, 0, 0, 相框宽, 相框高);
//g.FillRectangle(System.Drawing.Brushes.White, imgBack.Width / 2 - img.Width / 2 - 1, imgBack.Width / 2 - img.Width / 2 - 1,1,1);//相片四周刷一层黑色边框
//g.DrawImage(img, 照片与相框的左边距, 照片与相框的上边距, 照片宽, 照片高);
g.DrawImage(img, imgBack.Width / 2 - img.Width / 2, imgBack.Width / 2 - img.Width / 2, img.Width, img.Height);
GC.Collect();
return imgBack;
}
/// <summary>
/// Resize图片
/// </summary>
/// <param name="bmp">原始Bitmap</param>
/// <param name="newW">新的宽度</param>
/// <param name="newH">新的高度</param>
/// <param name="Mode">保留着,暂时未用</param>
/// <returns>处理以后的图片</returns>
public static Image KiResizeImage(Image bmp, int newW, int newH, int Mode)
{
try
{
Image b = new Bitmap(newW, newH);
Graphics g = Graphics.FromImage(b);
// 插值算法的质量
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.DrawImage(bmp, new Rectangle(0, 0, newW, newH), new Rectangle(0, 0, bmp.Width, bmp.Height), GraphicsUnit.Pixel);
g.Dispose();
return b;
}
catch
{
return null;
}
}
public bool IsReusable
{
get
{
return false;
}
}
public class Result {
public string resultImgPath { get; set; }
public string resultImgDirectoryPath { get; set; }
}
}
}

+ 73
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Web/ZipHelper.cs Wyświetl plik

@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
using ICSharpCode.SharpZipLib;
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.Checksums;
using ICSharpCode.SharpZipLib.Core;

namespace ZipOneCode.ZipProvider
{
public class ZipHelper
{
/// <summary>
/// 压缩文件
/// </summary>
/// <param name="sourceFilePath"></param>
/// <param name="destinationZipFilePath"></param>
public static void CreateZip(string sourceFilePath, string destinationZipFilePath)
{
if (sourceFilePath[sourceFilePath.Length - 1] != System.IO.Path.DirectorySeparatorChar)
sourceFilePath += System.IO.Path.DirectorySeparatorChar;

ZipOutputStream zipStream = new ZipOutputStream(File.Create(destinationZipFilePath));
zipStream.SetLevel(6); // 压缩级别 0-9
CreateZipFiles(sourceFilePath, zipStream, sourceFilePath);

zipStream.Finish();
zipStream.Close();
}

/// <summary>
/// 递归压缩文件
/// </summary>
/// <param name="sourceFilePath">待压缩的文件或文件夹路径</param>
/// <param name="zipStream">打包结果的zip文件路径(类似 D:\WorkSpace\a.zip),全路径包括文件名和.zip扩展名</param>
/// <param name="staticFile"></param>
private static void CreateZipFiles(string sourceFilePath, ZipOutputStream zipStream, string staticFile)
{
Crc32 crc = new Crc32();
string[] filesArray = Directory.GetFileSystemEntries(sourceFilePath);
foreach (string file in filesArray)
{
if (Directory.Exists(file)) //如果当前是文件夹,递归
{
CreateZipFiles(file, zipStream, staticFile);
}

else //如果是文件,开始压缩
{
FileStream fileStream = File.OpenRead(file);

byte[] buffer = new byte[fileStream.Length];
fileStream.Read(buffer, 0, buffer.Length);
string tempFile = file.Substring(staticFile.LastIndexOf("\\") + 1);
ZipEntry entry = new ZipEntry(tempFile);

entry.DateTime = DateTime.Now;
entry.Size = fileStream.Length;
fileStream.Close();
crc.Reset();
crc.Update(buffer);
entry.Crc = crc.Value;
zipStream.PutNextEntry(entry);

zipStream.Write(buffer, 0, buffer.Length);
}
}
}
}
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/packages.config Wyświetl plik

@@ -7,5 +7,6 @@
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461" />
<package id="NPOI" version="2.3.0" targetFramework="net45" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
<package id="ThoughtWorks.QRCode" version="1.1.0" targetFramework="net461" />
<package id="YUICompressor.NET" version="2.7.0.0" targetFramework="net45" />
</packages>

+ 16
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/.hbuilderx/launch.json Wyświetl plik

@@ -0,0 +1,16 @@
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

+ 2
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js Wyświetl plik

@@ -16,11 +16,11 @@ export default {
// "http://localhost:8088/"
// ],
"apiHost": [
"http://localhost:8088/"
"http://192.168.10.32:8011/"
],
// 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示
"devAccount": [
{ username: "system", password: "123456" }
{ username: "2021230206", password: "www.qj.com" }
],
//是否分布式部署 指WebApi与Web不在一台服务器
"isDistributed":true,


+ 15
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json Wyświetl plik

@@ -684,13 +684,13 @@
},
//选修课选课
{
"path": "pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/list",
"path": "pages/OpenLessonPlanOfElectiveStudent/list",
"style": {
"navigationBarTitleText": "选修课选课"
}
},
{
"path": "pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/from",
"path": "pages/OpenLessonPlanOfElectiveStudent/from",
"style": {
"navigationBarTitleText": "查看详情"
}
@@ -1074,6 +1074,19 @@
"style": {
"navigationBarTitleText": "详情"
}
},
//扫描资产二维码
{
"path": "pages/AssetManagementSystem/ScanAssetQRCode/list",
"style": {
"navigationBarTitleText": "扫描资产二维码"
}
},
{
"path": "pages/AssetManagementSystem/ScanAssetQRCode/from",
"style": {
"navigationBarTitleText": "资产详情"
}
}


+ 195
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/ScanAssetQRCode/from.vue Wyświetl plik

@@ -0,0 +1,195 @@
<template>
<view class="welcome">
<view class="welT">资产信息</view>
<view class="welBox">
<!-- <input type="hidden" name="AIId" :value="AIId" id="AIId" /> -->
<l-input title="资产名称" placeholder="请填写" :value="Ass_AssetsInfoItemEntity.AIASSName" disabled right />
<l-input title="资产编号" placeholder="请填写" :value="Ass_AssetsInfoItemEntity.ACode" disabled right />
<l-input title="明细编号" placeholder="请填写" :value="Ass_AssetsInfoItemEntity.AICode" disabled right />
<l-input title="使用人员" placeholder="请填写" :value="displayListItem(Ass_AssetsInfoItemEntity, 'AIUsePeople')" disabled right />
<l-input title="所在库房" placeholder="请填写" :value="displayListItem(Ass_AssetsInfoItemEntity, 'AIIStorageId')" disabled right />
</view>
</view>
</template>

<script>
import moment from 'moment';
import get from 'lodash/get';
import set from 'lodash/set';
import todayTime from '@/common/js/todayTime.js';
export default {
data() {
return {
pageInfo: '',
scheme: {
AIUsePeople: {
type: 'sourceData',
dataSource: '1',
dataSourceId: 'BaseUser,f_realname,f_userid'
},
AIIStorageId: {
type: 'sourceData',
dataSource: '1',
dataSourceId: 'Ass_StorageData,sname,sid'
}
},
userInfo: {},
dataSource:{
AIUsePeople:[],
AIIStorageId:[]
},
AIId: '',
Ass_AssetsInfoItemEntity:{}
};
},
methods: {
init() {
// console.log(this.API)
let _this = this;
Promise.all([
this.FETCH_DATASOURCE('BaseUser').then(data => {
// console.log(data)
this.dataSource.AIUsePeople = data.data.map(t => ({
text: t.f_realname,
value: t.f_userid
}));
}),
this.FETCH_DATASOURCE('Ass_StorageData').then(data => {
// console.log(data)
this.dataSource.AIIStorageId = data.data.map(t => ({
text: t.sname,
value: t.sid
}));
}),
() => {}
]);
_this.LOADING('加载数据…');
_this.pageInfo = _this.GET_PARAM(); //获取页面传递参数
_this.AIId=_this.pageInfo.AIId;
_this.HTTP_GET('/learun/adms/AssetManagementSystem/Ass_AssetsInfoItem/getEntity', _this.pageInfo.AIId, '加载数据时出错').then(res => {
this.HIDE_LOADING();
console.log(res);
_this.Ass_AssetsInfoItemEntity = _this.COPY(res.Ass_AssetsInfoItemEntity);
});
},
// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field];
const value = item[field];
// console.log(Object.values(this.GET_GLOBAL('dataDictionary').usersex));
switch (fieldItem.type) {
case 'currentInfo':
case 'organize':
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, '');
case 'dataItem':
const sex = this.dataSource[field].find(t => t.value === String(value));
return get(sex, 'text', '');
case 'sourceData':
const BCdPartyFace = this.dataSource[field].find(t => t.value === String(value));
return get(BCdPartyFace, 'text', '');
case 'radio':
case 'select':
const selectItem = this.dataSource[field].find(t => t.value === String(value));
return get(selectItem, 'text', '');

case 'checkbox':
if (!value || value.split(',').length <= 0) {
return '';
}
const checkboxItems = value.split(',');
return this.dataSource[field]
.filter(t => checkboxItems.includes(t.value))
.map(t => t.text)
.join(',');

case 'datetime':
if (!value) {
return '';
}
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm');

default:
return value === null || value === undefined ? '' : value;
}
}
},
created() {
this.userInfo = this.GET_GLOBAL('loginUser'); //获取登录信息
this.init();
}
};
</script>

<style lang="less" scoped>
/deep/ .cu-form-group {
min-height: 40px;
}
.welcome {
padding: 1px 0px 20px;
background: #fff;
}

.welT {
font-size: 16px;
margin-bottom: 10px;
line-height: 26px;
padding: 0 12px;
}

.welT text {
width: 26px;
height: 26px;
line-height: 24px;
border: 1px solid #efefef;
border-radius: 4px;
float: right;
text-align: center;
color: #999;
}

.welLine {
height: 1px;
background: #efefef;
// margin: 10px -12px;
}

.welInput {
overflow: hidden;
font-size: 14px;
margin-top: 10px;
}

.welInput span {
float: left;
width: 26%;
text-align: right;
line-height: 30px;
}

.welInput input {
display: block;
margin-left: 28%;
width: 72%;
border: 1px solid #efefef;
border-radius: 4px;
height: 30px;
line-height: 28px;
padding: 0 10px;
margin-bottom: 0;
}

.welCon {
padding: 10px;
border: 1px solid #efefef;
margin-top: 18px;
border-radius: 4px;
position: relative;
}

</style>

+ 47
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/ScanAssetQRCode/list.vue Wyświetl plik

@@ -0,0 +1,47 @@
<template>
<view class="page">
<view class="btn" @click="tapScan">
扫码
</view>
</view>
</template>

<script>
import scanCodeFun from '@/common/js/scanCodeFun.js';
export default {
data() {
return {}
},
methods: {
init() {
let _this = this;
scanCodeFun.scanCodeFun().then(res => {
console.log(res); //"scanType": "CODABAR"是一维码,QR_CODE是二维码,
if (!res) return;
if (res.scanType=="QR_CODE" && res.result != "" && res.result != null && res.result != undefined) {
this.NAV_TO('./from', {
AIId: res.result
}, true);
}else{
this.TOAST("无法识别到二维码!");
return;
}
})
},
tapScan() {
this.init();
}
},
mounted() {
let _this = this;
setTimeout(function() {
_this.init();
}, 100);
}
};
</script>

<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
</style>

+ 0
- 237
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/list.vue Wyświetl plik

@@ -1,237 +0,0 @@
<template>
<view class="page">
<view class="mainpage" :class="sideOpen ? 'show' : ''" style="padding-top: 40px;">
<!-- <l-customlist-banner></l-customlist-banner> -->
<view class="records">共 {{ records }} 条数据</view>
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="data">
<l-customlist :tips="loadState" showTips>
<view class="pageBox customlist-item" showDelete="true" v-for="(item, ind) in data" :key="item.MakeDate" @click="tapClick(item)">
<view class="">
<text>学年:</text>
{{ item.AcademicYearNo }}
</view>
<view class="">
<text>学期:</text>
{{ item.Semester }}
</view>
<view class="">
<text>课程名称:</text>
{{ item.LessonName }}
</view>
<view class="">
<text>上课节次:</text>
{{ jieci(item.LessonSection) }}
</view>
<view class="">
<text>上课时间:</text>
{{ item.LessonTime }}
</view>
<view class="">
<text>学分:</text>
{{ item.StudyScore }}
</view>
<view class="">
<text>教师姓名:</text>
{{ item.EmpName }}
</view>
<view class="">
<text>教室名称:</text>
{{ item.ClassRoomNo }}
</view>
<view class="">
<text>人数上限:</text>
{{ item.StuNumMax }}
</view>
<view class="">
<text>已报名人数:</text>
{{ item.StuNumOfApplyPre }}
</view>
<view class="pageType">{{ typePd(item.StatusPre) }}</view>
<view class="delbtn" @click.stop="delTap(item)">取消报名</view>
</view>
</l-customlist>
</l-scroll-list>
</view>
</view>
</template>

<script>
export default {
data() {
return {
weekChina: ['一', '二', '三', '四', '五', '六', '日'],
user: null,
data: [],
total: 1,
records: 0,
ready: false,
page: 1,
rows: 10,
multipleData: null,
sideOpen: false,
loadState: '向下翻以加载更多'
};
},
onUnload() {
this.OFF('OpenLessonPlanOfElectiveStudent');
},
methods: {
init() {
this.ON('OpenLessonPlanOfElectiveStudent', this.refreshList);
// 拉取加载列表和数据源
Promise.all([() => {}]);
var _this = this;
this.user = this.GET_GLOBAL('loginUser');
this.fetchList();
this.ready = true;
},
// 拉取列表
async fetchList() {
if (this.page > this.total) {
return;
}
let _this = this;
let _postParam = {
pagination: {
rows: _this.rows,
page: _this.page,
sidx: 'LessonNo',
sord: 'asc'
},
queryJson: '{}'
};
if (true) {
_postParam.queryJson = JSON.stringify({
StuNo: _this.user.account,
StuMajorNo: _this.user.majorno,
StuGrade: _this.user.grade
});
}
// console.log(_this.user)
_this.LOADING('加载数据中…')
_this.HTTP_GET('learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/pagelist', _postParam, '加载数据时出错').then(res => {
_this.HIDE_LOADING();
// console.log(res);
this.data = this.data.concat(res.rows);
_this.total = res.total;
_this.records = res.records;
this.page = res.page + 1;
this.loadState = res.page >= res.total ? '已加载所有项目' : '向下翻以加载更多';
// console.log(_this.data);
});
},
// 列表下拉
pullDown() {
this.refreshList().then(() => {
this.$refs.data.stopPullDown();
});
},
async refreshList() {
this.page = 1;
this.total = 1;
this.data = [];

this.fetchList();
},
tapClick(data) {
this.NAV_TO('./from', data.Id, true);
},
delTap (item) {
// console.log(item)
let _this = this;
this.CONFIRM('数字化校园提示', '确定要取消报名吗?', true).then( res => {
if(res){
let _postData = {
keyValue: item.Id,
StuNo: _this.user.account
}
_this.LOADING('正在取消报名…')
_this.HTTP_POST(
'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/Cancel',
_postData,
'加载数据时出错'
).then( data => {
_this.HIDE_LOADING()
console.log(data)
if (data) {// 成功
this.TOAST('取消报名成功!');
this.refreshList()
}
})
}
})
}
},
computed: {
jieci() {
return str => {
let ls = '';
if (str.indexOf(',') == -1) ls = '星期' + this.weekChina[str.slice(0, 1) - 1] + '第' + str.slice(1) + '节';
else ls = '星期' + this.weekChina[str.slice(0, 1) - 1] + '第' + str.slice(1, 2) + '、' + str.slice(4) + '节';

return ls;
};
},
typePd() {
return num => {
let txt = '';
if (num == 1) {
txt = '审核中';
} else if (num == 2) {
txt = '报名成功';
} else if (num == 3) {
txt = '报名失败';
} else {
txt = '未报名';
}
return txt;
};
}
},
created() {
this.init();
}
};
</script>

<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
.page {
background-color: #fff;
}
.page-content {
margin-top: 39px;
}
.records {
color: #8f8f94;
background: #ffffff;
padding: 10px 12px;
width: 100%;
vertical-align: middle;
border-bottom: 0.5px solid #ddd;
position: fixed;
top: var(--window-top);
z-index: 1024;
border-bottom: 0.5px solid #ddd;
height: 40px;
width: 100%;
box-shadow: 0 0.5px 3px rgba(0, 0, 0, 0.1);
// background: #f1f1f1;
}
.pageBox {
// margin-top: 34px;
padding: 5px 15px;
line-height: 24px;
border-bottom: 5px solid #f5f5f5;
}
.delbtn {
position: absolute;
right: 15px;
bottom: 7px;
padding: 3px 10px;
background: #dd524d;
color: #fff;
border-radius: 3px;
}
</style>

Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/from.vue → Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/OpenLessonPlanOfElectiveStudent/from.vue Wyświetl plik

@@ -44,7 +44,8 @@ export default{
// console.log(this.keyValue);
let _this = this;
_this.LOADING('加载数据中…');
_this.HTTP_GET('learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form', _this.keyValue, '加载数据时出错').then(res => {
_this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/form', _this.keyValue, '加载数据时出错').then(res => {
console.log(_postData,"_postData")
this.HIDE_LOADING();
// console.log(res);
_this.data = res.JournalReceive;
@@ -57,7 +58,7 @@ export default{
_postData.keyValue = this.keyValue;
_postData.StuNo = user.account;
_this.LOADING('正在提交…');
_this.HTTP_POST('learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/SignInByMobile', _postData, '加载数据时出错').then((res,info, code) => {
_this.HTTP_POST('learun/OpenLessonPlanOfElectiveStudent/SignInByMobile', _postData, '加载数据时出错').then((res,info, code) => {
// this.HIDE_LOADING();
console.log(res);
// console.log(info);
@@ -66,7 +67,7 @@ export default{
//判断队列结果
let timer = setInterval(function () {
// _this.LOADING('正在提交…');
_this.HTTP_POST('learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/GetApplyResult', _postData, '加载数据时出错').then((dataresult) => {
_this.HTTP_POST('learun/OpenLessonPlanOfElectiveStudent/GetApplyResult', _postData, '加载数据时出错').then((dataresult) => {
_this.HIDE_LOADING();
console.log(dataresult)
clearInterval(timer);

+ 243
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/OpenLessonPlanOfElectiveStudent/list.vue Wyświetl plik

@@ -0,0 +1,243 @@
<template>
<view class="page">
<view class="mainpage" :class="sideOpen ? 'show' : ''" style="padding-top: 40px;">
<!-- <l-customlist-banner></l-customlist-banner> -->
<view class="records">共 {{ records }} 条数据</view>
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="data">
<l-customlist :tips="loadState" showTips>
<view class="pageBox customlist-item" showDelete="true" v-for="(item, ind) in data"
:key="item.MakeDate" @click="tapClick(item)">
<view class="">
<text>学年:</text>
{{ item.AcademicYearNo }}
</view>
<view class="">
<text>学期:</text>
{{ item.Semester }}
</view>
<view class="">
<text>课程名称:</text>
{{ item.LessonName }}
</view>
<view class="">
<text>上课节次:</text>
{{ jieci(item.LessonSection) }}
</view>
<view class="">
<text>上课时间:</text>
{{ item.LessonTime }}
</view>
<view class="">
<text>学分:</text>
{{ item.StudyScore }}
</view>
<view class="">
<text>教师姓名:</text>
{{ item.EmpName }}
</view>
<view class="">
<text>教室名称:</text>
{{ item.ClassRoomNo }}
</view>
<view class="">
<text>人数上限:</text>
{{ item.StuNumMax }}
</view>
<view class="">
<text>已报名人数:</text>
{{ item.StuNumOfApplyPre }}
</view>
<view class="pageType">{{ typePd(item.StatusPre) }}</view>
<view class="delbtn" @click.stop="delTap(item)">取消报名</view>
</view>
</l-customlist>
</l-scroll-list>
</view>
</view>
</template>

<script>
export default {
data() {
return {
weekChina: ['一', '二', '三', '四', '五', '六', '日'],
user: null,
data: [],
total: 1,
records: 0,
ready: false,
page: 1,
rows: 10,
multipleData: null,
sideOpen: false,
loadState: '向下翻以加载更多'
};
},
onUnload() {
this.OFF('OpenLessonPlanOfElectiveStudent');
},
methods: {
init() {
this.ON('OpenLessonPlanOfElectiveStudent', this.refreshList);
// 拉取加载列表和数据源
Promise.all([() => {}]);
var _this = this;
this.user = this.GET_GLOBAL('loginUser');
this.fetchList();
this.ready = true;
},
// 拉取列表
async fetchList() {
if (this.page > this.total) {
return;
}
let _this = this;
let _postParam = {
pagination: {
rows: _this.rows,
page: _this.page,
sidx: 'LessonNo',
sord: 'asc'
},
queryJson: '{}'
};
if (true) {
_postParam.queryJson = JSON.stringify({
StuNo: _this.user.account,
StuMajorNo: _this.user.majorno,
StuGrade: _this.user.grade,
});
}
_this.LOADING('加载数据中…')
_this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/pagelist', _postParam, '加载数据时出错').then(res => {
_this.HIDE_LOADING();
this.data = this.data.concat(res.rows);
_this.total = res.total;
_this.records = res.records;
this.page = res.page + 1;
this.loadState = res.page >= res.total ? '已加载所有项目' : '向下翻以加载更多';
// console.log(_this.data);
});
},
// 列表下拉
pullDown() {
this.refreshList().then(() => {
this.$refs.data.stopPullDown();
});
},
async refreshList() {
this.page = 1;
this.total = 1;
this.data = [];

this.fetchList();
},
tapClick(data) {
this.NAV_TO('./from', data.Id, true);
},
delTap(item) {
// console.log(item)
let _this = this;
this.CONFIRM('数字化校园提示', '确定要取消报名吗?', true).then(res => {
if (res) {
let _postData = {
keyValue: item.Id,
StuNo: _this.user.account
}
_this.LOADING('正在取消报名…')
_this.HTTP_POST(
'learun/OpenLessonPlanOfElectiveStudent/Cancel',
_postData,
'加载数据时出错'
).then(data => {
_this.HIDE_LOADING()
// console.log(data)
if (data) { // 成功
this.TOAST('取消报名成功!');
this.refreshList()
}
})
}
})
}
},
computed: {
jieci() {
return str => {
let ls = '';
if (str.indexOf(',') == -1) ls = '星期' + this.weekChina[str.slice(0, 1) - 1] + '第' + str.slice(1) +
'节';
else ls = '星期' + this.weekChina[str.slice(0, 1) - 1] + '第' + str.slice(1, 2) + '、' + str.slice(4) +
'节';

return ls;
};
},
typePd() {
return num => {
let txt = '';
if (num == 1) {
txt = '审核中';
} else if (num == 2) {
txt = '报名成功';
} else if (num == 3) {
txt = '报名失败';
} else {
txt = '未报名';
}
return txt;
};
}
},
created() {
this.init();
}
};
</script>

<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';

.page {
background-color: #fff;
}

.page-content {
margin-top: 39px;
}

.records {
color: #8f8f94;
background: #ffffff;
padding: 10px 12px;
width: 100%;
vertical-align: middle;
border-bottom: 0.5px solid #ddd;
position: fixed;
top: var(--window-top);
z-index: 1024;
border-bottom: 0.5px solid #ddd;
height: 40px;
width: 100%;
box-shadow: 0 0.5px 3px rgba(0, 0, 0, 0.1);
// background: #f1f1f1;
}

.pageBox {
// margin-top: 34px;
padding: 5px 15px;
line-height: 24px;
border-bottom: 5px solid #f5f5f5;
}

.delbtn {
position: absolute;
right: 15px;
bottom: 7px;
padding: 3px 10px;
background: #dd524d;
color: #fff;
border-radius: 3px;
}
</style>

+ 68
- 0
Learun.Framework.Ultimate V7/Quanjiang.DigitalSchool.Aspose/Quanjiang.DigitalSchool.Aspose.csproj Wyświetl plik

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{767D20C4-B983-4940-BF97-74D5479CA558}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Quanjiang.DigitalSchool.AsposeHelper</RootNamespace>
<AssemblyName>Quanjiang.DigitalSchool.AsposeHelper</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Aspose.Cells, Version=20.10.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\packages\Aspose.Cells.20.10.0\lib\net40\Aspose.Cells.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words, Version=20.10.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\packages\Aspose.Words.20.10.0\lib\net461\Aspose.Words.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words.Pdf2Word, Version=20.10.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\packages\Aspose.Words.20.10.0\lib\net461\Aspose.Words.Pdf2Word.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AsposeCore.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Learun.Framework.Module\Learun.Util\Learun.Util\Learun.Util.csproj">
<Project>{CF8AE293-88AB-436C-9720-A8386BA5D7B7}</Project>
<Name>Learun.Util</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

+ 11
- 0
Learun.Framework.Ultimate V7/Quanjiang.DigitalSchool.Aspose/app.config Wyświetl plik

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/.signature.p7s Wyświetl plik


BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/Aspose.Cells.20.10.0.nupkg Wyświetl plik


BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/Help/Aspose.Cells For .NET Documentation.chm Wyświetl plik


+ 103
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/License/thirdpartylicenses.Aspose.Cells.for.NET.pdf Wyświetl plik

@@ -0,0 +1,103 @@
Notices and Licenses required for redistribution of Aspose.Cells for .NET

1 Aspose copyright notice........................................................................................................2
2 Third party licenses...............................................................................................................3
2.1 Bouncy Castle....................................................................................................................3
2.2 DotNetZip...........................................................................................................................4
__________________________________________________________________________
Aspose copyright notice
Copyright (c) 2010-2020 Aspose Pty Ltd. All Rights Reserved.
http://www.aspose.com/
This product licensed under the terms of the Aspose End User License Agreement
(http://www.aspose.com/corporate/purchase/end-user-license-agreement.aspx).

2
This product includes the following software:
__________________________________________________________________________
Bouncy Castle
This software is released under MIT (X11) License. This license is copied below, and is also
available online at: http://www.bouncycastle.org/licence.html
Please note this should be read in the same way as the MIT license.
LICENSE
Copyright (c) 2000 - 2015 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

3
__________________________________________________________________________
DotNetZip

This software is open source. It is released under the Microsoft Public License of October
2006. The use of the "Microsoft Public License" does not mean it is licensed by Microsoft.
This license is copied below, and is also available online at:
http://dotnetzip.codeplex.com/license

-----------------------------------------------------------
Microsoft Public License (Ms-PL) - 27 October 2007
-----------------------------------------------------------

This license governs use of the accompanying software. If you use the software, you accept
this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same
meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and
limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free
copyright license to reproduce its contribution, prepare derivative works of its contribution,
and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and
limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free
license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or
otherwise dispose of its contribution in the software or derivative works of the contribution in
the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors'
name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are
infringed by the software, your patent license from such contributor to the software ends
automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent,
trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only
under this license by including a complete copy of this license with your distribution. If you
distribute any portion of the software in compiled or object code form, you may only do so
under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no
express warranties, guarantees or conditions. You may have additional consumer rights
under your local laws which this license cannot change. To the extent permitted under your
local laws, the contributors exclude the implied warranties of merchantability, fitness for a
particular purpose and non-infringement.

4

+ 687
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/acwmain.js Wyświetl plik

@@ -0,0 +1,687 @@
//Copyright (c) 2001-2016 Aspose Pty Ltd. All Rights Reserved.

var acw_version="v2020.10.09";var ie;var iemv;var firefox;var chrome;var safari;var opera;var clientpageheight=0;var asynctableheight_map=new Map;var acwfontsize_map=new Map;var scrollTimeout=null;var scrollendDelay=500;var removeloadinggifDelay=6E4;var PERCOLUMNNUMBER=32;var PERROWNUMBER=32;var HCELL=19;var WCELL=79;var CELL_CONTENT_ROW_DELIMITER="#_@row@_#";var CELL_CONTENT_COL_DELIMITER="#_@col@_#";var CELL_CONTENT_FORMAT_DELIMITER="#_@class@_#";var CELL_CONTENT_SMALL_DELIMITER="#_@_S_@_#";
var MSEXCEL_ROW_DELIMITER="\n";var MSEXCEL_COL_DELIMITER="\t";var global_gridwebkeyevent=false;var java_client=false;var needInitAlignmentAdjust=true;var focusinside=true;var copy_with_style=false;var useESCAsLeave=false;var needValidateall=false;var scrollToInvalidate=true;var current_gridweb=null;var current_cell=null;var current_copy_content=null;var actualcolnumber=0;var actualrownumber=0;var selectrowheader=false;var selectcolheader=false;var lastselcolnumber=0;var lastselrownumber=0;
var shiftclick=false;var afterajaxaction=null;var inajaxupdating=false;var haveanyupdate=true;var firstgrid=null;var col_row_cache_index=new Array;var asyncbeforepostpredata=null;var asyncbeforepostafterdata=null;var enableasynccache=true;var ajaxgoon=true;var cell_attributes_array=["nowrap","align","valign","vtype","isrequired","listmenu","validationoperator","validationvalue1","validationvalue2"];initAcwGlobal();
function UperCaseExceptInsideQuote(s){var arr=new Array;var insidequote=false;var str=arr.join("");var ccchar;for(var i=0;i<s.length;i++){ccchar=s.charAt(i);if(ccchar=='"')insidequote=!insidequote;if(ccchar=='"'||insidequote)arr[i]=ccchar;else arr[i]=ccchar.toUpperCase()}return arr.join("")}
if(ie){function MsXmlDoc(d){this.xmlDoc=d}MsXmlDoc.prototype.getFirstChild=function(){return this.xmlDoc.firstChild};MsXmlDoc.prototype.getLastChild=function(){return this.xmlDoc.lastChild};MsXmlDoc.prototype.getChildNodes=function(){var ret=this.xmlDoc.childNodes;if(ret!=null){var nodes=new Array;for(var i=0;i<ret.length;i++)nodes.push(new MsXmlDoc(ret[i]));return nodes}else return null};MsXmlDoc.prototype.getXML=function(){return this.xmlDoc.xml};MsXmlDoc.prototype.setXML=function(s){this.xmlDoc.xml=
s};MsXmlDoc.prototype.loadXML=function(s){return this.xmlDoc.loadXML(s)};MsXmlDoc.prototype.selectNodes=function(s){return this.xmlDoc.selectNodes(s)};MsXmlDoc.prototype.appendChild=function(s){return this.xmlDoc.appendChild(s)};MsXmlDoc.prototype.hasChildNodes=function(){return this.xmlDoc.hasChildNodes()};MsXmlDoc.prototype.removeChild=function(s){return this.xmlDoc.removeChild(s)};MsXmlDoc.prototype.getAttribute=function(n){var ret=this.xmlDoc.getAttribute(n);if(ret==null)ret=this.xmlDoc.getAttribute(n.toUpperCase());
return ret};MsXmlDoc.prototype.setAttribute=function(n,v){return this.xmlDoc.setAttribute(n,v)};MsXmlDoc.prototype.removeAttribute=function(n){return this.xmlDoc.removeAttribute(n)};MsXmlDoc.prototype.createElement=function(s){return this.xmlDoc.createElement(s)};MsXmlDoc.prototype.selectSingleNode=function(s){var ret=this.xmlDoc.selectSingleNode(s);if(ret)return new MsXmlDoc(ret);else{ret=this.xmlDoc.selectSingleNode(UperCaseExceptInsideQuote(s));if(ret)return new MsXmlDoc(ret);else return null}}}
function keydown_act(e){if(firefox&&e.keyCode==9)e.preventDefault();setgoonkeyevent_onkeypress();if(global_gridwebkeyevent)if(current_cell!=null&&!current_gridweb.focusonoutereditor)current_gridweb.mOnKeyDown(e,current_cell)}function mytestmousedown(e){current_gridweb.focusonoutereditor=true}
function setgoonkeyevent_onkeypress(){var active_nodeName=document.activeElement.nodeName;if(ie)if(active_nodeName=="TD"||active_nodeName=="SPAN")global_gridwebkeyevent=true;else global_gridwebkeyevent=false;else if(active_nodeName=="BODY"||active_nodeName=="SPAN")global_gridwebkeyevent=true;else global_gridwebkeyevent=false}function mykeypress(e){if(global_gridwebkeyevent)if(current_cell!=null&&!current_gridweb.focusonoutereditor)current_gridweb.mOnKeyPress(e)}
function mykeyup(e){if(global_gridwebkeyevent)if(current_cell!=null&&!current_gridweb.focusonoutereditor)current_gridweb.mOnKeyUp(e)}
function initAcwGlobal(){document.onkeydown=keydown_act;document.onkeypress=mykeypress;document.onkeyup=mykeyup;var s=window.navigator.userAgent;var i=s.indexOf("MSIE");if(i>=0){ie=true;iemv=parseInt(s.substring(i+5),10)}else if(s.indexOf("Trident/7.0")>0){ie=true;iemv=11}else if(s.indexOf("Firefox")>=0){firefox=true;HTMLElement.prototype.__defineGetter__("innerText",function(){var anyString="";var childS=this.childNodes;for(var i=0;i<childS.length;i++)if(childS[i].nodeType==1)anyString+=childS[i].tagName==
"BR"?"\n":childS[i].innerText;else if(childS[i].nodeType==3)anyString+=childS[i].nodeValue;return anyString});HTMLElement.prototype.__defineSetter__("innerText",function(sText){if(sText==null){this.textContent="";return}var str=sText+"";var items=str.split("\n");str="";for(var i=0;i<items.length;i++)if(i!=items.length-1)str+=items[i]+"<br>";else str+=items[i];this.innerHTML=str});HTMLElement.prototype.__defineGetter__("currentStyle",function(){return getComputedStyle(this,null)});HTMLElement.prototype.__defineSetter__("outerHTML",
function(sHTML){var r=this.ownerDocument.createRange();r.setStartBefore(this);var df=r.createContextualFragment(sHTML);this.parentNode.replaceChild(df,this);return sHTML});HTMLElement.prototype.__defineGetter__("outerHTML",function(){var attr;var attrs=this.attributes;var str="<"+this.tagName.toLowerCase();for(var i=0;i<attrs.length;i++){attr=attrs[i];if(attr.specified)str+=" "+attr.name+'="'+attr.value+'"'}if(!this.canHaveChildren)return str+">";return str+">"+this.innerHTML+"</"+this.tagName.toLowerCase()+
">"});HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){switch(this.tagName.toLowerCase()){case "area":case "base":case "basefont":case "col":case "frame":case "hr":case "img":case "br":case "input":case "isindex":case "link":case "meta":case "param":return false}return true});HTMLElement.prototype.__defineSetter__("unselectable",function(s){if(s=="on")this.style.MozUserSelect="none"})}else if(s.indexOf("Chrome")>=0){chrome=true;HTMLElement.prototype.__defineGetter__("currentStyle",
function(){return getComputedStyle(this,null)})}else if(s.indexOf("Safari")>=0){safari=true;HTMLElement.prototype.__defineGetter__("currentStyle",function(){return getComputedStyle(this,null)})}else if(s.indexOf("Opera")>=0)opera=true;else alert("unknown browser.")}if(!ie){HTMLElement.prototype.contains=function(ele){return this.compareDocumentPosition(ele)&16};HTMLElement.prototype.setActive=function(){return this.focus()}}
function Stylesheet(ss){if(typeof ss=="number")ss=document.styleSheets[ss];this.ss=ss}Stylesheet.prototype.getRules=function(){return this.ss.cssRules?this.ss.cssRules:this.ss.rules};Stylesheet.prototype.getRule=function(s){var rules=this.getRules();if(!rules)return null;if(typeof s=="number")return rules[s];s=s.toLowerCase();for(var i=rules.length-1;i>=0;i--)if(rules[i].selectorText.toLowerCase()==s)return rules[i];return null};
Stylesheet.prototype.getStyles=function(s){var rule=this.getRule(s);if(rule&&rule.style)return rule.style;else return null};Stylesheet.prototype.getStyleText=function(s){var rule=this.getRule(s);if(rule&&rule.style&&rule.style.cssText)return rule.style.cssText;else return""};
Stylesheet.prototype.addRule=function(selector,styles,n){if(n==undefined){var rules=this.getRules();n=rules.length}if(this.ss.insertRule)this.ss.insertRule(selector+"{"+styles+"}",n);else if(this.ss.addRule)this.ss.addRule(selector,styles,n)};
Stylesheet.prototype.deleteRule=function(s){if(s==undefined){var rules=this.getRules();s=rules.length-1}if(typeof s!="number"){s=s.toLowerCase();var rules=this.getRules();for(var i=rules.length-1;i>=0;i--)if(rules[i].selectorText.toLowerCase()==s){s=i;break}if(i==-1)return}if(this.ss.deleteRule)this.ss.deleteRule(s);else if(this.ss.removeRule)this.ss.removeRule(s)};
function Event(e){if(window.event){this.e=window.event;return}if(e!=null){this.e=e;return}var func=Event.caller;while(func!=null){var arg0=func.arguments[0];if(arg0)if(arg0.constructor==Event||arg0.constructor==MouseEvent||typeof arg0=="object"&&arg0.preventDefault&&arg0.stopPropagation){this.e=arg0;return}func=func.caller}}Event.prototype.getTarget=function(){return this.e.srcElement||this.e.target};
Event.prototype.getFromElement=function(){if(window.event)return this.e.fromElement;var node;if(this.e.type=="mouseover")node=this.e.relatedTarget;else if(this.e.type=="mouseout")node=this.e.target;if(!node)return;while(node.nodeType!=1)node=node.parentNode;return node};
Event.prototype.getToElement=function(){if(window.event)return this.e.toElement;var node;if(this.e.type=="mouseout")node=this.e.relatedTarget;else if(this.e.type=="mouseover")node=this.e.target;if(!node)return;while(node.nodeType!=1)node=node.parentNode;return node};Event.prototype.getOffset=function(){if(window.event){var offset={offsetX:this.e.offsetX,offsetY:this.e.offsetY};return offset}else{var offset={offsetX:this.e.layerX,offsetY:this.e.layerY};return offset}};
function getClient(o){var left=0;var top=0;while(o.offsetParent){left+=o.offsetLeft;top+=o.offsetTop;if(o.offsetParent.scrollLeft)left-=o.offsetParent.scrollLeft;if(o.offsetParent.scrollTop)top-=o.offsetParent.scrollTop;o=o.offsetParent}return{cx:left,cy:top}}function HTMLEncode(str){var s="";if(str.length==0)return"";s=str.replace(/&/g,"&amp;");s=s.replace(/</g,"&lt;");s=s.replace(/>/g,"&gt;");s=s.replace(/\"/g,"&quot;");return s}
function HTMLDecode(str){var s="";if(str.length==0)return"";s=str.replace(/&amp;/g,"&");s=s.replace(/&lt;/g,"<");s=s.replace(/&gt;/g,">");s=s.replace(/&quot;/g,'"');return s}
function getXMLDocument(element){var src=element.innerHTML;if(src==null||src.length==0)if(!ie)src=element.xml;if(opera){arr=src.match(/\'[^\']*\'/g);if(arr!=null)for(var i=0;i<arr.length;i++){var str=arr[i].substring(1,arr[i].length-1);src=src.replace(arr[i],'"'+HTMLEncode(str)+'"')}}if(ie){var progIDs=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0"];for(var i=0;i<progIDs.length;i++)try{var xmlDoc=new ActiveXObject(progIDs[i]);xmlDoc=new MsXmlDoc(xmlDoc);xmlDoc.loadXML(src);return xmlDoc}catch(ex){}alert("unsupport browser,please using chrome/safari/firefox or IE");
return null}else{var parser=new DOMParser;return parser.parseFromString(src,"text/xml")}}
if(!ie){XMLDocument.prototype.loadXML=function(xmlString){var childNodes=this.childNodes;for(var i=childNodes.length-1;i>=0;i--)this.removeChild(childNodes[i]);var dp=new DOMParser;var newDOM=dp.parseFromString(xmlString,"text/xml");var newElt=this.importNode(newDOM.documentElement,true);this.appendChild(newElt)};XMLDocument.prototype.__proto__.__defineGetter__("xml",function(){try{return(new XMLSerializer).serializeToString(this)}catch(ex){var d=document.createElement("div");d.appendChild(this.cloneNode(true));
return d.innerHTML}});Element.prototype.__proto__.__defineGetter__("xml",function(){try{return(new XMLSerializer).serializeToString(this)}catch(ex){var d=document.createElement("div");d.appendChild(this.cloneNode(true));return d.innerHTML}});XMLDocument.prototype.__proto__.__defineGetter__("text",function(){return this.firstChild.textContent});Element.prototype.__proto__.__defineGetter__("text",function(){return this.textContent});XMLDocument.prototype.getXML=Element.prototype.getXML=function(){try{return(new XMLSerializer).serializeToString(this)}catch(ex){var d=
document.createElement("div");d.appendChild(this.cloneNode(true));return d.innerHTML}};XMLDocument.prototype.getChildNodes=Element.prototype.getChildNodes=function(){return this.childNodes};XMLDocument.prototype.getFirstChild=Element.prototype.getFirstChild=function(){return this.firstChild};XMLDocument.prototype.getLastChild=Element.prototype.getLastChild=function(){return this.lastChild};XMLDocument.prototype.selectSingleNode=Element.prototype.selectSingleNode=function(xpath){var x=this.selectNodes(xpath);
if(!x||x.length<1)return null;return x[0]};XMLDocument.prototype.selectNodes=Element.prototype.selectNodes=function(xpath){var xpe=new XPathEvaluator;var nsResolver=xpe.createNSResolver(this.ownerDocument==null?this.documentElement:this.ownerDocument.documentElement);var result=xpe.evaluate(xpath,this,nsResolver,0,null);var found=[];var res;while(res=result.iterateNext())found.push(res);return found}}
function getattr(o,name){if(o==null)return null;if(ie&&iemv<8)return o[name];if(o.attributes){var attri=o.getAttribute(name);if(attri!=null)return attri;else return o[name]}}function setInnerText(span,v){span.innerText=v}function getInnerText(o){var span=o;if(span.children.length>0&&span.tagName=="TD")span=span.children[0];var text_inner=span.innerText;if(chrome)return text_inner.replace(/\n$/,"");else if(ie&&o.myInnerText)return o.myInnerText.replace(/\n$/,"");else return text_inner}
function getPercentageLength(str){if(str.endsWith("%"))return Number(str.substring(0,str.length-1))/100;else return null}
function parseLength(str,xy){reSetDPI();var len=str.length;if(str==null||str==""||str.charAt(len-1)=="%")return null;var nval=new Number(str);if(!isNaN(nval))return nval;var pfx=str.substring(len-2,len).toLowerCase();var val=str.substring(0,len-2);var nval=new Number(val);if(isNaN(nval))return null;var d;if(xy=="x")d=screen.deviceXDPI;else d=screen.deviceYDPI;if(d==null)d=96;switch(pfx){case "px":return nval;case "in":return nval*d;case "cm":return nval/2.54*d;case "mm":return nval/25.4*d;case "pt":return nval/
72*d;case "pc":return nval/6*d;default:return null}}function getlang(){if(typeof ACWLang!="undefined"&&ACWLang!=null)return ACWLang;else return def_lang}
var def_lang={TipCellNoValue:"<NULL>",TipCellFormula:"<FORMULA>",TipCellIsRequired:"<REQUIRED>",TipCellAnyValue:"<ANY VALUE>",TipCellList:"<SELECT FROM LIST>",TipCellDropDownList:"<SELECT FROM LIST>",TipCellFreeList:"<SELECT FROM LIST OR INPUT>",TipCellRegex:"<REGEX>",TipCellBoolean:"<BOOLEAN>",TipCellDate:"<DATE>",TipCellDateTime:"<DATETIME>",TipCellNumber:"<NUMBER>",TipCellInteger:"<INTEGER>",TipCellCustomFunction:"<CUSTOM FUNCTION>",TipCellCustomServerFunction:"<CUSTOM SERVER FUNCTION>",TipCellCustomString:"<CUSTOM STRING>",
TipCellTime:"<TIME>",TipCellTextLength:"<TEXT LENGTH>",TipCellCheckbox:"<CHECKBOX>",TipCellFilter:"<AUTO FILTER>",TipCellComment:"<COMMENT>",MenuItemCopy:"Copy",MenuItemCut:"Cut",MenuItemPaste:"Paste",MenuItemFreeze:"Freeze",MenuItemUnfreeze:"Unfreeze",MenuItemAddRow:"Add Row",MenuItemInsertRow:"Insert Row",MenuItemDeleteRow:"Delete Row",MenuItemAddColumn:"Add Column",MenuItemInsertColumn:"Insert Column",MenuItemDeleteColumn:"Delete Column",MenuItemMergeCells:"Merge Cells",MenuItemUnmergeCells:"Unmerge Cells",
MenuItemDelComment:"Delete Comment",MenuItemFormat:"Format Cell...",MenuItemFind:"Find...",MenuItemReplace:"Replace...",MenuItemFilterAll:"(ALL)",TipListMenuButton:"Click to show the list values.",TipCalendarButton:"Click to show the calendar.",TipScrollLeftButton:"Scroll tab bar to the left.",TipScrollRightButton:"Scroll tab bar to the right.",TipSubmitButton:"Submit edit result and recalculate all formulas.",TipSaveButton:"Save edit result.",TipUndoButton:"Cancel edit result.",TipTab:"Change worksheet.",
TipClientSideMenu:"Client side menu.",TipExpandChildButton:"Expand or collapse the child view.",TipExpandGroupRowButton:"Expand or collapse the group rows.",TipExpandGroupColButton:"Expand or collapse the group columns.",TipSortHeader:"Click to sort.",TipFilterButton:"Click to show the filter values.",TipPasteTooMuchRows:"The rows of the copy content is more than the paste rows .",DialogBoxLoading:"Loading, please wait..."};
function getVTypeString(vtype){if(vtype==null)return null;var vstring=null;if(typeof ACWLang!="undefined"&&ACWLang!=null)switch(vtype){case "any":vstring=ACWLang.TipCellAnyValue;break;case "list":vstring=ACWLang.TipCellList;break;case "dlist":vstring=ACWLang.TipCellDropDownList;break;case "flist":vstring=ACWLang.TipCellFreeList;break;case "regex":vstring=ACWLang.TipCellRegex;break;case "bool":vstring=ACWLang.TipCellBoolean;break;case "number":vstring=ACWLang.TipCellNumber;break;case "int":vstring=
ACWLang.TipCellInteger;break;case "date":vstring=ACWLang.TipCellDate;break;case "datetime":vstring=ACWLang.TipCellDateTime;break;case "time":vstring=ACWLang.TipCellTime;break;case "textlength":vstring=ACWLang.TipCellTextLength;break;case "customstring":vstring=ACWLang.TipCellCustomString;break;case "customfunction":vstring=ACWLang.TipCellCustomFunction;break;case "customserverfunction":vstring=ACWLang.TipCellCustomServerFunction;break;case "checkbox":vstring=ACWLang.TipCellCheckbox;break;case "filter":vstring=
ACWLang.TipCellFilter;break}if(vstring==null)vstring=vtype.toUpperCase();return vstring}
function validatorConvert(op,dataType,noneedconvert){var num,cleanInput,m,exp;if(dataType=="int"){exp=/^\s*[-\+]?\d+\s*$/;if(op.match(exp)==null)return null;num=parseInt(op,10);return isNaN(num)?null:num}else if(dataType=="number"){if(noneedconvert)cleanInput=op;else{var decimalpoint=getattr(this,"decimalpoint");if(decimalpoint==null)decimalpoint=".";exp=new RegExp("^\\s*([-\\+])?(\\d+)?(\\"+decimalpoint+"(\\d+))?\\s*$");m=op.match(exp);if(m==null)return null;cleanInput=(m[1]!=null?m[1]:"")+(m[2].length>
0?m[2]:"0")+"."+m[4]}num=parseFloat(cleanInput);return isNaN(num)?null:num}else if(dataType=="date"){var yearFirstExp=/^(\d{4})[\/|-](\d{1,2})[\/|-](\d{1,2})$/;m=op.match(yearFirstExp);var day,month,year;if(m!=null){year=m[1];month=m[2];day=m[3]}else{yearFirstExp=/^(\d{1,2})[\/|-](\d{1,2})[\/|-](\d{4})$/;m=op.match(yearFirstExp);if(m!=null){year=m[3];month=m[1];day=m[2]}else return null}month-=1;var date=new Date(year,month,day);return typeof date=="object"&&year==date.getFullYear()&&month==date.getMonth()&&
day==date.getDate()?date.valueOf():null}else if(dataType=="datetime"){var yearFirstExp=/^(\d{4})[\/|-](\d{1,2})[\/|-](\d{1,2}) (\d+)\:(\d+)\:(\d+)$/;m=op.match(yearFirstExp);var day,month,year,hour,minu,sec;if(m!=null){year=m[1];month=m[2];day=m[3];hour=m[4];minu=m[5];sec=m[6]}else{yearFirstExp=/^(\d{4})[\/|-](\d{1,2})[\/|-](\d{1,2}) (\d+)\:(\d+)$/;m=op.match(yearFirstExp);if(m!=null){year=m[1];month=m[2];day=m[3];hour=m[4];minu=m[5];sec=0}else{yearFirstExp=/^(\d{1,2})[\/|-](\d{1,2})[\/|-](\d{4}) (\d+)\:(\d+)\:(\d+)$/;
m=op.match(yearFirstExp);if(m!=null){year=m[3];month=m[1];day=m[2];hour=m[4];minu=m[5];sec=m[6]}else{yearFirstExp=/^(\d{1,2})[\/|-](\d{1,2})[\/|-](\d{4}) (\d+)\:(\d+)$/;m=op.match(yearFirstExp);if(m!=null){year=m[3];month=m[1];day=m[2];hour=m[4];minu=m[5];sec=0}else return null}}}month-=1;var date=new Date(year,month,day,hour,minu,sec);return typeof date=="object"&&year==date.getFullYear()&&month==date.getMonth()&&day==date.getDate()&&hour==date.getHours()&&minu==date.getMinutes()&&sec==date.getSeconds()?
date.valueOf():null}else if(dataType=="time"){var yearFirstExp=/^(\d+)\:(\d+)\:(\d+)$/;m=op.match(yearFirstExp);var hour,minu,sec;if(m!=null){hour=m[1];minu=m[2];sec=m[3]}else{yearFirstExp=/^(\d+)\:(\d+)$/;m=op.match(yearFirstExp);var hour,minu;if(m!=null){hour=m[1];minu=m[2];sec="00"}else return null}if(Number(hour)>=0&&Number(hour)<=23&&Number(minu)>=0&&Number(minu)<=59&&Number(sec)>=0&&Number(sec)<=59)return addprefixfortime(hour)+":"+addprefixfortime(minu)+":"+addprefixfortime(sec);else return null}else return op.toString()}
function addprefixfortime(value){if(value.length==1)value="0"+value;return value}var gridwebinstance=new Map;
function acwmain(gridweb){if(gridwebinstance.get(gridweb.id)!=null)return;this.gridweb=gridweb;gridweb.handler=this;gridweb.reSetDPI=reSetDPI;gridweb.reSetDPI();gridweb.menuRangeMap=new Map;gridweb._selections=new Selections(gridweb);gridweb.Dragging=null;gridweb.DraggingMode=0;gridweb.DragCell=null;gridweb.DragEndCell=null;gridweb.ActiveCell=null;gridweb.ResizeIcon=null;gridweb.StartX=null;gridweb.StartY=null;gridweb.StartWidth=null;gridweb.StartHeight=null;gridweb.StartWidth1=null;gridweb.StartHeight1=
null;gridweb.ResizingHD=null;gridweb.resizeType=null;gridweb.resizePanel=null;gridweb.ListMenu=null;gridweb.validations=null;gridweb.dataFilters=null;gridweb.xmlDoc=null;gridweb.xmlDoc1=null;gridweb.lmDoc=null;gridweb.ContextMenu=null;gridweb.Calendar=null;gridweb.xmlData=null;gridweb.vmark=null;gridweb.fastEdit=null;gridweb.bottomTable=null;gridweb.topPanel=null;gridweb.leftTopPanel=null;gridweb.leftPanel=null;gridweb.viewPanel=null;gridweb.viewPanel01=null;gridweb.viewPanel10=null;gridweb.tabPanel=
null;gridweb.eventBtn=null;gridweb.viewTable=null;gridweb.viewTable00=null;gridweb.viewTable01=null;gridweb.viewTable10=null;gridweb.vsBar=null;gridweb.hsBar=null;gridweb.frameTab=null;gridweb.fRow=null;gridweb.fCol=null;gridweb.fRowH=null;gridweb.fColH=null;gridweb.viewRow=null;gridweb.CD=null;gridweb.CD0=null;gridweb.CD1=null;gridweb.pageSelect=null;gridweb.cidregex=null;gridweb.xTable=null;gridweb.ltable0=null;gridweb.ltable1=null;gridweb.topTable=null;gridweb.topTable0=null;gridweb.sBody=null;
gridweb.loadingBox=null;gridweb.blockcover=null;gridweb.pendingNodes=null;gridweb.ajaxXmlHttp=null;gridweb.ajaxtimeout=null;gridweb.ajaxsendtimeout=null;gridweb.ajaxupdatingcells=null;gridweb.contentInit=false;gridweb.donotneedscroll=false;gridweb.isshowformula=false;if(!ie||iemv>8){gridweb.acw_client_path=getattr(gridweb,"acw_client_path");gridweb.image_file_path=getattr(gridweb,"image_file_path");gridweb.activerow=getattr(gridweb,"activerow");gridweb.activecol=getattr(gridweb,"activecol");gridweb.ajaxcallpath=
getattr(gridweb,"ajaxcallpath");gridweb.asynccallpath=getattr(gridweb,"asynccallpath");gridweb.acbcolor=getattr(gridweb,"acbcolor");gridweb.accolor=getattr(gridweb,"accolor");gridweb.scbcolor=getattr(gridweb,"scbcolor");gridweb.sccolor=getattr(gridweb,"sccolor");gridweb.ahbcolor=getattr(gridweb,"ahbcolor");gridweb.ahcolor=getattr(gridweb,"ahcolor");gridweb.aminrow=getattr(gridweb,"aminrow");gridweb.amaxrow=getattr(gridweb,"amaxrow");gridweb.minrow=getattr(gridweb,"minrow");gridweb.maxrow=getattr(gridweb,
"maxrow");gridweb.amincol=getattr(gridweb,"amincol");gridweb.amaxcol=getattr(gridweb,"amaxcol");gridweb.mincol=getattr(gridweb,"mincol");gridweb.maxcol=getattr(gridweb,"maxcol");gridweb.asynctoprows=getattr(gridweb,"asynctoprows");gridweb.visiblerows=getattr(gridweb,"visiblerows");gridweb.asyncrows=getattr(gridweb,"asyncrows");gridweb.forcevalid=getattr(gridweb,"forcevalid");if(!ie&&!getattr(gridweb,"tabIndex"))gridweb.setAttribute("tabIndex",0)}gridweb.webuniqueid=getattr(gridweb,"webuniqueid");
if(gridweb.ajaxcallpath!=null&&gridweb.ajaxcallpath.endsWith("acw_ajax_call=true"))java_client=true;gridweb.xhtmlmode=getattr(gridweb,"xhtmlmode")=="1";gridweb.editmode=getattr(gridweb,"editmode")=="1";gridweb.freeze=getattr(gridweb,"freeze")=="1";gridweb.noscroll=getattr(gridweb,"noscroll")=="1";gridweb.async=getattr(gridweb,"async")=="1";gridweb.isUseClientPageHeight=getattr(gridweb,"useclientpageheight")=="1";gridweb.aminrow=parseInt(gridweb.aminrow);gridweb.amaxrow=parseInt(gridweb.amaxrow);gridweb.minrow=
parseInt(gridweb.minrow);gridweb.maxrow=parseInt(gridweb.maxrow);gridweb.amincol=parseInt(gridweb.amincol);gridweb.amaxcol=parseInt(gridweb.amaxcol);if(gridweb.asynctoprows!=null)gridweb.asynctoprows=parseInt(gridweb.asynctoprows);if(gridweb.visiblerows!=null)gridweb.visiblerows=parseInt(gridweb.visiblerows);if(gridweb.asyncrows!=null)gridweb.asyncrows=parseInt(gridweb.asyncrows);if(gridweb.activerow!=null)gridweb.activerow=parseInt(gridweb.activerow);if(gridweb.activecol!=null)gridweb.activecol=
parseInt(gridweb.activecol);if(gridweb.freeze){gridweb.freezerow=parseInt(getattr(gridweb,"freezerow"));gridweb.freezecol=parseInt(getattr(gridweb,"freezecol"))}gridweb.acttab=getattr(gridweb,"acttab");gridweb.vsTimeout=null;gridweb.autoDraggingId=null;gridweb.dropDownListFlg=false;gridweb.selectedOptionVal="";gridweb.dropdownListLoadedFlg=false;gridweb.dropdownListShowedFlg=false;gridweb.activateNextOrPreviCellFlg=false;gridweb.shiftAndTabKeyPressedFlg=false;gridweb.currentIMGWidth=0;gridweb.scrolledFlg=
false;gridweb.leftKeyPressedFlg=false;gridweb.previClickedCell=null;gridweb.rotationCss=null;gridweb.pasteObject=null;gridweb.preventKeyPress=false;gridweb.calendarAppended=false;gridweb.isDataChanged=isDataChanged;gridweb.updateData=updateData;gridweb.validateAll=validateAll;gridweb.submit=submit;gridweb.getCellValue=getCellValue;gridweb.setCellValue=setCellValue;gridweb.getActiveRow=getActiveRow;gridweb.getActiveColumn=getActiveColumn;gridweb.setActiveCellBasic=setActiveCellBasic;gridweb.setActiveCell=
setActiveCell;gridweb.tryInitSetActiveCell=tryInitSetActiveCell;gridweb.setActiveCellNoadjust=setActiveCellNoadjust;gridweb.getSelectedCells=getSelectedCells;gridweb.resizeColumnToFit=resizeColumnToFit;gridweb.getActiveCell=getActiveCell;gridweb.setActiveCellByCell=setActiveCellByCell;gridweb.getCell=getCell;gridweb.getLocateCell=getLocateCell;gridweb.getCellRow=getCellRow;gridweb.recalculateCellRowNumberOnCurrentCell=recalculateCellRowNumberOnCurrentCell;gridweb.recalculateCellColNumberOnCurrentCell=
recalculateCellColNumberOnCurrentCell;gridweb.getCellColumn=getCellColumn;gridweb.getColumn=getColumn;gridweb.getCellColumnName=getCellColumnName;gridweb.getCellName=getCellName;gridweb.getCellValueByCell=getCellValueByCell;gridweb.setCellValueByCell=setCellValueByCell;gridweb.print=print;gridweb.getClientPageHeight=getClientPageHeight;gridweb.setActiveTab=setActiveTab;gridweb.adjustXSize=adjustXSize;gridweb.adjustXSizeX=adjustXSizeX;gridweb.initXTable=initXTable;gridweb.adjustXhtmlTopRow=adjustXhtmlTopRow;
gridweb.adjustXhtmlRows=adjustXhtmlRows;gridweb.adjustXhtml2_p=adjustXhtml2_p;gridweb.adjustNoScroll=adjustNoScroll;gridweb.adjustFreeze=adjustFreeze;gridweb.adjustScroll=adjustScroll;gridweb.adjustSizes=adjustSizes;gridweb.adjustBVScroll=adjustBVScroll;gridweb.adjustAsyncScrollBar=adjustAsyncScrollBar;gridweb.setUpContrlScrollBar=setUpContrlScrollBar;gridweb.setUpContrlRadioButton=setUpContrlRadioButton;gridweb.mOnResize=mOnResize;gridweb.mOnScroll=mOnScroll;gridweb.mOnScroll1=mOnScroll1;gridweb.mOnScroll2=
mOnScroll2;gridweb.mOnVScroll=mOnVScroll;gridweb.mOnHScroll=mOnHScroll;gridweb.mOnSubmit=mOnSubmit;gridweb.mOnError=mOnError;gridweb.mOnCalendarChange=mOnCalendarChange;gridweb.mOnContextMenuClick=mOnContextMenuClick;gridweb.mOnListMenuClick=mOnListMenuClick;gridweb.mOnPageChange=mOnPageChange;gridweb.selectPageIndex=selectPageIndex;gridweb.mOnSelectCell=mOnSelectCell;gridweb.mOnSelectCellAjaxCallBack=mOnSelectCellAjaxCallBack;gridweb.mOnUnselectCell=mOnUnselectCell;gridweb.mOnDoubleClickCell=mOnDoubleClickCell;
gridweb.mOnDoubleClickRow=mOnDoubleClickRow;gridweb.mOnCellError=mOnCellError;gridweb.mOnCellUpdated=mOnCellUpdated;gridweb.updateMenuReferenceOnCellUpdated=updateMenuReferenceOnCellUpdated;gridweb.mOnEmbededGridSubmit=mOnEmbededGridSubmit;gridweb.createLoadingBox=createLoadingBox;gridweb.validateInput=validateInput;gridweb.setValid=setValid;gridweb.setInvalid=setInvalid;gridweb.validateServerFunction=validateServerFunction;gridweb.searchv=searchv;gridweb.searchValidations=searchValidations;gridweb.isCell=
isCell;gridweb.clearSelections=clearSelections;gridweb.clearSelectionAsyncCache=clearSelectionAsyncCache;gridweb.setSelectRange=setSelectRange;gridweb.getSelectRange=getSelectRange;gridweb.doRangeSelect=doRangeSelect;gridweb.editCell=editCell;gridweb.editCell2=editCell2;gridweb.endEdit=endEdit;gridweb.endEditfromEditorBox=endEditfromEditorBox;gridweb.endEditBase=endEditBase;gridweb.EscCancelEdit=EscCancelEdit;gridweb.deleteCells=deleteCells;gridweb.selectCellBasic=selectCellBasic;gridweb.selectCell=
selectCell;gridweb.selectCellNoadjust=selectCellNoadjust;gridweb.enterSelect=enterSelect;gridweb.enterEdit=enterEdit;gridweb.endSelect=endSelect;gridweb.setCellActive=setCellActive;gridweb.getSpan=getSpan;gridweb.getO=getO;gridweb.endDrag=endDrag;gridweb.update=update;gridweb.updateCellFontStyle=updateCellFontStyle;gridweb.updateCellFontName=updateCellFontName;gridweb.updateCellFontSize=updateCellFontSize;gridweb.updateCellFontLine=updateCellFontLine;gridweb.updateCellFontColor=updateCellFontColor;
gridweb.updateCellBackGroundColor=updateCellBackGroundColor;gridweb.addCelllink=addCelllink;gridweb.delCelllink=delCelllink;gridweb.getCellRowColumnByCellName=getCellRowColumnByCellName;gridweb.getCellColumnByColumnName=getCellColumnByColumnName;gridweb.rangeupdate=rangeupdate;gridweb.setCellTitle=setCellTitle;gridweb.createtip=createtip;gridweb.showtip_cmnt=showtip_cmnt;gridweb.showtip_imsg=showtip_imsg;gridweb.hidetip=hidetip;gridweb.postBack=postBack;gridweb.copy=copy;gridweb.cut=cut;gridweb.CopyOrCut=
CopyOrCut;gridweb.paste=paste;gridweb.doPaste=doPaste;gridweb.doMyPasteAction=doMyPasteAction;gridweb.doMyCopyAction=doMyCopyAction;gridweb.requestFocusToGetCopyContentForPaste=requestFocusToGetCopyContentForPaste;gridweb.hideUpdatingImage=hideUpdatingImage;gridweb.updateSelect=updateSelect;gridweb.updatePagePosition=updatePagePosition;gridweb.updateAsync=updateAsync;gridweb.postAsyncW=postAsyncW;gridweb.postAsyncH=postAsyncH;gridweb.mouseOut=mouseOut;gridweb.mouseUp=mouseUp;gridweb.autoDragging=
autoDragging;gridweb.VscrollEndHandler=VscrollEndHandler;gridweb.HscrollEndHandler=HscrollEndHandler;gridweb.ajaxupdate=ajaxupdate;gridweb.ajaxcall=ajaxcall;gridweb.ajaxcallback=ajaxcallback;gridweb.ajaxcallback2=ajaxcallback2;gridweb.ajaxsendfail=ajaxsendfail;gridweb.ajaxcall_onselectcell=ajaxcall_onselectcell;gridweb.ajaxcall_onselectcell_start=ajaxcall_onselectcell_start;gridweb.ajaxcallback_onselectcell=ajaxcallback_onselectcell;gridweb.gridajaxupdate=gridajaxupdate;gridweb.gridajaxcall=gridajaxcall;
gridweb.gridajaxcallback=gridajaxcallback;gridweb.gridajaxcallback2=gridajaxcallback2;gridweb.gridajaxsendfail=gridajaxsendfail;gridweb.gridajaxupdateStyles=gridajaxupdateStyles;gridweb.createLoadingByChart=createLoadingByChart;gridweb.addImagePreLoadingGif=addImagePreLoadingGif;gridweb.adjustImageButton=adjustImageButton;gridweb.doSelectShiftCellRange=doSelectShiftCellRange;gridweb.pressKeyGoUpOnCell=pressKeyGoUpOnCell;gridweb.pressKeyGoDownOnCell=pressKeyGoDownOnCell;gridweb.pressKeyGoLeftOnCell=
pressKeyGoLeftOnCell;gridweb.pressKeyGoRightOnCell=pressKeyGoRightOnCell;gridweb.findcurrentCell=findcurrentCell;gridweb.findLeftUpMostCell=findLeftUpMostCell;gridweb.findUpMostCell=findUpMostCell;gridweb.findLeftMostCell=findLeftMostCell;gridweb.validateContent=validateContent;gridweb.validatorConvert=validatorConvert;gridweb.getNextValidCell=getNextValidCell;gridweb.getPreviousValidCell=getPreviousValidCell;gridweb.getUndersideValidRow=getUndersideValidRow;gridweb.getUpsideValidRow=getUpsideValidRow;
gridweb.GetUpListItem=GetUpListItem;gridweb.GetDownListItem=GetDownListItem;gridweb.getchartimg=getchartimg;gridweb.isHeader=isHeader;gridweb.setResizeCursor=setResizeCursor;gridweb.resizeHeaderbar=resizeHeaderbar;gridweb.enterResize=enterResize;gridweb.endResize=endResize;gridweb.fontDialog=fontDialog;gridweb.closeFontDialog=closeFontDialog;gridweb.fillTableCellsToArray=fillTableCellsToArray;gridweb.showDropDownList=showDropDownList;gridweb.getViewTableByRowHeader=getViewTableByRowHeader;gridweb.getViewTableByColHeader=
getViewTableByColHeader;gridweb.getViewTableByCell=getViewTableByCell;gridweb.getFirstCell=getFirstCell;gridweb.getLastCell=getLastCell;gridweb.getFormulaValidation=getFormulaValidation;gridweb.fontdialognext=fontdialognext;gridweb.vsBarSetPosion=vsBarSetPosion;gridweb.hsBarSetPosion=hsBarSetPosion;gridweb.initGridWebByClientPageHeight=initGridWebByClientPageHeight;gridweb.resize=resize;gridweb.ajacsendcmd=ajacsendcmd;gridweb.delcomment=delcomment;gridweb.delcomments=delcomments;gridweb.addcomments=
addcomments;gridweb.delcommentlocal=delcommentlocal;gridweb.collapseRow=collapseRow;gridweb.expandRow=expandRow;gridweb.setRowDisplayExtrForMergedAreaAbove=setRowDisplayExtrForMergedAreaAbove;gridweb.setRowDisplayExtrForMergedAreaBelow=setRowDisplayExtrForMergedAreaBelow;gridweb.collapseCol=collapseCol;gridweb.expandCol=expandCol;gridweb.setColDisplay=setColDisplay;gridweb.setColDisplayBasic=setColDisplayBasic;gridweb.getContentRowById=getContentRowById;gridweb.getContentColById=getContentColById;
gridweb.getLeftPartRowById=getLeftPartRowById;gridweb.getRightPartRowById=getRightPartRowById;gridweb.getHeadRowById=getHeadRowById;gridweb.getRowVisible=getRowVisible;gridweb.getVisibleRowCount=getVisibleRowCount;gridweb.setRowCollpaseStatus=setRowCollpaseStatus;gridweb.setColCollpaseStatus=setColCollpaseStatus;gridweb.setupGroupMatch=setupGroupMatch;gridweb.setupGroupMatchRow=setupGroupMatchRow;gridweb.setupGroupMatchCol=setupGroupMatchCol;gridweb.findNextMaxRow=findNextMaxRow;gridweb.findNextMinRow=
findNextMinRow;gridweb.initContent=initContent;gridweb.initContent();gridweb.oncontextmenu=mOnContextMenu;gridweb.onmouseover=mOnMouseOver;gridweb.onmouseout=mOnMouseOut;gridweb.onmousemove=mOnMouseMove;gridweb.onmouseup=mOnMouseUp;gridweb.onmousedown=mOnMouseDown;gridweb.onclick=mOnClick;gridweb.ondblclick=mOnDblClick;gridweb.mOnKeyDown=mOnKeyDown;gridweb.mOnKeyPress=mOnKeyPress;gridweb.mOnKeyUp=mOnKeyUp;gridweb.rowSpanMap=new Map;gridweb.adjustTableCellSpanHeight=adjustTableCellSpanHeight;gridweb.switchFormulaDisplay=
switchFormulaDisplay;gridweb.getCellsArray=getCellsArray;gridweb.refreshdataview=refreshdataview;gridweb.showloadingbox=showloadingbox;gridweb.hideloadingbox=hideloadingbox;gridweb.tryfindcachePrepare=tryfindcachePrepare;gridweb.callgridajaxcallback2=callgridajaxcallback2;gridweb.parseRespWebHTML=parseRespWebHTML;gridweb.clearAsyncCache=clearAsyncCache;gridwebinstance.put(gridweb.id,gridweb);if(firstgrid==null)firstgrid=gridweb;if(needInitAlignmentAdjust){firstgrid.showloadingbox();setTimeout("adjustTableCellSpanHeightForAll()",
1)}setTimeout("adjustEditorWidthForAll()",2E3)}
function initGridWebByClientPageHeight(){var mypageheight=Math.max(Math.max(document.body.offsetHeight,document.documentElement.offsetHeight),Math.max(document.body.clientHeight,document.documentElement.clientHeight));mypageheight=mypageheight-13;var collpase=getattr(this,"grp_collapse_col");if(collpase!=null)if(ie)mypageheight-=31;else mypageheight-=30;clientpageheight=mypageheight;var percentagevalue=getPercentageLength(this.style.height);if(percentagevalue!=null)mypageheight=mypageheight*percentagevalue;
this.leftPanel.style.height=mypageheight-47+"px";this.viewPanel.style.height=mypageheight-47+"px"}function getClientPageHeight(){if(this.isUseClientPageHeight)return clientpageheight;else return this.offsetHeight}
function resize(){var ie_percent_height=null;if(ie){var percentagevalue=getPercentageLength(this.style.height);if(percentagevalue!=null)ie_percent_height=this.style.height}if(this.async)asynctableheight_map.remove(this.acttab);this.initGridWebByClientPageHeight();this.adjustXhtmlRows();if(this.freeze)this.adjustSizes();if(ie){this.viewPanel.parentNode.parentNode.style.height=this.viewPanel.style.height;this.leftPanel.parentNode.parentNode.style.height=this.leftPanel.style.height;if(this.viewPanel10!=
null)this.viewPanel10.parentNode.parentNode.style.height=this.viewPanel10.style.height;if(ie_percent_height!=null)this.style.height=ie_percent_height}this.mOnScroll();this.adjustImageButton();doIE7AsyncScrllBar(this)}function setActiveTab(tabindex){this.postBack("TAB:"+tabindex,false);this.clearAsyncCache();gridwebinstance.remove(this.id)}function clearAsyncCache(){if(this.async&&enableasynccache){col_row_cache_index=[];last_row_v_info=null;last_asyncrows=0;last_direction=-1}}
function initContent(){this.cidregex=new RegExp("^\\d+#\\d+$");this.contentInit=true;if(!this.xhtmlmode)this.sBody=document.body;else this.sBody=document.documentElement;if(getattr(this,"onacwsubmit")!=null)try{this.onacwsubmit=eval(getattr(this,"onacwsubmit"))}catch(ex){}if(getattr(this,"onacwerror")!=null)try{this.onacwerror=eval(getattr(this,"onacwerror"))}catch(ex){}if(getattr(this,"onacwselectcell")!=null)try{this.onacwselectcell=eval(getattr(this,"onacwselectcell"))}catch(ex){}if(getattr(this,
"onacwselectcellajaxcallback")!=null)try{this.onacwselectcellajaxcallback=eval(getattr(this,"onacwselectcellajaxcallback"))}catch(ex){}if(getattr(this,"onacwunselectcell")!=null)try{this.onacwunselectcell=eval(getattr(this,"onacwunselectcell"))}catch(ex){}if(getattr(this,"onacwdoubleclickcell")!=null)try{this.onacwdoubleclickcell=eval(getattr(this,"onacwdoubleclickcell"))}catch(ex){}if(getattr(this,"onacwdoubleclickrow")!=null)try{this.onacwdoubleclickrow=eval(getattr(this,"onacwdoubleclickrow"))}catch(ex){}if(getattr(this,
"onacwcellerror")!=null)try{this.onacwcellerror=eval(getattr(this,"onacwcellerror"))}catch(ex){}if(getattr(this,"onacwcellupdate")!=null)try{this.onacwcellupdate=eval(getattr(this,"onacwcellupdate"))}catch(ex){}if(getattr(this,"onajaxcallfinished")!=null)try{this.onajaxcallfinished=eval(getattr(this,"onajaxcallfinished"))}catch(ex){}if(getattr(this,"onacwinit")!=null)try{this.onacwinit=eval(getattr(this,"onacwinit"))}catch(ex){}if(getattr(this,"onacwpagechange")!=null)try{this.onacwpagechange=eval(getattr(this,
"onacwpagechange"))}catch(ex){}this.xmlData=document.getElementById(this.id+"_XMLDATA");this.vmark=document.getElementById(this.id+"_VMARK");this.frameTab=document.getElementById(this.id+"_FRAMETAB");this.topPanel=document.getElementById(this.id+"_topPanel");this.leftTopPanel=document.getElementById(this.id+"_leftTopPanel");this.leftPanel=document.getElementById(this.id+"_leftPanel");this.viewPanel=document.getElementById(this.id+"_viewPanel");this.viewTable=document.getElementById(this.id+"_viewTable");
this.viewRow=document.getElementById(this.id+"_viewRow");this.bottomTable=document.getElementById(this.id+"_bottomTable");this.tabPanel=document.getElementById(this.id+"_tabPanel");this.eventBtn=document.getElementById(this.id+"_EVENTBTN");this.xTable=document.getElementById(this.id+"_xTable");this.ltable1=document.getElementById(this.id+"_leftTab");this.topTable=document.getElementById(this.id+"_topTab");this.vsBar=document.getElementById(this.id+"_vsBar");this.hsBar=document.getElementById(this.id+
"_hsBar");this.pastediv=document.getElementById(this.id+"_divforpaste");this.editorcellname=document.getElementById(this.id+"_celleditorname");this.focusonoutereditor=false;this.editorbox=document.getElementById(this.id+"_celleditorcontent");if(this.editorbox!=null){this.editorbox.mygridweb=this;this.adjustEditorWidth=adjustEditorWidth;this.editorbox.onclick=function(){this.mygridweb.fastedit=false;this.mygridweb.focusonoutereditor=true};this.editorbox.onfocus=function(){this.mygridweb.fastedit=false;
this.mygridweb.focusonoutereditor=true};this.editorbox.onblur=function(){this.mygridweb.focusonoutereditor=false;if(current_cell.hasupdated)this.mygridweb.endEditfromEditorBox(current_cell)};this.editorbox.onkeyup=function(){if(current_cell!=null){if(!current_cell.setLastText){current_cell.setLastText=true;current_cell.lastText=getInnerText(current_cell)}current_cell.hasupdated=true;copywithstyle(current_cell,this.value);var indexofcontent=this.value.indexOf(CELL_CONTENT_FORMAT_DELIMITER);if(indexofcontent>
0)this.value=this.value.substring(0,indexofcontent);this.mygridweb.editCell2(current_cell,this.value);if(this.value.length>0&&current_cell.firstChild!=null)adjustSpanCell(current_cell.parentNode,current_cell)}}}if(this.freeze){this.viewPanel01=document.getElementById(this.id+"_viewPanel01");this.viewPanel10=document.getElementById(this.id+"_viewPanel10");this.viewTable00=document.getElementById(this.id+"_viewTable00");this.viewTable01=document.getElementById(this.id+"_viewTable01");this.viewTable10=
document.getElementById(this.id+"_viewTable10");this.ltable0=document.getElementById(this.id+"_leftTable0");this.topTable0=document.getElementById(this.id+"_topTable0");this.fRow=document.getElementById(this.id+"_FROW");this.fCol=document.getElementById(this.id+"_FCOL");this.fRowH=document.getElementById(this.id+"_FROWH");this.fColH=document.getElementById(this.id+"_FCOLH")}this.xmlDoc=getXMLDocument(document.getElementById(this.id+"_XML1"));var root=this.xmlDoc.selectSingleNode("data");root.appendChild(this.xmlDoc.createElement("SELECT"));
root.appendChild(this.xmlDoc.createElement("CELLS"));root.appendChild(this.xmlDoc.createElement("SIZES"));root.appendChild(this.xmlDoc.createElement("POSITION"));root.appendChild(this.xmlDoc.createElement("ASYNC"));this.xmlDoc1=getXMLDocument(document.getElementById(this.id+"_XML2"));this.lmDoc=getXMLDocument(document.getElementById(this.id+"_XML3"));var gridweb=this;this.ContextMenu=document.getElementById(this.id+"_CMENU");if(this.ContextMenu!=null){new acwmenu(this.ContextMenu);this.initContextMenu=
initContextMenu;this.initContextMenu()}this.ListMenu=document.getElementById(this.id+"_LMENU");if(this.ListMenu!=null){new acwmenu(this.ListMenu);this.ListMenu.onItemClick=function(menuValue,menuId,menuContext){gridweb.mOnListMenuClick(menuValue,menuId,menuContext)};this.ListMenu.gridContext=gridweb}var templistmenusnode=this.lmDoc.selectSingleNode("listmenus");if(templistmenusnode!=null){var menunodes=templistmenusnode.getChildNodes();for(var i=0;i<menunodes.length;i++){var id=menunodes[i].getAttribute("id");
var range=menunodes[i].getAttribute("range");if(range!=null)this.menuRangeMap.put(id,range)}}if(getattr(this,"paging")=="1"){this.pageSelect=document.getElementById(this.id+"_PAGE");if(this.pageSelect!=null)this.pageSelect.onchange=function(){gridweb.mOnPageChange()}}if(this.isUseClientPageHeight)this.initGridWebByClientPageHeight();this.viewPanel.onscroll=function(){if(!gridweb.donotneedscroll)gridweb.mOnScroll()};if(this.style.position==null||this.style.position.toUpperCase()!="ABSOLUTE")this.style.position=
"relative";this.validations=new Array;this.dataFilters=new Array;if(getattr(this,"embeded")!="1"){var eh=parseLength(this.style.height,"y");if(this.xhtmlmode){if(ie&&iemv<8)this.adjustXhtmlTopRow();if(!this.noscroll)this.adjustXhtmlRows()}if(this.noscroll)this.adjustNoScroll();else if(this.freeze)this.adjustFreeze();if(this.xTable!=null){this.initXTable();if(this.noscroll)this.adjustNoScroll();else if(this.freeze)this.adjustFreeze()}if((chrome||safari)&&this.async){var vsCol=document.getElementById(this.id+
"_vsCol");if(vsCol!=null){vsCol.style.display="";vsCol.style.width="1px"}}if(this.async)if(last_asyncrows>0)this.asyncrows=last_asyncrows;this.setupGroupMatch();this.adjustBVScroll();if(getattr(this,"acwpopupcw")=="1")try{if(this.ListMenu!=null){this.ListMenu.addItem("This application is using");this.ListMenu.addItem("an EVALUATION COPY of");this.ListMenu.addItem("Aspose.Cells.GridWeb control!");this.ListMenu.showXY(0,0,this);this.ListMenu.showXY(this.viewPanel.clientWidth-this.ListMenu.offsetWidth,
this.viewPanel.clientHeight-this.ListMenu.offsetHeight,this);this.viewPanel.appendChild(this.ListMenu)}}catch(ex){}this.createLoadingBox();if(typeof this.onacwinit=="function")this.onacwinit(this);if(this.Calendar==null){this.Calendar=document.createElement("SPAN");this.Calendar.id=this.id+"_CALENDAR";this.Calendar.style.position="absolute";this.Calendar.style.width="280px";this.Calendar.style.height="150px";this.Calendar.style.zIndex=99999999;this.Calendar.style.display="none";new acwcalendar(this.Calendar);
if(document.createEventObject)this.Calendar.onpropertychange=function(){gridweb.mOnCalendarChange()};else this.Calendar.addEventListener("onpropertychange",function(e){gridweb.mOnCalendarChange(e)},false)}}this.tryInitSetActiveCell();doIE7AsyncScrllBar(this);setTimeout(function(){gridweb.searchv()},0);if(typeof jQuery=="undefined");else{var shapelist=$("#"+this.id+" img[id^='asposeshape_']");var length=shapelist.length;var d=(new Date).getTime();for(var i=0;i<length;i++)this.addImagePreLoadingGif(shapelist,
d,i,true);var piclist=$("#"+this.id+" img[id^='asposepic_']");var length=piclist.length;var d=(new Date).getTime();for(var i=0;i<length;i++)this.addImagePreLoadingGif(piclist,d,i,true);var scrollist=$("#"+this.id+" .acwc_ScrollBar");for(var i=0;i<scrollist.length;i++)gridweb.setUpContrlScrollBar(scrollist[i]);scrollist=$("#"+this.id+" .acwc_RadioButton");for(var i=0;i<scrollist.length;i++)gridweb.setUpContrlRadioButton(scrollist[i])}}
function addImagePreLoadingGif(chartarray,date,i,isfirsttimeloading){if(chartarray[i]==null)return;var chartnewsrc="";if(chartarray[i].src.indexOf("data:image/gif")!=0)if(!java_client)chartnewsrc=chartarray[i].src.split("?")[0]+"?"+date;else{var temparr=chartarray[i].src.split("?");var tempparams=temparr[1].split("&");if(tempparams.length==3)chartnewsrc=temparr[0]+"?"+tempparams[0]+"&"+tempparams[1]+"&t="+date;else chartnewsrc=chartarray[i].src+"&t="+date}else chartnewsrc=chartarray[i].src;var imgob=
new Image;imgob.iid=i;imgob.removeLoadingGif=function(chartarray){var lastChild=chartarray[this.iid].parentNode.lastChild;if(lastChild.isgif){chartarray[this.iid].parentNode.removeChild(lastChild);chartarray[this.iid].src=this.src}this.removeLoadingGif=null};imgob.onload=function(){if(this.removeLoadingGif!=null)this.removeLoadingGif(chartarray)};imgob.src=chartnewsrc;setTimeout(function(){if(imgob.removeLoadingGif!=null)imgob.removeLoadingGif(chartarray)},removeloadinggifDelay);this.createLoadingByChart(chartarray[i],
isfirsttimeloading)}
function createLoadingByChart(chart,isfirsttimeloading){img=document.createElement("IMG");img.src=this.image_file_path+"updating.gif";img.style.position="absolute";img.style.left=chart.style.left;img.style.top=chart.style.top;img.style.width="16px";img.style.height="16px";img.style.zIndex=chart.style.zIndex;img.id="loading"+chart.id;img.onload=chart.onload;img.isgif=true;chart.parentNode.appendChild(img);if(isfirsttimeloading)chart.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="}
function doIE7AsyncScrllBar(who){if(who.viewPanel.offsetHeight==0)setTimeout(function(){doIE7AsyncScrllBar(who)},300);else who.adjustAsyncScrollBar()}
function reSetDPI(){if(ie&&iemv==7);else if(ie&&iemv==8);else{var dpi;if(!document.getElementById("dpi")){dpi=document.createElement("div");dpi.setAttribute("id","dpi");dpi.setAttribute("style","width:1in;height:1in;visible:hidden;padding:0px");this.appendChild(dpi)}else{dpi=document.getElementById("dpi");dpi.setAttribute("style","width:1in;height:1in;visible:hidden;padding:0px")}screen.deviceXDPI=dpi.offsetWidth;screen.deviceYDPI=dpi.offsetHeight;dpi.setAttribute("style","width:1in;height:1in;visible:hidden;padding:0px;display:none");
return screen}}
function initContextMenu(){this.ContextMenu.clear();this.ContextMenu.addItem(getlang().MenuItemCopy,"Copy");if(this.editmode){this.ContextMenu.addItem(getlang().MenuItemCut,"Cut");this.ContextMenu.addItem(getlang().MenuItemPaste,"Paste");this.ContextMenu.addItem(getlang().MenuItemDelComment,"delcmmt");if(getattr(this,"clientfrz")=="1"){this.ContextMenu.addSeparator();this.ContextMenu.addItem(getlang().MenuItemFreeze,"Freeze");if(this.freeze)this.ContextMenu.addItem(getlang().MenuItemUnfreeze,"Unfreeze")}if(getattr(this,
"clientro")=="1"){this.ContextMenu.addSeparator();this.ContextMenu.addItem(getlang().MenuItemAddRow,"Add Row");if(getattr(this,"bindingsrc")!="1")this.ContextMenu.addItem(getlang().MenuItemInsertRow,"Insert Row");this.ContextMenu.addItem(getlang().MenuItemDeleteRow,"Delete Row")}if(getattr(this,"clientco")=="1"){this.ContextMenu.addSeparator();this.ContextMenu.addItem(getlang().MenuItemAddColumn,"Add Column");this.ContextMenu.addItem(getlang().MenuItemInsertColumn,"Insert Column");this.ContextMenu.addItem(getlang().MenuItemDeleteColumn,
"Delete Column")}if(getattr(this,"clientmo")=="1"){this.ContextMenu.addSeparator();this.ContextMenu.addItem(getlang().MenuItemMergeCells,"Merge Cells");this.ContextMenu.addItem(getlang().MenuItemUnmergeCells,"Unmerge Cells")}if(getattr(this,"stdb")=="1"){this.ContextMenu.addSeparator();this.ContextMenu.addItem(getlang().MenuItemFormat,"Format")}}this.ContextMenu.addSeparator();this.ContextMenu.addItem(getlang().MenuItemFind,"Find");if(this.editmode)this.ContextMenu.addItem(getlang().MenuItemReplace,
"Replace");var mnode=this.lmDoc.selectSingleNode('listmenus/menu[@id="custmenu"]');if(mnode!=null){var mv=mnode.getAttribute("value");this.ContextMenu.addSeparator();this.ContextMenu.loadItems(mv);this.ContextMenu.addOKCancel()}this.ContextMenu.hideTopSeparator();var gridweb=this;this.ContextMenu.onItemClick=function(menuValue,menuId,menuContext){gridweb.mOnContextMenuClick(menuValue,menuId,menuContext)};var onacwcontextmenushow=getattr(this,"onacwcontextmenushow");if(onacwcontextmenushow!=null)try{this.ContextMenu.onShow=
eval(onacwcontextmenushow)}catch(ex){}}
function mOnContextMenu(e){if(this.ContextMenu!=null){var o=window.event?event.srcElement:e.target;if(o.tagName=="SPAN"&&(o.className.indexOf("acwxc")>-1||o.className.indexOf("rotation")>-1))o=o.parentNode;var t=this.isCell(o);if(t){if(t=="TD"){if((this.ActiveCell==null||this.ActiveCell!=o)&&!this._selections.contains(o)){this.clearSelections();this.selectCell(o)}this.ContextMenu.menuContext=o}else{this.endEdit(this.ActiveCell);this.ContextMenu.menuContext=this.ActiveCell}this.ContextMenu.show(e)}}return false}
function mOnContextMenuClick(menuValue,menuId,menuContext){switch(menuValue){case "Format":if(menuContext!=null)this.fontDialog(menuContext);break;case "Copy":if(menuContext!=null)this.copy(menuContext);break;case "Cut":if(menuContext!=null)this.cut(menuContext);break;case "Paste":if(menuContext!=null)this.paste(menuContext);break;case "Freeze":if(menuContext!=null){var vleft=this.viewPanel.scrollLeft;var vtop=this.async&&this.vsBar!=null?this.vsBar.scrollTop:this.viewPanel.scrollTop;this.postBack("FREEZE:"+
getfirstViewRow(this.viewTable,vtop)+":"+getfirstViewCol(this.topTable,vleft),false)}break;case "Unfreeze":this.postBack("UNFREEZE",false);break;case "Add Row":this.postBack("ADDROW",false);break;case "Insert Row":if(menuContext!=null)this.postBack("INSERTROW",false);break;case "Delete Row":if(menuContext!=null)this.postBack("DELETEROW",false);break;case "Add Column":if(menuContext!=null)this.postBack("ADDCOLUMN",false);break;case "Insert Column":if(menuContext!=null)this.postBack("INSERTCOLUMN",
false);break;case "Delete Column":if(menuContext!=null)this.postBack("DELETECOLUMN",false);break;case "Merge Cells":if(menuContext!=null)this.postBack("MERGE",false);break;case "Unmerge Cells":if(menuContext!=null)this.postBack("UNMERGE",false);break;case "delcmmt":if(menuContext!=null)this.delcomments();break;case "Find":showFindReplaceDlg(this,menuContext,0);break;case "Replace":showFindReplaceDlg(this,menuContext,1);break;default:if(menuValue.indexOf("CCMD:")==0)this.postBack(menuValue,false);
break}}function mOnListMenuClick(menuValue,menuId,menuContext){var context=menuContext;if(context!=null&&context.id!=null)if(context.id.indexOf(this.id+"_FTR")==0);else{this.editCell(context,menuValue);context.removeAttribute("needvalidateforlistitems")}}function mOnPageChange(){this.postBack("PAGE:"+this.pageSelect.selectedIndex,false);if(typeof this.onacwpagechange=="function")this.onacwpagechange(this.pageSelect.selectedIndex);gridwebinstance.remove(this.id)}
function selectPageIndex(index){this.showloadingbox();this.pageSelect.selectedIndex=index;this.postBack("PAGE:"+index,false);gridwebinstance.remove(this.id)}
function mOnMouseMove(e){if(this.focusonoutereditor)return;if(!this.contentInit)return;if(getattr(this,"clientresize")=="1")this.setResizeCursor(e);if(this.ResizingHD!=null){this.resizeHeaderbar(e);if(window.event){event.returnValue=false;return}else return false}var o=window.event?event.srcElement:e.target;if(this.isCell(o)!="SPAN")if(window.event){event.returnValue=false;return}else return false}
function mOnMouseDown(e){if(this.focusonoutereditor)return;if(!this.contentInit)return;var o;var button;var shiftKey,ctrlKey;var returnValue=true;if(ie){o=event.srcElement;button=event.button;if(iemv>=11)if(button==0)button=1;else button=0;shiftKey=event.shiftKey;ctrlKey=event.ctrlKey}else{o=e.target;if(e.button==0)button=1;else button=0;shiftKey=e.shiftKey;ctrlKey=e.ctrlKey;returnValue=false}if(o.tagName=="DIV")o=o.parentNode;if(o.tagName=="SPAN"&&(o.getAttribute("bb")!=null||!o.hasAttributes()))o=
o.parentNode;if(o.tagName=="SPAN"&&(o.className.indexOf("acwxc")>-1||o.className.indexOf("rotation")>-1))o=o.parentNode;if(o.id==this.id+"_LMENU_ROW"||o.id==this.id+"_LMENU_ITEM")return;if(this.ContextMenu!=null&&this.ContextMenu.isShown)this.ContextMenu.hide();if(this.ListMenu!=null&&this.ListMenu.isShown)this.ListMenu.hide();if(this.Calendar!=null&&this.Calendar.style.display!="none")this.Calendar.style.display="none";var ct=this.isCell(o);if(ct!="SPAN")if(this.ActiveCell!=null&&this.getSpan(this.ActiveCell)!=
null)this.endEdit(this.ActiveCell);if(button==1){if(selectrowheader&&!shiftclick)lastselrownumber=actualrownumber;if(selectcolheader&&!shiftclick)lastselcolnumber=actualcolnumber;selectrowheader=false;selectcolheader=false;if(ct!=null){if(!ctrlKey&&!shiftKey)this.clearSelections();this.Dragging=true;if(ct=="TD")if(ctrlKey||!shiftKey||this.ActiveCell==null||o==this.ActiveCell){this.DragCell=o;if(this.ActiveCell!=null&&o!=this.ActiveCell)this.endSelect()}else{this.DragCell=this.ActiveCell;this.DragEndCell=
o;this.doRangeSelect()}else if(ct=="SPAN")if(o.tagName=="SPAN"){this.DragCell=o.parentNode;if(o.insideedit)this.Dragging=false}else this.Dragging=false}else{if(this.ResizeIcon){this.enterResize(e);if(returnValue){event.returnValue=false;return}else return false}var ht=this.isHeader(o);if(ht=="ROW"){actualrownumber=o.parentNode.rowIndex+1;if(this.ltable0!=null&&o.parentNode.parentNode.parentNode==this.ltable1)actualrownumber+=this.ltable0.rows.length;selectrowheader=true;selectcolheader=false;if(!ctrlKey&&
!shiftKey)this.clearSelections();this.Dragging=true;this.DraggingMode=1;if(ctrlKey||!shiftKey||this.ActiveCell==null){var fstCell=this.findUpMostCell(actualrownumber-1,0);var lstCell=null;if(this.viewTable00==null)lstCell=this.findcurrentCell(actualrownumber-1,this.topTable.rows[0].cells.length-1);else lstCell=this.findcurrentCell(actualrownumber-1,this.topTable0.rows[0].cells.length+this.topTable.rows[0].cells.length-1);if(fstCell!=null&&lstCell!=null){if(this.ActiveCell!=null&&fstCell!=this.ActiveCell)this.endSelect();
this.DragCell=fstCell;this.DragEndCell=lstCell;this.doRangeSelect()}else this.Dragging=false}else if(this.viewTable00==null){this.DragCell=this.getFirstCell(this.ActiveCell.parentNode.cells);var vtable=this.getViewTableByRowHeader(o);var cells=vtable.rows[o.parentNode.rowIndex].cells;var lstCell=this.getLastCell(cells);if(lstCell!=null){this.DragEndCell=lstCell;this.doRangeSelect(true)}}else{var vtable=this.getViewTableByCell(this.ActiveCell);var lefttable=this.viewTable00;if(vtable==this.viewTable||
vtable==this.viewTable10)lefttable=this.viewTable10;if(lefttable.rows.length<1||lefttable.rows[0].cells.length==0)lefttable=vtable;vtable=this.getViewTableByRowHeader(o);this.DragCell=this.getFirstCell(lefttable.rows[this.ActiveCell.parentNode.rowIndex].cells);var cells=vtable.rows[o.parentNode.rowIndex].cells;this.DragEndCell=this.getLastCell(cells);this.doRangeSelect(true)}}else if(ht=="COL"){selectrowheader=false;selectcolheader=true;actualcolnumber=o.cellIndex+1;if(this.topTable0!=null&&o.parentNode.parentNode.parentNode==
this.topTable)actualcolnumber+=this.topTable0.rows[0].cells.length;if(!ctrlKey&&!shiftKey)this.clearSelections();this.Dragging=true;this.DraggingMode=2;if(ctrlKey||!shiftKey||this.ActiveCell==null){var fstCell=this.findLeftMostCell(0,actualcolnumber-1);var lstCell=null;if(this.viewTable00==null)lstCell=this.findcurrentCell(this.ltable1.rows.length-1,actualcolnumber-1);else lstCell=this.findcurrentCell(this.ltable0.rows.length+this.ltable1.rows.length-1,actualcolnumber-1);if(fstCell!=null&&lstCell!=
null){if(this.ActiveCell!=null&&fstCell!=this.ActiveCell)this.endSelect();this.DragCell=fstCell;this.DragEndCell=lstCell;this.doRangeSelect()}else this.Dragging=false}else if(this.viewTable00==null){var vtable=this.viewTable;this.DragCell=vtable.rows[1].cells[this.ActiveCell.cellIndex];this.DragEndCell=vtable.rows[vtable.rows.length-1].cells[o.cellIndex];if(this.DragCell!=null&&this.DragEndCell!=null)this.doRangeSelect(true);else this.Dragging=false}else{var toptable=this.getViewTableByCell(this.ActiveCell);
if(toptable==this.viewTable10)toptable=this.viewTable00;else if(toptable==this.viewTable)toptable=this.viewTable01;if(toptable==this.viewTable00){if(toptable.rows.length<2)toptable=this.viewTable10}else if(toptable.rows.length<2)toptable=this.viewTable;var fstCell=toptable.rows[1].cells[this.ActiveCell.cellIndex];var vtable=null;toptable=this.getViewTableByColHeader(o);if(toptable==this.viewTable00){if(toptable.rows.length<2)toptable=this.viewTable10;vtable=this.viewTable10}else{if(toptable.rows.length<
2)toptable=this.viewTable;vtable=this.viewTable}var lstCell=vtable.rows[vtable.rows.length-1].cells[o.cellIndex];if(fstCell!=null&&lstCell!=null){this.DragCell=fstCell;this.DragEndCell=lstCell;this.doRangeSelect(true)}}}else{selectrowheader=false;selectcolheader=false;if(ht=="FSTCELL"){this.clearSelections();this.Dragging=true;this.DraggingMode=3;if(this.viewTable00==null){var vtable=this.viewTable;if(vtable.rows.length>1){var cells=vtable.rows[0].cells;var fstCell=this.getFirstCell(cells);if(fstCell!=
null){cells=vtable.rows[vtable.rows.length-1].cells;var lstCell=this.getLastCell(cells);if(this.ActiveCell!=null&&fstCell!=this.ActiveCell)this.endSelect();this.DragCell=fstCell;this.DragEndCell=lstCell;this.doRangeSelect()}}}else{var vtable=null;if(this.viewTable00.rows.length>1&&this.viewTable00.rows[0].cells.length>0)vtable=this.viewTable00;else if(this.viewTable01.rows.length>1&&this.viewTable01.rows[0].cells.length>0)vtable=this.viewTable01;else if(this.viewTable10.rows.length>1&&this.viewTable10.rows[0].cells.length>
0)vtable=this.viewTable10;else vtable=this.viewTable;this.DragCell=vtable.rows[0].cells[0];var cells=this.viewTable.rows[this.viewTable.rows.length-1].cells;this.DragEndCell=cells[cells.length-1];this.doRangeSelect()}}}}}}function mOnMouseUp(){if(this.focusonoutereditor)return;if(!this.contentInit)return;this.endDrag()}
function mOnClick(e){if(this.focusonoutereditor)return;if(!this.contentInit)return;var evt=new Event(e);var o=evt.getTarget();var offset=evt.getOffset();if(o.tagName=="SPAN"&&(o.getAttribute("bb")!=null||!o.hasAttributes()))o=o.parentNode;if(o.tagName=="SPAN"&&(o.className.indexOf("acwxc")>-1||o.className.indexOf("rotation")>-1))o=o.parentNode;switch(o.id){case this.id+"_LSCROLL":this.tabPanel.scrollLeft-=160;return;case this.id+"_RSCROLL":this.tabPanel.scrollLeft+=160;return}if(o.id==this.id+"_loading"){this.loadingBox.style.display=
"none";this.blockcover.style.display="none";return}else if(o.id.indexOf(this.id+"_COL_GRPB")==0){var expand=getattr(o,"expand")=="1";o.setAttribute("expand",!expand?"1":"0");var col=o.parentNode.parentNode;var colid=getColId(col);if(expand){o.src=this.image_file_path+"collapse.gif";this.expandCol(colid)}else{o.src=this.image_file_path+"expand.gif";this.collapseCol(colid)}}else if(o.id.indexOf(this.id+"_ROW_GRPB")==0){var expand=getattr(o,"expand")=="1";o.setAttribute("expand",!expand?"1":"0");var row=
o.parentNode.parentNode;if(this.xhtmlmode)row=row.parentNode;var rowid=getRowId(row);if(expand){o.src=this.image_file_path+"collapse.gif";this.expandRow(rowid)}else{o.src=this.image_file_path+"expand.gif";this.collapseRow(rowid)}if(this.async){this.hcontent=null;this.lastvisiblerows=PERROWNUMBER*2+1;if(expand){asynctableheight_map.remove(this.acttab);this.asyncrows=null}if(this.reachmax){this.direction=1;this.postAsyncH(this.amaxrow-this.lastvisiblerows,this.amaxrow,false)}else{this.direction=0;this.postAsyncH(this.aminrow,
this.aminrow+this.lastvisiblerows,false)}return}if(this.noscroll)this.adjustNoScroll();else if(this.freeze){this.adjustXhtmlRows();this.adjustFreeze()}this.adjustAsyncScrollBar();this.mOnScroll();this.adjustImageButton();return}else if(o.id.indexOf(this.id+"_PGP")==0){var expand=getattr(o,"expand")=="1";o.setAttribute("expand",!expand?"1":"0");if(expand)o.src=this.image_file_path+"collapse.gif";else o.src=this.image_file_path+"expand.gif";var row=o.parentNode.parentNode;if(this.xhtmlmode)row=row.parentNode;
var rowrange=getattr(o,"range").split(":");for(var i=Number(rowrange[0]);i<=Number(rowrange[1]);i++){var xrow=this.ltable1.rows[i];var xrow2=this.viewTable.rows[i];if(!expand){setRowDisplay(xrow,"none");setRowDisplay(xrow2,"none")}else{setRowDisplay(xrow,"block");setRowDisplay(xrow2,"block")}}if(this.noscroll)this.adjustNoScroll();else if(this.freeze){this.adjustXhtmlRows();this.adjustFreeze()}this.adjustAsyncScrollBar();this.mOnScroll();this.adjustImageButton();return}else if(o.id.indexOf(this.id+
"_FTR")==0){if(document.readyState!="complete")return;if(this.ListMenu!=null){var col=o.getAttribute("ownercolumn");this.ListMenu.menuContext=o;this.ListMenu.ismultiple=true;this.ListMenu.clear();this.ListMenu.addItem(getlang().MenuItemFilterAll,"-1");this.ListMenu.addSeparator();var lmnode=this.lmDoc.selectSingleNode("listmenus");var mnode=lmnode.selectSingleNode('menu[@id="'+getattr(o.filterCell,"listmenu")+'"]');var mv=mnode.getAttribute("value");this.ListMenu.loadItems(mv);this.ListMenu.addOKCancel();
this.ListMenu.doAcwMenuCheckByValue(getattr(o.filterCell,"checked"));this.ListMenu.showNS(e);var left=this.ListMenu.offsetLeft-this.ListMenu.offsetWidth-offset.offsetX-1+15;if(left<0)left=0;var top=this.ListMenu.offsetTop+o.filterCell.offsetHeight-offset.offsetY-1;if(top<0)top=0;this.ListMenu.showXY(left,top,this)}return}else if(o.id.indexOf(this.id+"_PFT")==0){if(document.readyState!="complete")return;if(this.ListMenu!=null){this.ListMenu.menuContext=o;this.ListMenu.ismultiple=true;this.ListMenu.clear();
this.ListMenu.addItem(getlang().MenuItemFilterAll,"-1");this.ListMenu.addSeparator();var lmnode=this.lmDoc.selectSingleNode("listmenus");var mnode=lmnode.selectSingleNode('menu[@id="'+getattr(o.filterCell,"listmenu")+'"]');var mv=mnode.getAttribute("value");this.ListMenu.loadItems(mv);this.ListMenu.addOKCancel();this.ListMenu.doAcwMenuCheckByValue(getattr(o.filterCell,"checked"));this.ListMenu.showNS(e);var left=this.ListMenu.offsetLeft-this.ListMenu.offsetWidth-offset.offsetX-1+15;if(left<0)left=
0;var top=this.ListMenu.offsetTop+o.filterCell.offsetHeight-offset.offsetY-1;if(top<0)top=0;this.ListMenu.showXY(left,top,this)}return}var t=this.isCell(o);if(t=="TD")if(this.DragCell!=null&&this.ActiveCell!=null){try{this.focus()}catch(ex){}try{this.ActiveCell.focus()}catch(ex){}return}else{this.selectCell(o);this.recalculateCellColNumberOnCurrentCell(o);this.recalculateCellRowNumberOnCurrentCell(o);return}else if(t=="SPAN"){this.fastEdit=false;return}if(this.editmode){if(o.id==this.id+"_DB"){if(document.readyState!=
"complete")return;if(this.ListMenu!=null){this.ListMenu.showNS(e);var left=this.ListMenu.offsetLeft-this.ListMenu.offsetWidth-offset.offsetX-1;if(left<0)left=0;var top=this.ListMenu.offsetTop+this.ActiveCell.offsetHeight-offset.offsetY-1;if(top<0)top=0;this.ListMenu.showXY(left,top,this);try{this.focus()}catch(ex){}try{this.ActiveCell.focus()}catch(ex){}}return}if(o.id==this.id+"_DT"&&this.Calendar!=null){if(!this.calendarAppended){document.body.appendChild(this.Calendar);this.calendarAppended=true}this.Calendar.style.display=
"block";this.Calendar.style.left=this.sBody.scrollLeft+evt.e.clientX+"px";this.Calendar.style.top=this.sBody.scrollTop+evt.e.clientY+"px";var left=this.Calendar.offsetLeft-evt.getTarget().offsetWidth-offset.offsetX-1;if(left<0)left=0;var top=this.Calendar.offsetTop+evt.getTarget().offsetHeight-offset.offsetY-1;if(top<0)top=0;this.Calendar.style.left=left+"px";this.Calendar.style.top=top+"px";return}if(o.id==this.id+"_SUBMIT"){if(!inajaxupdating)this.postBack("SUBMIT",false);else afterajaxaction="SUBMIT";
return}if(o.id==this.id+"_ADD"){if(!inajaxupdating)this.postBack("ADD",false);else afterajaxaction="ADD";return}if(o.id==this.id+"_DEL"){if(!inajaxupdating)this.postBack("DEL",false);else afterajaxaction="DEL";return}if(o.id==this.id+"_SAVE"){if(!inajaxupdating)this.postBack("SAVE",false);else afterajaxaction="SAVE";return}if(o.id==this.id+"_UNDO"){this.postBack("UNDO",true);return}if(!this.xhtmlmode){if(o.tagName=="INPUT"&&o.type!=null&&o.type.toUpperCase()=="CHECKBOX"&&this.isCell(o.parentNode)){this.update(o.parentNode);
if(o.parentNode!=this.ActiveCell)this.selectCell(o.parentNode)}}else if(o.tagName=="INPUT"&&o.type!=null&&o.type.toUpperCase()=="CHECKBOX"&&this.isCell(o.parentNode.parentNode)){this.update(o.parentNode.parentNode);if(o.parentNode.parentNode!=this.ActiveCell)this.selectCell(o.parentNode.parentNode)}}if(o.id.indexOf(this.id+"_TAB")==0){var tabidx=o.id.substring(this.id.length+4,o.id.length);this.setActiveTab(tabidx);return}if(o.id==this.id+"_CC"){var lcontrol=o;var cell=lcontrol.parentNode;if(this.xhtmlmode)cell=
cell.parentNode;var cmd=getattr(lcontrol,"cmdvalue");var result=false;if(cmd.indexOf("javascript:")==0)try{result=eval(cmd)}catch(ex){}if(!result){var edata="CELLCMD:"+cmd+":"+cell.id.substring(this.id.length+1,cell.id.length);this.postBack(edata,lcontrol.discardinput=="1")}return}if(o.id.startWith(this.id+"_CCMD")){var lcontrol=o;var cmd=getattr(lcontrol,"cmdvalue");var edata="CCMD:"+cmd;this.postBack(edata,lcontrol.discardinput=="1");return}if(o.id==this.id+"_XB"){var prow=o.parentNode.parentNode;
if(this.xhtmlmode)prow=prow.parentNode;this.postBack("EXP:"+prow.id.substring(this.id.length+3,prow.id.length))}}
function mOnMouseOver(e){if(this.focusonoutereditor)return;if(!this.contentInit)return;var o=window.event?event.srcElement:e.target;if(o.tagName=="SPAN"&&(o.className.indexOf("acwxc")>-1||o.className.indexOf("rotation")>-1))o=o.parentNode;if(!this.Dragging&&(o.title==null||o.title==""))if(o.tagName=="IMG")if(o.id==this.id+"_LSCROLL")o.title=getlang().TipScrollLeftButton;else if(o.id==this.id+"_RSCROLL")o.title=getlang().TipScrollRightButton;else if(o.id==this.id+"_SUBMIT")o.title=getlang().TipSubmitButton;
else if(o.id==this.id+"_SAVE")o.title=getlang().TipSaveButton;else if(o.id==this.id+"_UNDO")o.title=getlang().TipUndoButton;else if(o.id==this.id+"_XB")o.title=getlang().TipExpandChildButton;else if(getattr(o,"name")==this.id+"_ROW_GRPB")o.title=getlang().TipExpandGroupRowButton;else{if(getattr(o,"name")==this.id+"_COL_GRPB")o.title=getlang().TipExpandGroupColButton}else if(o.id!=null&&o.id.indexOf(this.id+"_TAB")==0)o.title=getlang().TipTab;else if(getattr(o,"cmdvalue")!=null&&getattr(o,"cmdvalue").indexOf("_BCSORT#")==
0)o.title=getlang().TipSortHeader;else{var t=this.isCell(o);if(t!=null)this.setCellTitle(o,t)}if(this.DragCell!=null&&this.Dragging){var t=this.isCell(o);if(t!=null)switch(this.DraggingMode){case 0:if(t=="TD")this.DragEndCell=o;else if(t=="SPAN")if(o.tagName=="SPAN")this.DragEndCell=o.parentNode;else this.DragEndCell=o.parentNode.parentNode;if(this.DragEndCell!=this.DragCell)this.doRangeSelect();else this.DragEndCell=null;return;case 3:return;case 1:o=document.getElementById(this.id+"_@"+this.getCellRow(o));
break;case 2:o=document.getElementById(this.id+"_!"+this.getCellColumn(o));break}t=this.isHeader(o);if(t=="ROW")if(this.viewTable00==null){var vtable=this.viewTable;var cells=vtable.rows[o.parentNode.rowIndex].cells;var lstCell=null;if(this.DraggingMode==1)lstCell=this.getLastCell(cells);else lstCell=this.getFirstCell(cells);if(lstCell!=null&&lstCell!=this.DragCell){this.DragEndCell=lstCell;this.doRangeSelect()}}else{var vtable=this.getViewTableByRowHeader(o);var lefttable=this.viewTable00;if(vtable==
this.viewTable)lefttable=this.viewTable10;if(lefttable.rows.length<1||lefttable.rows[0].cells.length==0)lefttable=vtable;if(this.DraggingMode==1)this.DragEndCell=this.getLastCell(vtable.rows[o.parentNode.rowIndex].cells);else this.DragEndCell=this.getFirstCell(lefttable.rows[o.parentNode.rowIndex].cells);this.doRangeSelect()}else if(t=="COL")if(this.viewTable00==null){var vtable=this.viewTable;var lstCell=null;if(this.DraggingMode==2)lstCell=vtable.rows[vtable.rows.length-1].cells[o.cellIndex];else lstCell=
vtable.rows[1].cells[o.cellIndex];if(lstCell!=null&&lstCell!=this.DragCell){this.DragEndCell=lstCell;this.doRangeSelect()}}else{var vtable=null;var toptable=this.getViewTableByColHeader(o);if(toptable==this.viewTable00){if(toptable.rows.length<2)toptable=this.viewTable10;vtable=this.viewTable10}else{if(toptable.rows.length<2)toptable=this.viewTable;vtable=this.viewTable}if(this.DraggingMode==2)this.DragEndCell=vtable.rows[vtable.rows.length-1].cells[o.cellIndex];else this.DragEndCell=toptable.rows[1].cells[o.cellIndex];
this.doRangeSelect()}}}
function mOnMouseOut(e){if(this.focusonoutereditor)return;if(!this.contentInit)return;var evt=new Event(e);var toEle=evt.getToElement();if(firefox)toEle=e.target;if(this.Dragging)if(toEle==null)this.endDrag();else{if(toEle!=this&&!this.contains(toEle)){var gridweb=this;var clientX=evt.e.clientX;var clientY=evt.e.clientY;this.autoDraggingId=window.setInterval(function(){gridweb.autoDragging(clientX,clientY)},50);this.mouseOut(e)}}else if(this.ResizingHD!=null)if(toEle==null||toEle!=this&&!this.contains(toEle))this.endDrag()}
function mouseOut(e){var evt=new Event(e);var theEle=evt.getTarget();var toEle=evt.getToElement();if(theEle!=this&&!this.contains(theEle)){if(theEle.getAttributeNode("outEleOnMouseUpBk")){theEle.onmouseup=theEle.outEleOnMouseUpBk;theEle.removeAttribute("outEleOnMouseUpBk")}if(theEle.getAttributeNode("outEleOnMouseOutBk")){if(theEle.outEleOnMouseOutBk!=null)if(typeof theEle.outEleOnMouseOutBk=="function")theEle.outEleOnMouseOutBk();else if(typeof theEle.outEleOnMouseOutBk=="string")eval(theEle.outEleOnMouseOutBk);
theEle.onmouseout=theEle.outEleOnMouseOutBk;theEle.removeAttribute("outEleOnMouseOutBk")}}if(toEle!=null&&toEle!=this&&!this.contains(toEle)){var gridweb=this;if(!toEle.getAttributeNode("outEleOnMouseUpBk")){toEle.outEleOnMouseUpBk=toEle.onmouseup;toEle.onmouseup=function(e){gridweb.mouseUp(e)}}if(!toEle.getAttributeNode("outEleOnMouseOutBk")){toEle.outEleOnMouseOutBk=toEle.onmouseout;toEle.onmouseout=function(e){gridweb.mouseOut(e)}}}else{if(this.autoDraggingId!=null){clearInterval(this.autoDraggingId);
this.autoDraggingId=null}if(toEle==null)this.endDrag()}}
function mouseUp(e){if(this.autoDraggingId!=null){clearInterval(this.autoDraggingId);this.autoDraggingId=null}var evt=new Event(e);var theEle=evt.getTarget();if(theEle.getAttributeNode("outEleOnMouseUpBk")){if(theEle.outEleOnMouseUpBk!=null)if(typeof theEle.outEleOnMouseUpBk=="function")theEle.outEleOnMouseUpBk();else if(typeof theEle.outEleOnMouseUpBk=="string")eval(theEle.outEleOnMouseUpBk);theEle.onmouseup=theEle.outEleOnMouseUpBk;theEle.removeAttribute("outEleOnMouseUpBk")}if(theEle.getAttributeNode("outEleOnMouseOutBk")){theEle.onmouseout=theEle.outEleOnMouseOutBk;
theEle.removeAttribute("outEleOnMouseOutBk")}this.endDrag()}
function autoDragging(clientX,clientY){var x,y;var xy=getObjectClientXY(this);x=xy.left;y=xy.top;var o=this.viewPanel;if(clientX<=x){o.scrollLeft-=50;if(clientX<=x-50)o.scrollLeft-=50}if(clientX>=x+this.offsetWidth){o.scrollLeft+=50;if(clientX>=x+this.offsetWidth+50)o.scrollLeft+=50}if(clientY<=y){o.scrollTop-=50;if(clientY<=y-50)o.scrollTop-=50}if(clientY>=y+this.getClientPageHeight()){o.scrollTop+=50;if(clientY>=y+this.getClientPageHeight()+50)o.scrollTop+=50}}
function getObjectClientXY(o){var x=0,y=0;while(o.offsetParent!=null){x+=o.offsetLeft-o.offsetParent.scrollLeft;y+=o.offsetTop-o.offsetParent.scrollTop;o=o.offsetParent}return{left:x,top:y}}function resizeColumnToFit(colIndex,includeHeader){var col=Number(colIndex);var resizeIcon=this.ResizeIcon;this.ResizeIcon=true;var rhd1=document.getElementById(this.id+"_!"+col.toString());if(rhd1!=null)this.mOnDblClick(null,rhd1,includeHeader);this.ResizeIcon=resizeIcon}
function mOnDblClick(e,rhd,includeHeader){if(!this.contentInit)return;if(getattr(this,"clientresize")=="1"&&this.ResizeIcon){if(rhd==null){rhd=window.event?event.srcElement:e.target;includeHeader=true}if(rhd.tagName=="SPAN"&&(rhd.className.indexOf("acwxc")>-1||rhd.className.indexOf("rotation")>-1))rhd=rhd.parentNode;if(this.isHeader(rhd)=="COL"){var table0;var table1;if(rhd.parentNode.parentNode.parentNode.parentNode==this.topPanel){table0=this.viewTable01;table1=this.viewTable}else{table0=this.viewTable00;
table1=this.viewTable10}var colNum=rhd.id.substring(rhd.id.indexOf("!")+1,rhd.id.length);var vtable=table1;if(vtable!=null){var maxWidth=0;var tk=0;var vspan=document.createElement("nobr");vspan.style.position="absolute";vspan.style.left=-1E3+"px";vspan.style.top=-1E3+"px";this.appendChild(vspan);if(includeHeader){vspan.className=rhd.className;setInnerText(vspan,rhd.innerText);maxWidth=vspan.offsetWidth}while(vtable!=null&&tk<=1){var ri,ci;for(ri=0;ri<vtable.rows.length;ri++){var vrow=vtable.rows[ri];
for(ci=0;ci<vrow.cells.length;ci++){var vcell=vrow.cells[ci];if(vcell.colSpan==1&&this.isCell(vcell)){var vcellcol=vcell.id.substring(this.id.length+1,vcell.id.indexOf("#"));if(vcellcol==colNum){vspan.className=vcell.className;vspan.style.fontFamily=vcell.style.fontFamily;vspan.style.fontSize=vcell.style.fontSize;vspan.style.fontWeight=vcell.style.fontWeight;setInnerText(vspan,vcell.innerText);if(vspan.offsetWidth>maxWidth)maxWidth=vspan.offsetWidth;break}}}}vtable=table0;tk++}this.removeChild(vspan);
maxWidth++;if(ie&&iemv<8){var colH=document.getElementById(rhd.id+"C");if(colH!=null)colH.style.width=colH.style.pixelWidth+maxWidth-colH.offsetWidth+"px";var colD=document.getElementById(rhd.id+"CD");if(colD!=null)colD.style.width=colD.style.pixelWidth+maxWidth-colD.offsetWidth+"px";colD=document.getElementById(rhd.id+"CD00");if(colD!=null)colD.style.width=colD.style.pixelWidth+maxWidth-colD.offsetWidth+"px";colD=document.getElementById(rhd.id+"CD01");if(colD!=null)colD.style.width=colD.style.pixelWidth+
maxWidth-colD.offsetWidth+"px";colD=document.getElementById(rhd.id+"CD10");if(colD!=null)colD.style.width=colD.style.pixelWidth+maxWidth-colD.offsetWidth+"px"}else{var colH=document.getElementById(rhd.id+"C");if(colH!=null)colH.style.width=maxWidth+"px";var colD=document.getElementById(rhd.id+"CD");if(colD!=null)colD.style.width=maxWidth+"px";colD=document.getElementById(rhd.id+"CD00");if(colD!=null)colD.style.width=maxWidth+"px";colD=document.getElementById(rhd.id+"CD01");if(colD!=null)colD.style.width=
maxWidth+"px";colD=document.getElementById(rhd.id+"CD10");if(colD!=null)colD.style.width=maxWidth+"px"}if(this.freeze)this.adjustSizes();this.mOnScroll();this.ResizingHD=rhd;this.resizeType="COL";this.endResize()}this.adjustImageButton()}if(window.event){event.returnValue=false;return}else return false}else{var o=window.event?event.srcElement:e.target;if(o.tagName=="SPAN"&&(o.className.indexOf("acwxc")>-1||o.className.indexOf("rotation")>-1))o=o.parentNode;var ct=this.isCell(o);if(ct=="TD")this.mOnDoubleClickCell(o);
else if(ct=="SPAN"&&o.tagName=="SPAN")this.mOnDoubleClickCell(o.parentNode);else if(this.isHeader(o)=="ROW")this.mOnDoubleClickRow(o.id.substring(this.id.length+2,o.id.length));if(getattr(this,"dblclick")=="1"){var ht=this.isHeader(o);if(ht=="ROW")this.postBack("DBLCLICK:R"+o.id.substring(this.id.length+2,o.id.length),false);else if(ht=="COL")this.postBack("DBLCLICK:C"+o.id.substring(this.id.length+2,o.id.length),false);else if(ct=="TD")this.postBack("DBLCLICK:D"+o.id.substring(this.id.length+1,o.id.length),
false);else if(ct=="SPAN"&&o.tagName=="SPAN")this.postBack("DBLCLICK:D"+o.parentNode.id.substring(this.id.length+1,o.parentNode.id.length),false)}}}
function findNextTabCell(o){var newrow=o.parentNode;var newcell=this.getNextValidCell(o);var isc;while(newrow!=null){while(newcell!=null){isc=this.isCell(newcell);if(isc){this.activateNextOrPreviCellFlg=true;this.selectCell(newcell);this.activateNextOrPreviCellFlg=false;break}newcell=newcell.nextSibling}if(isc)break;newrow=this.getUndersideValidRow(o);if(newrow!=null&&newrow.cells.length>0)newcell=newrow.cells[0];else newcell=null}return{newrow:newrow,newcell:newcell}}
function findNextTabCellReverse(o){var newrow=o.parentNode;var newcell=this.getPreviousValidCell(o);var isc;while(newrow!=null){while(newcell!=null){isc=this.isCell(newcell);if(isc){this.shiftAndTabKeyPressedFlg=true;this.selectCell(newcell);this.shiftAndTabKeyPressedFlg=false;break}newcell=newcell.previousSibling}if(isc)break;newrow=this.getUpsideValidRow(o);if(newrow!=null&&newrow.cells.length>0)newcell=newrow.cells[newrow.cells.length-1];else newcell=null}return{newrow:newrow,newcell:newcell}}
function InsertCharInSpan(dcell,decimalpoint){var caretPos=getCaretCharOffsetInDiv(dcell);var text=getInnerText(dcell);setInnerText(dcell,text.substring(0,caretPos)+decimalpoint+text.substring(caretPos));setSelectionRange(dcell,caretPos+1,caretPos+1)}
function mOnKeyDown(e,cell){if(!this.validateContent())return false;if(!this.contentInit)return;if(this.ContextMenu!=null&&this.ContextMenu.isShown)this.ContextMenu.hide();if(this.ListMenu!=null&&this.ListMenu.isShown)this.ListMenu.hide();var evt=new Event(e);var ctrlKey=window.event?event.ctrlKey:e.ctrlKey;var shiftKey=window.event?event.shiftKey:e.shiftKey;var keyCode=window.event?event.keyCode:e.keyCode;var altKey=window.event?event.altKey:e.altKey;var o;if(cell==null){o=evt.getTarget();if(o.tagName==
"SPAN"&&(o.className.indexOf("acwxc")>-1||o.className.indexOf("rotation")>-1))o=o.parentNode;else if(o==this&&this.ActiveCell!=null)o=this.ActiveCell}else o=cell;var returnValue=true;if(ctrlKey){var clikeCell;if(o==this.ActiveCell)clikeCell=o;else if(o.id==this.id+"_AC")clikeCell=o.parentNode;else if(o.id==this.id+"_AS")clikeCell=o.parentNode.parentNode;if(keyCode==70){if(clikeCell!=null&&this.getSpan(clikeCell)!=null)this.endEdit(clikeCell);showFindReplaceDlg(this,clikeCell,0);if(window.event){event.keyCode=
0;event.returnValue=false;return}else return false}else if(keyCode==192)this.switchFormulaDisplay();else if(keyCode==72||keyCode==82)if(this.editmode){if(clikeCell!=null&&this.getSpan(clikeCell)!=null)this.endEdit(clikeCell);showFindReplaceDlg(this,clikeCell,1);if(window.event){event.keyCode=0;event.returnValue=false;return}else return false}else if(window.event){event.cancelBubble=true;event.returnValue=false;return}else{e.stopPropagation();return false}else if(keyCode==67){if(this.fastEdit){if(this.getSpan(o)!=
null)this.endEdit(o);this.copy(o);if(!ie)return;else returnValue=false}}else if(keyCode==86){if(this.fastEdit){if(this.getSpan(o)!=null)this.EscCancelEdit(o);this.paste(o);if(!ie)return;else returnValue=false}}else if(keyCode==88)if(this.fastEdit){if(this.getSpan(o)!=null)this.endEdit(o);this.cut(o);if(!ie)return;else returnValue=false}}if(o==this.ActiveCell&&this.fastEdit){var newcell,newrow,dec;dec=this.DragEndCell;if(dec==null)dec=o;switch(keyCode){case 27:this.clearSelections();if(this.getSpan(o)!=
null){this.EscCancelEdit(o);var oo=this.ActiveCell;try{this.focus()}catch(ex){}try{oo.focus()}catch(ex){}}returnValue=false;break;case 37:this.clearSelections();if(!shiftKey)this.pressKeyGoLeftOnCell(o);else{newcell=this.getPreviousValidCell(dec);if(this.isCell(newcell))dec=newcell;this.doSelectShiftCellRange(o,dec)}returnValue=false;break;case 39:this.clearSelections();if(!shiftKey)this.pressKeyGoRightOnCell(o);else{newcell=this.getNextValidCell(dec);if(this.isCell(newcell))dec=newcell;this.doSelectShiftCellRange(o,
dec)}returnValue=false;break;case 38:this.clearSelections();if(!shiftKey)this.pressKeyGoUpOnCell(o);else{newrow=this.getUpsideValidRow(dec);if(newrow!=null){newcell=newrow.cells[dec.cellIndex];if(this.isCell(newcell))dec=newcell}this.doSelectShiftCellRange(o,dec)}returnValue=false;break;case 40:this.clearSelections();if(!shiftKey)this.pressKeyGoDownOnCell(o);else{newrow=this.getUndersideValidRow(dec);if(newrow!=null){newcell=newrow.cells[dec.cellIndex];if(this.isCell(newcell))dec=newcell}this.doSelectShiftCellRange(o,
dec)}returnValue=false;break;case 9:this.clearSelections();if(!shiftKey){var __ret=findNextTabCell.call(this,o);newrow=__ret.newrow;newcell=__ret.newcell}else{var __ret=findNextTabCellReverse.call(this,o);newrow=__ret.newrow;newcell=__ret.newcell}returnValue=false;break;case 13:this.clearSelections();if(!shiftKey)this.pressKeyGoDownOnCell(o);else this.pressKeyGoUpOnCell(o);returnValue=false;break;case 8:case 46:var span=this.getSpan(o);if(span!=null&&span.insideedit)return;else{if(span!=null)this.EscCancelEdit(o);
this.deleteCells();returnValue=false}break}if(keyCode==110){var span=this.getSpan(o);if(span!=null){var decimalpoint=getattr(this,"decimalpoint");if(decimalpoint!=null){InsertCharInSpan(span,decimalpoint);returnValue=false;e.preventDefault()}}}}else if(o.id==this.id+"_AC"||!this.fastEdit){var newcell,newrow;switch(keyCode){case 38:this.GetUpListItem(e);break;case 40:this.GetDownListItem(e);break;case 13:if(this.dropDownListFlg){var dcell=this.getSpan(this.ActiveCell);if(dcell!=null)setInnerText(dcell,
this.selectedOptionVal);this.ListMenu.hide();newrow=this.getUndersideValidRow(this.ActiveCell);if(newrow!=null){newcell=newrow.cells[this.ActiveCell.cellIndex];if(newcell!=null&&this.isCell(newcell)){if(this.editmode&&getattr(o,"protected")!="1"&&(getattr(newcell,"vtype")=="list"||getattr(newcell,"vtype")=="flist")&&this.ListMenu!=null)this.ListMenu.clear();this.setCellActive(newcell)}}this.dropDownListFlg=false}else if(ie)ieTextEditEnterWay();else return;returnValue=false;break;case 27:this.EscCancelEdit(o);
var oo=this.ActiveCell;try{this.focus()}catch(ex){}try{oo.focus()}catch(ex){}returnValue=false;break;case 9:this.clearSelections();if(!shiftKey){var __ret=findNextTabCell.call(this,o);newrow=__ret.newrow;newcell=__ret.newcell}else{var __ret=findNextTabCellReverse.call(this,o);newrow=__ret.newrow;newcell=__ret.newcell}returnValue=false;break}if(keyCode==110){var dcell=this.getSpan(this.ActiveCell);if(dcell!=null){var decimalpoint=getattr(this,"decimalpoint");if(decimalpoint!=null){InsertCharInSpan(dcell,
decimalpoint);returnValue=false;e.preventDefault()}}}if(!returnValue)if(window.event){event.returnValue=false;return}else{this.preventKeyPress=true;return false}return}if(this.ActiveCell!=null&&getattr(this.ActiveCell,"vtype")!=null&&getattr(this.ActiveCell,"vtype").toUpperCase()=="CHECKBOX"){var needMoveFocus=o.type!=null&&o.type.toUpperCase()=="CHECKBOX";switch(keyCode){case 32:this.ActiveCell.lastChild.checked=!this.ActiveCell.lastChild.checked;returnValue=false;break;case 38:if(needMoveFocus){var newrow=
this.getUpsideValidRow(this.ActiveCell);if(newrow!=null){var newcell=newrow.cells[this.ActiveCell.cellIndex];if(this.isCell(newcell)){this.activateNextOrPreviCellFlg=true;this.selectCell(newcell);this.activateNextOrPreviCellFlg=false}}}break;case 13:case 40:if(needMoveFocus){var newrow=this.getUndersideValidRow(this.ActiveCell);if(newrow!=null){var newcell=newrow.cells[this.ActiveCell.cellIndex];if(newcell!=null&&this.isCell(newcell)){this.activateNextOrPreviCellFlg=true;this.selectCell(newcell);
this.activateNextOrPreviCellFlg=false}}}break;case 37:if(needMoveFocus){var newcell=this.getPreviousValidCell(this.ActiveCell);if(this.isCell(newcell)){this.activateNextOrPreviCellFlg=true;this.selectCell(newcell);this.activateNextOrPreviCellFlg=false}}break;case 39:if(needMoveFocus){var newcell=this.getNextValidCell(this.ActiveCell);if(this.isCell(newcell)){this.activateNextOrPreviCellFlg=true;this.selectCell(newcell);this.activateNextOrPreviCellFlg=false}}break;case 9:if(needMoveFocus)if(shiftKey){var newrow=
this.ActiveCell.parentNode;var newcell=this.ActiveCell.previousSibling;var isc;while(newrow!=null){while(newcell!=null){isc=this.isCell(newcell);if(isc){this.selectCell(newcell);break}newcell=newcell.previousSibling}if(isc)break;newrow=newrow.previousSibling;if(newrow!=null&&newrow.cells.length>0)newcell=newrow.cells[newrow.cells.length-1];else newcell=null}}else{var newrow=this.ActiveCell.parentNode;var newcell=this.ActiveCell.nextSibling;var isc;while(newrow!=null){while(newcell!=null){isc=this.isCell(newcell);
if(isc){this.selectCell(newcell);break}newcell=newcell.nextSibling}if(isc)break;newrow=newrow.nextSibling;if(newrow!=null&&newrow.cells.length>0)newcell=newrow.cells[0];else newcell=null}}returnValue=false;break;case 27:if(this.getSpan(this.ActiveCell)!=null)this.EscCancelEdit(this.ActiveCell);this.endSelect();this.clearSelections();returnValue=false;break}}if(!returnValue)if(window.event)if(ie&&iemv>=11)event.preventDefault();else event.returnValue=false;else{this.preventKeyPress=true;return false}else{this.preventKeyPress=
false;if(keyCode==46)this.deleteCells()}}function mOnKeyPress(e){if(this.preventKeyPress){this.preventKeyPress=false;return false}var ctrlKey=window.event?event.ctrlKey:e.ctrlKey;if(ctrlKey)return false;if(!this.validateContent())return false;if(!this.contentInit)return;var o=this.ActiveCell;if(o!=null&&this.editmode&&getattr(o,"protected")!="1"&&!this.focusonoutereditor)this.enterEdit(o,true,window.event?event.keyCode:e.charCode)}
function accMul(arg1,arg2){var m=0,s1=arg1.toString(),s2=arg2.toString();try{m+=s1.split(".")[1].length}catch(e){}try{m+=s2.split(".")[1].length}catch(e){}return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)}Number.prototype.mul=function(arg){return accMul(arg,this)};
function mOnKeyUp(e){if(!this.validateContent())return false;var o=this.ActiveCell;if(o!=null&&this.editorbox!=null)$(this.editorbox).val(getInnerText(o));var keyCode=window.event?event.keyCode:e.keyCode;if(keyCode==37||keyCode==38||keyCode==39||keyCode==40||keyCode==13||keyCode==9||keyCode==16||keyCode==8||keyCode==46)return false;if(!this.contentInit)return;if(o!=null&&this.editmode&&getattr(o,"protected")!="1"&&(getattr(o,"vtype")=="list"||getattr(o,"vtype")=="flist")&&this.ListMenu!=null){this.ListMenu.clear();
var lmnode=this.lmDoc.selectSingleNode("listmenus");var mnode=lmnode.selectSingleNode('menu[@id="'+getattr(o,"listmenu")+'"]');var mv=mnode.getAttribute("value");this.ListMenu.filterItemsByValue(getInnerText(o),mv);this.showDropDownList(e);this.dropDownListFlg=true;this.selectedOptionVal=getInnerText(o)}else this.dropDownListFlg=false}
function getCaretCharOffsetInDiv(element){var caretOffset=0;if(typeof window.getSelection!="undefined"){var range=window.getSelection().getRangeAt(0);var preCaretRange=range.cloneRange();preCaretRange.selectNodeContents(element);preCaretRange.setEnd(range.endContainer,range.endOffset);caretOffset=preCaretRange.toString().length}else if(typeof document.selection!="undefined"&&document.selection.type!="Control"){var textRange=document.selection.createRange();var preCaretTextRange=document.body.createTextRange();
preCaretTextRange.moveToElementText(element);preCaretTextRange.setEndPoint("EndToEnd",textRange);caretOffset=preCaretTextRange.text.length}return caretOffset}
function placeCaretAtEnd(el){el.focus();if(typeof window.getSelection!="undefined"&&typeof document.createRange!="undefined"){var range=document.createRange();range.selectNodeContents(el);range.collapse(false);var sel=window.getSelection();sel.removeAllRanges();sel.addRange(range)}else if(typeof document.body.createTextRange!="undefined"){var textRange=document.body.createTextRange();textRange.moveToElementText(el);textRange.collapse(false);textRange.moveEnd("character",1);textRange.select()}}
function getTextNodesIn(node){var textNodes=[];if(node.nodeType==3)textNodes.push(node);else{var children=node.childNodes;for(var i=0,len=children.length;i<len;++i)textNodes.push.apply(textNodes,getTextNodesIn(children[i]))}return textNodes}
function setSelectionRange(el,start,end){if(document.createRange&&window.getSelection){var range=document.createRange();range.selectNodeContents(el);var textNodes=getTextNodesIn(el);var foundStart=false;var charCount=0,endCharCount;for(var i=0,textNode;textNode=textNodes[i++];){endCharCount=charCount+textNode.length;if(!foundStart&&start>=charCount&&(start<endCharCount||start==endCharCount&&i<textNodes.length)){range.setStart(textNode,start-charCount);foundStart=true}if(foundStart&&end<=endCharCount){range.setEnd(textNode,
end-charCount);break}if(!foundStart&&start==endCharCount){range.setStart(textNode,start);range.setEnd(textNode,end);break}charCount=endCharCount}var sel=window.getSelection();sel.removeAllRanges();sel.addRange(range)}else if(document.selection&&document.body.createTextRange){var textRange=document.body.createTextRange();textRange.moveToElementText(el);textRange.collapse(true);textRange.moveEnd("character",end);textRange.moveStart("character",start);textRange.select()}}
function mOnResize(){if(getattr(this,"embeded")!="1"){var eh=parseLength(this.style.height,"y");if(this.xhtmlmode){this.adjustXhtmlTopRow();if(!this.noscroll)this.adjustXhtmlRows()}if(this.noscroll)this.adjustNoScroll();else if(this.freeze)this.adjustFreeze();this.adjustAsyncScrollBar();this.mOnScroll()}}
function mOnScroll(){if(this.topPanel!=null)this.topPanel.scrollLeft=this.viewPanel.scrollLeft;if(this.leftPanel!=null)this.leftPanel.scrollTop=this.viewPanel.scrollTop;if(this.viewPanel01!=null)this.viewPanel01.scrollLeft=this.viewPanel.scrollLeft;if(this.viewPanel10!=null)this.viewPanel10.scrollTop=this.viewPanel.scrollTop}function mOnScroll1(){if(this.topPanel!=null)this.topPanel.scrollLeft=this.viewPanel01.scrollLeft;this.viewPanel.scrollLeft=this.viewPanel01.scrollLeft}
function mOnScroll2(){if(this.leftPanel!=null)this.leftPanel.scrollTop=this.viewPanel10.scrollTop;this.viewPanel.scrollTop=this.viewPanel10.scrollTop}
function mOnVScroll(){if(this.vsBar!=null){if(!this.async){this.viewPanel.scrollTop=this.vsBar.scrollTop;return}var hpanel=this.viewPanel.offsetHeight;var htable=0;if(this.async)htable=asynctableheight_map.get(this.acttab);else htable=this.viewTable.offsetHeight;var asyncTop=(this.aminrow-this.minrow)*HCELL;if(this.asynctoprows!=null)asyncTop=this.asynctoprows*HCELL;var vpMaxScrollTop=htable>hpanel?htable-hpanel:hpanel;var asyncBottom=asyncTop+vpMaxScrollTop+1;var scrollTop=this.vsBar.scrollTop;var ifreachmax=
false;if(scrollTop<asyncTop){var aminrow=Number(this.aminrow);var amaxrow=Number(this.amaxrow);if(this.ltable0!=null)if(aminrow<=this.freezerow-1)aminrow=this.freezerow;this.direction=0;var reqRows=Math.ceil((asyncTop-scrollTop)/HCELL);if(reqRows>=PERROWNUMBER*2){aminrow=Math.max(aminrow-reqRows,0);amaxrow=aminrow+PERROWNUMBER*2-1;if(ifreachmax||amaxrow>this.maxrow){amaxrow=this.maxrow;aminrow=amaxrow+1-PERROWNUMBER*2}}else if(reqRows<=PERROWNUMBER){aminrow=Math.max(aminrow-PERROWNUMBER,0);amaxrow=
aminrow+PERROWNUMBER*2-1;if(ifreachmax||amaxrow>this.maxrow){amaxrow=this.maxrow;aminrow=amaxrow+1-PERROWNUMBER*2}}else{aminrow=Math.max(aminrow-PERROWNUMBER*2,0);amaxrow=aminrow+PERROWNUMBER*2-1;if(ifreachmax||amaxrow>this.maxrow){amaxrow=this.maxrow;aminrow=amaxrow+1-PERROWNUMBER*2}}if(ie){if(this.vsTimeout!=null){clearTimeout(this.vsTimeout);this.vsTimeout=null}var gridweb=this;this.vsTimeout=setTimeout(function(){gridweb.postAsyncH(aminrow,amaxrow,false)},10)}else this.postAsyncH(aminrow,amaxrow,
false)}else if(scrollTop>asyncBottom){var aminrow=Number(this.aminrow);if(this.ltable0!=null)if(aminrow<=this.freezerow-1)aminrow=this.freezerow;this.direction=1;var amaxrow=Number(this.amaxrow);var reqRows=Math.ceil((scrollTop-asyncBottom)/HCELL);if(reqRows>=PERROWNUMBER*2){amaxrow+=reqRows;aminrow=amaxrow-(PERROWNUMBER*2-1);if(ifreachmax||amaxrow>this.maxrow){amaxrow=this.maxrow;aminrow=amaxrow+1-PERROWNUMBER*2}}else if(reqRows<=PERROWNUMBER){amaxrow+=PERROWNUMBER;aminrow=Math.max(amaxrow-(PERROWNUMBER*
2-1),0);if(ifreachmax||amaxrow>this.maxrow){amaxrow=this.maxrow;aminrow=amaxrow+1-PERROWNUMBER*2}}else{amaxrow+=PERROWNUMBER*2;aminrow=Math.max(amaxrow-(PERROWNUMBER*2-1),0);if(ifreachmax||amaxrow>this.maxrow){amaxrow=this.maxrow;aminrow=amaxrow+1-PERROWNUMBER*2}}if(ie){if(this.vsTimeout!=null){clearTimeout(this.vsTimeout);this.vsTimeout=null}var gridweb=this;this.vsTimeout=setTimeout(function(){gridweb.postAsyncH(aminrow,amaxrow,false)},10)}else this.postAsyncH(aminrow,amaxrow,false)}else{if(this.vsTimeout!=
null){clearTimeout(this.vsTimeout);this.vsTimeout=null}this.viewPanel.scrollTop=this.vsBar.scrollTop-asyncTop;if(this.reachmax){if(this.viewpanlscrolltop==null)this.viewpanlscrolltop=0;if(this.viewPanel.scrollTop>this.viewpanlscrolltop)this.viewpanlscrolltop=this.viewPanel.scrollTop;else this.viewPanel.scrollTop=this.viewpanlscrolltop}}}}
function mOnHScroll(){if(this.hsBar!=null&&this.viewPanel.scrollLeft!=this.hsBar.scrollLeft)if(!this.async){this.viewPanel.scrollLeft=this.hsBar.scrollLeft;return}else{var wpanel=this.viewPanel.offsetWidth;var wtable=this.viewTable.offsetWidth;var asyncLeft=(this.amincol-this.mincol)*WCELL;var vpMaxScrollLeft=wtable>wpanel?wtable-wpanel:wpanel;var asyncBottom=asyncLeft+vpMaxScrollLeft+1;var scrollLeft=this.hsBar.scrollLeft;if(scrollLeft<asyncLeft){var amincol=Number(this.amincol);var amaxcol=Number(this.amaxcol);
var reqcols=Math.ceil((asyncLeft-scrollLeft)/WCELL);if(reqcols>=PERCOLUMNNUMBER*2){amincol=Math.max(amincol-reqcols,0);amaxcol=amincol+PERCOLUMNNUMBER-1}else if(reqcols<=PERCOLUMNNUMBER){amincol=Math.max(amincol-PERCOLUMNNUMBER,0);amaxcol=amincol+PERCOLUMNNUMBER*2-1}else{amincol=Math.max(amincol-PERCOLUMNNUMBER*2,0);amaxcol=amincol+PERCOLUMNNUMBER*2-1}if(ie){if(this.vsTimeout!=null){clearTimeout(this.vsTimeout);this.vsTimeout=null}var gridweb=this;this.vsTimeout=setTimeout(function(){gridweb.postAsyncW(amincol,
amaxcol,false)},10)}else this.postAsyncW(amincol,amaxcol,false)}else if(scrollLeft>asyncBottom){var amincol=Number(this.amincol);var amaxcol=Number(this.amaxcol);var reqcols=Math.ceil((scrollLeft-asyncBottom)/WCELL);if(reqcols>=PERCOLUMNNUMBER*2){amaxcol+=reqcols;if(amaxcol>this.maxcol)amaxcol=this.maxcol;amincol=amaxcol-(PERCOLUMNNUMBER-1)}else if(reqcols<=PERCOLUMNNUMBER){amaxcol+=PERCOLUMNNUMBER;if(amaxcol>this.maxcol)amaxcol=this.maxcol;amincol=Math.max(amaxcol-(PERCOLUMNNUMBER*2-1),0)}else{amaxcol+=
PERCOLUMNNUMBER*2;if(amaxcol>this.maxcol)amaxcol=this.maxcol;amincol=Math.max(amaxcol-(PERCOLUMNNUMBER*2-1),0)}if(ie){if(this.vsTimeout!=null){clearTimeout(this.vsTimeout);this.vsTimeout=null}var gridweb=this;this.vsTimeout=setTimeout(function(){gridweb.postAsyncW(amincol,amaxcol,false)},10)}else this.postAsyncW(amincol,amaxcol,false)}else{if(this.vsTimeout!=null){clearTimeout(this.vsTimeout);this.vsTimeout=null}this.viewPanel.scrollLeft=this.hsBar.scrollLeft-asyncLeft}}}
function mOnSubmit(arg,cancel){if(typeof this.onacwsubmit=="function")return this.onacwsubmit(arg,cancel);else return true}function mOnError(){if(typeof this.onacwerror=="function")this.onacwerror()}
function mOnSelectCell(cell){this.fastEdit=true;if(typeof this.onacwselectcell=="function")this.onacwselectcell(cell);var ajxpath=this.ajaxcallpath;if(this.editorbox!=null){this.editorcellname.innerHTML=this.getCellName(cell)+" <br>";var myformula=cell.getAttribute("formula");if(myformula!=null)$(this.editorbox).val(myformula);else{var value=this.getCellValueByCell(cell);$(this.editorbox).val(value)}}if(typeof this.onacwselectcellajaxcallback=="function"&&ajxpath!=null){var row=this.getCellRow(cell);
var col=this.getCellColumn(cell);var value=this.getCellValueByCell(cell);this.eventBtn.acwEventData="cellselect#"+row+"#"+col;this.eventBtn.acwEventValue=value;var gridweb=this;this.ajaxtimeout=setTimeout(function(){gridweb.ajaxcall_onselectcell_start(ajxpath)},0)}}function mOnSelectCellAjaxCallBack(cell,customerdata){if(typeof this.onacwselectcellajaxcallback=="function")this.onacwselectcellajaxcallback(cell,customerdata)}
function mOnUnselectCell(cell){if(typeof this.onacwunselectcell=="function")this.onacwunselectcell(cell)}function mOnDoubleClickCell(cell){if(typeof this.onacwdoubleclickcell=="function")this.onacwdoubleclickcell(cell)}function mOnDoubleClickRow(row){if(typeof this.onacwdoubleclickrow=="function")this.onacwdoubleclickrow(row)}function mOnCellError(cell){if(typeof this.onacwcellerror=="function")this.onacwcellerror(cell)}
function mOnCellUpdated(cell,isOriginal){if(isOriginal==null)isOriginal=true;this.updateMenuReferenceOnCellUpdated(cell);if(typeof this.onacwcellupdate=="function")this.onacwcellupdate(cell,isOriginal)}
function updateMenuReferenceOnCellUpdated(cell){var row=this.getCellRow(cell);var col=this.getCellColumn(cell);var len=this.menuRangeMap.size();var lmnode=this.lmDoc.selectSingleNode("listmenus");for(var i=0;i<len;i++){var k=this.menuRangeMap.keys[i];var rangeSplit=this.menuRangeMap.get(k).split(",");var rangeStartRow=Number(rangeSplit[0]);var rangeStartCol=Number(rangeSplit[1]);var rangeEndRow=rangeStartRow+Number(rangeSplit[2])-1;var rangeEndCol=rangeStartCol+Number(rangeSplit[3])-1;if(row>=rangeStartRow&&
row<=rangeEndRow&&col>=rangeStartCol&&col<=rangeEndCol){var mnode=lmnode.selectSingleNode('menu[@id="'+k+'"]');if(mnode!=null){var postion=rangeStartRow==rangeEndRow?col-rangeStartCol:row-rangeStartRow;var mv=mnode.getAttribute("value");var updatestr=this.ListMenu.getMenuItemUpdateValue(mv,postion,cell.innerText.trim(),getattr(cell,"ufv"));mnode.setAttribute("value",updatestr)}}}}
function mOnCalendarChange(e){if(this.ActiveCell!=null){var evt=new Event(e);if(evt.e.propertyName=="day"){var day=this.Calendar.handler.fnGetDay().toString();if(day.length==1)day="0"+day;var month=this.Calendar.handler.fnGetMonth().toString();if(month.length==1)month="0"+month;var datestr=this.Calendar.handler.fnGetYear().toString()+"-"+month+"-"+day;this.editCell(this.ActiveCell,datestr);this.Calendar.style.display="none"}}else this.Calendar.style.display="none"}
function mOnEmbededGridSubmit(cmd,cancelEdit){return this.postBack(null,cancelEdit)}
function createLoadingBox(){var loadingbox=document.getElementById("grid_loading"+this.id);var loadingcover=document.getElementById("grid_loading_blcov"+this.id);if(loadingbox!=null)this.loadingBox=loadingbox;else{this.loadingBox=document.createElement("div");this.loadingBox.id="grid_loading"+this.id;this.loadingBox.style.backgroundColor="white";this.loadingBox.style.border="2px outset";this.loadingBox.style.width="300px";this.loadingBox.style.height="80px";this.loadingBox.style.position="absolute";
this.loadingBox.style.zIndex=99999999;this.loadingBox.style.left=this.offsetWidth/2-150+"px";this.loadingBox.style.top=this.getClientPageHeight()/2-25+"px";this.loadingBox.style.display="none";var loadingTable=document.createElement("table");loadingTable.style.width="100%";loadingTable.style.height="100%";var loadingTr=loadingTable.insertRow(0);var loadingTd=loadingTr.insertCell(0);loadingTd.id=this.id+"_loading";loadingTd.style.textAlign="center";loadingTd.style.verticalAlign="middle";loadingTd.style.backgroundColor=
"white";loadingTd.style.color="black";loadingTd.style.fontFamily="Arial";loadingTd.style.fontSize="11pt";loadingTd.innerText=getlang().DialogBoxLoading;loadingTr=loadingTable.insertRow(1);loadingTd=loadingTr.insertCell(0);loadingTd.id=this.id+"_loading";loadingTd.style.textAlign="center";loadingTd.style.verticalAlign="middle";loadingTd.style.backgroundColor="white";var img=document.createElement("IMG");img.src=this.image_file_path+"loading.gif";loadingTd.appendChild(img);this.loadingBox.appendChild(loadingTable);
this.appendChild(this.loadingBox)}if(loadingcover!=null)this.blockcover=loadingcover;else{this.blockcover=document.createElement("div");this.blockcover.id="grid_loading_blcov"+this.id;if(ie)this.blockcover.style.cssText="position:absolute; top:0; left:0; right:0; bottom:0; background-color:transparent; z-index:99999998;display:none;";else this.blockcover.setAttribute("style","position:absolute; top:0; left:0; right:0; bottom:0; background-color:transparent; z-index:99999998;display:none;");document.body.appendChild(this.blockcover)}}
function adjustXhtmlTopRow(){if(this.topPanel!=null){var toprowh=this.frameTab.rows[this.viewRow.rowIndex-1].style.height;var newh=parseLength(toprowh,"y");if(newh!=null){newh-=2;if(newh<0)newh=0;var trow=this.topTable.rows[0];trow.style.height=newh+"px";if(this.topTable0!=null){trow=this.topTable0.rows[0];trow.style.height=newh+"px"}}}}
function adjustXhtmlRows(){var vrowh=parseLength(this.style.height,"y");if(vrowh==null){vrowh=this.getClientPageHeight();var percentagevalue=getPercentageLength(this.style.height);if(percentagevalue!=null)vrowh=vrowh*percentagevalue}if(vrowh!=null){if(this.topPanel!=null){var th=parseLength(this.frameTab.rows[this.viewRow.rowIndex-1].style.height,"y");if(th!=null)vrowh-=th}if(this.bottomTable!=null){var bh=parseLength(this.bottomTable.parentNode.parentNode.style.height,"y");if(bh!=null)vrowh-=bh}if(ie&&
iemv>=8&&this.fRow!=null){if(this.viewTable01.offsetHeight>0||this.viewTable01.rows.length==0){if(this.fRow.offsetHeight!=this.viewTable01.offsetHeight)this.fRow.style.height=this.viewTable01.offsetHeight+"px";if(this.fRowH!=null&&this.fRowH.style.height!=this.fRow.style.height)this.fRowH.style.height=this.fRow.style.height}vrowh-=this.fRow.offsetHeight}if(vrowh!=null&&vrowh>=0){var collpase=getattr(this,"grp_collapse_col");if(collpase!=null)vrowh+=11;if(ie&&iemv<8)this.viewRow.style.height=vrowh+
"px";else{if(this.leftPanel!=null)this.leftPanel.style.height=vrowh+"px";this.viewPanel.style.height=vrowh+"px";if(chrome&&this.async&&this.maxcol>=10){this.viewTable.style.width=this.topTable.offsetWidth+"px";if(this.viewPanel01!=null)this.viewTable01.style.width=this.topTable.offsetWidth+"px"}if(this.viewPanel10!=null)this.viewPanel10.style.height=vrowh+"px"}}}}
function adjustXhtml2_p(){if(this.offsetHeight>0){var vrowh=this.viewRow.offsetHeight-(this.frameTab.offsetHeight-this.getClientPageHeight());this.viewRow.style.height=vrowh+"px"}}
function adjustNoScroll(){var w=this.leftPanel!=null?this.leftPanel.offsetWidth:0;if(this.viewTable!=null&&this.viewTable.rows.length>0)w+=this.viewTable.offsetWidth;else if(this.topPanel!=null&&this.topPanel.childNodes.length>0)w+=this.topPanel.firstChild.offsetWidth;var h=(this.topPanel!=null?this.topPanel.offsetHeight:0)+(this.viewTable!=null?this.viewTable.offsetHeight:0)+(this.bottomTable!=null?this.bottomTable.offsetHeight:0)+(this.xhtmlmode?2:1);this.style.width=w+"px";this.style.height=h+
"px";if(this.xhtmlmode)this.viewRow.style.height=this.viewTable.offsetHeight+"px";this.adjustXhtmlRows()}function adjustFreeze(){var gridweb=this;this.viewPanel.onresize=function(){gridweb.adjustScroll()};this.viewPanel01.onscroll=function(){gridweb.mOnScroll1()};this.viewPanel10.onscroll=function(){gridweb.mOnScroll2()};this.adjustSizes()}function adjustScroll(){}
function adjustSizes(){var tdelay1=true;var tdelay2=true;if(this.viewTable01.offsetHeight>0||this.viewTable01.rows.length==0){if(this.fRow.offsetHeight!=this.viewTable01.offsetHeight)this.fRow.style.height=this.viewTable01.offsetHeight+"px";if(this.fRowH!=null&&this.fRowH.style.height!=this.fRow.style.height)this.fRowH.style.height=this.fRow.style.height;if(this.xhtmlmode&&this.viewRow.offsetHeight>0){var fRow2=this.fRow.nextSibling;var fRowH2=null;if(this.fRowH!=null){fRowH2=this.fRowH.nextSibling;
fRowH2.style.height="0px"}var oheight=fRowH2!=null&&fRowH2.offsetHeight>fRow2.offsetHeight?fRowH2.offsetHeight:fRow2.offsetHeight;var newh=oheight;if(ie)if(this.viewRow.offsetHeight>this.viewRow.style.pixelHeight+5)newh-=this.viewRow.offsetHeight-this.viewRow.style.pixelHeight;else newh=this.viewRow.offsetHeight-this.viewTable01.offsetHeight;else{var oh=this.getClientPageHeight()-this.fRow.offsetHeight;if(this.topPanel!=null)oh-=this.frameTab.rows[this.viewRow.rowIndex-1].offsetHeight;if(this.bottomTable!=
null)oh-=this.bottomTable.parentNode.parentNode.offsetHeight;newh=oh}if(newh<=0)newh=0;fRow2.style.height=newh+"px";if(fRowH2!=null)fRowH2.style.height=newh+"px";if(!ie||ie&&iemv<8){if(this.leftPanel!=null)this.leftPanel.style.height=newh+"px";this.viewPanel.style.height=newh+"px";if(this.viewPanel10!=null)this.viewPanel10.style.height=newh+"px"}}tdelay1=false}if(this.viewTable10.offsetWidth>0||this.viewTable10.rows.length==0||this.viewTable10.rows[0].cells.length==0){this.fCol.style.width=this.viewTable10.offsetWidth+
"px";if(this.fColH!=null)this.fColH.style.width=this.fCol.style.width;tdelay2=false}var delayAdjustSize=tdelay1||tdelay2;this.adjustScroll();if(delayAdjustSize){var gridweb=this;setTimeout(function(){gridweb.adjustSizes()},10)}}
function adjustBVScroll(){var bodyleft=getattr(this,"bodyleft");if(bodyleft!=null)this.sBody.scrollLeft=bodyleft;var bodytop=getattr(this,"bodytop");if(bodytop!=null)this.sBody.scrollTop=bodytop;if(!this.async){var viewleft=getattr(this,"viewleft");if(viewleft!=null)this.viewPanel.scrollLeft=viewleft;var viewtop=getattr(this,"viewtop");if(viewtop!=null)this.viewPanel.scrollTop=viewtop}var tableft=getattr(this,"tableft");if(tableft!=null&&this.tabPanel!=null)this.tabPanel.scrollLeft=tableft;if(this.tabPanel!=
null){var acttab=document.getElementById(this.id+"_TAB"+getattr(this,"acttab"));if(acttab!=null){var tabtd=acttab.parentNode;if(this.tabPanel.scrollLeft>tabtd.offsetLeft||this.tabPanel.scrollLeft+this.tabPanel.clientWidth<tabtd.offsetLeft+tabtd.offsetWidth)this.tabPanel.scrollLeft=tabtd.offsetLeft+tabtd.offsetWidth/2-this.tabPanel.clientWidth/2}}}
function adjustAsyncScrollBar(){if(this.noscroll)return;var WSBAR=18;var tabBarAtBottom=this.bottomTable==null||getattr(this.bottomTable,"attop")!="1";var vsCol=document.getElementById(this.id+"_vsCol");var vsCell=document.getElementById(this.id+"_vsCell");var vsContent=document.getElementById(this.id+"_vsContent");var hsCell=document.getElementById(this.id+"_hsCell");var hsContent=document.getElementById(this.id+"_hsContent");var lowerRight=document.getElementById(this.id+"_lowerRight");var hsRow=
document.getElementById(this.id+"_hsRow");if(true){if(vsCell!=null){var hgrid=this.getClientPageHeight();if(hgrid==0)hgrid=this.offsetHeight;var hpanel=this.viewPanel.offsetHeight;var htable=this.viewTable.offsetHeight;if(this.freeze)htable+=this.viewTable01.offsetHeight;if(this.async){var asynctableheight=asynctableheight_map.get(this.acttab);if(asynctableheight==null)asynctableheight_map.put(this.acttab,htable);else htable=asynctableheight}var asyncRows=this.amaxrow-this.aminrow+1;var async_dif=
0;if(this.asyncrows!=null)async_dif=asyncRows-this.asyncrows;else this.asyncrows=asyncRows;if(this.ltable0!=null){var toprows=this.ltable0.rows.length;asyncRows-=toprows}var totalRows=this.maxrow-this.minrow+1;if(this.visiblerows!=null)totalRows=this.visiblerows;var hcontent=0;if(this.async)if(this.hcontent==null)if(this.maxrow==this.amaxrow){if(async_dif>0)async_dif=0;else;hcontent=(totalRows-asyncRows-async_dif)*HCELL+htable;this.hcontent=hcontent}else hcontent=(totalRows-asyncRows)*HCELL+htable;
else hcontent=this.hcontent;else hcontent=(totalRows-asyncRows)*HCELL+htable;var hbottom=this.bottomTable!=null?this.bottomTable.offsetHeight:0;if(hcontent>hpanel){vsCell.style.display="";vsCell.style.width=WSBAR+"px";this.vsBar.style.width=WSBAR+"px";this.vsBar.style.height=hgrid-hbottom-(ie&&iemv<7?2:0)+"px";vsContent.className=this.viewTable.className;this.vscontentheight=hcontent-hpanel+(hgrid-hbottom);vsContent.style.height=this.vscontentheight+"px";if(this.amaxrow==this.maxrow&&htable>hpanel);
if(vsCol!=null)vsCol.style.width=WSBAR+"px";if(lowerRight!=null){lowerRight.style.display="";if(ie)lowerRight.style.backgroundColor=this.vsBar.style.scrollbarBaseColor!=""?this.vsBar.style.scrollbarBaseColor:"#f0f0f0";else lowerRight.style.backgroundColor="#f0f0f0"}}else{vsCell.style.display="none";if(vsCol!=null)if(chrome||safari)vsCol.style.width="1px";else vsCol.style.width="0px";if(lowerRight!=null)lowerRight.style.display="none"}wpanel=this.viewPanel.offsetWidth}if(hsCell!=null){var wgrid=this.offsetWidth;
var wpanel=this.viewPanel.offsetWidth;var wtable=this.viewTable.offsetWidth;var asyncCols=this.amaxcol-this.amincol+1;if(this.asynccols!=null)asyncCols=this.asynccols;var totalCols=this.maxcol-this.mincol+1;var wcontent=(totalCols-asyncCols)*WCELL+wtable;if(wcontent>wpanel){hsCell.style.display="";hsCell.style.height=WSBAR+"px";this.hsBar.style.height=WSBAR+"px";if(!this.async)hsContent.style.width=wtable-wpanel+this.hsBar.offsetWidth+"px";else hsContent.style.width=wcontent-wpanel+this.hsBar.offsetWidth+
"px"}else hsCell.style.display="none"}}if((chrome||safari)&&vsCell!=null&&vsCol!=null)if(vsCell.style.display=="none"){vsCol.style.display="";vsCol.style.width="1px"}else vsCol.style.display="";var gridweb=this;if(this.hsBar!=null){var viewleft=getattr(this,"viewleft");if(viewleft!=null){viewleft=Number(viewleft);var asyncLeft=(this.amincol-this.mincol)*WCELL;if(this.asynctopcols!=null)asyncLeft=this.asynctopcols*WCELL;this.viewPanel.scrollLeft=viewleft-asyncLeft}this.hsBarSetPosion(viewleft)}if(this.vsBar!=
null){var viewtop=getattr(this,"viewtop");if(viewtop!=null){viewtop=Number(viewtop);var asyncTop=(this.aminrow-this.minrow)*HCELL;if(this.asynctoprows!=null)asyncTop=this.asynctoprows*HCELL;this.viewPanel.scrollTop=viewtop-asyncTop;if(viewtop>hcontent-hpanel){viewtop=hcontent-hpanel-2;this.setAttribute("viewtop",viewtop)}if(this.reachmax){if(this.viewpanlscrolltop==null)this.viewpanlscrolltop=0;if(this.viewPanel.scrollTop>this.viewpanlscrolltop)this.viewpanlscrolltop=this.viewPanel.scrollTop;else this.viewPanel.scrollTop=
this.viewpanlscrolltop}}this.vsBarSetPosion(viewtop);if(!firefox)this.viewTable.onmousewheel=function(){gridweb.vsBar.scrollTop-=event.wheelDelta};else this.viewTable.addEventListener("DOMMouseScroll",function(e){gridweb.vsBar.scrollTop-=e.detail*-120},false)}if(ie){if(this.topTable!=null)this.topTable.style.width="0px"}else{if(this.topTable!=null&&this.topTable.style.width=="100%")this.topTable.style.width="0px";if(this.viewTable.style.width=="0%")this.viewTable.style.width="0px";if(this.viewTable01!=
null)this.viewTable01.style.width="0px"}}function adjustXSize(){if(this.noscroll)this.adjustNoScroll();else if(this.freeze)this.adjustFreeze()}function adjustXSizeX(){if(this.xhtmlmode){if(ie&&iemv<8)this.adjustXhtmlTopRow();if(!this.noscroll)this.adjustXhtmlRows()}}
function initXTable(){var xcol0=document.getElementById(this.id+"_XCOL0");var xcol1=document.getElementById(this.id+"_XCOL");var viewTabWidth=this.viewTable.offsetWidth;var viewTab01Width;if(this.viewTable01!=null)viewTab01Width=this.viewTable01.offsetWidth;for(var i=this.xTable.rows.length-1;i>=0;i--){var xrow=this.xTable.rows[i];var rownum=Number(getattr(xrow,"rowidx"));var table0;var table1;var ltable;var xcol;if(getattr(xrow,"fixrow")=="1"){table0=this.viewTable00;table1=this.viewTable01;ltable=
this.ltable0;xcol=xcol0}else{table0=this.viewTable10;table1=this.viewTable;ltable=this.ltable1;xcol=xcol1}var ghcell=null;var xhcell;if(getattr(this,"grouped")!="1"||this.freeze)xhcell=table1.rows[rownum-1].cells[0];else{ghcell=table1.rows[rownum-1].cells[0];xhcell=table1.rows[rownum-1].cells[1]}var xcell=xrow.cells[0];var xgrid=xcell.firstChild;if(this.rootgrid!=null)xgrid.rootgrid=this.rootgrid;else xgrid.rootgrid=this;var gridweb=this;xgrid.onacwsubmit=function(cmd,cancelEdit){return gridweb.mOnEmbededGridSubmit(cmd,
cancelEdit)};var newrow;var newrow0;var newhrow;newrow=table1.insertRow(rownum);newrow.olv=getattr(table1.rows[rownum-1],"olv");newrow.xtype="1";newrow.setAttribute("olv",newrow.olv);newrow.setAttribute("xtype",newrow.xtype);if(ghcell!=null)ghcell.rowSpan=2;newrow.appendChild(xcell);xhcell.rowSpan=2;xgrid.adjustXSizeX();if(xgrid.xTable!=null)xgrid.initXTable();xgrid.adjustXSize();newrow.style.height=xgrid.offsetHeight+1+"px";if(xcell.clientWidth<xgrid.offsetWidth)if(ie)xcol.style.width=xcol.style.pixelWidth+
xgrid.offsetWidth-xcell.clientWidth+"px";else xcol.style.width=xcol.offsetWidth+xgrid.offsetWidth-xcell.clientWidth+"px";if(table0!=null){newrow0=table0.insertRow(rownum);newrow0.olv=getattr(table0.rows[rownum-1],"olv");newrow0.xtype="1";newrow0.setAttribute("olv",newrow.olv);newrow0.setAttribute("xtype",newrow.xtype);newrow0.style.height=xgrid.offsetHeight+1+"px";var newcell0;if(table0.rows[rownum-1].cells.length>0){newcell0=newrow0.insertCell(0);newcell0.colSpan=table0.rows[rownum-1].cells.length;
setInnerText(newcell0," ");newcell0.className=xcell.className}}if(ltable!=null){var hcell=ltable.rows[rownum-1].cells[0];newhrow=ltable.insertRow(rownum);newhrow.style.height=xgrid.offsetHeight+1+"px";var newhcell=newhrow.insertCell(0);setInnerText(newhcell," ");newhcell.className=hcell.className}}}
function validateInput(o){var valideType=getattr(o,"vtype");if(valideType=="checkbox")return true;var value=getInnerText(o);if(value=="")if(getattr(o,"isrequired")=="1"){this.setInvalid(o);return false}else{this.setValid(o);return true}if(valideType=="any")return true;var formula=getattr(o,"formula");var ufv=getattr(o,"ufv");var nv;var regexpvalue=getattr(o,"regex");if(valideType=="regex"||regexpvalue!=null){var rx=new RegExp(regexpvalue);var matches=rx.exec(value);if(matches==null||value!=matches[0])if(formula!=
null){matches=rx.exec(formula);if(matches==null||formula!=matches[0]){this.setInvalid(o);return false}}else if(ufv!=null){matches=rx.exec(ufv);if(matches==null||ufv!=matches[0]){this.setInvalid(o);return false}}else{this.setInvalid(o);return false}}switch(valideType){case "regex":this.setValid(o);return true;break;case "flist":this.setValid(o);return true;break;case "list":case "dlist":if(o.getAttribute("needvalidateforlistitems")==null)if(o.getAttribute("servervalidate")!=null)return this.validateServerFunction(o,
value);else{this.setValid(o);return true}var lmnode=this.lmDoc.selectSingleNode("listmenus");var mnode=lmnode.selectSingleNode('menu[@id="'+getattr(o,"listmenu")+'"]');var mv=mnode.getAttribute("value");mv=mv.replace(/&lt;/g,"<").replace(/&gt;/g,">");this.xmlDoc1.loadXML(mv);var items=this.xmlDoc1.selectNodes("MENU/ITEM");for(var i=0;i<items.length;i++){var itext=items[i].getAttribute("VALUE");if(itext==null)itext=items[i].getAttribute("TEXT");if(itext!=null)itext=itext.ESCAPE_BACK();if(value==itext||
formula==itext||ufv==itext)if(o.getAttribute("servervalidate")!=null)return this.validateServerFunction(o,value);else{this.setValid(o);return true}}this.setInvalid(o);return false;break;case "bool":var bv=value.toUpperCase();if(bv=="TRUE"||bv=="FALSE"){this.setValid(o);return true}else{this.setInvalid(o);return false}break;case "number":case "int":case "date":case "time":nv=this.validatorConvert(value,valideType);if(nv==null&&ufv!=null)nv=this.validatorConvert(ufv,valideType);if(nv!=null);else{this.setInvalid(o);
return false}break;case "datetime":nv=this.validatorConvert(value,"date");if(nv==null)nv=this.validatorConvert(value,"datetime");if(nv==null&&ufv!=null){nv=this.validatorConvert(ufv,"date");if(nv==null)nv=this.validatorConvert(ufv,"datetime")}if(nv!=null);else{this.setInvalid(o);return false}break;case "customfunction":var cvf;try{cvf=eval("window."+getattr(o,"cvfn"))}catch(ex){}if(typeof cvf!="function"){this.setInvalid(o);return false}var cvfResult=cvf(o,value);if(!cvfResult)if(formula!=null)cvfResult=
cvf(o,formula);else if(ufv!=null)cvfResult=cvf(o,ufv);if(cvfResult){this.setValid(o);return true}else{this.setInvalid(o);return false}break;case "customstring":var ret=this.getFormulaValidation(o,value,"validateformula",getattr(o,"vformula"));if(ret=="true"){this.setValid(o);return true}else{this.setInvalid(o);return false}break;case "customserverfunction":return this.validateServerFunction(o,value);break}var compareOPType=getattr(o,"ValidationOperator");var compareValue1=getattr(o,"ValidationValue1");
var compareValue2=getattr(o,"ValidationValue2");var ufvValue=getattr(o,"ufv");var actualValue=ufvValue==null?value:ufvValue;if(compareOPType!=null){compareOPType=compareOPType.toLowerCase();if(compareValue2==null&&compareOPType=="between")compareOPType="equal";if(compareValue1!=null)compareValue1=this.validatorConvert(compareValue1,valideType,true);if(compareValue2!=null)compareValue2=this.validatorConvert(compareValue2,valideType,true);actualValue=this.validatorConvert(actualValue,valideType);if(compareOPType==
"equal")if(valideType!="textlength"){if(actualValue!=compareValue1){this.setInvalid(o);return false}}else{if(actualValue.length!=Number(compareValue1)){this.setInvalid(o);return false}}else if(compareOPType=="notequal")if(valideType!="textlength"){if(actualValue==compareValue1){this.setInvalid(o);return false}}else{if(actualValue.length==Number(compareValue1)){this.setInvalid(o);return false}}else if(compareOPType=="between")if(valideType!="textlength"){if(actualValue<compareValue1||actualValue>compareValue2){this.setInvalid(o);
return false}}else{if(actualValue.length<Number(compareValue1)||actualValue.length>Number(compareValue2)){this.setInvalid(o);return false}}else if(compareOPType=="notbetween")if(valideType!="textlength"){if(actualValue>=compareValue1&&actualValue<=compareValue2){this.setInvalid(o);return false}}else{if(actualValue.length<=Number(compareValue1)&&actualValue.length<=Number(compareValue2)){this.setInvalid(o);return false}}else if(compareOPType=="lessthan")if(valideType!="textlength"){if(actualValue>=
compareValue1){this.setInvalid(o);return false}}else{if(actualValue.length>=Number(compareValue1)){this.setInvalid(o);return false}}else if(compareOPType=="lessorequal")if(valideType!="textlength"){if(actualValue>compareValue1){this.setInvalid(o);return false}}else{if(actualValue.length>Number(compareValue1)){this.setInvalid(o);return false}}else if(compareOPType=="greaterthan")if(valideType!="textlength"){if(actualValue<=compareValue1){this.setInvalid(o);return false}}else{if(actualValue.length<=
Number(compareValue1)){this.setInvalid(o);return false}}else if(compareOPType=="greaterorequal")if(valideType!="textlength"){if(actualValue<compareValue1){this.setInvalid(o);return false}}else if(actualValue.length<Number(compareValue1)){this.setInvalid(o);return false}}this.setValid(o);return true}
function validateServerFunction(o,value){var ret=this.getFormulaValidation(o,value,"customserverfunction","");if(ret==""){this.setValid(o);return true}else{try{this.validationcallback=eval(getattr(o,"cvfn"))}catch(ex){}if(typeof this.validationcallback!="function")alert("client function not set for sverside validation call back");else{var who=this;setTimeout(function(){who.validationcallback(o,ret)},300)}this.setInvalid(o);return false}}
function setValid(o){if(o.style.backgroundImage!="none"&&o.style.backgroundImage!="")o.style.backgroundImage=""}function setInvalid(o){if(o.style.backgroundImage!="url('"+this.image_file_path+"x.gif')")o.style.backgroundImage="url('"+this.image_file_path+"x.gif')";this.mOnCellError(o)}
function searchv(){this.searchValidations(this.viewTable,this.validations);this.searchValidations(this.viewTable00,this.validations);this.searchValidations(this.viewTable01,this.validations);this.searchValidations(this.viewTable10,this.validations)}
function searchValidations(table,vlist){if(table!=null){var c=vlist.length;var rows=table.rows;var rowslen=rows.length;var i;var x=this.xhtmlmode;var filtered=false;var pivottable=getattr(this,"pivottable")!=null;for(i=0;i<rowslen;i++){var cells=rows[i].cells;var cellslen=cells.length;var j;var rowfilter=false;var cellLeft=-1;var cellTop=-1;for(j=0;j<cellslen;j++){var cell=cells[j];cell.unselectable="on";if(x){var fc=cell.firstChild;if(fc!=null&&fc.nodeType==1){fc.unselectable="on";if(cell.rowSpan>
1&&fc.tagName=="SPAN")if(ie&&iemv<8)fc.style.setExpression("height","parentElement.clientHeight-1")}}if(pivottable){var fieldtype=getattr(cell,"fieldtype");if(fieldtype!=null){var cellWidth=cell.offsetWidth;if(cellLeft<0)cellLeft=cell.offsetLeft;if(cellTop<0)cellTop=cell.offsetTop;var img=createImageButton(cell,cellLeft,cellTop,cellWidth-15);this.dataFilters[this.dataFilters.length]=img;img.id=this.id+"_PFT"+this.getCellColumn(cell);img.src=this.image_file_path+"dropdown.gif";img.title=getlang().TipFilterButton;
img.setAttribute("fieldtype",fieldtype);img.setAttribute("fieldindex",getattr(cell,"fieldindex"));img.setAttribute("pivottableid",getattr(cell,"pivottableid"));var criteria=getattr(this,"criteria");if(criteria!=null)img.title+="\n["+criteria+"]";cellLeft+=cellWidth}else if(getattr(cell,"pgrp")!=null){var img=createImageButton(cell,cell.offsetLeft,cell.offsetTop,0);this.dataFilters[this.dataFilters.length]=img;img.id=this.id+"_PGP"+this.getCellRow(cell);img.src=this.image_file_path+"collapse.gif";
img.title=getlang().TipExpandGroupButton;img.setAttribute("range",getattr(cell,"range"))}}else if(!filtered){var vtype=getattr(cell,"vtype");if(vtype!=null)if(vtype!="filter"){vlist[c]=cell;c++}else{var cellWidth=cell.offsetWidth;if(cellLeft<0)cellLeft=cell.offsetLeft;if(cellTop<0)cellTop=cell.offsetTop;var img=createImageButton(cell,cellLeft,cellTop,cellWidth-15);this.dataFilters[this.dataFilters.length]=img;img.id=this.id+"_FTR"+this.getCellColumn(cell);img.src=this.image_file_path+"dropdown.gif";
img.title=getlang().TipFilterButton;img.setAttribute("ownercolumn",this.getCellColumn(cell));var criteria=getattr(this,"criteria");if(criteria!=null)img.title+="\n["+criteria+"]";cellLeft+=cellWidth;rowfilter=true}}}if(rowfilter)filtered=rowfilter}}}
function createImageButton(cell,cellLeft,cellTop,leftoffset){var img=document.createElement("IMG");cell.offsetParent.offsetParent.appendChild(img);img.style.position="absolute";img.style.top=cellTop+"px";img.style.left=cellLeft+leftoffset+"px";img.leftoffset=leftoffset;if(leftoffset<0)img.style.display="none";img.style.zIndex=9;img.filterCell=cell;return img}
function adjustImageButton(){if(this.dataFilters.length>0)for(var i=0;i<this.dataFilters.length;i++){var img=this.dataFilters[i];var cell=img.filterCell;img.style.top=cell.offsetTop+"px";img.style.left=cell.offsetLeft+img.leftoffset+"px";if(img.leftoffset<0)img.style.display="none";else img.style.display="block"}}
function isCell(o){if(o==null)return null;if(o.tagName=="TD"&&o.id!=null&&o.id.indexOf(this.id)==0&&this.cidregex.exec(o.id.substring(this.id.length+1,o.id.length))!=null)return"TD";else if(o.tagName=="SPAN"&&o.id==this.id+"_AC")return"SPAN";else if(o.tagName=="SELECT"&&o.parentNode.id==this.id+"_AC")return"SPAN";else return null}
function doRangeSelect(shiftKey){shiftclick=shiftKey==true;if(this.ActiveCell!=null){if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);if(this.ActiveCell!=this.DragCell&&!shiftKey){this.endSelect();this.enterSelect(this.DragCell)}}else this.enterSelect(this.DragCell);if(this.DragCell!=null&&this.DragEndCell!=null)this._selections.updateRange(this.DragCell,this.DragEndCell);removeSelection()}
function removeSelection(){if(window.getSelection)try{var selection=window.getSelection();selection.removeAllRanges()}catch(ex){}else if(document.selection.createRange)document.selection.empty()}function clearSelections(){this._selections.clear();this.DragCell=null;this.DragEndCell=null}function clearSelectionAsyncCache(){this._selections.forceclear();this.DragCell=null;this.DragEndCell=null}
function setSelectRange(range){this.DragCell=this.getCell(range.startRow,range.startCol);this.DragEndCell=this.getCell(range.endRow,range.endCol);this.doRangeSelect()}function getSelectRange(){return this._selections.last()}
function editCell(o,text){if(getattr(o,"vtype")!="checkbox"){var span=this.getSpan(o);if(span==null){if(getInnerText(o)!=text||o.styleStr!=null&&o.styleStr!=o.orgStyleStr){if(!this.xhtmlmode)setInnerText(o,text);else{var dcell=o.getElementsByTagName("SPAN")[0];if(dcell!=null){var h=o.offsetHeight;setInnerText(dcell,text);if(text.length>0)if(!ie||ie&&iemv>=8)dcell.style.height=h-1+"px"}}o.removeAttribute("formula");o.removeAttribute("ufv");if(ie)o.myInnerText=text;this.update(o)}}else{setInnerText(span,
text);if(ie)o.myInnerText=text}if(text.length>0)adjustSpanCell(o.parentNode,o)}else{var checkbox=o.getElementsByTagName("INPUT")[0];checkbox.checked=text!=null&&text.toUpperCase()=="TRUE";this.update(o)}}
function editCell2(o,text){if(getattr(o,"vtype")!="checkbox"){var span=this.getSpan(o);if(span==null){if(getInnerText(o)!=text){if(!this.xhtmlmode)setInnerText(o,text);else{var dcell=o.getElementsByTagName("SPAN")[0];if(dcell!=null){var otherchildnode=new Array;for(var i=0;i<dcell.children.length;i++)if(dcell.children[i].hasAttributes()&&dcell.children[i].tagName=="IMG")otherchildnode.push(dcell.children[i]);var h=o.offsetHeight;dcell.innerHTML=text;adjustSpanCell(o.parentNode,o);for(var i=0;i<otherchildnode.length;i++)dcell.appendChild(otherchildnode[i])}}if(ie)o.myInnerText=
text}}else if(getattr(o,"formula")==null){setInnerText(span,text);if(ie)o.myInnerText=text}else span.orgText=text}else{var checkbox=o.getElementsByTagName("INPUT")[0];checkbox.checked=text!=null&&text.toUpperCase()=="TRUE"}}function endEdit(o){if(getattr(o,"vtype")!="checkbox"){var span=this.getSpan(o);this.endEditBase(o,span)}}
function endEditfromEditorBox(o){if(getattr(o,"vtype")!="checkbox"){var span=o.firstChild;span.orgText=o.lastText;span.orgClass=span.className;span.orgCellStyle=getattr(span,"style");span.orgStyleStr=span.styleStr;this.endEditBase(o,span)}}function getchartimg(span){var childs=span.childNodes;var ret=new Array;for(var i=0;i<childs.length;i++)if(childs[i].tagName=="IMG")ret.push(childs[i]);if(ret.length>0)return ret;else return null}
function endEditBase(o,span){span.insideedit=false;if(!focusinside)span.istypefirsttime=null;if(!ie||iemv>8){o.unselectable="on";span.blur()}var innerText;if(getattr(o,"vtype")!="dlist")innerText=getInnerText(span);else{var select=document.getElementById(this.id+"_AS");if(select.options.length>0&&select.selectedIndex>=0){var soption=select.options[select.selectedIndex];if(soption!=null)innerText=soption.value}}var otherchildnode=new Array;if(span.otherchildnode!=null)for(var i=0;i<span.otherchildnode.length;i++)otherchildnode.push(span.otherchildnode[i]);
span.parentNode.removeChild(span);var needUpdate=false;if(getattr(o,"formula")==null&&getattr(o,"ufv")==null&&innerText!=span.orgText||getattr(o,"formula")!=null&&innerText.trim()!=getattr(o,"formula").trim()||getattr(o,"ufv")!=null&&innerText!=getattr(o,"ufv")||o.styleStr!=null&&o.styleStr!=o.orgStyleStr){if(getattr(o,"formula")!=null){if(getattr(o,"formula")!=innerText)o.removeAttribute("formula")}else if(getattr(o,"ufv")!=null)if(getattr(o,"ufv")!=innerText)o.removeAttribute("ufv");needUpdate=
true}if(getattr(o,"formula")!=null)innerText=span.orgText;else if(getattr(o,"ufv")!=null&&getattr(o,"orientation255")==null)innerText=span.orgText;if(!this.xhtmlmode)setInnerText(o,innerText);else{var dcell=document.createElement("SPAN");dcell.className=span.orgClass;if(ie&&iemv==7)dcell.style.setAttribute("cssText",span.orgCellStyle.cssText);else dcell.setAttribute("style",span.orgCellStyle);setInnerText(dcell,innerText);o.appendChild(dcell);for(var i=0;i<otherchildnode.length;i++)dcell.appendChild(otherchildnode[i]);
if(ie)o.myInnerText=innerText;adjustSpanCell(o.parentNode,o)}this.hidetip();if(needUpdate){o.setAttribute("needvalidateforlistitems","1");this.update(o)}}
function EscCancelEdit(o){this.fastEdit=true;if(useESCAsLeave){this.endEdit(o);return}var span=this.getSpan(o);if(span!=null)span.insideedit=false;if(!ie||iemv>8){o.unselectable="on";span.blur()}var img=document.getElementById(this.id+"_DB");if(img!=null)img.parentNode.removeChild(img);span.parentNode.removeChild(span);setInnerText(o,span.orgText);if(this.xhtmlmode){var text=getInnerText(o);while(o.hasChildNodes())o.removeChild(o.firstChild);var dcell=document.createElement("SPAN");if(ie&&iemv==7)dcell.style.setAttribute("cssText",
span.orgCellStyle.cssText);else dcell.setAttribute("style",span.orgCellStyle);dcell.className=span.orgClass;setInnerText(dcell,text);o.appendChild(dcell);if(o.rowSpan>1&&ie&&iemv<8)dcell.style.setExpression("height","parentNode.clientHeight-1")}}
function deleteCells(){if(this.editmode)for(var i=0;i<this._selections.list.length;i++){var range=this._selections.list[i];for(var r=range.startRow;r<=range.endRow;r++)for(var c=range.startCol;c<=range.endCol;c++){var o=this.getCell(r,c);if(o!=null&&getattr(o,"protected")!="1"&&getattr(o,"vtype")!="dlist")this.editCell(o,"")}}}
function endDrag(){if(this.Dragging){this.Dragging=false;this.DraggingMode=0;if(this.ActiveCell!=null&&this.DragCell!=null&&this.DragEndCell!=null)this.mOnSelectCell(this.ActiveCell)}if(this.DragCell==null||this.DragEndCell==null){this.DragCell=null;this.DragEndCell=null}if(this.ResizingHD!=null){this.endResize();if(window.event){event.returnValue=false;return}else return false}}
function getFormulaValidation(o,value,symbol,vformula){if(typeof jQuery=="undefined"){alert("you need to include jquery js lib in your page for input validation .");return"true"}else{var strUrl="",strReturn="";var id=o.id.substring(this.id.length+1,o.id.length);if(!java_client)strUrl=this.ajaxcallpath+"?gid="+this.id+"&gridwebuniqueid="+this.webuniqueid;else strUrl=this.ajaxcallpath+"&gid="+this.id+"&gridwebuniqueid="+this.webuniqueid;strUrl+="&kind="+symbol;var gridwebloadingbox=this.loadingBox;
var ret=jQuery.ajax({type:"GET",data:{cellcol:this.getCellColumn(o),cellrow:this.getCellRow(o),cellentervalue:value,vformula:vformula},url:strUrl,cache:false,async:false,beforeSend:function(){gridwebloadingbox.style.display="block"}}).responseText;gridwebloadingbox.style.display="none";return ret}}
function update(o){var xnode;var xv;xnode=this.xmlDoc.selectSingleNode("data/CELLS");var id=o.id.substring(this.id.length+1,o.id.length);xv=xnode.selectSingleNode('C[@ID="'+id+'"]');if(xv==null){xv=this.xmlDoc.createElement("C");xnode.appendChild(xv)}xv.setAttribute("ID",id);if(getattr(o,"vtype")=="checkbox"){var checkbox=o.getElementsByTagName("INPUT")[0];if(checkbox.checked)xv.setAttribute("V","TRUE");else xv.setAttribute("V","FALSE")}else if(getattr(o,"formula")!=null)xv.setAttribute("V",getattr(o,
"formula"));else if(getattr(o,"ufv")!=null&&getattr(o,"orientation255")==null)xv.setAttribute("V",getattr(o,"ufv"));else xv.setAttribute("V",getInnerText(o));if(o.styleStr!=null){o.orgStyleStr=o.styleStr;xv.setAttribute("S",o.styleStr)}if(o.cmdname!=null){xv.setAttribute("CMDN",o.cmdname);if(o.cmdvalue!=null)xv.setAttribute("CMDV",o.cmdvalue)}if(this.forcevalid&&!this.validateInput(o)){this.vmark.value="FALSE";return}o.title="";if(o.firstChild!=null&&o.style.verticalAlign!="")o.firstChild.style.verticalAlign=
o.style.verticalAlign;if(this.ajaxcallpath!=null){if(this.pendingNodes==null)this.pendingNodes=new Array;if(this.ajaxupdatingcells==null)this.ajaxupdatingcells=new Array;this.pendingNodes[this.pendingNodes.length]=xv;if(ie&&!xv.xml)xv.xml=xv.getXML();xnode=this.xmlDoc.selectSingleNode("data/CELLS");if(xnode!=null)while(xnode.hasChildNodes())xnode.removeChild(xnode.getLastChild());xnode=this.xmlDoc.selectSingleNode("data/SIZES");if(xnode!=null)while(xnode.hasChildNodes())xnode.removeChild(xnode.getLastChild());
this.ajaxupdatingcells[this.ajaxupdatingcells.length]=o;if(this.ajaxtimeout==null){inajaxupdating=true;var gridweb=this;this.ajaxtimeout=setTimeout(function(){gridweb.ajaxupdate()},0)}}else this.mOnCellUpdated(o)}
function updateCellFontStyle(cell,fs){cell.styleStr="|"+fs+"|||||||||||";this.update(cell);if(fs=="r"){cell.style.fontStyle="normal";cell.style.fontWeight="normal"}else if(fs=="i")cell.style.fontStyle="italic";else if(fs=="ui")cell.style.fontStyle="normal";else if(fs=="b")cell.style.fontWeight="bold";else if(fs=="ub")cell.style.fontWeight="normal";else if(fs=="ib"){cell.style.fontStyle="italic";cell.style.fontWeight="bold"}}
function updateCellFontName(cell,fname){cell.styleStr=fname+"||||||||||||";this.update(cell);cell.style.fontFamily=fname;var span=cell.children[0].children[0];if(span!=null&&span.tagName=="A")span.style.fontFamily=fname}function updateCellFontSize(cell,fsize){cell.styleStr="||"+fsize+"||||||||||";this.update(cell);cell.style.fontSize=fsize;var span=cell.children[0].children[0];if(span!=null&&span.tagName=="A")span.style.fontSize=fsize}
function updateCellFontLine(cell,linestyle){var span=cell.children[0].children[0];if(linestyle=="u"){cell.styleStr="|||true|||||||||";cell.style.textDecoration="underline";if(span!=null&&span.tagName=="A")span.style.textDecoration="underline"}else if(linestyle=="l"){cell.styleStr="||||true||||||||";cell.style.textDecoration="line-through";if(span!=null&&span.tagName=="A")span.style.textDecoration="line-through"}else if(linestyle=="ul"){cell.styleStr="|||true|true||||||||";cell.style.textDecoration=
"underline line-through";if(span!=null&&span.tagName=="A")span.style.textDecoration="underline line-through"}else if(linestyle=="none"){cell.styleStr="|||false|false||||||||";cell.style.textDecoration="none";if(span!=null&&span.tagName=="A")span.style.textDecoration="none"}this.update(cell)}
function updateCellFontColor(cell,color){var hex_color=colourNameToHex(color);if(!hex_color)return;cell.styleStr="|||||"+hex_color+"|||||||";var span=cell.children[0].children[0];if(span!=null&&span.tagName=="A")span.style.color=hex_color;this.update(cell)}function updateCellBackGroundColor(cell,color){var hex_color=colourNameToHex(color);if(!hex_color)return;cell.styleStr="||||||"+hex_color+"||||||";this.update(cell)}
function addCelllink(cell,linkinfo){var url=linkinfo.url;var text=linkinfo.text;var targetsheetindex=linkinfo.targetsheetindex;var targetcellname=linkinfo.targetcellname;cell.cmdname="al";cell.cmdvalue=url+"|"+text;cell.setAttribute("protected","1");cell.setAttribute("title",text);var span=cell.children[0];var innerhtml=null;if(!url.startWith("http")){url=targetsheetindex+"!"+this.getCellRowColumnByCellName(targetcellname);innerhtml="<a title='"+text+"' url='"+url+"' onclick=\"javascript:gotoACWCell('"+
this.id+"', this);\" href='javascript:void(0);'"}else innerhtml="<a href='"+url+"' target='_blank'";innerhtml+=" style='font-size:11pt;font-style:normal;font-weight:normal;color:#0000FF;text-decoration:underline;'>"+text+"</a>";span.innerHTML=innerhtml;this.update(cell)}function delCelllink(cell){cell.cmdname="dl";cell.removeAttribute("protected");cell.setAttribute("title","<NULL>");var span=cell.children[0];span.innerHTML="";this.update(cell)}
function rangeupdate(funcname,param){var funcexec=function(who,target,pstr){funcname.apply(who,[target,pstr])};if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);if(this._selections.list.length==0){var o=this.ActiveCell;funcexec(this,o,param);adjustSpanCell(o.parentNode,o)}else for(var i=0;i<this._selections.list.length;i++){var range=this._selections.list[i];for(var r=range.startRow;r<=range.endRow;r++)for(var c=range.startCol;c<=range.endCol;c++){var cell=this.getCell(r,c);if(cell!=
null){funcexec(this,cell,param);adjustSpanCell(cell.parentNode,cell)}}}}
function colourNameToHex(colour){if(colour.charAt(0)=="#")return colour;var colours={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",
darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",
lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",
navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",
silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",darkgrey:"#a9a9a9",darkslategrey:"#2f4f4f",dimgrey:"#696969",grey:"#808080",lightgray:"#d3d3d3",lightslategrey:"#778899",slategrey:"#708090"};if(typeof colours[colour.toLowerCase()]!=
"undefined")return colours[colour.toLowerCase()];alert("unsupported color:"+colour);return false}
function setCellTitle(o,t){var tip="";if(getattr(this,"disabletip")!="1"){var cvalue;var cformula;var ctype;var cregex;var cisrequired;var c_optype,c_opvalue1,c_opvalue2;var c_msg;var c_validation_inputtitle;var asl=document.getElementById(this.id+"_AS");if(asl==null)if(getattr(o,"ufv")!=null)cvalue=getattr(o,"ufv");else cvalue=getInnerText(o);else cvalue=asl.options[asl.selectedIndex].text;if(t=="TD"){cformula=getattr(o,"formula");ctype=getattr(o,"vtype");cregex=getattr(o,"regex");cisrequired=getattr(o,
"isrequired")=="1";c_optype=getattr(o,"ValidationOperator");if(c_optype!=null)c_optype=c_optype.toLowerCase();c_opvalue1=getattr(o,"ValidationValue1");c_opvalue2=getattr(o,"ValidationValue2");c_msg=getattr(o,"inputmsg");c_validation_inputtitle=getattr(o,"inputtitle")}else{cformula=getattr(o.parentNode,"formula");ctype=getattr(o.parentNode,"vtype");cregex=getattr(o.parentNode,"regex");cisrequired=getattr(o.parentNode,"isrequired")=="1";c_optype=getattr(o.parentNode,"ValidationOperator");if(c_optype!=
null)c_optype=c_optype.toLowerCase();c_opvalue1=getattr(o.parentNode,"ValidationValue1");c_opvalue2=getattr(o.parentNode,"ValidationValue2");c_msg=getattr(o.parentNode,"inputmsg");c_validation_inputtitle=getattr(o.parentNode,"inputtitle")}if(cvalue!=null&&cvalue!="")tip=cvalue;else tip=getlang().TipCellNoValue;if(cformula!=null)tip+="\n"+getlang().TipCellFormula+cformula;if(ctype!=null){if(ctype!="regex")tip+="\n"+getVTypeString(ctype);if(ctype=="regex"||cregex!=null)tip+="\n"+getlang().TipCellRegex+
cregex;if(ctype=="customstring")if(t=="TD")tip+="\n"+getattr(o,"vformula");else tip+="\n"+getattr(o.parentNode,"vformula");if(cisrequired)tip+="\n"+getlang().TipCellIsRequired}if(c_optype!=null&&ctype!="any"){if(ctype=="time"){if(c_opvalue1!=null)c_opvalue1=validatorConvert(c_opvalue1,ctype);if(c_opvalue2!=null)c_opvalue2=validatorConvert(c_opvalue2,ctype)}if(c_opvalue2==null&&c_optype=="between")c_optype="equal";tip+="\n"+getValidOPtypeTips(c_optype)+" "+c_opvalue1;if(c_opvalue2!=null)tip+=" and "+
c_opvalue2}if(c_msg!=null){tip+="\n"+c_msg;this.createtip(o,"imsg")}}var cmnt;if(t=="TD")cmnt=getattr(o,"CMNT_NOTE");else cmnt=getattr(o.parentNode,"CMNT_NOTE");if(cmnt!=null){if(tip!="")tip+="\n";if(getattr(this,"disabletip")!="1")tip+=getlang().TipCellComment+cmnt;else tip+=cmnt;this.createtip(o,"tip")}if(tip!="")o.title=tip;else if(o.title!="")o.title="";if(getattr(o,"data")!=null)o.title+="\n"+getattr(o,"data");if(cmnt!=null||c_msg!=null)o.title=""}
function createtip(t,type){if(t.gridinstance==null)t.gridinstance=this;var div=null;if(t.tipdiv==null&&type=="tip"){var div=document.createElement("div");div.id=t.id+"_tip";t.tipdiv=div;t.parentNode.parentNode.parentNode.appendChild(div)}if(t.msgdiv==null&&type=="imsg"){var div=document.createElement("div");div.id=t.id+"_imsg";t.msgdiv=div;t.parentNode.parentNode.parentNode.appendChild(div)}if(div!=null){div.style.position="absolute";div.style.backgroundColor="cornsilk"}}
function insertafterfind(str,find,value){var index=str.indexOf(find);if(index>=0){index+=find.length;return str.substr(0,index)+value+str.substr(index)}else return str}
function showtip_cmnt(t,tip,w,h){t.tipdiv.style.display="block";t.tipdiv.style.left=t.offsetLeft+t.offsetWidth+20+"px";t.tipdiv.style.top=t.offsetTop-1+"px";t.tipdiv.style.width=w+"px";t.tipdiv.style.height=h+"px";t.tipdiv.style.wordWrap="break-word";t.tipdiv.innerHTML=insertafterfind(tip,"</Font>","<br>");t.tipdiv.style.zIndex=100;this.tipdiv=t.tipdiv}
function showtip_imsg(t,msg,title){var w=0;var h=0;var totalength=msg.length;var delt=Math.sqrt(900+4*42*140*totalength);var widthchars=Math.ceil((30+delt)/84)+1;if(title!=null)if(title.length*102/14+10>widthchars*84/14)widthchars=Math.ceil(title.length*102/84)+2;var heightchars=Math.ceil(totalength/widthchars)+1;if(title!=null)heightchars+=5;w=Math.ceil(widthchars*84/14)+10;h=w*0.7;var heightrequire=heightchars*14+10;h=Math.max(h,heightrequire);t.msgdiv.style.display="block";t.msgdiv.style.left=
t.offsetLeft+t.offsetWidth/2+"px";t.msgdiv.style.top=t.offsetTop+t.offsetHeight+20+"px";t.msgdiv.style.width=w+"px";t.msgdiv.style.height=h+"px";t.msgdiv.style.wordWrap="break-word";t.msgdiv.style.margin="5px";msg="<span style='font-size:8px'>"+msg+"</span>";if(title!=null)t.msgdiv.innerHTML="<span style='font-weight:bold;font-size:8px'>"+title+"</span><br>"+msg;else t.msgdiv.innerHTML=msg;t.msgdiv.style.zIndex=100;this.msgdiv=t.msgdiv}
function hidetip(){if(this.tipdiv!=null)this.tipdiv.style.display="none";if(this.msgdiv!=null)this.msgdiv.style.display="none"}function showtipf(t){var gridinstance=t.gridinstance;if(gridinstance!=null){var cmnthtml=getattr(t,"CMNT_HTML");if(cmnthtml!=null){var note=HTMLDecode(cmnthtml).ESCAPE_BACK();gridinstance.showtip_cmnt(t,note,getattr(t,"CMNT_W"),getattr(t,"CMNT_H"))}var imsg=getattr(t,"inputmsg");if(imsg!=null)gridinstance.showtip_imsg(t,imsg,getattr(t,"inputtitle"))}}
function hidetipf(t){var gridinstance=t.gridinstance;if(gridinstance!=null)gridinstance.hidetip()}
function getValidOPtypeTips(voptype){var ret="";switch(voptype){case "between":ret=getlang().valid_op_between;break;case "notbetween":ret=getlang().valid_op_notbetween;break;case "equal":ret=getlang().valid_op_equal;break;case "notequal":ret=getlang().valid_op_notequal;break;case "lessthan":ret=getlang().valid_op_lessthan;break;case "lessorequal":ret=getlang().valid_op_lessorequal;break;case "greaterthan":ret=getlang().valid_op_greaterthan;break;case "greaterorequal":ret=getlang().valid_op_greaterorequal;
break}return ret}
function postBack(cmd,cancelEdit){if(window.acwFindReplaceDialog!=null){window.acwFindReplaceDialog.close();window.acwFindReplaceDialog=null}if(!this.mOnSubmit(cmd,cancelEdit))return false;var loadasync=cmd=="ASYNC";if(this.editmode){this.updateData(cancelEdit,cmd);if(!cancelEdit&&this.forcevalid=="1"&&needValidateall&&!this.validateAll())return false}else this.updateData(true,cmd);if(cmd!=null){var ajxpath=!loadasync?this.ajaxcallpath:this.asynccallpath;if(ajxpath!=null&&cmd=="SAVE")if(!java_client)ajxpath+="?gridwebuniqueid="+
this.webuniqueid;else ajxpath+="&gridwebuniqueid="+this.webuniqueid;if(ajxpath!=null&&cmd!="SAVE"){this.eventBtn.acwEventData=cmd;var gridweb=this;this.ajaxtimeout=setTimeout(function(){gridweb.gridajaxupdate(ajxpath)},0)}else{this.eventBtn.acwEventData=cmd;if(ie&&iemv<9)this.eventBtn.fireEvent("onclick",event);else{var evt=document.createEvent("HTMLEvents");evt.initEvent("click",true,true);this.eventBtn.dispatchEvent(evt)}}}this.showloadingbox();return true}
function showloadingbox(){if(getattr(this,"showload")=="1"&&this.loadingBox!=null){var showloadposition=getattr(this,"showloadposition");if(showloadposition!=null&&showloadposition.length>0){var positions=showloadposition.split(",");if(positions.length==2){this.loadingBox.style.left=positions[0]+"px";this.loadingBox.style.top=positions[1]+"px"}}this.loadingBox.style.display="block";this.blockcover.style.display="block"}}
function hideloadingbox(){if(this.loadingBox!=null){this.loadingBox.style.display="none";this.blockcover.style.display="none"}}function VscrollEndHandler(){if(this.vsBar.scrollTop==0)this.viewPanel.scrollTop=0;if(this.async)if(this.vscontentheight!=null&&this.vscontentheight-(this.vsBar.scrollTop+parseInt(this.vsBar.style.height))<=2)this.reachmax=true;else this.reachmax=false;if(Number(getattr(this,"viewtop"))==this.vsBar.scrollTop)return;this.mOnVScroll();scrollTimeout=null}
function HscrollEndHandler(){if(Number(getattr(this,"viewleft"))==this.hsBar.scrollLeft){if(this.hsBar.scrollLeft==0)this.viewPanel.scrollLeft=0;return}this.mOnHScroll();scrollTimeout=null}function selectCell(o){this.selectCellBasic(o,true)}function selectCellNoadjust(o){this.selectCellBasic(o,false)}
function selectCellBasic(o,needadjust){var select=false;if(this.ActiveCell==null){this.enterSelect(o);select=true}else if(!(this.getCellRow(this.ActiveCell)==this.getCellRow(o)&&this.getCellColumn(this.ActiveCell)==this.getCellColumn(o))){if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);this.endSelect();this.enterSelect(o);select=true}if(this.editmode&&getattr(o,"protected")!="1")this.enterEdit(o,false);if(needadjust)try{var panel=o.offsetParent.parentNode;var offsetParent=o.offsetParent;
var offsetLeftToBody=o.offsetLeft;var offsetTopToBody=o.offsetTop;do{offsetTopToBody+=offsetParent.offsetTop;offsetLeftToBody+=offsetParent.offsetLeft;offsetParent=offsetParent.offsetParent}while(offsetParent);if(panel.scrollLeft>o.offsetLeft)panel.scrollLeft=o.offsetLeft;else if(panel.scrollLeft+panel.clientWidth<o.offsetLeft+o.offsetWidth)panel.scrollLeft=o.offsetLeft+o.offsetWidth-panel.clientWidth;if(this.sBody.scrollLeft>offsetLeftToBody)this.sBody.scrollLeft=offsetLeftToBody;else if(this.sBody.scrollLeft+
this.sBody.clientWidth<offsetLeftToBody+o.offsetWidth)this.sBody.scrollLeft=offsetLeftToBody+o.offsetWidth-this.sBody.clientWidth;if(panel.scrollTop>o.offsetTop)panel.scrollTop=o.offsetTop;else if(panel.scrollTop+panel.clientHeight<o.offsetTop+o.offsetHeight)panel.scrollTop=o.offsetTop+o.offsetHeight-panel.clientHeight;if(this.sBody.scrollTop>offsetTopToBody-panel.scrollTop)this.sBody.scrollTop=offsetTopToBody-panel.scrollTop;else if(this.sBody.scrollTop+this.sBody.clientHeight<offsetTopToBody-panel.scrollTop+
o.offsetHeight)this.sBody.scrollTop=offsetTopToBody+o.offsetHeight-this.sBody.clientHeight;if(this.vsBar!=null){var topvalue=0;if(!this.async)topvalue=this.viewPanel.scrollTop;else{var asyncTop=(this.aminrow-this.minrow)*HCELL;if(this.asynctoprows!=null)asyncTop=this.asynctoprows*HCELL;topvalue=this.viewPanel.scrollTop+asyncTop}this.vsBarSetPosion(topvalue)}if(this.hsBar!=null){var leftvalue=0;if(!this.async)leftvalue=this.viewPanel.scrollLeft;else{var asyncLeft=(this.amincol-this.mincol)*WCELL;if(this.asynctopcols!=
null)asyncLeft=this.asynctopcols*WCELL;leftvalue=this.viewPanel.scrollLeft+asyncLeft}this.hsBarSetPosion(leftvalue)}}catch(ex){}var t=this.isCell(o);if(t!=null&&(o.title==null||o.title==""))this.setCellTitle(o,t);if(select)this.mOnSelectCell(this.ActiveCell);if(this.previClickedCell!=null&&this.previClickedCell.nextSibling==null&&o.nextSibling!=null&&this.scrolledFlg)this.topPanel.scrollLeft-=this.currentIMGWidth;if(this.viewPanel!=null&&this.scrolledFlg&&(!this.dropdownListLoadedFlg||this.leftKeyPressedFlg))if(o.nextSibling!=
null)this.viewPanel.scrollLeft-=this.currentIMGWidth;else this.topPanel.scrollLeft-=this.currentIMGWidth;this.scrolledFlg=false;if(this.viewPanel!=null&&this.dropdownListLoadedFlg&&!this.leftKeyPressedFlg){var p=o;var clientX=0;while(p){clientX+=p.offsetLeft;p=p.offsetParent}if(!this.activateNextOrPreviCellFlg&&clientX+this.ActiveCell.scrollWidth>=this.viewPanel.clientWidth+this.viewPanel.offsetLeft){this.viewPanel.scrollLeft+=this.currentIMGWidth;this.scrolledFlg=true}var f=parseFloat(this.ActiveCell.currentStyle.borderLeftWidth);
if(isNaN(f))f=0;if(this.activateNextOrPreviCellFlg&&clientX+this.ActiveCell.scrollWidth+this.ActiveCell.clientWidth+f>=this.viewPanel.clientWidth+this.viewPanel.offsetLeft){this.viewPanel.scrollLeft+=this.currentIMGWidth;this.scrolledFlg=true}if(this.shiftAndTabKeyPressedFlg&&this.ActiveCell.offsetLeft>=this.viewPanel.clientWidth){this.viewPanel.scrollLeft+=this.currentIMGWidth;this.scrolledFlg=true}}this.previClickedCell=o;this.ActiveCell=o;current_cell=o;current_gridweb=this}
function vsBarSetPosion(tvalue){this.vsBar.onscroll=null;if(tvalue!=null)this.vsBar.scrollTop=tvalue;var gridweb=this;this.vsBar.onscroll=function(){if(scrollTimeout!=null)clearTimeout(scrollTimeout);scrollTimeout=setTimeout(function(){gridweb.VscrollEndHandler()},scrollendDelay)}}
function hsBarSetPosion(lvalue){this.hsBar.onscroll=null;if(lvalue!=null)this.hsBar.scrollLeft=lvalue;var gridweb=this;this.hsBar.onscroll=function(){if(scrollTimeout!=null)clearTimeout(scrollTimeout);scrollTimeout=setTimeout(function(){gridweb.HscrollEndHandler()},scrollendDelay)}}
function enterSelect(o){this.ActiveCell=o;this._selections.add(o);this.dropdownListLoadedFlg=false;this.dropdownListShowedFlg=false;this.selectedOptionVal=getInnerText(this.ActiveCell);this.ListMenu.clear();if(this.editmode&&getattr(o,"protected")!="1"&&(getattr(o,"vtype")=="list"||getattr(o,"vtype")=="flist")&&this.ListMenu!=null){var validationvalue1=getattr(o,"validationvalue1");var img=document.createElement("IMG");o.offsetParent.offsetParent.appendChild(img);img.id=this.id+"_DB";img.src=this.image_file_path+
"dropdown.gif";img.title=getlang().TipListMenuButton;img.style.position="absolute";img.style.top=o.offsetTop+"px";img.style.left=o.offsetLeft+o.offsetWidth+"px";this.ListMenu.menuContext=o;this.ListMenu.ismultiple=false;if(validationvalue1.indexOf(":")>0){var lmnode=this.lmDoc.selectSingleNode("listmenus");var mnode=lmnode.selectSingleNode('menu[@id="'+getattr(o,"listmenu")+'"]');if(mnode!=null){var mv=mnode.getAttribute("value");this.ListMenu.loadItems(mv);this.ListMenu.addOKCancel();this.currentIMGWidth=
img.width;this.dropdownListLoadedFlg=true}else;}else{var ret=this.getFormulaValidation(o,"","getvalidatevalue1","");this.ListMenu.loadItemFromServerString(ret);this.ListMenu.addOKCancel();this.currentIMGWidth=img.width;this.dropdownListLoadedFlg=true}}if(this.editmode&&getattr(o,"protected")!="1"&&(getattr(o,"vtype")=="date"||getattr(o,"vtype")=="datetime")){var img=document.createElement("IMG");o.offsetParent.offsetParent.appendChild(img);img.id=this.id+"_DT";img.src=this.image_file_path+"dropdown.gif";
img.title=getlang().TipCalendarButton;img.style.position="absolute";img.style.top=o.offsetTop+"px";img.style.left=o.offsetLeft+o.offsetWidth+"px"}try{var tmp_val_iem7=0;if(ie){var panel=o.offsetParent.parentNode;tmp_val_iem7=panel.scrollLeft;this.donotneedscroll=true}o.focus();if(ie){o.setActive();var panel=o.offsetParent.parentNode;panel.scrollLeft=tmp_val_iem7;this.donotneedscroll=false}}catch(ex){}}
function enterEdit(o,fast,keyCode){var span=this.getSpan(o);if(span==null||!span.insideedit)this.fastEdit=fast;if(getattr(o,"vtype")!="checkbox")if(span==null){span=document.createElement("SPAN");span.id=this.id+"_AC";span.style.height=o.clientHeight+"px";span.style.display="block";span.orgText=getInnerText(o);var chartimg=null;var otherchildnode=new Array;var firstspan=o.children[0];if(firstspan.className!=null)span.orgClass=firstspan.className;span.orgCellStyle=getattr(firstspan,"style");chartimg=
this.getchartimg(firstspan);for(var i=0;i<firstspan.children.length;i++)if(firstspan.children[i].hasAttributes()&&firstspan.children[i].tagName=="IMG")otherchildnode.push(firstspan.children[i]);o.removeChild(firstspan);o.appendChild(span);if(!ie){o.style.MozUserSelect="text";span.style.MozUserSelect="text"}if(getattr(o,"vtype")!="dlist"){span.style.overflowX="hidden";span.style.overflowY="hidden";span.contentEditable=true;if(!fast)if(getattr(o,"formula")==null)if(getattr(o,"ufvbb")!=null&&this.ajaxcallpath!=
null)setInnerText(span,getattr(o,"ufvbb"));else if(getattr(o,"ufv")==null)setInnerText(span,span.orgText);else{var ufvvalue=getattr(o,"ufv");var decimalpoint=getattr(this,"decimalpoint");if(decimalpoint!=null)ufvvalue=ufvvalue.replace(".",decimalpoint);setInnerText(span,ufvvalue);var numbertype=getattr(o,"nt");if(numbertype!=null&&(numbertype=="9"||numbertype=="10")){var textvalue=span.innerText.trim();if(decimalpoint!=null)textvalue=textvalue.replace(decimalpoint,".");textvalue=Number(textvalue).mul(100).toString();
if(decimalpoint!=null)textvalue=textvalue.replace(".",decimalpoint);setInnerText(span,textvalue+"%");var len=span.innerText.length-1;setSelectionRange(span,len,len)}}else setInnerText(span,getattr(o,"formula"));if(otherchildnode.length>0)span.otherchildnode=otherchildnode}else{span.style.overflow="hidden";var select=document.createElement("SELECT");select.id=this.id+"_AS";if(!this.xhtmlmode)select.style.width=span.clientWidth+"px";else select.style.width=span.style.width;select.style.fontSize="9pt";
var lmnode=this.lmDoc.selectSingleNode("listmenus");var mnode=lmnode.selectSingleNode('menu[@id="'+getattr(o,"listmenu")+'"]');var mv=mnode.getAttribute("value");mv=mv.replace(/&lt;/g,"<").replace(/&gt;/g,">");this.xmlDoc1.loadXML(mv);var items=this.xmlDoc1.selectNodes("MENU/ITEM");var nosel=true;for(var i=0;i<items.length;i++){var item=items[i];var option=document.createElement("OPTION");option.text=item.getAttribute("TEXT");var ivalue=item.getAttribute("VALUE");if(ivalue!=null)option.value=ivalue;
else option.value=option.text;select.options.add(option);if(nosel&&(span.orgText==option.value||getattr(o,"ufv")==option.value||getattr(o,"formula")==option.value)){nosel=false;select.selectedIndex=select.options.length-1}}span.appendChild(select)}}if(!focusinside&&this.fastEdit&&keyCode!=null&&span.istypefirsttime==null){setInnerText(span,"");span.istypefirsttime=true}try{var originleft=this.viewPanel.scrollLeft;var origintop=this.viewPanel.scrollTop;if((focusinside&&!fast||fast)&&(!ie||ie&&!this.refreshdataviewing))span.focus();
this.viewPanel.scrollLeft=originleft;this.viewPanel.scrollTop=origintop}catch(ex){}if(this.fastEdit&&firefox&&!span.insideedit){span.insideedit=true;if(keyCode!=null)sendkeys(span,String.fromCharCode(keyCode))}else span.insideedit=true;if(this.fastEdit&&span.innerText==""){var numbertype=getattr(o,"nt");if(numbertype!=null&&(numbertype=="9"||numbertype=="10")){setInnerText(span,"%");setSelectionRange(span,0,0)}}}
function endSelect(){if(this.ActiveCell!=null){var o=this.ActiveCell;if(this.editmode&&getattr(o,"protected")!="1"&&(getattr(o,"vtype")=="list"||getattr(o,"vtype")=="flist")&&this.ListMenu!=null){var img=document.getElementById(this.id+"_DB");if(img!=null)img.parentNode.removeChild(img)}if(this.editmode&&getattr(o,"protected")!="1"&&(getattr(o,"vtype")=="date"||getattr(o,"vtype")=="datetime")){var img=document.getElementById(this.id+"_DT");if(img!=null)img.parentNode.removeChild(img)}var sel=this.ActiveCell;
this.ActiveCell=null;this.mOnUnselectCell(sel)}}
function setCellActive(o){if(this.ActiveCell!=null&&this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);this.endSelect();this.enterSelect(o);try{var panel=o.offsetParent.parentNode;var offsetParent=o.offsetParent;var offsetLeftToBody=o.offsetLeft;var offsetTopToBody=o.offsetTop;do{offsetTopToBody+=offsetParent.offsetTop;offsetLeftToBody+=offsetParent.offsetLeft;offsetParent=offsetParent.offsetParent}while(offsetParent);if(panel.scrollLeft>o.offsetLeft)panel.scrollLeft=o.offsetLeft;else if(panel.scrollLeft+
panel.clientWidth<o.offsetLeft+o.offsetWidth)panel.scrollLeft=o.offsetLeft+o.offsetWidth-panel.clientWidth;if(this.sBody.scrollLeft>offsetLeftToBody)this.sBody.scrollLeft=offsetLeftToBody;else if(this.sBody.scrollLeft+this.sBody.clientWidth<offsetLeftToBody+o.offsetWidth)this.sBody.scrollLeft=offsetLeftToBody+o.offsetWidth-this.sBody.clientWidth;if(panel.scrollTop>o.offsetTop)panel.scrollTop=o.offsetTop;else if(panel.scrollTop+panel.clientHeight<o.offsetTop+o.offsetHeight)panel.scrollTop=o.offsetTop+
o.offsetHeight-panel.clientHeight;if(this.sBody.scrollTop>offsetTopToBody-panel.scrollTop)this.sBody.scrollTop=offsetTopToBody-panel.scrollTop;else if(this.sBody.scrollTop+this.sBody.clientHeight<offsetTopToBody-panel.scrollTop+o.offsetHeight)this.sBody.scrollTop=offsetTopToBody+o.offsetHeight-this.sBody.clientHeight;if(this.vsBar!=null){this.vsBar.onscroll=null;if(!this.async)this.vsBar.scrollTop=this.viewPanel.scrollTop;else{var asyncTop=(this.aminrow-this.minrow)*HCELL;if(this.asynctoprows!=null)asyncTop=
this.asynctoprows*HCELL;this.vsBar.scrollTop=this.viewPanel.scrollTop+asyncTop}var gridweb=this;this.vsBar.onscroll=function(){if(scrollTimeout!=null)clearTimeout(scrollTimeout);scrollTimeout=setTimeout(function(){gridweb.VscrollEndHandler()},scrollendDelay)}}}catch(ex){}var t=this.isCell(o);if(t!=null&&(o.title==null||o.title==""))this.setCellTitle(o,t);this.mOnSelectCell(this.ActiveCell);if(this.viewPanel!=null&&this.scrolledFlg&&(!this.dropdownListLoadedFlg||this.leftKeyPressedFlg))this.viewPanel.scrollLeft-=
this.currentIMGWidth;this.scrolledFlg=false;if(this.viewPanel!=null&&this.dropdownListLoadedFlg&&!this.leftKeyPressedFlg){var p=o;var clientX=0;while(p){clientX+=p.offsetLeft;p=p.offsetParent}if(!this.activateNextOrPreviCellFlg&&clientX+this.ActiveCell.scrollWidth>=this.viewPanel.clientWidth+this.viewPanel.offsetLeft){this.viewPanel.scrollLeft+=this.currentIMGWidth;this.scrolledFlg=true}var f=parseFloat(this.ActiveCell.currentStyle.borderLeftWidth);if(isNaN(f))f=0;if(this.activateNextOrPreviCellFlg&&
clientX+this.ActiveCell.scrollWidth+this.ActiveCell.clientWidth+f>=this.viewPanel.clientWidth+this.viewPanel.offsetLeft){this.viewPanel.scrollLeft+=this.currentIMGWidth;this.scrolledFlg=true}if(this.shiftAndTabKeyPressedFlg&&this.ActiveCell.offsetLeft>=this.viewPanel.clientWidth){this.viewPanel.scrollLeft+=this.currentIMGWidth;this.scrolledFlg=true}}}
function gotoACWCell(gridId,link){var g=document.getElementById(gridId);var url=getattr(link,"url");if(url.indexOf("!")>0){var edata="TAB:"+url;g.postBack(edata,false);g.clearAsyncCache()}else{var pos=url.split("#");var r=Number(pos[1]);var c=Number(pos[0]);g.setActiveCell(r,c)}}function getSpan(o){var s=document.getElementById(this.id+"_AC");if(s!=null&&s.parentNode==o)return s;else return null}function getO(o){var s=this.getSpan(o);return s!=null?s:o}
function ajaxupdate(s){if(this.ajaxXmlHttp==null){this.ajaxtimeout=null;if(this.vmark.value=="TRUE"||!this.forcevalid||this.forcevalid=="1"&&(!needValidateall||needValidateall&&this.validateAll()))this.ajaxcall(s)}else{var gridweb=this;this.ajaxtimeout=setTimeout(function(){gridweb.ajaxupdate()},1E3)}}
function ajaxcall(str){var xmlstr=null;if(str!=null)xmlstr=str;else{xmlstr="<data><CELLS>";for(var i=0;i<this.pendingNodes.length;i++){var node=this.pendingNodes[i];xmlstr+=node.xml}this.pendingNodes.length=0;xmlstr+="</CELLS></data>"}xmlstr=encodeURIComponent(HTMLEncode(xmlstr));var content=this.xmlData.name+"="+xmlstr;if(ie)try{this.ajaxXmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){}else this.ajaxXmlHttp=new window.XMLHttpRequest;if(!java_client)this.ajaxXmlHttp.open("POST",this.ajaxcallpath+
"?gid="+this.id+"&gridwebuniqueid="+this.webuniqueid,true);else this.ajaxXmlHttp.open("POST",this.ajaxcallpath+"&gid="+this.id+"&gridwebuniqueid="+this.webuniqueid,true);this.ajaxXmlHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");var gridweb=this;this.ajaxXmlHttp.onreadystatechange=function(){gridweb.ajaxcallback()};this.ajaxXmlHttp.send(content);var xnode;xnode=this.xmlDoc.selectSingleNode("data/CELLS");if(xnode!=null)while(xnode.hasChildNodes())xnode.removeChild(xnode.getLastChild());
xnode=this.xmlDoc.selectSingleNode("data/SIZES");if(xnode!=null)while(xnode.hasChildNodes())xnode.removeChild(xnode.getLastChild());var img=document.getElementById(this.id+"_UPDATING");if(img==null){img=document.createElement("IMG");img.id=this.id+"_UPDATING";img.src=this.image_file_path+"updating.gif";img.style.position="absolute";img.style.left=this.offsetWidth-20+"px";img.style.top=this.getClientPageHeight()-20+"px";img.style.width=16+"px";img.style.height=16+"px";this.appendChild(img)}img.style.display=
"block";this.ajaxsendtimeout=setTimeout(function(){gridweb.ajaxsendfail()},3E4)}
function ajaxcallback_onselectcell(){if(typeof this.onacwselectcellajaxcallback=="function"&&this.ajaxXmlHttp!=null&&this.ajaxXmlHttp.readyState==4){if(this.ajaxsendtimeout!=null){clearTimeout(this.ajaxsendtimeout);this.ajaxsendtimeout=null}var adoc=this.ajaxXmlHttp.responseXML;var nodes=adoc.selectNodes("CELLS/CELL");for(var i=0;i<nodes.length;i++){var node=nodes[i];var cell=this.getCell(node.getAttribute("R"),node.getAttribute("C"));if(cell!=null){var customerdata=node.getAttribute("CUSTOMER");
if(customerdata!=null)this.mOnSelectCellAjaxCallBack(cell,customerdata)}}this.ajaxXmlHttp=null}}function findColorProperty(selector){rules=document.styleSheets[0].cssRules;for(i in rules)if(rules[i].selectorText==selector)return rules[i].style.color;return false}function getOrientation255String(a){var sb="";for(var i=0;i<a.length;i++)sb+=a.charAt(i)+"<br>";return sb}
function ajaxcallback(){if(this.ajaxXmlHttp!=null&&this.ajaxXmlHttp.readyState==4){if(this.ajaxsendtimeout!=null){clearTimeout(this.ajaxsendtimeout);this.ajaxsendtimeout=null}if(this.ajaxXmlHttp.status==400){alert("error happens!"+this.ajaxXmlHttp.responseText);return}var adoc=this.ajaxXmlHttp.responseXML;var nodes=adoc.selectNodes("CELLS/CELL");var errnode=adoc.selectSingleNode("ERR");if(errnode!=null){if(errnode.getAttribute("R")!=null){var errcell=this.getCell(errnode.getAttribute("R"),errnode.getAttribute("C"));
var errcellName=getCellName(errcell);this.setInvalid(errcell)}alert("error happens,please check the below info:\n"+errnode.getAttribute("MSG"))}for(var i=0;i<nodes.length;i++){var node=nodes[i];var cell=this.getCell(node.getAttribute("R"),node.getAttribute("C"));if(cell!=null){var svalue=node.getAttribute("S");if(cell.getAttribute("orientation255")!=null){cell.setAttribute("ufv",svalue);svalue=getOrientation255String(svalue)}this.editCell2(cell,svalue);if(cell.setLastText){cell.setLastText=true;cell.lastText=
node.getAttribute("S")}var f=node.getAttribute("F");if(f!=null){cell.setAttribute("formula",f);if(cell.getAttribute("resultValue")!=null)cell.setAttribute("resultValue",node.getAttribute("S"))}else if(node.getAttribute("V")!=null)cell.setAttribute("ufv",node.getAttribute("V"));var ufvbb=node.getAttribute("ufvbb");if(ufvbb!=null)cell.setAttribute("ufvbb",ufvbb);var numbertype=node.getAttribute("nt");if(numbertype!=null)cell.setAttribute("nt",numbertype);var color=node.getAttribute("CL");if(color!=
null){var childspan=cell.childNodes[0];if(childspan!=null&&childspan.style!=null)childspan.style.color=color}var color=node.getAttribute("BACKCL");if(color!=null){var childspan=cell.childNodes[0];if(childspan!=null)childspan.style.backgroundColor=color;if(color==""){color="rgba(0,0,0,0)";if(ie&&iemv==8)color="rgb(255,255,255)"}cell.style.backgroundColor=color}var comment=node.getAttribute("CMNT_NOTE");if(comment!=null){cell.setAttribute("CMNT_NOTE",comment);cell.setAttribute("CMNT_AUTHOR",node.getAttribute("CMNT_AUTHOR"));
cell.setAttribute("CMNT_VISIBLE",node.getAttribute("CMNT_VISIBLE"));cell.setAttribute("CMNT_HTML",node.getAttribute("CMNT_HTML"));cell.setAttribute("CMNT_W",node.getAttribute("CMNT_W"));cell.setAttribute("CMNT_H",node.getAttribute("CMNT_H"));cell.setAttribute("onmouseover","showtipf(this)");cell.setAttribute("onmouseout","hidetipf(this)");var childspan=cell.childNodes[0];var childclass=childspan.getAttribute("class");if(childclass.indexOf("acwcmmnt")<0)childspan.setAttribute("class",childclass+" acwcmmnt")}else this.delcommentlocal(cell);
var ha=node.getAttribute("HA");if(ha!=null)cell.setAttribute("align",ha=="l"?"left":"right");setFontAjaxCallBack(node.getAttribute("FT"),cell);cell.title="";var isOriginal=false;if(this.ajaxupdatingcells!=null)for(var j=0;j<this.ajaxupdatingcells.length;j++){var origin=this.ajaxupdatingcells[j];if(origin.id==cell.id){isOriginal=true;break}}this.mOnCellUpdated(cell,isOriginal)}}var nodeids=adoc.selectNodes("CELLS/CHARTIDS");if(nodeids!=null&&nodeids.length>0){var ids=nodeids[0].getAttribute("IDS");
var d=(new Date).getTime();var idlist=ids.split(",");var chart=new Array;for(i=0;i<idlist.length;i++){chart[i]=document.getElementById(idlist[i]);this.addImagePreLoadingGif(chart,d,i,false)}}this.ajaxupdatingcells=null;var gridweb=this;if(typeof this.onajaxcallfinished=="function")this.onajaxcallfinished();setTimeout(function(){gridweb.ajaxcallback2()},200)}}
function setFontAjaxCallBack(ft,cell){if(ft!=null){var ftoptions=ft.split("|");cell.style.fontStyle=ftoptions[0]=="1"?"italic":"normal";cell.style.fontWeight=ftoptions[1]=="1"?"bold":"normal";if(ftoptions[2]=="0")if(ftoptions[3]=="0")cell.style.textDecoration="none";else cell.style.textDecoration="underline";else if(ftoptions[3]=="0")cell.style.textDecoration="line-through";else cell.style.textDecoration="underline line-through";cell.style.fontSize=ftoptions[4];cell.style.fontFamily=ftoptions[5]}}
function ajaxcallback2(){if(this.ajaxXmlHttp!=null){this.ajaxXmlHttp.onreadystatechange=function(){};this.ajaxXmlHttp=null}if(inajaxupdating){inajaxupdating=false;if(afterajaxaction!=null){this.postBack(afterajaxaction,false);afterajaxaction=null}}var img=document.getElementById(this.id+"_UPDATING");img.style.display="none"}
function ajaxsendfail(){this.ajaxsendtimeout=null;if(this.ajaxXmlHttp!=null){this.ajaxXmlHttp.onreadystatechange=function(){};this.ajaxXmlHttp.abort();this.ajaxXmlHttp=null}if(inajaxupdating){inajaxupdating=false;afterajaxaction=null}var img=document.getElementById(this.id+"_UPDATING");img.style.display="none"}
function gridajaxupdate(ajxpath){if(this.ajaxXmlHttp==null){this.ajaxtimeout=null;this.gridajaxcall(ajxpath)}else{var gridweb=this;this.ajaxtimeout=setTimeout(function(){gridweb.gridajaxupdate(ajxpath)},1E3)}}
function gridajaxcall(ajxpath){var cmd=encodeURIComponent(HTMLEncode(this.eventBtn.acwEventData));var content=this.xmlData.name+"="+encodeURIComponent(this.xmlData.value);if(ie)try{this.ajaxXmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){}else this.ajaxXmlHttp=new window.XMLHttpRequest;if(!java_client)this.ajaxXmlHttp.open("POST",ajxpath+"?gid="+this.id+"&cmd="+cmd+"&vmark="+this.vmark.value+"&gridwebuniqueid="+this.webuniqueid,true);else this.ajaxXmlHttp.open("POST",ajxpath+"&gid="+this.id+
"&cmd="+cmd+"&vmark="+this.vmark.value+"&gridwebuniqueid="+this.webuniqueid,true);this.ajaxXmlHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");var gridweb=this;this.ajaxXmlHttp.onreadystatechange=function(){gridweb.gridajaxcallback()};this.ajaxXmlHttp.send(content);this.ajaxsendtimeout=setTimeout(function(){gridweb.gridajaxsendfail()},3E4)}
function ajaxcall_onselectcell_start(ajxpath){if(this.ajaxXmlHttp==null){this.ajaxtimeout=null;this.ajaxcall_onselectcell(ajxpath)}else{var gridweb=this;this.ajaxtimeout=setTimeout(function(){gridweb.ajaxcall_onselectcell_start(ajxpath)},1E3)}}
function ajaxcall_onselectcell(ajxpath){var cmd=encodeURIComponent(HTMLEncode(this.eventBtn.acwEventData));var content=this.xmlData.name+"="+encodeURIComponent(this.xmlData.value);if(ie)try{this.ajaxXmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){}else this.ajaxXmlHttp=new window.XMLHttpRequest;if(this.eventBtn.acwEventValue!=null){var eventvalue=encodeURIComponent(HTMLEncode(this.eventBtn.acwEventValue));if(!java_client)this.ajaxXmlHttp.open("POST",ajxpath+"?gid="+this.id+"&customercmd="+
cmd+"&vmark="+this.vmark.value+"&customervalue="+eventvalue+"&gridwebuniqueid="+this.webuniqueid,true);else this.ajaxXmlHttp.open("POST",ajxpath+"&gid="+this.id+"&customercmd="+cmd+"&vmark="+this.vmark.value+"&customervalue="+eventvalue+"&gridwebuniqueid="+this.webuniqueid,true);this.ajaxXmlHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");var gridweb=this;this.ajaxXmlHttp.onreadystatechange=function(){gridweb.ajaxcallback_onselectcell()};this.ajaxXmlHttp.send(content);this.ajaxsendtimeout=
setTimeout(function(){gridweb.gridajaxsendfail()},3E4)}}function callgridajaxcallback2(){var gridweb=this;setTimeout(function(){gridweb.gridajaxcallback2()},200)}
function gridajaxcallback(){ajaxgoon=true;if(this.ajaxXmlHttp!=null&&this.ajaxXmlHttp.readyState==4){if(this.ajaxsendtimeout!=null){clearTimeout(this.ajaxsendtimeout);this.ajaxsendtimeout=null}var text=this.ajaxXmlHttp.responseText;text=ltabremove(text);if(text.indexOf('<style id="Style'+this.id+'">')==0){if(this.Calendar!=null&&this.Calendar.parentNode!=null)this.Calendar.parentNode.removeChild(this.Calendar);var id=this.id;var w=this.style.width;var h=this.style.height;var styleEnd=text.indexOf("</style>");
var styleHtml=text.substring(text.indexOf(">")+1,styleEnd-1);var elementHtml=text.substr(styleEnd+"</style>".length);this.gridajaxupdateStyles(styleHtml);try{if(this.parentNode){if(this.async&&enableasynccache&&(asyncbeforepostpredata!=null||asyncbeforepostafterdata!=null)){ajaxgoon=false;var needrenderviewtable10=this.viewTable10!=null&&this.viewTable10.children.length>1;var ret=this.parseRespWebHTML(this.id,elementHtml,styleHtml,needrenderviewtable10);if(asyncbeforepostpredata!=null){ret.headstr=
asyncbeforepostpredata.headstr+ret.headstr;ret.contentstr=asyncbeforepostpredata.contentstr+ret.contentstr;ret.stylestr=mergestyle(asyncbeforepostpredata.stylestr,ret.stylestr);if(needrenderviewtable10)ret.contentstr10=asyncbeforepostpredata.contentstr10+ret.contentstr10;asyncbeforepostpredata=null}if(asyncbeforepostafterdata!=null){ret.headstr+=asyncbeforepostafterdata.headstr;ret.contentstr+=asyncbeforepostafterdata.contentstr;ret.stylestr=mergestyle(ret.stylestr,asyncbeforepostafterdata.stylestr);
if(needrenderviewtable10)ret.contentstr10+=asyncbeforepostafterdata.contentstr10;asyncbeforepostafterdata=null}this.refreshdataview(ret);this.callgridajaxcallback2();return false}this.outerHTML=elementHtml}}catch(e){}if(!ajaxgoon)return;var g=document.getElementById(id);g.style.width=w;g.style.height=h;var scriptStartTag='<script type="text/javascript" language="javascript">';var scriptEndTag="<\/script>";var scriptStart=elementHtml.lastIndexOf(scriptStartTag);var scriptEnd=elementHtml.lastIndexOf(scriptEndTag);
var initScript=elementHtml.substring(scriptStart+scriptStartTag.length+1,scriptEnd-1);gridwebinstance.remove(this.id);eval(initScript);var messageStartTag="<DIV style='display:none' id='message'>";var messageEndTag="</DIV>";var messageStart=elementHtml.lastIndexOf(messageStartTag);var messageEnd=elementHtml.lastIndexOf(messageEndTag);if(messageStart>0&&messageEnd>0){var message=elementHtml.substring(messageStart+messageStartTag.length,messageEnd);alert(message)}}this.callgridajaxcallback2()}}
function gridajaxcallback2(){if(this.ajaxXmlHttp!=null){this.ajaxXmlHttp.onreadystatechange=function(){};this.ajaxXmlHttp=null}this.hideloadingbox()}function gridajaxsendfail(){this.ajaxsendtimeout=null;if(this.ajaxXmlHttp!=null){this.ajaxXmlHttp.onreadystatechange=function(){};this.ajaxXmlHttp.abort();this.ajaxXmlHttp=null}this.hideloadingbox()}
function gridajaxupdateStyles(styleHtml){var sheet;var style=document.getElementById("Style"+this.id);if(style!=null)style.parentNode.removeChild(style);else{for(i=0;i<document.styleSheets.length;i++){sheet=document.styleSheets[i];if(sheet.title=="Style"+this.id)break}if(sheet!=null)while(sheet.rules.length>0)sheet.removeRule(0)}if(sheet==null)if(ie)if(iemv>8){sheet=document.createElement("style");sheet.setAttribute("id","Style"+this.id);document.getElementsByTagName("head")[0].appendChild(sheet);
sheet=getStyleSheetObject(this.id)}else{sheet=document.createStyleSheet();sheet.title="Style"+this.id}else{style=document.createElement("style");style.type="text/css";style.id="Style"+this.id;document.getElementsByTagName("head").item(0).appendChild(style);style.appendChild(document.createTextNode(styleHtml));document.body.BehaviorStyleSheet=null;return}if(sheet!=null){var rules=styleHtml.split("}");for(i=0;i<rules.length;i++){var rule=rules[i].split("{");if(rule.length==2)sheet.addRule(rule[0],rule[1])}}}
function getStyleSheetObject(id){for(i=0;i<document.styleSheets.length;i++){sheet=document.styleSheets[i];if(sheet.id=="Style"+id)return sheet}return null}function hideUpdatingImage(){var img=document.getElementById(this.id+"_UPDATING");img.style.display="none"}function requestFocusToGetCopyContentForPaste(){if(!ie){this.pastediv.style.display="block";this.pastediv.focus()}}
function doMyCopyAction(content){if(ie)window.clipboardData.setData("Text",content);else{current_copy_content=content;this.pastediv.value=content;this.pastediv.style.display="block";this.pastediv.focus();this.pastediv.select()}}
function doMyPasteAction(){if(ie)return formatCopyStringFromClipboard(window.clipboardData.getData("Text"));else{if(this.pastediv.value.length>0){this.pastediv.blur();current_copy_content=formatCopyStringFromClipboard(this.pastediv.value);this.pastediv.value="";this.pastediv.style.display="none"}return current_copy_content}}
function formatCopyStringFromClipboard(str){var inside=false;var mychar;var start=0;var end=0;var ret="";for(var i=0;i<str.length&&end<str.length;i++){mychar=str.charAt(i);if(mychar=='"')if(!inside){inside=true;if(i>start)ret+=str.substring(start,i);start=i+1;end=i+1;continue}else if(i+1<str.length&&str.charAt(i+1)=='"'){if(i>start)ret+=str.substring(start,i);ret+='"';start=i+2;end=i+2;i++}else{inside=false;if(i>start)ret+=str.substring(start,i);start=i+1;end=i+1}else if(mychar=="\t"){if(i>start)ret+=
str.substring(start,i);ret+=CELL_CONTENT_COL_DELIMITER;start=i+1;end=i+1}else if(mychar=="\n"&&!inside){if(i>start)ret+=str.substring(start,i);ret+=CELL_CONTENT_ROW_DELIMITER;start=i+1;end=i+1}else end++}if(end>start)ret+=str.substring(start,end).replace(/\n/g,CELL_CONTENT_ROW_DELIMITER).replace(/\t/g,CELL_CONTENT_COL_DELIMITER);if(ret.endsWith(CELL_CONTENT_ROW_DELIMITER))ret=ret.substring(0,ret.length-CELL_CONTENT_ROW_DELIMITER.length);return ret}
function converttoMSExcelCopyFormat(str){if(str.indexOf("\n")>-1)return'"'+str.replace(/"/g,'""')+'"';else return str.replace(/"/g,'""')}function mOnPasteEvent(e){alert(e.clipboardData)}function copy(o){this.CopyOrCut(o,false)}function cut(o){this.CopyOrCut(o,true)}
function CopyOrCut(o,isCut){if(this._selections.list.length==0){var o=this.getO(o);this.doMyCopyAction(getInnerText(o)+CELL_CONTENT_STYLE_DELIMITER+getattr(o,"class"));if(isCut)if(this.editmode&&getattr(o,"protected")!="1"&&getattr(o,"vtype")!="dlist")this.editCell(o,"")}else if(this._selections.list.length>1){alert("That command cannot be used on multiple selections.");return}else{var cptxt="";var range=this._selections.last();for(var r=range.startRow;r<=range.endRow;r++){if(r>range.startRow)cptxt+=
MSEXCEL_ROW_DELIMITER;for(var c=range.startCol;c<=range.endCol;c++){if(c>range.startCol)cptxt+=MSEXCEL_COL_DELIMITER;var cell=this.getCell(r,c);if(cell!=null){var o=this.getO(cell);if(getattr(o,"ufv")!=null)cptxt+=converttoMSExcelCopyFormat(getattr(o,"ufv"));else{var celltext=getInnerText(o);cptxt+=converttoMSExcelCopyFormat(celltext)}if(copy_with_style){setStylestr(o);cptxt+=CELL_CONTENT_FORMAT_DELIMITER+getattr(o,"class")+CELL_CONTENT_FORMAT_DELIMITER;cptxt+=replaceStyleColorAndBGColor(o)+CELL_CONTENT_FORMAT_DELIMITER+
o.styleStr;cptxt+=CELL_CONTENT_FORMAT_DELIMITER+addSeperateForAttributeFromarray(o,cell_attributes_array,CELL_CONTENT_SMALL_DELIMITER)}if(isCut)if(this.editmode&&getattr(cell,"protected")!="1"&&getattr(cell,"vtype")!="dlist")this.editCell(cell,"")}}}this.doMyCopyAction(cptxt)}}
function paste(o){var img=document.getElementById(this.id+"_UPDATING");if(img==null){img=document.createElement("IMG");img.id=this.id+"_UPDATING";img.src=this.image_file_path+"updating.gif";img.style.position="absolute";img.style.left=this.offsetWidth-20+"px";img.style.top=this.getClientPageHeight()-20+"px";img.style.width=16+"px";img.style.height=16+"px";this.appendChild(img)}img.style.display="block";this.pasteObject=o;var gridweb=this;this.requestFocusToGetCopyContentForPaste();setTimeout(function(){gridweb.doPaste()},
0)}function getDefaultStyle(el,styleProp){var camelize=function(str){return str.replace(/\-(\w)/g,function(str,letter){return letter.toUpperCase()})};if(el.currentStyle)return el.currentStyle[camelize(styleProp)];else if(document.defaultView&&document.defaultView.getComputedStyle)return document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);else return el.style[camelize(styleProp)]}
function addSeperateForAttributeFromarray(o,ar,splitsymbol){var ret="";for(i=0;i<ar.length;i++){var attri=getattr(o,ar[i]);if(attri==null)attri="";if(i==0)ret=attri;else ret+=splitsymbol+attri}return ret}function setAttributeFromSeperatedStr(o,ar,splitsymbol,str){var attri_values=str.split(splitsymbol);for(i=0;i<attri_values.length;i++)if(attri_values[i]!="")o.setAttribute(ar[i],attri_values[i])}
function rgbToHex(color){if(color.substr(0,1)==="#")return color;if(chrome&&color=="rgba(0, 0, 0, 0)")return"";else if(color=="transparent"||color=="")return"";else if(ie&&color.substring(0,3)!="rgb")return color;try{var nums=/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/i.exec(color),r=parseInt(nums[2],10).toString(16),g=parseInt(nums[3],10).toString(16),b=parseInt(nums[4],10).toString(16);return"#"+((r.length==1?r+"0":r)+(g.length==1?g+"0":g)+(b.length==1?b+"0":b))}catch(err){return color}}
function pxToPt(value_px){return Math.round(parseFloat(value_px.replace("px",""))*0.75)+"pt"}
function replaceStyleColorAndBGColor(o){var mystr=getattr(o,"style");var ret="";if(mystr.substring(0,6)=="color:")ret=mystr.replace(/(color[^;]+;)/i,"color:"+rgbToHex(o.orgColor)+";").replace(/(background-color[^;]+;)/i,"background-color:"+rgbToHex(o.orgBgColor)+";");else ret=mystr.replace(/ (color[^;]+;)/ig," color:"+rgbToHex(o.orgColor)+";").replace(/(background-color[^;]+;)/i,"background-color:"+rgbToHex(o.orgBgColor)+";");return ret}
function setStylestr(acell){acell.styleStr=getDefaultStyle(acell,"font-family");acell.styleStr+="|";var font_weight=getDefaultStyle(acell,"font-weight");if(getDefaultStyle(acell,"font-style")=="normal")if(font_weight=="normal"||font_weight=="400")acell.styleStr+="r|";else acell.styleStr+="b|";else if(font_weight=="normal"||font_weight=="400")acell.styleStr+="i|";else acell.styleStr+="ib|";if(ie)acell.styleStr+=getDefaultStyle(acell,"font-size")+"|";else acell.styleStr+=pxToPt(getDefaultStyle(acell,
"font-size"))+"|";acell.styleStr+=(getDefaultStyle(acell,"text-decoration")=="underline")+"|"+(getDefaultStyle(acell,"text-decoration")=="line-through")+"|";if(ie)acell.styleStr+=rgbToHex(acell.orgColor)+"|"+rgbToHex(acell.orgBgColor)+"|"+getDefaultStyle(acell,"text-align")+"|"+getDefaultStyle(acell,"vertical-align");else acell.styleStr+=rgbToHex(acell.orgColor)+"|"+rgbToHex(acell.orgBgColor)+"|"+getDefaultStyle(acell,"text-align").replace("-webkit-","").replace("-moz-","")+"|"+getDefaultStyle(acell,
"vertical-align");var borderstyle=getDefaultStyle(acell,"border-left-style");var bordersize=getDefaultStyle(acell,"border-left-width");if(borderstyle!="none"&&bordersize!="0px")acell.lbstr=bordersize+" "+borderstyle+" "+rgbToHex(getDefaultStyle(acell,"border-left-color"));borderstyle=getDefaultStyle(acell,"border-right-style");bordersize=getDefaultStyle(acell,"border-right-width");if(borderstyle!="none"&&bordersize!="0px")acell.rbstr=bordersize+" "+borderstyle+" "+rgbToHex(getDefaultStyle(acell,"border-right-color"));
borderstyle=getDefaultStyle(acell,"border-top-style");bordersize=getDefaultStyle(acell,"border-top-width");if(borderstyle!="none"&&bordersize!="0px")acell.tbstr=bordersize+" "+borderstyle+" "+rgbToHex(getDefaultStyle(acell,"border-top-color"));borderstyle=getDefaultStyle(acell,"border-bottom-style");bordersize=getDefaultStyle(acell,"border-bottom-width");if(borderstyle!="none"&&bordersize!="0px")acell.bbstr=bordersize+" "+borderstyle+" "+rgbToHex(getDefaultStyle(acell,"border-bottom-color"));acell.styleStr+=
"|"+(acell.tbstr!=null?acell.tbstr:"")+"|"+(acell.bbstr!=null?acell.bbstr:"")+"|"+(acell.lbstr!=null?acell.lbstr:"")+"|"+(acell.rbstr!=null?acell.rbstr:"")}
function copywithstyle(pcell,copycontent){var content_with_format=copycontent.split(CELL_CONTENT_FORMAT_DELIMITER);if(content_with_format.length==5){pcell.setAttribute("class",content_with_format[1]);pcell.setAttribute("style",content_with_format[2]);pcell.styleStr=content_with_format[3];setAttributeFromSeperatedStr(pcell,cell_attributes_array,CELL_CONTENT_SMALL_DELIMITER,content_with_format[4]);pcell.copycontentvalue=content_with_format[0];if(pcell.orgBgColor!=null)pcell.orgBgColor=pcell.style.backgroundColor;
if(pcell.orgColor!=null)pcell.orgColor=pcell.style.color}else pcell.copycontentvalue=copycontent}
function doPaste(){var o=this.pasteObject;if(this.editmode){var cptxt=this.doMyPasteAction();if(cptxt==null||cptxt.length==0){this.hideUpdatingImage();return}if(this._selections.list.length>1){alert("That command cannot be used on multiple selections.");this.hideUpdatingImage();return}var cprows=cptxt.split(CELL_CONTENT_ROW_DELIMITER);if(this.amaxrow-this.getActiveRow()+1<cprows.length){alert(getlang().TipPasteTooMuchRows);this.hideUpdatingImage();return}if(this._selections.list.length==0){var startxy=
o.id.substring(this.id.length+1,o.id.length).split("#");var startx=Number(startxy[0]);var starty=Number(startxy[1]);var celly=starty;for(var i=0;i<cprows.length;i++){var cprow=cprows[i];if(cprow!=null&&cprow.length>0){var cellx=startx;var cpcells=cprow.split(CELL_CONTENT_COL_DELIMITER);for(var j=0;j<cpcells.length;j++){var cellid=this.id+"_"+cellx+"#"+celly;var pcell=document.getElementById(cellid);if(pcell!=null&&getattr(pcell,"protected")!="1"&&getattr(pcell,"vtype")!="dlist")if(pcell.offsetWidth==
0)j--;else{copywithstyle(pcell,cpcells[j]);this.editCell(pcell,pcell.copycontentvalue)}cellx++}}celly++}}else{var range=this._selections.last();if(cprows.length==1){var cpcells0=cptxt.split(CELL_CONTENT_COL_DELIMITER);var r_endrow=range.endRow;var endcol=range.endCol;if(cpcells0.length>=endcol-range.startCol+1||(endcol-range.startCol+1)%cpcells0.length!=0){endcol=endcol+cpcells0.length-1;for(var r=range.startRow;r<=r_endrow;r++)for(var c=range.startCol;c<=endcol;c++){var cell=this.getCell(r,c);if(cell!=
null&&getattr(cell,"protected")!="1"&&getattr(cell,"vtype")!="dlist"){copywithstyle(cell,cpcells0[c-range.startCol]);this.editCell(cell,cell.copycontentvalue)}}}else for(var r=range.startRow;r<=r_endrow;r++)for(var c=range.startCol;c<=endcol;c++){var cell=this.getCell(r,c);if(cell!=null&&getattr(cell,"protected")!="1"&&getattr(cell,"vtype")!="dlist"){copywithstyle(cell,cpcells0[(c-range.startCol)%cpcells0.length]);this.editCell(cell,cell.copycontentvalue)}}}else{var minR=range.startRow;var minC=range.startCol;
var maxR=minR;var maxC=minC;var r=minR;for(var i=0;i<cprows.length;i++,r++){var c=range.startCol;var cprow=cprows[i];if(cprow!=null){var cpcells=cprow.split(CELL_CONTENT_COL_DELIMITER);for(var j=0;j<cpcells.length;j++,c++){var cell=this.getCell(r,c);if(cell!=null){maxR=r;maxC=c;if(getattr(cell,"protected")!="1"&&getattr(cell,"vtype")!="dlist"){copywithstyle(cell,cpcells[j]);this.editCell(cell,cell.copycontentvalue)}}}}}this.clearSelections();this.DragCell=this.getCell(minR,minC);this.DragEndCell=
this.getCell(maxR,maxC);this.doRangeSelect()}}}this.hideUpdatingImage()}function validateContent(){if(this.viewPanel==null||this.viewPanel.clientWidth==0)return false;return true}function doSelectShiftCellRange(currentCell,endCell){this.DragCell=currentCell;this.DragEndCell=endCell;this.doRangeSelect();this.mOnSelectCell(currentCell)}function recalculateCellColNumberOnCurrentCell(cell){if(cell==null)return;actualcolnumber=this.getCellColumn(cell)+1}
function recalculateCellRowNumberOnCurrentCell(cell){if(cell==null)return;actualrownumber=this.getCellRow(cell)+1}
function pressKeyGoUpOnCell(currentCell){var crow=this.getCellRow(currentCell);var ccol=this.getCellColumn(currentCell);var nextrow=crow-1;var nextcell=this.findLeftUpMostCell(nextrow,actualcolnumber-1);if(nextcell==null)return;var nextcol_right=this.getCellColumn(nextcell)+nextcell.colSpan-1;if(nextcol_right>=actualcolnumber-1)newcell=nextcell;else{ccol=this.getCellColumn(nextcell);crow=this.getCellRow(nextcell);var nextcolumn=ccol+nextcell.colSpan;newcell=this.findUpMostCell(crow,nextcolumn)}if(this.isCell(newcell)){this.activateNextOrPreviCellFlg=
true;this.selectCell(newcell);this.activateNextOrPreviCellFlg=false}this.recalculateCellRowNumberOnCurrentCell(newcell)}function pressKeyGoDownOnCell(currentCell){var crow=this.getCellRow(currentCell);var nextrow=crow+currentCell.rowSpan;newcell=this.findLeftMostCell(nextrow,actualcolnumber-1);if(this.isCell(newcell)){this.activateNextOrPreviCellFlg=true;this.selectCell(newcell);this.activateNextOrPreviCellFlg=false}this.recalculateCellRowNumberOnCurrentCell(newcell)}
function pressKeyGoRightOnCell(currentCell){var ccolumn=this.getCellColumn(currentCell);var nextcolumn=ccolumn+currentCell.colSpan;newcell=this.findUpMostCell(actualrownumber-1,nextcolumn);if(this.isCell(newcell)){this.activateNextOrPreviCellFlg=true;this.selectCell(newcell);this.activateNextOrPreviCellFlg=false}this.recalculateCellColNumberOnCurrentCell(newcell)}
function pressKeyGoLeftOnCell(currentCell){var ccolumn=this.getCellColumn(currentCell);var nextcolumn=ccolumn-1;var nextcell=this.findLeftUpMostCell(actualrownumber-1,nextcolumn);if(nextcell==null)return;var nextcol_right=this.getCellColumn(nextcell)+nextcell.colSpan-1;if(nextcol_right==ccolumn-1)newcell=nextcell;else{ccol=this.getCellColumn(nextcell);crow=this.getCellRow(nextcell);var nextcolumn=ccol+nextcell.colSpan;newcell=this.findUpMostCell(crow,nextcolumn)}if(this.isCell(newcell)){this.leftKeyPressedFlg=
true;this.selectCell(newcell);this.leftKeyPressedFlg=false}this.recalculateCellColNumberOnCurrentCell(newcell)}function findLeftMostCell(newrow,col){var colbundary=0;if(this.topTable0!=null){var lefttablecols=this.topTable0.rows[0].cells.length;if(col>=lefttablecols)colbundary=lefttablecols}var i=col;for(;i>=colbundary&&i>=this.amincol;i--){var o=document.getElementById(this.id+"_"+i+"#"+newrow);if(o!=null)return o}return null}
function findUpMostCell(row,newcol){var rowbundary=0;if(this.ltable0!=null){var toprows=this.ltable0.rows.length;if(row>=toprows)rowbundary=toprows}var i=row;for(;i>=rowbundary&&i>=this.aminrow;i--){var o=document.getElementById(this.id+"_"+newcol+"#"+i);if(o!=null)return o}return null}
function findLeftUpMostCell(newrow,col){var colbundary=0;if(this.topTable0!=null){var lefttablecols=this.topTable0.rows[0].cells.length;if(col>=lefttablecols)colbundary=lefttablecols}var rowbundary=0;if(this.ltable0!=null){var toprows=this.ltable0.rows.length;if(newrow>=toprows)rowbundary=toprows}var j=newrow;for(;j>=rowbundary&&j>=this.aminrow;j--){var i=col;for(;i>=colbundary&&i>=this.amincol;i--){var o=document.getElementById(this.id+"_"+i+"#"+j);if(o!=null)return o}}return null}
function findcurrentCell(row,col){var cell=this.findLeftUpMostCell(row,col);if(cell==null)return null;var nextcol=this.getCellColumn(cell)+cell.colSpan;if(nextcol-1<col)return this.findUpMostCell(row,nextcol);else return cell}function findDirectColumnNumberCell(newrow){var len=newrow.cells.length;var tempcolnumber=0;var i=0;for(;i<len;i++){tempcolnumber+=newrow.cells[i].colSpan;if(tempcolnumber>=actualcolnumber)return newrow.cells[i]}return null}
function ieTextEditEnterWay(){var selectText=document.selection.createRange();if(selectText){if(selectText.text.length>0)selectText.text+="\n";else selectText.text="\n";selectText.select()}}function getNextValidCell(currentCell){var nextCell=currentCell.nextSibling;if(nextCell==null||nextCell.clientWidth>0)return nextCell;else return this.getNextValidCell(nextCell)}
function getPreviousValidCell(currentCell){var previCell=currentCell.previousSibling;if(previCell==null||previCell.clientWidth>0)return previCell;else return this.getPreviousValidCell(previCell)}
function getUndersideValidRow(currentCell){var undersideRow=currentCell.parentNode.nextSibling;var f=0;if(undersideRow!=null&&undersideRow.tagName=="TR"){f=parseFloat(undersideRow.currentStyle.borderBottomWidth);if(isNaN(f))f=0}else return null;if(undersideRow==null||undersideRow.offsetHeight-f>0)return undersideRow;else return this.getUndersideValidRow(undersideRow.cells[currentCell.cellIndex])}
function getUpsideValidRow(currentCell){var upsideRow=currentCell.parentNode.previousSibling;var f=0;if(upsideRow!=null&&upsideRow.tagName=="TR"){f=parseFloat(upsideRow.currentStyle.borderBottomWidth);if(isNaN(f))f=0}else return null;if(upsideRow==null||upsideRow.offsetHeight-f>0)return upsideRow;else return this.getUpsideValidRow(upsideRow.cells[currentCell.cellIndex])}
function GetUpListItem(e){var row=document.getElementById(this.id+"_LMENU_ROW");if(row==null||this.ListMenu==null)return;var rows=row.parentNode.childNodes;if(rows==null||rows.length==0)return;var index=this.ListMenu.currIndex;if(index>0&&index<rows.length){rows[index].childNodes[0].style.backgroundColor="";index--}else index=0;this.ListMenu.currIndex=index;rows[index].childNodes[0].style.backgroundColor="";var item=rows[index].childNodes[0];item.style.backgroundColor="#A9D0F5";this.selectedOptionVal=
getInnerText(item);this.showDropDownList(e)}
function GetDownListItem(e){var row=document.getElementById(this.id+"_LMENU_ROW");if(row==null||this.ListMenu==null)return;var rows=row.parentNode.childNodes;if(rows==null||rows.length==0)return;var index=this.ListMenu.currIndex;if(index<0||index>=rows.length)index=0;else{rows[index].childNodes[0].style.backgroundColor="";index++;if(index==rows.length)index=rows.length-1}this.ListMenu.currIndex=index;rows[index].childNodes[0].style.backgroundColor="";var item=rows[index].childNodes[0];item.style.backgroundColor=
"#A9D0F5";this.selectedOptionVal=getInnerText(item);this.showDropDownList(e)}function isHeader(o){if(o==null)return null;if(o.tagName=="TD"&&o.id!=null)if(o.id.indexOf(this.id+"_@")==0)return"ROW";else if(o.id.indexOf(this.id+"_!")==0)return"COL";else if(o.id==this.id+"_FSTCELL")return"FSTCELL";else return null;else return null}
function setResizeCursor(e){this.ResizeIcon=false;var evt=new Event(e);var o=evt.getTarget();var offset=evt.getOffset();var parent=o;if(o.tagName=="SPAN"&&(o.className.indexOf("acwxc")>-1||o.className.indexOf("rotation")>-1))parent=o.parentNode;if(parent.vAlign!="bottom"||ie)o=parent;var otype=this.isHeader(parent);if(otype&&parent.unselectable!="on")parent.unselectable="on";switch(otype){case "ROW":y=offset.offsetY+o.clientTop;if(!this.Dragging&&y>=o.offsetHeight-3){o.style.cursor="row-resize";this.ResizeIcon=
true}else o.style.cursor="default";break;case "COL":x=offset.offsetX+o.clientLeft;if(!this.Dragging&&x>=o.offsetWidth-3){o.style.cursor="col-resize";this.ResizeIcon=true}else o.style.cursor="default";break}}
function resizeHeaderbar(e){var adj;if(this.xhtmlmode)adj=2;else adj=1;var evt=new Event(e);switch(this.resizeType){case "ROW":var row=this.ResizingHD.parentNode;dy=evt.e.clientY-this.StartY;if(this.StartHeight+dy<=0)dy=adj-this.StartHeight;if(dy==0||this.StartHeight+dy<=0)return;if(this.resizePanel==this.leftPanel){row.style.height=this.StartHeight+dy+"px";for(var i=0;i<row.cells.length;i++){var td=row.cells[i];adjustSpanCell(row,td)}var vrow=this.viewTable.rows[row.rowIndex];vrow.style.height=this.StartHeight+
dy+"px";adjustRowSpanCellByRow(this.viewTable.id,vrow,this);for(var i=0;i<vrow.cells.length;i++){var td=vrow.cells[i];adjustSpanCell(vrow,td)}if(this.viewTable10!=null){vrow=this.viewTable10.rows[row.rowIndex];vrow.style.height=this.StartHeight+dy+"px";adjustRowSpanCellByRow(this.viewTable10.id,vrow,this);for(var i=0;i<vrow.cells.length;i++){var td=vrow.cells[i];adjustSpanCell(vrow,td)}}}else{row.style.height=this.StartHeight+dy+"px";for(var i=0;i<row.cells.length;i++){var td=row.cells[i];adjustSpanCell(row,
td)}if(this.viewTable00!=null){var vrow=this.viewTable00.rows[row.rowIndex];vrow.style.height=this.StartHeight+dy+"px";adjustRowSpanCellByRow(this.viewTable00.id,vrow,this);for(var i=0;i<vrow.cells.length;i++){var td=vrow.cells[i];adjustSpanCell(vrow,td)}}if(this.viewTable01!=null){var vrow=this.viewTable01.rows[row.rowIndex];vrow.style.height=this.StartHeight+dy+"px";adjustRowSpanCellByRow(this.viewTable01.id,vrow,this);for(var i=0;i<vrow.cells.length;i++){var td=vrow.cells[i];adjustSpanCell(vrow,
td)}}}if(this.freeze)this.adjustSizes();this.mOnScroll();break;case "COL":dx=evt.e.clientX-this.StartX;if(this.StartWidth+dx<=0)dx=adj-this.StartWidth;if(this.resizePanel==this.topPanel){var nw=this.StartWidth+dx+"px";this.CD.style.width=nw;this.CD1.style.width=nw;if(this.CD0!=null)this.CD0.style.width=nw}else{var nw;if(dx<0||this.StartWidth1-dx>5)nw=this.StartWidth+dx+"px";else nw=this.StartWidth+"px";this.CD.style.width=nw;this.CD1.style.width=nw;this.CD0.style.width=nw}if(this.freeze)this.adjustSizes();
this.mOnScroll();this.adjustImageButton();break}}
function enterResize(e){var evt=new Event(e);this.ResizingHD=evt.getTarget();if(this.ResizingHD.tagName=="SPAN"&&(this.ResizingHD.className.indexOf("acwxc")>-1||this.ResizingHD.className.indexOf("rotation")>-1))this.ResizingHD=this.ResizingHD.parentNode;this.resizeType=this.isHeader(this.ResizingHD);this.resizePanel=this.ResizingHD.parentNode.parentNode.parentNode.parentNode;this.StartX=evt.e.clientX;this.StartY=evt.e.clientY;switch(this.resizeType){case "ROW":this.StartHeight=this.ResizingHD.parentNode.offsetHeight;
if(this.resizePanel!=this.leftPanel)this.StartHeight1=this.viewPanel.clientHeight;break;case "COL":this.CD=document.getElementById(this.ResizingHD.id+"C");if(ie)this.StartWidth=this.CD.style.pixelWidth;else if(chrome)this.StartWidth=add_px_or_pt(0,this.CD.style.width);else this.StartWidth=this.CD.offsetWidth;if(this.resizePanel==this.topPanel){this.CD0=document.getElementById(this.ResizingHD.id+"CD01");this.CD1=document.getElementById(this.ResizingHD.id+"CD")}else{this.StartWidth1=this.viewPanel.clientWidth;
this.CD0=document.getElementById(this.ResizingHD.id+"CD00");this.CD1=document.getElementById(this.ResizingHD.id+"CD10")}break}}
function endResize(){reSetDPI();if(this.editmode)switch(this.resizeType){case "ROW":var xnode;var xv;var id;xnode=this.xmlDoc.selectSingleNode("data/SIZES");id=this.ResizingHD.id.substr(this.id.length+2);xv=xnode.selectSingleNode('H[@ID="'+id+'"]');if(xv==null){xv=this.xmlDoc.createElement("H");xnode.appendChild(xv)}xv.setAttribute("ID",id);if(!this.xhtmlmode)xv.setAttribute("V",this.ResizingHD.offsetHeight*72/screen.deviceYDPI);else{var rh=this.ResizingHD.clientHeight*72/screen.deviceYDPI;if(rh==
0)rh=0.1;xv.setAttribute("V",rh)}break;case "COL":var xnode;var xv;var id;xnode=this.xmlDoc.selectSingleNode("data/SIZES");id=this.ResizingHD.id.substr(this.id.length+2);xv=xnode.selectSingleNode('W[@ID="'+id+'"]');if(xv==null){xv=this.xmlDoc.createElement("W");xnode.appendChild(xv)}xv.setAttribute("ID",this.ResizingHD.id.substr(this.id.length+2));if(!this.xhtmlmode)xv.setAttribute("V",this.ResizingHD.offsetWidth*72/screen.deviceXDPI);else{var cw=this.ResizingHD.clientWidth*72/screen.deviceXDPI;if(cw==
0)cw=0.1;xv.setAttribute("V",cw)}break}this.ResizingHD=null;this.adjustAsyncScrollBar();if(this.noscroll)this.adjustNoScroll()}
function updateSelect(need){var xnode;var xv;var id;xnode=this.xmlDoc.selectSingleNode("data/SELECT");while(xnode.hasChildNodes())xnode.removeChild(xnode.getFirstChild());if(need){if(this.ActiveCell!=null){id=this.ActiveCell.id.substring(this.id.length+1,this.ActiveCell.id.length);xv=this.xmlDoc.createElement("ACELL");xnode.appendChild(xv);xv.setAttribute("ID",id)}if(this.DragCell!=null&&this.DragEndCell!=null){id=this.DragCell.id.substring(this.id.length+1,this.DragCell.id.length);xv=this.xmlDoc.createElement("DCELL");
xnode.appendChild(xv);xv.setAttribute("ID",id);id=this.DragEndCell.id.substring(this.id.length+1,this.DragEndCell.id.length);xv=this.xmlDoc.createElement("DECELL");xnode.appendChild(xv);xv.setAttribute("ID",id);if(this._selections.list.length!=null){xv=this.xmlDoc.createElement("SCELLS");xnode.appendChild(xv);var str="";for(var i=0;i<this._selections.list.length;i++){var range=this._selections.list[i];str+=range.toString()+";"}xv.setAttribute("RANGES",str)}}}}
function updatePagePosition(need){var xnode;var xv;var id;xnode=this.xmlDoc.selectSingleNode("data/POSITION");while(xnode.hasChildNodes())xnode.removeChild(xnode.getFirstChild());xv=this.xmlDoc.createElement("BODYSCROLL");xnode.appendChild(xv);if(this.tabPanel!=null)xv.setAttribute("TLEFT",this.tabPanel.scrollLeft);xv.setAttribute("LEFT",this.sBody.scrollLeft);xv.setAttribute("TOP",this.sBody.scrollTop);if(this.async&&enableasynccache){this.setAttribute("bodyleft",xv.getAttribute("LEFT"));this.setAttribute("bodytop",
xv.getAttribute("TOP"));this.setAttribute("tableft",xv.getAttribute("TLEFT"))}if(need){xv.setAttribute("VLEFT",this.async&&this.hsBar!=null?this.hsBar.scrollLeft:this.viewPanel.scrollLeft);xv.setAttribute("VTOP",this.async&&this.vsBar!=null?this.vsBar.scrollTop:this.viewPanel.scrollTop);if(this.async&&enableasynccache){this.setAttribute("viewleft",xv.getAttribute("VLEFT"));this.setAttribute("viewtop",xv.getAttribute("VTOP"))}}else{xv.setAttribute("VLEFT",0);xv.setAttribute("VTOP",0);if(this.async&&
enableasynccache){this.setAttribute("viewleft",0);this.setAttribute("viewtop",0)}}}
function updateAsync(need){var xnode;xnode=this.xmlDoc.selectSingleNode("data/ASYNC");xnode.removeAttribute("RASYNCWEBSTART");xnode.removeAttribute("RASYNWEBEND");xnode.removeAttribute("RMIN");xnode.removeAttribute("RMAX");xnode.removeAttribute("CMIN");xnode.removeAttribute("CMAX");if(need){if(this.async){if(this.webstartrow!=null)xnode.setAttribute("RASYNCWEBSTART",this.webstartrow);else xnode.removeAttribute("RASYNCWEBSTART");if(this.webendrow!=null)xnode.setAttribute("RASYNWEBEND",this.webendrow);
else xnode.removeAttribute("RASYNWEBEND")}xnode.setAttribute("RMIN",this.aminrow);xnode.setAttribute("RMAX",this.amaxrow);xnode.setAttribute("CMIN",this.amincol);xnode.setAttribute("CMAX",this.amaxcol)}}
function refreshdataview(data){this.updateData(false,"ASYNC");document.getElementById(this.id+"_leftTab").children[1].innerHTML=data.headstr;document.getElementById(this.id+"_viewTable").children[1].innerHTML=data.contentstr;if(this.viewTable10!=null&&this.viewTable10.children.length>1&&data.contentstr10!=null)document.getElementById(this.id+"_viewTable10").children[1].innerHTML=data.contentstr10;if(data.stylestr.length==0)console.log("err in refreshdataview can't get style----\>"+data.stylestr.length);
this.gridajaxupdateStyles(data.stylestr);this.webstartrow=null;this.webendrow=null;asyncbeforepostpredata=null;asyncbeforepostafterdata=null;this.adjustBVScroll();this.activerow=lastactiverow;this.activecol=lastactivecol;this.refreshdataviewing=true;this.tryInitSetActiveCell();this.refreshdataviewing=false;if(this.row_v_info!=null)for(var rowid=this.aminrow;rowid<=this.amaxrow;rowid++){var display=this.row_v_info[rowid]?"block":"none";var row=this.getContentRowById(rowid);setRowDisplay(row,display);
row=this.getHeadRowById(rowid);setRowDisplay(row,display)}doIE7AsyncScrllBar(this)}var lastactiverow=null;var lastactivecol=null;var last_downmatch_row=null;var last_row_collapse_info=null;var last_row_v_info=null;var last_asyncrows=0;var last_direction=-1;var last_col_collapse_info=null;var last_col_v_info=null;var last_downmatch_col=null;var last_issummaryrowbelow=true;
function postAsyncH(aminrow,amaxrow,cancelEdit){if(this.vsTimeout!=null){clearTimeout(this.vsTimeout);this.vsTimeout=null}this.aminrow=aminrow;this.amaxrow=amaxrow;var is_asyncgrouprows=false;if(this.async&&enableasynccache){if(this.ActiveCell!=null){lastactiverow=this.getCellRow(this.ActiveCell);lastactivecol=this.getCellColumn(this.ActiveCell)}this.clearSelectionAsyncCache();is_asyncgrouprows=this.row_v_info!=null;put_row_data_in_cache(is_asyncgrouprows,this.id,this.amincol,haveanyupdate);if(is_asyncgrouprows)if(this.direction==
0)this.amaxrow=this.findNextMaxRow(aminrow,amaxrow);else this.aminrow=this.findNextMinRow(aminrow,amaxrow)}var needwebrequest=this.tryfindcachePrepare();if(needwebrequest){if(is_asyncgrouprows){last_downmatch_row=this.downmatch_row;last_row_collapse_info=this.row_collapse_info;last_row_v_info=this.row_v_info;last_direction=this.direction;last_issummaryrowbelow=this.issummaryrowbelow}last_asyncrows=this.asyncrows;this.postBack("ASYNC",cancelEdit)}}
function postAsyncW(amincol,amaxcol,cancelEdit){if(this.vsTimeout!=null){clearTimeout(this.vsTimeout);this.vsTimeout=null}var is_asyncgrouprows=false;if(this.async&&enableasynccache){if(this.ActiveCell!=null){lastactiverow=this.getCellRow(this.ActiveCell);lastactivecol=this.getCellColumn(this.ActiveCell)}this.clearSelectionAsyncCache();is_asyncgrouprows=this.row_v_info!=null;put_row_data_in_cache(is_asyncgrouprows,this.id,this.amincol,haveanyupdate);if(is_asyncgrouprows){last_downmatch_row=this.downmatch_row;
last_row_collapse_info=this.row_collapse_info;last_row_v_info=this.row_v_info;last_issummaryrowbelow=this.issummaryrowbelow}last_asyncrows=this.asyncrows}this.amincol=amincol;this.amaxcol=amaxcol;this.postBack("ASYNC",cancelEdit)}
function adjustImagePosition(o,left,top,angle){var parenttd=null;if(o.parentNode!=null)parenttd=o.parentNode.parentNode;if(parenttd==null&&!o.isgif){setTimeout(function(){adjustImagePosition(o,left,top,angle)},1E3);return}else;if(o.parentNode!=null){if(o.parentNode.style.height.replace(/(^[\\s]*)|([\\s]*$)/g,"")=="")o.parentNode.style.height=o.parentNode.parentNode.parentNode.style.height;if(ie&&iemv==6)o.parentNode.style.overflow="hidden";else o.parentNode.style.overflow="visible";var parent_left=
parenttd.offsetLeft;var parent_top=parenttd.offsetTop;left+=parent_left;top+=parent_top;o.style.position="absolute";if(angle!=null){var trans="";if(angle>0){trans="rotate("+angle+"deg)";o.style.transform=trans}if(angle>180)angle-=180;if(angle>90)angle=180-angle;var radian=angle*Math.PI/180;left+=o.clientHeight/2*Math.sin(radian)+o.clientWidth/2*(Math.cos(radian)-1);if(angle==90)top+=(o.clientWidth-o.clientHeight)/2;else if(angle<=45);else top-=o.clientHeight/2*(1-Math.cos(radian))+o.clientWidth/2*
Math.sin(radian)}o.style.left=left+"px";o.style.top=top+"px"}}
function setUpContrlScrollBar(o){var who=this;var parenttd=null;if(o.parentNode!=null)parenttd=o.parentNode.parentNode;if(parenttd==null){setTimeout(function(){who.setUpContrlScrollBar(o)},1E3);return}var controlinfo=o.getAttribute("ctlinfo");if(controlinfo==null)return;controlinfo="{"+controlinfo+"}";controlinfo=JSON.parse(controlinfo);$(o).slider({max:controlinfo.max,value:controlinfo.v,min:controlinfo.min,orientation:controlinfo.ish==1?"horizontal":"vertical",change:function(event,ui){if(controlinfo.row!=
-1&&controlinfo.col!=-1)who.setCellValue(controlinfo.row,controlinfo.col,ui.value)},create:function(event,ui){},classes:{"ui-slider":"highlight"}});adjustImagePosition(o,controlinfo.l,controlinfo.t);var sliderhandl=$(o).find(".ui-slider-handle");if(controlinfo.ish==1)sliderhandl.height(add_px_or_pt(4,o.style.height));else sliderhandl.width(add_px_or_pt(4,o.style.width))}
function setUpContrlRadioButton(o){var who=this;var controlinfo=o.getAttribute("ctlinfo");if(controlinfo==null)return;controlinfo="{"+controlinfo+"}";controlinfo=JSON.parse(controlinfo);var radiospan=document.createElement("span");radiospan.style.position="inherit";radiospan.style.left="0";o.appendChild(radiospan);var radio=document.createElement("input");radio.type="radio";radio.name=controlinfo.name;radio.value=controlinfo.label;if(controlinfo.value==1)radio.checked="checked";radiospan.appendChild(radio);
radiospan.appendChild(document.createTextNode(controlinfo.label));$(radio).change(function(){if($(radio).is(":checked"))who.setCellValue(controlinfo.row,controlinfo.col,controlinfo.idx.toString())});adjustImagePosition(o,controlinfo.l,controlinfo.t)}
function fontDialog(o){if(this.editmode&&getattr(this,"stdb")=="1"&&(getattr(o,"protected")!="1"||this._selections.list.length>0)){var em=this.getSpan(o)!=null;var param;if(this._selections.list.length==0)param=o;else param=this._selections;if(ie){window.acwDialogWindow=window.showModalDialog(this.acw_client_path+"fontdlg.htm",param,"dialogWidth:430px; dialogHeight:520px; status:no;center:yes");this.fontdialognext(o,em)}else{var iTop=(window.screen.height-30-520)/2;var iLeft=(window.screen.width-
10-430)/2;window.acwDialogElement=this;window.operatecell=o;window.operatespan=em;window.acwDialogWindow=window.open(this.acw_client_path+"fontdlg_l.htm","_blank","height=520,width=430,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no,modal=yes"+",top="+iTop+",left="+iLeft)}}}function fontdialogcallback(){window.acwDialogElement.fontdialognext(window.operatecell,window.operatespan)}
function fontdialognext(o,em){if(!em)if(this._selections.list.length==0){this.update(o);adjustSpanCell(o.parentNode,o)}else for(var i=0;i<this._selections.list.length;i++){var range=this._selections.list[i];for(var r=range.startRow;r<=range.endRow;r++)for(var c=range.startCol;c<=range.endCol;c++){var cell=this.getCell(r,c);if(cell!=null&&getattr(cell,"protected")!="1"){this.update(cell);adjustSpanCell(cell.parentNode,cell)}}}}function closeFontDialog(){}
function ajustLeftHeaderHeight(acell,row){var prefix=acell.id.substring(0,acell.id.lastIndexOf("_"));document.getElementById(prefix+"_$"+row).style.height=acell.parentElement.offsetHeight+"px"}
function showFindReplaceDlg(gridWeb,startCell,callType){if(window.acwFindReplaceDialog==null){window.acwFindReplaceDialog_Element=gridWeb;window.acwFindReplaceDialog_StartCell=startCell;var url=gridWeb.acw_client_path+"findDlg.htm?callType="+callType;if(window.showModelessDialog){var feature="dialogWidth:380px; dialogHeight:190px; status:no;scroll:no;help:no;center:yes";var dialogArguments=new Array;dialogArguments[0]=window;dialogArguments[1]=gridWeb.fillTableCellsToArray();dialogArguments[2]=getStartCellIndexInArray(startCell,
dialogArguments[1]);window.acwFindReplaceDialog=window.showModelessDialog(url,dialogArguments,feature)}else{var name=this.id+"_findDlg";var iTop=(window.screen.height-30-160)/2;var iLeft=(window.screen.width-10-400)/2;var feature="chrome=yes,dependent=yes,dialog=yes,modal=yes,alwaysRaised=yes,resizable=no,location=no,toolbar=no,status=no,width=400px,height=160px"+",top="+iTop+",left="+iLeft;window.acwFindReplaceDialog=window.open(url,name,feature)}}else{window.acwFindReplaceDialog.focus();window.acwFindReplaceDialog._element=
gridWeb;window.acwFindReplaceDialog._activeCell=startCell;window.acwFindReplaceDialog._callType=callType;var arrCells=gridWeb.fillTableCellsToArray();window.acwFindReplaceDialog._arrCells=arrCells;window.acwFindReplaceDialog._cellIndex=getStartCellIndexInArray(startCell,arrCells);window.acwFindReplaceDialog.init()}}
function fillTableCellsToArray(){var arrCells=new Array;var k=0;if(this.freeze){if(this.viewTable00!=null&&this.viewTable01!=null&&this.viewTable10!=null&&this.viewTable!=null){var viewTable00Rows=this.viewTable00.rows;var viewTable00Rowslen=viewTable00Rows.length;var viewTable01Rows=this.viewTable01.rows;var viewTable01Rowslen=viewTable01Rows.length;var viewTable10Rows=this.viewTable10.rows;var viewTable10Rowslen=viewTable10Rows.length;var viewTableRows=this.viewTable.rows;var viewTableRowslen=viewTableRows.length;
var i=0;while(i<viewTable00Rowslen){var viewTable00Cells=viewTable00Rows[i].cells;var viewTable00Cellslen=viewTable00Cells.length;var j;for(j=0;j<viewTable00Cellslen;j++)arrCells[k++]=viewTable00Cells[j];var viewTable01Cells=viewTable01Rows[i].cells;var viewTable01Cellslen=viewTable01Cells.length;for(j=0;j<viewTable01Cellslen;j++)arrCells[k++]=viewTable01Cells[j];i++}i=0;while(i<viewTable10Rowslen){var viewTable10Cells=viewTable10Rows[i].cells;var viewTable10Cellslen=viewTable10Cells.length;var j;
for(j=0;j<viewTable10Cellslen;j++)arrCells[k++]=viewTable10Cells[j];var viewTableCells=viewTableRows[i].cells;var viewTableCellslen=viewTableCells.length;for(j=0;j<viewTableCellslen;j++)arrCells[k++]=viewTableCells[j];i++}}}else if(this.viewTable!=null){var rows=this.viewTable.rows;var rowslen=rows.length;var i;for(i=0;i<rowslen;i++){var cells=rows[i].cells;var cellslen=cells.length;var j;for(j=0;j<cellslen;j++)arrCells[k++]=cells[j]}}return arrCells}
function getStartCellIndexInArray(startCell,arrCells){for(var i=0;i<arrCells.length;i++)if(startCell==arrCells[i])return i;return 0}function showDropDownList(e){if(this.ListMenu!=null){this.ListMenu.showNS(e);var evt=new Event(e);var offset=evt.getOffset();var left=this.ListMenu.offsetLeft-offset.offsetX-1;if(left<0)left=0;var top=this.ListMenu.offsetTop+this.ActiveCell.offsetHeight-offset.offsetY-1;if(top<0)top=0;this.ListMenu.showXY(left,top,this)}this.dropdownListShowedFlg=true}
function ready(fn){if(document.readyState!="loading")fn();else document.addEventListener("DOMContentLoaded",fn)}function setRowCollpaseStatus(row,iscollpase){var o=row.children[0].children[0].children[0];if(o==null)return;o.setAttribute("expand",iscollpase?"1":"0");if(!iscollpase)o.src=this.image_file_path+"collapse.gif";else o.src=this.image_file_path+"expand.gif"}
function setColCollpaseStatus(col,iscollpase){var o=col.children[0].children[0];if(o==null){console.error("col children is null:"+col.id);return}o.setAttribute("expand",iscollpase?"1":"0");if(!iscollpase)o.src=this.image_file_path+"collapse.gif";else o.src=this.image_file_path+"expand.gif"}
function setRowDisplayExtrForMergedAreaAbove(rowid,display){if(display=="none"){var mergecells=new Array;for(var i=this.amincol;i<=this.amaxcol;){var currentCell=this.findUpMostCell(rowid,i);i+=currentCell.colSpan;if(currentCell.rowSpan>1&&rowid!=getRowId(currentCell)){if(currentCell.orignRowSpan==null){currentCell.orignRowSpan=currentCell.rowSpan;currentCell.orignHeight=currentCell.children[0].style.height;currentCell.children[0].style.height=""}currentCell.rowSpan--;mergecells.push(currentCell)}}if(mergecells.length>
0)this.mergecellrecord_upper.put(rowid,mergecells)}else{var mergecells=this.mergecellrecord_upper.get(rowid);if(mergecells!=null)for(var i=0;i<mergecells.length;i++){var currentCell=mergecells[i];if(currentCell.orignRowSpan!=null){currentCell.rowSpan=currentCell.orignRowSpan;currentCell.children[0].style.height=currentCell.orignHeight;currentCell.orignRowSpan=null;currentCell.orignHeight=null}}}}
function setRowDisplayExtrForMergedAreaBelow(row,rowid,display){if(display=="none"){var mergecells=new Array;var lasttd=null;for(var i=this.amincol;i<=this.amaxcol;){var currentCell=this.findUpMostCell(rowid,i);i+=currentCell.colSpan;if(currentCell.orignRowSpan>1){var cell=row.insertCell(i);cell.outerHTML=currentCell.outerHTML;cell.id=this.id+"_"+i+"#"+rowid;cell.rowSpan=currentCell.rowSpan;mergecells.push(i)}}if(mergecells.length>0)this.mergecellrecord_down.put(rowid,mergecells)}else{var mergecells=
this.mergecellrecord_down.get(rowid);if(mergecells!=null)for(var i=0;i<mergecells.length;i++)row.deleteCell(mergecells[i])}}
function setRowDisplay(row,display){if(row==null)return;if(ie&&iemv<9){row.style.display=display;var cells=row.cells;var length=cells.length;for(var i=0;i<length;i++){var cell=cells[i];if(display=="none"){cell.disBorder=cell.style.borderStyle;cell.style.borderStyle="none"}else if(cell.disBorder!=null){cell.style.borderStyle=cell.disBorder;cell.disBorder=null}}}else{if(display=="block")display="table-row";row.style.display=display}}
function attributeString2Array(s,isconverttonumber){var ret=s.substring(0,s.length-1).split(",");if(isconverttonumber)for(var i=0;i<ret.length;i++)ret[i]=Number(ret[i]);return ret}function setupGroupMatch(){this.setupGroupMatchRow();this.setupGroupMatchCol()}
function setupGroupMatchRow(){if(last_row_v_info!=null){this.row_v_info=last_row_v_info;this.row_collapse_info=last_row_collapse_info;this.downmatch_row=last_downmatch_row;this.issummaryrowbelow=last_issummaryrowbelow;var who=this;var f=function(){if(who.row_collapse_info){var entry=who.row_collapse_info.entrys();for(var i=0;i<entry.length;i++){var de=entry[i];var rowid=de.key;var row=who.getContentRowById(rowid);if(row!=null)who.setRowCollpaseStatus(row,de.value)}}};ready(f);return}function sortNumber(a,
b){return a.a-b.a}var collpase=getattr(this,"grp_collapse_row");if(collpase!=null){var issummaryrowbelow=getattr(this,"sumbelow");var collpase=attributeString2Array(collpase);var grpupnode=null;var grpdownnode=null;if(issummaryrowbelow!=null){this.issummaryrowbelow=true;var grpdownnode=attributeString2Array(getattr(this,"grp_down_row"),true);var grpupnode=attributeString2Array(getattr(this,"grp_upper_row"),true)}else{this.issummaryrowbelow=false;var grpupnode=attributeString2Array(getattr(this,"grp_down_row"),
true);var grpdownnode=attributeString2Array(getattr(this,"grp_upper_row"),true);for(var i=0;i<grpdownnode.length;i++){var item={};item.a=grpdownnode[i]-1;item.b=grpupnode[i];grpdownnode[i]=item}grpdownnode.sort(sortNumber);for(var i=0;i<grpdownnode.length;i++){var item=grpdownnode[i];grpdownnode[i]=item.a;grpupnode[i]=item.b}}var downmatch=new Map;var row_collapse_info=new Map;this.downmatch_row=downmatch;this.row_collapse_info=row_collapse_info;for(var i=0;i<grpdownnode.length;i++){downmatch.put(grpdownnode[i],
grpupnode[i]);row_collapse_info.put(grpdownnode[i],collpase[i]=="1");var row=this.getContentRowById(grpdownnode[i]);if(row!=null)this.setRowCollpaseStatus(row,collpase[i]=="1")}}var grp_hidden_start=getattr(this,"grp_hidden_start_row");if(grp_hidden_start!=null||collpase!=null){var row_v_info=new Array;this.row_v_info=row_v_info;var maxrow=Number(getattr(this,"maxrow"));if(grp_hidden_start!=null){var hiddenStartRowArry=attributeString2Array(grp_hidden_start,true);var hiddenCountRowArry=attributeString2Array(getattr(this,
"grp_hidden_count_row"),true);var c=0;var i=0;for(var r=0;r<=maxrow;){while(r<hiddenStartRowArry[i])row_v_info[r++]=true;c=0;while(c++<hiddenCountRowArry[i])row_v_info[r++]=false;i++;if(i>=hiddenStartRowArry.length){while(r<=maxrow)row_v_info[r++]=true;break}}}else for(var r=0;r<=maxrow;)row_v_info[r++]=true}}
function setupGroupMatchCol(){if(last_col_v_info!=null){this.col_v_info=last_col_v_info;this.col_collapse_info=last_col_collapse_info;this.downmatch_col=last_downmatch_col;var who=this;var f=function(){var entry=who.col_collapse_info.entrys();for(var i=0;i<entry.length;i++){var de=entry[i];var colid=de.key;var col=who.getContentColById(colid);if(col!=null)who.setColCollpaseStatus(col,de.value)}};ready(f);return}var collpase=getattr(this,"grp_collapse_col");if(collpase!=null){var collpase=attributeString2Array(collpase);
var grpdownnode=attributeString2Array(getattr(this,"grp_down_col"),true);var grpupnode=attributeString2Array(getattr(this,"grp_upper_col"),true);var downmatch=new Map;var col_collapse_info=new Map;this.downmatch_col=downmatch;this.col_collapse_info=col_collapse_info;for(var i=0;i<grpdownnode.length;i++){downmatch.put(grpdownnode[i],grpupnode[i]);col_collapse_info.put(grpdownnode[i],collpase[i]=="1");var col=this.getContentColById(grpdownnode[i]);if(col!=null)this.setColCollpaseStatus(col,collpase[i]==
"1")}}var grp_hidden_start=getattr(this,"grp_hidden_start_col");if(grp_hidden_start!=null||collpase!=null){var col_v_info=new Array;this.col_v_info=col_v_info;var maxcol=Number(getattr(this,"maxcol"));if(grp_hidden_start!=null){var hiddenStartcolArry=attributeString2Array(grp_hidden_start,true);var hiddenCountcolArry=attributeString2Array(getattr(this,"grp_hidden_count_col"),true);var c=0;var i=0;for(var r=0;r<=maxcol;){while(r<hiddenStartcolArry[i])col_v_info[r++]=true;c=0;while(c++<hiddenCountcolArry[i])col_v_info[r++]=
false;i++;if(i>=hiddenStartcolArry.length){while(r<=maxcol)col_v_info[r++]=true;break}}}else for(var r=0;r<=maxcol;)col_v_info[r++]=true}this.mergecellrecord_upper=new Map;this.mergecellrecord_down=new Map}function getRowVisible(row){return this.row_v_info[row]}function getVisibleRowCount(from,to){var ret=0;for(var row=from;row<=to;row++)if(this.getRowVisible(row))ret++;return ret}
function findNextMaxRow(renderMinRow,renderMaxRow){var maxrows=this.maxrow;var alreadyrows=renderMaxRow-renderMinRow+1;var row=renderMinRow;for(var visiblerowscount=0;visiblerowscount<alreadyrows&&row<=maxrows;row++){if(!this.getRowVisible(row))continue;visiblerowscount++}return row-1}
function findNextMinRow(renderMinRow,renderMaxRow){var minrow=this.minrow;var alreadyrows=renderMaxRow-renderMinRow+1;var row=renderMaxRow;for(var visiblerowscount=0;visiblerowscount<alreadyrows&&row>=minrow;row--){if(!this.getRowVisible(row))continue;visiblerowscount++}return row+1}function getContentRowById(id){var rowid=null;if(this.freeze&&this.freezecol==0)rowid=this.id+"_[f_row]"+id;else rowid=this.id+"_[d_row]"+id;return document.getElementById(rowid)}
function getContentColById(id){var colid=this.id+"_tpc_"+id;return document.getElementById(colid)}function getRowId(row){var index=row.id.lastIndexOf("]");return Number(row.id.substr(index+1))}function getSpanRowId(row){var index=row.id.lastIndexOf("#");return Number(row.id.substr(index+1))}function getColId(col){var index=col.id.lastIndexOf("_");return Number(col.id.substr(index+1))}
function getLeftPartRowById(id){var rowid=null;if(this.freezecol==0)rowid=this.id+"_[f_row]"+id;else rowid=this.id+"_[d_row]"+id;return document.getElementById(rowid)}function getRightPartRowById(id){var rowid=null;if(this.freezecol==0){rowid=this.id+"_[d_row]"+id;return document.getElementById(rowid)}else{rowid=this.id+"_"+this.freezecol+"#"+id;return document.getElementById(rowid).parentNode}}function getHeadRowById(id){var rowid=this.id+"_[h_row]"+id;return document.getElementById(rowid)}
function collapseRow(downrow){this.row_collapse_info.put(downrow,true);var upperrow=this.downmatch_row.get(downrow);function setrowdisplaybyid(rowid){this.row_v_info[rowid]=false;var row=null;if(!this.freeze){row=this.getContentRowById(rowid);setRowDisplay(row,"none")}else{row=this.getLeftPartRowById(rowid);setRowDisplay(row,"none");row=this.getRightPartRowById(rowid);setRowDisplay(row,"none")}row=this.getHeadRowById(rowid);setRowDisplay(row,"none");this.setRowDisplayExtrForMergedAreaAbove(rowid,
"none")}if(this.issummaryrowbelow)for(var rowid=upperrow;rowid<downrow;rowid++)setrowdisplaybyid.call(this,rowid);else for(var rowid=upperrow-1;rowid>downrow;rowid--)setrowdisplaybyid.call(this,rowid);row=this.getContentRowById(downrow);this.setRowDisplayExtrForMergedAreaBelow(row,rowid,"none");if(this.async)this.ajacsendcmd("collapserow:"+downrow)}
function expandRow(downrow){this.row_collapse_info.put(downrow,false);var upperrow=this.downmatch_row.get(downrow);function setrowdisplaybyid(rowid){this.row_v_info[rowid]=true;var row=null;if(!this.freeze){row=this.getContentRowById(rowid);setRowDisplay(row,"block")}else{row=this.getLeftPartRowById(rowid);setRowDisplay(row,"block");row=this.getRightPartRowById(rowid);setRowDisplay(row,"block")}row=this.getHeadRowById(rowid);setRowDisplay(row,"block");this.setRowDisplayExtrForMergedAreaAbove(rowid,
"block")}if(this.issummaryrowbelow)for(var rowid=upperrow;rowid<=downrow;rowid++)setrowdisplaybyid.call(this,rowid);else for(var rowid=upperrow;rowid>=downrow;rowid--)setrowdisplaybyid.call(this,rowid);var inside_dwonrow=0;var inside_upperrow=0;var entry=this.downmatch_row.entrys();for(var i=0;i<entry.length;i++){var de=entry[i];inside_dwonrow=de.key;inside_upperrow=de.value;if(inside_dwonrow<downrow&&inside_upperrow>upperrow)if(this.row_collapse_info.get(inside_dwonrow))for(var rowid=inside_upperrow;rowid<
inside_dwonrow;rowid++){this.row_v_info[rowid]=false;var row=null;if(!this.freeze){row=this.getContentRowById(rowid);setRowDisplay(row,"none")}else{row=this.getLeftPartRowById(rowid);setRowDisplay(row,"none");row=this.getRightPartRowById(rowid);setRowDisplay(row,"none")}row=this.getHeadRowById(rowid);setRowDisplay(row,"none");this.setRowDisplayExtrForMergedAreaAbove(rowid,"none")}}row=this.getContentRowById(downrow);this.setRowDisplayExtrForMergedAreaBelow(row,downrow,"block");if(this.async)this.ajacsendcmd("expandrow:"+
downrow)}
function setColDisplay(id,display){var colid=null;var col=null;if(this.freezecol==null){this.setColDisplayBasic(id,"C",display);this.setColDisplayBasic(id,"CD",display)}else if(this.freezecol==0){this.setColDisplayBasic(id,"C",display);this.setColDisplayBasic(id,"CD01",display);this.setColDisplayBasic(id,"CD",display)}else if(id<this.freezecol){this.setColDisplayBasic(id,"C",display);this.setColDisplayBasic(id,"CD00",display);this.setColDisplayBasic(id,"CD10",display)}else{this.setColDisplayBasic(id,"C",
display);this.setColDisplayBasic(id,"CD01",display);this.setColDisplayBasic(id,"CD",display)}}function setColDisplayBasic(id,whichname,display){var colid=this.id+"_!"+id+whichname;var col=document.getElementById(colid);if(display)col.style.width=col.getAttribute("aw")+"px";else col.style.width="0px"}
function collapseCol(downcol){this.col_collapse_info.put(downcol,true);var uppercol=this.downmatch_col.get(downcol);for(var colid=uppercol;colid<downcol;colid++){this.col_v_info[colid]=false;this.setColDisplay(colid,false)}if(this.async);}
function expandCol(downcol){this.col_collapse_info.put(downcol,false);var uppercol=this.downmatch_col.get(downcol);for(var colid=uppercol;colid<=downcol;colid++){this.col_v_info[colid]=true;this.setColDisplay(colid,true)}var inside_dwoncol=0;var inside_uppercol=0;var entry=this.downmatch_col.entrys();for(var i=0;i<entry.length;i++){var de=entry[i];inside_dwoncol=de.key;inside_uppercol=de.value;if(inside_dwoncol<downcol&&inside_uppercol>uppercol)if(this.col_collapse_info.get(inside_dwoncol))for(var colid=
inside_uppercol;colid<inside_dwoncol;colid++){this.col_v_info[colid]=false;this.setColDisplay(colid,false)}}if(this.async);}function ajacsendcmd(cmd){cmdxml="<data><CMDS><CMD V="+cmd+"/></data></CMDS>";if(this.ajaxtimeout==null){inajaxupdating=true;var gridweb=this;this.ajaxtimeout=setTimeout(function(){gridweb.ajaxupdate(cmdxml)},0)}}function delcomment(row,col){this.ajacsendcmd("delcomment:"+row+","+col)}
function delcommentlocal(cell){var childspan=cell.childNodes[0];var childclass=childspan.getAttribute("class");if(childclass!=null&&childclass.indexOf("acwcmmnt")>=0){childspan.setAttribute("class",childclass.replace(" acwcmmnt",""));cell.removeAttribute("CMNT_NOTE");cell.removeAttribute("onmouseover");cell.removeAttribute("onmouseout")}}
function delcomments(){if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);var size=this._selections.list.length;var cmd="";for(var i=0;i<=size-1;i++){var range=this._selections.list[i];cmd+=":"+range.startRow+","+range.startCol+","+range.endRow+","+range.endCol}this.ajacsendcmd("delcomment"+cmd)}
function addcomments(comment){if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);var size=this._selections.list.length;var cmd="";for(var i=0;i<=size-1;i++){var range=this._selections.list[i];cmd+=":"+range.startRow+","+range.startCol+","+range.endRow+","+range.endCol}this.ajacsendcmd("addcomment:"+comment.note+","+comment.author+cmd)}
function getViewTableByRowHeader(rowHeader){var vtable;if(this.viewTable00==null)vtable=this.viewTable;else{var hpanel=rowHeader.parentNode.parentNode.parentNode.parentNode;if(hpanel==this.leftPanel)vtable=this.viewTable;else vtable=this.viewTable01}return vtable}
function getViewTableByColHeader(colHeader){var vtable;if(this.viewTable00==null)vtable=this.viewTable;else{var hpanel=colHeader.parentNode.parentNode.parentNode.parentNode;if(hpanel==this.topPanel)vtable=this.viewTable01;else vtable=this.viewTable00}return vtable}function getViewTableByCell(cell){return cell.parentNode.parentNode.parentNode}function getFirstCell(cells){for(var i=0;i<cells.length;i++)if(this.isCell(cells[i]))return cells[i];return null}
function getLastCell(cells){for(var i=cells.length-1;i>=0;i--)if(this.isCell(cells[i]))return cells[i];return null}function tryInitSetActiveCell(){if(this.activerow!=null&&this.activecol!=null)if(this.activerow>=this.aminrow&&this.activerow<=this.amaxrow&&this.activecol>=this.amincol&&this.activecol<=this.amaxcol)this.setActiveCellNoadjust(this.activerow?this.activerow:0,this.activecol?this.activecol:0)}function getActiveCell(){return this.ActiveCell}
function setActiveCell(row,column){this.setActiveCellBasic(row,column,true)}function setActiveCellNoadjust(row,column){this.setActiveCellBasic(row,column,false)}
function setActiveCellBasic(row,column,needadjust){this.clearSelections();var o=document.getElementById(this.id+"_"+column+"#"+row);if(o!=null){if(this.ActiveCell!=null){if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);if(this.ActiveCell!=o)if(needadjust)this.selectCell(o);else this.selectCellNoadjust(o)}else if(needadjust)this.selectCell(o);else this.selectCellNoadjust(o);actualcolnumber=column+1;actualrownumber=row+1}else if(this.ActiveCell!=null){if(this.getSpan(this.ActiveCell)!=
null)this.endEdit(this.ActiveCell);this.endSelect()}}function isDataChanged(){var xnode=this.xmlDoc.selectSingleNode("data/CELLS");return xnode!=null&&xnode.hasChildNodes()}
function updateData(discardInput,cmd){if(this.ActiveCell!=null)if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);if(discardInput){var xnode;xnode=this.xmlDoc.selectSingleNode("data/CELLS");if(xnode!=null)while(xnode.hasChildNodes())xnode.removeChild(xnode.getLastChild());xnode=this.xmlDoc.selectSingleNode("data/SIZES");if(xnode!=null)while(xnode.hasChildNodes())xnode.removeChild(xnode.getLastChild())}this.updateSelect(!cmd.startWith("TAB:"));this.updatePagePosition(!cmd.startWith("TAB:"));
this.updateAsync(cmd=="ASYNC");this.xmlData.value=HTMLEncode(this.xmlDoc.getXML())}function validateAll(){var r=true;if(this.validations!=null){var l=this.validations.length;var i;for(i=0;i<l;i++){var val=this.validations[i];if(val!=null&&!this.validateInput(val)&&r){r=false;if(scrollToInvalidate)val.scrollIntoView()}}}if(r)this.vmark.value="TRUE";else{this.vmark.value="FALSE";this.mOnError()}return r}function submit(arg,discardInput){this.postBack(arg,discardInput)}
function getCellValue(row,column){var o=document.getElementById(this.id+"_"+column+"#"+row);if(o!=null){if(this.getSpan(o)!=null)this.endEdit(o);if(getattr(o,"vtype")=="checkbox"){var checkbox=o.getElementsByTagName("INPUT")[0];return checkbox.checked}else if(getattr(o,"ufv")!=null)return getattr(o,"ufv");else return getInnerText(o)}else return null}
function setCellValue(row,column,value){var o=document.getElementById(this.id+"_"+column+"#"+row);if(o!=null){if(this.getSpan(o)!=null)this.endEdit(o);if(this.editmode&&getattr(o,"protected")!="1")this.editCell(o,value)}}function getActiveRow(){if(this.ActiveCell!=null){var row=this.ActiveCell.id.substring(this.ActiveCell.id.indexOf("#")+1,this.ActiveCell.id.length);return Number(row)}else return null}
function getActiveColumn(){if(this.ActiveCell!=null){var col=this.ActiveCell.id.substring(this.id.length+1,this.ActiveCell.id.indexOf("#"));return Number(col)}else return null}function getSelectedCells(){return this._selections.list}
function setActiveCellByCell(cell){this.clearSelections();if(this.isCell(cell)=="TD")if(this.ActiveCell!=null){if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);if(this.ActiveCell!=cell)this.selectCell(cell)}else this.selectCell(cell);else if(this.ActiveCell!=null){if(this.getSpan(this.ActiveCell)!=null)this.endEdit(this.ActiveCell);this.endSelect()}}function getCell(row,column){return document.getElementById(this.id+"_"+column+"#"+row)}
function getLocateCell(row,column){return this.findcurrentCell(row,column)}function getCellRow(cell){if(this.isCell(cell)=="TD"){var row=cell.id.substring(cell.id.indexOf("#")+1,cell.id.length);return Number(row)}else return null}function getColumn(index){return document.getElementById(this.id+"_!"+index)}function getCellColumn(cell){if(this.isCell(cell)=="TD"){var col=cell.id.substring(this.id.length+1,cell.id.indexOf("#"));return Number(col)}else return null}
function getCellColumnName(cell){var column=this.getCellColumn(cell);if(column==null||column<0||column>255)return null;var firstChar=Math.floor(column/26);var secondChar=column%26;if(firstChar>0){var first=String.fromCharCode(firstChar+64);var second=String.fromCharCode(secondChar+65);return first+second}else return String.fromCharCode(secondChar+65)}
function getCellColumnByColumnName(n){var name=n.toLowerCase();var ret=0;var len=name.length;for(var i=0;i<len;i++){var multiple=len-i-1;ret+=(name.charCodeAt(i)-96)*Math.pow(26,multiple)}return ret}function getCellName(cell){var colname=this.getCellColumnName(cell);var row=this.getCellRow(cell);if(colname!=null&&row!=null)return colname+(row+1);else return null}
function getCellRowColumnByCellName(name){var splitindex=0;for(var i=0;i<name.length;i++)if(name.charAt(i)>"0"&&name.charAt(i)<"9"){splitindex=i;break}var columnname=name.substr(0,splitindex);var rowname=name.substr(splitindex);return this.getCellColumnByColumnName(columnname)-1+"#"+(rowname-1)}
function getCellValueByCell(cell){if(this.isCell(cell)=="TD")if(getattr(cell,"vtype")=="checkbox"){var checkbox=cell.getElementsByTagName("INPUT")[0];return checkbox.checked}else if(getattr(cell,"ufv")!=null)return getattr(cell,"ufv");else return getInnerText(cell);else return null}function setCellValueByCell(cell,value){if(this.isCell(cell)=="TD"){if(this.getSpan(cell)!=null)this.endEdit(cell);if(this.editmode&&getattr(cell,"protected")!="1")this.editCell(cell,value)}}
function print(zoom){this.endSelect();if(zoom==null)zoom=1;var styleGridWeb=document.getElementById("Style"+this.id);var newWin=window.open("","");if(chrome||firefox){newWin.window.focus();newWin.onbeforeunload=function(event){return"Please use the cancel button on the left side of the print preview to close this window.\n"}}newWin.document.writeln("<html><head><title>Print Preview</title>");newWin.document.writeln(styleGridWeb.outerHTML+"</head>");newWin.document.writeln('<body style="zoom:'+zoom+
';" onload="window.print();" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0">');newWin.document.writeln("<form>");var ghtml;var vt=document.getElementById(this.id+"_viewTable");var fcol=document.getElementById(this.id+"_FCOL");if(fcol==null)ghtml="<TABLE>"+"<TR>"+"<TD>"+vt.outerHTML+"</TD>"+"</TR>"+"</TABLE>";else{var v00=document.getElementById(this.id+"_viewTable00");var v01=document.getElementById(this.id+"_viewTable01");var v10=document.getElementById(this.id+"_viewTable10");var fcolWidth=
fcol.style.offsetWidth;ghtml="<TABLE>"+"<COLGROUP>"+"<COL style='WIDTH:"+fcolWidth+"px'>"+"<COL>"+"</COLGROUP>"+"<TR>"+"<TD>"+v00.outerHTML+"</TD>"+"<TD>"+v01.outerHTML+"</TD>"+"</TR>"+"<TR>"+"<TD>"+v10.outerHTML+"</TD>"+"<TD>"+vt.outerHTML+"</TD>"+"</TR>"+"</TABLE>"}var start=ghtml.indexOf('onload="adjustImagePosition');while(start>0){var end=ghtml.indexOf(";",start);ghtml=ghtml.substr(0,start)+ghtml.substr(end+2);start=ghtml.indexOf('src="',start);end=ghtml.indexOf('"',start+5);ghtml=ghtml.substr(0,
start+5)+ghtml.substr(start+5);start=ghtml.indexOf('onload="adjustImagePosition')}newWin.document.writeln(ghtml);newWin.document.writeln("</form></body></HTML>");if(chrome||firefox)newWin.document.close();else newWin.location.reload()}function Range(startRow,startCol,endRow,endCol){var r1=Math.min(startRow,endRow);var r2=Math.max(startRow,endRow);var c1=Math.min(startCol,endCol);var c2=Math.max(startCol,endCol);this.startRow=r1;this.startCol=c1;this.endRow=r2;this.endCol=c2}
Range.prototype.contains=function(row,col){return this.startRow<=row&&this.endRow>=row&&this.startCol<=col&&this.endCol>=col};Range.prototype.getRows=function(){return this.endRow-this.startRow+1};Range.prototype.getCols=function(){return this.endCol-this.startCol+1};Range.prototype.toString=function(){return this.startRow+","+this.startCol+","+this.endRow+","+this.endCol};
function Selections(grid){this.list=new Array;this.g=grid;this.ac=null;this.renderAC=function(range){if(this.ac!=this.g.ActiveCell){if(this.ac!=null){this.ac.style.backgroundColor=this.ac.orgBgColor;this.ac.style.color=this.ac.orgColor;this.ac.removeAttribute("orgBgColor");this.ac.removeAttribute("orgColor");var coord=this.ac.id.substring(this.g.id.length+1,this.ac.id.length);var coords=coord.split("#");var r=Number(coords[1]);var c=Number(coords[0]);if(range!=null&&range.contains(r,c)){if(this.ac.orgBgColor==
null){this.ac.orgBgColor=this.ac.currentStyle.backgroundColor;this.ac.setAttribute("orgBgColor",this.ac.orgBgColor)}if(this.ac.orgColor==null){this.ac.orgColor=this.ac.currentStyle.color;this.ac.setAttribute("orgColor",this.ac.orgColor)}this.ac.style.backgroundColor=this.g.scbcolor;this.ac.style.color=this.g.sccolor}for(var i=r;i<=r+this.ac.rowSpan-1;i++)for(var j=c;j<=c+this.ac.colSpan-1;j++)this.recoverHeader(i,j)}this.ac=this.g.ActiveCell;if(this.ac!=null){if(this.ac.orgBgColor==null){this.ac.orgBgColor=
this.ac.currentStyle.backgroundColor;this.ac.setAttribute("orgBgColor",this.ac.orgBgColor)}if(this.ac.orgColor==null){this.ac.orgColor=this.ac.currentStyle.color;this.ac.setAttribute("orgColor",this.ac.orgColor)}this.ac.style.backgroundColor=this.g.acbcolor;this.ac.style.color=this.g.accolor}}};this.renderRange=function(range){for(var r=range.startRow;r<=range.endRow;r++)for(var c=range.startCol;c<=range.endCol;c++){var o=this.g.getLocateCell(r,c);if(this.ac!=o&&o!=null){if(o.orgBgColor==null){o.orgBgColor=
o.currentStyle.backgroundColor;o.setAttribute("orgBgColor",o.orgBgColor)}if(o.orgColor==null){o.orgColor=o.currentStyle.color;o.setAttribute("orgColor",o.orgColor)}o.style.backgroundColor=this.g.scbcolor;o.style.color=this.g.sccolor}}};this.recoverCell=function(o,r,c){o.style.backgroundColor=o.orgBgColor;o.style.color=o.orgColor;if(o.orgBgColor==null){o.style.backgroundColor=o.getAttribute("orgBgColor");o.style.color=o.getAttribute("orgColor")}o.removeAttribute("orgBgColor");o.removeAttribute("orgColor");
this.recoverHeader(r,c)};this.recoverRange=function(range){if(range!=null)for(var r=range.startRow;r<=range.endRow;r++)for(var c=range.startCol;c<=range.endCol;c++){var o=this.g.getLocateCell(r,c);if(this.ac!=o&&o!=null)this.recoverCell(o,r,c)}};this.forceRecoverRange=function(range){if(range!=null)for(var r=range.startRow;r<=range.endRow;r++)for(var c=range.startCol;c<=range.endCol;c++){var o=this.g.getLocateCell(r,c);if(o!=null)this.recoverCell(o,r,c)}};this.renderRanges=function(){for(var i=0;i<
this.list.length;i++)this.renderRange(this.list[i])};this.renderHeader=function(row,col){var hd=document.getElementById(this.g.id+"_!"+col);if(hd!=null){if(hd.orgColor==null)hd.orgColor=hd.style.color;if(hd.orgBgColor==null)hd.orgBgColor=hd.style.backgroundColor;hd.style.color=this.g.ahcolor;hd.style.backgroundColor=this.g.ahbcolor}hd=document.getElementById(this.g.id+"_@"+row);if(hd!=null){if(hd.orgColor==null)hd.orgColor=hd.style.color;if(hd.orgBgColor==null)hd.orgBgColor=hd.style.backgroundColor;
hd.style.color=this.g.ahcolor;hd.style.backgroundColor=this.g.ahbcolor}};this.recoverHeader=function(row,col){var hd=document.getElementById(this.g.id+"_!"+col);if(hd!=null){hd.style.color=hd.orgColor;hd.style.backgroundColor=hd.orgBgColor;hd.removeAttribute("orgColor");hd.removeAttribute("orgBgColor")}var hd=document.getElementById(this.g.id+"_@"+row);if(hd!=null){hd.style.color=hd.orgColor;hd.style.backgroundColor=hd.orgBgColor;hd.removeAttribute("orgColor");hd.removeAttribute("orgBgColor")}};this.renderHeaders=
function(){for(var i=0;i<this.list.length;i++){var range=this.list[i];for(var r=range.startRow;r<=range.endRow;r++)for(var c=range.startCol;c<=range.endCol;c++)this.renderHeader(r,c)}};this.getRange=function(o1,o2){var r1=Number(o1.id.substring(o1.id.indexOf("#")+1,o1.id.length));var c1=Number(o1.id.substring(this.g.id.length+1,o1.id.indexOf("#")));var r1s=r1+o1.rowSpan-1;var c1s=c1+o1.colSpan-1;var r2=Number(o2.id.substring(o2.id.indexOf("#")+1,o2.id.length));var c2=Number(o2.id.substring(this.g.id.length+
1,o2.id.indexOf("#")));var r2s=r2+o2.rowSpan-1;var c2s=c2+o2.colSpan-1;if(selectcolheader)if(shiftclick)return new Range(Math.min(r1,r2),Math.min(lastselcolnumber-1,actualcolnumber-1),Math.max(r1s,r2s),Math.max(lastselcolnumber-1,actualcolnumber-1));else return new Range(Math.min(r1,r2),actualcolnumber-1,Math.max(r1s,r2s),actualcolnumber-1);else if(selectrowheader)if(shiftclick)return new Range(Math.min(lastselrownumber-1,actualrownumber-1),Math.min(c1,c2),Math.max(lastselrownumber-1,actualrownumber-
1),Math.max(c1s,c2s));else return new Range(actualrownumber-1,Math.min(c1,c2),actualrownumber-1,Math.max(c1s,c2s));else return new Range(Math.min(r1,r2),Math.min(c1,c2),Math.max(r1s,r2s),Math.max(c1s,c2s))};this.add=function(o){var row=Number(o.id.substring(o.id.indexOf("#")+1,o.id.length));var col=Number(o.id.substring(this.g.id.length+1,o.id.indexOf("#")));var range=new Range(row,col,row+o.rowSpan-1,col+o.colSpan-1);var prev=this.last();this.list.push(range);this.renderAC(prev);this.renderRanges();
this.renderHeaders()};this.addRange=function(o1,o2){var prev=this.last();var range=this.getRange(o1,o2);this.list.push(range);this.renderAC(prev);this.renderRanges();this.renderHeaders()};this.updateRange=function(o1,o2){var latest=this.list.pop();this.recoverRange(latest);var range=this.getRange(o1,o2);this.list.push(range);this.renderAC(latest);this.renderRanges();this.renderHeaders()};this.last=function(){var length=this.list.length;if(length>0)return this.list[length-1];else return null};this.clear=
function(){while(this.list.length>0){var latest=this.list.pop();this.recoverRange(latest)}};this.forceclear=function(){while(this.list.length>0){var latest=this.list.pop();this.forceRecoverRange(latest)}};this.contains=function(o){var row=Number(o.id.substring(o.id.indexOf("#")+1,o.id.length));var col=Number(o.id.substring(this.g.id.length+1,o.id.indexOf("#")));for(var i=0;i<this.list.length;i++){var range=this.list[i];if(range.contains(row,col))return true}return false}}
function nextnode(node,root){if(node.firstChild)return node.firstChild;if(node.nextSibling)return node.nextSibling;if(node===root)return null;while(node.parentNode){node=node.parentNode;if(node==root)return null;if(node.nextSibling)return node.nextSibling}return null}
function moveBoundary(rng,n,bStart,el){if(n<=0)return;var node=rng[bStart?"startContainer":"endContainer"];if(node.nodeType==3)n+=rng[bStart?"startOffset":"endOffset"];while(node){if(node.nodeType==3)if(n<=node.nodeValue.length){rng[bStart?"setStart":"setEnd"](node,n);if(n==node.nodeValue.length){for(var next=nextnode(node,el);next&&next.nodeType==3&&next.nodeValue.length==0;next=nextnode(next,el))rng[bStart?"setStartAfter":"setEndAfter"](next);if(next&&next.nodeType==1&&next.nodeName=="BR")rng[bStart?
"setStartAfter":"setEndAfter"](next)}return}else{rng[bStart?"setStartAfter":"setEndAfter"](node);n-=node.nodeValue.length}node=nextnode(node,el)}}
function sendkeys(el,text){var ret=new Object;ret._el=el;ret._bounds=[0,ret._el["text"].length];var rng=document.createRange();rng.selectNodeContents(ret._el);rng.deleteContents();rng.insertNode(document.createTextNode(text));ret._el.normalize();ret._bounds=[ret._bounds[0]+text.length,ret._bounds[0]+text.length];window.getSelection().removeAllRanges();var bounds=[Math.max(0,Math.min(ret._el["text"].length,ret._bounds[0])),Math.max(0,Math.min(ret._el["text"].length,ret._bounds[1]))];moveBoundary(rng,
bounds[0],true,ret._el);rng.collapse(true);moveBoundary(rng,bounds[1]-bounds[0],false,ret._el);window.getSelection().addRange(rng)}function adjustEditorWidthForAll(){var len=gridwebinstance.keys.length;for(var i=0;i<len;i++){var k=gridwebinstance.keys[i];if(gridwebinstance.data[k].editorbox!=null)gridwebinstance.data[k].adjustEditorWidth()}}
function adjustEditorWidth(){if(this.editorbox!=null){var toppanelwidth=this.topPanel.offsetWidth;var lefttoppanelwidth=this.leftTopPanel.offsetWidth;this.editorcellname.style.width=lefttoppanelwidth+"px";var topleftfreezepanel=document.getElementById(this.id+"_topPanel0");if(topleftfreezepanel!=null)toppanelwidth+=topleftfreezepanel.offsetWidth;this.editorbox.style.width=lefttoppanelwidth+toppanelwidth+"px"}}
function adjustTableCellSpanHeightForAll(){var len=gridwebinstance.keys.length;for(var i=0;i<len;i++){var k=gridwebinstance.keys[i];gridwebinstance.data[k].adjustTableCellSpanHeight()}firstgrid.hideloadingbox()}
function adjustTableCellSpanHeight(){adjustTableCellSpanHeightBasic(this.ltable1,this);if(this.freeze)adjustTableCellSpanHeightBasic(this.ltable0,this);adjustTableCellSpanHeightBasic(this.viewTable,this);adjustTableCellSpanHeightBasic(this.viewTable00,this);adjustTableCellSpanHeightBasic(this.viewTable01,this);adjustTableCellSpanHeightBasic(this.viewTable10,this)}
function adjustTableCellSpanHeightBasic(table,who){if(table!=null)for(var i=0,row;row=table.rows[i];i++)for(var j=0,col;col=row.cells[j];j++){adjustSpanCell(row,col);if(col.rowSpan!=null&&col.rowSpan>1)recordRowSpanArrayMap(table.id,i,col,who)}}function getfirstViewRow(table,height){if(table!=null)for(var i=0,row,total=0;row=table.rows[i];i++){total+=row.offsetHeight;if(total>=height)return i}return 0}
function getfirstViewCol(table,width){var nodes;if(ie&&iemv<9)nodes=table.firstChild.children;else nodes=table.firstElementChild.children;if(table!=null)for(var i=0,total=0;i<nodes.length;i++){var node_width=nodes[i].style.width;total=add_px_or_pt(total,node_width);if(total>=width)return i}return 0}
function add_px_or_pt(a_px_value,b_px_or_pt_value){if(b_px_or_pt_value.indexOf("pt")>0)b_px_or_pt_value=(parseInt(b_px_or_pt_value.replace("pt",""))-1)*4/3;else b_px_or_pt_value=parseInt(b_px_or_pt_value.replace("px",""));return a_px_value+b_px_or_pt_value}function getCellsArray(){var ret=new Array;var i=0;i=getCellsFromTable(this.viewTable,ret,i);i=getCellsFromTable(this.viewTable00,ret,i);i=getCellsFromTable(this.viewTable01,ret,i);i=getCellsFromTable(this.viewTable10,ret,i);return ret}
function getCellsFromTable(table,array,count){if(table!=null)for(var i=0,row;row=table.rows[i];i++)for(var j=0,col;col=row.cells[j];j++)array[count++]=col;return count}function getCellsFromTabletest(table,array,count){for(var i=0;i<10;i++)array[count++]=i+"hello";return count}
function switchFormulaDisplay(){this.isshowformula=!this.isshowformula;switchFormulaDisplayBasic(this.ltable1,this);if(this.freeze)switchFormulaDisplayBasic(this.ltable0,this);switchFormulaDisplayBasic(this.viewTable,this);switchFormulaDisplayBasic(this.viewTable00,this);switchFormulaDisplayBasic(this.viewTable01,this);switchFormulaDisplayBasic(this.viewTable10,this)}
function switchFormulaDisplayBasic(table,who){if(table!=null)if(who.isshowformula)for(var i=0,row;row=table.rows[i];i++)for(var j=0,col;col=row.cells[j];j++)switchFormulaSpanCell(row,col);else for(var i=0,row;row=table.rows[i];i++)for(var j=0,col;col=row.cells[j];j++)switchFormulaSpanCellBack(row,col)}
function recordRowSpanArrayMap(tableid,rowid,col,who){var key=tableid+(rowid+col.rowSpan-1);var spanArray=who.rowSpanMap.get(key);if(spanArray==null){spanArray=new Array;spanArray[0]=col;who.rowSpanMap.put(key,spanArray)}else spanArray[spanArray.length]=col}
function adjustSpanCell(row,col){var span=col.firstChild;if(span.style.height!=null){var spanActualHeight=0;if(!chrome&&col.innerText.length>0||chrome&&col.text.length>0){if(ie&&iemv<9){span.style.cssText=span.style.cssText.replace(/(height[^;]+;)|(height[^;]+)/ig,"");span.style.whiteSpace="normal"}else span.style.removeProperty("height");var actheight=acwfontsize_map.get(col.className);if(actheight!=null)spanActualHeight=actheight;else{spanActualHeight=span.offsetHeight;acwfontsize_map.put(col.className,
spanActualHeight)}}else{spanActualHeight=span.style.height;if(spanActualHeight.indexOf("pt")>0)spanActualHeight=(parseInt(spanActualHeight.replace("pt",""))-1)*4/3;else spanActualHeight=parseInt(spanActualHeight.replace("px",""))}var headHeight_px=0;var myrow=row;var myrowheight=0;for(var k=0;k<col.rowSpan;k++){if(myrow.style.height.indexOf("pt")>0)myrowheight=(parseInt(myrow.style.height.replace("pt",""))-1)*4/3;else myrowheight=parseInt(myrow.style.height.replace("px",""));headHeight_px=headHeight_px+
myrowheight;myrow=myrow.nextSibling}if(spanActualHeight>headHeight_px)span.style.height=headHeight_px-1+"px"}}function switchFormulaSpanCell(row,col){var myformula=col.getAttribute("formula");if(myformula!=null){var span=col.firstChild;col.setAttribute("resultValue",span.innerText);setInnerText(span,col.getAttribute("formula"))}}
function switchFormulaSpanCellBack(row,col){var myformula=col.getAttribute("formula");if(myformula!=null){var span=col.firstChild;setInnerText(span,col.getAttribute("resultValue"))}}
function adjustSpanCellFromBottom(row,col){var span=col.firstChild;if(ie&&iemv<9){span.style.height="";span.style.cssText=span.style.cssText.replace(/(height[^;]+;)|(height[^;]+)/ig,"");span.style.whiteSpace="normal"}else span.style.removeProperty("height");var spanActualHeight=span.offsetHeight;var headHeight_px=0;var myrow=row;var myrowheight=0;for(var k=0;k<col.rowSpan;k++){if(myrow.style.height.indexOf("pt")>0)myrowheight=(parseInt(myrow.style.height.replace("pt",""))-1)*4/3;else myrowheight=
parseInt(myrow.style.height.replace("px",""));headHeight_px=headHeight_px+myrowheight;myrow=myrow.previousSibling}if(spanActualHeight>headHeight_px)span.style.height=headHeight_px-1+"px"}function adjustRowSpanCellByRow(tableid,row,who){var key=tableid+row.rowIndex;var spanArray=who.rowSpanMap.get(key);if(spanArray!=null)for(var i=0;i<spanArray.length;i++)adjustSpanCellFromBottom(row,spanArray[i])}function ltabremove(str){return str.LTrim()}
String.prototype.Trim=function(){var str=this.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--)if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break}return str};String.prototype.LTrim=function(){return this.replace(/(^\s*)/g,"")};String.prototype.RTrim=function(){return this.replace(/(\s*$)/g,"")};String.prototype.ESCAPE=function(){return this.replace(/\$/g,"&#36;").replace(/</g,"&#60;").replace(/>/g,"&#62;")};
String.prototype.ESCAPE_BACK=function(){return this.replace(/&#36;/g,"$").replace(/&#60;/g,"<").replace(/&#62;/g,">")};String.prototype.endsWith=function(searchString,position){position=position||this.length;position=position-searchString.length;if(position<0)return false;return this.lastIndexOf(searchString)===position};
String.prototype.startWith=function(str){if(str==null||str==""||this.length==0||str.length>this.length)return false;if(this.substr(0,str.length)==str)return true;else return false;return true};
function Map(){this.keys=[];this.data={};this.put=function(key,value){if(this.data[key]==null)this.keys.push(key);this.data[key]=value};this.get=function(key){return this.data[key]};this.getByIndex=function(i){if(i>=0&&i<this.keys.length)return this.get(this.keys[i]);return null};this.contain=function(key){var value=this.data[key];if(value)return true;else return false};this.remove=function(key){for(var index=0;index<this.keys.length;index++)if(this.keys[index]==key){this.keys.splice(index,1);break}this.data[key]=
null};this.each=function(fn){if(typeof fn!="function")return;var len=this.keys.length;for(var i=0;i<len;i++){var k=this.keys[i];fn(k,this.data[k],i)}};this.entrys=function(){var len=this.keys.length;var entrys=new Array(len);for(var i=0;i<len;i++){var k=this.keys[i];entrys[i]={key:k,value:this.data[k]}}return entrys};this.isEmpty=function(){return this.keys.length==0};this.size=function(){return this.keys.length};this.toString=function(){var s="{";for(var i=0;i<this.keys.length;i++,s+=","){var k=
this.keys[i];s+=k+"="+this.data[k]}s+="}";return s}};function acwcalendar(calendar){this.gaMonthNames=new Array(new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),new Array("January","February","March","April","May","June","July","August","September","October","November","December"));this.gaDayNames=new Array(new Array("S","M","T","W","T","F","S"),new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"),new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"));this.gaMonthDays=new Array(31,29,31,
30,31,30,31,31,30,31,30,31);this.StyleInfo=null;this.gaDayCell=new Array;this.goDayTitleRow=null;this.goYearSelect=null;this.goMonthSelect=null;this.goCurrentDayCell=null;this.giStartDayIndex=0;this.giDay=null;this.giMonth=null;this.giYear=null;this.giMonthLength=1;this.giDayLength=1;this.giFirstDay=0;this.gsGridCellEffect="raised";this.gsGridLinesColor="black";this.gbShowDateSelectors=true;this.gbShowDays=true;this.gbShowTitle=true;this.gbShowHorizontalGrid=true;this.gbShowVerticalGrid=true;this.gbValueIsNull=
false;this.gbReadOnly=false;this.giMinYear=1900;this.giMaxYear=2099;this.element=calendar;calendar.handler=this;this.fnGetPropertyDefaults=fnGetPropertyDefaults;this.fnCheckLeapYear=fnCheckLeapYear;this.fnLoadCSSDefault=fnLoadCSSDefault;this.fnCreateCalendarHTML=fnCreateCalendarHTML;this.fnUpdateTitle=fnUpdateTitle;this.fnUpdateDayTitles=fnUpdateDayTitles;this.fnMonthSelectOnChange=fnMonthSelectOnChange;this.fnBuildMonthSelect=fnBuildMonthSelect;this.fnYearSelectOnChange=fnYearSelectOnChange;this.fnFireOnPropertyChange=
fnFireOnPropertyChange;this.fnUpdateMonthSelect=fnUpdateMonthSelect;this.fnUpdateYearSelect=fnUpdateYearSelect;this.fnSetDate=fnSetDate;this.fnBuildYearSelect=fnBuildYearSelect;this.fnFillInCells=fnFillInCells;this.fnGetDay=fnGetDay;this.fnPutDay=fnPutDay;this.fnGetMonth=fnGetMonth;this.fnPutMonth=fnPutMonth;this.fnGetYear=fnGetYear;this.fnPutYear=fnPutYear;this.fnOnClick=fnOnClick;calendar.onclick=function(e){calendar.handler.fnOnClick(e)};this.fnGetPropertyDefaults();this.fnCreateCalendarHTML();
this.fnUpdateTitle();this.fnUpdateDayTitles();this.fnBuildMonthSelect();this.fnBuildYearSelect();this.fnFillInCells()}
function fnGetPropertyDefaults(){var x;var oDate=new Date;this.giDay=oDate.getDate();this.giMonth=oDate.getMonth()+1;this.giYear=oDate.getYear();if(this.giYear<200)this.giYear+=1900;if(this.element.year){if(!isNaN(parseInt(this.element.year)))this.giYear=parseInt(this.element.year);if(this.giYear<this.giMinYear)this.giYear=this.giMinYear;if(this.giYear>this.giMaxYear)this.giYear=this.giMaxYear}this.fnCheckLeapYear(this.giYear);if(this.element.month){if(!isNaN(parseInt(this.element.month)))this.giMonth=
parseInt(this.element.month);if(this.giMonth<1)this.giMonth=1;if(this.giMonth>12)this.giMonth=12}if(this.element.day){if(!isNaN(parseInt(this.element.day)))this.giDay=parseInt(this.element.day);if(this.giDay<1)this.giDay=1;if(this.giDay>this.gaMonthDays[this.giMonth-1])this.giDay=this.gaMonthDays[this.giMonth-1]}if(this.element.monthLength)switch(this.element.monthLength.toLowerCase()){case "short":this.giMonthLength=0;break;case "long":this.giMonthLength=1;break}if(this.element.dayLength)switch(this.element.dayLength.toLowerCase()){case "short":this.giDayLength=
0;break;case "medium":this.giDayLength=1;break;case "long":this.giDayLength=1;break}if(this.element.firstDay)if(this.element.firstDay>=0&&this.element.firstDay<=6)this.giFirstDay=element.firstDay;if(this.element.gridCellEffect)switch(this.element.gridCellEffect.toLowerCase()){case "raised":this.giGridCellEffect="raised";break;case "flat":this.giGridCellEffect="flat";break;case "sunken":this.giGridCellEffect="sunken";break}if(this.element.gridLinesColor)this.gsGridLinesColor=element.gridLinesColor;
if(this.element.showDateSelectors)this.gbShowDateSelectors=this.element.showDateSelectors?true:false;if(this.element.showDays)this.gbShowDays=this.element.showDays?true:false;if(this.element.showTitle)this.gbShowTitle=this.element.showTitle?true:false;if(this.element.showHorizontalGrid)this.gbShowHorizontalGrid=this.element.showHorizontalGrid?true:false;if(this.element.showVerticalGrid)this.gbShowVerticalGrid=this.element.showVerticalGrid?true:false;if(this.element.valueIsNull)this.gbValueIsNull=
this.element.valueIsNull?true:false;if(this.element.name)this.gsName=element.name;if(this.element.readOnly)this.gbReadOnly=this.element.readOnly?true:false}function fnCheckLeapYear(iYear){this.gaMonthDays[1]=!(iYear%4)&&iYear%100||!(iYear%400)?29:28}function fnLoadCSSDefault(sCSSProp,sScriptProp,oStyleRule,sStyleRuleProp){if(this.element.style[sCSSProp])oStyleRule[sStyleRuleProp]=this.element.style[sCSSProp];this.element.style[sScriptProp]=oStyleRule[sStyleRuleProp]}
function fnCreateCalendarHTML(){var row,cell;this.element.innerHTML="<table border=0 class=WholeCalendar> "+" <tr> "+" <td class=TitleCalendar></td> "+" <td class=DateControls> "+" <nobr> <select></select> "+" <select></select> </nobr> </td> "+" </tr> "+" <tr> <td colspan=3> "+" <table class=CalendarTable cellspacing=0 border=0> "+" <tr><td class=DayTitleCalendar></td>"+
" <td class=DayTitleCalendar></td>"+" <td class=DayTitleCalendar></td>"+" <td class=DayTitleCalendar></td>"+" <td class=DayTitleCalendar></td>"+" <td class=DayTitleCalendar></td>"+" <td class=DayTitleCalendar></td></tr>"+" <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"+" <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"+" <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"+
" <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"+" <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"+" <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"+" </table> "+" </tr> "+"</table> ";this.goDayTitleRow=this.element.children[0].rows[1].cells[0].children[0].rows[0];this.goMonthSelect=this.element.children[0].rows[0].cells[1].children[0].children[0];this.goYearSelect=this.element.children[0].rows[0].cells[1].children[0].children[1];
for(row=1;row<7;row++)for(cell=0;cell<7;cell++)this.gaDayCell[(row-1)*7+cell]=this.element.children[0].rows[1].cells[0].children[0].rows[row].cells[cell]}function fnUpdateTitle(){var oTitleCell=this.element.children[0].rows[0].cells[0];if(this.gbShowTitle)oTitleCell.innerHTML=this.gaMonthNames[this.giMonthLength][this.giMonth-1]+" "+this.giYear;else oTitleCell.innerText=" "}
function fnUpdateDayTitles(){var dayTitleRow=this.element.children[0].rows[1].cells[0].children[0].rows[0];var iCell=0;for(i=this.giFirstDay;i<7;i++)this.goDayTitleRow.cells[iCell++].innerText=this.gaDayNames[this.giDayLength][i];for(i=0;i<this.giFirstDay;i++)this.goDayTitleRow.cells[iCell++].innerText=this.gaDayNames[this.giDayLength][i]}
function fnBuildMonthSelect(){var newMonthSelect;newMonthSelect=document.createElement("SELECT");this.goMonthSelect.parentNode.replaceChild(newMonthSelect,this.goMonthSelect);this.goMonthSelect=newMonthSelect;for(i=0;i<12;i++){e=document.createElement("OPTION");e.text=this.gaMonthNames[this.giMonthLength][i];this.goMonthSelect.options.add(e)}this.goMonthSelect.options[this.giMonth-1].selected=true;var handler=this;this.goMonthSelect.onchange=function(){handler.fnMonthSelectOnChange()}}
function fnMonthSelectOnChange(){iMonth=this.goMonthSelect.selectedIndex+1;this.fnSetDate(this.giDay,iMonth,this.giYear)}
function fnSetDate(iDay,iMonth,iYear){var bValueChange=false;if(this.gbValueIsNull){this.gbValueIsNull=false;this.fnFireOnPropertyChange("propertyName","valueIsNull")}if(iYear<this.giMinYear)iYear=this.giMinYear;if(iYear>this.giMaxYear)iYear=this.giMaxYear;if(this.giYear!=iYear)this.fnCheckLeapYear(iYear);if(iMonth<1)iMonth=1;if(iMonth>12)iMonth=12;if(iDay<1)iDay=1;if(iDay>this.gaMonthDays[this.giMonth-1])iDay=this.gaMonthDays[this.giMonth-1];if(this.giDay==iDay&&this.giMonth==iMonth&&this.giYear==
iYear){this.fnFireOnPropertyChange("propertyName","day");return}else bValueChange=true;if(this.giDay!=iDay){this.giDay=iDay;this.fnFireOnPropertyChange("propertyName","day")}if(this.giYear==iYear&&this.giMonth==iMonth){this.goCurrentDayCell.className="DayCalendar";this.goCurrentDayCell=this.gaDayCell[this.giStartDayIndex+iDay-1];this.goCurrentDayCell.className="DaySelectedCalendar";this.giDay=iDay}else{if(this.giYear!=iYear){this.giYear=iYear;this.fnFireOnPropertyChange("propertyName","year");this.fnUpdateYearSelect()}if(this.giMonth!=
iMonth){this.giMonth=iMonth;this.fnFireOnPropertyChange("propertyName","month");this.fnUpdateMonthSelect()}this.fnUpdateTitle();this.fnFillInCells()}if(bValueChange)this.fnFireOnPropertyChange("propertyName","value")}
function fnBuildYearSelect(){var newYearSelect;newYearSelect=document.createElement("SELECT");this.goYearSelect.parentNode.replaceChild(newYearSelect,this.goYearSelect);this.goYearSelect=newYearSelect;for(i=this.giMinYear;i<=this.giMaxYear;i++){e=document.createElement("OPTION");e.text=i;this.goYearSelect.options.add(e)}this.goYearSelect.options[this.giYear-this.giMinYear].selected=true;var handler=this;this.goYearSelect.onchange=function(){handler.fnYearSelectOnChange()}}
function fnYearSelectOnChange(){iYear=this.goYearSelect.selectedIndex+this.giMinYear;this.fnSetDate(this.giDay,this.giMonth,iYear)}
function fnFillInCells(){var iDayCell=0;var iLastMonthIndex,iNextMonthIndex;var iLastMonthTotalDays;var iStartDay;this.fnCheckLeapYear(this.giYear);iLastMonthDays=this.gaMonthDays[(this.giMonth-1==0?12:this.giMonth-1)-1];iNextMonthDays=this.gaMonthDays[(this.giMonth+1==13?1:this.giMonth+1)-1];iLastMonthYear=this.giMonth==1?this.giYear-1:this.giYear;iLastMonth=this.giMonth==1?12:this.giMonth-1;iNextMonthYear=this.giMonth==12?this.giYear+1:this.giYear;iNextMonth=this.giMonth==12?1:this.giMonth+1;var oDate=
new Date(this.giYear,this.giMonth-1,1);iStartDay=oDate.getDay()-this.giFirstDay;if(iStartDay<1)iStartDay+=7;iStartDay=iLastMonthDays-iStartDay+1;for(i=iStartDay;i<=iLastMonthDays;i++,iDayCell++){this.gaDayCell[iDayCell].innerText=i;if(this.gaDayCell[iDayCell].className!="OffDayCalendar")this.gaDayCell[iDayCell].className="OffDayCalendar";this.gaDayCell[iDayCell].day=i;this.gaDayCell[iDayCell].month=iLastMonth;this.gaDayCell[iDayCell].year=iLastMonthYear}this.giStartDayIndex=iDayCell;for(i=1;i<=this.gaMonthDays[this.giMonth-
1];i++,iDayCell++){this.gaDayCell[iDayCell].innerText=i;if(this.giDay==i){this.goCurrentDayCell=this.gaDayCell[iDayCell];this.gaDayCell[iDayCell].className="DaySelectedCalendar"}else if(this.gaDayCell[iDayCell].className!="DayCalendar")this.gaDayCell[iDayCell].className="DayCalendar";this.gaDayCell[iDayCell].day=i;this.gaDayCell[iDayCell].month=this.giMonth;this.gaDayCell[iDayCell].year=this.giYear}for(i=1;iDayCell<42;i++,iDayCell++){this.gaDayCell[iDayCell].innerText=i;if(this.gaDayCell[iDayCell].className!=
"OffDayCalendar")this.gaDayCell[iDayCell].className="OffDayCalendar";this.gaDayCell[iDayCell].day=i;this.gaDayCell[iDayCell].month=iNextMonth;this.gaDayCell[iDayCell].year=iNextMonthYear}}
function fnFireOnPropertyChange(name,value){if(document.createEventObject){var evt=document.createEventObject();evt.setAttribute(name,value);this.element.fireEvent("onpropertychange",evt)}else{var evt=document.createEvent("HTMLEvents");evt.initEvent("onpropertychange",true,true);eval("evt."+name+' = "'+value+'";');this.element.dispatchEvent(evt)}}function fnUpdateMonthSelect(){this.goMonthSelect.options[this.giMonth-1].selected=true}
function fnUpdateYearSelect(){this.goYearSelect.options[this.giYear-this.giMinYear].selected=true}function fnOnClick(e){var evt=new Event(e);var t=evt.getTarget();if(t.tagName=="TD"){if(this.gbReadOnly||!t.day)return;if(t.year<this.giMinYear||t.year>this.giMaxYear)return;this.fnSetDate(t.day,t.month,t.year)}}function fnGetDay(){return this.gbValueIsNull?null:this.giDay}function fnPutDay(iDay){iDay=parseInt(iDay);if(isNaN(iDay))throw 450;this.fnSetDate(iDay,this.giMonth,this.giYear)}
function fnGetMonth(){return this.gbValueIsNull?null:this.giMonth}function fnPutMonth(iMonth){iMonth=parseInt(iMonth);if(isNaN(iMonth))throw 450;this.fnSetDate(this.giDay,iMonth,this.giYear)}function fnGetYear(){return this.gbValueIsNull?null:this.giYear}function fnPutYear(iYear){iYear=parseInt(iYear);if(isNaN(iYear))throw 450;this.fnSetDate(this.giDay,this.giMonth,iYear)};function acwmenu(menu){this.menu=menu;menu.menuContext=this;menu.isShown=false;menu.ismultiple=false;menu.init=menuinit;menu.show=show;menu.showNS=showNS;menu.showXY=showXY;menu.hide=hide;menu.clear=clear;menu.addItem=addItem;menu.addSeparator=addSeparator;menu.addOKCancel=addOKCancel;menu.doAcwMenuOkClick=doAcwMenuOkClick;menu.doAcwMenuCheckByValue=doAcwMenuCheckByValue;menu.doAcwMenuCancelClick=doAcwMenuCancelClick;menu.doAcwMenuAllClick=doAcwMenuAllClick;menu.checkIFUnsectedAll=checkIFUnsectedAll;
menu.checkIFhasUnselected=checkIFhasUnselected;menu.hideTopSeparator=hideTopSeparator;menu.loadItems=loadItems;menu.loadItemFromServerString=loadItemFromServerString;menu.getMenuItemUpdateValue=getMenuItemUpdateValue;menu.filterItemsByValue=filterItemsByValue;menu.setItemVisibility=setItemVisibility;menu.adjustHeight=adjustHeight;menu.onItemClick=null;menu.onShow=null;menu.onmouseover=m_onmouseover;menu.onmouseout=m_onmouseout;menu.onclick=m_onclick;menu.oncontextmenu=function(){return false};menu.gridContext=
null;menu.currIndex=-1;menu.table=null;menu.tbody=null;if(getattr(menu,"xhtmlmode")=="1")menu.sBody=document.body;else menu.sBody=document.documentElement;menu.init()}
function menuinit(){var xml=document.createElement("XML");this.appendChild(xml);this.xmlData=getXMLDocument(xml);this.className="menu_body";this.table=document.createElement("TABLE");this.table.border=0;this.table.cellSpacing=0;this.appendChild(this.table);this.tbody=document.createElement("TBODY");this.table.appendChild(this.tbody)}
function show(e){if(this.tbody.childNodes.length>0){var evt=new Event(e);var body=this.sBody;if(this.parentNode!=document.body){document.body.appendChild(this);if(!this.id.endsWith("_new")){var bodymenu=document.getElementById(this.id+"_new");if(bodymenu!=null)document.body.removeChild(bodymenu);this.id=this.id+"_new"}}this.isShown=true;this.style.display="block";if(ie){this.style.left=document.documentElement.scrollLeft+body.scrollLeft+evt.e.clientX+"px";this.style.top=document.documentElement.scrollTop+
body.scrollTop+evt.e.clientY+"px"}else{this.style.left=body.scrollLeft+evt.e.clientX+"px";this.style.top=body.scrollTop+evt.e.clientY+"px"}if(ie){if(this.offsetLeft+this.table.offsetWidth>document.documentElement.scrollLeft+body.scrollLeft+body.clientWidth)this.style.left=document.documentElement.scrollLeft+body.scrollLeft+body.clientWidth-this.table.offsetWidth+"px"}else if(this.offsetLeft+this.table.offsetWidth>body.scrollLeft+body.clientWidth)this.style.left=body.scrollLeft+body.clientWidth-this.table.offsetWidth+
"px";if(this.offsetLeft<0)this.style.left="0px";if(ie){if(this.offsetTop+this.table.offsetHeight>document.documentElement.scrollTop+body.scrollTop+body.clientHeight)this.style.top=document.documentElement.scrollTop+body.scrollTop+body.clientHeight-this.table.offsetHeight+"px"}else if(this.offsetTop+this.table.offsetHeight>body.scrollTop+body.clientHeight)this.style.top=body.scrollTop+body.clientHeight-this.table.offsetHeight+"px";if(this.offsetTop<0)this.style.top="0px";if(this.onShow)this.onShow()}}
function showNS(e){if(this.tbody.childNodes.length>0){var body=this.sBody;if(this.parentNode!=document.body){document.body.appendChild(this);if(!this.id.endsWith("_new")){var bodymenu=document.getElementById(this.id+"_new");if(bodymenu!=null)document.body.removeChild(bodymenu);this.id=this.id+"_new"}}var evt=new Event(e);var cx=evt.e.clientX;var cy=evt.e.clientY;if(cx==null){var pos=getClient(e.target);cx=pos.cx;cy=pos.cy}else{cx+=body.scrollLeft;cy+=body.scrollTop}if(ie){cx+=document.documentElement.scrollLeft;
cy+=document.documentElement.scrollTop}this.isShown=true;this.style.display="none";this.style.left="0px";this.style.width="";if(cx>0)this.style.display="block";var activecell=this.menuContext;if(this.menuContext.filterCell!=null)activecell=this.menuContext.filterCell;var menuwidth=this.ismultiple?activecell.offsetWidth+10:activecell.offsetWidth;this.style.left=cx+"px";this.style.top=cy+"px";if(this.ismultiple){if(menuwidth<100)menuwidth=100;this.style.width=menuwidth+"px"}else if(menuwidth>2)this.style.width=
menuwidth-2+"px";else this.style.width=menuwidth+"px"}}
function showXY(x,y,griddiv){if(this.tbody.childNodes.length>0){var body=this.sBody;if(this.parentNode!=document.body){document.body.appendChild(this);if(!this.id.endsWith("_new")){var bodymenu=document.getElementById(this.id+"_new");if(bodymenu!=null)document.body.removeChild(bodymenu);this.id=this.id+"_new"}}this.isShown=true;if(x>0)this.style.display="block";this.style.left=x+"px";var menuheight=Number(this.style.height.replace("px",""));if(y+menuheight>griddiv.viewPanel.offsetHeight)this.style.top=
y-menuheight+"px";else this.style.top=y+"px"}if(this.onShow)this.onShow()}function hide(){this.isShown=false;this.style.display="none"}
function addItem(text,value){var tr=document.createElement("TR");this.tbody.appendChild(tr);var td=document.createElement("TD");if(ie)td.noWrap=true;td.unselectable="on";td.className="menu_out";if(!this.ismultiple)setInnerText(td,text);else{if(text.trim().length==0)text="(Blanks)";var description=document.createTextNode(text);var checkbox=document.createElement("input");var who=this;checkbox.type="checkbox";checkbox.name="slct[]";checkbox.value=value;checkbox.checked=true;checkbox.onclick=function(){who.checkIFUnsectedAll();
who.checkIFhasUnselected()};td.appendChild(checkbox);td.appendChild(description)}if(!firefox)td.itemValue=value;else td.setAttribute("itemValue",value);tr.appendChild(td);this.adjustHeight()}function setItemVisibility(itemValue,visibility){var items=this.getElementsByTagName("TD");for(var i=0;i<items.length;i++)if(items[i].itemValue!=null&&(items[i].itemValue==itemValue||items[i].itemValue=="CCMD:"+itemValue)){items[i].style.display=visibility;break}}
function addSeparator(){var tr=document.createElement("TR");this.tbody.appendChild(tr);var td=document.createElement("TD");tr.appendChild(td);td.unselectable="on";td.className="menu_separator";td.appendChild(document.createElement("HR"))}
function doAcwMenuOkClick(){var context=this.menuContext;var gridid=this.gridContext.id;if(context.id.indexOf(gridid+"_FTR")==0){var checkboxlist=this.getElementsByTagName("TD");var filtercmd="FILTER:"+context.id.substring(gridid.length+4,context.id.length);if(checkboxlist[0].childNodes[0].checked)this.gridContext.postBack(filtercmd+":"+"-1",false);else{for(var i=1;i<checkboxlist.length;i++)if(checkboxlist[i].className=="menu_out"){var checkboxitem=checkboxlist[i].childNodes[0];if(checkboxitem.checked)filtercmd+=
":"+checkboxitem.value}this.gridContext.postBack(filtercmd,false)}}else if(context.id.indexOf(gridid+"_PFT")==0){var checkboxlist=this.getElementsByTagName("TD");var filtercmd="PIVOTFILTER:"+context.getAttribute("fieldtype")+":"+context.getAttribute("fieldindex")+":"+context.getAttribute("pivottableid");if(checkboxlist[0].childNodes[0].checked)this.gridContext.postBack(filtercmd+":"+"-1",false);else{for(var i=1;i<checkboxlist.length;i++)if(checkboxlist[i].className=="menu_out"){var checkboxitem=checkboxlist[i].childNodes[0];
if(checkboxitem.checked)filtercmd+=":"+checkboxitem.value}this.gridContext.postBack(filtercmd,false)}}}function doAcwMenuCancelClick(){this.hide()}function checkIFUnsectedAll(){var checkboxlist=this.getElementsByTagName("TD");var hasuncheck=false;for(var i=1;i<checkboxlist.length;i++)if(checkboxlist[i].className=="menu_out"){var checkboxitem=checkboxlist[i].childNodes[0];if(checkboxitem.checked){this.okbutton.disabled=false;return true}}this.okbutton.disabled=true;return false}
function checkIFhasUnselected(){var checkboxlist=this.getElementsByTagName("TD");for(var i=1;i<checkboxlist.length;i++)if(checkboxlist[i].className=="menu_out"){var checkboxitem=checkboxlist[i].childNodes[0];if(!checkboxitem.checked){checkboxlist[0].childNodes[0].checked=false;return true}}checkboxlist[0].childNodes[0].checked=true;return false}
function doAcwMenuAllClick(checkedvalue){var checkboxlist=this.getElementsByTagName("TD");for(var i=1;i<checkboxlist.length;i++)if(checkboxlist[i].className=="menu_out"){var checkboxitem=checkboxlist[i].childNodes[0];checkboxitem.checked=checkedvalue}this.okbutton.disabled=!checkedvalue}
function doAcwMenuCheckByValue(valuelist){if(valuelist==null)return;var checkboxlist=this.getElementsByTagName("TD");var checkboxall=checkboxlist[0];checkboxall=checkboxall.childNodes[0];checkboxall.checked=false;for(var i=1;i<checkboxlist.length;i++)if(checkboxlist[i].className=="menu_out"){var checkboxitem=checkboxlist[i].childNodes[0];if(valuelist.indexOf(","+checkboxitem.value+",")>=0)checkboxitem.checked=true;else checkboxitem.checked=false}}
function addOKCancel(){if(!this.ismultiple)return;this.addSeparator();var who=this;var tr=document.createElement("TR");this.tbody.appendChild(tr);var td=document.createElement("TD");tr.appendChild(td);td.unselectable="on";td.className="menu_separator";var button=document.createElement("input");button.type="button";button.value="ok";button.style.paddingRight="10px";button.style.marginRight="10px";button.onclick=function(){who.doAcwMenuOkClick()};td.appendChild(button);this.okbutton=button;button=document.createElement("input");
button.type="button";button.value="cancel";button.onclick=function(){who.doAcwMenuCancelClick()};td.appendChild(button);var checkboxall=this.getElementsByTagName("TD")[0];checkboxall=checkboxall.childNodes[0];checkboxall.onclick=function(){who.doAcwMenuAllClick(checkboxall.checked)}}function hideTopSeparator(){var tr=this.tbody.childNodes[0];if(tr.childNodes[0].className=="menu_separator")tr.parentNode.removeChild(tr)}
function loadItems(xmlStr){xmlStr=xmlStr.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&apos;/g,"'");this.xmlData.loadXML(xmlStr);var items=this.xmlData.selectNodes("MENU/ITEM");for(var i=0;i<items.length;i++){var item=items[i];var text=item.getAttribute("TEXT");var value=item.getAttribute("VALUE");if(text==null||text=="")this.addSeparator();else{text=text.ESCAPE_BACK();if(value!=null)value=value.ESCAPE_BACK();else value=text;this.addItem(text,value)}}this.adjustHeight()}
function loadItemFromServerString(s){var arr=s.split("'],['");for(var i=0;i<arr.length;i++){var text=arr[i];var value=text;if(text==null||text=="")this.addSeparator();else{text=text.ESCAPE_BACK();this.addItem(text,value)}}this.adjustHeight()}
function getMenuItemUpdateValue(xmlStr,which,text,value){xmlStr=xmlStr.replace(/&lt;/g,"<").replace(/&gt;/g,">");this.xmlData.loadXML(xmlStr);var items=this.xmlData.selectNodes("MENU/ITEM");items[which].setAttribute("TEXT",text.ESCAPE());if(value!=null)items[which].setAttribute("VALUE",value.ESCAPE());else items[which].setAttribute("VALUE",text.ESCAPE());if(!ie){var tmp=document.createElement("helloMENU");for(var i=0;i<items.length;i++)tmp.appendChild(items[i]);return"<MENU>"+tmp.innerHTML+"</MENU>"}else{var ret=
"<MENU>";for(var i=0;i<items.length;i++)ret+=items[i].xml;return ret+"</MENU>"}}
function filterItemsByValue(currentCellValue,xmlStr){xmlStr=xmlStr.replace(/&lt;/g,"<").replace(/&gt;/g,">");this.xmlData.loadXML(xmlStr);var items=this.xmlData.selectNodes("MENU/ITEM");for(var i=0;i<items.length;i++){var item=items[i];var text=item.getAttribute("TEXT");if(text==null||text=="")this.addSeparator();else if(text.toUpperCase().indexOf(currentCellValue.toUpperCase())>=0)this.addItem(text,item.getAttribute("VALUE"))}this.adjustHeight()}
function clear(){var l=this.tbody.childNodes.length;for(var i=0;i<l;i++)this.tbody.removeChild(this.tbody.childNodes[0]);this.currIndex=-1}function m_onmouseover(e){var evt=new Event(e);var o=evt.getTarget();if(o.tagName=="TD"&&o.innerText!="")o.className="menu_over"}function m_onmouseout(e){var evt=new Event(e);var o=evt.getTarget();if(o.tagName=="TD"&&o.innerText!="")o.className="menu_out"}
function m_onclick(e){var evt=new Event(e);var o=evt.getTarget();if(o.tagName=="TD"&&o.innerText!=""){var itemValue=null;if(!firefox)itemValue=o.itemValue;else itemValue=o.getAttribute("itemValue");if(itemValue==null)itemValue=o.innerText;o.className="menu_out";if(!this.ismultiple){this.hide();if(this.onItemClick)this.onItemClick(itemValue,this.id,this.menuContext)}else o.childNodes[0].click()}}
function adjustHeight(){if(this.tbody.childNodes.length<=22){this.style.height="";this.style.overflowY="hidden"}else{this.style.height=105+"px";this.style.overflowY="scroll"}};(function(){function Cache(maxSize,debug,storage){this.maxSize_=maxSize||-1;this.debug_=debug||false;this.storage_=storage||new Cache.BasicCacheStorage;this.fillFactor_=0.75;this.stats_={};this.stats_["hits"]=0;this.stats_["misses"]=0;this.log_("Initialized cache with size "+maxSize)}Cache.Priority={LOW:1,NORMAL:2,HIGH:4};Cache.BasicCacheStorage=function(){this.items_={};this.count_=0};Cache.BasicCacheStorage.prototype.get=function(key){return this.items_[key]};Cache.BasicCacheStorage.prototype.set=
function(key,value){if(typeof this.get(key)==="undefined")this.count_++;this.items_[key]=value};Cache.BasicCacheStorage.prototype.size=function(key,value){return this.count_};Cache.BasicCacheStorage.prototype.remove=function(key){var item=this.get(key);if(typeof item!=="undefined")this.count_--;delete this.items_[key];return item};Cache.BasicCacheStorage.prototype.keys=function(){var ret=[],p;for(p in this.items_)ret.push(p);return ret};Cache.LocalStorageCacheStorage=function(namespace){this.prefix_=
"cache-storage."+(namespace||"default")+".";var escapedPrefix=this.prefix_.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");this.regexp_=new RegExp("^"+escapedPrefix)};Cache.LocalStorageCacheStorage.prototype.get=function(key){var item=window.localStorage[this.prefix_+key];if(item)return JSON.parse(item);return null};Cache.LocalStorageCacheStorage.prototype.set=function(key,value){window.localStorage[this.prefix_+key]=JSON.stringify(value)};Cache.LocalStorageCacheStorage.prototype.size=function(key,value){return this.keys().length};
Cache.LocalStorageCacheStorage.prototype.remove=function(key){var item=this.get(key);delete window.localStorage[this.prefix_+key];return item};Cache.LocalStorageCacheStorage.prototype.keys=function(){var ret=[],p;for(p in window.localStorage)if(p.match(this.regexp_))ret.push(p.replace(this.prefix_,""));return ret};Cache.prototype.getItem=function(key){var item=this.storage_.get(key);if(item!=null)if(!this.isExpired_(item))item.lastAccessed=(new Date).getTime();else{this.removeItem(key);item=null}var returnVal=
item?item.value:null;if(returnVal){this.stats_["hits"]++;this.log_("Cache HIT for key "+key)}else{this.stats_["misses"]++;this.log_("Cache MISS for key "+key)}return returnVal};Cache._CacheItem=function(k,v,o){if(k==null)throw new Error("key cannot be null or empty");this.key=k;this.value=v;o=o||{};if(o.expirationAbsolute)o.expirationAbsolute=o.expirationAbsolute.getTime();if(!o.priority)o.priority=Cache.Priority.NORMAL;this.options=o;this.lastAccessed=(new Date).getTime()};Cache.prototype.setItem=
function(key,value,options){if(this.storage_.get(key)!=null)this.removeItem(key);this.addItem_(new Cache._CacheItem(key,value,options));this.log_("Setting key "+key);if(this.maxSize_>0&&this.size()>this.maxSize_){var that=this;setTimeout(function(){that.purge_.call(that)},0)}};Cache.prototype.clear=function(){var keys=this.storage_.keys();for(var i=0;i<keys.length;i++)this.removeItem(keys[i]);this.log_("Cache cleared")};Cache.prototype.getStats=function(){return this.stats_};Cache.prototype.toHtmlString=
function(){var returnStr=this.size()+" item(s) in cache<br /><ul>";var keys=this.storage_.keys();for(var i=0;i<keys.length;i++){var item=this.storage_.get(keys[i]);returnStr=returnStr+"<li>"+item.key.toString()+" = "+item.value.toString()+"</li>"}returnStr=returnStr+"</ul>";return returnStr};Cache.prototype.resize=function(newMaxSize){this.log_("Resizing Cache from "+this.maxSize_+" to "+newMaxSize);var oldMaxSize=this.maxSize_;this.maxSize_=newMaxSize;if(newMaxSize>0&&(oldMaxSize<0||newMaxSize<oldMaxSize))if(this.size()>
newMaxSize)this.purge_();this.log_("Resizing done")};Cache.prototype.purge_=function(){var tmparray=new Array;var purgeSize=Math.round(this.maxSize_*this.fillFactor_);if(this.maxSize_<0)purgeSize=this.size()*this.fillFactor_;var keys=this.storage_.keys();for(var i=0;i<keys.length;i++){var key=keys[i];var item=this.storage_.get(key);if(this.isExpired_(item))this.removeItem(key);else tmparray.push(item)}if(tmparray.length>purgeSize){tmparray=tmparray.sort(function(a,b){if(a.options.priority!=b.options.priority)return b.options.priority-
a.options.priority;else return b.lastAccessed-a.lastAccessed});while(tmparray.length>purgeSize){var ritem=tmparray.pop();this.removeItem(ritem.key)}}this.log_("Purged cached")};Cache.prototype.addItem_=function(item,attemptedAlready){var cache=this;try{this.storage_.set(item.key,item)}catch(err){if(attemptedAlready){this.log_("Failed setting again, giving up: "+err.toString());throw err;}this.log_("Error adding item, purging and trying again: "+err.toString());this.purge_();this.addItem_(item,true)}};
Cache.prototype.removeItem=function(key){var item=this.storage_.remove(key);this.log_("removed key "+key);if(item&&item.options&&item.options.callback)setTimeout(function(){item.options.callback.call(null,item.key,item.value)},0);return item?item.value:null};Cache.prototype.removeWhere=function(test){var keys=this.storage_.keys();for(var i=0;i<keys.length;i++){var key=keys[i];var item=this.storage_.get(key);if(test(key,item.value)===true)this.removeItem(key)}};Cache.prototype.size=function(){return this.storage_.size()};
Cache.prototype.isExpired_=function(item){var now=(new Date).getTime();var expired=false;if(item.options.expirationAbsolute&&item.options.expirationAbsolute<now)expired=true;if(!expired&&item.options.expirationSliding){var lastAccess=item.lastAccessed+item.options.expirationSliding*1E3;if(lastAccess<now)expired=true}return expired};Cache.prototype.log_=function(msg){if(this.debug_)console.log(msg)};var root=this;if(typeof module!=="undefined"&&module.exports)module.exports=Cache;else if(typeof define==
"function"&&define.amd)define(function(){return Cache});else root.Cache=Cache})();var ASYNC_CACHE_SIZE=500;function put_row_data_in_cache(is_asyncgrouprows,gridid,curcolstart,haveanyupdate){var data=getCurrentDataContentForCache(gridid,is_asyncgrouprows);for(var i=0;i<data.length;i++)put_row_data_in_cache_act(is_asyncgrouprows,data[i],curcolstart,haveanyupdate)}
function put_row_data_in_cache_act(is_asyncgrouprows,data,curcolstart,haveanyupdate){var curminrow=data.startv;var curmaxv=data.maxv;var needAdjustPreAfterForAsyncgrouprow=true;if(data.size!=32&&!is_asyncgrouprows);var cur_row_cache_index_array=col_row_cache_index[curcolstart];if(cur_row_cache_index_array==null){col_row_cache_index[curcolstart]=new Cache(ASYNC_CACHE_SIZE);cur_row_cache_index_array=col_row_cache_index[curcolstart];cur_row_cache_index_array.setItem(curminrow,data)}else{var item=cur_row_cache_index_array.getItem(curminrow);
if(!is_asyncgrouprows){if(haveanyupdate&&item!=null&&item.maxv==data.maxv){cur_row_cache_index_array.setItem(curminrow,data);return}var ret=find_pre_next_incache(is_asyncgrouprows,cur_row_cache_index_array,curminrow,curmaxv,true);if(ret.inside!=null)cur_row_cache_index_array.setItem(curminrow,data);else if(ret.cover!=null){if(haveanyupdate)updateDataCacheContent(cur_row_cache_index_array.getItem(ret.cover),data,curminrow,curmaxv)}else if(ret.pre==null&&ret.after==null)cur_row_cache_index_array.setItem(curminrow,
data);else{if(ret.pre!=null)if(haveanyupdate)updateDataCacheContent(cur_row_cache_index_array.getItem(ret.pre),data,curminrow,ret.premaxv);if(ret.after!=null)if(haveanyupdate)updateDataCacheContent(cur_row_cache_index_array.getItem(ret.after),data,ret.after,curmaxv);if(!(ret.pre!=null&&ret.after!=null&&ret.premaxv+1>=ret.after))cur_row_cache_index_array.setItem(curminrow,data)}}else if(haveanyupdate){var item=cur_row_cache_index_array.getItem(curminrow);if(item!=null&&item.maxv>curmaxv){updateDataCacheContent(item,
data,curminrow,curmaxv);return}else cur_row_cache_index_array.setItem(curminrow,data)}}if(is_asyncgrouprows){var ret=find_pre_next_incache(is_asyncgrouprows,cur_row_cache_index_array,curminrow,curmaxv,true);if(ret.outside!=null){var outsideData=cur_row_cache_index_array.getItem(ret.outside);updateDataCacheContent(outsideData,data,curminrow,curmaxv);cur_row_cache_index_array.removeItem(curminrow)}if(ret.pre!=null&&ret.after!=null){var preData=cur_row_cache_index_array.getItem(ret.pre);preData=getDataCacheContent(preData,
ret.pre,curminrow-1);var afterData=cur_row_cache_index_array.getItem(ret.after);var newdata=null;if(curmaxv+1<afterData.maxv){afterData=getDataCacheContent(afterData,curmaxv+1,afterData.maxv);newdata=combineDataCacheContent(preData,data,afterData)}else newdata=combineDataCacheContent(preData,data);cur_row_cache_index_array.removeItem(curminrow);cur_row_cache_index_array.removeItem(ret.after);cur_row_cache_index_array.setItem(ret.pre,newdata)}else{if(ret.pre!=null){var preData=cur_row_cache_index_array.getItem(ret.pre);
preData=getDataCacheContent(preData,ret.pre,curminrow-1);var newdata=combineDataCacheContent(preData,data);cur_row_cache_index_array.removeItem(curminrow);cur_row_cache_index_array.setItem(ret.pre,newdata)}if(ret.after!=null){var afterData=cur_row_cache_index_array.getItem(ret.after);var newdata=null;if(curmaxv+1<afterData.maxv){afterData=getDataCacheContent(afterData,curmaxv+1,afterData.maxv);var newdata=combineDataCacheContent(data,afterData);cur_row_cache_index_array.setItem(curminrow,newdata)}else;
cur_row_cache_index_array.removeItem(ret.after)}}if(ret.insideArr!=null)for(var id=0;id<ret.insideArr.length;id++)cur_row_cache_index_array.removeItem(ret.insideArr[id].start)}}
function tryfindcachePrepare(){if(this.async&&enableasynccache){var amaxrow=this.amaxrow;var aminrow=this.aminrow;var is_asyncgrouprows=this.row_v_info!=null;if(this.viewTable00!=null)if(aminrow<=this.freezerow-1)aminrow=this.freezerow;var cur_row_cache_index_array=col_row_cache_index[this.amincol];var data=cur_row_cache_index_array.getItem(aminrow);if(!is_asyncgrouprows){if(data!=null)if(data.maxv==amaxrow){this.refreshdataview(data);return false}else if(data.maxv>amaxrow){data=getDataCacheContent(data,
aminrow,amaxrow);this.refreshdataview(data);return false}else if(data.maxv<amaxrow);var ret=find_pre_next_incache(is_asyncgrouprows,cur_row_cache_index_array,aminrow,amaxrow,false);if(ret.pre!=null){this.webstartrow=ret.premaxv+1;asyncbeforepostpredata=getDataCacheContent(cur_row_cache_index_array.getItem(ret.pre),aminrow,ret.premaxv)}else{this.webstartrow=null;asyncbeforepostpredata=null}if(ret.after!=null){this.webendrow=ret.after-1;if(ret.pre!=null&&this.webstartrow>this.webendrow){var afterdata=
getDataCacheContent(cur_row_cache_index_array.getItem(ret.after),this.webstartrow,amaxrow);var data=combineDataCacheContent(asyncbeforepostpredata,afterdata);this.refreshdataview(data);return false}asyncbeforepostafterdata=getDataCacheContent(cur_row_cache_index_array.getItem(ret.after),ret.after,amaxrow);if(ret.pre!=null){var ret2=find_pre_next_incache(is_asyncgrouprows,cur_row_cache_index_array,this.webstartrow,this.webendrow,false);if(ret2.pre!=null)if(ret2.premaxv>=this.webendrow){var mid1=getDataCacheContent(cur_row_cache_index_array.getItem(ret2.pre),
this.webstartrow,this.webendrow);var data=combineDataCacheContent(asyncbeforepostpredata,mid1,asyncbeforepostafterdata);this.refreshdataview(data);return false}else if(ret2.after!=null&&ret2.premaxv+1>=ret2.after){var mid1=getDataCacheContent(cur_row_cache_index_array.getItem(ret2.pre),this.webstartrow,ret2.premaxv);var mid2=getDataCacheContent(cur_row_cache_index_array.getItem(ret2.after),ret2.premaxv+1,this.webendrow);var data=combineDataCacheContent(asyncbeforepostpredata,mid1,mid2,asyncbeforepostafterdata);
this.refreshdataview(data);return false}else if(ret2.after==null){var prenext=getDataCacheContent(cur_row_cache_index_array.getItem(ret2.pre),this.webstartrow,ret2.premaxv);this.webstartrow=ret2.premaxv+1;asyncbeforepostpredata=combineDataCacheContent(asyncbeforepostpredata,prenext)}}}else{this.webendrow=null;asyncbeforepostafterdata=null}return true}else if(data!=null)if(data.maxv>=amaxrow){data=getDataCacheContent(data,aminrow,amaxrow);this.refreshdataview(data);return false}else{var ret=find_pre_next_incache(is_asyncgrouprows,
cur_row_cache_index_array,aminrow,amaxrow,false);if(ret.after!=null)if(ret.after==data.maxv+1){var afterdata=getDataCacheContent(cur_row_cache_index_array.getItem(ret.after),ret.after,amaxrow);data=combineDataCacheContent(data,afterdata);this.refreshdataview(data);return false}else{this.webendrow=ret.after-1;asyncbeforepostafterdata=getDataCacheContent(cur_row_cache_index_array.getItem(ret.after),ret.after,amaxrow)}this.webstartrow=data.maxv+1;asyncbeforepostpredata=data}else{var ret=find_pre_next_incache(is_asyncgrouprows,
cur_row_cache_index_array,aminrow,amaxrow,false);if(ret.outside!=null){data=cur_row_cache_index_array.getItem(ret.outside);data=getDataCacheContent(data,aminrow,amaxrow);this.refreshdataview(data);return false}if(ret.pre!=null&&ret.after!=null)if(cur_row_cache_index_array.getItem(ret.pre).maxv+1==ret.after){var predata=cur_row_cache_index_array.getItem(ret.pre);predata=getDataCacheContent(predata,aminrow,predata.maxv);var afterdata=cur_row_cache_index_array.getItem(ret.after);afterdata=getDataCacheContent(afterdata,
ret.after,amaxrow);data=combineDataCacheContent(predata,afterdata);this.refreshdataview(data);return false}else;if(ret.pre!=null){this.webstartrow=ret.premaxv+1;asyncbeforepostpredata=getDataCacheContent(cur_row_cache_index_array.getItem(ret.pre),aminrow,ret.premaxv)}else{this.webstartrow=null;asyncbeforepostpredata=null}if(ret.after!=null){this.webendrow=ret.after-1;asyncbeforepostafterdata=getDataCacheContent(cur_row_cache_index_array.getItem(ret.after),ret.after,amaxrow)}else{this.webendrow=null;
asyncbeforepostafterdata=null}}}return true}function getLastIndexFromPostion(str,find,postion){var result=false;for(var i=postion-find.length;i>0;i--){result=true;for(var j=0;j<find.length;j++)if(find[j]!=str[i+j]){result=false;break}if(result)return i}return-1}function getindexfromid(str){var i=str.lastIndexOf("]");return Number(str.substring(i+1))}
function parseRespWebHTML(id,resp,stylestr,needrenderviewtable10){var ret={};ret.stylestr=stylestr;var headpatternstart='<table id="'+id+'_leftTab"';var headstart=resp.indexOf(headpatternstart);var tmp=resp.substring(headstart);headpatternstart='<tr id="'+id+"_[h_row]";headstart=tmp.indexOf(headpatternstart);var tmp=tmp.substring(headstart);var headend=tmp.indexOf("</table>");ret.headstr=tmp.substring(0,headend);tmp=tmp.substring(headend);var contentpatternstart10='<table id="'+id+'_viewTable10"';
var contentstart10=tmp.indexOf(contentpatternstart10);if(contentstart10!=-1&&needrenderviewtable10){tmp=tmp.substring(contentstart10);if(this.freezecol>0)contentstart10=tmp.indexOf('<tr id="'+id+"_[d_row]");else contentstart10=tmp.indexOf('<tr id="'+id+"_[f_row]");tmp=tmp.substring(contentstart10);var contentend10=tmp.indexOf("</table>");ret.contentstr10=tmp.substring(0,contentend10)}var contentpatternstart='<table id="'+id+'_viewTable"';var contentstart=tmp.indexOf(contentpatternstart);var tmp=tmp.substring(contentstart);
if(this.freezecol>0){var freezestart='id="'+id+"_"+this.freezecol+"#";contentstart=tmp.indexOf(freezestart);contentstart=getLastIndexFromPostion(tmp,"<tr",contentstart)}else contentstart=tmp.indexOf('<tr id="'+id+"_[d_row]");tmp=tmp.substring(contentstart);var contentend=tmp.indexOf("</table>");ret.contentstr=tmp.substring(0,contentend);return ret}
var DataCacheContent={createNew:function(c){var cat={};cat.gridwebid=c;cat.init=function(){var headcontent=document.getElementById(cat.gridwebid+"_leftTab").children[1];if(headcontent.children[0]==null)console.log("error happend");cat.startv=getindexfromid(headcontent.children[0].id);cat.size=headcontent.children.length;cat.maxv=cat.startv+cat.size-1;if(!ie)cat.stylestr=document.getElementById("Style"+cat.gridwebid).innerHTML;else cat.stylestr=getStyleSheetObject(cat.gridwebid).cssText;cat.headstr=
headcontent.innerHTML;cat.contentstr=document.getElementById(cat.gridwebid+"_viewTable").children[1].innerHTML;var vt10=document.getElementById(cat.gridwebid+"_viewTable10");if(vt10!=null&&vt10.children.length>1)cat.contentstr10=vt10.children[1].innerHTML};cat.getContent=function(start,end){var ret={};ret.getContent=this.getContent;ret.updateContent=this.updateContent;ret.gridwebid=this.gridwebid;ret.startv=start;ret.maxv=end;ret.size=end-start+1;ret.stylestr=this.stylestr;var headpatternstart='<tr id="'+
this.gridwebid+"_[h_row]"+start+'"';var headpatternend='<tr id="'+this.gridwebid+"_[h_row]"+(end+1)+'"';var contentpatternstart='<tr id="'+this.gridwebid+"_[d_row]"+start+'"';var contentpatternend='<tr id="'+this.gridwebid+"_[d_row]"+(end+1)+'"';var contentpatternstart10=contentpatternstart;var contentpatternend10=contentpatternend;var gridwebinstance=document.getElementById(this.gridwebid);if(gridwebinstance.freeze)if(gridwebinstance.freezecol>0){var freezecolnumber=gridwebinstance.freezecol;contentpatternstart=
'id="'+this.gridwebid+"_"+freezecolnumber+"#"+start+'"';contentpatternend='id="'+this.gridwebid+"_"+freezecolnumber+"#"+(end+1)+'"'}else{contentpatternstart10='<tr id="'+this.gridwebid+"_[f_row]"+start+'"';contentpatternend10='<tr id="'+this.gridwebid+"_[f_row]"+(end+1)+'"'}var from=-1;var from2=-1;var from10=-1;if(start==this.startv){from=0;from2=0;from10=0}else{from=this.headstr.indexOf(headpatternstart);from2=this.contentstr.indexOf(contentpatternstart);if(this.contentstr10!=null)from10=this.contentstr10.indexOf(contentpatternstart10)}if(from2>
0&&gridwebinstance.freezecol>0)from2=getLastIndexFromPostion(this.contentstr,"<tr",from2);var to=-1;var to2=-1;var to10=-1;if(end==this.maxv){ret.headstr=this.headstr.substring(from);if(this.contentstr10!=null)ret.contentstr10=this.contentstr10.substring(from10);ret.contentstr=this.contentstr.substring(from2)}else{to=this.headstr.indexOf(headpatternend);to2=this.contentstr.indexOf(contentpatternend);ret.headstr=this.headstr.substring(from,to);if(this.contentstr10!=null){to10=this.contentstr10.indexOf(contentpatternend10);
ret.contentstr10=this.contentstr10.substring(from10,to10);if(to2>0&&gridwebinstance.freezecol>0)to2=getLastIndexFromPostion(this.contentstr,"<tr",to2)}ret.contentstr=this.contentstr.substring(from2,to2)}ret.stylestr=this.stylestr;return ret};cat.updateContent=function(updated,start,end){var updateret=updated.getContent(start,end);var headpatternstart='<tr id="'+this.gridwebid+"_[h_row]"+start+'"';var headpatternend='<tr id="'+this.gridwebid+"_[h_row]"+(end+1)+'"';var contentpatternstart='<tr id="'+
this.gridwebid+"_[d_row]"+start+'"';var contentpatternend='<tr id="'+this.gridwebid+"_[d_row]"+(end+1)+'"';var contentpatternstart10=contentpatternstart;var contentpatternend10=contentpatternend;var from=-1;var from2=-1;var prestr="";var prestr2="";var from10=-1;var prestr10="";var gridwebinstance=document.getElementById(this.gridwebid);if(gridwebinstance.freeze)if(gridwebinstance.freezecol>0){var freezecolnumber=gridwebinstance.freezecol;contentpatternstart='id="'+this.gridwebid+"_"+freezecolnumber+
"#"+start+'"';contentpatternend='id="'+this.gridwebid+"_"+freezecolnumber+"#"+(end+1)+'"'}else{contentpatternstart10='<tr id="'+this.gridwebid+"_[f_row]"+start+'"';contentpatternend10='<tr id="'+this.gridwebid+"_[f_row]"+(end+1)+'"'}if(start!=this.startv){from=this.headstr.indexOf(headpatternstart);from2=this.contentstr.indexOf(contentpatternstart);prestr=this.headstr.substring(0,from);if(this.contentstr10!=null){from10=this.contentstr10.indexOf(contentpatternstart10);prestr10=this.contentstr10.substring(0,
from10);if(from2>0&&gridwebinstance.freezecol>0)from2=getLastIndexFromPostion(this.contentstr,"<tr",from2)}prestr2=this.contentstr.substring(0,from2)}var to=-1;var to2=-1;var endstr="";var endstr2="";var to10=-1;var endstr10="";if(end!=this.maxv){to=this.headstr.indexOf(headpatternend);to2=this.contentstr.indexOf(contentpatternend);endstr=this.headstr.substring(to);if(this.contentstr10!=null){to10=this.contentstr10.indexOf(contentpatternend10);endstr10=this.contentstr10.substring(to10);if(to2>0&&
gridwebinstance.freezecol>0)to2=getLastIndexFromPostion(this.contentstr,"<tr",to2)}endstr2=this.contentstr.substring(to2)}this.headstr=prestr+updateret.headstr+endstr;this.contentstr=prestr2+updateret.contentstr+endstr2;this.stylestr=mergestyle(this.stylestr,updated.stylestr);if(this.contentstr10!=null)this.contentstr10=prestr10+updateret.contentstr10+endstr10};cat.toString=function(){return"cache item startv:"+this.startv+",maxv:"+this.maxv+""};cat.init();return cat}};
function getCurrentDataContentForCache(gridwebid,is_asyncgrouprows){var ret=new Array;var d=DataCacheContent.createNew(gridwebid);if(is_asyncgrouprows)ret[0]=d;else{var len=Math.floor(d.size/PERROWNUMBER);for(var i=0;i<len;i++)ret[i]=d.getContent(d.startv+i*PERROWNUMBER,d.startv+i*PERROWNUMBER+PERROWNUMBER-1)}return ret}function getDataCacheContent(data,start,end){return data.getContent(start,end)}function updateDataCacheContent(data,updated,start,end){data.updateContent(updated,start,end)}
function setAsCacheItem(newdata,olditem,start,max){newdata.startv=start;newdata.maxv=max;newdata.size=max-start+1;newdata.getContent=olditem.getContent;newdata.updateContent=olditem.updateContent;newdata.toString=olditem.toString;newdata.gridwebid=olditem.gridwebid}
function combineDataCacheContent(data1,data2,data3,data4){var ret={};ret.headstr=data1.headstr+data2.headstr;ret.contentstr=data1.contentstr+data2.contentstr;ret.stylestr=mergestyle(data1.stylestr,data2.stylestr);setAsCacheItem(ret,data1,data1.startv,data2.maxv);if(data1.contentstr10!=null)ret.contentstr10=data1.contentstr10+data2.contentstr10;if(data3!=null){ret.headstr+=data3.headstr;ret.contentstr+=data3.contentstr;ret.stylestr=mergestyle(ret.stylestr,data3.stylestr);if(data1.contentstr10!=null)ret.contentstr10+=
data3.contentstr10;ret.maxv=data3.maxv;ret.size=ret.maxv-ret.startv+1}if(data4!=null){ret.headstr+=data4.headstr;ret.contentstr+=data4.contentstr;ret.stylestr=mergestyle(ret.stylestr,data4.stylestr);if(data1.contentstr10!=null)ret.contentstr10+=data4.contentstr10;ret.maxv=data4.maxv;ret.size=ret.maxv-ret.startv+1}return ret}function getlasttrinfo(s){var index=s.lastIndexOf("<tr");return s.substring(index,index+160)}
function gettridinfo(s){var index=s.indexOf("]");s=s.substring(index,index+10);index=s.indexOf('"');s=s.substring(1,index);return Number(s)}function mergestyle(s1,s2){var s1arr=[];var rules=s1.split("}");for(i=0;i<rules.length;i++){var rule=rules[i].split("{");if(rule.length==2)s1arr.push(rule[0])}var rules2=s2.split("}");for(i=0;i<rules2.length;i++){var rule2=rules2[i].split("{");if(rule2.length==2)if(!findinarray(s1arr,rule2[0]))s1+=rule2[0]+"{"+rule2[1]+"}"}return s1}
function findinarray(arr,content){for(var i=0;i<arr.length;i++)if(arr[i]==content)return true;return false}
function find_pre_next_incache(is_asyncgrouprows,cache,curindex,curmaxv,canadjustcache){var k=cache.storage_.keys();var ret={};if(!is_asyncgrouprows){ret.cover=null;ret.inside=null;var pre=-1;var after=-1;var predif=-1;var afterdif=-1;var hasclosepre=false;var hascloseafter=false;for(var i=0;i<k.length;i++){var item=cache.getItem(k[i]);var itemboundary=item.maxv;if(k[i]==curmaxv+1)hascloseafter=true;if(itemboundary+1==curindex)hasclosepre=true;if(k[i]<=curindex&&itemboundary>=curindex){var dif=curindex-
k[i];if(dif>predif){predif=dif;pre=i}}if(k[i]<=curmaxv&&curmaxv<=itemboundary){var dif=itemboundary-curmaxv;if(dif>afterdif){afterdif=dif;after=i}}if(canadjustcache)if(k[i]<=curindex&&curmaxv<=itemboundary){ret.cover=k[i];ret.maxv=itemboundary;return ret}else if(k[i]>=curindex&&curmaxv>=itemboundary){ret.inside=k[i];ret.maxv=itemboundary;cache.removeItem(k[i]);return ret}}if(pre==-1)ret.pre=null;else{ret.pre=k[pre];ret.premaxv=cache.getItem(ret.pre).maxv}if(after==-1)ret.after=null;else{ret.after=
k[after];ret.aftermaxv=cache.getItem(ret.after).maxv}if(canadjustcache){if(hasclosepre)ret.pre=null;if(hascloseafter)ret.after=null;if(pre!=-1||after!=-1)for(var i=0;i<k.length;i++){var item=cache.getItem(k[i]);var itemboundary=item.maxv;if(pre!=-1)if(k[i]<curindex&&itemboundary>curindex)if(i!=pre||hasclosepre)cache.removeItem(k[i]);if(after!=-1)if(k[i]<curmaxv&&curmaxv<itemboundary)if(i!=after||hascloseafter)cache.removeItem(k[i])}}}else{var pre=-1;var after=-1;var insideindex=0;var insideArr=[];
var iteminside={};for(var i=0;i<k.length;i++){var item=cache.getItem(k[i]);var itemboundary=item.maxv;if(k[i]==curindex&&itemboundary==curmaxv)continue;if(k[i]<=curindex&&itemboundary>=curmaxv){ret.outside=Number(k[i]);return ret}if(k[i]>curindex&&itemboundary<=curmaxv){iteminside.start=Number(k[i]);iteminside.maxv=cache.getItem(k[i]).maxv;insideArr[insideindex++]=iteminside}if(k[i]<=curindex&&itemboundary>=curindex){ret.pre=Number(k[i]);ret.premaxv=cache.getItem(ret.pre).maxv}if(k[i]<=curmaxv&&curmaxv<
itemboundary||k[i]>curindex&&curmaxv==itemboundary){ret.after=Number(k[i]);ret.aftermaxv=cache.getItem(ret.after).maxv}}if(insideArr.length>0)ret.insideArr=insideArr}return ret}
function prca(col){var cache=col_row_cache_index[col];if(cache==null){console.log("can't find cache with colindex:"+col);return}var k=cache.storage_.keys();var s="*****************cache info here:cache index is"+col+" ";for(var i=0;i<k.length;i++){var item=cache.getItem(k[i]);s+=",key "+k[i]+":"+item.startv+"->"+item.maxv+"("+item.size+")"}console.log(s)}function putorget(it){if(it)return"put cache ";else return" find in cache "};

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b1.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 15  |  Rozmiar: 847 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b2.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 15  |  Rozmiar: 851 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b3.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 15  |  Rozmiar: 857 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b4.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 15  |  Rozmiar: 856 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b5.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 15  |  Rozmiar: 851 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b6.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 15  |  Rozmiar: 856 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b7.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 15  |  Rozmiar: 863 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/b8.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 15  |  Rozmiar: 851 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/collapse.gif Wyświetl plik

Przed Po
Szerokość: 11  |  Wysokość: 11  |  Rozmiar: 873 B

+ 377
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/colordlg.htm Wyświetl plik

@@ -0,0 +1,377 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
</HEAD>
<script language="javascript">
function initDlg()
{
window.innerWidth = Table1.offsetWidth;
window.innerHeight = Table1.offsetHeight;
}
function selectcolor(ev)
{
if (ev.target.tagName == "TD")
{
window.opener.colorElement.style.backgroundColor = ev.target.bgColor;
window.opener.colorChanged();
window.close();
}
}
</script>
<BODY leftMargin="0" topMargin="0" onload="initDlg();">
<TABLE id="Table1" cellSpacing="0" cellPadding="0" bgColor="silver" border="1" style="font-size:9pt; cursor:pointer;" onclick="selectcolor(event);">
<TR>
<TD align="middle" bgcolor="#F0F8FF">aliceblue
</TD>
<TD align="middle" bgcolor="#FAEBD7">antiquewhite
</TD>
<TD align="middle" bgcolor="#00FFFF">aqua
</TD>
<TD align="middle" bgcolor="#7FFFD4">aquamarine
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#F0FFFF">azure
</TD>
<TD align="middle" bgcolor="#F5F5DC">beige
</TD>
<TD align="middle" bgcolor="#FFE4C4">bisque
</TD>
<TD align="middle" bgcolor="#000000">black
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FFEBCD">blanchedalmond
</TD>
<TD align="middle" bgcolor="#0000FF">blue
</TD>
<TD align="middle" bgcolor="#8A2BE2">blueviolet
</TD>
<TD align="middle" bgcolor="#A52A2A">brown
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#DEB887">burlywood
</TD>
<TD align="middle" bgcolor="#5F9EA0">cadetblue
</TD>
<TD align="middle" bgcolor="#7FFF00">chartreuse
</TD>
<TD align="middle" bgcolor="#D2691E">chocolate
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FF7F50">coral
</TD>
<TD align="middle" bgcolor="#6495ED">cornflowerblue
</TD>
<TD align="middle" bgcolor="#FFF8DC">cornsilk
</TD>
<TD align="middle" bgcolor="#DC143C">crimson
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#00FFFF">cyan
</TD>
<TD align="middle" bgcolor="#00008B">darkblue
</TD>
<TD align="middle" bgcolor="#008B8B">darkcyan
</TD>
<TD align="middle" bgcolor="#B8860B">darkgoldenrod
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#A9A9A9">darkgray
</TD>
<TD align="middle" bgcolor="#006400">darkgreen
</TD>
<TD align="middle" bgcolor="#BDB76B">darkkhaki
</TD>
<TD align="middle" bgcolor="#8B008B">darkmagenta
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#556B2F">darkolivegreen
</TD>
<TD align="middle" bgcolor="#FF8C00">darkorange
</TD>
<TD align="middle" bgcolor="#9932CC">darkorchid
</TD>
<TD align="middle" bgcolor="#8B0000">darkred
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#E9967A">darksalmon
</TD>
<TD align="middle" bgcolor="#8FBC8B">darkseagreen
</TD>
<TD align="middle" bgcolor="#483D8B">darkslateblue
</TD>
<TD align="middle" bgcolor="#2F4F4F">darkslategray
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#00CED1">darkturquoise
</TD>
<TD align="middle" bgcolor="#9400D3">darkviolet
</TD>
<TD align="middle" bgcolor="#FF1493">deeppink
</TD>
<TD align="middle" bgcolor="#00BFFF">deepskyblue
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#696969">dimgray
</TD>
<TD align="middle" bgcolor="#1E90FF">dodgerblue
</TD>
<TD align="middle" bgcolor="#B22222">firebrick
</TD>
<TD align="middle" bgcolor="#FFFAF0">floralwhite
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#228B22">forestgreen
</TD>
<TD align="middle" bgcolor="#FF00FF">fuchsia
</TD>
<TD align="middle" bgcolor="#DCDCDC">gainsboro
</TD>
<TD align="middle" bgcolor="#F8F8FF">ghostwhite
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FFD700">gold
</TD>
<TD align="middle" bgcolor="#DAA520">goldenrod
</TD>
<TD align="middle" bgcolor="#808080">gray
</TD>
<TD align="middle" bgcolor="#008000">green
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#ADFF2F">greenyellow
</TD>
<TD align="middle" bgcolor="#F0FFF0">honeydew
</TD>
<TD align="middle" bgcolor="#FF69B4">hotpink
</TD>
<TD align="middle" bgcolor="#CD5C5C">indianred
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#4B0082">indigo
</TD>
<TD align="middle" bgcolor="#FFFFF0">ivory
</TD>
<TD align="middle" bgcolor="#F0E68C">khaki
</TD>
<TD align="middle" bgcolor="#E6E6FA">lavender
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FFF0F5">lavenderblush
</TD>
<TD align="middle" bgcolor="#7CFC00">lawngreen
</TD>
<TD align="middle" bgcolor="#FFFACD">lemonchiffon
</TD>
<TD align="middle" bgcolor="#ADD8E6">lightblue
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#F08080">lightcoral
</TD>
<TD align="middle" bgcolor="#E0FFFF">lightcyan
</TD>
<TD align="middle" bgcolor="#FAFAD2">lightgoldenrodyellow
</TD>
<TD align="middle" bgcolor="#90EE90">lightgreen
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#D3D3D3">lightgrey
</TD>
<TD align="middle" bgcolor="#FFB6C1">lightpink
</TD>
<TD align="middle" bgcolor="#FFA07A">lightsalmon
</TD>
<TD align="middle" bgcolor="#20B2AA">lightseagreen
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#87CEFA">lightskyblue
</TD>
<TD align="middle" bgcolor="#778899">lightslategray
</TD>
<TD align="middle" bgcolor="#B0C4DE">lightsteelblue
</TD>
<TD align="middle" bgcolor="#FFFFE0">lightyellow
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#00FF00">lime
</TD>
<TD align="middle" bgcolor="#32CD32">limegreen
</TD>
<TD align="middle" bgcolor="#FAF0E6">linen
</TD>
<TD align="middle" bgcolor="#FF00FF">magenta
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#800000">maroon
</TD>
<TD align="middle" bgcolor="#66CDAA">mediumaquamarine
</TD>
<TD align="middle" bgcolor="#0000CD">mediumblue
</TD>
<TD align="middle" bgcolor="#BA55D3">mediumorchid
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#9370DB">mediumpurple
</TD>
<TD align="middle" bgcolor="#3CB371">mediumseagreen
</TD>
<TD align="middle" bgcolor="#7B68EE">mediumslateblue
</TD>
<TD align="middle" bgcolor="#00FA9A">mediumspringgreen
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#48D1CC">mediumturquoise
</TD>
<TD align="middle" bgcolor="#C71585">mediumvioletred
</TD>
<TD align="middle" bgcolor="#191970">midnightblue
</TD>
<TD align="middle" bgcolor="#F5FFFA">mintcream
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FFE4E1">mistyrose
</TD>
<TD align="middle" bgcolor="#FFE4B5">moccasin
</TD>
<TD align="middle" bgcolor="#FFDEAD">navajowhite
</TD>
<TD align="middle" bgcolor="#000080">navy
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FDF5E6">oldlace
</TD>
<TD align="middle" bgcolor="#808000">olive
</TD>
<TD align="middle" bgcolor="#6B8E23">olivedrab
</TD>
<TD align="middle" bgcolor="#FFA500">orange
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FF4500">orangered
</TD>
<TD align="middle" bgcolor="#DA70D6">orchid
</TD>
<TD align="middle" bgcolor="#EEE8AA">palegoldenrod
</TD>
<TD align="middle" bgcolor="#98FB98">palegreen
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#AFEEEE">paleturquoise
</TD>
<TD align="middle" bgcolor="#DB7093">palevioletred
</TD>
<TD align="middle" bgcolor="#FFEFD5">papayawhip
</TD>
<TD align="middle" bgcolor="#FFDAB9">peachpuff
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#CD853F">peru
</TD>
<TD align="middle" bgcolor="#FFC0CB">pink
</TD>
<TD align="middle" bgcolor="#DDA0DD">plum
</TD>
<TD align="middle" bgcolor="#B0E0E6">powderblue
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#800080">purple
</TD>
<TD align="middle" bgcolor="#FF0000">red
</TD>
<TD align="middle" bgcolor="#BC8F8F">rosybrown
</TD>
<TD align="middle" bgcolor="#4169E1">royalblue
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#8B4513">saddlebrown
</TD>
<TD align="middle" bgcolor="#FA8072">salmon
</TD>
<TD align="middle" bgcolor="#F4A460">sandybrown
</TD>
<TD align="middle" bgcolor="#2E8B57">seagreen
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FFF5EE">seashell
</TD>
<TD align="middle" bgcolor="#A0522D">sienna
</TD>
<TD align="middle" bgcolor="#C0C0C0">silver
</TD>
<TD align="middle" bgcolor="#87CEEB">skyblue
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#6A5ACD">slateblue
</TD>
<TD align="middle" bgcolor="#708090">slategray
</TD>
<TD align="middle" bgcolor="#FFFAFA">snow
</TD>
<TD align="middle" bgcolor="#00FF7F">springgreen
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#4682B4">steelblue
</TD>
<TD align="middle" bgcolor="#D2B48C">tan
</TD>
<TD align="middle" bgcolor="#008080">teal
</TD>
<TD align="middle" bgcolor="#D8BFD8">thistle
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FF6347">tomato
</TD>
<TD align="middle" bgcolor="#40E0D0">turquoise
</TD>
<TD align="middle" bgcolor="#EE82EE">violet
</TD>
<TD align="middle" bgcolor="#F5DEB3">wheat
</TD>
</TR>
<TR>
<TD align="middle" bgcolor="#FFFFFF">white
</TD>
<TD align="middle" bgcolor="#F5F5F5">whitesmoke
</TD>
<TD align="middle" bgcolor="#FFFF00">yellow
</TD>
<TD align="middle" bgcolor="#9ACD32">yellowgreen
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/dot.gif Wyświetl plik

Przed Po
Szerokość: 2  |  Wysokość: 4  |  Rozmiar: 51 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/dropdown.gif Wyświetl plik

Przed Po
Szerokość: 15  |  Wysokość: 18  |  Rozmiar: 920 B

BIN
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/expand.gif Wyświetl plik

Przed Po
Szerokość: 11  |  Wysokość: 11  |  Rozmiar: 876 B

+ 59
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/findDlg.htm Wyświetl plik

@@ -0,0 +1,59 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>Find / Replace</title>
<script language="javascript" src="findDlg.js"></script>
</head>
<body style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" bgColor="#dbd8d1" leftMargin="5" topMargin="5">
<table width="100%" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td width="100">
Fi<u>n</u>d what:</td>
<td align="left"><input type="text" id="txtFindWhat" size="25" accessKey="n" tabIndex="1"></td>
<td rowspan="4" align="center" valign="top">
<table align="center">
<tr>
<td><button id="btnFind" style="width:90px; FONT-FAMILY: Arial" onclick="if(isEnableGo(this)) {find_Next(_activeCell);}" accessKey="f" tabIndex="8"><u>F</u>ind Next</button></td>
</tr>
<tr id="trReplace">
<td><button id="btnReplace" style="width:90px; FONT-FAMILY: Arial" onclick="if(isEnableGo(this)) {replace(0);}" accessKey="r" tabIndex="9"><u>R</u>eplace</button></td>
</tr>
<tr id="trReplaceAll">
<td><button id="btnReplaceAll" style="width:90px; FONT-FAMILY: Arial" onclick="if(isEnableGo(this)) {replaceAll();}" accessKey="a" tabIndex="10">Replace <u>A</u>ll</button></td>
</tr>
<tr>
<td><input type="button" id="btnClose" value="Close" style="width:90px; FONT-FAMILY: Arial" onclick="window.close();" tabIndex="11"></td>
</tr>
</table>
</td>
</tr>
<tr id="trReplaceWhat">
<td width="100">
Re<u>p</u>lace with:</td>
<td align="left"><input type="text" id="txtReplaceWith" size="25" accessKey="p" tabIndex="2"></td>
</tr>
<tr>
<td valign="top" width="100" style="padding-top:6px;">
Find options:</td>
<td align="left">
<input type="checkbox" id="ckbCase" accessKey="c" tabIndex="3"> Match <u>c</u>ase
<br>
<input type="checkbox" id="ckbWord" accessKey="w" tabIndex="4"> Match <u>w</u>hole
word
<br>
<input type="checkbox" id="ckbDirection" accessKey="u" tabIndex="5"> Search <u>u</u>p
<br>
<input type="checkbox" id="ckbRegular" accessKey="e" tabIndex="6"> Regular <u>e</u>xpression
<br>
<label>Find<u>i</u>n</label>
<select id="ddlFindIn" accessKey="i" tabIndex="7" style="FONT-FAMILY: Arial">
<option value="1" selected>
Formulas
<option value="2">
Values
</select>
</td>
</tr>
</table>
</body>
</html>

+ 986
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/findDlg.js Wyświetl plik

@@ -0,0 +1,986 @@
//Copyright (c) 2001-2016 Aspose Pty Ltd. All Rights Reserved.

/***********************************************************************************************
* Aspose.Cells.GridWeb Component Script File
* Copyright 2003-2011, All Rights Reserverd.
************************************************************************************************/
var _oFindWhat = null; // The controll that be input what finding
var _oReplaceWith = null; // The controll that be input what replacing whith
var _oCase = null; // The check box to determine whether macthing case
var _oWord = null; // The check box to determine whether macthing whole word
var _oDirection = null; // The check box to determine searching direction. search down and search up.
var _oRegular = null; // The check box to determine whether the seaching string is a regular expression.
var _oFindIn = null; // The drop down list to indicate target is formulas or values.
var _oBtnFind = null; // The find next button.
var _oBtnReplace = null; // The replace button.
var _oBtnReplaceAll = null; // The replace all button.
var _oBtnClose = null; // The close button.

var _parentWindow = null; // The parent window
var _element = null; // The GridWeb object.
var _viewTable = null; // One of the ViewTable objects.
var _viewTable00 = null; // One of the ViewTable objects.
var _viewTable01 = null; // One of the ViewTable objects.
var _viewTable10 = null; // One of the ViewTable objects.
var _activeCell = null; // The active cell.
var _startSearchCell = null; // The first cell in a searching process.
var _callType = 0; // 0 Find; 1 Replace
var _dialogEdgeLeftWidth = 0; // The left edge width of the find/replace dialog window
var _dialogEdgeTopHeight = 0; // The top edge width of the find/replace dialog window, i.e. The title bar width.
var _cidReg = new RegExp("^\\d+#\\d+$");
var _findReg = null;
var _findWhat = null;
var _regexOptions = null;
var _freeze = null;
var _arrCells = new Array();
var _cellIndex = 0;

var _currentViewTable = null;
var _currentCellIndex = 0;
var _currentRowIndex = 0;
var _currentRows = null;
var _currentCells = null;
var _currentRowsLength = 0;
var _currentCellsLength = 0;


//----------------------------------------------------------------------------------------------------
// Initializes variants, gets parameters from parent window after window on load.
//----------------------------------------------------------------------------------------------------
window.onload = function(){
_oFindWhat = document.getElementById("txtFindWhat");
_oReplaceWith = document.getElementById("txtReplaceWith");
_oCase = document.getElementById("ckbCase");
_oWord = document.getElementById("ckbWord");
_oDirection = document.getElementById("ckbDirection");
_oRegular = document.getElementById("ckbRegular");
_oFindIn = document.getElementById("ddlFindIn");
_oBtnFind = document.getElementById("btnFind");
_oBtnReplace = document.getElementById("btnReplace");
_oBtnReplaceAll = document.getElementById("btnReplaceAll");
_oBtnClose = document.getElementById("btnClose");
if(!window.showModelessDialog) // Is not IE
{
_parentWindow = window.opener;
_element = _parentWindow.acwFindReplaceDialog_Element;
_activeCell = _parentWindow.acwFindReplaceDialog_StartCell;
_oBtnFind.style.width = "100px";
_oBtnReplace.style.width = "100px";
_oBtnReplaceAll.style.width = "100px";
_oBtnClose.style.width = "100px";
_dialogEdgeLeftWidth = (window.outerWidth - innerWidth)/2;
_dialogEdgeTopHeight = parseInt((window.outerHeight - innerHeight)/2+1);
}
else{ //IE
_parentWindow = window.dialogArguments[0];
_arrCells = window.dialogArguments[1];
_cellIndex = window.dialogArguments[2];
_element = _parentWindow.acwFindReplaceDialog_Element;
_activeCell = _parentWindow.acwFindReplaceDialog_StartCell;
_dialogEdgeLeftWidth = window.screenLeft - parseFloat(window.dialogLeft);
_dialogEdgeTopHeight = window.screenTop - parseFloat(window.dialogTop);
}
_callType = getUrlParameter("callType");
_freeze = _element.freeze;
init();
}

//----------------------------------------------------------------------------------------------------
// Sets the variants about this window when the window be closed.
//----------------------------------------------------------------------------------------------------
window.onunload = function(){
if(typeof _parentWindow == "undefined" || typeof _parentWindow.acwFindReplaceDialog == "undefined"){
return false;
}
_parentWindow.acwFindReplaceDialog_Element = null;
_parentWindow.acwFindReplaceDialog_StartCell = null;
_parentWindow.acwFindReplaceDialog = null;
}

//----------------------------------------------------------------------------------------------------
// If reload window opener, closes FindReplace Dialog.
//----------------------------------------------------------------------------------------------------
window.onfocus = function(){
if(typeof _parentWindow == "undefined"
|| typeof _parentWindow.acwFindReplaceDialog == "undefined"
|| (_activeCell != null && _activeCell.parentNode == null)){
window.close();
}
}

//----------------------------------------------------------------------------------------------------
// Handles onkeyown events
//----------------------------------------------------------------------------------------------------
document.onkeydown = function(evt){
if(evt == null)
evt = event;
if(evt.keyCode == 27){ // Esc
window.close();
return false;
}
else if(evt.keyCode == 13){ //enter
_oBtnFind.click();
return false;
}
}

//----------------------------------------------------------------------------------------------------
// Initializes variants, determines how to lay out page.
//----------------------------------------------------------------------------------------------------
function init(){
_viewTable = _element.ownerDocument.getElementById(_element.id + "_viewTable");
if (_freeze)
{
_viewTable00 = _element.ownerDocument.getElementById(_element.id + "_viewTable00");
_viewTable01 = _element.ownerDocument.getElementById(_element.id + "_viewTable01");
_viewTable10 = _element.ownerDocument.getElementById(_element.id + "_viewTable10");
}
if(_activeCell == null){
if(_freeze){
if(_viewTable00.rows.length != 0 && _viewTable00.rows[0].cells.length != 0){
_activeCell = _viewTable00.rows[0].cells[0];
}
else if(_viewTable01.rows.length != 0 && _viewTable01.rows[0].cells.length != 0){
_activeCell = _viewTable01.rows[0].cells[0];
}
else if(_viewTable10.rows.length != 0 && _viewTable10.rows[0].cells.length != 0){
_activeCell = _viewTable10.rows[0].cells[0];
}
else if(_viewTable.rows.length != 0 && _viewTable.rows[0].cells.length != 0){
_activeCell = _viewTable.rows[0].cells[0];
}
else{ // No cell provide for searching
window.close();
return;
}
}
else {
if(_viewTable.rows.length == 0 || _viewTable.rows[0].cells.length == 0){ // No cell provide for searching
window.close();
return;
}
else{
_activeCell = _viewTable.rows[0].cells[0];
}
}
setActiveCell(_activeCell);
}
validateInitArguments();
showElmentByCallType(_callType);
//FillCellsToArray(_activeCell);
if(navigator.appName.indexOf("Microsoft") == -1){ // Is not IE
_currentViewTable = _activeCell.offsetParent;
_currentCellIndex = _activeCell.cellIndex;
_currentRowIndex = _activeCell.parentNode.rowIndex;
_currentRows = _currentViewTable.rows;
_currentRowsLength = _currentRows.length;
_currentCells = _currentRows[_currentRowIndex].cells;
_currentCellsLength = _currentCells.length;
}
}

//----------------------------------------------------------------------------------------------------
// Determines whether can call the Find/Replace feature.
//----------------------------------------------------------------------------------------------------
function validateInitArguments(){
if(_element == null || _activeCell == null || _callType == null){
alert("Arguments are null. Can't call Find/Replace feature!");
window.close();
}
}

//----------------------------------------------------------------------------------------------------
// Determines how to lay out page according to call type(find or replace)
// Arguments:
// callType: o indicates find, 1 indicates replace
//----------------------------------------------------------------------------------------------------
function showElmentByCallType(callType){
if(callType == 0){ // Find
document.getElementById("trReplaceWhat").style.display = "none";
document.getElementById("trReplaceAll").style.display = "none";
}
else if(callType == 1){ // Replace
document.getElementById("trReplaceWhat").style.display = "";
document.getElementById("trReplaceAll").style.display = "";
}
if (!_element.editmode) {
document.getElementById("trReplace").style.display = "none";
}
}

//----------------------------------------------------------------------------------------------------
// Determines whether continueing to execute when executor clicks find next, replace or replace all button
// Arguments:
// obj: The button object.
// Return: Allows to execute return true, otherwise return false.
//----------------------------------------------------------------------------------------------------
function isEnableGo(obj){
if((obj == _oBtnReplace || obj == _oBtnReplaceAll) && !_element.editmode)
return false;
if(obj == _oBtnReplace && _callType == 0){
_callType = 1;
showElmentByCallType(1);
return false;
}
if((obj == _oBtnReplace || obj == _oBtnReplaceAll) && _oFindIn.value == 2){
if(window.confirm("Findin must be set to Formulas. Now, set it to Formulas and continue?")){
_oFindIn.value = 1;
}
else{
return false;
}
}
_findWhat = _oFindWhat.value;
if(_findWhat == ""){
alert("Please input what will be searched!");
return false;
}
_regexOptions = getRegExpOptions();
if(!_oRegular.checked){ // RegularExpression checkbox is false
_findWhat = escapeMetacharacters(_findWhat); // Escapes meta characters. E.g. "\w" to "\\w"
}
if(_oWord.checked){
_findWhat = "(\\W|^)" + _findWhat + "(\\W|$)";
}
try{
_findReg = new RegExp(_findWhat, _regexOptions);
}
catch(e){//Regular Expression is error
alert(e.name + ": " + e.message);
return false;
}
_startSearchCell = _activeCell;
return true;
}

//----------------------------------------------------------------------------------------------------
// Find next cell
//----------------------------------------------------------------------------------------------------
function find_Next() {
var findCell = _startSearchCell;
do{
findCell = moveToNextCell3();
var sourceString;
sourceString = getInnerText(findCell);
// Determines the findCell whether contains the spiciel string.
if(sourceString != null && sourceString != ""){
//_findReg = new RegExp(_findWhat, _regexOptions);
if(_oFindIn.value == 1){ // Find in values or formulas. If cell is set value by formulas, find in formula, but don't find in value.
// otherwise, find in values
var bHadFound = false;
if(getAttribute(findCell,"formula") != null ){
if(_findReg.exec(getAttribute(findCell, "formula"))){
bHadFound = true;
}
}
else if(getAttribute(findCell, "ufv") != null){
if(_findReg.exec(getAttribute(findCell, "ufv"))){
bHadFound = true;
}
}
else if(_findReg.exec(sourceString)){
bHadFound = true;
}
if(bHadFound){
setActiveCell(findCell); // Had found
_activeCell = findCell;
return true;
}
}
else if(_oFindIn.value == 2){ //Only Find values in all cells.
if(_findReg.exec(sourceString)){
setActiveCell(findCell); // Had found
_activeCell = findCell;
return true;
}
}
}
if(findCell == _startSearchCell){
alert("The specified text was not found!");
return false;
}
}
while(true);
}

//----------------------------------------------------------------------------------------------------
// Replaces with the specified string and find next cell
//----------------------------------------------------------------------------------------------------
function replace() {
var replaceCell = _startSearchCell;
var replaceCount = 0;
do{
var sourceString;
sourceString = getInnerText(replaceCell);
if(replaceCount == 0){// Replace
if(isCanReplaced(replaceCell) && sourceString != null && sourceString != ""){
_findReg = new RegExp(_findWhat, _regexOptions);
var txt;
if(getAttribute(replaceCell, "formula") != null ){ // Is Formula
if(_findReg.exec(getAttribute(replaceCell, "formula"))){
if(_oWord.checked){
txt = getAttribute(replaceCell, "formula").replace(_findReg,"$1" + _oReplaceWith.value + "$2");
setCellValue(replaceCell,txt);
}
else{
txt = getAttribute(replaceCell, "formula").replace(_findReg,_oReplaceWith.value);
setCellValue(replaceCell,txt);
}
replaceCount++;
}
}
else if(getAttribute(replaceCell, "ufv") != null){ // Is Data Format
if(_findReg.exec(getAttribute(replaceCell, "ufv"))){
if(_oWord.checked){
txt = getAttribute(replaceCell, "ufv").replace(_findReg,"$1" + _oReplaceWith.value + "$2");
setCellValue(replaceCell,txt);
}
else{
txt = getAttribute(replaceCell, "ufv").replace(_findReg,_oReplaceWith.value);
setCellValue(replaceCell,txt);
}
replaceCount++;
}
}
else if(_findReg.exec(sourceString)){
if(_oWord.checked){
txt = sourceString.replace(_findReg,"$1" + _oReplaceWith.value + "$2");
setCellValue(replaceCell,txt);
}
else{
txt = sourceString.replace(_findReg,_oReplaceWith.value);
setCellValue(replaceCell,txt);
}
replaceCount++;
}
}
}
else{ //Had replaced. Finds next and set it active.
if(isCanReplaced(replaceCell) && sourceString != null && sourceString != ""){
_findReg = new RegExp(_findWhat, _regexOptions);
var bHadFound = false;
if(getAttribute(replaceCell,"formula") != null ){
if(_findReg.exec(getAttribute(replaceCell, "formula"))){
bHadFound = true;
}
}
else if(getAttribute(replaceCell, "ufv") != null){
if(_findReg.exec(getAttribute(replaceCell, "ufv"))){
bHadFound = true;
}
}
else if(_findReg.exec(sourceString)){
bHadFound = true;
}
if(bHadFound){
setActiveCell(replaceCell); // Had found
_activeCell = replaceCell;
return true;
}
}
}
replaceCell = moveToNextCell3();
if(replaceCell == _startSearchCell){
if(replaceCount == 0){
alert("The specified text was not found or the cell is read only!");
}
return false;
}
}
while(true);
}

//----------------------------------------------------------------------------------------------------
// Replaces with the specified string in all cells.
//----------------------------------------------------------------------------------------------------
function replaceAll() {
var replaceCell = _startSearchCell;
var replaceCount = 0;
do{
var sourceString;
sourceString = getInnerText(replaceCell);
if(isCanReplaced(replaceCell) && sourceString != null && sourceString != ""){
_findReg = new RegExp(_findWhat, _regexOptions);
var txt;
if(getAttribute(replaceCell, "formula") != null ){ // Is Formula
if(_findReg.exec(getAttribute(replaceCell, "formula"))){
if(_oWord.checked){
txt = getAttribute(replaceCell, "formula").replace(_findReg,"$1" + _oReplaceWith.value + "$2");
setCellValue(replaceCell,txt);
}
else{
txt = getAttribute(replaceCell, "formula").replace(_findReg,_oReplaceWith.value);
setCellValue(replaceCell,txt);
}
_replaceAllCount++;
}
}
else if(getAttribute(replaceCell, "ufv") != null){ // Is Data Format
if(_findReg.exec(getAttribute(replaceCell, "ufv"))){
if(_oWord.checked){
txt = getAttribute(replaceCell, "ufv").replace(_findReg,"$1" + _oReplaceWith.value + "$2");
setCellValue(replaceCell,txt);
}
else{
txt = getAttribute(replaceCell, "ufv").replace(_findReg,_oReplaceWith.value);
setCellValue(replaceCell,txt);
}
replaceCount++;
}
}
else if(_findReg.exec(sourceString)){
if(_oWord.checked){
txt = sourceString.replace(_findReg,"$1" + _oReplaceWith.value + "$2");
setCellValue(replaceCell,txt);
}
else{
txt = sourceString.replace(_findReg,_oReplaceWith.value);
setCellValue(replaceCell,txt);
}
replaceCount++;
}
}
replaceCell = moveToNextCell3();
if(replaceCell == _startSearchCell){
if(replaceCount > 0){
alert(replaceCount + " occurrence(s) replaced.");
}
else{
alert("The specified text was not found or the cell is read only!");
}
_startSearchCell = null;
return false;
}
}
while(true);
}


//----------------------------------------------------------------------------------------------------
// Indicates whether the cell can execute replacing featrue.
//----------------------------------------------------------------------------------------------------
function isCanReplaced(cell){
var r = false;
if (getAttribute(cell, "protected") != "1" // Is not Read Only
&& getAttribute(cell, "vtype") != "dlist"){ // Is not DropDownList
r = true;
}
return r;
}

//----------------------------------------------------------------------------------------------------
// Gets regular expression options
//----------------------------------------------------------------------------------------------------
function getRegExpOptions(){
var r = "gi";
if(_oCase.checked){
r = r.replace("i","");
}
return r;
}

//----------------------------------------------------------------------------------------------------
// Escapes the meta characters in the specified string.
//----------------------------------------------------------------------------------------------------
function escapeMetacharacters(s){
var syntax = "\\^$*+?{}.()|[]"; // meta characters
for(var i=0; i<s.length; i++){
var index = syntax.indexOf(s.charAt(i));
if(index != -1){
s = s.substring(0,i) + "\\" + s.substring(i,s.length);
i++;
}
}
return s;
}

//----------------------------------------------------------------------------------------------------
// Sets the specified cell active
//----------------------------------------------------------------------------------------------------
function setActiveCell(cell){
var index = cell.id.lastIndexOf("_");
var xy = cell.id.substr(index+1,cell.id.length - index + 1).split("#");
_element.setActiveCell(xy[1],xy[0]);
// If cell is cover by dialog window, move the dialog window to the right down corner of the cell.
var offsetParent = cell.offsetParent;
var offsetLeftToBody = cell.offsetLeft;
var offsetTopToBody = cell.offsetTop;
do{
offsetTopToBody += offsetParent.offsetTop;
offsetLeftToBody += offsetParent.offsetLeft;
offsetParent = offsetParent.offsetParent;
}while(offsetParent);
var panel = cell.offsetParent.parentNode;
var x, y;
var condition1, condition2,condition3, condition4;
if(navigator.appName.indexOf("Microsoft") == -1) // Is not IE
{
offsetLeftToBody = offsetLeftToBody - panel.scrollLeft - _parentWindow.document.body.scrollLeft;
offsetTopToBody = offsetTopToBody - panel.scrollTop - _parentWindow.document.body.scrollTop;
x = offsetLeftToBody + _parentWindow.screenX + (_parentWindow.outerWidth - _parentWindow.innerWidth)/2;
y = offsetTopToBody + _parentWindow.screenY + (_parentWindow.outerHeight - _parentWindow.innerHeight - _dialogEdgeTopHeight);
condition1 = x >= window.screenX && x < window.screenX + window.outerWidth;
condition2 = x + cell.offsetWidth > window.screenX && x + cell.offsetWidth <= window.screenX + window.outerWidth;
condition3 = y >= window.screenY && y < window.screenY + window.outerHeight;
condition4 = y + cell.offsetHeight > window.screenY && y + cell.offsetHeight <= window.screenY + window.outerHeight;
if((condition1 || condition2) && (condition3 || condition4)){
window.moveTo(x + cell.offsetWidth,y + cell.offsetHeight);
}
}
else{ // IE
offsetLeftToBody = offsetLeftToBody - panel.scrollLeft - _parentWindow.document.body.scrollLeft;
offsetTopToBody = offsetTopToBody - panel.scrollTop - _parentWindow.document.body.scrollTop;
x = offsetLeftToBody + _parentWindow.screenLeft;
y = offsetTopToBody + _parentWindow.screenTop;
condition1 = x >= window.screenLeft - _dialogEdgeLeftWidth && x < window.screenLeft - _dialogEdgeLeftWidth + parseFloat(dialogWidth);
condition2 = x + cell.offsetWidth > window.screenLeft - _dialogEdgeLeftWidth && x + cell.offsetWidth <= window.screenLeft - _dialogEdgeLeftWidth + parseFloat(dialogWidth);
condition3 = y >= window.screenTop - _dialogEdgeTopHeight && y < window.screenTop - _dialogEdgeTopHeight + parseFloat(dialogHeight);
condition4 = y + cell.offsetHeight > window.screenTop - _dialogEdgeTopHeight && y + cell.offsetHeight <= window.screenTop - _dialogEdgeTopHeight + parseFloat(dialogHeight);
if((condition1 || condition2) && (condition3 || condition4)){
dialogLeft = x + cell.offsetWidth;
dialogTop = y + cell.offsetHeight;
}
}
}

//----------------------------------------------------------------------------------------------------
// Sets cell value to txt.
//----------------------------------------------------------------------------------------------------
function setCellValue(cell,txt){
var index = cell.id.lastIndexOf("_");
var xy = cell.id.substr(index+1,cell.id.length - index + 1).split("#");
_element.setCellValue(xy[1], xy[0],txt);
}

//----------------------------------------------------------------------------------------------------
// Gets the specified name parameter in url string.
//----------------------------------------------------------------------------------------------------
function getUrlParameter(name)
{
var url = window.location.search;
var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
if (reg.exec(url))
return RegExp.$2;
else
return "";
}

function getTimeDistance(a,b){
return b.getMilliseconds() - a.getMilliseconds() + 1000*(b.getSeconds() - a.getSeconds());
}

//----------------------------------------------------------------------------------------------------
// Determines whether the specified object is valid cell.
//----------------------------------------------------------------------------------------------------
function isValidCell(o){
if (o.tagName == "TD" && o.id != null && o.id.indexOf(_element.id) == 0 && _cidReg.exec(o.id.substring(_element.id.length+1,o.id.length)))
return true;
else
return false;
}

//----------------------------------------------------------------------------------------------------
// Obsolete. Gets the next cell.
//----------------------------------------------------------------------------------------------------
function moveToNextCell(cell){
var currentViewTable = cell.offsetParent;
var cellIndex = cell.cellIndex;
var rowIndex = cell.parentNode.rowIndex;
if(_freeze){
if(_oDirection.checked){ // Search up
if(cellIndex == 0 || currentViewTable.rows.length == 0 || currentViewTable.rows[rowIndex].cells.length == 0){
if(rowIndex == 0){
if(currentViewTable == _viewTable00){
currentViewTable = _viewTable;
if(currentViewTable.rows.length > 0)
rowIndex = currentViewTable.rows.length - 1;
}
else if(currentViewTable == _viewTable01){
currentViewTable = _viewTable00;
}
else if(currentViewTable == _viewTable10){
currentViewTable = _viewTable01;
if(currentViewTable.rows.length > 0)
rowIndex = currentViewTable.rows.length - 1;
}
else if(currentViewTable == _viewTable){
currentViewTable = _viewTable10;
}
}
else{
if(currentViewTable == _viewTable00){
currentViewTable = _viewTable01;
rowIndex--;
}
else if(currentViewTable == _viewTable01){
currentViewTable = _viewTable00;
}
else if(currentViewTable == _viewTable10){
currentViewTable = _viewTable;
rowIndex--;
}
else if(currentViewTable == _viewTable){
currentViewTable = _viewTable10;
}
}
if(currentViewTable.rows.length > 0 && currentViewTable.rows[rowIndex].cells.length > 0)
cellIndex = currentViewTable.rows[rowIndex].cells.length -1;
}
else{ // Is not first cell in the row. Reduces cellIndex to 1 for move to next cell.
cellIndex--;
}
}
else{ // Search down
if(currentViewTable.rows.length == 0 ||currentViewTable.rows[rowIndex].cells.length == 0 || cellIndex == currentViewTable.rows[rowIndex].cells.length - 1 ){
cellIndex = 0;
if(rowIndex == currentViewTable.rows.length - 1
|| ((currentViewTable == _viewTable00 || currentViewTable == _viewTable01) && _viewTable00.rows.length == 0 && _viewTable01.rows.length == 0)
|| ((currentViewTable == _viewTable10 || currentViewTable == _viewTable) && _viewTable10.rows.length == 0 && _viewTable.rows.length == 0)){
if(currentViewTable == _viewTable00){
currentViewTable = _viewTable01;
}
else if(currentViewTable == _viewTable01){
currentViewTable = _viewTable10;
rowIndex = 0;
}
else if(currentViewTable == _viewTable10){
currentViewTable = _viewTable;
}
else if(currentViewTable == _viewTable){
currentViewTable = _viewTable00;
rowIndex = 0;
}
}
else{
if(currentViewTable == _viewTable00){
currentViewTable = _viewTable01;
}
else if(currentViewTable == _viewTable01){
currentViewTable = _viewTable00;
rowIndex++;
}
else if(currentViewTable == _viewTable10){
currentViewTable = _viewTable;
}
else if(currentViewTable == _viewTable){
currentViewTable = _viewTable10;
rowIndex++;
}
}
}
else{ // Is not last cell in the row. Adds cellIndex to 1 for move to next cell.
cellIndex++;
}
}
}
else{
if(_oDirection.checked){ // Search up
if(cellIndex == 0){ // Is the first cell in the row.
// The row move to next row and cellIndex is evaluated to the last cell index of next row.
if(rowIndex == 0){
rowIndex = currentViewTable.rows.length - 1;
}
else{
rowIndex--;
}
cellIndex = currentViewTable.rows[rowIndex].cells.length -1;
}
else{ // Is not first cell in the row. Reduces cellIndex to 1 for move to next cell.
cellIndex--;
}
}
else{ // Search down
if(cellIndex == currentViewTable.rows[rowIndex].cells.length -1){ // Is the last cell in the row.
// The row move to next row and cellIndex is evaluated to the first cell index of next row.
if(rowIndex == currentViewTable.rows.length - 1){
rowIndex = 0;
}
else{
rowIndex++;
}
cellIndex = 0;
}
else{ // Is not last cell in the row. Adds cellIndex to 1 for move to next cell.
cellIndex++;
}
}
}
var cell = null;
if(currentViewTable.rows.length > 0 && currentViewTable.rows[rowIndex].cells.length > 0){
cell = currentViewTable.rows[rowIndex].cells[cellIndex];
}
if(cell != null && isValidCell(cell))
return cell;
else
return moveToNextCell(cell);
}

//----------------------------------------------------------------------------------------------------
// Obsolete. Gets the next cell that is valid cell.
//----------------------------------------------------------------------------------------------------
function moveToNextCell2(cell){
if(_freeze){
var currentViewTable = cell.offsetParent;
var rowIndex;
if(_oDirection.checked){ // Search up
if(cell.previousSibling != null){
cell = cell.previousSibling;
}
else if(cell.parentElement.previousSibling != null){
rowIndex = cell.parentElement.rowIndex;
if(currentViewTable == _viewTable00){
cell = _viewTable01.rows[rowIndex - 1].lastChild;
}
else if(currentViewTable == _viewTable01){
cell = _viewTable00.rows[rowIndex].lastChild;
}
else if(currentViewTable == _viewTable10){
cell = _viewTable.rows[rowIndex - 1].lastChild;
}
else if(currentViewTable == _viewTable){
cell = _viewTable10.rows[rowIndex].lastChild;
}
}
else{
if(currentViewTable == _viewTable00){
cell = _viewTable.rows[_viewTable.rows.length - 1].lastChild;
}
else if(currentViewTable == _viewTable01){
cell = _viewTable00.rows[0].lastChild;
}
else if(currentViewTable == _viewTable10){
cell = _viewTable01.rows[_viewTable01.rows.length - 1].lastChild;
}
else if(currentViewTable == _viewTable){
cell = _viewTable10.rows[0].lastChild;
}
}
}
else{
if(cell.nextSibling != null){
cell = cell.nextSibling;
}
else if(cell.parentElement.nextSibling != null){
rowIndex = cell.parentElement.rowIndex;
if(currentViewTable == _viewTable00){
cell = _viewTable01.rows[rowIndex].firstChild;
}
else if(currentViewTable == _viewTable01){
cell = _viewTable00.rows[rowIndex + 1].firstChild;
}
else if(currentViewTable == _viewTable10){
cell = _viewTable.rows[rowIndex].firstChild;
}
else if(currentViewTable == _viewTable){
cell = _viewTable10.rows[rowIndex + 1].firstChild;
}
}
else{
if(currentViewTable == _viewTable00){
cell = _viewTable01.rows[_viewTable01.rows.length - 1].firstChild;
}
else if(currentViewTable == _viewTable01){
cell = _viewTable10.rows[0].firstChild;
}
else if(currentViewTable == _viewTable10){
cell = _viewTable.rows[_viewTable.rows.length - 1].firstChild;
}
else if(currentViewTable == _viewTable){
cell = _viewTable00.rows[0].firstChild;
}
}
}
}
else{
if(_oDirection.checked){ // Search up
if(cell.previousSibling != null){
cell = cell.previousSibling;
}
else if(cell.parentNode.previousSibling != null){
cell = cell.parentNode.previousSibling.lastChild;
}
else{
cell = cell.parentNode.parentNode.rows[cell.offsetParent.rows.length - 1].lastChild;
}
}
else{
if(cell.nextSibling != null){
cell = cell.nextSibling;
}
else if(cell.parentNode.nextSibling != null && cell.parentNode.nextSibling.nodeType == 1){
cell = cell.parentNode.nextSibling.firstChild;
}
else{
cell = cell.parentNode.parentNode.rows[0].firstChild;
}
}
}
if(isValidCell(cell))
return cell;
else
return moveToNextCell2(cell);
}

//----------------------------------------------------------------------------------------------------
// Gets the next cell that is valid cell.
//----------------------------------------------------------------------------------------------------
function moveToNextCell3(){
if(navigator.appName.indexOf("Microsoft") == -1) {// Is not IE
if(_oDirection.checked){ // Search up
if(_currentCellIndex == 0){ // Is the first cell in the row.
// The row move to next row and cellIndex is evaluated to the last cell index of next row.
if(_currentRowIndex == 0){
_currentRowIndex = _currentRowsLength - 1;
}
else{
_currentRowIndex--;
}
_currentCells = _currentRows[_currentRowIndex].cells;
_currentCellsLength = _currentCells.length;
_currentCellIndex = _currentCellsLength -1;
}
else{ // Is not first cell in the row. Reduces cellIndex to 1 for move to next cell.
_currentCellIndex--;
}
}
else{ // Search down
if(_currentCellIndex == _currentCellsLength -1){ // Is the last cell in the row.
// The row move to next row and cellIndex is evaluated to the first cell index of next row.
if(_currentRowIndex == _currentRowsLength - 1){
_currentRowIndex = 0;
}
else{
_currentRowIndex++;
}
_currentCells = _currentRows[_currentRowIndex].cells;
_currentCellsLength = _currentCells.length;
_currentCellIndex = 0;
}
else{ // Is not last cell in the row. Adds cellIndex to 1 for move to next cell.
_currentCellIndex++;
}
}
var cell = null;
if(_currentRowsLength > 0 && _currentCellsLength > 0){
cell = _currentCells[_currentCellIndex];
}
if(cell != null && isValidCell(cell))
return cell;
else
return moveToNextCell3();
}
else{ //IE
if(_oDirection.checked){ // Search up
if(_cellIndex == 0){
_cellIndex = _arrCells.length;
}
return _arrCells[--_cellIndex];
}
else{ // Search down
if(_cellIndex == _arrCells.length - 1){
_cellIndex = -1;
}
return _arrCells[++_cellIndex];
}
}
}

//----------------------------------------------------------------------------------------------------
// Obsolete. Fills the cells to a array
//----------------------------------------------------------------------------------------------------
function FillCellsToArray(startCell){
//var a = new Date();
var k = 0;
var i = 0;
_arrCells[i] = startCell;
_cellIndex = startCell.cellIndex;
var rows = _viewTable.rows;
var rowslen = rows.length;
var i;
for (i=0; i<rowslen; i++)
{
var cells = rows[i].cells;
var cellslen = cells.length;
var j;
for (j=0; j< cellslen; j++)
{
var cell = cells[j];
_arrCells[k++] = cell;
}
}
//alert(getTimeDistance(a,new Date()));
}

//----------------------------------------------------------------------------------------------------
// Get inner text of the specified object.
//----------------------------------------------------------------------------------------------------
function getInnerText(o){
if(o.hasChildNodes()){
var text = "";
for(var i=0; i<o.childNodes.length; i++){
if(o.childNodes[i].nodeType == 3){ // Is TEXT_NODE
text += o.childNodes[i].nodeValue;
}
else{
var childText = getInnerText(o.childNodes[i]);
if(childText != null)
text += childText;
}
}
if(text != "")
return text;
else
return null;
}
else
return null;
}

//----------------------------------------------------------------------------------------------------
// Gets the value of the specified attribute of the specified object.
//----------------------------------------------------------------------------------------------------
function getAttribute(o, name)
{
if (o.attributes[name] != null)
return o.attributes[name].nodeValue;
return null;
}

+ 175
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/fontdlg.htm Wyświetl plik

@@ -0,0 +1,175 @@
<html>
<head>
<title>Font</title>
<!--Create the Dialog Helper Object--></head>
<BODY style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" bgColor="#dbd8d1" leftMargin="5" topMargin="5" onload="initDlg()">
<script language="javascript" src="fontdlg.js"></script>
<table id="table3" style="BORDER-TOP: white 1px solid; FONT-SIZE: 9pt; WIDTH: 100%; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: gray" cellSpacing="2" cellPadding="2" border="0">
<tr>
<td width="30"><span id="btnFont" style="BORDER-RIGHT: white 1px inset; BORDER-TOP: white 1px inset; BORDER-LEFT: white 1px inset; CURSOR: hand; BORDER-BOTTOM: white 1px inset; BACKGROUND-COLOR: #dbd8d1" onclick="showFont();">Font </span></td>
<td width="50"><span id="btnBorders" style="BORDER-RIGHT: white 1px outset; BORDER-TOP: white 1px outset; BORDER-LEFT: white 1px outset; CURSOR: hand; BORDER-BOTTOM: white 1px outset; BACKGROUND-COLOR: #dbd8d1" onclick="showBorders();">Borders </span></td>
<td></td>
</tr>
</table>
<table id="table1" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse" cellPadding="2" border="0">
<tr>
<td>Font:<br>
<input id="txtFont" style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: Arial" type="text" onchange="OnFontChange1()" size="20">
</td>
<td>Style:<br>
<input id="txtStyle" style="FONT-SIZE: 9pt; WIDTH: 100px; FONT-FAMILY: Arial" readOnly type="text" size="20">
</td>
<td>Size:<br>
<input id="txtSize" style="FONT-SIZE: 9pt; WIDTH: 80px; FONT-FAMILY: Arial" type="text" onchange="OnSizeChange1()" size="20">
</td>
</tr>
<tr>
<td><select id="selFont" style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: Arial; HEIGHT: 150px" onchange="OnFontChange()" size="10"></select>
</td>
<td><select id="selStyle" style="FONT-SIZE: 9pt; WIDTH: 100px; FONT-FAMILY: Arial; HEIGHT: 150px" onchange="OnStyleChange()" size="10">
<option>Regular</option>
<option>Italic</option>
<option>Bold</option>
<option>Italic Bold</option>
</select></td>
<td><select id="selSize" style="FONT-SIZE: 9pt; WIDTH: 80px; FONT-FAMILY: Arial; HEIGHT: 150px" onchange="OnSizeChange()" size="10">
<option>6pt</option>
<option>8pt</option>
<option>9pt</option>
<option>10pt</option>
<option>11pt</option>
<option>12pt</option>
<option>14pt</option>
<option>16pt</option>
<option>18pt</option>
<option>20pt</option>
<option>22pt</option>
<option>24pt</option>
<option>26pt</option>
<option>28pt</option>
<option>36pt</option>
<option>48pt</option>
<option>72pt</option>
</select></td>
</tr>
<tr>
<td><input id="chkUnderline" onclick="OnUnderline()" type="checkbox" value="un">Underline<br>
<input id="chkStrike" onclick="OnLineThrough()" type="checkbox" value="st">Strikethrough<br>
</td>
<td colSpan="2">
</td>
</tr>
<tr>
<td></td>
<td colSpan="2"></td>
</tr>
<tr>
<td>Horizontal alignment:<br>
<select id="selHalign" style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: Arial">
<option selected></option>
<option value="left">Left</option>
<option value="center">Center</option>
<option value="right">Right</option>
<option value="justify">Justify</option>
</select><br>
</td>
<td colSpan="2">Vertical alignment:<br>
<select id="selValign" style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: Arial">
<option selected></option>
<option value="top">Top</option>
<option value="middle">Middle</option>
<option value="bottom">Bottom</option>
</select><br>
</td>
</tr>
<tr>
<td><input id="btnFC" style="BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BORDER-LEFT: 1px outset; WIDTH: 40px; BORDER-BOTTOM: 1px outset; HEIGHT: 20px" onclick="btnFC.style.backgroundColor=chooseColor(btnFC.style.backgroundColor);OnForeColorChange()" type="button">
Font color<br>
<input id="btnBG" style="BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BORDER-LEFT: 1px outset; WIDTH: 40px; BORDER-BOTTOM: 1px outset; HEIGHT: 20px" onclick="btnBG.style.backgroundColor=chooseColor(btnBG.style.backgroundColor);OnBGColorChange()" type="button">
Background<br>
</td>
<td >Preview:<br>
</td>
</tr>
<tr><td></td>
<td id="preview_parent_td" style="height:100px;width:100px;border:1px blue solid">
<div id="preview" contentEditable="true" >Sample
Text
<div></div>
</div>
</td>
</tr>
</table>
<table id="table2" style="DISPLAY: none; FONT-SIZE: 9pt; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse" cellPadding="2" border="0">
<tr height="50">
<td valign="top">Border Line Style:</td>
<td valign="top">
<SELECT id="borderStyle" size="8" style="width:200px; font-size: 9pt; font-family: Arial;" onchange="setBorderWidthSelect(this.value)">
<OPTION>Dashed</OPTION>
<OPTION>Dotted</OPTION>
<OPTION selected>Solid</OPTION>
<OPTION>Double</OPTION>
<!-- <OPTION>Groove</OPTION>
<OPTION>Inset</OPTION>
<OPTION>Outset</OPTION>
<OPTION>Ridge</OPTION>-->
</SELECT>
</td>
</tr>
<tr height="25">
<td valign="top"><span id="borderlinelabel">Border Line Width:</span></td>
<td valign="top">
<SELECT id="borderWidth" size="1" style="width:200px; font-size: 9pt; font-family: Arial;">
<OPTION value="1px" selected>thin</OPTION>
<OPTION value="2px" >medium</OPTION>
<OPTION value="3px">thick</OPTION>
<!-- <OPTION>3px</OPTION>
<OPTION>4px</OPTION>
<OPTION>5px</OPTION>
<OPTION>6px</OPTION>
<OPTION>7px</OPTION>
<OPTION>8px</OPTION>-->
</SELECT>
</td>
</tr>
<tr height="25">
<td valign="top">Border Line Color:</td>
<td valign="top">
<input id="btnBorderColor" style="BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BORDER-LEFT: 1px outset; WIDTH: 40px; BORDER-BOTTOM: 1px outset; HEIGHT: 20px; background-color:black;" onclick="btnBorderColor.style.backgroundColor=chooseColor(btnBorderColor.style.backgroundColor);" type="button">
</td>
</tr>
<tr height="50">
<td colspan="2">
<table width="100%">
<tr>
<td align="right"><img id="b1" src="b1.gif" style="border:3px ridge white; cursor:hand; width:45px; height:45px;" onclick="clickBorderBtn();"></td>
<td align="right"><img id="b2" src="b2.gif" style="border:3px ridge white; cursor:hand; width:45px; height:45px;" onclick="clickBorderBtn();"></td>
<td align="right"><img id="b3" src="b3.gif" style="border:3px ridge white; cursor:hand; width:45px; height:45px;" onclick="clickBorderBtn();"></td>
<td align="right"><img id="b4" src="b4.gif" style="border:3px ridge white; cursor:hand; width:45px; height:45px;" onclick="clickBorderBtn();"></td>
</tr>
<tr>
<td align="right"><img id="b5" src="b5.gif" style="border:3px ridge white; cursor:hand; width:45px; height:45px;" onclick="clickBorderBtn();"></td>
<td align="right"><img id="b6" src="b6.gif" style="border:3px ridge white; cursor:hand; width:45px; height:45px;" onclick="clickBorderBtn();"></td>
<td align="right"><img id="b7" src="b7.gif" style="border:3px ridge white; cursor:hand; width:45px; height:45px;" onclick="clickBorderBtn();"></td>
<td align="right"><img id="b8" src="b8.gif" style="border:3px ridge white; cursor:hand; width:45px; height:45px;" onclick="clickBorderBtn();"></td>
</tr>
</table>
</td>
</tr>
<tr>
</tr>
</table>
<table width="343" border="0" cellpadding="5" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse">
<tr>
<td width="100%" align="right">
<input type="button" value="OK" style="FONT-SIZE: 9pt; WIDTH: 90px; FONT-FAMILY: Arial; HEIGHT: 25px" onclick="FontOk()">
<input type="button" value="Cancel" style="FONT-SIZE: 9pt; WIDTH: 90px; FONT-FAMILY: Arial; HEIGHT: 25px" onclick="window.close()">
</td>
</tr>
</table>
<OBJECT id="dlgHelper" height="0px" width="0px" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" VIEWASTEXT>
</OBJECT>
</BODY>
</html>

+ 564
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/fontdlg.js Wyświetl plik

@@ -0,0 +1,564 @@
//Copyright (c) 2001-2016 Aspose Pty Ltd. All Rights Reserved.

//Copyright (c) 2001-2011 Aspose Pty Ltd. All Rights Reserved.

/*****************************************************
* Aspose.Cells.GridWeb Component Script File
* Copyright 2003-2011, All Rights Reserverd.
* V2.5.1
*****************************************************/
var acell;
var olist = null;
var setborder = null;
function initDlg()
{
acell = dialogArguments;
if (acell.list != null && (typeof acell.list.length) == "number" && acell.list.length > 0)
{
olist = acell;
var range = olist.list[0];
acell = olist.g.getCell(range.startRow, range.startCol);
}
table2.style.height = table1.offsetHeight;
window.returnValue = false;
getSystemFonts();
preview.style.fontFamily = txtFont.value = acell.currentStyle.fontFamily;
preview.style.fontStyle = acell.currentStyle.fontStyle;
preview.style.fontWeight = acell.currentStyle.fontWeight;
preview.style.display = "table-cell";
preview_parent_td.style.verticalAlign = acell.currentStyle.verticalAlign;
preview.style.textAlign = acell.currentStyle.textAlign;
//alert(preview_parent_td.style.height + ";" + acell.id + "---" + acell.style.verticalAlign + "acell.currentStyle.verticalAlign----------init;" + acell.currentStyle.verticalAlign + " & " + acell.align);
var tmps = "";
if (acell.currentStyle.fontStyle != "normal")
tmps += "Italic";
if (acell.currentStyle.fontWeight != "normal" && acell.currentStyle.fontWeight != "400")
{
if (tmps != "")
tmps += " Bold";
else
tmps = "Bold";
}
if (tmps == "")
tmps = "Regular";

txtStyle.value = tmps;
preview.style.fontSize = txtSize.value = acell.currentStyle.fontSize;
preview.style.color = btnFC.style.backgroundColor = acell.orgColor;
preview.style.backgroundColor = btnBG.style.backgroundColor = acell.orgBgColor;
//chkSub.checked = acell.parentElement.currentStyle.verticalAlign == "sub";
//chkSuper.checked = acell.parentElement.currentStyle.verticalAlign == "super";
//preview.style.verticalAlign = acell.parentElement.currentStyle.verticalAlign;
for (var op1 = 0; op1 < selHalign.options.length; op1++)
{
if (selHalign.options[op1].value == acell.currentStyle.textAlign)
{
selHalign.selectedIndex = op1;
break;
}
}
for (var op1 = 0; op1 < selValign.options.length; op1++)
{
if (selValign.options[op1].value == acell.currentStyle.verticalAlign)
{
selValign.selectedIndex = op1;
break;
}
}

if (acell.tdstyle)
{
preview.style.textDecorationUnderline = chkUnderline.checked = acell.style.textDecorationUnderline;
preview.style.textDecorationLineThrough = chkStrike.checked = acell.style.textDecorationLineThrough;
}
else
{
acell.tdstyle = true;
acell.style.textDecoration = "none";
for (var s1 = 0; s1 < acell.ownerDocument.styleSheets.length; s1++)
{
var styleSheet = acell.ownerDocument.styleSheets[s1];
for (var s2 = 0; s2 < styleSheet.rules.length; s2++)
{
var rule = styleSheet.rules[s2];
if (rule.selectorText == "."+acell.className)
{
acell.style.textDecorationUnderline = preview.style.textDecorationUnderline = chkUnderline.checked = rule.style.textDecorationUnderline;
acell.style.textDecorationLineThrough = preview.style.textDecorationLineThrough = chkStrike.checked = rule.style.textDecorationLineThrough;
s1 = acell.ownerDocument.styleSheets.length;
break;
}
}
}
}

var ss = acell.all.tags("SPAN");
if (ss.length > 0)
{
var txt = ss[0].innerText;
if (txt != "")
preview.innerText = txt;
}
else if (acell.innerText != "")
preview.innerText = acell.innerText;

selValign.onchange = function () {
preview_parent_td.style.verticalAlign = this.value;
// preview.style.verticalAlign = this.value;
//alert("value updated1");

};
selHalign.onchange = function () {
preview.style.textAlign = this.value;
// alert("value updated2");
};
}

function getSystemFonts()
{
var a=dlgHelper.fonts.count;
var fArray = new Array();
var oDropDown = selFont;
for (var i = 1;i < dlgHelper.fonts.count;i++){
fArray[i] = dlgHelper.fonts(i);
var oOption = document.createElement("OPTION");
oDropDown.add(oOption);
oOption.text = fArray[i];
oOption.Value = i;
}
}
function convertRGBDecimalToHex(rgb)
{
var regex = /rgb *\( *([0-9]{1,3}) *, *([0-9]{1,3}) *, *([0-9]{1,3}) *\)/;
var values = regex.exec(rgb);
if(values==null||values.length != 4)
{
return rgb; // fall back to what was given.
}
var r = Math.round(parseFloat(values[1]));
var g = Math.round(parseFloat(values[2]));
var b = Math.round(parseFloat(values[3]));
return "#"
+ (r + 0x10000).toString(16).substring(3).toUpperCase()
+ (g + 0x10000).toString(16).substring(3).toUpperCase()
+ (b + 0x10000).toString(16).substring(3).toUpperCase();
}
function chooseColor(rgbColor)
{
var sColor = dlgHelper.ChooseColorDlg(rgbColor);
//change decimal to hex
sColor = sColor.toString(16);
//add extra zeroes if hex number is less than 6 digits
if (sColor.length < 6) {
var sTempString = "000000".substring(0,6-sColor.length);
sColor = sTempString.concat(sColor);
}
//btnBorderColor.style.backgroundColor=sColor;
//btnBorderColor.style.backgroundColor="#"+sColor;
// alert("ie raise:"+(convertRGBDecimalToHex(btnBorderColor.style.backgroundColor))+";"+("#"+sColor));
return "#"+sColor;
}

function OnForeColorChange()
{
preview.style.color = btnFC.style.backgroundColor;
}

function OnBGColorChange()
{
preview.style.backgroundColor = btnBG.style.backgroundColor;
preview_parent_td.style.backgroundColor = btnBG.style.backgroundColor;
}

function OnFontChange()
{
txtFont.value = selFont.options[selFont.selectedIndex].text;
OnFontChange1();
}

function OnFontChange1()
{
preview.style.fontFamily = txtFont.value;
}

function OnStyleChange()
{
txtStyle.value = selStyle.options[selStyle.selectedIndex].text;
switch (txtStyle.value)
{
case "Regular":
preview.style.fontStyle="normal";
preview.style.fontWeight="normal";
break;
case "Italic":
preview.style.fontStyle="italic";
preview.style.fontWeight="normal";
break;
case "Bold":
preview.style.fontStyle="normal";
preview.style.fontWeight="bold";
break;
case "Italic Bold":
preview.style.fontStyle="italic";
preview.style.fontWeight="bold";
break;
}
}

function OnSizeChange()
{
txtSize.value = selSize.options[selSize.selectedIndex].text;
OnSizeChange1();
}

function OnSizeChange1()
{
preview.style.fontSize = txtSize.value;
}

function OnUnderline()
{
preview.style.textDecorationUnderline = chkUnderline.checked;
}

function OnLineThrough()
{
preview.style.textDecorationLineThrough = chkStrike.checked;
}

function FontOk()
{
if (setborder != null)
setBorders();

if (getattr(acell, "protected") == "1")
acell = document.createElement("TD");
acell.styleStr = acell.style.fontFamily = txtFont.value;
acell.styleStr += "|";
switch (txtStyle.value)
{
case "Regular":
acell.style.fontStyle = "normal";
acell.style.fontWeight = "normal";
acell.styleStr += "r|";
break;
case "Italic":
acell.style.fontStyle = "italic";
acell.style.fontWeight = "normal";
acell.styleStr += "i|";
break;
case "Bold":
acell.style.fontStyle = "normal";
acell.style.fontWeight = "bold";
acell.styleStr += "b|";
break;
case "Italic Bold":
acell.style.fontStyle = "italic";
acell.style.fontWeight = "bold";
acell.styleStr += "ib|";
break;
}
acell.style.fontSize = txtSize.value;
acell.style.textDecorationUnderline = chkUnderline.checked;
acell.style.textDecorationLineThrough = chkStrike.checked;

acell.orgColor = btnFC.style.backgroundColor;
acell.orgBgColor = btnBG.style.backgroundColor;
acell.style.textAlign = selHalign.options[selHalign.selectedIndex].value;
acell.style.verticalAlign = selValign.options[selValign.selectedIndex].value;
acell.align = selHalign.options[selHalign.selectedIndex].value;

acell.styleStr += txtSize.value + "|" + chkUnderline.checked + "|"
+ chkStrike.checked + "|" + convertRGBDecimalToHex(btnFC.style.backgroundColor) + "|" + convertRGBDecimalToHex(btnBG.style.backgroundColor)
+ "|" + selHalign.options[selHalign.selectedIndex].value + "|" + selValign.options[selValign.selectedIndex].value;

if (olist != null)
{
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
for (var c = range.startCol; c <= range.endCol; c++)
{
var cell = olist.g.getCell(r, c);
if (cell != null && cell != acell && getattr(cell, "protected") != "1")
{
cell.styleStr = acell.styleStr + "|" + (cell.tbstr!=null?cell.tbstr:"") + "|" + (cell.bbstr!=null?cell.bbstr:"") + "|" + (cell.lbstr!=null?cell.lbstr:"") + "|" + (cell.rbstr!=null?cell.rbstr:"");
cell.style.fontFamily = acell.style.fontFamily;
cell.style.fontStyle = acell.style.fontStyle;
cell.style.fontWeight = acell.style.fontWeight;
cell.style.fontSize = acell.style.fontSize;
cell.style.textDecorationUnderline = acell.style.textDecorationUnderline;
cell.style.textDecorationLineThrough = acell.style.textDecorationLineThrough;
cell.orgColor = acell.orgColor;
cell.orgBgColor = acell.orgBgColor;
//cell.style.textAlign = acell.style.textAlign;
cell.align = acell.align;
cell.style.verticalAlign = acell.style.verticalAlign;
}
}
}
}
}
acell.styleStr = acell.styleStr + "|" + (acell.tbstr!=null?acell.tbstr:"") + "|" + (acell.bbstr!=null?acell.bbstr:"") + "|" + (acell.lbstr!=null?acell.lbstr:"") + "|" + (acell.rbstr!=null?acell.rbstr:"");
window.returnValue = true;
window.close();
}

function showFont()
{
btnFont.style.border = "1px inset white";
btnBorders.style.border = "1px outset white";
table1.style.display = "block";
table2.style.display = "none";
}

function showBorders()
{
btnBorders.style.border = "1px inset white";
btnFont.style.border = "1px outset white";
table1.style.display = "none";
table2.style.display = "block";
}

function clickBorderBtn()
{
var o = event.srcElement;
var id = o.id;
var i;
for (i = 1; i<=8; i++)
{
eval("b"+i+".style.border='3px ridge white';");
}
o.style.border = "3px inset white";
setborder = id;
}

function setBorderWidthSelect (it) {
if(it=="Dashed")
{ //only thin ,medium for dashed options
if(borderWidth.options.length==3)
{borderWidth.options.remove(2);
}
}else
{ //thin,medium,thick for other options
if(borderWidth.options.length==2){
var option=document.createElement("option");
option.value="3px";
option.text="thick";
borderWidth.options.add(option);
}
}
if(it=="Double"||it=="Dotted")
{borderlinelabel.style.display="none";
borderWidth.style.display="none";
if(it=="Double")
{//3px for double
borderWidth.selectedIndex=2;
}else{
//2px for dotted in order to show it,if we set 1px,we can not see the effect in the browser,
//however in the server code ,the dotted is only dotted type it does not care the border width
borderWidth.selectedIndex=1;
}
}else
{ borderlinelabel.style.display="block";
borderWidth.style.display="block";
}
}

function setBorders()
{
var bstr = borderWidth.options[borderWidth.selectedIndex].value + " " + borderStyle.options[borderStyle.selectedIndex].text + " " + convertRGBDecimalToHex(btnBorderColor.style.backgroundColor);
if (olist == null)
{
switch (setborder)
{
case "b1":
acell.style.borderTop = "none";
acell.style.borderBottom = "none";
acell.style.borderLeft = "none";
acell.style.borderRight = "none";
acell.tbstr = acell.bbstr = acell.lbstr = acell.rbstr = "none";
break;
case "b2":
acell.style.borderBottom = bstr;
acell.bbstr = bstr;
break;
case "b3":
acell.style.borderLeft = bstr;
acell.lbstr = bstr;
break;
case "b4":
acell.style.borderRight = bstr;
acell.rbstr = bstr;
break;
case "b5":
acell.style.borderTop = bstr;
acell.tbstr = bstr;
break;

case "b6":
case "b7":
acell.style.borderBottom = bstr;
acell.style.borderLeft = bstr;
acell.style.borderRight = bstr;
acell.style.borderTop = bstr;
acell.tbstr = acell.bbstr = acell.lbstr = acell.rbstr = bstr;
break;
case "b8":
acell.style.borderTop = bstr;
acell.style.borderBottom = bstr;
acell.tbstr = acell.bbstr = bstr;
break;
}
}
else
{
switch (setborder)
{
case "b1":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
for (var c = range.startCol; c <= range.endCol; c++)
{
var o = olist.g.getCell(r, c);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderTop = "none";
o.style.borderBottom = "none";
o.style.borderLeft = "none";
o.style.borderRight = "none";
o.tbstr = o.bbstr = o.lbstr = o.rbstr = "none";
}
}
}
break;
case "b2":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
var r = range.endRow;
for (var c = range.startCol; c <= range.endCol; c++)
{
var o = olist.g.getCell(r, c);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderBottom = bstr;
o.bbstr = bstr;
}
}
break;
case "b3":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
var o = olist.g.getCell(r, range.startCol);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderLeft = bstr;
o.lbstr = bstr;
}
}
break;
case "b4":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
var o = olist.g.getCell(r, range.endCol);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderRight = bstr;
o.rbstr = bstr;
}
}
break;
case "b5":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var c = range.startCol; c <= range.endCol; c++)
{
var o = olist.g.getCell(range.startRow, c);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderTop = bstr;
o.tbstr = bstr;
}
}
break;
case "b6":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
for (var c = range.startCol; c <= range.endCol; c++)
{
var o = olist.g.getCell(r, c);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderTop = bstr;
o.style.borderBottom = bstr;
o.style.borderLeft = bstr;
o.style.borderRight = bstr;
o.tbstr = o.bbstr = o.lbstr = o.rbstr = bstr;
}
}
}
break;
case "b7":
setborder = "b2";
setBorders();
setborder = "b3";
setBorders();
setborder = "b4";
setBorders();
setborder = "b5";
setBorders();
break;
case "b8":
setborder = "b2";
setBorders();
setborder = "b5";
setBorders();
break;
}
}
}

function getattr(o, name)
{
if (o.attributes[name] != null)
return o.attributes[name].nodeValue;
return o.attributes[name];
}

+ 169
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/fontdlg_l.htm Wyświetl plik

@@ -0,0 +1,169 @@
<html>
<head>
<title>Font</title>
<!--Create the Dialog Helper Object--></head>
<BODY style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" bgColor="#dbd8d1" leftMargin="5" topMargin="5" onload="initDlg()" onunload="closeDlg()">
<script language="javascript" src="fontdlg_l.js"></script>
<table id="table3" style="BORDER-TOP: white 1px solid; FONT-SIZE: 9pt; WIDTH: 100%; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: gray" cellSpacing="2" cellPadding="2" border="0">
<tr>
<td width="30"><span id="btnFont" style="BORDER-RIGHT: white 1px inset; BORDER-TOP: white 1px inset; BORDER-LEFT: white 1px inset; CURSOR: pointer; BORDER-BOTTOM: white 1px inset; BACKGROUND-COLOR: #dbd8d1" onclick="showFont();">Font </span></td>
<td width="50"><span id="btnBorders" style="BORDER-RIGHT: white 1px outset; BORDER-TOP: white 1px outset; BORDER-LEFT: white 1px outset; CURSOR: pointer; BORDER-BOTTOM: white 1px outset; BACKGROUND-COLOR: #dbd8d1" onclick="showBorders();">Borders </span></td>
<td></td>
</tr>
</table>
<table id="table1" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse" cellPadding="2" border="0">
<tr>
<td>Font:<br>
<input id="txtFont" style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: Arial" type="text" onchange="OnFontChange1()" size="20">
</td>
<td>Style:<br>
<input id="txtStyle" style="FONT-SIZE: 9pt; WIDTH: 100px; FONT-FAMILY: Arial" readOnly type="text" size="20">
</td>
<td>Size:<br>
<input id="txtSize" style="FONT-SIZE: 9pt; WIDTH: 80px; FONT-FAMILY: Arial" type="text" onchange="OnSizeChange1()" size="20">
</td>
</tr>
<tr>
<td><select id="selFont" style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: Arial; HEIGHT: 150px" onchange="OnFontChange()" size="10"></select>
</td>
<td><select id="selStyle" style="FONT-SIZE: 9pt; WIDTH: 100px; FONT-FAMILY: Arial; HEIGHT: 150px" onchange="OnStyleChange()" size="10">
<option>Regular</option>
<option>Italic</option>
<option>Bold</option>
<option>Italic Bold</option>
</select></td>
<td><select id="selSize" style="FONT-SIZE: 9pt; WIDTH: 80px; FONT-FAMILY: Arial; HEIGHT: 150px" onchange="OnSizeChange()" size="10">
<option>6pt</option>
<option>8pt</option>
<option>9pt</option>
<option>10pt</option>
<option>11pt</option>
<option>12pt</option>
<option>14pt</option>
<option>16pt</option>
<option>18pt</option>
<option>20pt</option>
<option>22pt</option>
<option>24pt</option>
<option>26pt</option>
<option>28pt</option>
<option>36pt</option>
<option>48pt</option>
<option>72pt</option>
</select></td>
</tr>
<tr>
<td><input id="chkUnderline" onclick="OnUnderline()" type="checkbox" value="un">Underline<br>
<input id="chkStrike" onclick="OnLineThrough()" type="checkbox" value="st">Strikethrough<br>
</td>
<td colSpan="2">
</td>
</tr>
<tr>
<td></td>
<td colSpan="2"></td>
</tr>
<tr>
<td>Horizontal alignment:<br>
<select id="selHalign" style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: Arial">
<option selected></option>
<option value="left">Left</option>
<option value="center">Center</option>
<option value="right">Right</option>
<option value="justify">Justify</option>
</select><br>
</td>
<td colSpan="2">Vertical alignment:<br>
<select id="selValign" style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: Arial">
<option selected></option>
<option value="top">Top</option>
<option value="middle">Middle</option>
<option value="bottom">Bottom</option>
</select><br>
</td>
</tr>
<tr>
<td><input id="btnFC" style="BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BORDER-LEFT: 1px outset; WIDTH: 40px; BORDER-BOTTOM: 1px outset; HEIGHT: 20px" onclick="chooseColor();" type="button">
Font color<br>
<input id="btnBG" style="BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BORDER-LEFT: 1px outset; WIDTH: 40px; BORDER-BOTTOM: 1px outset; HEIGHT: 20px" onclick="chooseBgColor();" type="button">
Background<br>
</td>
<td colSpan="2">Preview:<br>
<div id="preview" contentEditable="true" style="BORDER-RIGHT: 2px inset; BORDER-TOP: 2px inset; OVERFLOW: auto; BORDER-LEFT: 2px inset; WIDTH: 178px; BORDER-BOTTOM: 2px inset; HEIGHT: 85px">Sample
Text
<div></div>
</div>
</td>
</tr>
</table>
<table id="table2" style="DISPLAY: none; FONT-SIZE: 9pt; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse" cellPadding="2" border="0">
<tr height="50">
<td valign="top">Border Line Style:</td>
<td valign="top">
<SELECT id="borderStyle" size="8" style="width:200px; font-size: 9pt; font-family: Arial;" onchange="setBorderWidthSelect(this.value)">
<OPTION>Dashed</OPTION>
<OPTION>Dotted</OPTION>
<OPTION selected>Solid</OPTION>
<OPTION>Double</OPTION>
<!-- <OPTION>Groove</OPTION>
<OPTION>Inset</OPTION>
<OPTION>Outset</OPTION>
<OPTION>Ridge</OPTION>-->
</SELECT>
</td>
</tr>
<tr height="25">
<td valign="top"><span id="borderlinelabel">Border Line Width:</span></td>
<td valign="top">
<SELECT id="borderWidth" size="1" style="width:200px; font-size: 9pt; font-family: Arial;">
<OPTION value="1px" selected>thin</OPTION>
<OPTION value="2px" >medium</OPTION>
<OPTION value="3px">thick</OPTION>
<!-- <OPTION>3px</OPTION>
<OPTION>4px</OPTION>
<OPTION>5px</OPTION>
<OPTION>6px</OPTION>
<OPTION>7px</OPTION>
<OPTION>8px</OPTION> -->
</SELECT>
</td>
</tr>
<tr height="25">
<td valign="top">Border Line Color:</span></td>
<td valign="top">
<input id="btnBorderColor" style="BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BORDER-LEFT: 1px outset; WIDTH: 40px; BORDER-BOTTOM: 1px outset; HEIGHT: 20px; background-color:black;" onclick="chooseBorderColor();" type="button">
</td>
</tr>
<tr height="50">
<td colspan="2">
<table width="100%">
<tr>
<td align="right"><img id="b1" src="b1.gif" style="border:3px ridge white; cursor:pointer; width:45px; height:45px;" onclick="clickBorderBtn(event);"></td>
<td align="right"><img id="b2" src="b2.gif" style="border:3px ridge white; cursor:pointer; width:45px; height:45px;" onclick="clickBorderBtn(event);"></td>
<td align="right"><img id="b3" src="b3.gif" style="border:3px ridge white; cursor:pointer; width:45px; height:45px;" onclick="clickBorderBtn(event);"></td>
<td align="right"><img id="b4" src="b4.gif" style="border:3px ridge white; cursor:pointer; width:45px; height:45px;" onclick="clickBorderBtn(event);"></td>
</tr>
<tr>
<td align="right"><img id="b5" src="b5.gif" style="border:3px ridge white; cursor:pointer; width:45px; height:45px;" onclick="clickBorderBtn(event);"></td>
<td align="right"><img id="b6" src="b6.gif" style="border:3px ridge white; cursor:pointer; width:45px; height:45px;" onclick="clickBorderBtn(event);"></td>
<td align="right"><img id="b7" src="b7.gif" style="border:3px ridge white; cursor:pointer; width:45px; height:45px;" onclick="clickBorderBtn(event);"></td>
<td align="right"><img id="b8" src="b8.gif" style="border:3px ridge white; cursor:pointer; width:45px; height:45px;" onclick="clickBorderBtn(event);"></td>
</tr>
</table>
</td>
</tr>
<tr>
</tr>
</table>
<table width="343" border="0" cellpadding="5" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse">
<tr>
<td width="100%" align="right">
<input type="button" value="OK" style="FONT-SIZE: 9pt; WIDTH: 90px; FONT-FAMILY: Arial; HEIGHT: 25px" onclick="FontOk()">
<input type="button" value="Cancel" style="FONT-SIZE: 9pt; WIDTH: 90px; FONT-FAMILY: Arial; HEIGHT: 25px" onclick="window.close()">
</td>
</tr>
</table>
</BODY>
</html>

+ 643
- 0
Learun.Framework.Ultimate V7/packages/Aspose.Cells.20.10.0/acw_client/fontdlg_l.js Wyświetl plik

@@ -0,0 +1,643 @@
//Copyright (c) 2001-2016 Aspose Pty Ltd. All Rights Reserved.

//Copyright (c) 2001-2012 Aspose Pty Ltd. All Rights Reserved.

/*****************************************************
* Aspose.Cells.GridWeb Component Script File
* Copyright 2003-2011, All Rights Reserverd.
* V2.5.1
*****************************************************/
var acell;
var olist = null;
var setborder = null;
var _element;

function initDlg()
{
_element = window.opener.acwDialogElement;
if (_element._selections != null && _element._selections.list.length > 0)
{
olist = _element._selections;
var range = olist.list[0];
acell = _element.getCell(range.startRow, range.startCol);
}
else
acell = _element.ActiveCell;
table2.style.height = table1.offsetHeight;
window.innerWidth = table1.offsetWidth;
window.innerHeight = document.body.offsetHeight;

getSystemFonts();
if (!acell.tdstyle)
{
try {copyStyles();}
catch (ex) {}
acell.tdstyle = true;
}

preview.style.fontFamily = txtFont.value = acell.style.fontFamily;
preview.style.fontStyle = acell.style.fontStyle;
preview.style.fontWeight = acell.style.fontWeight;
preview.style.display = "table-cell";
preview.style.verticalAlign = acell.style.verticalAlign;
preview.parentNode.align = acell.align;

var tmps = "";
if (acell.style.fontStyle != "" && acell.style.fontStyle != "normal")
tmps += "Italic";
if (acell.style.fontWeight != "" && acell.style.fontWeight != "normal")
{
if (tmps != "")
tmps += " Bold";
else
tmps = "Bold";
}
if (tmps == "")
tmps = "Regular";

txtStyle.value = tmps;
preview.style.fontSize = txtSize.value = acell.style.fontSize;
preview.style.color = btnFC.style.backgroundColor = acell.orgColor;
preview.style.backgroundColor = btnBG.style.backgroundColor = acell.orgBgColor;
for (var op1 = 0; op1 < selHalign.options.length; op1++)
{
if (selHalign.options[op1].value == acell.align)
{
selHalign.selectedIndex = op1;
break;
}
}
for (var op1 = 0; op1 < selValign.options.length; op1++)
{
if (selValign.options[op1].value == acell.style.verticalAlign)
{
selValign.selectedIndex = op1;
break;
}
}

preview.style.textDecorationUnderline = chkUnderline.checked = acell.style.textDecoration.indexOf("underline") != -1;
preview.style.textDecorationLineThrough = chkStrike.checked = acell.style.textDecoration.indexOf("line-through") != -1;

var itext = acell.innerText;
if (itext != null && itext != "")
preview.innerText = itext;

selValign.onchange = function () {
preview.style.verticalAlign = this.value;
};
selHalign.onchange = function () {
preview.parentNode.align = this.value;
};
}

function copyStyles()
{
acell.style.textDecoration = "none";
for (var s1 = 0; s1 < acell.ownerDocument.styleSheets.length; s1++)
{
var styleSheet = acell.ownerDocument.styleSheets[s1];
for (var s2 = 0; s2 < styleSheet.cssRules.length; s2++)
{
var rule = styleSheet.cssRules[s2];
if (rule.selectorText == "."+acell.className)
{
acell.style.fontFamily = rule.style.fontFamily;
acell.style.fontStyle = rule.style.fontStyle;
acell.style.fontWeight = rule.style.fontWeight;
acell.style.fontSize = rule.style.fontSize;
acell.orgColor = rule.style.color;
acell.orgBgColor = rule.style.backgroundColor;
acell.style.textAlign = rule.style.textAlign;
acell.style.verticalAlign = acell.vAlign;
acell.style.textDecoration = rule.style.textDecoration;
s1 = acell.ownerDocument.styleSheets.length;
break;
}
}
}
}

function getSystemFonts()
{
var fArray = new Array("System","Terminal","Fixedsys","Roman","Script","Modern","Small Fonts","MS Serif","WST_Czec","WST_Engl","WST_Fren","WST_Germ","WST_Ital","WST_Span","WST_Swed","Courier","MS ,ans Serif","Marlett","Arial","Courier New","Lucida Console","Lucida Sans Unicode","Times New ,oman","Wingdings","Symbol","Verdana","Arial Black","Comic Sans MS","Impact","Georgia","Franklin ,othic Medium","Palatino Linotype","Tahoma","Trebuchet MS","Webdings","Estrangelo Edessa","Gautami","Latha","Mangal","MV Boli","Raavi","Shruti","Tunga","Sylfaen","Microsoft Sans ,erif","MS Mincho","MS PMincho","MS Gothic","MS PGothic","MS UI Gothic","Gulim","GulimChe","Dotum","DotumChe","Batang","BatangChe","Gungsuh","GungsuhChe","MingLiU","PMingLiU","Agency FB","Algerian","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Baskerville Old Face","Bauhaus 93","Bell MT","Berlin Sans FB","Bernard MT Condensed","Blackadder ITC","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster ,ompressed","Book Antiqua","Bookman Old Style","Bradley Hand ITC","Britannic Bold","Broadway","Brush Script MT","Californian FB","Calisto MT","Castellar","Centaur","Century","Century Gothic","Century Schoolbook","Chiller","Colonna MT","Cooper Black","Copperplate Gothic Bold","Copperplate Gothic Light","Curlz MT","Edwardian ,cript ITC","Elephant","Engravers MT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ,TC","Felix Titling","Footlight MT Light","Forte","Franklin Gothic Book","Franklin Gothic Demi","Franklin Gothic Demi Cond","Franklin Gothic Heavy","Franklin Gothic Medium Cond","Freestyle ,cript","French Script MT","Garamond","Gigi","Gill Sans MT Ext Condensed Bold","Gill Sans MT","Gill ,ans MT Condensed","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gloucester MT Extra ,ondensed","Goudy Old Style","Goudy Stout","Haettenschweiler","Harlow Solid Italic","Harrington","High Tower Text","Imprint MT Shadow","Jokerman","Juice ITC","Kristen ITC","Kunstler Script","Lucida Bright","Lucida Calligraphy","Lucida Fax","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","MS Outlook","Magneto","Maiandra GD","Matura MT ,cript Capitals","Mistral","Modern No. 20","Monotype Corsiva","Niagara Engraved","Niagara Solid","OCR A Extended","Old English Text MT","Onyx","Palace Script MT","Papyrus","Parchment","Perpetua","Perpetua Titling MT","Playbill","Poor Richard","Pristina","Rage Italic","Ravie","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Informal Roman","Script MT Bold","Showcard Gothic","Snap ITC","Stencil","Tw Cen MT","Tw Cen ,T Condensed","Tempus Sans ITC","Viner Hand ITC","Vivaldi","Vladimir Script","Wide Latin","Wingdings 2","Wingdings 3","Berlin Sans FB Demi","MS Reference Sans Serif","MS Reference ,pecialty","Tw Cen MT Condensed Extra Bold","MT Extra","Bookshelf Symbol 7","Kingsoft Phonetic ,lain","Basemic","Basemic Symbol","Basemic Times","Addled","Calligraphic","DicotMedium","Geotype ,T","Harvest","HarvestItal","Lissen","PalentItal","Palent","Unpact","Whimsy TT");
var oDropDown = selFont;
for (var i = 0;i < fArray.length;i++)
{
var oOption = document.createElement("OPTION");
oDropDown.appendChild(oOption);
oOption.text = fArray[i];
oOption.Value = i;
}
}

function chooseColor() {
var url = window.location.pathname;
var lastIndex = url.lastIndexOf("/");
var colordlghtml = url.substr(0, lastIndex) + "/colordlg.htm";
window.colorElement = btnFC;
window.colorChanged = OnForeColorChange;
window.open(colordlghtml, "colordlg", "chrome,dependent,dialog,modal");
}

function chooseBgColor() {
var url = window.location.pathname;
var lastIndex = url.lastIndexOf("/");
var colordlghtml = url.substr(0, lastIndex) + "/colordlg.htm";
window.colorElement = btnBG;
window.colorChanged = OnBGColorChange;
window.open(colordlghtml, "colordlg", "chrome,dependent,dialog,modal");
}

function chooseBorderColor() {
var url = window.location.pathname;
var lastIndex = url.lastIndexOf("/");
var colordlghtml = url.substr(0, lastIndex) + "/colordlg.htm";
window.colorElement = btnBorderColor;
window.colorChanged = OnBorderColorChange;
window.open(colordlghtml, "colordlg", "chrome,dependent,dialog,modal");
}

function OnForeColorChange()
{
preview.style.color = btnFC.style.backgroundColor;
}

function OnBGColorChange()
{
preview.style.backgroundColor = btnBG.style.backgroundColor;
}

function OnBorderColorChange()
{
}

function OnFontChange()
{
txtFont.value = selFont.options[selFont.selectedIndex].text;
OnFontChange1();
}

function OnFontChange1()
{
preview.style.fontFamily = txtFont.value;
}

function OnStyleChange()
{
txtStyle.value = selStyle.options[selStyle.selectedIndex].text;
switch (txtStyle.value)
{
case "Regular":
preview.style.fontStyle="normal";
preview.style.fontWeight="normal";
break;
case "Italic":
preview.style.fontStyle="italic";
preview.style.fontWeight="normal";
break;
case "Bold":
preview.style.fontStyle="normal";
preview.style.fontWeight="bold";
break;
case "Italic Bold":
preview.style.fontStyle="italic";
preview.style.fontWeight="bold";
break;
}
}

function OnSizeChange()
{
txtSize.value = selSize.options[selSize.selectedIndex].text;
OnSizeChange1();
}

function OnSizeChange1()
{
preview.style.fontSize = txtSize.value;
}

function OnUnderline()
{
preview.style.textDecorationUnderline = chkUnderline.checked;
}

function OnLineThrough()
{
preview.style.textDecorationLineThrough = chkStrike.checked;
}

function FontOk()
{
if (setborder != null)
setBorders();
if (getattr(acell, "protected") == "1")
acell = document.createElement("TD");
acell.styleStr = acell.style.fontFamily = txtFont.value;
acell.styleStr += "|";
switch (txtStyle.value)
{
case "Regular":
acell.style.fontStyle = "normal";
acell.style.fontWeight = "normal";
acell.styleStr += "r|";
break;
case "Italic":
acell.style.fontStyle = "italic";
acell.style.fontWeight = "normal";
acell.styleStr += "i|";
break;
case "Bold":
acell.style.fontStyle = "normal";
acell.style.fontWeight = "bold";
acell.styleStr += "b|";
break;
case "Italic Bold":
acell.style.fontStyle = "italic";
acell.style.fontWeight = "bold";
acell.styleStr += "ib|";
break;

default:
acell.style.fontStyle = "normal";
acell.style.fontWeight = "normal";
acell.styleStr += "r|";
break;
}
acell.style.fontSize = txtSize.value;
if (chkUnderline.checked)
acell.style.textDecoration = "underline";
else
acell.style.textDecoration = "";
if (chkStrike.checked)
{
if (chkUnderline.checked)
acell.style.textDecoration += " line-through";
else
acell.style.textDecoration = "line-through";
}
if (!chkUnderline.checked && !chkStrike.checked)
acell.style.textDecoration = "none";

var color = acell.orgColor = btnFC.style.backgroundColor;
var bcolor = acell.orgBgColor = btnBG.style.backgroundColor;
if (color != null && color != "" && color.charAt(0) != "#")
color = transColor(color);
if (bcolor != null && bcolor != "" && bcolor.charAt(0) != "#")
bcolor = transColor(bcolor);
//acell.style.textAlign = selHalign.options[selHalign.selectedIndex].value;
acell.style.verticalAlign = selValign.options[selValign.selectedIndex].value;
//new added
acell.align =selHalign.options[selHalign.selectedIndex].value;
acell.styleStr += txtSize.value + "|" + chkUnderline.checked + "|"
+ chkStrike.checked + "|" + color + "|" + bcolor
+ "|" + selHalign.options[selHalign.selectedIndex].value + "|" + selValign.options[selValign.selectedIndex].value;

if (olist != null)
{
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
for (var c = range.startCol; c <= range.endCol; c++)
{
var cell = olist.g.getCell(r, c);
if (cell != null && cell != acell && getattr(cell, "protected") != "1")
{
cell.styleStr = acell.styleStr + "|" + (cell.tbstr!=null?cell.tbstr:"") + "|" + (cell.bbstr!=null?cell.bbstr:"") + "|" + (cell.lbstr!=null?cell.lbstr:"") + "|" + (cell.rbstr!=null?cell.rbstr:"");
cell.style.fontFamily = acell.style.fontFamily;
cell.style.fontStyle = acell.style.fontStyle;
cell.style.fontWeight = acell.style.fontWeight;
cell.style.fontSize = acell.style.fontSize;
cell.style.textDecoration = acell.style.textDecoration;
cell.orgColor = acell.orgColor;
cell.orgBgColor = acell.orgBgColor;
//cell.style.textAlign = acell.style.textAlign;
cell.align = acell.align;
cell.style.verticalAlign = acell.style.verticalAlign;
}
}
}
}
}
acell.styleStr = acell.styleStr + "|" + (acell.tbstr!=null?acell.tbstr:"") + "|" + (acell.bbstr!=null?acell.bbstr:"") + "|" + (acell.lbstr!=null?acell.lbstr:"") + "|" + (acell.rbstr!=null?acell.rbstr:"");
_element.closeFontDialog();
window.returnValue = true;
window.close();
window.opener.fontdialogcallback();
}

function showFont()
{
btnFont.style.border = "1px inset white";
btnBorders.style.border = "1px outset white";
table1.style.display = "block";
table2.style.display = "none";
}

function showBorders()
{
btnBorders.style.border = "1px inset white";
btnFont.style.border = "1px outset white";
table1.style.display = "none";
table2.style.display = "block";
}

function clickBorderBtn(ev)
{
var o = ev.target;
var id = o.id;
var i;
for (i = 1; i<=8; i++)
{
eval("b"+i+".style.border='3px ridge white';");
}
o.style.border = "3px inset white";
setborder = id;
}

function transColor(color)
{
var rx = /^rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\s*\)$/;
var matches = rx.exec(color);
if (matches != null)
{
var sColor = Number(Number(matches[1])*65536+Number(matches[2])*256+Number(matches[3]));
sColor = sColor.toString(16);
var sTempString = "#000000".substring(0,7-sColor.length);
sColor = sTempString.concat(sColor);
return sColor;
}
return "";
}


function setBorderWidthSelect (it) {
if(it=="Dashed")
{ //only thin ,medium for dashed options
if(borderWidth.options.length==3)
{borderWidth.options.remove(2);
}
}else
{ //thin,medium,thick for other options
if(borderWidth.options.length==2){
var option=document.createElement("option");
option.value="3px";
option.text="thick";
borderWidth.options.add(option);
}
}
if(it=="Double"||it=="Dotted")
{borderlinelabel.style.display="none";
borderWidth.style.display="none";
if(it=="Double")
{//3px for double
borderWidth.selectedIndex=2;
}else{
//2px for dotted in order to show it,if we set 1px,we can not see the effect in the browser,
//however in the server code ,the dotted is only dotted type it does not care the border width
borderWidth.selectedIndex=1;
}
}else
{ borderlinelabel.style.display="block";
borderWidth.style.display="block";
}
}

function setBorders()
{
var bcolor = btnBorderColor.style.backgroundColor;
if (bcolor != null && bcolor != "")
bcolor = transColor(bcolor);
var bstr = borderWidth.options[borderWidth.selectedIndex].value + " " + borderStyle.options[borderStyle.selectedIndex].text + " " + bcolor;
if (olist == null)
{
switch (setborder)
{
case "b1":
acell.style.borderTop = "none";
acell.style.borderBottom = "none";
acell.style.borderLeft = "none";
acell.style.borderRight = "none";
acell.tbstr = acell.bbstr = acell.lbstr = acell.rbstr = "none";
break;
case "b2":
acell.style.borderBottom = bstr;
acell.bbstr = bstr;
break;
case "b3":
acell.style.borderLeft = bstr;
acell.lbstr = bstr;
break;
case "b4":
acell.style.borderRight = bstr;
acell.rbstr = bstr;
break;
case "b5":
acell.style.borderTop = bstr;
acell.tbstr = bstr;
break;

case "b6":
case "b7":
acell.style.borderBottom = bstr;
acell.style.borderLeft = bstr;
acell.style.borderRight = bstr;
acell.style.borderTop = bstr;
acell.tbstr = acell.bbstr = acell.lbstr = acell.rbstr = bstr;
break;
case "b8":
acell.style.borderTop = bstr;
acell.style.borderBottom = bstr;
acell.tbstr = acell.bbstr = bstr;
break;
}
}
else
{
switch (setborder)
{
case "b1":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
for (var c = range.startCol; c <= range.endCol; c++)
{
var o = olist.g.getCell(r, c);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderTop = "none";
o.style.borderBottom = "none";
o.style.borderLeft = "none";
o.style.borderRight = "none";
o.tbstr = o.bbstr = o.lbstr = o.rbstr = "none";
}
}
}
break;
case "b2":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
var r = range.endRow;
for (var c = range.startCol; c <= range.endCol; c++)
{
var o = olist.g.getCell(r, c);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderBottom = bstr;
o.bbstr = bstr;
}
}
break;
case "b3":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
var o = olist.g.getCell(r, range.startCol);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderLeft = bstr;
o.lbstr = bstr;
}
}
break;
case "b4":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
var o = olist.g.getCell(r, range.endCol);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderRight = bstr;
o.rbstr = bstr;
}
}
break;
case "b5":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var c = range.startCol; c <= range.endCol; c++)
{
var o = olist.g.getCell(range.startRow, c);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderTop = bstr;
o.tbstr = bstr;
}
}
break;
case "b6":
for (var i = 0; i < olist.list.length; i++)
{
var range = olist.list[i];
for (var r = range.startRow; r <= range.endRow; r++)
{
for (var c = range.startCol; c <= range.endCol; c++)
{
var o = olist.g.getCell(r, c);
if (o == null || getattr(o, "protected") == "1") continue;
o.style.borderTop = bstr;
o.style.borderBottom = bstr;
o.style.borderLeft = bstr;
o.style.borderRight = bstr;
o.tbstr = o.bbstr = o.lbstr = o.rbstr = bstr;
}
}
}
break;
case "b7":
setborder = "b2";
setBorders();
setborder = "b3";
setBorders();
setborder = "b4";
setBorders();
setborder = "b5";
setBorders();
break;
case "b8":
setborder = "b2";
setBorders();
setborder = "b5";
setBorders();
break;
}
}
}

function disableEvent(ele)
{
_omd = ele.onmousedown;
_omu = ele.onmouseup;
_oc = ele.onclick;
_omo = ele.onmouseover;
_odc = ele.ondblclick;
_omm = ele.onmousemove;
_ocm = ele.oncontextmenu;
ele.onmousedown = null;
ele.onmouseup = null;
ele.onclick = null;
ele.onmouseover = null;
ele.ondblclick = null;
ele.onmousemove = null;
ele.oncontextmenu = null;
}

function enableEvent(ele)
{
ele.onmousedown = _omd;
ele.onmouseup = _omu;
ele.onclick = _oc;
ele.onmouseover = _omo;
ele.ondblclick = _odc;
ele.onmousemove = _omm;
ele.oncontextmenu = _ocm;
}

function closeDlg()
{
window.opener.acwDialogWindow = null;
}

function getattr(o, name)
{
if (o.attributes[name] != null)
return o.attributes[name].nodeValue;
return o.attributes[name];
}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików

Ładowanie…
Anuluj
Zapisz