Merge branch 'dev-v7' into temp8

# Conflicts:
#	docs/CONTRIBUTING_DETAILED.md
#	docs/README.md
#	src/Umbraco.Core/Configuration/GlobalSettings.cs
#	src/Umbraco.Core/StringExtensions.cs
#	src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js
#	src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less
#	src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html
#	src/Umbraco.Web.UI.Client/src/views/dashboard/developer/developerdashboardvideos.html
#	src/Umbraco.Web.UI.Client/src/views/prevalueeditors/boolean.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/boolean/boolean.html
#	src/Umbraco.Web/PublishedContentExtensions.cs
#	src/Umbraco.Web/Trees/LanguageTreeController.cs
This commit is contained in:
Sebastiaan Janssen
2018-06-06 20:48:52 +02:00
42 changed files with 541 additions and 241 deletions

View File

@@ -1,80 +0,0 @@
# Code of Conduct
## 1. Purpose
A primary goal of Umbraco CMS is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
We invite all those who participate in Umbraco CMS to help us create safe and positive experiences for everyone.
## 2. Open Source Citizenship
A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
## 3. Expected Behavior
The following behaviors are expected and requested of all community members:
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
## 4. Unacceptable Behavior
The following behaviors are considered harassment and are unacceptable within our community:
* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other peoples personally identifying information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someones consent before touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.
## 5. Consequences of Unacceptable Behavior
Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
Anyone asked to stop unacceptable behavior is expected to comply immediately.
If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
## 6. Reporting Guidelines
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. Please contact Sebastiaan Janssen - [sj@umbraco.dk](mailto:sj@umbraco.dk).
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
## 7. Addressing Grievances
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Umbraco with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
## 8. Scope
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venuesonline and in-personas well as in all one-on-one communications pertaining to community business.
This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
## 9. Contact info
Sebastiaan Janssen - [sj@umbraco.dk](mailto:sj@umbraco.dk)
## 10. License and attribution
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)

