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,304 @@
|
|
|
1
|
+
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
|
|
2
|
+
define(function(require) {
|
|
3
|
+
var Backbone = require('backbone');
|
|
4
|
+
var ContentPluginCollection = require('core/collections/contentPluginCollection');
|
|
5
|
+
var EditorOriginView = require('../../global/views/editorOriginView');
|
|
6
|
+
var Helpers = require('core/helpers');
|
|
7
|
+
var Origin = require('core/origin');
|
|
8
|
+
var PresetCollection = require('../collections/editorPresetCollection.js');
|
|
9
|
+
var PresetModel = require('../models/editorPresetModel.js');
|
|
10
|
+
var PresetEditView = require('./editorPresetEditView.js');
|
|
11
|
+
|
|
12
|
+
var ThemingView = EditorOriginView.extend({
|
|
13
|
+
tagName: 'div',
|
|
14
|
+
className: 'theming',
|
|
15
|
+
events: {
|
|
16
|
+
'change .theme select': 'onThemeChanged',
|
|
17
|
+
'change .preset select': 'resetFormSettings',
|
|
18
|
+
'change .form-container form': 'updateRestorePresetButton',
|
|
19
|
+
'click button.edit': 'showPresetEdit'
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
initialize: async function() {
|
|
23
|
+
this.listenTo(Origin, {
|
|
24
|
+
'editorThemingSidebar:views:save': this.saveData,
|
|
25
|
+
'editorThemingSidebar:views:savePreset': this.onSavePresetClicked,
|
|
26
|
+
'editorThemingSidebar:views:resetToPreset': this.resetFormSettings,
|
|
27
|
+
'managePresets:edit': this.onEditPreset,
|
|
28
|
+
'managePresets:delete': this.onDeletePreset
|
|
29
|
+
});
|
|
30
|
+
await this.initData();
|
|
31
|
+
EditorOriginView.prototype.initialize.apply(this, arguments);
|
|
32
|
+
this.render();
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
initData: async function() {
|
|
36
|
+
this.model = new Backbone.Model(Origin.editor.data.course.get('themeVariables'));
|
|
37
|
+
this.themes = new ContentPluginCollection(undefined, { type: 'theme' });
|
|
38
|
+
this.presets = new PresetCollection();
|
|
39
|
+
|
|
40
|
+
await Promise.all([this.themes.fetch(), this.presets.fetch()]);
|
|
41
|
+
|
|
42
|
+
this.listenTo(this.model, 'change', this.renderForm);
|
|
43
|
+
this.listenTo(this.themes, 'change', this.updateThemeSelect);
|
|
44
|
+
this.listenTo(this.presets, 'change, destroy', this.updatePresetSelect);
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
render: async function() {
|
|
48
|
+
this.$el.hide();
|
|
49
|
+
|
|
50
|
+
EditorOriginView.prototype.render.apply(this, arguments);
|
|
51
|
+
|
|
52
|
+
Origin.trigger('contentHeader:updateTitle', {
|
|
53
|
+
breadcrumbs: ['dashboard','course', { title: Origin.l10n.t('app.themeeditor') }],
|
|
54
|
+
title: Origin.l10n.t('app.themingtitle')
|
|
55
|
+
});
|
|
56
|
+
await this.renderForm();
|
|
57
|
+
this.updateThemeSelect();
|
|
58
|
+
this.updatePresetSelect();
|
|
59
|
+
this.updateRestorePresetButton();
|
|
60
|
+
this.setViewToReady();
|
|
61
|
+
|
|
62
|
+
this.$el.show();
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
renderForm: async function() {
|
|
66
|
+
this.removeForm();
|
|
67
|
+
let didError = false;
|
|
68
|
+
try {
|
|
69
|
+
this.schemaName = `${this.getSelectedTheme().get('targetAttribute').slice(1)}-theme`;
|
|
70
|
+
this.form = await Origin.scaffold.buildForm({ model: this.model, schemaType: this.schemaName });
|
|
71
|
+
this.$('.form-container').html(this.form.el);
|
|
72
|
+
} catch(e) {
|
|
73
|
+
didError = true;
|
|
74
|
+
}
|
|
75
|
+
this.$('.theme-selector').toggleClass('show-preset-select', !didError);
|
|
76
|
+
this.$('.empty-message').toggle(didError);
|
|
77
|
+
this.$('.editable-theme').toggle(!didError);
|
|
78
|
+
$('.editor-theming-sidebar-reset').toggle(!didError);
|
|
79
|
+
|
|
80
|
+
this.$el.find('fieldset:not(:has(>.field))').addClass('empty-fieldset');
|
|
81
|
+
this.$('.theme-customiser').show();
|
|
82
|
+
Origin.trigger('theming:showPresetButton', true);
|
|
83
|
+
// HACK defer needed to allow colour pickers to render
|
|
84
|
+
return new Promise((resolve) => _.defer(() => resolve()));
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
removeForm: function() {
|
|
88
|
+
this.$('.form-container').empty();
|
|
89
|
+
this.$('.theme-customiser').hide();
|
|
90
|
+
|
|
91
|
+
this.form = null;
|
|
92
|
+
|
|
93
|
+
Origin.trigger('theming:showPresetButton', false);
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
updateSelect: function({ className, items, value }) {
|
|
97
|
+
var $select = this.$(`.${className} select`);
|
|
98
|
+
$('option', $select).remove();
|
|
99
|
+
if(items.length) {
|
|
100
|
+
items.forEach(i => {
|
|
101
|
+
if(i.value === value) i.selected = 'selected';
|
|
102
|
+
$select.append($(`<option>`, i));
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
$select.attr({ disabled: !items.length });
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
updateThemeSelect: function() {
|
|
109
|
+
this.updateSelect({
|
|
110
|
+
className: 'theme',
|
|
111
|
+
value: this.getSelectedTheme().get('name'),
|
|
112
|
+
items: [
|
|
113
|
+
{ value: "", disabled: 'disabled', text: Origin.l10n.t('app.selectinstr') },
|
|
114
|
+
...this.themes.where({ isEnabled: true }).map(t => Object({ value: t.get('name'), text: t.get('displayName') }))
|
|
115
|
+
]
|
|
116
|
+
});
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
updatePresetSelect: function() {
|
|
120
|
+
var theme = this.$('.theme select').val();
|
|
121
|
+
var presets = this.presets.where({ parentTheme: theme });
|
|
122
|
+
var selectedPresetId = this.getSelectedPreset(undefined, '_id');
|
|
123
|
+
|
|
124
|
+
this.updateSelect({
|
|
125
|
+
className: 'preset',
|
|
126
|
+
value: selectedPresetId,
|
|
127
|
+
items: [
|
|
128
|
+
{ value: "", text: Origin.l10n.t('app.nopresets') },
|
|
129
|
+
...presets.map(t => Object({ value: t.get('_id'), text: t.get('displayName') }))
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
presets.length ? this.$('button.edit').show() : this.$('button.edit').hide();
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
showPresetEdit: function(event) {
|
|
136
|
+
event && event.preventDefault();
|
|
137
|
+
var theme = this.$('.theme select').val();
|
|
138
|
+
var presets = new Backbone.Collection(this.presets.where({ parentTheme: theme }));
|
|
139
|
+
var view = new PresetEditView({ model: new Backbone.Model({ presets }) });
|
|
140
|
+
$('body').append(view.el);
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
resetFormSettings: function() {
|
|
144
|
+
this.updateRestorePresetButton(false);
|
|
145
|
+
this.model.set(this.getSelectedPreset() || this.getDefaultThemeSettings());
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
// Data persistence
|
|
149
|
+
|
|
150
|
+
validateForm: function() {
|
|
151
|
+
if (!this.getSelectedTheme()) {
|
|
152
|
+
Origin.Notify.alert({ type: 'error', text: Origin.l10n.t('app.errornothemeselected') });
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
return true;
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
savePreset: function(presetName) {
|
|
159
|
+
this.form.commit();
|
|
160
|
+
new PresetModel().save({
|
|
161
|
+
displayName: presetName,
|
|
162
|
+
parentTheme: this.getSelectedTheme().get('name'),
|
|
163
|
+
properties: this.model.attributes
|
|
164
|
+
}, {
|
|
165
|
+
success: model => {
|
|
166
|
+
this.presets.add(model);
|
|
167
|
+
this.updateRestorePresetButton(false);
|
|
168
|
+
window.setTimeout(() => this.$('.preset select').val(model.get('_id')), 1);
|
|
169
|
+
},
|
|
170
|
+
error: this.onError
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
saveData: async function(event) {
|
|
175
|
+
event && event.preventDefault();
|
|
176
|
+
|
|
177
|
+
if (!this.validateForm()) {
|
|
178
|
+
return Origin.trigger('sidebar:resetButtons');
|
|
179
|
+
}
|
|
180
|
+
try {
|
|
181
|
+
await this.postThemeData();
|
|
182
|
+
await this.postPresetData();
|
|
183
|
+
await this.postSettingsData();
|
|
184
|
+
Origin.trigger('editingOverlay:views:hide');
|
|
185
|
+
Origin.trigger('editor:refreshData', this.navigateBack.bind(this), this);
|
|
186
|
+
|
|
187
|
+
} catch(e) {
|
|
188
|
+
this.onError(undefined, Origin.l10n.t('app.errorsave'));
|
|
189
|
+
this.navigateBack();
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
postThemeData: function() {
|
|
194
|
+
const oldTheme = Origin.editor.data.config.get('_theme');
|
|
195
|
+
const newTheme = this.getSelectedTheme().get('name');
|
|
196
|
+
if(newTheme === oldTheme) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
return $.ajax({
|
|
200
|
+
url: `api/content/${Origin.editor.data.config.get('_id')}`,
|
|
201
|
+
method: 'PATCH',
|
|
202
|
+
data: {
|
|
203
|
+
_theme: newTheme,
|
|
204
|
+
_enabledPlugins: [...Origin.editor.data.config.get('_enabledPlugins').filter(p => p !== oldTheme), newTheme]
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
postPresetData: function() {
|
|
210
|
+
var selectedPresetId = this.getSelectedPreset(false, '_id');
|
|
211
|
+
if(!selectedPresetId) return Promise.resolve();
|
|
212
|
+
return $.post(`api/coursethemepresets/${selectedPresetId}/apply/${Origin.editor.data.config.get('_courseId')}`);
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
postSettingsData: function() {
|
|
216
|
+
return new Promise((resolve, reject) => {
|
|
217
|
+
if(!this.form) return resolve();
|
|
218
|
+
this.form.commit();
|
|
219
|
+
Origin.editor.data.course.save({ themeVariables: this.model.attributes }, { error: () => reject(), success: () => resolve() });
|
|
220
|
+
});
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
navigateBack: function(event) {
|
|
224
|
+
event && event.preventDefault();
|
|
225
|
+
Backbone.history.history.back();
|
|
226
|
+
this.remove();
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
getSelectedTheme: function() {
|
|
230
|
+
return this.themes.findWhere({ name: $('select#theme', this.$el).val() || Origin.editor.data.config.get('_theme') });
|
|
231
|
+
},
|
|
232
|
+
// param used to only return the val() (and ignore model data)
|
|
233
|
+
getSelectedPreset: function(includeCached = true, key = 'properties') {
|
|
234
|
+
var $select = $('select#preset', this.$el);
|
|
235
|
+
var presetId = $select && $select.val();
|
|
236
|
+
var preset = this.presets.findWhere({ _id: presetId ? presetId : includeCached && Origin.editor.data.config.get('_themePreset') })
|
|
237
|
+
return preset && preset.get(key);
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
getDefaultThemeSettings: function() {
|
|
241
|
+
const getSchemaDefaults = (m, o) => {
|
|
242
|
+
Object.entries(o).forEach(([k,v]) => m[k] = v.subSchema ? getSchemaDefaults({}, v.subSchema) : v.default);
|
|
243
|
+
return m;
|
|
244
|
+
};
|
|
245
|
+
return getSchemaDefaults({}, this.form.schema);
|
|
246
|
+
},
|
|
247
|
+
|
|
248
|
+
getCurrentSettings: function() {
|
|
249
|
+
return !this.form ? this.model.attributes : _.mapObject(this.form.fields, field => field.getValue());
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
updateRestorePresetButton: function(shouldShow) {
|
|
253
|
+
if(typeof shouldShow === 'undefined') { // no flag, so determine button visibility based on changed settings
|
|
254
|
+
shouldShow = !_.isEqual(this.getSelectedPreset() || this.getDefaultThemeSettings(), this.getCurrentSettings());
|
|
255
|
+
}
|
|
256
|
+
$('.editor-theming-sidebar-reset').css('visibility', shouldShow ? 'visible' : 'hidden');
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
// Event handling
|
|
260
|
+
|
|
261
|
+
onEditPreset: function({ oldValue, newValue }) {
|
|
262
|
+
this.presets.findWhere({ displayName: oldValue }).save({ displayName: newValue });
|
|
263
|
+
},
|
|
264
|
+
|
|
265
|
+
onDeletePreset: function(preset) {
|
|
266
|
+
this.presets.findWhere({ displayName: preset }).destroy();
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
onError: function(collection, response, options) {
|
|
270
|
+
Origin.Notify.alert({ type: 'error', text: response });
|
|
271
|
+
},
|
|
272
|
+
|
|
273
|
+
onThemeChanged: function() {
|
|
274
|
+
this.updatePresetSelect();
|
|
275
|
+
this.renderForm();
|
|
276
|
+
this.updateRestorePresetButton(false);
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
onSavePresetClicked: function() {
|
|
280
|
+
Origin.Notify.alert({
|
|
281
|
+
type: 'input',
|
|
282
|
+
text: Origin.l10n.t('app.presetinputtext'),
|
|
283
|
+
preConfirm: presetName => {
|
|
284
|
+
let msg;
|
|
285
|
+
if(!presetName) {
|
|
286
|
+
msg = Origin.l10n.t('app.invalidempty'); // no falsies
|
|
287
|
+
}
|
|
288
|
+
if(this.presets.findWhere({ displayName: presetName, parentTheme: this.$('.theme select').val() })) {
|
|
289
|
+
msg = Origin.l10n.t('app.duplicatepreseterror'); // name already exists
|
|
290
|
+
}
|
|
291
|
+
if(msg) {
|
|
292
|
+
Origin.Notify.Swal.showValidationMessage(msg);
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
}, // escape text to avoid injection attacks
|
|
296
|
+
callback: ({ value, isConfirmed }) => isConfirmed && this.savePreset(Helpers.escapeText(value))
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}, {
|
|
300
|
+
template: 'editorTheming'
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
return ThemingView;
|
|
304
|
+
});
|
|
@@ -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 FrameworkImportView = require('./views/frameworkImportView.js');
|
|
5
|
+
var FrameworkImportSidebarView = require('./views/frameworkImportSidebarView.js');
|
|
6
|
+
|
|
7
|
+
var featureScopes = ["import:adapt"];
|
|
8
|
+
var hasPermission = false;
|
|
9
|
+
|
|
10
|
+
Origin.on('origin:dataReady login:changed', function init() {
|
|
11
|
+
Origin.router.restrictRoute('frameworkImport', featureScopes);
|
|
12
|
+
hasPermission = Origin.sessionModel.hasScopes(featureScopes);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
Origin.on('router:frameworkImport', renderMainView);
|
|
16
|
+
Origin.on('projects:postRender', data => hasPermission && data.action !== 'edit' && renderImportButton(data));
|
|
17
|
+
|
|
18
|
+
function renderImportButton(data) {
|
|
19
|
+
$('button.projects-sidebar-import-course').remove(); // remove existing button
|
|
20
|
+
if(!hasPermission) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
var $btn = $(Handlebars.partials.part_frameworkImportButton());
|
|
24
|
+
$('.projects-sidebar-add-course').after($btn);
|
|
25
|
+
$btn.click(() => Origin.router.navigateTo('frameworkImport'));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function renderMainView(location, subLocation, action) {
|
|
29
|
+
Origin.contentPane.setView(FrameworkImportView, { model: new Backbone.Model() });
|
|
30
|
+
Origin.sidebar.addView(new FrameworkImportSidebarView().$el);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@import 'colours';
|
|
2
|
+
@import 'sharedStyles';
|
|
3
|
+
|
|
4
|
+
@color-error: @alert-color;
|
|
5
|
+
@color-warn: @warning-color;
|
|
6
|
+
@color-info: @info-color;
|
|
7
|
+
@color-success: @success-color;
|
|
8
|
+
|
|
9
|
+
.frameworkImport {
|
|
10
|
+
.summaryText {
|
|
11
|
+
margin-bottom: 30px;;
|
|
12
|
+
padding: 15px;
|
|
13
|
+
background-color: @color-success;
|
|
14
|
+
&.error { background-color: @color-error; }
|
|
15
|
+
color: white;
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
font-weight: @font-weight-bold;
|
|
18
|
+
text-align: center;
|
|
19
|
+
border-radius: 3px;
|
|
20
|
+
}
|
|
21
|
+
.inner {
|
|
22
|
+
.form-container-style;
|
|
23
|
+
padding: 30px;
|
|
24
|
+
|
|
25
|
+
p {
|
|
26
|
+
margin-bottom: 30px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
form .form-group {
|
|
30
|
+
border: none;
|
|
31
|
+
.field-error {
|
|
32
|
+
padding-bottom: 5px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.content,
|
|
37
|
+
.versions {
|
|
38
|
+
margin-bottom: 20px;
|
|
39
|
+
h2 {
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
}
|
|
42
|
+
table {
|
|
43
|
+
&.full-width { width: 100%; }
|
|
44
|
+
th {
|
|
45
|
+
padding: 15px 10px;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
td {
|
|
49
|
+
padding: 10px;
|
|
50
|
+
text-align: center;
|
|
51
|
+
}
|
|
52
|
+
.left { text-align: left; }
|
|
53
|
+
}
|
|
54
|
+
tr.UPDATE_BLOCKED, tr.INVALID { color: @color-error; }
|
|
55
|
+
tr.INSTALLED { color: @color-info; }
|
|
56
|
+
tr.UPDATED { color: @color-success; }
|
|
57
|
+
tr.OLDER { color: @color-warn; }
|
|
58
|
+
tr.NO_CHANGE { color: rgba(0,0,0,0.7); }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.statusReport > div {
|
|
62
|
+
border-radius: 3px;
|
|
63
|
+
border: 1px solid;
|
|
64
|
+
margin-bottom: 20px;
|
|
65
|
+
h3 {
|
|
66
|
+
color: white;
|
|
67
|
+
padding: 15px;
|
|
68
|
+
font-size: 16px;
|
|
69
|
+
}
|
|
70
|
+
.messages {
|
|
71
|
+
padding: 10px;
|
|
72
|
+
.message {
|
|
73
|
+
margin-bottom: 10px;
|
|
74
|
+
&:last-child {
|
|
75
|
+
margin-bottom: 0;
|
|
76
|
+
}
|
|
77
|
+
.code {
|
|
78
|
+
font-weight: bold;
|
|
79
|
+
}
|
|
80
|
+
.data {
|
|
81
|
+
.key {
|
|
82
|
+
font-weight: bold;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
&.error {
|
|
88
|
+
border-color: @color-error;
|
|
89
|
+
h3 { background-color: @color-error; }
|
|
90
|
+
}
|
|
91
|
+
&.warn {
|
|
92
|
+
border-color: @color-warn;
|
|
93
|
+
h3 { background-color: @color-warn; }
|
|
94
|
+
}
|
|
95
|
+
&.info {
|
|
96
|
+
border-color: @color-info;
|
|
97
|
+
h3 { background-color: @color-info; }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<div id="import_upload" class="inner">
|
|
2
|
+
<form class="frameworkImport forms" action="api/adapt/import" method="post" autocomplete="off">
|
|
3
|
+
<div class="form-group">
|
|
4
|
+
<div class="field field-file">
|
|
5
|
+
<label for="course">
|
|
6
|
+
{{t 'app.assetfile'}} <span class="req">*</span>
|
|
7
|
+
<span class="error"></span>
|
|
8
|
+
</label>
|
|
9
|
+
<div class="field-help">
|
|
10
|
+
{{t 'app.importframeworkinstruction'}}
|
|
11
|
+
</div>
|
|
12
|
+
{{#if path}}
|
|
13
|
+
<div class="asset-management-edit-asset-file">
|
|
14
|
+
{{t 'app.importframeworkfileuploaded'}}
|
|
15
|
+
</div>
|
|
16
|
+
{{else}}
|
|
17
|
+
<input type="file" class="asset-file" name="course">
|
|
18
|
+
{{maxUploadSize}}
|
|
19
|
+
<div class="progress-container">
|
|
20
|
+
<div class="progress-bar">
|
|
21
|
+
<div class="progress-percent">0%</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
{{/if}}
|
|
25
|
+
</div>
|
|
26
|
+
<div class="field field-assets">
|
|
27
|
+
<label for="tags">{{t 'app.importassetfolderstitle'}}</label>
|
|
28
|
+
<div class="field-help">
|
|
29
|
+
{{t 'app.importassetfoldersinstruction'}}
|
|
30
|
+
</div>
|
|
31
|
+
<div>
|
|
32
|
+
<input type="text" autocomplete="off" class="width-30" id="formAssetFolders" name="formAssetFolders" placeholder="{{t 'app.importassetfoldersplaceholder'}}" value="" />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="field field-tags">
|
|
36
|
+
<label for="tags">{{t 'app.tags'}}</label>
|
|
37
|
+
<input type="text" autocomplete="off" class="width-30" id="tags_control" name="tags_control" value="{{pickCSV tags "title"}}" />
|
|
38
|
+
</div>
|
|
39
|
+
<input type="hidden" name="tags" id="tags" />
|
|
40
|
+
</div>
|
|
41
|
+
</form>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div id="import_details" class="display-none">
|
|
45
|
+
<form class="frameworkImportDetails forms" action="importsource" method="post" autocomplete="off">
|
|
46
|
+
<div class="inner framework-versions display-none"></div>
|
|
47
|
+
<div class="inner import-summary">
|
|
48
|
+
<div class="title"></div>
|
|
49
|
+
<div class="description"></div>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="inner plugin-list display-none">
|
|
52
|
+
<div class="red key-field display-none"><span class="key">{{t 'app.pluginredlabel'}}</span> - {{t 'app.pluginredkey'}}</div>
|
|
53
|
+
<div class="amber key-field display-none"><span class="key">{{t 'app.pluginamberlabel'}}</span> - {{t 'app.pluginamberkey'}}</div>
|
|
54
|
+
<div class="green-update key-field display-none"><span class="key">{{t 'app.plugingreenupdatelabel'}}</span> - {{t 'app.plugingreenupdatekey'}}</div>
|
|
55
|
+
<div class="green-install key-field display-none"><span class="key">{{t 'app.plugingreeninstalllabel'}}</span> - {{t 'app.plugingreeninstallkey'}}</div>
|
|
56
|
+
</div>
|
|
57
|
+
</form>
|
|
58
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div class="separator"></div>
|
|
2
|
+
<div class="sidebar-item-inner">
|
|
3
|
+
<button type="submit" class="action-primary frameworkimport import display-none">
|
|
4
|
+
<span>{{t 'app.importcourse'}}</span>
|
|
5
|
+
</button>
|
|
6
|
+
<button type="submit" class="action-tertiary frameworkimport check">
|
|
7
|
+
<span>{{t 'app.checkimport'}}</span>
|
|
8
|
+
</button>
|
|
9
|
+
<button type="button" class="cancel action-secondary">
|
|
10
|
+
<span>{{t 'app.cancel'}}</span>
|
|
11
|
+
</button>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<div class="frameworkImport">
|
|
2
|
+
<div class="summaryText {{#unless canImport}}error{{/unless}}">
|
|
3
|
+
{{#if canImport}}
|
|
4
|
+
{{t 'app.coursecanbeimported'}}
|
|
5
|
+
{{else}}
|
|
6
|
+
{{t 'app.coursecannotbeimported'}}
|
|
7
|
+
{{/if}}
|
|
8
|
+
</div>
|
|
9
|
+
<div class="inner">
|
|
10
|
+
<p>Find below a summary of the course being imported.</p>
|
|
11
|
+
<div class="statusReport">
|
|
12
|
+
{{> part_frameworkImportStatusMessages type='error' messages=statusReport.error heading='Errors'}}
|
|
13
|
+
{{> part_frameworkImportStatusMessages type='warn' messages=statusReport.warn heading='Warnings'}}
|
|
14
|
+
{{> part_frameworkImportStatusMessages type='info' messages=statusReport.info heading='Information'}}
|
|
15
|
+
</div>
|
|
16
|
+
<div class="versions">
|
|
17
|
+
<h2>Plugin versions</h2>
|
|
18
|
+
<p>See below for a summary of the actions to be taken on the course's installed plugins.</p>
|
|
19
|
+
<table class="full-width">
|
|
20
|
+
<thead>
|
|
21
|
+
<tr>
|
|
22
|
+
<th class="left" scope="col">Name</th>
|
|
23
|
+
<th scope="col">Installed version</th>
|
|
24
|
+
<th scope="col">Import version</th>
|
|
25
|
+
<th scope="col">Status</th>
|
|
26
|
+
</tr>
|
|
27
|
+
</thead>
|
|
28
|
+
<tbody>
|
|
29
|
+
{{#each versions}}
|
|
30
|
+
<tr class="{{status}}">
|
|
31
|
+
<td class="left" scope="col">{{name}}</td>
|
|
32
|
+
<td scope="col">{{versions.[0]}}</td>
|
|
33
|
+
<td scope="col">{{versions.[1]}}</td>
|
|
34
|
+
<td scope="col">{{t statusKey}}</td>
|
|
35
|
+
</tr>
|
|
36
|
+
{{/each}}
|
|
37
|
+
</tbody>
|
|
38
|
+
</table>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{{#if messages}}
|
|
2
|
+
<div class="{{type}}">
|
|
3
|
+
<h3>{{heading}}</h3>
|
|
4
|
+
<div class="messages">
|
|
5
|
+
{{#each messages}}
|
|
6
|
+
<div class="message">
|
|
7
|
+
<div class="code">{{t codeKey}}</div>
|
|
8
|
+
{{#if data}}
|
|
9
|
+
<div class="data">
|
|
10
|
+
{{#each data}}
|
|
11
|
+
<div>
|
|
12
|
+
<span class="key">{{@key}}</span>
|
|
13
|
+
<span class="value">{{this}}</span>
|
|
14
|
+
</div>
|
|
15
|
+
{{/each}}
|
|
16
|
+
</div>
|
|
17
|
+
{{/if}}
|
|
18
|
+
</div>
|
|
19
|
+
{{/each}}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
{{/if}}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 FrameworkImportSidebarView = SidebarItemView.extend({
|
|
7
|
+
events: {
|
|
8
|
+
'click button.check': 'check',
|
|
9
|
+
'click button.import': 'import',
|
|
10
|
+
'click button.cancel': 'goBack'
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
check: function(event) {
|
|
14
|
+
event && event.preventDefault();
|
|
15
|
+
Origin.trigger('frameworkImport:check');
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
import: function(event) {
|
|
19
|
+
event && event.preventDefault();
|
|
20
|
+
Origin.trigger('frameworkImport:import');
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
goBack: function(event) {
|
|
24
|
+
event && event.preventDefault();
|
|
25
|
+
Origin.router.navigateToDashboard();
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
template: 'frameworkImportSidebar'
|
|
29
|
+
});
|
|
30
|
+
return FrameworkImportSidebarView;
|
|
31
|
+
});
|