synapp_main_form.js 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. var MainFormHTML = "<input type=\"button\" value=\"Test\" id=\"Test_btn\" />"+
  2. "<input type=\"button\" value=\"Test\" id=\"Test_btn1\" />"+
  3. "<div id=\"jqxgrid\"> </div>";
  4. // prepare the data
  5. var GridSource =
  6. {
  7. datatype: "xml",
  8. datafields: [
  9. { name: 'Name', type: 'string' },
  10. { name: 'LPath', map: 'LPath', type: 'string' },
  11. { name: 'RPath', map: 'RPath', type: 'string' },
  12. { name: 'Progress', type: 'string' } ],
  13. addrow: function (rowid, rowdata, position, commit) {
  14. // synchronize with the server - send insert command
  15. // call commit with parameter true if the synchronization with the server is successful
  16. //and with parameter false if the synchronization failed.
  17. // you can pass additional argument to the commit callback which represents the new ID if it is generated from a DB.
  18. commit(true);
  19. },
  20. deleterow: function (rowid, commit)
  21. {
  22. // synchronize with the server - send delete command
  23. // call commit with parameter true if the synchronization with the server is successful
  24. //and with parameter false if the synchronization failed.
  25. $.post( "post_deleteprofile.php", { ProfileName : rowid } ).done(function( data )
  26. {
  27. if( data == 'OK' )
  28. {
  29. commit(true);
  30. }
  31. });
  32. },
  33. root: "Profiles",
  34. record: "Profile",
  35. id: 'Name',
  36. url: "profiles.xml"
  37. };
  38. var GridDataAdapter = new $.jqx.dataAdapter( GridSource,
  39. {
  40. downloadComplete: function (data, status, xhr) { },
  41. loadComplete: function (data) { },
  42. loadError: function (xhr, status, error) { alert(error); }
  43. });
  44. var ProfileSource =
  45. {
  46. datafields: [
  47. { name: 'Name', type: 'string' },
  48. { name: 'LPath', map: 'LPath', type: 'string' },
  49. { name: 'RPath', map: 'RPath', type: 'string' },
  50. { name: 'Progress', type: 'string' },
  51. { name: 'LTR', map: 'LTR', type: 'boolean' },
  52. { name: 'RTL', map: 'RTL', type: 'boolean' },
  53. { name: 'RightFTPSettings', map : 'Internet>RightFTPSettings' },
  54. { name: 'IncludeSubfoldersWidget', map: 'IncludeSubfoldersWidget', type: 'string' },
  55. { name: 'SyncOperationModeWidget', map: 'SyncOperationModeWidget', type: 'string' },
  56. { name: 'LeftProtocolName', type: 'string' },
  57. { name: 'RightProtocolName', type: 'string' },
  58. //Tab Shedule/Shedule
  59. { name: 'SheduleThisProfile', map: 'SheduleThisProfile', type: 'boolean' },
  60. { name: 'SpecifyNextRun', map: 'SpecifyNextRun', type: 'boolean' },
  61. { name: 'IntervalSpecification', map: 'IntervalSpecification', type: 'boolean' },
  62. { name: 'RunModeRadiogroupWidget', map: 'RunModeRadiogroupWidget' },
  63. { name: 'Run_Every_Day_Time_Input', map: 'Run_Every_Day_Time_Input', type: 'date' },
  64. { name: 'ScheduleDays', map: 'ScheduleDays', type: 'number' },
  65. { name: 'ScheduleHours', map: 'ScheduleHours', type: 'number' },
  66. { name: 'ScheduleMinutes', map: 'ScheduleMinutes', type: 'number' },
  67. { name: 'ScheduleSec', map: 'ScheduleSec', type: 'number' },
  68. //Tab Shedule/More
  69. { name: 'SheduleRunUponWinLogin', map: 'SheduleRunUponWinLogin', type: 'boolean' },
  70. { name: 'SheduleRunUponShutdownAndLogOut', map: 'SheduleRunUponShutdownAndLogOut', type: 'boolean' },
  71. { name: 'SheduleRunMissedDaylyJob', map: 'SheduleRunMissedDaylyJob', type: 'boolean' },
  72. { name: 'SheduleAddRandomDelayUpTo', map: 'SheduleAddRandomDelayUpTo', type: 'boolean' },
  73. { name: 'SheduleWarnIfProfileNotRunFor', map: 'SheduleWarnIfProfileNotRunFor', type: 'boolean' },
  74. { name: 'AddRandomDelay_Time_Input', map: 'AddRandomDelay_Time_Input', type: 'number' },
  75. { name: 'WarnIfProfileNotRunFor_Time_Input', map: 'WarnIfProfileNotRunFor_Time_Input', type: 'number' },
  76. // Tab Shedule/Weekdays
  77. { name: 'Monday', map: 'Monday', type: 'boolean' },
  78. { name: 'Tuesday', map: 'Tuesday', type: 'boolean' },
  79. { name: 'Wednesday', map: 'Wednesday', type: 'boolean' },
  80. { name: 'Thursday', map: 'Thursday', type: 'boolean' },
  81. { name: 'Friday', map: 'Friday', type: 'boolean' },
  82. { name: 'Saturday', map: 'Saturday', type: 'boolean' },
  83. { name: 'Sunday', map: 'Sunday', type: 'boolean' },
  84. //Tab Shedule Monitoring/Realtime
  85. { name: 'RealTimeSynchronization', map: 'RealTimeSynchronization', type: 'boolean' },
  86. { name: 'RealContinuousSync', map: 'RealContinuousSync', type: 'boolean' },
  87. { name: 'RealProfileAsSoonAsDriveAvailable', map: 'RealProfileAsSoonAsDriveAvailable', type: 'boolean' },
  88. //Tab AccessAndRetries/File Access
  89. { name: 'VolumeShadowingRadiogroupWidget', map: 'VolumeShadowingRadiogroupWidget' },
  90. { name: 'FADatabaseSafeCopy', map: 'FADatabaseSafeCopy', type: 'boolean' },
  91. { name: 'FATakeAdminOwnership', map: 'FATakeAdminOwnership', type: 'boolean' },
  92. { name: 'FATakeAdminOwnership', map: 'FATakeAdminOwnership', type: 'boolean' },
  93. { name: 'FAVerifyOpeningPriorCopy', map: 'FAVerifyOpeningPriorCopy', type: 'boolean' },
  94. //Tab AccessAndRetries/Wait and Retry
  95. { name: 'WRWaitForFileAccess', map: 'WRWaitForFileAccess', type: 'boolean' },
  96. { name: 'WRWaitIfTransferProblem', map: 'WRWaitIfTransferProblem', type: 'boolean' },
  97. { name: 'WRBuildingFileList', map: 'WRBuildingFileList', type: 'boolean' },
  98. { name: 'WRRunningTheProfile', map: 'WRRunningTheProfile', type: 'boolean' },
  99. { name: 'WRWaitUpToMin', map: 'WRWaitUpToMin', type: 'number' },
  100. { name: 'WRReRunRadiogroupWidget', map: 'WRReRunRadiogroupWidget' },
  101. { name: 'WRMaxReRuns', map: 'WRMaxReRuns', type: 'number' },
  102. { name: 'WRRetryAfter', map: 'WRRetryAfter', type: 'number' },
  103. { name: 'WRAvoidRerunDueToLocked', map: 'WRAvoidRerunDueToLocked', type: 'boolean' },
  104. //Tab Comparison Comparison
  105. { name: 'ComparIgnoreSmallTimeDiff', map: 'ComparIgnoreSmallTimeDiff', type: 'boolean' },
  106. { name: 'ComparIgnoreExactHourTimeDiff', map: 'ComparIgnoreExactHourTimeDiff', type: 'boolean' },
  107. { name: 'ComparIgnoreSec', map: 'ComparIgnoreSec', type: 'number' },
  108. { name: 'ComparIgnoreHours', map: 'ComparIgnoreHours', type: 'number' },
  109. { name: 'ComparIgnoreSeconds', map: 'ComparIgnoreSeconds', type: 'boolean' },
  110. { name: 'ComparIgnoreTimestampAlltogether', map: 'ComparIgnoreTimestampAlltogether', type: 'boolean' },
  111. { name: 'ComparWhenSizeIsDiffentRadiogroupWidget', map: 'ComparWhenSizeIsDiffentRadiogroupWidget' },
  112. //Tab Comparison More
  113. { name: 'ComparMoreAlwaysCopyFiles', map: 'ComparMoreAlwaysCopyFiles', type: 'boolean' },
  114. { name: 'ComparMoreBinaryComparison', map: 'ComparMoreBinaryComparison', type: 'boolean' },
  115. { name: 'ComparMoreBinaryLeftSide', map: 'ComparMoreBinaryLeftSide', type: 'boolean' },
  116. { name: 'ComparMoreBinaryRightSide', map: 'ComparMoreBinaryRightSide', type: 'boolean' },
  117. { name: 'ComparMoreFileAttributeComparison', map: 'ComparMoreFileAttributeComparison', type: 'boolean' },
  118. { name: 'ComparMoreCaseSencivity', map: 'ComparMoreCaseSencivity', type: 'boolean' },
  119. { name: 'ComparMoreVerifySyncStatistics', map: 'ComparMoreVerifySyncStatistics', type: 'boolean' },
  120. { name: 'ComparMoreFolderAttributeComparison', map: 'ComparMoreFolderAttributeComparison', type: 'boolean' },
  121. { name: 'ComparMoreFolderTimestampComparison', map: 'ComparMoreFolderTimestampComparison', type: 'boolean' },
  122. { name: 'ComparMoreDetectHardLinks', map: 'ComparMoreDetectHardLinks', type: 'boolean' },
  123. { name: 'ComparMoreEnforceHardLinks', map: 'ComparMoreEnforceHardLinks', type: 'boolean' },
  124. //Tab Files Files
  125. { name: 'FilesDetectMovedFiles', map: 'FilesDetectMovedFiles', type: 'boolean' },
  126. { name: 'FilesDetectMovedFilesRadiogroupWidget', map: 'FilesDetectMovedFilesRadiogroupWidget' },
  127. { name: 'FilesDetectRenamedFiles', map: 'FilesDetectRenamedFiles', type: 'boolean' },
  128. { name: 'FilesVerifyCopiedFiles', map: 'FilesVerifyCopiedFiles', type: 'boolean' },
  129. { name: 'FilesReCopyOnce', map: 'FilesReCopyOnce', type: 'boolean' },
  130. { name: 'FilesAutomaticallyResume', map: 'FilesAutomaticallyResume', type: 'boolean' },
  131. { name: 'FilesProtectFromBeingReplaced', map: 'FilesProtectFromBeingReplaced', type: 'boolean' },
  132. { name: 'FilesDoNotScanDestination', map: 'FilesDoNotScanDestination', type: 'boolean' },
  133. { name: 'FilesBypassFilesBuffering', map: 'FilesBypassFilesBuffering', type: 'boolean' },
  134. { name: 'FilesNumberToCopyInparallel', map: 'FilesNumberToCopyInparallel', type: 'number' },
  135. //Tab Files Deletions
  136. { name: 'FilesDeletions_OverritenFiles', map: 'FilesDeletions_OverritenFiles', type: 'boolean' },
  137. { name: 'FilesDeletions_DeletedFiles', map: 'FilesDeletions_DeletedFiles', type: 'boolean' },
  138. { name: 'FilesDeletions_MoveFilesToSFolder', map: 'FilesDeletions_MoveFilesToSFolder', type: 'boolean' },
  139. { name: 'FilesDeletions_DeleteOlderVersionsPermamently', map: 'FilesDeletions_DeleteOlderVersionsPermamently', type: 'boolean' },
  140. { name: 'FilesDeletions_DoubleCheckNonExistence', map: 'FilesDeletions_DoubleCheckNonExistence', type: 'boolean' },
  141. { name: 'FilesDeletions_NeverDelete', map: 'FilesDeletions_NeverDelete', type: 'boolean' },
  142. { name: 'FilesDeletions_DeleteBeforeCopying', map: 'FilesDeletions_DeleteBeforeCopying', type: 'boolean' },
  143. //Tab Files More
  144. { name: 'FilesMore_UseWindowsApi', map: 'FilesMore_UseWindowsApi', type: 'boolean' },
  145. { name: 'FilesMore_UseSpeedLimit', map: 'FilesMore_UseSpeedLimit', type: 'boolean' },
  146. { name: 'FilesMore_SpeedLimit', map: 'FilesMore_SpeedLimit', type: 'float' },
  147. { name: 'FilesMore_NeverReplace', map: 'FilesMore_NeverReplace', type: 'boolean' },
  148. { name: 'FilesMore_AlwaysAppend', map: 'FilesMore_AlwaysAppend', type: 'boolean' },
  149. { name: 'FilesMore_AlwaysConsider', map: 'FilesMore_AlwaysConsider', type: 'boolean' },
  150. { name: 'FilesMore_CheckDestinationFile', map: 'FilesMore_CheckDestinationFile', type: 'boolean' },
  151. { name: 'FilesMore_AndCompareFileDetails', map: 'FilesMore_AndCompareFileDetails', type: 'boolean' },
  152. { name: 'FilesMore_CopiedFilesSysTime', map: 'FilesMore_CopiedFilesSysTime', type: 'boolean' },
  153. { name: 'FilesMore_PreserveLastAccessOnSource', map: 'FilesMore_PreserveLastAccessOnSource', type: 'boolean' },
  154. { name: 'FilesMore_CopyOnlyFilesPerRun', map: 'FilesMore_CopyOnlyFilesPerRun', type: 'boolean' },
  155. { name: 'FilesMore_FilesPerRun', map: 'FilesMore_FilesPerRun', type: 'decimal' },
  156. { name: 'FilesMore_IgnoreGlobalSpeedLimit', map: 'FilesMore_IgnoreGlobalSpeedLimit', type: 'boolean' },
  157. { name: 'FilesMore_DontAddAnyFiles', map: 'FilesMore_DontAddAnyFiles', type: 'boolean' },
  158. //Tab Folders
  159. { name: 'Folders_CreateEmptyFolders', map: 'Folders_CreateEmptyFolders', type: 'boolean' },
  160. { name: 'Folders_RemoveEmptiedFolders', map: 'Folders_RemoveEmptiedFolders', type: 'boolean' },
  161. { name: 'Folders_OnRightSideCreateFolderEachTime', map: 'Folders_OnRightSideCreateFolderEachTime', type: 'boolean' },
  162. { name: 'Folders_IncludeTimeOfDay', map: 'Folders_IncludeTimeOfDay', type: 'boolean' },
  163. { name: 'Folders_FlatRightSide', map: 'Folders_FlatRightSide', type: 'boolean' },
  164. { name: 'Folders_CopyLatestFileIfExists', map: 'Folders_CopyLatestFileIfExists', type: 'boolean' },
  165. { name: 'Folders_EnsureFolderTimestamps', map: 'Folders_EnsureFolderTimestamps', type: 'boolean' },
  166. { name: 'Folders_UseIntermediateLocation', map: 'Folders_UseIntermediateLocation', type: 'boolean' },
  167. //Tab Job
  168. { name: 'Job_ExecuteCommand', map: 'Job_ExecuteCommand', type: 'boolean' },
  169. { name: 'Job_OverrideEmailSettings', map: 'Job_OverrideEmailSettings', type: 'boolean' },
  170. { name: 'Job_RunAsUser', map: 'Job_RunAsUser', type: 'boolean' },
  171. { name: 'Job_NetworkConnections', map: 'Job_NetworkConnections', type: 'boolean' },
  172. { name: 'Job_VerifyRightSideVolume', map: 'Job_VerifyRightSideVolume', type: 'boolean' },
  173. { name: 'Job_UseExternalCopyingTool', map: 'Job_UseExternalCopyingTool', type: 'boolean' },
  174. { name: 'Job_ShowCheckboxesInPreview', map: 'Job_ShowCheckboxesInPreview', type: 'boolean' },
  175. { name: 'Job_CheckFreeSpaceBeforeCopying', map: 'Job_CheckFreeSpaceBeforeCopying', type: 'boolean' },
  176. { name: 'Job_IgnoreInternetConnectivityCheck', map: 'Job_IgnoreInternetConnectivityCheck', type: 'boolean' },
  177. { name: 'Job_WhenRunViaSheduler', map: 'Job_WhenRunViaSheduler', type: 'boolean' },
  178. { name: 'Job_WhenRunManuallyUnattended', map: 'Job_WhenRunManuallyUnattended', type: 'boolean' },
  179. { name: 'Job_WhenRunManuallyAttended', map: 'Job_WhenRunManuallyAttended', type: 'boolean' },
  180. //Tab Safety
  181. { name: 'Safety_WarnIfMovingFiles', map: 'Safety_WarnIfMovingFiles', type: 'boolean' },
  182. { name: 'Safety_WarnBeforeOverridingReadOnly', map: 'Safety_WarnBeforeOverridingReadOnly', type: 'boolean' },
  183. { name: 'Safety_WarnBeforeOverridingLarger', map: 'Safety_WarnBeforeOverridingLarger', type: 'boolean' },
  184. { name: 'Safety_WarnBeforeOverridingNewer', map: 'Safety_WarnBeforeOverridingNewer', type: 'boolean' },
  185. { name: 'Safety_WarnBeforeDeleting', map: 'Safety_WarnBeforeDeleting', type: 'boolean' },
  186. //Tab Safety Special
  187. { name: 'SafetySpecial_WarnIfDeletingFilesMoreThan', map: 'SafetySpecial_WarnIfDeletingFilesMoreThan', type: 'boolean' },
  188. { name: 'SafetySpecial_WarnIfDeletingAllFilesInAnySubfolder', map: 'SafetySpecial_WarnIfDeletingAllFilesInAnySubfolder', type: 'boolean' },
  189. { name: 'SafetySpecial_WarnIfDeletingMoreThanInAnySubfolder', map: 'SafetySpecial_WarnIfDeletingMoreThanInAnySubfolder', type: 'boolean' },
  190. { name: 'SafetySpecial_WarnIfDeletingFilesMoreThanVal', map: 'SafetySpecial_WarnIfDeletingFilesMoreThanVal', type: 'boolean' },
  191. { name: 'SafetySpecial_WarnIfDeletingMoreThanInAnySubfolderVal', map: 'SafetySpecial_WarnIfDeletingMoreThanInAnySubfolderVal', type: 'boolean' },
  192. //Tab Safety Unattended Mode
  193. { name: 'SafetyUnattended_OvewriteReadOnly', map: 'SafetyUnattended_OvewriteReadOnly', type: 'boolean' },
  194. { name: 'SafetyUnattended_OvewriteLarge', map: 'SafetyUnattended_OvewriteLarge', type: 'boolean' },
  195. { name: 'SafetyUnattended_NewerFilesCanBeOvewriten', map: 'SafetyUnattended_NewerFilesCanBeOvewriten', type: 'boolean' },
  196. { name: 'SafetyUnattended_FileDeletionAllowed', map: 'SafetyUnattended_FileDeletionAllowed', type: 'boolean' },
  197. { name: 'SafetyUnattended_EnableSpecialSafetyCheck', map: 'SafetyUnattended_EnableSpecialSafetyCheck', type: 'boolean' },
  198. { name: 'SafetyUnattended_FileDeletionAllowed', map: 'SafetyUnattended_FileDeletionAllowed', type: 'number' },
  199. //Tab Special SpecialFeatures
  200. { name: 'SpecialSpFeatr_CacheDestinationFileList', map: 'SpecialSpFeatr_CacheDestinationFileList', type: 'boolean' },
  201. { name: 'SpecialSpFeatr_ProcessSecurity', map: 'SpecialSpFeatr_ProcessSecurity', type: 'boolean' },
  202. { name: 'SpecialSpFeatr_UseParcialFileUpdating', map: 'SpecialSpFeatr_UseParcialFileUpdating', type: 'boolean' },
  203. { name: 'SpecialSpFeatr_RightSideRemoteService', map: 'SpecialSpFeatr_RightSideRemoteService', type: 'boolean' },
  204. { name: 'SpecialSpFeatr_FastMode', map: 'SpecialSpFeatr_FastMode', type: 'boolean' },
  205. { name: 'SpecialSpFeatr_UseCacheDatabaseForSource', map: 'SpecialSpFeatr_UseCacheDatabaseForSource', type: 'boolean' },
  206. { name: 'SpecialSpFeatr_LeftSideUsesRemoteService', map: 'SpecialSpFeatr_LeftSideUsesRemoteService', type: 'boolean' },
  207. { name: 'SpecialSpFeatr_RightSideUsesRemoteService', map: 'SpecialSpFeatr_RightSideUsesRemoteService', type: 'boolean' },
  208. { name: 'SpecialSpFeatr_UseDifferentFolders', map: 'SpecialSpFeatr_UseDifferentFolders', type: 'boolean' },
  209. { name: 'SpecialSpFeatr_IfDestinationMachineModifiers', map: 'SpecialSpFeatr_IfDestinationMachineModifiers', type: 'boolean' },
  210. { name: 'SpecialSpFeatr_SetTargetVolumeLabel', map: 'SpecialSpFeatr_SetTargetVolumeLabel' },
  211. //Tab Special Database
  212. { name: 'SpDb_OpenDatabaseReadOnly', map: 'SpDb_OpenDatabaseReadOnly', type: 'boolean' },
  213. { name: 'SpecialDatabase_FastMode', map: 'SpecialDatabase_FastMode', type: 'boolean' },
  214. { name: 'SpecialDatabase_DatabaseNameToUse', map: 'SpecialDatabase_DatabaseNameToUse' },
  215. { name: 'SpecialDatabase_Left', map: 'SpecialDatabase_Left', type: 'string' },
  216. { name: 'SpecialDatabase_Right', map: 'SpecialDatabase_Right', type: 'string' },
  217. //Tab Vesioning Versioning
  218. { name: 'VersVers_KeepOlderVersionsWhenReplacing', map: 'VersVers_KeepOlderVersionsWhenReplacing', type: 'boolean' },
  219. { name: 'VersVers_PerFile', map: 'VersVers_PerFile', type: 'number' },
  220. //internet settings dlg
  221. { name: 'LeftAccountOpt', map: 'LeftAccountOpt', type: 'string' },
  222. { name: 'RightAccountOpt', map: 'RightAccountOpt', type: 'string' },
  223. //Tab Masks and Filters
  224. { name: 'Masks_InclusionMasks', map: 'Masks_InclusionMasks', type: 'string' },
  225. { name: 'Masks_ExclusionMasks', map: 'Masks_ExclusionMasks', type: 'string' },
  226. { name: 'Masks_SpecFolderMasks', map: 'Masks_SpecFolderMasks', type: 'boolean' },
  227. { name: 'Masks_Restrictions', map: 'Masks_Restrictions', type: 'boolean' },
  228. { name: 'Masks_IncludeBackupFiles', map: 'Masks_IncludeBackupFiles', type: 'boolean' },
  229. { name: 'Masks_UseGlobalExclAlso', map: 'Masks_UseGlobalExclAlso', type: 'boolean' },
  230. { name: 'ExclucionFilesWidget', map: 'ExclucionFilesWidget', type: 'string' },
  231. { name: 'Masks_ProcessHiddenFiles', map: 'Masks_ProcessHiddenFiles', type: 'boolean' },
  232. { name: 'Masks_SearchHiddenFolders', map: 'Masks_SearchHiddenFolders', type: 'boolean' },
  233. { name: 'Masks_ProcessReparcePoints', map: 'Masks_ProcessReparcePoints', type: 'boolean' },
  234. { name: 'Masks_FollowJunctionPointsFiles', map: 'Masks_FollowJunctionPointsFiles', type: 'boolean' },
  235. { name: 'Masks_FollowJunctionPointsFolders', map: 'Masks_FollowJunctionPointsFolders', type: 'boolean' },
  236. { name: 'Masks_CopyOtherReparcePoints', map: 'Masks_CopyOtherReparcePoints', type: 'boolean' },
  237. { name: 'Masks_CopyFilesWithArchiveFlag', map: 'Masks_CopyFilesWithArchiveFlag', type: 'boolean' },
  238. { name: 'Masks_FileSizesWithin', map: 'Masks_FileSizesWithin', type: 'boolean' },
  239. { name: 'Masks_FileSizesMin', map: 'Masks_FileSizesMin', type: 'string' },
  240. { name: 'Masks_FileSizesMax', map: 'Masks_FileSizesMax', type: 'string' },
  241. { name: 'Masks_FileDatesWithin', map: 'Masks_FileDatesWithin', type: 'boolean' },
  242. { name: 'Masks_FileMinDate', map: 'Masks_FileMinDate', type: 'string' },
  243. { name: 'Masks_FileMaxDate', map: 'Masks_FileMaxDate', type: 'string' },
  244. { name: 'Masks_FileAge', map: 'Masks_FileAge', type: 'boolean' },
  245. { name: 'Masks_FileAgeComboIndex', map: 'Masks_FileAgeComboIndex', type: 'number' },
  246. { name: 'Masks_FileAgeDays', map: 'Masks_FileAgeDays', type: 'number' },
  247. { name: 'Masks_FileAgeHours', map: 'Masks_FileAgeHours', type: 'number' },
  248. { name: 'Masks_FileAgeMinutes', map: 'Masks_FileAgeMinutes', type: 'number' },
  249. { name: 'Masks_FileAgeSec', map: 'Masks_FileAgeSec', type: 'number' },
  250. { name: 'Masks_FilterByWidget', map: 'Masks_FilterByWidget', type: 'string' },
  251. { name: 'Masks_ApplyToWidget', map: 'Masks_ApplyToWidget', type: 'string' },
  252. { name: 'Masks_TargetDataRestore', map: 'Masks_TargetDataRestore', type: 'boolean' },
  253. { name: 'Masks_TargetDateRestoreDate', map: 'Masks_TargetDateRestoreDate', type: 'string' },
  254. { name: 'Masks_TargetDateRestoreTime', map: 'Masks_TargetDateRestoreTime', type: 'string' },
  255. { name: 'VersVers_MoveIntoFolderInpt', map: 'VersVers_MoveIntoFolderInpt', type: 'string' },
  256. { name: 'VersVers_MoveIntoFolder', map: 'VersVers_MoveIntoFolder', type: 'boolean' },
  257. { name: 'VersVers_OnlyOnRightHandSide', map: 'VersVers_OnlyOnRightHandSide', type: 'boolean' },
  258. { name: 'VersVers_AsSubfolerInEachFolder', map: 'VersVers_AsSubfolerInEachFolder', type: 'boolean' },
  259. { name: 'VersVers_RecreateTreeBelow', map: 'VersVers_RecreateTreeBelow', type: 'boolean' },
  260. { name: 'VersVers_FileNameEncoding', map: 'VersVers_FileNameEncoding', type: 'boolean' },
  261. { name: 'VersVers_DontRenameNewestOlderVersion', map: 'VersVers_DontRenameNewestOlderVersion', type: 'boolean' },
  262. { name: 'VersVers_RenamingOlderVersions', map: 'VersVers_RenamingOlderVersions', type: 'string' },
  263. { name: 'VersSynth_UseSynthBackups', map: 'VersSynth_UseSynthBackups', type: 'boolean' },
  264. { name: 'VersSynth_UseCheckPoints', map: 'VersSynth_UseCheckPoints', type: 'boolean' },
  265. { name: 'VersSynth_CreateCheckpointComboIndex', map: 'VersSynth_CreateCheckpointComboIndex', type: 'number' },
  266. { name: 'VersSynth_CheckpointsRelativeComboIndex', map: 'VersSynth_CheckpointsRelativeComboIndex', type: 'number' },
  267. { name: 'VersSynth_BuildAllIncremental', map: 'VersSynth_BuildAllIncremental', type: 'boolean' },
  268. { name: 'VersSynth_RemoveUnneededCb', map: 'VersSynth_RemoveUnneededCb', type: 'boolean' },
  269. { name: 'VersSynth_RemoveUnneeded', map: 'VersSynth_RemoveUnneeded', type: 'number' },
  270. { name: 'VersSynth_RemoveUnneededComboIndex', map: 'VersSynth_RemoveUnneededComboIndex', type: 'number' },
  271. { name: 'VersSynth_IfAllBlocksCb', map: 'VersSynth_IfAllBlocksCb', type: 'boolean' },
  272. { name: 'VersMore_DoNotDecodeLeftHandCb', map: 'VersMore_DoNotDecodeLeftHandCb', type: 'boolean' },
  273. { name: 'VersMore_DoNotDecodeRightHandCb', map: 'VersMore_DoNotDecodeRightHandCb', type: 'boolean' },
  274. { name: 'VersMore_CleanUpIdenticalCb', map: 'VersMore_CleanUpIdenticalCb', type: 'boolean' },
  275. { name: 'VersMore_RemoveParenthesizedCb', map: 'VersMore_RemoveParenthesizedCb', type: 'boolean' },
  276. { name: 'VersMore_RemoveVesioningTagsCb', map: 'VersMore_RemoveVesioningTagsCb', type: 'boolean' },
  277. { name: 'VersMore_CleanUpAllOlderVersionsCb', map: 'VersMore_CleanUpAllOlderVersionsCb', type: 'boolean' },
  278. { name: 'VersMore_FilesBackupV4Cb', map: 'VersMore_FilesBackupV4Cb', type: 'boolean' },
  279. { name: 'Zipping_LimitInpt', map: 'Zipping_LimitInpt', type: 'string' },
  280. { name: 'Zipping_ZipEachFile', map: 'Zipping_ZipEachFile', type: 'boolean' },
  281. { name: 'Zipping_USeZipPackages', map: 'Zipping_USeZipPackages', type: 'boolean' },
  282. { name: 'Zipping_ZipDirectlyToDestination', map: 'Zipping_ZipDirectlyToDestination', type: 'boolean' },
  283. { name: 'Zipping_UnzipAllfiles', map: 'Zipping_UnzipAllfiles', type: 'boolean' },
  284. { name: 'Zipping_LimitZipFileSize', map: 'Zipping_LimitZipFileSize', type: 'boolean' },
  285. { name: 'Zipping_CompressionLevelWidget', map: 'Zipping_CompressionLevelWidget', type: 'string' },
  286. { name: 'ZippingEncrypt_EncryptFiles', map: 'ZippingEncrypt_EncryptFiles', type: 'boolean' },
  287. { name: 'ZippingEncrypt_DecryptFiles', map: 'ZippingEncrypt_DecryptFiles', type: 'boolean' },
  288. { name: 'ZippingEncrypt_Password', map: 'ZippingEncrypt_Password', type: 'string' },
  289. { name: 'ZippingEncrypt_Confirm', map: 'ZippingEncrypt_Confirm', type: 'string' },
  290. { name: 'ZippingEncrypt_ComboIndex', map: 'ZippingEncrypt_ComboIndex', type: 'number' }
  291. ] ,
  292. datatype: "json",
  293. id: 'Name'
  294. };
  295. function RefreshMainGrid()
  296. {
  297. var scrolling = $("#jqxgrid").jqxGrid("scrolling");
  298. $("#jqxgrid").jqxGrid('updatebounddata', 'cells');
  299. }
  300. function InitMainForm()
  301. {
  302. //////////////////////////////////////////////////////////////////////////////////
  303. $("#MainForm_div").html( MainFormHTML );
  304. // initialize jqxGrid
  305. $("#jqxgrid").jqxGrid(
  306. {
  307. width: 1000,
  308. rowsheight : 50,
  309. source: GridDataAdapter,
  310. pageable: true,
  311. autoheight: true,
  312. //scrollmode: 'deferred',
  313. //sortable: true,
  314. //altrows: true,
  315. //enabletooltips: true,
  316. //editable: false,
  317. //selectionmode: 'singlerow',
  318. showtoolbar: true,
  319. rendertoolbar: function (toolbar) {
  320. var me = this;
  321. var container = $("<div style='margin: 5px;'></div>");
  322. toolbar.append(container);
  323. container.append('<input id="addrowbutton" type="button" value="Add New Profile" />');
  324. container.append('<input style="margin-left: 5px;" id="deleterowbutton" type="button" value="Delete Profile" />');
  325. container.append('<input style="margin-left: 5px;" id="updaterowbutton" type="button" value="Edit Profile" />');
  326. container.append('<input style="margin-left: 5px;" id="run_selected_profile_button" type="button" value="Run Selected Profile" />');
  327. container.append('<input style="margin-left: 5px;" id="stop_selected_profile_button" type="button" value="Stop Selected Profile" />');
  328. $("#addrowbutton").jqxButton();
  329. $("#deleterowbutton").jqxButton();
  330. $("#updaterowbutton").jqxButton();
  331. $("#run_selected_profile_button").jqxButton();
  332. $("#run_selected_profile_button").on('click', function ()
  333. {
  334. alert( "Run" );
  335. });
  336. $("#stop_selected_profile_button").jqxButton();
  337. $("#stop_selected_profile_button").on('click', function ()
  338. {
  339. alert( "Stop" );
  340. });
  341. // update row.
  342. $("#updaterowbutton").on('click', function ()
  343. {
  344. var selectedRow = $('#jqxgrid').jqxGrid('getselectedrowindex');
  345. if( selectedRow == -1 ) return;
  346. var SelectedProfile = $('#jqxgrid').jqxGrid('getrowdata', selectedRow ).Name;
  347. ProfileSource.url = "single_profile_" + SelectedProfile;
  348. var ProfileDataAdapter = new $.jqx.dataAdapter(ProfileSource,
  349. { loadComplete: function ()
  350. {
  351. // get data records.
  352. var records = ProfileDataAdapter.records;
  353. var length = records.length;
  354. for (var i = 0; i < length; i++)
  355. {
  356. var record = records[i];
  357. if( SelectedProfile == record.Name )
  358. {
  359. InitProfileEditorForm( SelectedProfile);
  360. // dynamicaly assigning controls
  361. LoadRecordToRegistryList(record, GProfileEditorRegistryList, "");
  362. LoadRegistryListToControls( GProfileEditorRegistryList, "" );
  363. return;
  364. }
  365. }
  366. }
  367. ,
  368. loadError: function (jqXHR, status, error) { alert(error) }
  369. });
  370. ProfileDataAdapter.dataBind();
  371. });
  372. // create new row.
  373. $("#addrowbutton").on('click', function ()
  374. {
  375. InitProfileEditorForm( null );
  376. var dataAdapter = new $.jqx.dataAdapter(ProfileSource, {} );
  377. //$('#jqxProfileEditorForm').on('close', function (event) { $('#jqxProfileEditorForm').jqxWindow('destroy'); });
  378. $('#jqxProfileEditorForm').jqxWindow('open');
  379. dataAdapter.dataBind();
  380. });
  381. // delete row.
  382. $("#deleterowbutton").on('click', function () {
  383. var selectedrowindex = $("#jqxgrid").jqxGrid('getselectedrowindex');
  384. var rowscount = $("#jqxgrid").jqxGrid('getdatainformation').rowscount;
  385. if (selectedrowindex >= 0 && selectedrowindex < rowscount) {
  386. if (confirm('Are you sure ?'))
  387. {
  388. var id = $("#jqxgrid").jqxGrid('getrowid', selectedrowindex);
  389. var commit = $("#jqxgrid").jqxGrid('deleterow', id);
  390. }
  391. }
  392. });
  393. },
  394. columns: [
  395. { text: 'Profile Name', datafield: 'Name', width: 350 },
  396. { text: 'Left Hand', datafield: 'LPath', width: 200 },
  397. { text: 'Right Hand', datafield: 'RPath', width: 200 },
  398. { text: 'Progress', datafield: 'Progress', width: 200 }
  399. ]
  400. });
  401. GridDataAdapter.dataBind();
  402. $('#Test_btn1').jqxButton({});
  403. $('#Test_btn').jqxButton({});
  404. $('#Test_btn').click(function ()
  405. {
  406. $('#Test_btn1').jqxButton({disabled : true});
  407. });
  408. var refreshInterval = setInterval(function () {
  409. var scrolling = $("#jqxgrid").jqxGrid('scrolling');
  410. if( scrolling.vertical == false )
  411. {
  412. // $("#jqxgrid").jqxGrid('updatebounddata');
  413. }
  414. }, 2000);
  415. }//end InitMainForm