adapt-authoring-ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/.eslintrc +14 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +55 -0
- package/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +22 -0
- package/.github/dependabot.yml +11 -0
- package/.github/pull_request_template.md +25 -0
- package/.github/workflows/labelled_prs.yml +16 -0
- package/.github/workflows/new.yml +19 -0
- package/adapt-authoring.json +11 -0
- package/app/core/app.js +43 -0
- package/app/core/assets/adapt-learning-logo-outline.png +0 -0
- package/app/core/assets/adapt-learning-logo-white.png +0 -0
- package/app/core/assets/ajax-loader.gif +0 -0
- package/app/core/assets/favicon.png +0 -0
- package/app/core/assets/transparency-light.png +0 -0
- package/app/core/browserStorage.js +45 -0
- package/app/core/collections/apiCollection.js +74 -0
- package/app/core/collections/contentCollection.js +33 -0
- package/app/core/collections/contentPluginCollection.js +24 -0
- package/app/core/collections/tagsCollection.js +4 -0
- package/app/core/constants.js +10 -0
- package/app/core/helpers.js +375 -0
- package/app/core/index.hbs +192 -0
- package/app/core/l10n.js +33 -0
- package/app/core/less/_reset.less +43 -0
- package/app/core/less/app.less +100 -0
- package/app/core/less/buttons.less +268 -0
- package/app/core/less/colourLabels.less +14 -0
- package/app/core/less/colours.less +132 -0
- package/app/core/less/columns.less +190 -0
- package/app/core/less/fonts.less +30 -0
- package/app/core/less/forms.less +77 -0
- package/app/core/less/sharedStyles.less +73 -0
- package/app/core/less/tables.less +29 -0
- package/app/core/less/tags.less +194 -0
- package/app/core/loading.hbs +27 -0
- package/app/core/models/articleModel.js +19 -0
- package/app/core/models/blockModel.js +25 -0
- package/app/core/models/clipboardModel.js +10 -0
- package/app/core/models/componentModel.js +18 -0
- package/app/core/models/configModel.js +22 -0
- package/app/core/models/contentModel.js +26 -0
- package/app/core/models/contentObjectModel.js +19 -0
- package/app/core/models/contentPluginModel.js +10 -0
- package/app/core/models/courseModel.js +24 -0
- package/app/core/models/sessionModel.js +86 -0
- package/app/core/origin.js +189 -0
- package/app/core/router.js +135 -0
- package/app/core/views/originView.js +92 -0
- package/app/libraries/babel-polyfill.min.js +1 -0
- package/app/libraries/backbone-forms-lists.js +669 -0
- package/app/libraries/backbone-forms.js +2604 -0
- package/app/libraries/backbone.js +1581 -0
- package/app/libraries/ckeditor.js +6 -0
- package/app/libraries/handlebars.js +4902 -0
- package/app/libraries/imageReady.js +2 -0
- package/app/libraries/inview.js +140 -0
- package/app/libraries/jquery-ui.min.js +6 -0
- package/app/libraries/jquery.form.js +1277 -0
- package/app/libraries/jquery.js +10346 -0
- package/app/libraries/jquery.tagsinput.min.js +1 -0
- package/app/libraries/moment.min.js +7 -0
- package/app/libraries/polyglot.min.js +2922 -0
- package/app/libraries/require.js +36 -0
- package/app/libraries/scrollTo.js +11 -0
- package/app/libraries/selectize/css/selectize.less +403 -0
- package/app/libraries/selectize/js/selectize.js +4500 -0
- package/app/libraries/spectrum/spectrum.js +2323 -0
- package/app/libraries/spectrum/spectrum.less +507 -0
- package/app/libraries/underscore.js +1692 -0
- package/app/libraries/velocity.js +4773 -0
- package/app/modules/appHeader/assets/top-bar-1080.jpg +0 -0
- package/app/modules/appHeader/assets/top-bar-2560.jpg +0 -0
- package/app/modules/appHeader/index.js +5 -0
- package/app/modules/appHeader/less/appHeader.less +72 -0
- package/app/modules/appHeader/templates/appHeader.hbs +17 -0
- package/app/modules/appHeader/views/appHeaderView.js +63 -0
- package/app/modules/assetManagement/collections/assetCollection.js +16 -0
- package/app/modules/assetManagement/index.js +65 -0
- package/app/modules/assetManagement/less/asset.less +229 -0
- package/app/modules/assetManagement/less/assetManagementModalTags.less +34 -0
- package/app/modules/assetManagement/less/assetManagementNew.less +60 -0
- package/app/modules/assetManagement/models/assetModel.js +11 -0
- package/app/modules/assetManagement/templates/assetManagement.hbs +12 -0
- package/app/modules/assetManagement/templates/assetManagementCollection.hbs +2 -0
- package/app/modules/assetManagement/templates/assetManagementEditAsset.hbs +9 -0
- package/app/modules/assetManagement/templates/assetManagementEditAssetSidebar.hbs +10 -0
- package/app/modules/assetManagement/templates/assetManagementListItem.hbs +35 -0
- package/app/modules/assetManagement/templates/assetManagementModalAutofill.hbs +1 -0
- package/app/modules/assetManagement/templates/assetManagementModalEditAsset.hbs +11 -0
- package/app/modules/assetManagement/templates/assetManagementModalFilters.hbs +16 -0
- package/app/modules/assetManagement/templates/assetManagementModalTags.hbs +26 -0
- package/app/modules/assetManagement/templates/assetManagementPreview.hbs +53 -0
- package/app/modules/assetManagement/templates/assetManagementSidebar.hbs +93 -0
- package/app/modules/assetManagement/templates/assetPicker.hbs +45 -0
- package/app/modules/assetManagement/views/assetManagementCollectionView.js +216 -0
- package/app/modules/assetManagement/views/assetManagementEditAssetSidebarView.js +25 -0
- package/app/modules/assetManagement/views/assetManagementEditAssetView.js +123 -0
- package/app/modules/assetManagement/views/assetManagementItemView.js +68 -0
- package/app/modules/assetManagement/views/assetManagementModalAutofillView.js +51 -0
- package/app/modules/assetManagement/views/assetManagementModalEditAssetView.js +38 -0
- package/app/modules/assetManagement/views/assetManagementModalFiltersView.js +132 -0
- package/app/modules/assetManagement/views/assetManagementModalTagsView.js +169 -0
- package/app/modules/assetManagement/views/assetManagementModalView.js +62 -0
- package/app/modules/assetManagement/views/assetManagementPreviewView.js +69 -0
- package/app/modules/assetManagement/views/assetManagementSidebarView.js +126 -0
- package/app/modules/assetManagement/views/assetManagementView.js +43 -0
- package/app/modules/colorLabel/index.js +48 -0
- package/app/modules/colorLabel/less/colorLabels.less +102 -0
- package/app/modules/colorLabel/models/colors.js +31 -0
- package/app/modules/colorLabel/templates/colorLabelPopUpView.hbs +21 -0
- package/app/modules/colorLabel/views/colorLabelPopupView.js +75 -0
- package/app/modules/contentHeader/index.js +6 -0
- package/app/modules/contentHeader/less/contentHeader.less +152 -0
- package/app/modules/contentHeader/less/options.less +51 -0
- package/app/modules/contentHeader/templates/actionsButton.hbs +3 -0
- package/app/modules/contentHeader/templates/contentHeader.hbs +38 -0
- package/app/modules/contentHeader/templates/contentHeaderToggleButton.hbs +11 -0
- package/app/modules/contentHeader/templates/filterItem.hbs +23 -0
- package/app/modules/contentHeader/templates/options.hbs +14 -0
- package/app/modules/contentHeader/templates/partials/part_headerButtonContent.hbs +2 -0
- package/app/modules/contentHeader/templates/sortItem.hbs +9 -0
- package/app/modules/contentHeader/views/actionsButtonView.js +14 -0
- package/app/modules/contentHeader/views/contentHeaderButtonView.js +42 -0
- package/app/modules/contentHeader/views/contentHeaderToggleButtonView.js +52 -0
- package/app/modules/contentHeader/views/contentHeaderView.js +96 -0
- package/app/modules/contentHeader/views/filtersButtonView.js +31 -0
- package/app/modules/contentHeader/views/optionsView.js +88 -0
- package/app/modules/contentHeader/views/sortsButtonView.js +45 -0
- package/app/modules/contentPane/index.js +20 -0
- package/app/modules/contentPane/less/contentPane.less +8 -0
- package/app/modules/contentPane/templates/contentPane.hbs +2 -0
- package/app/modules/contentPane/views/contentPaneView.js +77 -0
- package/app/modules/contextMenu/index.js +85 -0
- package/app/modules/contextMenu/less/contextMenu.less +54 -0
- package/app/modules/contextMenu/templates/contextMenu.hbs +6 -0
- package/app/modules/contextMenu/templates/contextMenuItem.hbs +8 -0
- package/app/modules/contextMenu/views/contextMenuItemView.js +37 -0
- package/app/modules/contextMenu/views/contextMenuView.js +76 -0
- package/app/modules/editor/article/index.js +18 -0
- package/app/modules/editor/article/templates/editorArticleEdit.hbs +2 -0
- package/app/modules/editor/article/templates/editorArticleEditSidebar.hbs +19 -0
- package/app/modules/editor/article/views/editorArticleEditSidebarView.js +32 -0
- package/app/modules/editor/article/views/editorArticleEditView.js +19 -0
- package/app/modules/editor/block/index.js +18 -0
- package/app/modules/editor/block/templates/editorBlockEdit.hbs +2 -0
- package/app/modules/editor/block/templates/editorBlockEditSidebar.hbs +19 -0
- package/app/modules/editor/block/views/editorBlockEditSidebarView.js +28 -0
- package/app/modules/editor/block/views/editorBlockEditView.js +19 -0
- package/app/modules/editor/component/index.js +22 -0
- package/app/modules/editor/component/templates/editorComponentEdit.hbs +2 -0
- package/app/modules/editor/component/templates/editorComponentEditSidebar.hbs +19 -0
- package/app/modules/editor/component/views/editorComponentEditSidebarView.js +32 -0
- package/app/modules/editor/component/views/editorComponentEditView.js +23 -0
- package/app/modules/editor/config/index.js +15 -0
- package/app/modules/editor/config/templates/editorConfigEdit.hbs +1 -0
- package/app/modules/editor/config/templates/editorConfigEditSidebar.hbs +10 -0
- package/app/modules/editor/config/views/editorConfigEditSidebarView.js +28 -0
- package/app/modules/editor/config/views/editorConfigEditView.js +28 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-accordion.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-assessment.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-blank.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-default.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-gmcq.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-graphic.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-hot-graphic.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-matching.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-mcq.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-media.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-narrative.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-slider.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-text.png +0 -0
- package/app/modules/editor/contentObject/index.js +68 -0
- package/app/modules/editor/contentObject/less/editing-overlay-component-list.less +60 -0
- package/app/modules/editor/contentObject/less/editing-overlay-panel.less +25 -0
- package/app/modules/editor/contentObject/less/editorMenu.less +84 -0
- package/app/modules/editor/contentObject/less/editorMenuItem.less +114 -0
- package/app/modules/editor/contentObject/less/editorMenuLayer.less +70 -0
- package/app/modules/editor/contentObject/less/editorPage.less +162 -0
- package/app/modules/editor/contentObject/less/editorPageArticle.less +40 -0
- package/app/modules/editor/contentObject/less/editorPageBlock.less +33 -0
- package/app/modules/editor/contentObject/less/editorPageComponent.less +47 -0
- package/app/modules/editor/contentObject/less/editorPageComponentList.less +234 -0
- package/app/modules/editor/contentObject/templates/editorMenu.hbs +1 -0
- package/app/modules/editor/contentObject/templates/editorMenuItem.hbs +23 -0
- package/app/modules/editor/contentObject/templates/editorMenuLayer.hbs +12 -0
- package/app/modules/editor/contentObject/templates/editorMenuSidebar.hbs +1 -0
- package/app/modules/editor/contentObject/templates/editorPage.hbs +15 -0
- package/app/modules/editor/contentObject/templates/editorPageArticle.hbs +15 -0
- package/app/modules/editor/contentObject/templates/editorPageBlock.hbs +14 -0
- package/app/modules/editor/contentObject/templates/editorPageComponent.hbs +9 -0
- package/app/modules/editor/contentObject/templates/editorPageComponentList.hbs +33 -0
- package/app/modules/editor/contentObject/templates/editorPageComponentListItem.hbs +24 -0
- package/app/modules/editor/contentObject/templates/editorPageComponentPasteZone.hbs +4 -0
- package/app/modules/editor/contentObject/templates/editorPageEdit.hbs +1 -0
- package/app/modules/editor/contentObject/templates/editorPageEditSidebar.hbs +10 -0
- package/app/modules/editor/contentObject/templates/editorPageSidebar.hbs +1 -0
- package/app/modules/editor/contentObject/views/editorMenuItemView.js +174 -0
- package/app/modules/editor/contentObject/views/editorMenuLayerView.js +212 -0
- package/app/modules/editor/contentObject/views/editorMenuSidebarView.js +13 -0
- package/app/modules/editor/contentObject/views/editorMenuView.js +211 -0
- package/app/modules/editor/contentObject/views/editorPageArticleView.js +278 -0
- package/app/modules/editor/contentObject/views/editorPageBlockView.js +280 -0
- package/app/modules/editor/contentObject/views/editorPageComponentListItemView.js +80 -0
- package/app/modules/editor/contentObject/views/editorPageComponentListView.js +131 -0
- package/app/modules/editor/contentObject/views/editorPageComponentPasteZoneView.js +47 -0
- package/app/modules/editor/contentObject/views/editorPageComponentView.js +202 -0
- package/app/modules/editor/contentObject/views/editorPageEditSidebarView.js +28 -0
- package/app/modules/editor/contentObject/views/editorPageEditView.js +19 -0
- package/app/modules/editor/contentObject/views/editorPageSidebarView.js +13 -0
- package/app/modules/editor/contentObject/views/editorPageView.js +183 -0
- package/app/modules/editor/course/index.js +26 -0
- package/app/modules/editor/course/templates/editorCourseEdit.hbs +2 -0
- package/app/modules/editor/course/templates/editorCourseEditSidebar.hbs +19 -0
- package/app/modules/editor/course/views/editorCourseEditSidebarView.js +28 -0
- package/app/modules/editor/course/views/editorCourseEditView.js +56 -0
- package/app/modules/editor/extensions/index.js +26 -0
- package/app/modules/editor/extensions/less/extensions.less +22 -0
- package/app/modules/editor/extensions/templates/editorExtensionsEdit.hbs +85 -0
- package/app/modules/editor/extensions/templates/editorExtensionsEditSidebar.hbs +1 -0
- package/app/modules/editor/extensions/views/editorExtensionsEditSidebarView.js +10 -0
- package/app/modules/editor/extensions/views/editorExtensionsEditView.js +85 -0
- package/app/modules/editor/global/collections/editorCollection.js +24 -0
- package/app/modules/editor/global/editorDataLoader.js +91 -0
- package/app/modules/editor/global/helpers.js +99 -0
- package/app/modules/editor/global/less/colorLabels.less +55 -0
- package/app/modules/editor/global/less/editor.less +204 -0
- package/app/modules/editor/global/templates/editor.hbs +1 -0
- package/app/modules/editor/global/templates/editorPasteZone.hbs +4 -0
- package/app/modules/editor/global/templates/partials/part_editorCommon.hbs +70 -0
- package/app/modules/editor/global/templates/partials/part_editorItemSidebar.hbs +40 -0
- package/app/modules/editor/global/templates/partials/part_editorMenu.hbs +4 -0
- package/app/modules/editor/global/templates/partials/part_settingsGeneral.hbs +27 -0
- package/app/modules/editor/global/views/editorOriginView.js +255 -0
- package/app/modules/editor/global/views/editorPasteZoneView.js +69 -0
- package/app/modules/editor/global/views/editorView.js +288 -0
- package/app/modules/editor/index.js +52 -0
- package/app/modules/editor/menuSettings/index.js +27 -0
- package/app/modules/editor/menuSettings/less/menusettings.less +55 -0
- package/app/modules/editor/menuSettings/templates/editorMenuSettingsEdit.hbs +1 -0
- package/app/modules/editor/menuSettings/templates/editorMenuSettingsEditSidebar.hbs +5 -0
- package/app/modules/editor/menuSettings/templates/editorMenuSettingsItem.hbs +4 -0
- package/app/modules/editor/menuSettings/views/editorMenuSettingsEditSidebarView.js +21 -0
- package/app/modules/editor/menuSettings/views/editorMenuSettingsEditView.js +71 -0
- package/app/modules/editor/menuSettings/views/editorMenuSettingsView.js +44 -0
- package/app/modules/editor/themeEditor/collections/editorPresetCollection.js +13 -0
- package/app/modules/editor/themeEditor/index.js +15 -0
- package/app/modules/editor/themeEditor/less/editorPresetEdit.less +78 -0
- package/app/modules/editor/themeEditor/less/editorTheming.less +73 -0
- package/app/modules/editor/themeEditor/models/editorModel.js +62 -0
- package/app/modules/editor/themeEditor/models/editorPresetModel.js +6 -0
- package/app/modules/editor/themeEditor/templates/editorPresetEdit.hbs +31 -0
- package/app/modules/editor/themeEditor/templates/editorTheming.hbs +35 -0
- package/app/modules/editor/themeEditor/templates/editorThemingSidebar.hbs +23 -0
- package/app/modules/editor/themeEditor/views/editorPresetEditView.js +98 -0
- package/app/modules/editor/themeEditor/views/editorThemingSidebarView.js +62 -0
- package/app/modules/editor/themeEditor/views/editorThemingView.js +304 -0
- package/app/modules/frameworkImport/index.js +32 -0
- package/app/modules/frameworkImport/less/frameworkImport.less +101 -0
- package/app/modules/frameworkImport/templates/frameworkImport.hbs +58 -0
- package/app/modules/frameworkImport/templates/frameworkImportSidebar.hbs +12 -0
- package/app/modules/frameworkImport/templates/frameworkImportSummary.hbs +40 -0
- package/app/modules/frameworkImport/templates/partials/part_frameworkImportButton.hbs +3 -0
- package/app/modules/frameworkImport/templates/partials/part_frameworkImportStatusMessages.hbs +22 -0
- package/app/modules/frameworkImport/views/frameworkImportSidebarView.js +31 -0
- package/app/modules/frameworkImport/views/frameworkImportView.js +109 -0
- package/app/modules/globalMenu/index.js +86 -0
- package/app/modules/globalMenu/less/globalMenu.less +117 -0
- package/app/modules/globalMenu/templates/globalMenu.hbs +6 -0
- package/app/modules/globalMenu/templates/globalMenuItem.hbs +10 -0
- package/app/modules/globalMenu/templates/partials/part_globalMenuButton.hbs +7 -0
- package/app/modules/globalMenu/views/globalMenuItemView.js +108 -0
- package/app/modules/globalMenu/views/globalMenuView.js +45 -0
- package/app/modules/limiteduser/index.js +17 -0
- package/app/modules/limiteduser/less/limitedUser.less +29 -0
- package/app/modules/limiteduser/templates/limitedUser.hbs +8 -0
- package/app/modules/limiteduser/views/limitedUserView.js +12 -0
- package/app/modules/modal/index.js +13 -0
- package/app/modules/modal/less/modal.less +61 -0
- package/app/modules/modal/models/modalModel.js +14 -0
- package/app/modules/modal/templates/modal.hbs +34 -0
- package/app/modules/modal/views/modalView.js +102 -0
- package/app/modules/notify/index.js +32 -0
- package/app/modules/notify/plugins/alert/assets/sweetalert.css +932 -0
- package/app/modules/notify/plugins/alert/index.js +117 -0
- package/app/modules/notify/plugins/alert/less/alert.less +74 -0
- package/app/modules/notify/plugins/alert/sweetalert2-11.1.7.all.min.js +2 -0
- package/app/modules/notify/plugins/console/index.js +18 -0
- package/app/modules/notify/plugins/snackbar/index.js +69 -0
- package/app/modules/notify/plugins/snackbar/less/snackbar.less +40 -0
- package/app/modules/notify/plugins/toast/index.js +70 -0
- package/app/modules/notify/plugins/toast/less/toast.less +62 -0
- package/app/modules/pluginManagement/index.js +36 -0
- package/app/modules/pluginManagement/less/pluginManagement.less +23 -0
- package/app/modules/pluginManagement/less/pluginType.less +25 -0
- package/app/modules/pluginManagement/templates/pluginManagement.hbs +43 -0
- package/app/modules/pluginManagement/templates/pluginManagementSidebar.hbs +40 -0
- package/app/modules/pluginManagement/templates/pluginManagementUpload.hbs +12 -0
- package/app/modules/pluginManagement/templates/pluginManagementUploadSidebar.hbs +13 -0
- package/app/modules/pluginManagement/templates/pluginType.hbs +43 -0
- package/app/modules/pluginManagement/views/pluginManagementSidebarView.js +48 -0
- package/app/modules/pluginManagement/views/pluginManagementUploadSidebarView.js +25 -0
- package/app/modules/pluginManagement/views/pluginManagementUploadView.js +52 -0
- package/app/modules/pluginManagement/views/pluginManagementView.js +104 -0
- package/app/modules/pluginManagement/views/pluginTypeView.js +105 -0
- package/app/modules/projects/assets/origami-project.jpg +0 -0
- package/app/modules/projects/index.js +82 -0
- package/app/modules/projects/less/projects.less +152 -0
- package/app/modules/projects/less/qproject.less +143 -0
- package/app/modules/projects/templates/project.hbs +63 -0
- package/app/modules/projects/templates/projects.hbs +6 -0
- package/app/modules/projects/templates/projectsSidebar.hbs +42 -0
- package/app/modules/projects/views/projectView.js +167 -0
- package/app/modules/projects/views/projectsSidebarView.js +172 -0
- package/app/modules/projects/views/projectsView.js +271 -0
- package/app/modules/scaffold/backboneFormsOverrides.js +284 -0
- package/app/modules/scaffold/index.js +342 -0
- package/app/modules/scaffold/lang/en.json +9 -0
- package/app/modules/scaffold/less/codeEditor.less +6 -0
- package/app/modules/scaffold/less/colourPicker.less +141 -0
- package/app/modules/scaffold/less/displayTitle.less +17 -0
- package/app/modules/scaffold/less/forms.less +174 -0
- package/app/modules/scaffold/less/list.less +35 -0
- package/app/modules/scaffold/less/modal.less +45 -0
- package/app/modules/scaffold/less/scaffoldAsset.less +23 -0
- package/app/modules/scaffold/less/scaffoldAssetItem.less +50 -0
- package/app/modules/scaffold/less/selectize.less +29 -0
- package/app/modules/scaffold/less/textArea.less +9 -0
- package/app/modules/scaffold/less/users.less +6 -0
- package/app/modules/scaffold/templates/field.hbs +25 -0
- package/app/modules/scaffold/templates/fieldset.hbs +10 -0
- package/app/modules/scaffold/templates/form.hbs +6 -0
- package/app/modules/scaffold/templates/list.hbs +4 -0
- package/app/modules/scaffold/templates/listItem.hbs +5 -0
- package/app/modules/scaffold/templates/scaffoldAsset.hbs +65 -0
- package/app/modules/scaffold/templates/scaffoldAssetItem.hbs +35 -0
- package/app/modules/scaffold/templates/scaffoldDisplayTitle.hbs +8 -0
- package/app/modules/scaffold/templates/scaffoldEditHtml.hbs +1 -0
- package/app/modules/scaffold/templates/scaffoldFile.hbs +1 -0
- package/app/modules/scaffold/templates/scaffoldItemsModal.hbs +14 -0
- package/app/modules/scaffold/templates/scaffoldModalOverlay.hbs +1 -0
- package/app/modules/scaffold/templates/scaffoldUsersOption.hbs +8 -0
- package/app/modules/scaffold/views/scaffoldAssetItemView.js +203 -0
- package/app/modules/scaffold/views/scaffoldAssetView.js +157 -0
- package/app/modules/scaffold/views/scaffoldCodeEditorView.js +64 -0
- package/app/modules/scaffold/views/scaffoldColourPickerView.js +70 -0
- package/app/modules/scaffold/views/scaffoldDisplayTitleView.js +112 -0
- package/app/modules/scaffold/views/scaffoldFileView.js +18 -0
- package/app/modules/scaffold/views/scaffoldItemsModalView.js +100 -0
- package/app/modules/scaffold/views/scaffoldListView.js +158 -0
- package/app/modules/scaffold/views/scaffoldTagsView.js +71 -0
- package/app/modules/scaffold/views/scaffoldUsersView.js +89 -0
- package/app/modules/sidebar/index.js +22 -0
- package/app/modules/sidebar/less/sidebar.less +298 -0
- package/app/modules/sidebar/less/sidebarFilter.less +91 -0
- package/app/modules/sidebar/templates/sidebar.hbs +7 -0
- package/app/modules/sidebar/templates/sidebarBreadcrumb.hbs +3 -0
- package/app/modules/sidebar/templates/sidebarDivide.hbs +5 -0
- package/app/modules/sidebar/templates/sidebarFieldsetFilter.hbs +6 -0
- package/app/modules/sidebar/templates/sidebarFilter.hbs +30 -0
- package/app/modules/sidebar/templates/sidebarRowFilter.hbs +4 -0
- package/app/modules/sidebar/templates/sidebarUpdateButton.hbs +3 -0
- package/app/modules/sidebar/views/sidebarFieldsetFilterView.js +43 -0
- package/app/modules/sidebar/views/sidebarFilterView.js +132 -0
- package/app/modules/sidebar/views/sidebarItemView.js +172 -0
- package/app/modules/sidebar/views/sidebarView.js +71 -0
- package/app/modules/user/assets/adapt-learning-logo.png +0 -0
- package/app/modules/user/assets/adapt-logo.png +0 -0
- package/app/modules/user/assets/login_bg.jpg +0 -0
- package/app/modules/user/index.js +75 -0
- package/app/modules/user/less/forgotPassword.less +14 -0
- package/app/modules/user/less/login.less +138 -0
- package/app/modules/user/less/logout.less +3 -0
- package/app/modules/user/less/resetPassword.less +7 -0
- package/app/modules/user/less/userProfile.less +49 -0
- package/app/modules/user/models/userProfileModel.js +32 -0
- package/app/modules/user/templates/forgotPassword.hbs +36 -0
- package/app/modules/user/templates/login.hbs +29 -0
- package/app/modules/user/templates/resetPassword.hbs +29 -0
- package/app/modules/user/templates/userProfile.hbs +71 -0
- package/app/modules/user/templates/userProfileSidebar.hbs +16 -0
- package/app/modules/user/views/forgotPasswordView.js +63 -0
- package/app/modules/user/views/loginView.js +93 -0
- package/app/modules/user/views/resetPasswordView.js +78 -0
- package/app/modules/user/views/userProfileSidebarView.js +32 -0
- package/app/modules/user/views/userProfileView.js +107 -0
- package/app/modules/userManagement/collections/userCollection.js +65 -0
- package/app/modules/userManagement/helpers.js +46 -0
- package/app/modules/userManagement/index.js +67 -0
- package/app/modules/userManagement/less/userManagement.less +268 -0
- package/app/modules/userManagement/models/userModel.js +34 -0
- package/app/modules/userManagement/templates/addUser.hbs +35 -0
- package/app/modules/userManagement/templates/addUserSidebar.hbs +9 -0
- package/app/modules/userManagement/templates/user.hbs +126 -0
- package/app/modules/userManagement/templates/userManagement.hbs +49 -0
- package/app/modules/userManagement/templates/userManagementFilter.hbs +19 -0
- package/app/modules/userManagement/templates/userManagementSidebar.hbs +13 -0
- package/app/modules/userManagement/views/addUserSidebarView.js +25 -0
- package/app/modules/userManagement/views/addUserView.js +85 -0
- package/app/modules/userManagement/views/filterView.js +49 -0
- package/app/modules/userManagement/views/userManagementSidebarView.js +33 -0
- package/app/modules/userManagement/views/userManagementView.js +104 -0
- package/app/modules/userManagement/views/userView.js +324 -0
- package/conf/config.schema.json +18 -0
- package/docs/migrating-from-legacy.md +19 -0
- package/docs/plugins/index-ui.md +17 -0
- package/docs/plugins/uidocs.js +54 -0
- package/docs/ui-extensions.md +15 -0
- package/index.js +1 -0
- package/lib/UiBuild.js +391 -0
- package/lib/UiModule.js +158 -0
- package/npm_hooks/postinstall.js +4 -0
- package/package.json +27 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Backbone = require('backbone');
|
|
4
|
+
var Origin = require('core/origin');
|
|
5
|
+
var ContextMenuItemView = require('./contextMenuItemView');
|
|
6
|
+
|
|
7
|
+
var ContextMenuView = Backbone.View.extend({
|
|
8
|
+
className: 'context-menu',
|
|
9
|
+
contextView : {},
|
|
10
|
+
|
|
11
|
+
initialize: function() {
|
|
12
|
+
this._isVisible = false;
|
|
13
|
+
this.listenTo(Origin, {
|
|
14
|
+
'contextMenu:open': this.toggleMenu,
|
|
15
|
+
'contextMenu:closeContextMenu remove remove:views': this.hideMenu
|
|
16
|
+
});
|
|
17
|
+
$('html').click(_.bind(this.hideMenu, this));
|
|
18
|
+
this.render();
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
render: function() {
|
|
22
|
+
var template = Handlebars.templates['contextMenu'];
|
|
23
|
+
$(this.el).html(template).appendTo('body');
|
|
24
|
+
return this;
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
renderItems: function() {
|
|
28
|
+
this.$('.context-menu-holder').empty();
|
|
29
|
+
Origin.trigger('contextMenu:empty');
|
|
30
|
+
|
|
31
|
+
_.each(this.collection.where({ type: this.type }), function(item) {
|
|
32
|
+
item.set('contextView', this.contextView);
|
|
33
|
+
new ContextMenuItemView({ model: item });
|
|
34
|
+
}, this);
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
toggleMenu: function(view, e) {
|
|
38
|
+
var isSameType = view && (view.model.get('_type')) === (this.contextView.model && this.contextView.model.get('_type'));
|
|
39
|
+
var isSameModel = view && (view.model.get('_id')) === (this.contextView.model && this.contextView.model.get('_id'));
|
|
40
|
+
var isSameView = view.cid === this.contextView.cid; // to make sure we don't break listeners
|
|
41
|
+
// new view, update the menu items
|
|
42
|
+
if(!isSameType || !isSameModel || !isSameView) {
|
|
43
|
+
this.setMenu(view, $(e.currentTarget));
|
|
44
|
+
return this.showMenu();
|
|
45
|
+
}
|
|
46
|
+
(this._isVisible) ? this.hideMenu() : this.showMenu();
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
setMenu: function(view, $parent) {
|
|
50
|
+
this.contextView = view;
|
|
51
|
+
this.type = view.model.get('_type');
|
|
52
|
+
|
|
53
|
+
this.renderItems();
|
|
54
|
+
|
|
55
|
+
this.$el.css({
|
|
56
|
+
position: 'absolute',
|
|
57
|
+
left: $parent.offset().left + $parent.width() + 10,
|
|
58
|
+
top: $parent.offset().top - ($parent.height()/2)
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
showMenu: function() {
|
|
63
|
+
this.$el.removeClass('display-none');
|
|
64
|
+
this._isVisible = true;
|
|
65
|
+
Origin.trigger('contextMenu:opened');
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
hideMenu: function() {
|
|
69
|
+
this.$el.addClass('display-none');
|
|
70
|
+
this._isVisible = false;
|
|
71
|
+
Origin.trigger('contextMenu:closed');
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
return ContextMenuView;
|
|
76
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var EditorArticleEditSidebarView = require('./views/editorArticleEditSidebarView');
|
|
4
|
+
var EditorArticleEditView = require('./views/editorArticleEditView');
|
|
5
|
+
var Helpers = require('../global/helpers');
|
|
6
|
+
var Origin = require('core/origin');
|
|
7
|
+
|
|
8
|
+
Origin.on('editor:article', async function(data) {
|
|
9
|
+
if(data.action !== 'edit') {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
var model = Origin.editor.data.content.findWhere({ _id: data.id });
|
|
13
|
+
var form = await Origin.scaffold.buildForm({ model });
|
|
14
|
+
Helpers.setPageTitle(model);
|
|
15
|
+
Origin.sidebar.addView(new EditorArticleEditSidebarView({ model, form }).$el);
|
|
16
|
+
Origin.contentPane.setView(EditorArticleEditView, { model, form });
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="sidebar-item-inner">
|
|
2
|
+
{{!-- <div class="sidebar-row sidebar-item-title">
|
|
3
|
+
<h2 class="sidebar-item-title-inner">
|
|
4
|
+
Article Edit
|
|
5
|
+
</h2>
|
|
6
|
+
</div> --}}
|
|
7
|
+
<div class="separator"></div>
|
|
8
|
+
<button class="editor-article-edit-sidebar-save action-primary">
|
|
9
|
+
<span class="editor-article-edit-sidebar-save-inner">
|
|
10
|
+
{{!-- <i class="fa fa-save"></i> --}}{{t 'app.save'}}
|
|
11
|
+
</span>
|
|
12
|
+
</button>
|
|
13
|
+
<button class="editor-article-edit-sidebar-cancel action-secondary">
|
|
14
|
+
<span class="editor-article-edit-sidebar-cancel-inner">
|
|
15
|
+
{{!-- <i class="fa fa-close"></i> --}}{{t 'app.cancel'}}
|
|
16
|
+
</span>
|
|
17
|
+
</button>
|
|
18
|
+
<div class="separator"></div>
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Backbone = require('backbone');
|
|
4
|
+
var Origin = require('core/origin');
|
|
5
|
+
var SidebarItemView = require('modules/sidebar/views/sidebarItemView');
|
|
6
|
+
|
|
7
|
+
var EditorArticleEditSidebarView = SidebarItemView.extend({
|
|
8
|
+
events: {
|
|
9
|
+
'click .editor-article-edit-sidebar-save': 'saveEditing',
|
|
10
|
+
'click .editor-article-edit-sidebar-cancel': 'cancelEditing'
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
postRender: function() {
|
|
14
|
+
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
saveEditing: function(event) {
|
|
18
|
+
event && event.preventDefault();
|
|
19
|
+
this.updateButton('.editor-article-edit-sidebar-save', Origin.l10n.t('app.saving'));
|
|
20
|
+
Origin.trigger('editorArticleEditSidebar:views:save');
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
cancelEditing: function(event) {
|
|
24
|
+
event && event.preventDefault();
|
|
25
|
+
Backbone.history.history.back();
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
template: 'editorArticleEditSidebar'
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return EditorArticleEditSidebarView;
|
|
32
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Backbone = require('backbone');
|
|
4
|
+
var Origin = require('core/origin');
|
|
5
|
+
var EditorOriginView = require('../../global/views/editorOriginView');
|
|
6
|
+
|
|
7
|
+
var EditorArticleEditView = EditorOriginView.extend({
|
|
8
|
+
className: "article-edit",
|
|
9
|
+
tagName: "div",
|
|
10
|
+
|
|
11
|
+
preRender: function() {
|
|
12
|
+
this.listenTo(Origin, 'editorArticleEditSidebar:views:save', this.save);
|
|
13
|
+
}
|
|
14
|
+
}, {
|
|
15
|
+
template: 'editorArticleEdit'
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return EditorArticleEditView;
|
|
19
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var EditorBlockEditSidebarView = require('./views/editorBlockEditSidebarView');
|
|
4
|
+
var EditorBlockEditView = require('./views/editorBlockEditView');
|
|
5
|
+
var Helpers = require('../global/helpers');
|
|
6
|
+
var Origin = require('core/origin');
|
|
7
|
+
|
|
8
|
+
Origin.on('editor:block', async function(data) {
|
|
9
|
+
if(data.action !== 'edit') {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
var model = Origin.editor.data.content.findWhere({ _id: data.id });
|
|
13
|
+
var form = await Origin.scaffold.buildForm({ model });
|
|
14
|
+
Helpers.setPageTitle(model);
|
|
15
|
+
Origin.sidebar.addView(new EditorBlockEditSidebarView({ model, form }).$el);
|
|
16
|
+
Origin.contentPane.setView(EditorBlockEditView, { model, form });
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="sidebar-item-inner">
|
|
2
|
+
{{!-- <div class="sidebar-row sidebar-item-title">
|
|
3
|
+
<h2 class="sidebar-item-title-inner">
|
|
4
|
+
Block Edit
|
|
5
|
+
</h2>
|
|
6
|
+
</div> --}}
|
|
7
|
+
<div class="separator"></div>
|
|
8
|
+
<button class="editor-block-edit-sidebar-save action-primary">
|
|
9
|
+
<span class="editor-block-edit-sidebar-save-inner">
|
|
10
|
+
{{!-- <i class="fa fa-save"></i> --}}{{t 'app.save'}}
|
|
11
|
+
</span>
|
|
12
|
+
</button>
|
|
13
|
+
<button class="editor-block-edit-sidebar-cancel action-secondary">
|
|
14
|
+
<span class="editor-block-edit-sidebar-cancel-inner">
|
|
15
|
+
{{!-- <i class="fa fa-close"></i> --}}{{t 'app.cancel'}}
|
|
16
|
+
</span>
|
|
17
|
+
</button>
|
|
18
|
+
<div class="separator"></div>
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Backbone = require('backbone');
|
|
4
|
+
var Origin = require('core/origin');
|
|
5
|
+
var SidebarItemView = require('modules/sidebar/views/sidebarItemView');
|
|
6
|
+
|
|
7
|
+
var EditorBlockEditSidebarView = SidebarItemView.extend({
|
|
8
|
+
events: {
|
|
9
|
+
'click .editor-block-edit-sidebar-save': 'saveEditing',
|
|
10
|
+
'click .editor-block-edit-sidebar-cancel': 'cancelEditing'
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
saveEditing: function(event) {
|
|
14
|
+
event && event.preventDefault();
|
|
15
|
+
this.updateButton('.editor-block-edit-sidebar-save', Origin.l10n.t('app.saving'));
|
|
16
|
+
Origin.trigger('editorBlockEditSidebar:views:save');
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
cancelEditing: function(event) {
|
|
20
|
+
event && event.preventDefault();
|
|
21
|
+
Backbone.history.history.back();
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
template: 'editorBlockEditSidebar'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return EditorBlockEditSidebarView;
|
|
28
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Backbone = require('backbone');
|
|
4
|
+
var Origin = require('core/origin');
|
|
5
|
+
var EditorOriginView = require('../../global/views/editorOriginView');
|
|
6
|
+
|
|
7
|
+
var EditorBlockEditView = EditorOriginView.extend({
|
|
8
|
+
className: "block-edit",
|
|
9
|
+
tagName: "div",
|
|
10
|
+
|
|
11
|
+
preRender: function() {
|
|
12
|
+
this.listenTo(Origin, 'editorBlockEditSidebar:views:save', this.save);
|
|
13
|
+
}
|
|
14
|
+
}, {
|
|
15
|
+
template: 'editorBlockEdit'
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return EditorBlockEditView;
|
|
19
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
const EditorComponentEditSidebarView = require('./views/editorComponentEditSidebarView');
|
|
4
|
+
const EditorComponentEditView = require('./views/editorComponentEditView');
|
|
5
|
+
const Helpers = require('../global/helpers');
|
|
6
|
+
const Origin = require('core/origin');
|
|
7
|
+
|
|
8
|
+
Origin.on('editor:component', async ({ id: _id }) => {
|
|
9
|
+
if(_id === 'new' && !Origin.editor.data.newcomponent) {
|
|
10
|
+
return Origin.Notify.alert({
|
|
11
|
+
type: 'error',
|
|
12
|
+
text: 'Invalid data for new component',
|
|
13
|
+
callback: () => Origin.router.navigateBack()
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const model = _id === 'new' ? Origin.editor.data.newcomponent : Origin.editor.data.content.findWhere({ _id });
|
|
17
|
+
const form = await Origin.scaffold.buildForm({ model });
|
|
18
|
+
Helpers.setPageTitle(model);
|
|
19
|
+
Origin.sidebar.addView(new EditorComponentEditSidebarView({ model, form }).$el);
|
|
20
|
+
Origin.contentPane.setView(EditorComponentEditView, { model, form });
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="sidebar-item-inner">
|
|
2
|
+
{{!-- <div class="sidebar-row sidebar-item-title">
|
|
3
|
+
<h2 class="sidebar-item-title-inner">
|
|
4
|
+
Component Edit
|
|
5
|
+
</h2>
|
|
6
|
+
</div> --}}
|
|
7
|
+
<div class="separator"></div>
|
|
8
|
+
<button class="editor-component-edit-sidebar-save action-primary">
|
|
9
|
+
<span class="editor-component-edit-sidebar-save-inner">
|
|
10
|
+
{{t 'app.save'}}
|
|
11
|
+
</span>
|
|
12
|
+
</button>
|
|
13
|
+
<button class="editor-component-edit-sidebar-cancel action-secondary">
|
|
14
|
+
<span class="editor-component-edit-sidebar-cancel-inner">
|
|
15
|
+
{{t 'app.cancel'}}
|
|
16
|
+
</span>
|
|
17
|
+
</button>
|
|
18
|
+
<div class="separator"></div>
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Origin = require('core/origin');
|
|
4
|
+
var SidebarItemView = require('modules/sidebar/views/sidebarItemView');
|
|
5
|
+
|
|
6
|
+
var EditorComponentEditSidebarView = SidebarItemView.extend({
|
|
7
|
+
events: {
|
|
8
|
+
'click .editor-component-edit-sidebar-save': 'saveEditing',
|
|
9
|
+
'click .editor-component-edit-sidebar-cancel': 'cancelEditing'
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
saveEditing: function(event) {
|
|
13
|
+
event.preventDefault();
|
|
14
|
+
this.updateButton('.editor-component-edit-sidebar-save', Origin.l10n.t('app.saving'));
|
|
15
|
+
Origin.trigger('editorComponentEditSidebar:views:save');
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
cancelEditing: function(event) {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
const page = this.getParent(this.getParent(this.getParent(this.model)));
|
|
21
|
+
Origin.router.navigateTo(`editor/${page.get('_courseId')}/page/${page.get('_id')}`);
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
getParent: function(model) {
|
|
25
|
+
return Origin.editor.data.content.findWhere({ _id: model.get('_parentId') });
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
template: 'editorComponentEditSidebar'
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return EditorComponentEditSidebarView;
|
|
32
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Origin = require('core/origin');
|
|
4
|
+
var EditorOriginView = require('../../global/views/editorOriginView');
|
|
5
|
+
|
|
6
|
+
var EditorComponentEditView = EditorOriginView.extend({
|
|
7
|
+
className: "component-edit",
|
|
8
|
+
tagName: "div",
|
|
9
|
+
|
|
10
|
+
preRender: function() {
|
|
11
|
+
this.listenTo(Origin, 'editorComponentEditSidebar:views:save', this.save);
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
cancel: function (event) {
|
|
15
|
+
event && event.preventDefault();
|
|
16
|
+
Origin.trigger('editorSidebarView:removeEditView', this.model);
|
|
17
|
+
}
|
|
18
|
+
}, {
|
|
19
|
+
template: 'editorComponentEdit'
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return EditorComponentEditView;
|
|
23
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var EditorConfigEditSidebarView = require('./views/editorConfigEditSidebarView');
|
|
4
|
+
var EditorConfigEditView = require('./views/editorConfigEditView');
|
|
5
|
+
var Helpers = require('../global/helpers');
|
|
6
|
+
var Origin = require('core/origin');
|
|
7
|
+
|
|
8
|
+
Origin.on('editor:config', async function(data) {
|
|
9
|
+
var model = Origin.editor.data.config;
|
|
10
|
+
var form = await Origin.scaffold.buildForm({ model });
|
|
11
|
+
Helpers.setPageTitle(model);
|
|
12
|
+
Origin.sidebar.addView(new EditorConfigEditSidebarView({ form }).$el);
|
|
13
|
+
Origin.contentPane.setView(EditorConfigEditView, { model, form });
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div class="config-edit-inner form-container"></div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div class="sidebar-item-inner">
|
|
2
|
+
<div class="separator"></div>
|
|
3
|
+
<button class="editor-config-edit-sidebar-save action-primary">
|
|
4
|
+
<span class="editor-config-edit-sidebar-save-inner">{{t 'app.save'}}</span>
|
|
5
|
+
</button>
|
|
6
|
+
<button class="editor-config-edit-sidebar-cancel action-secondary">
|
|
7
|
+
<span class="editor-config-edit-sidebar-cancel-inner">{{t 'app.cancel'}}</span>
|
|
8
|
+
</button>
|
|
9
|
+
<div class="separator"></div>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Backbone = require('backbone');
|
|
4
|
+
var Origin = require('core/origin');
|
|
5
|
+
var SidebarItemView = require('modules/sidebar/views/sidebarItemView');
|
|
6
|
+
|
|
7
|
+
var EditorConfigEditSidebarView = SidebarItemView.extend({
|
|
8
|
+
events: {
|
|
9
|
+
'click .editor-config-edit-sidebar-save': 'saveEditing',
|
|
10
|
+
'click .editor-config-edit-sidebar-cancel': 'cancelEditing'
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
saveEditing: function(event) {
|
|
14
|
+
event && event.preventDefault();
|
|
15
|
+
this.updateButton('.editor-config-edit-sidebar-save', Origin.l10n.t('app.saving'));
|
|
16
|
+
Origin.trigger('editorConfigEditSidebar:views:save');
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
cancelEditing: function(event) {
|
|
20
|
+
event && event.preventDefault();
|
|
21
|
+
Backbone.history.history.back();
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
template: 'editorConfigEditSidebar'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return EditorConfigEditSidebarView;
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Origin = require('core/origin');
|
|
4
|
+
var EditorOriginView = require('../../global/views/editorOriginView');
|
|
5
|
+
|
|
6
|
+
var EditorConfigEditView = EditorOriginView.extend({
|
|
7
|
+
className: "config-edit",
|
|
8
|
+
tagName: "div",
|
|
9
|
+
|
|
10
|
+
preRender: function() {
|
|
11
|
+
this.listenTo(Origin, {
|
|
12
|
+
'editorSidebarView:removeEditView': this.remove,
|
|
13
|
+
'editorConfigEditSidebar:views:save': this.save
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
getAttributesToSave: function() {
|
|
18
|
+
var changed = this.model.changedAttributes();
|
|
19
|
+
if(changed) {
|
|
20
|
+
return Object.assign(changed, { _id: this.model.get('_id'), _courseId: this.model.get('_courseId') });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
template: 'editorConfigEdit'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return EditorConfigEditView;
|
|
28
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
/**
|
|
3
|
+
* This module handles both sections/menus and pages.
|
|
4
|
+
*/
|
|
5
|
+
define(function(require) {
|
|
6
|
+
var EditorMenuSidebarView = require('./views/editorMenuSidebarView');
|
|
7
|
+
var EditorPageEditSidebarView = require('./views/editorPageEditSidebarView');
|
|
8
|
+
var EditorPageEditView = require('./views/editorPageEditView');
|
|
9
|
+
var EditorPageSidebarView = require('./views/editorPageSidebarView');
|
|
10
|
+
var EditorView = require('../global/views/editorView');
|
|
11
|
+
var Helpers = require('../global/helpers');
|
|
12
|
+
var Origin = require('core/origin');
|
|
13
|
+
|
|
14
|
+
Origin.on('editor:contentObject', function(data) {
|
|
15
|
+
var route = function() {
|
|
16
|
+
if(data.action === 'edit') {
|
|
17
|
+
return renderContentObjectEdit(data);
|
|
18
|
+
}
|
|
19
|
+
if(data.id) {
|
|
20
|
+
return renderPageStructure(data);
|
|
21
|
+
}
|
|
22
|
+
renderMenuStructure(data);
|
|
23
|
+
}
|
|
24
|
+
if(!data.id) {
|
|
25
|
+
return route();
|
|
26
|
+
}
|
|
27
|
+
data.model = Origin.editor.data.content.findWhere({ _id: data.id });
|
|
28
|
+
Helpers.setPageTitle(data.model);
|
|
29
|
+
route();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
async function renderContentObjectEdit(data) {
|
|
33
|
+
Helpers.setPageTitle(data.model);
|
|
34
|
+
var form = await Origin.scaffold.buildForm({ model: data.model });
|
|
35
|
+
Origin.sidebar.addView(new EditorPageEditSidebarView({ form: form }).$el);
|
|
36
|
+
Origin.contentPane.setView(EditorPageEditView, { model: data.model, form: form });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function renderPageStructure(data) {
|
|
40
|
+
Helpers.setPageTitle(data.model);
|
|
41
|
+
|
|
42
|
+
Origin.sidebar.addView(new EditorPageSidebarView().$el, {
|
|
43
|
+
backButtonText: Origin.l10n.t('app.backtomenu'),
|
|
44
|
+
backButtonRoute: "#/editor/" + Origin.location.route1 + "/menu"
|
|
45
|
+
});
|
|
46
|
+
Origin.contentPane.setView(EditorView, {
|
|
47
|
+
currentCourseId: Origin.location.route1,
|
|
48
|
+
currentView: 'page',
|
|
49
|
+
currentPageId: data.id
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function renderMenuStructure(data) {
|
|
54
|
+
Helpers.setPageTitle(Origin.editor.data.course);
|
|
55
|
+
|
|
56
|
+
Origin.editor.scrollTo = 0;
|
|
57
|
+
|
|
58
|
+
Origin.sidebar.addView(new EditorMenuSidebarView().$el, {
|
|
59
|
+
backButtonText: Origin.l10n.t('app.backtoprojects'),
|
|
60
|
+
backButtonRoute: '#/projects'
|
|
61
|
+
});
|
|
62
|
+
Origin.contentPane.setView(EditorView, {
|
|
63
|
+
currentCourseId: Origin.location.route1,
|
|
64
|
+
currentView: 'menu',
|
|
65
|
+
currentPageId: data.id
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.editing-overlay-component-select-body {
|
|
2
|
+
border-bottom: 1px solid #b7caed;
|
|
3
|
+
background-color:#f3f3f3;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.editing-overlay-component-select-body-inner {
|
|
7
|
+
padding:30px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.editing-overlay-component-item {
|
|
11
|
+
position:relative;
|
|
12
|
+
overflow:hidden;
|
|
13
|
+
border-bottom: 1px solid #b7caed;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.editing-overlay-component-option {
|
|
17
|
+
position:relative;
|
|
18
|
+
z-index:10;
|
|
19
|
+
border:none;
|
|
20
|
+
display:block;
|
|
21
|
+
width:100%;
|
|
22
|
+
padding:0px;
|
|
23
|
+
text-align:left;
|
|
24
|
+
background-color:#e8e8e8;
|
|
25
|
+
transition:background-color 0.2s;
|
|
26
|
+
&:hover {
|
|
27
|
+
background-color:#aaa;
|
|
28
|
+
}
|
|
29
|
+
&.selected {
|
|
30
|
+
background-color:#999;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.editing-overlay-component-option-inner {
|
|
35
|
+
padding:10px 30px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.editing-overlay-component-layout {
|
|
39
|
+
position:absolute;
|
|
40
|
+
z-index:5;
|
|
41
|
+
left:0px;
|
|
42
|
+
top:0px;
|
|
43
|
+
height:100%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.editing-overlay-component-layout-option {
|
|
47
|
+
border:none;
|
|
48
|
+
border-right:1px solid #ccc;
|
|
49
|
+
padding:0px 10px;
|
|
50
|
+
float:left;
|
|
51
|
+
background-color: @white;
|
|
52
|
+
color:#3e4960;
|
|
53
|
+
transition:background-color 0.2s;
|
|
54
|
+
&:hover {
|
|
55
|
+
background-color:#444;
|
|
56
|
+
}
|
|
57
|
+
&.selected {
|
|
58
|
+
background-color:#111;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.editing-overlay-panel {
|
|
2
|
+
}
|
|
3
|
+
|
|
4
|
+
.editing-overlay-panel-collapsed {
|
|
5
|
+
display:none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.editing-overlay-panel-title {
|
|
9
|
+
display:block;
|
|
10
|
+
background-color: @white;
|
|
11
|
+
color:#3e4960;
|
|
12
|
+
border-bottom:1px solid #454545;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.editing-overlay-panel-title-inner {
|
|
16
|
+
padding:30px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.editing-overlay-panel-content {
|
|
20
|
+
border-bottom:1px solid #454545;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.editing-overlay-panel-content-inner {
|
|
24
|
+
padding:30px;
|
|
25
|
+
}
|