diff --git a/src/Umbraco.Core/ObjectResolution/ManyObjectsResolverBase.cs b/src/Umbraco.Core/ObjectResolution/ManyObjectsResolverBase.cs index ad35b81ffb..6b64172633 100644 --- a/src/Umbraco.Core/ObjectResolution/ManyObjectsResolverBase.cs +++ b/src/Umbraco.Core/ObjectResolution/ManyObjectsResolverBase.cs @@ -394,7 +394,7 @@ namespace Umbraco.Core.ObjectResolution /// WARNING! Do not use this unless you know what you are doing, clear all types registered and instances /// created. Typically only used if a resolver is no longer used in an application and memory is to be GC'd /// - internal void ResetCollections() + internal virtual void ResetCollections() { using (new WriteLock(_lock)) { diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js index 5d05623b0b..09d218f85e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js @@ -17,6 +17,7 @@ * Registers all tours from the server and returns a promise */ function registerAllTours() { + tours = []; return tourResource.getTours().then(function(tourFiles) { angular.forEach(tourFiles, function (tourFile) { angular.forEach(tourFile.tours, function(newTour) { @@ -218,7 +219,38 @@ var deferred = $q.defer(); var tours = getTours(); setTourStatuses(tours).then(function() { - var groupedTours = _.groupBy(tours, "group"); + var groupedTours = []; + tours.forEach(function (item) { + + var groupExists = false; + var newGroup = { + "group": "", + "tours": [] + }; + + groupedTours.forEach(function(group){ + // extend existing group if it is already added + if(group.group === item.group) { + if(item.groupOrder) { + group.groupOrder = item.groupOrder + } + groupExists = true; + group.tours.push(item) + } + }); + + // push new group to array if it doesn't exist + if(!groupExists) { + newGroup.group = item.group; + if(item.groupOrder) { + newGroup.groupOrder = item.groupOrder + } + newGroup.tours.push(item); + groupedTours.push(newGroup); + } + + }); + deferred.resolve(groupedTours); }); return deferred.promise; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.controller.js index 34a3d8a811..4d2b43c078 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.controller.js @@ -124,7 +124,7 @@ function showTourButton(index, tourGroup) { if(index !== 0) { - var prevTour = tourGroup[index - 1]; + var prevTour = tourGroup.tours[index - 1]; if(prevTour.completed) { return true; } @@ -147,12 +147,12 @@ // Finding out, how many tours are completed for the progress circle angular.forEach(vm.tours, function(group){ var completedTours = 0; - angular.forEach(group, function(tour){ + angular.forEach(group.tours, function(tour){ if(tour.completed) { completedTours++; } }); - group.completedPercentage = Math.round((completedTours/group.length)*100); + group.completedPercentage = Math.round((completedTours/group.tours.length)*100); }); } diff --git a/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.html b/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.html index 5e1d5d271e..58f091a9ab 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.html @@ -12,23 +12,23 @@
Step 1 of any site is to create a Document Type.
A Document Type is a template for content. For each type of content you want to create you'll create a Document Type. This will define were content based on this Document Type can be created, how many properties it holds and what the input method should be for these properties.
When you have at least one Document type in place you can start creating content and this content can the be used in a template.
In this tour you will learn how to set up a basic Document Type with a property to enter a short text.
", - type: "intro" + "title": "Create your first Document Type", + "content": "Step 1 of any site is to create a Document Type.
A Document Type is a template for content. For each type of content you want to create you'll create a Document Type. This will define were content based on this Document Type can be created, how many properties it holds and what the input method should be for these properties.
When you have at least one Document type in place you can start creating content and this content can the be used in a template.
In this tour you will learn how to set up a basic Document Type with a property to enter a short text.
", + "type": "intro" }, { - element: "#applications [data-element='section-settings']", - title: "Navigate to the Settings sections", - content: "In the Settings section you can create and manage Document types.", - event: "click", - backdropOpacity: 0.6 + "element": "#applications [data-element='section-settings']", + "title": "Navigate to the Settings sections", + "content": "In the Settings section you can create and manage Document types.", + "event": "click", + "backdropOpacity": 0.6 }, { - element: "#tree [data-element='tree-item-documentTypes']", - title: "Create Document Type", - content: "Hover the Document Type tree and click the three small dots to open the context menu.
", - event: "click", - eventElement: "#tree [data-element='tree-item-documentTypes'] [data-element='tree-item-options']" + "element": "#tree [data-element='tree-item-documentTypes']", + "title": "Create Document Type", + "content": "Hover the Document Type tree and click the three small dots to open the context menu.
", + "event": "click", + "eventElement": "#tree [data-element='tree-item-documentTypes'] [data-element='tree-item-options']" }, { - element: "#dialog [data-element='action-documentType']", - title: "Create Document Type", - content: "Click Document Type to create a new document type with a template. The template will be automatically created and set as the default template for this Document Type
You will use the template in a later tour render content.
", - event: "click" + "element": "#dialog [data-element='action-documentType']", + "title": "Create Document Type", + "content": "Click Document Type to create a new document type with a template. The template will be automatically created and set as the default template for this Document Type
You will use the template in a later tour render content.
", + "event": "click" }, { - element: "[data-element='editor-name-field']", - title: "Enter a name", - content: "Your Document Type needs a name. Enter My Home Page in the field and click Next.",
- view: "doctypename"
+ "element": "[data-element='editor-name-field']",
+ "title": "Enter a name",
+ "content": "
Your Document Type needs a name. Enter My Home Page in the field and click Next.",
+ "view": "doctypename"
},
{
- element: "[data-element='editor-description']",
- title: "Enter a description",
- content: "
A description helps to pick the right document type when creating content.
Write a description to our Home page. It could be:
The home page of the website" + "element": "[data-element='editor-description']", + "title": "Enter a description", + "content": "
A description helps to pick the right document type when creating content.
Write a description to our Home page. It could be:
The home page of the website" }, { - element: "[data-element='group-add']", - title: "Add tab", - content: "Tabs are used to organize properties on content in the Content section. Click Add new tab to add a tab.", - event: "click" + "element": "[data-element='group-add']", + "title": "Add tab", + "content": "Tabs are used to organize properties on content in the Content section. Click Add new tab to add a tab.", + "event": "click" }, { - element: "[data-element='group-name-field']", - title: "Name the tab", - content: "
Enter Home in the tab name.
You can name a tab anything you want and if you have a lot of properties it can be useful to add multiple tabs.
", - view: "tabName" + "element": "[data-element='group-name-field']", + "title": "Name the tab", + "content": "Enter Home in the tab name.
You can name a tab anything you want and if you have a lot of properties it can be useful to add multiple tabs.
", + "view": "tabName" }, { - element: "[data-element='property-add']", - title: "Add a property", - content: "Properties are the different input fields on a content page.
On our Home Page we wan't to add a welcome text.
Click Add property to open the property dialog.
", - event: "click" + "element": "[data-element='property-add']", + "title": "Add a property", + "content": "Properties are the different input fields on a content page.
On our Home Page we wan't to add a welcome text.
Click Add property to open the property dialog.
", + "event": "click" }, { - element: "[data-element~='overlay-property-settings'] [data-element='property-name']", - title: "Name the property", - content: "EnterWelcome Text as the name for the property.",
- view: "propertyname"
+ "element": "[data-element~='overlay-property-settings'] [data-element='property-name']",
+ "title": "Name the property",
+ "content": "Enter Welcome Text as the name for the property.",
+ "view": "propertyname"
},
{
- element: "[data-element~='overlay-property-settings'] [data-element='property-description']",
- title: "Enter a description",
- content: "A description will help to fill in the right content.
Enter a description for the property editor. It could be:
Write a nice introduction text so the visitors feel welcome" + "element": "[data-element~='overlay-property-settings'] [data-element='property-description']", + "title": "Enter a description", + "content": "
A description will help to fill in the right content.
Enter a description for the property editor. It could be:
Write a nice introduction text so the visitors feel welcome" }, { - element: "[data-element~='overlay-property-settings'] [data-element='editor-add']", - title: "Add editor", - content: "When you add an editor you choose what the input method for this property will be. Click Add editor to open the editor picker dialog.", - event: "click" + "element": "[data-element~='overlay-property-settings'] [data-element='editor-add']", + "title": "Add editor", + "content": "When you add an editor you choose what the input method for this property will be. Click Add editor to open the editor picker dialog.", + "event": "click" }, { - element: "[data-element~='overlay-editor-picker']", - elementPreventClick: true, - title: "Editor picker", - content: "
In the editor picker dialog we can pick one of the many build in editor.
You can choose from preconfigured data types (Reuse) or create a new configuration (Available editors)
" + "element": "[data-element~='overlay-editor-picker']", + "elementPreventClick": true, + "title": "Editor picker", + "content": "In the editor picker dialog we can pick one of the many build in editor.
You can choose from preconfigured data types (Reuse) or create a new configuration (Available editors)
" }, { - element: "[data-element~='overlay-editor-picker'] [data-element='editor-Textarea']", - title: "Select editor", - content: "Select the Textarea editor. This will add a textarea to the Welcome Text property.", - event: "click" + "element": "[data-element~='overlay-editor-picker'] [data-element='editor-Textarea']", + "title": "Select editor", + "content": "Select the Textarea editor. This will add a textarea to the Welcome Text property.", + "event": "click" }, { - element: "[data-element~='overlay-editor-settings']", - elementPreventClick: true, - title: "Editor settings", - content: "Each property editor can have individual settings. For the textarea editor you can set a charachter limit but in this case it is not needed" + "element": "[data-element~='overlay-editor-settings']", + "elementPreventClick": true, + "title": "Editor settings", + "content": "Each property editor can have individual settings. For the textarea editor you can set a charachter limit but in this case it is not needed" }, { - element: "[data-element~='overlay-editor-settings'] [data-element='button-overlaySubmit']", - title: "Save editor", - content: "Click Submit to save the editor.", - event: "click" + "element": "[data-element~='overlay-editor-settings'] [data-element='button-overlaySubmit']", + "title": "Save editor", + "content": "Click Submit to save the editor.", + "event": "click" }, { - element: "[data-element~='overlay-property-settings'] [data-element='button-overlaySubmit']", - title: "Add property to document type", - content: "Click Submit to add the property to the document type.", - event: "click" + "element": "[data-element~='overlay-property-settings'] [data-element='button-overlaySubmit']", + "title": "Add property to document type", + "content": "Click Submit to add the property to the document type.", + "event": "click" }, { - element: "[data-element='button-save']", - title: "Save the document type", - content: "All we need now is to save the document type. Click Save to create and save your new document type.", - event: "click" + "element": "[data-element='button-save']", + "title": "Save the document type", + "content": "All we need now is to save the document type. Click Save to create and save your new document type.", + "event": "click" } ] }, @@ -200,48 +202,49 @@ "name": "Create Content", "alias": "umbIntroCreateContent", "group": "Getting Started", + "groupOrder": 100, "steps": [ { - title: "Creating your first content node", - content: "In this tour you will learn how to create the home page for your website. It will use the Home Page Document type you created in the previous tour.
", - type: "intro" + "title": "Creating your first content node", + "content": "In this tour you will learn how to create the home page for your website. It will use the Home Page Document type you created in the previous tour.
", + "type": "intro" }, { - element: "#applications [data-element='section-content']", - title: "Navigate to the Content section", - content: "In the Content section you can create and manage the content of the website.
The Content section contains the content of your website. Content is displayed as nodes in the content tree.
", - event: "click", - backdropOpacity: 0.6 + "element": "#applications [data-element='section-content']", + "title": "Navigate to the Content section", + "content": "In the Content section you can create and manage the content of the website.
The Content section contains the content of your website. Content is displayed as nodes in the content tree.
", + "event": "click", + "backdropOpacity": 0.6 }, { - element: "[data-element='tree-root']", - title: "Open context menu", - content: "Open the context menu by hovering the root of the content section.
Now click the three small dots to the right.
", - event: "click", - eventElement: "[data-element='tree-root'] [data-element='tree-item-options']" + "element": "[data-element='tree-root']", + "title": "Open context menu", + "content": "Open the context menu by hovering the root of the content section.
Now click the three small dots to the right.
", + "event": "click", + "eventElement": "[data-element='tree-root'] [data-element='tree-item-options']" }, { - element: "[data-element='action-create-homePage']", - title: "Create Home page", - content: "The context menu shows you all the actions that are available on a node
Click on Home Page to create a new page of type Home Page.
", - event: "click" + "element": "[data-element='action-create-homePage']", + "title": "Create Home page", + "content": "The context menu shows you all the actions that are available on a node
Click on Home Page to create a new page of type Home Page.
", + "event": "click" }, { - element: "[data-element='editor-content'] [data-element='editor-name-field']", - title: "Give your new page a name", - content: "Our new page needs a name. Enter Home in the field and click Next.
Our new page needs a name. Enter Home in the field and click Next.
Add content to the Welcome Text field
If you don't have any ideas here is a start:
I am learning Umbraco. High Five I Rock #H5IR." + "element": "[data-element='editor-content'] [data-element='property-welcomeText']", + "title": "Add a welcome text", + "content": "
Add content to the Welcome Text field
If you don't have any ideas here is a start:
I am learning Umbraco. High Five I Rock #H5IR." }, { - element: "[data-element='editor-content'] [data-element='button-saveAndPublish']", - title: "Save and Publish", - content: "
Now click the Save and publish button to save and publish your changes.
", - event: "click" + "element": "[data-element='editor-content'] [data-element='button-saveAndPublish']", + "title": "Save and Publish", + "content": "Now click the Save and publish button to save and publish your changes.
", + "event": "click" } ] }, @@ -249,44 +252,45 @@ "name": "Render in template", "alias": "umbIntroRenderInTemplate", "group": "Getting Started", + "groupOrder": 100, "steps": [ { - title: "Render your content in a template", - content: "Templating in Umbraco builds on the concept of Razor Views from asp.net MVC. - This tour is a sneak peak on how to write templates in Umbraco.
In this tour you will learn how to render content from the Home Page document type so you can see the content added to our Home content page.
", - type: "intro" + "title": "Render your content in a template", + "content": "Templating in Umbraco builds on the concept of Razor Views from asp.net MVC. - This tour is a sneak peak on how to write templates in Umbraco.
In this tour you will learn how to render content from the Home Page document type so you can see the content added to our Home content page.
", + "type": "intro" }, { - element: "#applications [data-element='section-settings']", - title: "Navigate to the Settings section", - content: "In the Settings section you will find all the templates
It is of course also possible to edit all your code files in your favorite code editor.
", - event: "click", - backdropOpacity: 0.6 + "element": "#applications [data-element='section-settings']", + "title": "Navigate to the Settings section", + "content": "In the Settings section you will find all the templates
It is of course also possible to edit all your code files in your favorite code editor.
", + "event": "click", + "backdropOpacity": 0.6 }, { - element: "#tree [data-element='tree-item-templates']", - title: "Expand the Templates node", - content: "To see all our templates click the small triangle to the left of the templates node.
", - event: "click", - eventElement: "#tree [data-element='tree-item-templates'] [data-element='tree-item-expand']", - view: "templatetree" + "element": "#tree [data-element='tree-item-templates']", + "title": "Expand the Templates node", + "content": "To see all our templates click the small triangle to the left of the templates node.
", + "event": "click", + "eventElement": "#tree [data-element='tree-item-templates'] [data-element='tree-item-expand']", + "view": "templatetree" }, { - element: "#tree [data-element='tree-item-templates'] [data-element='tree-item-Home Page']", - title: "Open Home template", - content: "Click the Home Page template to open and edit it.
", - eventElement: "#tree [data-element='tree-item-templates'] [data-element='tree-item-Home Page'] a.umb-tree-item__label", - event: "click" + "element": "#tree [data-element='tree-item-templates'] [data-element='tree-item-Home Page']", + "title": "Open Home template", + "content": "Click the Home Page template to open and edit it.
", + "eventElement": "#tree [data-element='tree-item-templates'] [data-element='tree-item-Home Page'] a.umb-tree-item__label", + "event": "click" }, { - element: "[data-element='editor-templates'] [data-element='code-editor']", - title: "Edit template", - content: 'The template can be edited here or in your favorite code editor.
To render the field from the document type add the following to the template:
<h1>@Model.Content.Name</h1>' + "element": "[data-element='editor-templates'] [data-element='code-editor']", + "title": "Edit template", + "content": "
<p>@Model.Content.WelcomeText</p>
The template can be edited here or in your favorite code editor.
To render the field from the document type add the following to the template:
<h1>@Model.Content.Name</h1>" }, { - element: "[data-element='editor-templates'] [data-element='button-save']", - title: "Save the template", - content: "Click the Save button and your template will be saved.", - event: "click" + "element": "[data-element='editor-templates'] [data-element='button-save']", + "title": "Save the template", + "content": "Click the Save button and your template will be saved.", + "event": "click" } ] }, @@ -294,38 +298,39 @@ "name": "View Home page", "alias": "umbIntroViewHomePage", "group": "Getting Started", + "groupOrder": 100, "steps": [ { - title: "View your Umbraco site", - content: "
<p>@Model.Content.WelcomeText</p>
Our three main components to a page is done: Document type, Template, and Content - it is now time to see the result.
In this tour you will learn how to see your published website.
", - type: "intro" + "title": "View your Umbraco site", + "content": "Our three main components to a page is done: Document type, Template, and Content - it is now time to see the result.
In this tour you will learn how to see your published website.
", + "type": "intro" }, { - element: "#applications [data-element='section-content']", - title: "Navigate to the content sections", - content: "In the Content section you will find the content of our website.", - event: "click", - backdropOpacity: 0.6 + "element": "#applications [data-element='section-content']", + "title": "Navigate to the content sections", + "content": "In the Content section you will find the content of our website.", + "event": "click", + "backdropOpacity": 0.6 }, { - element: "#tree [data-element='tree-item-Home']", - title: "Open the Home page", - content: "Click the Home page to open it
", - event: "click", - eventElement: "#tree [data-element='tree-item-Home'] a.umb-tree-item__label" + "element": "#tree [data-element='tree-item-Home']", + "title": "Open the Home page", + "content": "Click the Home page to open it
", + "event": "click", + "eventElement": "#tree [data-element='tree-item-Home'] a.umb-tree-item__label" }, { - element: "[data-element='editor-content'] [data-element='tab-_umb_infoTab']", - title: "Info", - content: "Under the info tab you will find the default information about a content item.
", - event: "click" + "element": "[data-element='editor-content'] [data-element='tab-_umb_infoTab']", + "title": "Info", + "content": "Under the info tab you will find the default information about a content item.
", + "event": "click" }, { - element: "[data-element='editor-content'] [data-element='node-info-urls']", - title: "Open page", - content: "Click the Link to document to view your page.
Tip: Click the preview button in the bottom right corner to preview changes without publishing them.
", - event: "click", - eventElement: "[data-element='editor-content'] [data-element='node-info-urls'] a[target='_blank']" + "element": "[data-element='editor-content'] [data-element='node-info-urls']", + "title": "Open page", + "content": "Click the Link to document to view your page.
Tip: Click the preview button in the bottom right corner to preview changes without publishing them.
", + "event": "click", + "eventElement": "[data-element='editor-content'] [data-element='node-info-urls'] a[target='_blank']" } ] }, @@ -333,86 +338,87 @@ "name": "The Media library", "alias": "umbIntroMediaSection", "group": "Getting Started", + "groupOrder": 100, "steps": [ { - title: "How to use the media library", - content: "A website would be boring without media content. In Umbraco you can manage all your images, documents, videos etc. in the Media section. Here you can upload and organise your media items and see details about each item.
In this tour you will learn how to upload and organise your Media library in Umbraco. It will also show you how to view details about a specific media item.
", - type: "intro" + "title": "How to use the media library", + "content": "A website would be boring without media content. In Umbraco you can manage all your images, documents, videos etc. in the Media section. Here you can upload and organise your media items and see details about each item.
In this tour you will learn how to upload and organise your Media library in Umbraco. It will also show you how to view details about a specific media item.
", + "type": "intro" }, { - element: "#applications [data-element='section-media']", - title: "Navigate to the Media section", - content: "The media section is where you manage all your media items.", - event: "click", - backdropOpacity: 0.6 + "element": "#applications [data-element='section-media']", + "title": "Navigate to the Media section", + "content": "The media section is where you manage all your media items.", + "event": "click", + "backdropOpacity": 0.6 }, { - element: "#tree [data-element='tree-root']", - title: "Create a new folder", - content: "First create a folder for your images. Hover the media root node and click the three small dots on the right side of the item.
", - event: "click", - eventElement: "#tree [data-element='tree-root'] [data-element='tree-item-options']" + "element": "#tree [data-element='tree-root']", + "title": "Create a new folder", + "content": "First create a folder for your images. Hover the media root node and click the three small dots on the right side of the item.
", + "event": "click", + "eventElement": "#tree [data-element='tree-root'] [data-element='tree-item-options']" }, { - element: "#dialog [data-element='action-Folder']", - title: "Create a new folder", - content: "Select the Folder option to select the type folder.
", - event: "click" + "element": "#dialog [data-element='action-Folder']", + "title": "Create a new folder", + "content": "Select the Folder option to select the type folder.
", + "event": "click" }, { - element: "[data-element='editor-media'] [data-element='editor-name-field']", - title: "Enter a name", - content: "Enter My Images in the field.
Enter My Images in the field.
Click the Save button to create the new folder
", - event: "click" + "element": "[data-element='editor-media'] [data-element='button-save']", + "title": "Save the folder", + "content": "Click the Save button to create the new folder
", + "event": "click" }, { - element: "[data-element='editor-media'] [data-element='dropzone']", - title: "Upload images", - content: "In the upload area you can upload your media items.
Click the Click here to choose files-button and select a couple of images on your computer and upload them.
", - view: "uploadimages" + "element": "[data-element='editor-media'] [data-element='dropzone']", + "title": "Upload images", + "content": "In the upload area you can upload your media items.
Click the Click here to choose files-button and select a couple of images on your computer and upload them.
", + "view": "uploadimages" }, { - element: "[data-element='editor-media'] [data-element='media-grid-item-0']", - title: "View media item details", - content: "Hover the media item and Click the purple bar to view details about the media item", - event: "click", - eventElement: "[data-element='editor-media'] [data-element='media-grid-item-0'] [data-element='media-grid-item-edit']" + "element": "[data-element='editor-media'] [data-element='media-grid-item-0']", + "title": "View media item details", + "content": "Hover the media item and Click the purple bar to view details about the media item", + "event": "click", + "eventElement": "[data-element='editor-media'] [data-element='media-grid-item-0'] [data-element='media-grid-item-edit']" }, { - element: "[data-element='editor-media'] [data-element='property-umbracoFile']", - title: "The uploaded image", - content: "Here you can see the image you have uploaded.
" + "element": "[data-element='editor-media'] [data-element='property-umbracoFile']", + "title": "The uploaded image", + "content": "Here you can see the image you have uploaded.
" }, { - element: "[data-element='editor-media'] [data-element='property-umbracoBytes']", - title: "Image size", - content: "You will also find other details about the image, like the size.
Media items work in much the same way as content. So you can add extra properties to an image by creating or editing the Media types in the Settings section.
" + "element": "[data-element='editor-media'] [data-element='property-umbracoBytes']", + "title": "Image size", + "content": "You will also find other details about the image, like the size.
Media items work in much the same way as content. So you can add extra properties to an image by creating or editing the Media types in the Settings section.
" }, { - element: "[data-element='editor-media'] [data-element='tab-_umb_infoTab']", - title: "Info", - content: "Like the content section you can also find default information about the media item. You will find these under the info tab.", - event: "click" + "element": "[data-element='editor-media'] [data-element='tab-_umb_infoTab']", + "title": "Info", + "content": "Like the content section you can also find default information about the media item. You will find these under the info tab.", + "event": "click" }, { - element: "[data-element='editor-media'] [data-element='node-info-urls']", - title: "Link to media", - content: "The path to the media item..." + "element": "[data-element='editor-media'] [data-element='node-info-urls']", + "title": "Link to media", + "content": "The path to the media item..." }, { - element: "[data-element='editor-media'] [data-element='node-info-update-date']", - title: "Last edited", - content: "...and information about when the media item has been created and edited." + "element": "[data-element='editor-media'] [data-element='node-info-update-date']", + "title": "Last edited", + "content": "...and information about when the media item has been created and edited." }, { - element: "[data-element='editor-container']", - title: "Using media items", - content: "You can reference a media item directly in a template by using the path or try adding a Media Picker to a document type property so you can select media items from the content section." + "element": "[data-element='editor-container']", + "title": "Using media items", + "content": "You can reference a media item directly in a template by using the path or try adding a Media Picker to a document type property so you can select media items from the content section." } ] } diff --git a/src/Umbraco.Web/Editors/TourController.cs b/src/Umbraco.Web/Editors/TourController.cs index 61acf7dfed..b0677ed78e 100644 --- a/src/Umbraco.Web/Editors/TourController.cs +++ b/src/Umbraco.Web/Editors/TourController.cs @@ -2,9 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text.RegularExpressions; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using Umbraco.Core.Configuration; using Umbraco.Core.IO; using Umbraco.Web.Models; @@ -25,24 +23,36 @@ namespace Umbraco.Web.Editors if (UmbracoConfig.For.UmbracoSettings().BackOffice.Tours.EnableTours == false) return result; - var coreTourFiles = Directory.GetFiles( - Path.Combine(IOHelper.MapPath(SystemDirectories.Config), "BackOfficeTours"), "*.json"); + var filters = TourFilterResolver.Current.Filters.ToList(); + + //get all filters that will be applied to all tour aliases + var aliasOnlyFilters = filters.Where(x => x.PluginName == null && x.TourFileName == null).ToList(); - foreach (var tourFile in coreTourFiles) + //don't pass in any filters for core tours that have a plugin name assigned + var nonPluginFilters = filters.Where(x => x.PluginName == null).ToList(); + + //add core tour files + var coreToursPath = Path.Combine(IOHelper.MapPath(SystemDirectories.Config), "BackOfficeTours"); + if (Directory.Exists(coreToursPath)) { - var contents = File.ReadAllText(tourFile); - - result.Add(new BackOfficeTourFile + foreach (var tourFile in Directory.EnumerateFiles(coreToursPath, "*.json")) { - FileName = Path.GetFileNameWithoutExtension(tourFile), - Tours = JsonConvert.DeserializeObject