32
docs/CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,32 @@
# Code Of Conduct
Our informal code of conduct concentrates on the values we, as Umbraco HQ, have set for ourselves and for our community. We expect you to be a friend.
Instead of listing out all the exact "do's" and "don't's" we want to challenge you to think about our values and apply them:
If there's a need to talk to Umbraco HQ about anything, please make sure to send a mail to [Sebastiaan Janssen - sj@umbraco.dk](mailto:sj@umbraco.dk).
## Be a Friend
We welcome and thank you for registering at Our Umbraco. Find below the values that govern Umbraco and which you accept by using Our Umbraco.
## Trust
Assume positive intent and try to understand before being understood.
## Respect
Treat others as you would like to be treated.
This also goes for treating the HQ with respect. For example: dont promote products on [our.umbraco.org](https://our.umbraco.org) that directly compete with our commercial offerings which enables us to work for a sustainable Umbraco.
## Open
Be honest and straightforward. Tell it as it is. Share thoughts and knowledge and engage in collaboration.
## Hungry
Don't rest on your laurels and never accept the status quo. Contribute and give back to fellow Umbracians.
## Friendly
Dont judge upon mistakes made but rather upon the speed and quality with which mistakes are corrected. Friendly posts and contributions generate smiles and builds long lasting relationships.

99
docs/CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,99 @@
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/blob/temp8/CONTRIBUTING.md) to go to the v8 branch_
# Contributing to Umbraco CMS
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing to Umbraco CMS.
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
Remember, we're a friendly bunch and are happy with whatever contribution you might provide. Below are guidelines for success that we've gathered over the years. If you choose to ignore them then we still love you 💖.
## Contributing code changes
This document gives you a quick overview on how to get started, we will link to in-depth documentation throughout if you need some more background info.
## Guidelines for contributions we welcome
Not all changes are wanted so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valueable time.
We have [documented what we consider small and large changes](CONTRIBUTION_GUIDELINES.md), make sure to talk to us before making large changes.
Remember, if an issue is in the `Up for grabs` list or you've asked for some feedback before you sent us a PR, your PR will not be closed as unwanted.
## How do I begin?
Great question! The short version goes like this:
* **Fork** - create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
![Fork the repository](img/forkrepository.png)
* **Clone** - when GitHub has created your fork, you can clone it in your favorite Git tool
![Clone the fork](img/clonefork.png)
* **Build** - build your fork of Umbraco locally as described in [building Umbraco from source code](BUILD.md)
* **Change** - make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](#questions)
* **Commit** - done? Yay! 🎉 It is recommended to create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-U4-12345`. This means it's a temporary branch for the particular issue you're working on, in this case `U4-12345`
* **Push** - great, now you can push the changes up to your fork on GitHub
* **Create pull request** - exciting! You're ready to show us your changes (or not quite ready, you just need some feedback to progress). GitHub has picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go.
![Create a pull request](img/createpullrequest.png)
### Further reading
At this point you might want to [read on about contributing in depth](CONTRIBUTING_DETAILED.md).
### Reviews
You've sent us your first contribution, congratulations! Now what?
The [pull request team](#the-pr-team) can now start reviewing your proposed changes and give you feedback on them. If it's not perfect, we'll either fix up what we need or we can request you to make some additional changes.
We have [a process in place which you can read all about](REVIEW_PROCESS.md). The very abbreviated version is:
- Your PR will get a reply within 48 hours
- An in-depth reply will be added within at most 2 weeks
- The PR will be either merged or rejected within at most 4 weeks
- Sometimes it is difficult to meet these timelines and we'll talk to you
## Styleguides
To be honest, we don't like rules very much. We trust you have the best of intentions and we encourage you to create working code. If it doesn't look perfect then we'll happily help clean it up.
That said, the Umbraco development team likes to follow the hints that ReSharper gives us (no problem if you don't have this installed) and we've added a `.editorconfig` file so that Visual Studio knows what to do with whitespace, line endings, etc.
## The PR team
The pull request team consists of a member of Umbraco HQ, [Sebastiaan](https://github.com/nul800sebastiaan), who gets assistance from the following community members
- [Anders Bjerner](https://github.com/abjerner)
- [Dave Woestenborghs](https://github.com/dawoe)
- [Emma Burstow](https://github.com/emmaburstow)
- [Kyle Weems](https://github.com/cssquirrel)
- [Poornima Nayar](https://github.com/poornimanayar)
These wonderful volunteers will provide you with a first reply to your PR, review and test out your changes and might ask more questions. After that they'll let Umbraco HQ know if everything seems okay.
## Questions?
You can get in touch with [the PR team](#the-pr-team) in multiple ways, we love open conversations and we are a friendly bunch. No question you have is stupid. Any questions you have usually helps out multiple people with the same question. Ask away:
- If there's an existing issue on the issue tracker then that's a good place to leave questions and discuss how to start or move forward
- Unsure where to start? Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"](https://our.umbraco.org/forum/contributing-to-umbraco-cms/) forum, the team monitors that one closely
- We're also [active in the Gitter chatroom](https://gitter.im/umbraco/Umbraco-CMS)
## Code of Conduct
This project and everyone participating in it is governed by the [our Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [Sebastiaan Janssen - sj@umbraco.dk](mailto:sj@umbraco.dk).
## Contributing to Umbraco, in depth
There are other ways to contribute, and there's a few more things that you might be wondering about. We will answer the [most common questions and ways to contribute in our detailed documentation](CONTRIBUTING_DETAILED.md).
## Credits
This contribution guide borrows heavily from the excellent work on [the Atom contribution guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md). A big [#h5yr](http://h5yr.com/) to them!

View File

@@ -1,21 +1,11 @@
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/blob/temp8/CONTRIBUTING.md) to go to the v8 branch_
# Contributing in detail
# Contributing to Umbraco CMS
There's more than one way to contribute to Umbraco, there's some more suggestions below.
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing to Umbraco CMS.
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
Remember, we're a friendly bunch and are happy with whatever contribution you might provide. Below are guidelines for success that we've gathered over the years. If you choose to ignore them then we still love you 💖.
When contributing code to Umbraco there's plenty of things you'll want to know, skip down to [What should I know before I get started](#what-should-i-know-before-i-get-started) for the answers to your burning questions.
#### Table Of Contents
__[Quick start guide for Umbraco v8](https://github.com/umbraco/Umbraco-CMS/blob/temp8/V8_GETTING_STARTED.md)__
[Code of Conduct](#code-of-conduct)
[How Can I Contribute?](#how-can-i-contribute)
* [Reporting Bugs](#reporting-bugs)
* [Suggesting Enhancements](#suggesting-enhancements)
@@ -30,16 +20,6 @@ __[Quick start guide for Umbraco v8](https://github.com/umbraco/Umbraco-CMS/blob
* [Building Umbraco from source code](#building-umbraco-from-source-code)
* [Keeping your Umbraco fork in sync with the main repository](#keeping-your-umbraco-fork-in-sync-with-the-main-repository)
[How do I even begin?](#how-do-i-even-begin)
[Problems?](#problems)
[Credits](#credits)
## Code of Conduct
This project and everyone participating in it is governed by the [our Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [Sebastiaan Janssen - sj@umbraco.dk](mailto:sj@umbraco.dk).
## How Can I Contribute?
### Reporting Bugs
@@ -56,7 +36,7 @@ Before creating bug reports, please check [this list](#before-submitting-a-bug-r
* **Use the Google**. Whatever you're experiencing, Google it plus "Umbraco" - usually you can get some pretty good hints from the search results, including open issues and further troubleshooting hints.
* If you do find and existing issue has **and the issue is still open**, add a comment to the existing issue if you have additional information. If you have the same problem and no new info to add, just "star" the issue.
Explain the problem and include additional details to help maintainers reproduce the problem. The following is a long description which we've boiled down into a few very simple question in the issue tracker when you create a new issue. We're listing the following hints to indicate that the most successful reports usually have a lot of this ground covered:
Explain the problem and include additional details to help maintainers reproduce the problem. The following is a long description which we've boiled down into a few very simple questions in the issue tracker when you create a new issue. We're listing the following hints to indicate that the most successful reports usually have a lot of this ground covered:
* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining which steps you took in the backoffice to get to a certain undesireable result, e.g. you created a document type, inherting 3 levels deep, added a certain datatype, tried to save it and you got an error.
@@ -78,7 +58,7 @@ Include details about your configuration and environment:
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for Atom, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion 📝 and find related suggestions 🔎.
This section guides you through submitting an enhancement suggestion for Umbraco, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion 📝 and find related suggestions 🔎.
Most of the suggestions in the [reporting bugs](#reporting-bugs) section also count for suggesting enhancements.
@@ -104,6 +84,10 @@ The most successful pull requests usually look a like this:
Again, these are guidelines, not strict requirements.
## Making changes after the PR was opened
If you make the corrections we ask for in the same branch and push them to your fork again, the pull request automatically updates with the additional commit(s) so we can review it again. If all is well, we'll merge the code and your commits are forever part of Umbraco!
## Styleguides
To be honest, we don't like rules very much. We trust you have the best of intentions and we encourage you to create working code. If it doesn't look perfect then we'll happily help clean it up.
@@ -139,7 +123,7 @@ To find the general areas of something you're looking to fix or improve, have a
We like to use [Gitflow as much as possible](https://jeffkreeftmeijer.com/git-flow/), don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to something, usually `dev-v7`. Whatever the default is, that's where we'd like you to target your contributions.
![What branch do you want me to target?](tools/contributing/defaultbranch.png)
![What branch do you want me to target?](img/defaultbranch.png)
### Building Umbraco from source code
@@ -147,7 +131,7 @@ The easiest way to get started is to run `build.bat` which will build both the b
Alternatively, you can open `src\umbraco.sln` in Visual Studio 2017 ([the community edition is free](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15) for you to use to contribute to Open Source projects). In Visual Studio, find the Task Runner Explorer (in the View menu under Other Windows) and run the build task under the gulpfile.
![Gulp build in Visual Studio](tools/contributing/gulpbuild.png)
![Gulp build in Visual Studio](img/gulpbuild.png)
After this build completes, you should be able to hit `F5` in Visual Studio to build and run the project. A IISExpress webserver will start and the Umbraco installer will pop up in your browser, follow the directions there to get a working Umbraco install up and running.
@@ -173,39 +157,3 @@ git rebase upstream/dev-v7
In this command we're syncing with the `dev-v7` branch, but you can of course choose another one if needed.
(More info on how this works: [http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated](http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated))
## How do I even begin?
Great question! The short version goes like this:
* **Fork** - create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
![Fork the repository](tools/contributing/forkrepository.png)
* **Clone** - when GitHub has created your fork, you can clone it in your favorite Git tool
![Clone the fork](tools/contributing/clonefork.png)
* **Build** - build your fork of Umbraco locally as described in [building Umbraco from source code](#building-umbraco-from-source-code)
* **Change** - make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will happily give feedback
* **Commit** - done? Yay! 🎉 It is recommended to create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-U4-12345`. This means it's a temporary branch for the particular issue you're working on, in this case `U4-12345`
* **Push** - great, now you can push the changes up to your fork on GitHub
* **Create pull request** - exciting! You're ready to show us your changes (or not quite ready, you just need some feedback to progress). GitHub has picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go.
![Create a pull request](tools/contributing/createpullrequest.png)
The Umbraco development team can now start reviewing your proposed changes and give you feedback on them. If it's not perfect, we'll either fix up what we need or we can request you to make some additional changes.
If you make the corrections we ask for in the same branch and push them to your fork again, the pull request automatically updates with the additional commit(s) so we can review it again. If all is well, we'll merge the code and your commits are forever part of Umbraco!
Not all changes are wanted so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes at this and we'll be nice about it, thanking you for spending your valueable time.
Remember, if an issue is in the `Up for grabs` list or you've asked for some feedback before you send us a PR, your PR will not be closed as unwanted.
## Problems?
Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"](https://our.umbraco.org/forum/contributing-to-umbraco-cms/) forum, the team monitors that one closely!
## Credits
This contribution guide borrows heavily from the excellent work on [the Atom contribution guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md). A big [#h5yr](http://h5yr.com/) to them!

View File

@@ -0,0 +1,33 @@
# Contributing to Umbraco CMS
When youre considering creating a pull request for Umbraco CMS, we will categorize them in two different sizes, small and large.
The process for both sizes is very similar, as [explained in the contribution document](CONTRIBUTING.md#how-do-i-begin).
## Small PRs
Bug fixes and small improvements - can be recognized by seeing a small number of changes and possibly a small number of new files.
Were usually able to handle small PRs pretty quickly. A community volunteer will do the initial review and flag it for Umbraco HQ as “community tested”. If everything looks good, it will be merged pretty quickly [as per the described process](REVIEW_PROCESS.md).
### Up for grabs
Umbraco HQ will regularly mark newly created issues on the issue tracker with the `Up for grabs` tag. This means that the proposed changes are wanted in Umbraco but the HQ does not have the time to make them at this time. These issues are usually small enough to fit in the "Small PRs" category and we encourage anyone to pick them up and help out.
If you do start working on something, make sure leave a small comment on the issue saying something like: "I'm working on this". That way other people stumbling upon the issue know they don't need to pick it up, someone already has.
## Large PRs
New features and large refactorings - can be recognized by seeing a large number of changes, plenty of new files, updates to package manager files (NuGets packages.config, NPMs packages.json, etc.).
We would love to follow the same process for larger PRs but this is not always possible due to time limitations and priorities that need to be aligned. We dont want to put up any barriers, but this document should set the correct expectations.
Please make sure to describe your idea in an issue, it helps to put in mockup screenshots or videos.
If the change makes sense for HQ to include in Umbraco CMS we will leave you some feedback on how wed like to see it being implemented.
If a larger pull request is encouraged by Umbraco HQ, the process will be similar to what is described in the [small PRs process](#small-prs) above, well get feedback to you within 14 days. Finalizing and merging the PR might take longer though as it will likely need to be picked up by the development team to make sure everything is in order. Well keep you posted on the progress.
### Pull request or package?
If it doesnt fit in CMS right now, we will likely encourage you to make it into a package instead. A package is a great way to check out popularity of a feature, learn how people use it, validate good usability and to fix bugs.
Eventually, a package could "graduate" to be included in the CMS.

View File

@@ -1,6 +1,6 @@
_Looking for Umbraco version 7? [Click here](https://github.com/umbraco/Umbraco-CMS) to go to the v7 branch_
__Ready to try out Version 8? [See the quick start guide](https://github.com/umbraco/Umbraco-CMS/blob/temp8/V8_GETTING_STARTED.md).__
__Ready to try out Version 8? [See the quick start guide](V8_GETTING_STARTED.md).__
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/tree/temp8) to go to the v8 branch_
@@ -8,7 +8,7 @@ Umbraco CMS
===========
The friendliest, most flexible and fastest growing ASP.NET CMS used by more than 443,000 websites worldwide: [https://umbraco.com](https://umbraco.com)
[![ScreenShot](vimeo.png)](https://vimeo.com/172382998/)
[![ScreenShot](img/vimeo.png)](https://vimeo.com/172382998/)
## Umbraco CMS
Umbraco is a free open source Content Management System built on the ASP.NET platform. Our mission is to help you deliver delightful digital experiences by making Umbraco friendly, simpler and social.

25
docs/REVIEW_PROCESS.md Normal file
View File

@@ -0,0 +1,25 @@
# Review process
You're an awesome person and have sent us your contribution in the form of a pull request! It's now time to relax for a bit and wait for our response.
In order to set some expectations, here's what happens next.
## Review process
You will get an initial reply within 48 hours (workdays) to acknowledge that weve seen your PR and well pick it up as soon as we can.
You will get feedback within at most 14 days after opening the PR. Youll most likely get feedback sooner though. Then there are a few possible outcomes:
- Your proposed change is awesome! We merge it in and it will be included in the next minor release of Umbraco
- If the change is a high priority bug fix, we will cherry-pick it into the next patch release as well so that we can release it as soon as possible
- Your proposed change is awesome but needs a bit more work, well give you feedback on the changes wed like to see
- Your proposed change is awesome but.. not something were looking to include at this point. Well close your PR and the related issue (well be nice about it!)
## Are you still available?
We understand you have other things to do and can't just drop everything to help us out.
So if were asking for your help to improve the PR well wait for two weeks to give you a fair chance to make changes. Well ask for an update if we dont hear back from you after that time.
If we dont hear back from you for 4 weeks, well close the PR so that it doesnt just hang around forever. Youre very welcome to re-open it once you have some more time to spend on it.
There will be times that we really like your proposed changes and well finish the final improvements wed like to see ourselves. You still get the credits and your commits will live on in the git repository.

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -284,7 +284,7 @@ namespace Umbraco.Core.Configuration
}
/// <summary>
/// Returns a string value to determine if umbraco should skip version-checking.
/// Returns the number of days that should take place between version checks.
/// </summary>
/// <value>The version check period in days (0 = never).</value>
public int VersionCheckPeriod

View File

@@ -8,16 +8,13 @@ using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Xml;
using System.Web.Security;
using Newtonsoft.Json;
using Umbraco.Core.Configuration;
using System.Web.Security;
using Umbraco.Core.Strings;
using Umbraco.Core.CodeAnnotations;
using Umbraco.Core.Composing;
using Umbraco.Core.Exceptions;
using Umbraco.Core.IO;
using Umbraco.Core.Strings;
namespace Umbraco.Core
{
@@ -471,13 +468,13 @@ namespace Umbraco.Core
return ch.ToString(CultureInfo.InvariantCulture) == ch.ToString(CultureInfo.InvariantCulture).ToUpperInvariant();
}
/// <summary>Is null or white space.</summary>
/// <param name="str">The str.</param>
/// <returns>The is null or white space.</returns>
public static bool IsNullOrWhiteSpace(this string str)
{
return string.IsNullOrWhiteSpace(str);
}
/// <summary>Indicates whether a specified string is null, empty, or
/// consists only of white-space characters.</summary>
/// <param name="value">The value to check.</param>
/// <returns>Returns <see langword="true"/> if the value is null,
/// empty, or consists only of white-space characters, otherwise
/// returns <see langword="false"/>.</returns>
public static bool IsNullOrWhiteSpace(this string value) => string.IsNullOrWhiteSpace(value);
public static string IfNullOrWhiteSpace(this string str, string defaultValue)
{

View File

@@ -165,6 +165,29 @@ namespace Umbraco.Tests.Strings
Assert.AreEqual(expected, output);
}
[TestCase("", true)]
[TestCase(" ", true)]
[TestCase("\r\n\r\n", true)]
[TestCase("\r\n", true)]
[TestCase(@"
Hello
", false)]
[TestCase(null, true)]
[TestCase("a", false)]
[TestCase("abc", false)]
[TestCase("abc ", false)]
[TestCase(" abc", false)]
[TestCase(" abc ", false)]
public void IsNullOrWhiteSpace(string value, bool expected)
{
// Act
bool result = value.IsNullOrWhiteSpace();
// Assert
Assert.AreEqual(expected, result);
}
// FORMAT STRINGS
// note: here we just ensure that the proper helper gets called properly

View File

@@ -429,9 +429,10 @@ Umbraco.</p>
<CWS_NewsEventsList id="1155" parentID="1139" level="2" writerID="0" creatorID="0" nodeType="1126" template="1112" sortOrder="3" createDate="2009-02-27T09:57:30" updateDate="2010-04-22T02:18:31" nodeName="News and Events" urlName="news-and-events" writerName="Administrator" creatorName="Administrator" path="-1,1139,1155" isDoc="">
<CWS_EventItem id="1156" parentID="1155" level="3" writerID="0" creatorID="0" nodeType="1122" template="1107" sortOrder="1" createDate="2009-02-27T10:00:53" updateDate="2010-04-22T02:18:31" nodeName="Codegarden 09" urlName="codegarden-09" writerName="Administrator" creatorName="Administrator" path="-1,1139,1155,1156" isDoc="">
<eventDate>2009-06-22T00:00:00</eventDate>
<bodyText><![CDATA[
<h3>Come join the annual umbraco developer conference in Wonderful
Copenhagen on June 22nd - 23rd. Two days for insights, eye-openers,
<bodyText>
<![CDATA[
<h3>Come join the annual Umbraco developer conference in Wonderful
Odense on May 22nd - 24th. Two days for insights, eye-openers,
great conversations and friendly people.</h3>
<p>The who's who of umbraco will be gathered and share their
@@ -441,8 +442,8 @@ huge industrial venue in central Copenhagen where we'll have one
huge room, three rooms for breakout sessions and a Caf&eacute; that
serves your taste of espresso.</p>
<p>Come join the annual umbraco developer conference in Wonderful
Copenhagen on June 22nd - 23rd. Two days for insights, eye-openers,
<p>Come join the annual Umbraco developer conference in Wonderful
Odense on May 22nd - 24th. Two days for insights, eye-openers,
great conversations and friendly people.</p>
<p>We've planned a program that fits both experienced umbraco users

View File

@@ -7,6 +7,7 @@ var sort = require('gulp-sort');
var connect = require('gulp-connect');
var open = require('gulp-open');
var runSequence = require('run-sequence');
const imagemin = require('gulp-imagemin');
var _ = require('lodash');
var MergeStream = require('merge-stream');
@@ -206,6 +207,17 @@ gulp.task('dependencies', function () {
//css, fonts and image files
stream.add(
gulp.src(sources.globs.assets)
.pipe(imagemin([
imagemin.gifsicle({interlaced: true}),
imagemin.jpegtran({progressive: true}),
imagemin.optipng({optimizationLevel: 5}),
imagemin.svgo({
plugins: [
{removeViewBox: true},
{cleanupIDs: false}
]
})
]))
.pipe(gulp.dest(root + targets.assets))
);

View File

@@ -27,6 +27,7 @@
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-connect": "5.0.0",
"gulp-imagemin": "^4.1.0",
"gulp-less": "^3.5.0",
"gulp-ngdocs": "^0.3.0",
"gulp-open": "^2.1.0",

View File

@@ -75,15 +75,12 @@ Use this directive to render an umbraco button. The directive can be used to gen
function link(scope, el, attr, ctrl) {
scope.style = null;
scope.innerState = "init";
function activate() {
scope.blockElement = false;
if (!scope.state) {
scope.state = "init";
}
if (scope.buttonStyle) {
// make it possible to pass in multiple styles
@@ -116,10 +113,13 @@ Use this directive to render an umbraco button. The directive can be used to gen
activate();
var unbindStateWatcher = scope.$watch('state', function(newValue, oldValue) {
if (newValue) {
scope.innerState = newValue;
}
if (newValue === 'success' || newValue === 'error') {
$timeout(function() {
scope.state = 'init';
scope.innerState = 'init';
}, 2000);
}

View File

@@ -1,12 +1,51 @@
/**
* @ngdoc directive
* @name umbraco.directives.directive:umbConfirm
* @function
* @description
* A confirmation dialog
*
* @restrict E
*/
@ngdoc directive
@name umbraco.directives.directive:umbConfirm
@restrict E
@scope
@description
A confirmation dialog
<h3>Markup example</h3>
<pre>
<div ng-controller="My.Controller as vm">
<umb-confirm caption="Title" on-confirm="vm.onConfirm()" on-cancel="vm.onCancel()"></umb-confirm>
</div>
</pre>
<h3>Controller example</h3>
<pre>
(function () {
"use strict";
function Controller() {
var vm = this;
vm.onConfirm = function() {
alert('Confirm clicked');
};
vm.onCancel = function() {
alert('Cancel clicked');
}
}
angular.module("umbraco").controller("My.Controller", Controller);
})();
</pre>
@param {string} caption (<code>attribute</code>): The caption shown above the buttons
@param {callback} on-confirm (<code>attribute</code>): The call back when the "OK" button is clicked. If not set the button will not be shown
@param {callback} on-cancel (<code>atribute</code>): The call back when the "Cancel" button is clicked. If not set the button will not be shown
**/
function confirmDirective() {
return {
restrict: "E", // restrict to an element
@@ -18,7 +57,16 @@ function confirmDirective() {
caption: '@'
},
link: function (scope, element, attr, ctrl) {
scope.showCancel = false;
scope.showConfirm = false;
if (scope.onConfirm) {
scope.showConfirm = true;
}
if (scope.onCancel) {
scope.showCancel = true;
}
}
};
}

View File

@@ -166,7 +166,13 @@ function iconHelper($q, $timeout) {
var c = ".icon-";
for (var i = document.styleSheets.length - 1; i >= 0; i--) {
var classes = document.styleSheets[i].rules || document.styleSheets[i].cssRules;
var classes = null;
try {
classes = document.styleSheets[i].rules || document.styleSheets[i].cssRules;
} catch (e) {
console.warn("Can't read the css rules of: " + document.styleSheets[i].href, e);
continue;
}
if (classes !== null) {
for(var x=0;x<classes.length;x++) {

View File

@@ -29,9 +29,9 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
"There's a pretty big chance, you've visited a website powered by Umbraco today",
"'Umbraco-spotting' is the game of spotting big brands running Umbraco",
"At least 4 people have the Umbraco logo tattooed on them",
"'Umbraco' is the danish name for an allen key",
"'Umbraco' is the Danish name for an allen key",
"Umbraco has been around since 2005, that's a looong time in IT",
"More than 600 people from all over the world meet each year in Denmark in June for our annual conference <a target='_blank' href='https://umbra.co/codegarden'>CodeGarden</a>",
"More than 600 people from all over the world meet each year in Denmark in May for our annual conference <a target='_blank' href='https://umbra.co/codegarden'>CodeGarden</a>",
"While you are installing Umbraco someone else on the other side of the planet is probably doing it too",
"You can extend Umbraco without modifying the source code using either JavaScript or C#",
"Umbraco has been installed in more than 198 countries"

View File

@@ -183,6 +183,7 @@
@import "hacks.less";
@import "healthcheck.less";
@import "getstarted.less";
// cleanup properties.less when it is done
@import "properties.less";

View File

@@ -14,6 +14,7 @@
padding: 10px 10px 5px 10px;
box-sizing: border-box;
background-color: @white;
position:relative;
}
.umb-group-builder__group.-active {

View File

@@ -0,0 +1,88 @@
.umb-getstarted {
display: flex;
flex-wrap: wrap;
margin-left: -10px;
margin-right: -10px;
}
.umb-getstartedcards {
display: flex;
flex-wrap: wrap;
margin: 0 auto;
max-width: 100%;
@media (min-width: 500px) {
margin: 0 -10px;
}
}
.umb-getstartedcard {
width: 100%;
padding: 0.5em;
text-align: center;
display: flex;
align-items: center;
border: 1px solid #d8d7d9;
background-color: #fff;
margin: 0 0 0.5em;
@media (min-width: 500px) {
display: block;
align-items: unset;
padding: 1em 1em 0 1em;
margin: 0 10px 20px;
width: auto;
flex-basis: 35%;
max-width: 35%;
}
@media (min-width: 768px) {
width: auto;
flex-basis: 14%;
max-width: 14%;
}
@media (min-width: 1930px) {
width: auto;
flex-basis: 7%;
max-width: 7%;
}
}
.umb-getstartedcard img {
height: 3em;
max-width: 100%;
@media (min-width: 500px) {
height: auto;
}
}
.umb-getstartedcards {
margin: 0 auto;
max-width: 100%;
}
.umb-getstartedbody {
font-weight: bold;
margin: 0.5em;
@media (min-width: 500px) {
padding: 10px;
margin: auto;
}
}
.umb-getstartedbody p {
margin: 0;
@media (min-width: 500px) {
margin: inherit;
}
}
.umb-getstartedcard:hover {
border: 1px solid @turquoise;
cursor: pointer;
}

View File

@@ -154,13 +154,14 @@ angular.module("umbraco")
});
});
} else {
$scope.path = [];
}
mediaTypeHelper.getAllowedImagetypes(folder.id)
.then(function (types) {
$scope.acceptedMediatypes = types;
});
} else {
$scope.path = [];
}
$scope.lockedFolder = folder.id === -1 && $scope.model.startNodeIsVirtual;

View File

@@ -27,7 +27,8 @@
<umb-button type="button"
label-key="general_upload"
action="upload()"
disabled="lockedFolder">
disabled="lockedFolder"
ng-if="acceptedMediatypes.length > 0">
</umb-button>
</div>

View File

@@ -1,15 +1,15 @@
<div class="umb-button" ng-class="{'umb-button--block': blockElement}" data-element="{{ alias ? 'button-' + alias : '' }}">
<div class="icon-check umb-button__success" ng-class="{'-hidden': state !== 'success', '-white': style}"></div>
<div class="icon-check umb-button__success" ng-class="{'-hidden': innerState !== 'success', '-white': style}"></div>
<div class="icon-delete umb-button__error" ng-class="{'-hidden': state !== 'error', '-white': style}"></div>
<div class="icon-delete umb-button__error" ng-class="{'-hidden': innerState !== 'error', '-white': style}"></div>
<div class="umb-button__progress" ng-class="{'-hidden': state !== 'busy', '-white': style}"></div>
<div class="umb-button__progress" ng-class="{'-hidden': innerState !== 'busy', '-white': style}"></div>
<div ng-if="state !== 'init'" class="umb-button__overlay"></div>
<div ng-if="innerState !== 'init'" class="umb-button__overlay"></div>
<a ng-if="type === 'link'" href="{{href}}" class="btn umb-button__button {{style}} umb-button--{{size}}" ng-click="clickButton($event)" hotkey="{{shortcut}}" hotkey-when-hidden="{{shortcutWhenHidden}}">
<span class="umb-button__content" ng-class="{'-hidden': state !== 'init'}">
<span class="umb-button__content" ng-class="{'-hidden': innerState !== 'init'}">
<i ng-if="icon" class="{{icon}} umb-button__icon"></i>
<localize ng-if="labelKey" key="{{labelKey}}">{{label}}</localize>
<span ng-if="!labelKey">{{label}}</span>
@@ -17,7 +17,7 @@
</a>
<button ng-if="type === 'button'" type="button" class="btn umb-button__button {{style}} umb-button--{{size}}" ng-click="clickButton($event)" hotkey="{{shortcut}}" hotkey-when-hidden="{{shortcutWhenHidden}}" ng-disabled="disabled">
<span class="umb-button__content" ng-class="{'-hidden': state !== 'init'}">
<span class="umb-button__content" ng-class="{'-hidden': innerState !== 'init'}">
<i ng-if="icon" class="{{icon}} umb-button__icon"></i>
<localize ng-if="labelKey" key="{{labelKey}}">{{label}}</localize>
<span ng-if="!labelKey">{{label}}</span>
@@ -25,7 +25,7 @@
</button>
<button ng-if="type === 'submit'" type="submit" class="btn umb-button__button {{style}} umb-button--{{size}}" hotkey="{{shortcut}}" hotkey-when-hidden="{{shortcutWhenHidden}}" ng-disabled="disabled">
<span class="umb-button__content" ng-class="{'-hidden': state !== 'init'}">
<span class="umb-button__content" ng-class="{'-hidden': innerState !== 'init'}">
<i ng-if="icon" class="{{icon}} umb-button__icon"></i>
<localize ng-if="labelKey" key="{{labelKey}}">{{label}}</localize>
<span ng-if="!labelKey">{{label}}</span>

View File

@@ -3,8 +3,8 @@
<div class="umb-pane btn-toolbar umb-btn-toolbar">
<div class="control-group umb-control-group">
<a href class="btn btn-link" ng-click="onCancel()"><localize key="general_cancel">Cancel</localize></a>
<a href class="btn btn-primary" ng-click="onConfirm()"><localize key="general_ok">Ok</localize></a>
<a ng-if="showCancel" href class="btn btn-link" ng-click="onCancel()"><localize key="general_cancel">Cancel</localize></a>
<a ng-if="showConfirm" href class="btn btn-primary" ng-click="onConfirm()"><localize key="general_ok">Ok</localize></a>
</div>
</div>
</div>

View File

@@ -1,14 +1,15 @@
<h3 class="bold">Hours of Umbraco training videos are only a click away</h3>
<p style="margin-bottom: 20px;">Want to master Umbraco? Spend a couple of minutes learning some best practices by watching one of these videos about using Umbraco, then visit <a class="btn-link -underline" href="http://umbraco.tv" target="_blank">umbraco.tv</a> for even more Umbraco videos.</p>
<div
ng-init="init('http://umbraco.tv/videos/developer/chapterrss?sort=no')"
<div ng-init="init('http://umbraco.tv/videos/developer/chapterrss?sort=no')"
ng-controller="Umbraco.Dashboard.StartupVideosController">
<div class="umb-training-videos">
<a class="umb-training-video" ng-repeat="video in videos" target="_blank" href="{{video.link}}" title="{{video.title}}">
<div class="umb-getstartedcards">
<a class="umb-getstartedcard" ng-repeat="video in videos" href="{{video.link}}" title="{{video.title}}" target="_blank" rel="noopener">
<img ng-src="{{video.thumbnail}}" alt="{{video.title}}">
<span class="umb-training-video__label">{{video.title}}</span>
<div class="umb-getstartedbody">
<p>{{video.title}}</p>
</div>
</a>
</div>

View File

@@ -1,7 +1,30 @@
angular.module("umbraco").controller("Umbraco.PrevalueEditors.BooleanController",
function ($scope) {
if ($scope.model.value === 1 || $scope.model.value === "1" || $scope.model.value === true) {
$scope.model.value = "1";
function updateToggleValue() {
$scope.toggleValue = false;
if ($scope.model && $scope.model.value && ($scope.model.value.toString() === "1" || angular.lowercase($scope.model.value) === "true")) {
$scope.toggleValue = true;
}
}
if($scope.model.value === null){
$scope.model.value = "0";
}
updateToggleValue();
$scope.toggle = function(){
if($scope.model.value === 1 || $scope.model.value === "1"){
$scope.model.value = "0";
updateToggleValue();
return;
}
$scope.model.value = "1";
updateToggleValue();
}
$scope.htmlId = "bool-" + String.CreateGuid();
});

View File

@@ -1,4 +1,6 @@
<label ng-controller="Umbraco.PrevalueEditors.BooleanController" for="{{htmlId}}" class="checkbox">
<input name="boolean" type="checkbox" ng-model="model.value" ng-true-value="1" ng-false-value="0" id="{{htmlId}}" />
<localize key="general_yes">Yes</localize>
</label>
<div ng-controller="Umbraco.PrevalueEditors.BooleanController">
<umb-toggle
checked="toggleValue"
on-click="toggle()">
</umb-toggle>
</div>

View File

@@ -16,10 +16,6 @@ function booleanEditorController($scope, $rootScope, assetsService) {
setupViewModel();
$scope.$watch("renderModel.value", function (newVal) {
$scope.model.value = newVal === true ? "1" : "0";
});
//here we declare a special method which will be called whenever the value has changed from the server
//this is instead of doing a watch on the model.value = faster
$scope.model.onValueChanged = function (newVal, oldVal) {
@@ -27,5 +23,17 @@ function booleanEditorController($scope, $rootScope, assetsService) {
setupViewModel();
};
// Update the value when the toggle is clicked
$scope.toggle = function(){
if($scope.renderModel.value){
$scope.model.value = "0";
setupViewModel();
return;
}
$scope.model.value = "1";
setupViewModel();
};
}
angular.module("umbraco").controller("Umbraco.PropertyEditors.BooleanController", booleanEditorController);

View File

@@ -1,3 +1,6 @@
<div class="umb-property-editor umb-boolean" ng-controller="Umbraco.PropertyEditors.BooleanController">
<input type="checkbox" ng-model="renderModel.value" id="{{model.alias}}" />
<umb-toggle
checked="renderModel.value"
on-click="toggle()">
</umb-toggle>
</div>

View File

@@ -1,6 +1,21 @@
angular.module("umbraco")
.controller("Umbraco.PropertyEditors.GridController",
function ($scope, $http, assetsService, localizationService, $rootScope, dialogService, gridService, mediaResource, imageHelper, $timeout, umbRequestHelper, angularHelper) {
function (
$scope,
$http,
assetsService,
localizationService,
$rootScope,
dialogService,
gridService,
mediaResource,
imageHelper,
$timeout,
umbRequestHelper,
angularHelper,
$element,
eventsService
) {
// Grid status variables
var placeHolder = "";
@@ -335,6 +350,8 @@ angular.module("umbraco")
$scope.showRowConfigurations = false;
eventsService.emit("grid.rowAdded", { scope: $scope, element: $element, row: row });
};
$scope.removeRow = function (section, $index) {
@@ -584,6 +601,8 @@ angular.module("umbraco")
cell.controls.push(newControl);
eventsService.emit("grid.itemAdded", { scope: $scope, element: $element, cell: cell, item: newControl });
};
$scope.addTinyMce = function (cell) {
@@ -873,8 +892,13 @@ angular.module("umbraco")
// *********************************************
// Init grid
// *********************************************
eventsService.emit("grid.initializing", { scope: $scope, element: $element });
$scope.initContent();
eventsService.emit("grid.initialized", { scope: $scope, element: $element });
});
//Clean the grid value before submitting to the server, we don't need

View File

@@ -75,7 +75,8 @@
'-active': row.active,
'-active-child': row.hasActiveChild}"
on-outside-click="clickOutsideRow($index, section.rows)"
bind-click-on="{{row.active}}">
bind-click-on="{{row.active}}"
data-rowid="{{row.$uniqueId}}">
<div class="umb-row-title-bar">
@@ -175,7 +176,8 @@
ng-class="{'-active': control.active}"
on-outside-click="clickOutsideControl($index, area.controls, area)"
bind-click-on="{{control.active}}"
umb-set-dirty-on-change="{{control.value}}">
umb-set-dirty-on-change="{{control.value}}"
data-itemid="{{control.$uniqueId}}">
<div class="umb-control-click-overlay" ng-show="!control.active && !sortMode"></div>

View File

@@ -1,4 +1,4 @@
[
[
{
"name": "Introduction",
"alias": "umbIntroIntroduction",
@@ -24,7 +24,7 @@
"element": "#applications",
"elementPreventClick": true,
"title": "Main Menu",
"content": "This is the main menu in Umbraco backoffice. Here you can navigate betweeen the different sections, see your user profile and open the help drawer",
"content": "This is the main menu in Umbraco backoffice. Here you can navigate between the different sections, see your user profile and open the help drawer.",
"backdropOpacity": 0.6
},
{
@@ -38,7 +38,7 @@
"element": "#tree",
"elementPreventClick": true,
"title": "The Tree",
"content": "<p>This is the <b>Tree</b> and is the main navigation inside a section.</p><p>In the Content section the tree is called the <b>Content tree</b> and here you can navigate the content of your website.</p>"
"content": "<p>This is the <b>Tree</b> and it is the main navigation inside a section.</p><p>In the Content section the tree is called the <b>Content tree</b> and here you can navigate the content of your website.</p>"
},
{
"element": "[data-element='editor-container']",
@@ -67,7 +67,7 @@
{
"element": "[data-element~='overlay-user'] [data-element='button-overlayClose']",
"title": "User profile",
"content": "Let's close the user profile again",
"content": "Let's close the user profile again.",
"event": "click"
},
{
@@ -108,7 +108,7 @@
"steps": [
{
"title": "Create your first Document Type",
"content": "<p>Step 1 of any site is to create a <strong>Document Type</strong>.<br> A Document Type is a template for content. For each <em>type</em> of content you want to create you'll create a Document Type. This will define where content based on this Document Type can be created, how many properties it holds and what the input method should be for these properties.</p><p>When you have at least one Document type in place you can start creating content and this content can then be used in a template.</p><p>In this tour you will learn how to set up a basic Document Type with a property to enter a short text.</p>",
"content": "<p>Step 1 of any site is to create a <strong>Document Type</strong>.<br> A Document Type is a template for content. For each <em>type</em> of content you want to create you'll create a Document Type. This will define where content based on this Document Type can be created, how many properties it holds and what the input method should be for these properties.</p><p>When you have at least one Document Type in place you can start creating content and this content can then be used in a template.</p><p>In this tour you will learn how to set up a basic Document Type with a property to enter a short text.</p>",
"type": "intro"
},
{
@@ -128,7 +128,7 @@
{
"element": "#dialog [data-element='action-documentType']",
"title": "Create Document Type",
"content": "<p>Click <b>Document Type</b> 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</p><p>You will use the template in a later tour to render content.</p>",
"content": "<p>Click <b>Document Type</b> 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.</p><p>You will use the template in a later tour to render content.</p>",
"event": "click"
},
{
@@ -181,7 +181,7 @@
"element": "[data-element~='overlay-editor-picker']",
"elementPreventClick": true,
"title": "Editor picker",
"content": "<p>In the editor picker dialog we can pick one of the many built-in editor.</p><p><em>You can choose from preconfigured data types (Reuse) or create a new configuration (Available editors)</em></p>"
"content": "<p>In the editor picker dialog we can pick one of the many built-in editors.</p><p><em>You can choose from preconfigured data types (Reuse) or create a new configuration (Available editors)</em>.</p>"
},
{
"element": "[data-element~='overlay-editor-picker'] [data-element='editor-Textarea']",
@@ -193,7 +193,7 @@
"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 character limit but in this case it is not needed"
"content": "Each property editor can have individual settings. For the textarea editor you can set a character limit but in this case it is not needed."
},
{
"element": "[data-element~='overlay-editor-settings'] [data-element='button-overlaySubmit']",
@@ -264,7 +264,7 @@
{
"element": "[data-element='editor-content'] [data-element='property-welcomeText']",
"title": "Add a welcome text",
"content": "<p>Add content to the <b>Welcome Text</b> field</p><p>If you don't have any ideas here is a start:<br/> <pre>I am learning Umbraco. High Five I Rock #H5IR</pre>.</p>"
"content": "<p>Add content to the <b>Welcome Text</b> field.</p><p>If you don't have any ideas here is a start:<br/> <pre>I am learning Umbraco. High Five I Rock #H5IR</pre>.</p>"
},
{
"element": "[data-element='editor-content'] [data-element='button-saveAndPublish']",
@@ -291,13 +291,13 @@
"steps": [
{
"title": "Render your content in a template",
"content": "<p>Templating in Umbraco builds on the concept of <b>Razor Views</b> from asp.net MVC. - This tour is a sneak peak on how to write templates in Umbraco.</p><p>In this tour you will learn how to render content from the <b>Home Page</b> document type so you can see the content added to our <b>Home</b> content page.</p>",
"content": "<p>Templating in Umbraco builds on the concept of <b>Razor Views</b> from ASP.NET MVC. This tour is a sneak peak on how to write templates in Umbraco.</p><p>In this tour you will learn how to render content from the <b>Home Page</b> document type so you can see the content added to our <b>Home</b> content page.</p>",
"type": "intro"
},
{
"element": "#applications [data-element='section-settings']",
"title": "Navigate to the Settings section",
"content": "<p>In the <b>Settings</b> section you will find all the templates</p><p>It is of course also possible to edit all your code files in your favorite code editor.</p>",
"content": "<p>In the <b>Settings</b> section you will find all the templates.</p><p>It is of course also possible to edit all your code files in your favorite code editor.</p>",
"event": "click",
"backdropOpacity": 0.6
},
@@ -346,7 +346,7 @@
"steps": [
{
"title": "View your Umbraco site",
"content": "<p>Our three main components to a page is done: <b>Document type, Template, and Content</b> - it is now time to see the result.</p><p>In this tour you will learn how to see your published website.</p>",
"content": "<p>Our three main components to a page are done: <b>Document type, Template, and Content</b>. It is now time to see the result.</p><p>In this tour you will learn how to see your published website.</p>",
"type": "intro"
},
{
@@ -359,7 +359,7 @@
{
"element": "#tree [data-element='tree-item-Home']",
"title": "Open the Home page",
"content": "<p>Click the <b>Home</b> page to open it</p>",
"content": "<p>Click the <b>Home</b> page to open it.</p>",
"event": "click",
"eventElement": "#tree [data-element='tree-item-Home'] a.umb-tree-item__label"
},
@@ -408,7 +408,7 @@
{
"element": "#tree [data-element='tree-root']",
"title": "Create a new folder",
"content": "<p>First create a folder for your images. Hover the media root node and click the <b>three small dots</b> on the right side of the item.</p>",
"content": "<p>First create a folder for your images. Hover over the media root node and click the <b>three small dots</b> on the right side of the item.</p>",
"event": "click",
"eventElement": "#tree [data-element='tree-root'] [data-element='tree-item-options']"
},
@@ -427,19 +427,19 @@
{
"element": "[data-element='editor-media'] [data-element='button-save']",
"title": "Save the folder",
"content": "<p>Click the <b>Save</b> button to create the new folder</p>",
"content": "<p>Click the <b>Save</b> button to create the new folder.</p>",
"event": "click"
},
{
"element": "[data-element='editor-media'] [data-element='dropzone']",
"title": "Upload images",
"content": "<p>In the upload area you can upload your media items.</p><p>Click the <b>Click here to choose files</b>-button and select a couple of images on your computer and upload them.</p>",
"content": "<p>In the upload area you can upload your media items.</p><p>Click the <b>Click here to choose files</b> button and select a couple of images on your computer and upload them.</p>",
"view": "uploadimages"
},
{
"element": "[data-element='editor-media'] [data-element='media-grid-item-0']",
"title": "View media item details",
"content": "Hover the media item and <b>Click the purple bar</b> to view details about the media item",
"content": "Hover over the media item and <b>Click the purple bar</b> 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']"
},

View File

@@ -731,7 +731,7 @@ namespace Umbraco.Web
return content.AncestorsOrSelf<T>(maxLevel).FirstOrDefault();
}
internal static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, bool orSelf, Func<IPublishedContent, bool> func)
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, bool orSelf, Func<IPublishedContent, bool> func)
{
var ancestorsOrSelf = content.EnumerateAncestors(orSelf);
return func == null ? ancestorsOrSelf : ancestorsOrSelf.Where(func);