Added file upload ability to the Rich Text Editor
Reordered the operations array in Operations.pm
This commit is contained in:
parent
b3a700a42c
commit
4a3dab3ddb
3 changed files with 434 additions and 183 deletions
|
|
@ -77,184 +77,222 @@ Returns a hash reference containing operation and package names.
|
||||||
|
|
||||||
sub getOperations {
|
sub getOperations {
|
||||||
return {
|
return {
|
||||||
'deleteAd' => 'WebGUI::Operation::AdSpace',
|
'killSession' => 'WebGUI::Operation::ActiveSessions',
|
||||||
'deleteAdSpace' => 'WebGUI::Operation::AdSpace',
|
'viewActiveSessions' => 'WebGUI::Operation::ActiveSessions',
|
||||||
'editAd' => 'WebGUI::Operation::AdSpace',
|
|
||||||
'editAdSave' => 'WebGUI::Operation::AdSpace',
|
|
||||||
'editAdSpace' => 'WebGUI::Operation::AdSpace',
|
|
||||||
'editAdSpaceSave' => 'WebGUI::Operation::AdSpace',
|
|
||||||
'manageAdSpaces' => 'WebGUI::Operation::AdSpace',
|
|
||||||
'clickAd' => 'WebGUI::Operation::AdSpace',
|
|
||||||
'editVersionTag' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'editVersionTagSave' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'commitVersionTag' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'commitVersionTagConfirm' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'manageCommittedVersions' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'approveVersionTag' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'manageVersions' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'manageRevisionsInTag' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'rollbackVersionTag' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'setWorkingVersionTag' => 'WebGUI::Operation::VersionTag',
|
|
||||||
'promoteWorkflowActivity' => 'WebGUI::Operation::Workflow',
|
|
||||||
'demoteWorkflowActivity' => 'WebGUI::Operation::Workflow',
|
|
||||||
'addWorkflow' => 'WebGUI::Operation::Workflow',
|
|
||||||
'deleteWorkflow' => 'WebGUI::Operation::Workflow',
|
|
||||||
'runWorkflow' => 'WebGUI::Operation::Workflow',
|
|
||||||
'editWorkflowActivity' => 'WebGUI::Operation::Workflow',
|
|
||||||
'editWorkflowActivitySave' => 'WebGUI::Operation::Workflow',
|
|
||||||
'deleteWorkflowActivity' => 'WebGUI::Operation::Workflow',
|
|
||||||
'addWorkflowSave' => 'WebGUI::Operation::Workflow',
|
|
||||||
'editWorkflow' => 'WebGUI::Operation::Workflow',
|
|
||||||
'editWorkflowSave' => 'WebGUI::Operation::Workflow',
|
|
||||||
'manageWorkflows' => 'WebGUI::Operation::Workflow',
|
|
||||||
'manageCron' => 'WebGUI::Operation::Cron',
|
|
||||||
'editCronJob' => 'WebGUI::Operation::Cron',
|
|
||||||
'editCronJobSave' => 'WebGUI::Operation::Cron',
|
|
||||||
'deleteCronJob' => 'WebGUI::Operation::Cron',
|
|
||||||
'adminConsole' => 'WebGUI::Operation::Admin',
|
|
||||||
'switchOffAdmin' => 'WebGUI::Operation::Admin',
|
|
||||||
'switchOnAdmin' => 'WebGUI::Operation::Admin',
|
|
||||||
'auth' => 'WebGUI::Operation::Auth',
|
|
||||||
'copyDatabaseLink' => 'WebGUI::Operation::DatabaseLink',
|
|
||||||
'deleteDatabaseLink' => 'WebGUI::Operation::DatabaseLink',
|
|
||||||
'deleteDatabaseLinkConfirm' => 'WebGUI::Operation::DatabaseLink',
|
|
||||||
'editDatabaseLink' => 'WebGUI::Operation::DatabaseLink',
|
|
||||||
'editDatabaseLinkSave' => 'WebGUI::Operation::DatabaseLink',
|
|
||||||
'listDatabaseLinks' => 'WebGUI::Operation::DatabaseLink',
|
|
||||||
'copyLDAPLink' => 'WebGUI::Operation::LDAPLink',
|
|
||||||
'deleteLDAPLink' => 'WebGUI::Operation::LDAPLink',
|
|
||||||
'editLDAPLink' => 'WebGUI::Operation::LDAPLink',
|
|
||||||
'editLDAPLinkSave' => 'WebGUI::Operation::LDAPLink',
|
|
||||||
'listLDAPLinks' => 'WebGUI::Operation::LDAPLink',
|
|
||||||
|
|
||||||
'formAssetTree' => 'WebGUI::Operation::FormHelpers',
|
|
||||||
'richEditPageTree' => 'WebGUI::Operation::FormHelpers',
|
|
||||||
'richEditImageTree' => 'WebGUI::Operation::FormHelpers',
|
|
||||||
'richEditViewThumbnail' => 'WebGUI::Operation::FormHelpers',
|
|
||||||
'manageUsersInGroup' => 'WebGUI::Operation::Group',
|
|
||||||
'deleteGroup' => 'WebGUI::Operation::Group',
|
|
||||||
'deleteGroupConfirm' => 'WebGUI::Operation::Group',
|
|
||||||
'deleteGroupConfirm' => 'WebGUI::Operation::Group',
|
|
||||||
'deleteGroupGrouping' => 'WebGUI::Operation::Group',
|
|
||||||
'editGroup' => 'WebGUI::Operation::Group',
|
|
||||||
'editGroupSave' => 'WebGUI::Operation::Group',
|
|
||||||
'listGroups' => 'WebGUI::Operation::Group',
|
|
||||||
'emailGroup' => 'WebGUI::Operation::Group',
|
|
||||||
'emailGroupSend' => 'WebGUI::Operation::Group',
|
|
||||||
'manageGroupsInGroup' => 'WebGUI::Operation::Group',
|
|
||||||
'addGroupsToGroupSave' => 'WebGUI::Operation::Group',
|
|
||||||
'addUsersToGroupSave' => 'WebGUI::Operation::Group',
|
|
||||||
'deleteGroupGrouping' => 'WebGUI::Operation::Group',
|
|
||||||
'autoAddToGroup' => 'WebGUI::Operation::Group',
|
|
||||||
'autoDeleteFromGroup' => 'WebGUI::Operation::Group',
|
|
||||||
'addUsersToGroupSave' => 'WebGUI::Operation::Group',
|
|
||||||
'viewHelp' => 'WebGUI::Operation::Help',
|
|
||||||
'viewHelpIndex' => 'WebGUI::Operation::Help',
|
|
||||||
'viewHelpTOC' => 'WebGUI::Operation::Help',
|
|
||||||
'viewHelpChapter' => 'WebGUI::Operation::Help',
|
|
||||||
'viewInbox' => 'WebGUI::Operation::Inbox',
|
|
||||||
'viewInboxMessage' => 'WebGUI::Operation::Inbox',
|
|
||||||
'editProfile' => 'WebGUI::Operation::Profile',
|
|
||||||
'editProfileSave' => 'WebGUI::Operation::Profile',
|
|
||||||
'viewProfile' => 'WebGUI::Operation::Profile',
|
|
||||||
'deleteProfileCategoryConfirm' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'deleteProfileFieldConfirm' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'editProfileCategorySave' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'editProfileFieldSave' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'deleteProfileCategory' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'deleteProfileField' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'editProfileCategory' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'editProfileField' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'moveProfileCategoryDown' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'moveProfileCategoryUp' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'moveProfileFieldDown' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'moveProfileFieldUp' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'editProfileSettings' => 'WebGUI::Operation::ProfileSettings',
|
|
||||||
'deleteReplacement' => 'WebGUI::Operation::Replacements',
|
|
||||||
'editReplacement' => 'WebGUI::Operation::Replacements',
|
|
||||||
'editReplacementSave' => 'WebGUI::Operation::Replacements',
|
|
||||||
'listReplacements' => 'WebGUI::Operation::Replacements',
|
|
||||||
'setScratch' => 'WebGUI::Operation::Scratch',
|
|
||||||
'deleteScratch' => 'WebGUI::Operation::Scratch',
|
|
||||||
'saveSettings' => 'WebGUI::Operation::Settings',
|
|
||||||
'editSettings' => 'WebGUI::Operation::Settings',
|
|
||||||
'viewStatistics' => 'WebGUI::Operation::Statistics',
|
|
||||||
'killSession' => 'WebGUI::Operation::ActiveSessions',
|
|
||||||
'viewLoginHistory' => 'WebGUI::Operation::LoginHistory',
|
|
||||||
'viewActiveSessions' => 'WebGUI::Operation::ActiveSessions',
|
|
||||||
'makePrintable' => 'WebGUI::Operation::Style',
|
|
||||||
'setPersonalStyle' => 'WebGUI::Operation::Style',
|
|
||||||
'unsetPersonalStyle' => 'WebGUI::Operation::Style',
|
|
||||||
'editUserKarma' => 'WebGUI::Operation::User',
|
|
||||||
'editUserKarmaSave' => 'WebGUI::Operation::User',
|
|
||||||
'deleteGrouping' => 'WebGUI::Operation::Group',
|
|
||||||
'editGrouping' => 'WebGUI::Operation::Group',
|
|
||||||
'editGroupingSave' => 'WebGUI::Operation::Group',
|
|
||||||
'becomeUser' => 'WebGUI::Operation::User',
|
|
||||||
'deleteUser' => 'WebGUI::Operation::User',
|
|
||||||
'deleteUserConfirm' => 'WebGUI::Operation::User',
|
|
||||||
'editUser' => 'WebGUI::Operation::User',
|
|
||||||
'editUserSave' => 'WebGUI::Operation::User',
|
|
||||||
'listUsers' => 'WebGUI::Operation::User',
|
|
||||||
'setup' => 'WebGUI::Operation::WebGUI',
|
|
||||||
'theWg' => 'WebGUI::Operation::WebGUI',
|
|
||||||
'genesis' => 'WebGUI::Operation::WebGUI',
|
|
||||||
'deleteSubscription' => 'WebGUI::Operation::Subscription',
|
|
||||||
'editSubscription' => 'WebGUI::Operation::Subscription',
|
|
||||||
'editSubscriptionSave' => 'WebGUI::Operation::Subscription',
|
|
||||||
'listSubscriptions' => 'WebGUI::Operation::Subscription',
|
|
||||||
'purchaseSubscription' => 'WebGUI::Operation::Subscription',
|
|
||||||
'createSubscriptionCodeBatch' => 'WebGUI::Operation::Subscription',
|
|
||||||
'createSubscriptionCodeBatchSave' => 'WebGUI::Operation::Subscription',
|
|
||||||
'deleteSubscriptionCodeBatch' => 'WebGUI::Operation::Subscription',
|
|
||||||
'listSubscriptionCodeBatches' => 'WebGUI::Operation::Subscription',
|
|
||||||
'redeemSubscriptionCode' => 'WebGUI::Operation::Subscription',
|
|
||||||
'listSubscriptionCodes' => 'WebGUI::Operation::Subscription',
|
|
||||||
'deleteSubscriptionCodes' => 'WebGUI::Operation::Subscription',
|
|
||||||
|
|
||||||
'addToCart' => 'WebGUI::Operation::Commerce',
|
'adminConsole' => 'WebGUI::Operation::Admin',
|
||||||
'confirmRecurringTransaction' => 'WebGUI::Operation::Commerce',
|
'switchOffAdmin' => 'WebGUI::Operation::Admin',
|
||||||
'checkout' => 'WebGUI::Operation::Commerce',
|
'switchOnAdmin' => 'WebGUI::Operation::Admin',
|
||||||
'checkoutConfirm' => 'WebGUI::Operation::Commerce',
|
|
||||||
'checkoutSubmit' => 'WebGUI::Operation::Commerce',
|
|
||||||
'deleteCartItem' => 'WebGUI::Operation::Commerce',
|
|
||||||
'editCommerceSettings' => 'WebGUI::Operation::Commerce',
|
|
||||||
'editCommerceSettingsSave' => 'WebGUI::Operation::Commerce',
|
|
||||||
'listTransactions' => 'WebGUI::Operation::Commerce',
|
|
||||||
'cancelTransaction' => 'WebGUI::Operation::Commerce',
|
|
||||||
'completePendingTransaction' => 'WebGUI::Operation::Commerce',
|
|
||||||
'selectPaymentGateway' => 'WebGUI::Operation::Commerce',
|
|
||||||
'selectPaymentGatewaySave' => 'WebGUI::Operation::Commerce',
|
|
||||||
'selectShippingMethod' => 'WebGUI::Operation::Commerce',
|
|
||||||
'selectShippingMethodSave' => 'WebGUI::Operation::Commerce',
|
|
||||||
'updateCart' => 'WebGUI::Operation::Commerce',
|
|
||||||
'viewCart' => 'WebGUI::Operation::Commerce',
|
|
||||||
|
|
||||||
'viewPurchaseHistory' => 'WebGUI::Operation::TransactionLog',
|
|
||||||
'cancelRecurringTransaction' => 'WebGUI::Operation::TransactionLog',
|
|
||||||
'deleteTransaction' => 'WebGUI::Operation::TransactionLog',
|
|
||||||
'deleteTransactionItem' => 'WebGUI::Operation::TransactionLog',
|
|
||||||
|
|
||||||
'deleteProduct' => 'WebGUI::Operation::ProductManager',
|
'clickAd' => 'WebGUI::Operation::AdSpace',
|
||||||
'deleteProductParameter' => 'WebGUI::Operation::ProductManager',
|
'deleteAd' => 'WebGUI::Operation::AdSpace',
|
||||||
'deleteProductParameterOption' => 'WebGUI::Operation::ProductManager',
|
'deleteAdSpace' => 'WebGUI::Operation::AdSpace',
|
||||||
'editProduct' => 'WebGUI::Operation::ProductManager',
|
'editAd' => 'WebGUI::Operation::AdSpace',
|
||||||
'editProductSave' => 'WebGUI::Operation::ProductManager',
|
'editAdSave' => 'WebGUI::Operation::AdSpace',
|
||||||
'editProductParameter' => 'WebGUI::Operation::ProductManager',
|
'editAdSpace' => 'WebGUI::Operation::AdSpace',
|
||||||
'editProductParameterSave' => 'WebGUI::Operation::ProductManager',
|
'editAdSpaceSave' => 'WebGUI::Operation::AdSpace',
|
||||||
'editProductParameterOption' => 'WebGUI::Operation::ProductManager',
|
'manageAdSpaces' => 'WebGUI::Operation::AdSpace',
|
||||||
'editProductParameterOptionSave' => 'WebGUI::Operation::ProductManager',
|
|
||||||
'editProductVariant' => 'WebGUI::Operation::ProductManager',
|
'auth' => 'WebGUI::Operation::Auth',
|
||||||
'editProductVariantSave' => 'WebGUI::Operation::ProductManager',
|
|
||||||
'editSkuTemplate' => 'WebGUI::Operation::ProductManager',
|
'flushCache' => 'WebGUI::Operation::Cache',
|
||||||
'editSkuTemplateSave' => 'WebGUI::Operation::ProductManager',
|
'manageCache' => 'WebGUI::Operation::Cache',
|
||||||
'listProducts' => 'WebGUI::Operation::ProductManager',
|
|
||||||
'listProductVariants' => 'WebGUI::Operation::ProductManager',
|
'addToCart' => 'WebGUI::Operation::Commerce',
|
||||||
'listProductVariantsSave' => 'WebGUI::Operation::ProductManager',
|
'cancelTransaction' => 'WebGUI::Operation::Commerce',
|
||||||
'manageProduct' => 'WebGUI::Operation::ProductManager',
|
'checkout' => 'WebGUI::Operation::Commerce',
|
||||||
|
'checkoutConfirm' => 'WebGUI::Operation::Commerce',
|
||||||
'manageCache' => 'WebGUI::Operation::Cache',
|
'checkoutSubmit' => 'WebGUI::Operation::Commerce',
|
||||||
'flushCache' => 'WebGUI::Operation::Cache',
|
'completePendingTransaction' => 'WebGUI::Operation::Commerce',
|
||||||
|
'confirmRecurringTransaction' => 'WebGUI::Operation::Commerce',
|
||||||
|
'deleteCartItem' => 'WebGUI::Operation::Commerce',
|
||||||
|
'editCommerceSettings' => 'WebGUI::Operation::Commerce',
|
||||||
|
'editCommerceSettingsSave' => 'WebGUI::Operation::Commerce',
|
||||||
|
'listTransactions' => 'WebGUI::Operation::Commerce',
|
||||||
|
'selectPaymentGateway' => 'WebGUI::Operation::Commerce',
|
||||||
|
'selectPaymentGatewaySave' => 'WebGUI::Operation::Commerce',
|
||||||
|
'selectShippingMethod' => 'WebGUI::Operation::Commerce',
|
||||||
|
'selectShippingMethodSave' => 'WebGUI::Operation::Commerce',
|
||||||
|
'updateCart' => 'WebGUI::Operation::Commerce',
|
||||||
|
'viewCart' => 'WebGUI::Operation::Commerce',
|
||||||
|
|
||||||
|
'editCronJob' => 'WebGUI::Operation::Cron',
|
||||||
|
'editCronJobSave' => 'WebGUI::Operation::Cron',
|
||||||
|
'deleteCronJob' => 'WebGUI::Operation::Cron',
|
||||||
|
'manageCron' => 'WebGUI::Operation::Cron',
|
||||||
|
|
||||||
|
'copyDatabaseLink' => 'WebGUI::Operation::DatabaseLink',
|
||||||
|
'deleteDatabaseLink' => 'WebGUI::Operation::DatabaseLink',
|
||||||
|
'deleteDatabaseLinkConfirm' => 'WebGUI::Operation::DatabaseLink',
|
||||||
|
'editDatabaseLink' => 'WebGUI::Operation::DatabaseLink',
|
||||||
|
'editDatabaseLinkSave' => 'WebGUI::Operation::DatabaseLink',
|
||||||
|
'listDatabaseLinks' => 'WebGUI::Operation::DatabaseLink',
|
||||||
|
|
||||||
|
'formAssetTree' => 'WebGUI::Operation::FormHelpers',
|
||||||
|
'richEditAddFolder' => 'WebGUI::Operation::FormHelpers',
|
||||||
|
'richEditAddFolderSave' => 'WebGUI::Operation::FormHelpers',
|
||||||
|
'richEditAddImage' => 'WebGUI::Operation::FormHelpers',
|
||||||
|
'richEditAddImageSave' => 'WebGUI::Operation::FormHelpers',
|
||||||
|
'richEditImageTree' => 'WebGUI::Operation::FormHelpers',
|
||||||
|
'richEditPageTree' => 'WebGUI::Operation::FormHelpers',
|
||||||
|
'richEditViewThumbnail' => 'WebGUI::Operation::FormHelpers',
|
||||||
|
|
||||||
|
'addGroupsToGroupSave' => 'WebGUI::Operation::Group',
|
||||||
|
'addUsersToGroupSave' => 'WebGUI::Operation::Group',
|
||||||
|
'autoAddToGroup' => 'WebGUI::Operation::Group',
|
||||||
|
'autoDeleteFromGroup' => 'WebGUI::Operation::Group',
|
||||||
|
'deleteGroup' => 'WebGUI::Operation::Group',
|
||||||
|
'deleteGroupConfirm' => 'WebGUI::Operation::Group',
|
||||||
|
'deleteGroupGrouping' => 'WebGUI::Operation::Group',
|
||||||
|
'deleteGrouping' => 'WebGUI::Operation::Group',
|
||||||
|
'editGroup' => 'WebGUI::Operation::Group',
|
||||||
|
'editGroupSave' => 'WebGUI::Operation::Group',
|
||||||
|
'editGrouping' => 'WebGUI::Operation::Group',
|
||||||
|
'editGroupingSave' => 'WebGUI::Operation::Group',
|
||||||
|
'emailGroup' => 'WebGUI::Operation::Group',
|
||||||
|
'emailGroupSend' => 'WebGUI::Operation::Group',
|
||||||
|
'listGroups' => 'WebGUI::Operation::Group',
|
||||||
|
'manageGroupsInGroup' => 'WebGUI::Operation::Group',
|
||||||
|
'manageUsersInGroup' => 'WebGUI::Operation::Group',
|
||||||
|
|
||||||
|
'viewHelp' => 'WebGUI::Operation::Help',
|
||||||
|
'viewHelpChapter' => 'WebGUI::Operation::Help',
|
||||||
|
'viewHelpIndex' => 'WebGUI::Operation::Help',
|
||||||
|
'viewHelpTOC' => 'WebGUI::Operation::Help',
|
||||||
|
|
||||||
|
'viewInbox' => 'WebGUI::Operation::Inbox',
|
||||||
|
'viewInboxMessage' => 'WebGUI::Operation::Inbox',
|
||||||
|
|
||||||
|
'copyLDAPLink' => 'WebGUI::Operation::LDAPLink',
|
||||||
|
'deleteLDAPLink' => 'WebGUI::Operation::LDAPLink',
|
||||||
|
'editLDAPLink' => 'WebGUI::Operation::LDAPLink',
|
||||||
|
'editLDAPLinkSave' => 'WebGUI::Operation::LDAPLink',
|
||||||
|
'listLDAPLinks' => 'WebGUI::Operation::LDAPLink',
|
||||||
|
|
||||||
|
'viewLoginHistory' => 'WebGUI::Operation::LoginHistory',
|
||||||
|
|
||||||
|
'deleteProduct' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'deleteProductParameter' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'deleteProductParameterOption' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editProduct' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editProductParameter' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editProductParameterSave' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editProductParameterOption' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editProductParameterOptionSave' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editProductSave' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editProductVariant' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editProductVariantSave' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editSkuTemplate' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'editSkuTemplateSave' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'listProducts' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'listProductVariants' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'listProductVariantsSave' => 'WebGUI::Operation::ProductManager',
|
||||||
|
'manageProduct' => 'WebGUI::Operation::ProductManager',
|
||||||
|
|
||||||
|
'editProfile' => 'WebGUI::Operation::Profile',
|
||||||
|
'editProfileSave' => 'WebGUI::Operation::Profile',
|
||||||
|
'viewProfile' => 'WebGUI::Operation::Profile',
|
||||||
|
|
||||||
|
'deleteProfileCategory' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'deleteProfileCategoryConfirm' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'deleteProfileField' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'deleteProfileFieldConfirm' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'editProfileCategory' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'editProfileCategorySave' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'editProfileField' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'editProfileFieldSave' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'editProfileSettings' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'moveProfileCategoryDown' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'moveProfileCategoryUp' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'moveProfileFieldDown' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
'moveProfileFieldUp' => 'WebGUI::Operation::ProfileSettings',
|
||||||
|
|
||||||
|
'deleteReplacement' => 'WebGUI::Operation::Replacements',
|
||||||
|
'editReplacement' => 'WebGUI::Operation::Replacements',
|
||||||
|
'editReplacementSave' => 'WebGUI::Operation::Replacements',
|
||||||
|
'listReplacements' => 'WebGUI::Operation::Replacements',
|
||||||
|
|
||||||
|
'deleteScratch' => 'WebGUI::Operation::Scratch',
|
||||||
|
'setScratch' => 'WebGUI::Operation::Scratch',
|
||||||
|
|
||||||
|
'editSettings' => 'WebGUI::Operation::Settings',
|
||||||
|
'saveSettings' => 'WebGUI::Operation::Settings',
|
||||||
|
|
||||||
|
'viewStatistics' => 'WebGUI::Operation::Statistics',
|
||||||
|
|
||||||
|
'makePrintable' => 'WebGUI::Operation::Style',
|
||||||
|
'setPersonalStyle' => 'WebGUI::Operation::Style',
|
||||||
|
'unsetPersonalStyle' => 'WebGUI::Operation::Style',
|
||||||
|
|
||||||
|
'createSubscriptionCodeBatch' => 'WebGUI::Operation::Subscription',
|
||||||
|
'createSubscriptionCodeBatchSave' => 'WebGUI::Operation::Subscription',
|
||||||
|
'deleteSubscription' => 'WebGUI::Operation::Subscription',
|
||||||
|
'deleteSubscriptionCodeBatch' => 'WebGUI::Operation::Subscription',
|
||||||
|
'deleteSubscriptionCodes' => 'WebGUI::Operation::Subscription',
|
||||||
|
'editSubscription' => 'WebGUI::Operation::Subscription',
|
||||||
|
'editSubscriptionSave' => 'WebGUI::Operation::Subscription',
|
||||||
|
'listSubscriptionCodeBatches' => 'WebGUI::Operation::Subscription',
|
||||||
|
'listSubscriptionCodes' => 'WebGUI::Operation::Subscription',
|
||||||
|
'listSubscriptions' => 'WebGUI::Operation::Subscription',
|
||||||
|
'purchaseSubscription' => 'WebGUI::Operation::Subscription',
|
||||||
|
'redeemSubscriptionCode' => 'WebGUI::Operation::Subscription',
|
||||||
|
|
||||||
|
'addThemeComponent' => 'WebGUI::Operation::Theme',
|
||||||
|
'addThemeComponentSave' => 'WebGUI::Operation::Theme',
|
||||||
|
'deleteTheme' => 'WebGUI::Operation::Theme',
|
||||||
|
'deleteThemeConfirm' => 'WebGUI::Operation::Theme',
|
||||||
|
'deleteThemeComponent' => 'WebGUI::Operation::Theme',
|
||||||
|
'deleteThemeComponentConfirm' => 'WebGUI::Operation::Theme',
|
||||||
|
'editTheme' => 'WebGUI::Operation::Theme',
|
||||||
|
'editThemeSave' => 'WebGUI::Operation::Theme',
|
||||||
|
'exportTheme' => 'WebGUI::Operation::Theme',
|
||||||
|
'importTheme' => 'WebGUI::Operation::Theme',
|
||||||
|
'importThemeSave' => 'WebGUI::Operation::Theme',
|
||||||
|
'importThemeValidate' => 'WebGUI::Operation::Theme',
|
||||||
|
'listThemes' => 'WebGUI::Operation::Theme',
|
||||||
|
'viewTheme' => 'WebGUI::Operation::Theme',
|
||||||
|
|
||||||
|
'cancelRecurringTransaction' => 'WebGUI::Operation::TransactionLog',
|
||||||
|
'deleteTransaction' => 'WebGUI::Operation::TransactionLog',
|
||||||
|
'deleteTransactionItem' => 'WebGUI::Operation::TransactionLog',
|
||||||
|
'viewPurchaseHistory' => 'WebGUI::Operation::TransactionLog',
|
||||||
|
|
||||||
|
'becomeUser' => 'WebGUI::Operation::User',
|
||||||
|
'deleteUser' => 'WebGUI::Operation::User',
|
||||||
|
'deleteUserConfirm' => 'WebGUI::Operation::User',
|
||||||
|
'editUser' => 'WebGUI::Operation::User',
|
||||||
|
'editUserSave' => 'WebGUI::Operation::User',
|
||||||
|
'editUserKarma' => 'WebGUI::Operation::User',
|
||||||
|
'editUserKarmaSave' => 'WebGUI::Operation::User',
|
||||||
|
'listUsers' => 'WebGUI::Operation::User',
|
||||||
|
|
||||||
|
'approveVersionTag' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'commitVersionTag' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'commitVersionTagConfirm' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'editVersionTag' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'editVersionTagSave' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'manageCommittedVersions' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'manageRevisionsInTag' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'manageVersions' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'rollbackVersionTag' => 'WebGUI::Operation::VersionTag',
|
||||||
|
'setWorkingVersionTag' => 'WebGUI::Operation::VersionTag',
|
||||||
|
|
||||||
|
'genesis' => 'WebGUI::Operation::WebGUI',
|
||||||
|
'setup' => 'WebGUI::Operation::WebGUI',
|
||||||
|
'theWg' => 'WebGUI::Operation::WebGUI',
|
||||||
|
|
||||||
|
'addWorkflow' => 'WebGUI::Operation::Workflow',
|
||||||
|
'addWorkflowSave' => 'WebGUI::Operation::Workflow',
|
||||||
|
'deleteWorkflow' => 'WebGUI::Operation::Workflow',
|
||||||
|
'deleteWorkflowActivity' => 'WebGUI::Operation::Workflow',
|
||||||
|
'demoteWorkflowActivity' => 'WebGUI::Operation::Workflow',
|
||||||
|
'editWorkflow' => 'WebGUI::Operation::Workflow',
|
||||||
|
'editWorkflowSave' => 'WebGUI::Operation::Workflow',
|
||||||
|
'editWorkflowActivity' => 'WebGUI::Operation::Workflow',
|
||||||
|
'editWorkflowActivitySave' => 'WebGUI::Operation::Workflow',
|
||||||
|
'manageWorkflows' => 'WebGUI::Operation::Workflow',
|
||||||
|
'promoteWorkflowActivity' => 'WebGUI::Operation::Workflow',
|
||||||
|
'runWorkflow' => 'WebGUI::Operation::Workflow',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,10 @@ package WebGUI::Operation::FormHelpers;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use WebGUI::Asset;
|
use WebGUI::Asset;
|
||||||
|
use WebGUI::Asset::Wobject::Folder;
|
||||||
|
use WebGUI::Form::Group;
|
||||||
use WebGUI::HTMLForm;
|
use WebGUI::HTMLForm;
|
||||||
|
use WebGUI::Storage::Image;
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
|
|
@ -38,8 +41,8 @@ sub www_formAssetTree {
|
||||||
my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1});
|
my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1});
|
||||||
foreach my $ancestor (@{$ancestors}) {
|
foreach my $ancestor (@{$ancestors}) {
|
||||||
push(@crumb,'<a href="'.$ancestor->getUrl("op=formAssetTree;classLimiter=".$session->form->process("classLimiter").";formId="
|
push(@crumb,'<a href="'.$ancestor->getUrl("op=formAssetTree;classLimiter=".$session->form->process("classLimiter").";formId="
|
||||||
.$session->form->process("formId")).'">'.$ancestor->get("menuTitle").'</a>');
|
.$session->form->process("formId")).'">'.$ancestor->get("menuTitle").'</a>');
|
||||||
}
|
}
|
||||||
my $output = '<p>'.join(" > ", @crumb)."</p>\n";
|
my $output = '<p>'.join(" > ", @crumb)."</p>\n";
|
||||||
my $children = $base->getLineage(["children"],{returnObjects=>1});
|
my $children = $base->getLineage(["children"],{returnObjects=>1});
|
||||||
foreach my $child (@{$children}) {
|
foreach my $child (@{$children}) {
|
||||||
|
|
@ -134,22 +137,41 @@ sub www_richEditImageTree {
|
||||||
my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session);
|
my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session);
|
||||||
my @crumb;
|
my @crumb;
|
||||||
my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1});
|
my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1});
|
||||||
|
my $media;
|
||||||
|
my @output;
|
||||||
|
my $i18n = WebGUI::International->new($session, 'Operation_FormHelpers');
|
||||||
foreach my $ancestor (@{$ancestors}) {
|
foreach my $ancestor (@{$ancestors}) {
|
||||||
push(@crumb,'<a href="'.$ancestor->getUrl("op=richEditImageTree").'">'.$ancestor->get("menuTitle").'</a>');
|
push(@crumb,'<a href="'.$ancestor->getUrl("op=richEditImageTree").'">'.$ancestor->get("menuTitle").'</a>');
|
||||||
|
# check if we are in (a subdirectory of) Media
|
||||||
|
if ($ancestor->get('assetId') eq 'PBasset000000000000003') {
|
||||||
|
$media = $ancestor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
my $output = '<p>'.join(" > ", @crumb)."</p>\n";
|
if ($media) {
|
||||||
|
# if in (a subdirectory of) Media, give user the ability to create folders or upload images
|
||||||
|
push(@output, '<p>[ <a href="');
|
||||||
|
push(@output, $base->getUrl('op=richEditAddFolder'));
|
||||||
|
push(@output, '">'.$i18n->get('Create new folder').'</a> ] [ <a href="');
|
||||||
|
push(@output, $base->getUrl('op=richEditAddImage'));
|
||||||
|
push(@output, '">'.$i18n->get('Upload new image').'</a> ]</p>');
|
||||||
|
} else {
|
||||||
|
$media = WebGUI::Asset->getMedia($session);
|
||||||
|
# if not in Media, provide a direct link to it
|
||||||
|
push(@output, '<p>[ <a href="'.$media->getUrl('op=richEditImageTree').'">'.$media->get('title').'</a> ]</p>');
|
||||||
|
}
|
||||||
|
push(@output, '<p>'.join(" > ", @crumb)."</p>\n");
|
||||||
my $children = $base->getLineage(["children"],{returnObjects=>1});
|
my $children = $base->getLineage(["children"],{returnObjects=>1});
|
||||||
foreach my $child (@{$children}) {
|
foreach my $child (@{$children}) {
|
||||||
next unless $child->canView;
|
next unless $child->canView;
|
||||||
if ($child->get("className") =~ /^WebGUI::Asset::File::Image/) {
|
if ($child->get("className") =~ /^WebGUI::Asset::File::Image/) {
|
||||||
$output .= '<a href="'.$child->getUrl("op=richEditViewThumbnail").'" target="viewer">(•)</a> ';
|
push(@output, '<a href="'.$child->getUrl("op=richEditViewThumbnail").'" target="viewer">(•)</a> ');
|
||||||
} else {
|
} else {
|
||||||
$output .= "(•) ";
|
push(@output, "(•) ");
|
||||||
}
|
}
|
||||||
$output .= '<a href="'.$child->getUrl("op=richEditImageTree").'">'.$child->get("menuTitle").'</a>'."<br />\n";
|
push(@output, '<a href="'.$child->getUrl("op=richEditImageTree").'">'.$child->get("menuTitle").'</a>'."<br />\n");
|
||||||
}
|
}
|
||||||
$session->style->useEmptyStyle("1");
|
$session->style->useEmptyStyle("1");
|
||||||
return $output;
|
return join('', @output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -186,8 +208,158 @@ sub www_richEditViewThumbnail {
|
||||||
return '<div align="center"><img src="'.$session->config->get("extrasURL").'/tinymce/images/icon.gif" style="border-style:none;" alt="'.$i18n->get('image manager').'" /></div>';
|
return '<div align="center"><img src="'.$session->config->get("extrasURL").'/tinymce/images/icon.gif" style="border-style:none;" alt="'.$i18n->get('image manager').'" /></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_richEditAddFolder ( $session )
|
||||||
|
|
||||||
|
Returns a form to add a folder using the rich editor. The purpose of this feature is to provide a very simple way for end-users to create a folder from within the rich editor, in stead of having to leave the rich editor and use the asset manager. A very minimal set of options is supplied, all other options should be derived from the current asset.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub www_richEditAddFolder {
|
||||||
|
my $session = shift;
|
||||||
|
my $i18n = WebGUI::International->new($session, 'Operation_FormHelpers');
|
||||||
|
my $f = WebGUI::HTMLForm->new($session);
|
||||||
|
$f->hidden(
|
||||||
|
name => 'op',
|
||||||
|
value => 'richEditAddFolderSave',
|
||||||
|
);
|
||||||
|
$f->text(
|
||||||
|
label => $i18n->get('Folder name'),
|
||||||
|
name => 'filename',
|
||||||
|
);
|
||||||
|
$f->submit(
|
||||||
|
value => $i18n->get('Create'),
|
||||||
|
);
|
||||||
|
$f->button(
|
||||||
|
value => $i18n->get('Cancel'),
|
||||||
|
extras => 'onclick="history.go(-1);"',
|
||||||
|
);
|
||||||
|
my $html = '<h1>'.$i18n->get('Create new folder').'</h1>'.$f->print;
|
||||||
|
return $session->style->process($html, 'PBtmpl0000000000000137');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_richEditAddFolderSave ( $session )
|
||||||
|
|
||||||
|
Creates a directory under the current asset. The filename should be specified in the form. The Edit and View rights from the current asset are used if not specified in the form. All other properties are copied from the current asset.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub www_richEditAddFolderSave {
|
||||||
|
my $session = shift;
|
||||||
|
# get base url
|
||||||
|
my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session);
|
||||||
|
# check if user can edit the current asset
|
||||||
|
return WebGUI::Privilege::insufficient() unless $base->canEdit;
|
||||||
|
|
||||||
|
my $filename = $session->form->process('filename') || 'untitled';
|
||||||
|
$base->addChild({
|
||||||
|
# Asset properties
|
||||||
|
title => $filename,
|
||||||
|
menuTitle => $filename,
|
||||||
|
url => $base->getUrl.'/'.$filename,
|
||||||
|
groupIdEdit => $session->form->process('groupIdEdit') || $base->get('groupIdEdit'),
|
||||||
|
groupIdView => $session->form->process('groupIdView') || $base->get('groupIdView'),
|
||||||
|
ownerUserId => $session->user->userId,
|
||||||
|
startDate => $base->get('startDate'),
|
||||||
|
endDate => $base->get('endDate'),
|
||||||
|
encryptPage => $base->get('encryptPage'),
|
||||||
|
isHidden => 1,
|
||||||
|
newWindow => 0,
|
||||||
|
|
||||||
|
# Asset/Wobject properties
|
||||||
|
displayTitle => 1,
|
||||||
|
cacheTimeout => $base->get('cacheTimeout'),
|
||||||
|
cacheTimeoutVisitor => $base->get('cacheTimeoutVisitor'),
|
||||||
|
styleTemplateId => $base->get('styleTemplateId'),
|
||||||
|
printableStyleTemplateId => $base->get('printableStyleTemplateId'),
|
||||||
|
|
||||||
|
# Asset/Wobject/Folder properties
|
||||||
|
templateId => 'PBtmpl0000000000000078',
|
||||||
|
|
||||||
|
# Other properties
|
||||||
|
#assetId => 'new',
|
||||||
|
className => 'WebGUI::Asset::Wobject::Folder',
|
||||||
|
#filename => $filename,
|
||||||
|
});
|
||||||
|
$session->http->setRedirect($base->getUrl('op=richEditImageTree'));
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_richEditAddImage ( $session )
|
||||||
|
|
||||||
|
Returns a form to add an image using the rich editor. The purpose of this feature is to provide a very simple way for end-users to upload new images from within the rich editor, in stead of having to leave the rich editor and use the asset manager. A very minimal set of options is supplied, all other options should be derived from the current asset.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub www_richEditAddImage {
|
||||||
|
my $session = shift;
|
||||||
|
my $i18n = WebGUI::International->new($session, 'Operation_FormHelpers');
|
||||||
|
my $f = WebGUI::HTMLForm->new($session);
|
||||||
|
$f->hidden(
|
||||||
|
name => 'op',
|
||||||
|
value => 'richEditAddImageSave',
|
||||||
|
);
|
||||||
|
$f->file(
|
||||||
|
label => $i18n->get('File'),
|
||||||
|
name => 'filename',
|
||||||
|
size => 10,
|
||||||
|
);
|
||||||
|
$f->submit(
|
||||||
|
value => $i18n->get('Upload'),
|
||||||
|
);
|
||||||
|
$f->button(
|
||||||
|
value => $i18n->get('Cancel'),
|
||||||
|
extras => 'onclick="history.go(-1);"',
|
||||||
|
);
|
||||||
|
my $html = '<h1>'.$i18n->get('Upload new image').'</h1>'.$f->print;
|
||||||
|
return $session->style->process($html, 'PBtmpl0000000000000137');
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_richEditAddImageSave ( $session )
|
||||||
|
|
||||||
|
Creates an Image asset under the current asset. The filename should be specified in the form. The Edit and View rights from the current asset are used if not specified in the form. All other properties are copied from the current asset.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub www_richEditAddImageSave {
|
||||||
|
my $session = shift;
|
||||||
|
# get base url
|
||||||
|
my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session);
|
||||||
|
#my $base = $session->asset;
|
||||||
|
my $url = $base->getUrl;
|
||||||
|
# check if user can edit the current asset
|
||||||
|
return WebGUI::Privilege::insufficient() unless $base->canEdit;
|
||||||
|
|
||||||
|
my $storage = WebGUI::Storage::Image->create($session);
|
||||||
|
my $filename = $storage->addFileFromFormPost('filename');
|
||||||
|
if ($filename) {
|
||||||
|
$base->addChild({
|
||||||
|
assetId => 'new',
|
||||||
|
className => 'WebGUI::Asset::File::Image',
|
||||||
|
storageId => $storage->getId,
|
||||||
|
filename => $filename,
|
||||||
|
title => $filename,
|
||||||
|
menuTitle => $filename,
|
||||||
|
templateId => 'PBtmpl0000000000000088',
|
||||||
|
url => $url.'/'.$filename,
|
||||||
|
groupIdEdit => $session->form->process('groupIdEdit') || $base->get('groupIdEdit'),
|
||||||
|
groupIdView => $session->form->process('groupIdView') || $base->get('groupIdView'),
|
||||||
|
ownerUserId => $session->var->get('userId'),
|
||||||
|
isHidden => 1,
|
||||||
|
});
|
||||||
|
$storage->generateThumbnail($filename);
|
||||||
|
}
|
||||||
|
$session->http->setRedirect($url.'?op=richEditImageTree');
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
41
lib/WebGUI/i18n/English/Operation_FormHelpers.pm
Normal file
41
lib/WebGUI/i18n/English/Operation_FormHelpers.pm
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
package WebGUI::i18n::English::Operation_FormHelpers;
|
||||||
|
|
||||||
|
our $I18N = {
|
||||||
|
'Cancel' => {
|
||||||
|
message => q|Cancel|,
|
||||||
|
lastUpdate => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
'Create' => {
|
||||||
|
message => q|Create|,
|
||||||
|
lastUpdate => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
'Create new folder' => {
|
||||||
|
message => q|Create new folder|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
'File' => {
|
||||||
|
message => q|File|,
|
||||||
|
lastUpdate => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
'Folder name' => {
|
||||||
|
message => q|Folder name|,
|
||||||
|
lastUpdate => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
'Upload' => {
|
||||||
|
message => q|Upload|,
|
||||||
|
lastUpdate => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
'Upload new image' => {
|
||||||
|
message => q|Upload new image|,
|
||||||
|
lastUpdate => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
1;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue