@@ -86,7 +87,7 @@
type="button"
button-style="link"
label="Publish"
- key="actions_publish"
+ label-key="actions_publish"
icon="icon-globe"
action="publish()"
disabled="actionInProgress">
@@ -97,7 +98,7 @@
type="button"
button-style="link"
label="Unpublish"
- key="actions_unpublish"
+ label-key="actions_unpublish"
icon="icon-block"
action="unpublish()"
disabled="actionInProgress">
@@ -108,7 +109,7 @@
type="button"
button-style="link"
label="Copy"
- key="actions_copy"
+ label-key="actions_copy"
icon="icon-documents"
action="copy()"
disabled="actionInProgress">
@@ -119,7 +120,7 @@
type="button"
button-style="link"
label="Move"
- key="actions_move"
+ label-key="actions_move"
icon="icon-enter"
action="move()"
disabled="actionInProgress">
@@ -129,8 +130,8 @@
ng-if="options.allowBulkDelete && (buttonPermissions == null || buttonPermissions.canDelete)"
type="button"
button-style="link"
- label="Delete"
- key="actions_delete"
+ label="Delete"
+ label-key="actions_delete"
icon="icon-trash"
action="delete()"
disabled="actionInProgress">
diff --git a/src/Umbraco.Web.UI/config/ExamineIndex.config b/src/Umbraco.Web.UI/config/ExamineIndex.config
index 7212053ca0..a853847ecb 100644
--- a/src/Umbraco.Web.UI/config/ExamineIndex.config
+++ b/src/Umbraco.Web.UI/config/ExamineIndex.config
@@ -9,10 +9,10 @@ More information and documentation can be found on CodePlex: http://umbracoexami
-
+
-
+
@@ -25,6 +25,6 @@ More information and documentation can be found on CodePlex: http://umbracoexami
-
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
index 56d8384bb1..0280a46e05 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
@@ -60,6 +60,7 @@
For
+
Ryd valg
Vælg
Vælg nuværende mappe
Gør noget andet
@@ -165,6 +166,10 @@
Klik for at uploade
Slip filerne her...
+
Link til medie
+
eller klik her for at vælge filer
+
Tilladte filtyper er kun
+
Maks filstørrelse er
Opret et nyt medlem
@@ -203,7 +208,7 @@
Er du sikker på at du vil forlade Umbraco?
Er du sikker?
Klip
-
Rediger ordbogs nøgle
+
Rediger ordbogsnøgle
Rediger sprog
Indsæt lokalt link
Indsæt tegn
@@ -427,8 +432,8 @@
Listevisning
Gemmer...
nuværende
-
Flyt
Indlejring
+
valgt
@@ -991,7 +996,7 @@ Mange hilsner fra Umbraco robotten
Roller
Medlemstype
Dokumenttyper
-
Dokumenttyper
+
Relationstyper
Pakker
Pakker
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
index 94963cddb1..2307f3bbd2 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
@@ -65,6 +65,7 @@
Viewing for
+
Clear selection
Select
Select current folder
Do something else
@@ -172,7 +173,7 @@
Click to upload
Drop your files here...
-
Link to media
+
Link to media
or click here to choose files
Only allowed file types are
Max file size is
@@ -488,8 +489,8 @@
List view
Saving...
current
-
Move
Embed
+
selected
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
index 9743d3166e..77537a2689 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
@@ -65,6 +65,7 @@
Viewing for
+
Clear selection
Select
Select current folder
Do something else
@@ -492,8 +493,8 @@
List view
Saving...
current
-
Move
Embed
+
selected
Black
diff --git a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
index 5228bde1a5..e69c3ae94a 100644
--- a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
+++ b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
@@ -3,15 +3,103 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Examine;
+using Lucene.Net.Documents;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Umbraco.Core;
+using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Services;
+using UmbracoExamine;
namespace Umbraco.Web.PropertyEditors
{
[PropertyEditor(Core.Constants.PropertyEditors.GridAlias, "Grid layout", "grid", HideLabel = true, IsParameterEditor = false, ValueType = "JSON", Group="rich content", Icon="icon-layout")]
public class GridPropertyEditor : PropertyEditor
{
+ ///
+ /// We're going to bind to the Examine events so we can ensure grid data is index nicely
+ ///
+ ///
+ /// I think this kind of logic belongs on this property editor, putting this inside of the indexer certainly doesn't seem right
+ ///
+ static GridPropertyEditor()
+ {
+ foreach (var i in ExamineManager.Instance.IndexProviderCollection.OfType
())
+ {
+ i.DocumentWriting += DocumentWriting;
+ }
+ }
+
+ private static void DocumentWriting(object sender, Examine.LuceneEngine.DocumentWritingEventArgs e)
+ {
+ var indexer = (BaseUmbracoIndexer)sender;
+ foreach (var field in indexer.IndexerData.UserFields)
+ {
+ if (e.Fields.ContainsKey(field.Name))
+ {
+ if (e.Fields[field.Name].DetectIsJson())
+ {
+ try
+ {
+ var json = JsonConvert.DeserializeObject(e.Fields[field.Name]);
+
+ //check if this is formatted for grid json
+ JToken name;
+ JToken sections;
+ if (json.HasValues && json.TryGetValue("name", out name) && json.TryGetValue("sections", out sections))
+ {
+ //get all values and put them into a single field (using JsonPath)
+ var sb = new StringBuilder();
+ foreach (var row in json.SelectTokens("$.sections[*].rows[*]"))
+ {
+ var rowName = row["name"].Value();
+ var areaVals = row.SelectTokens("$.areas[*].controls[*].value");
+
+ foreach (var areaVal in areaVals)
+ {
+ var str = areaVal.Value();
+ str = XmlHelper.CouldItBeXml(str) ? str.StripHtml() : str;
+ sb.Append(str);
+ sb.Append(" ");
+
+ //add the row name as an individual field
+ e.Document.Add(
+ new Field(
+ string.Format("{0}.{1}", field.Name, rowName), str, Field.Store.YES, Field.Index.ANALYZED));
+ }
+ }
+
+ if (sb.Length > 0)
+ {
+ //First save the raw value to a raw field
+ e.Document.Add(
+ new Field(
+ string.Format("{0}{1}", UmbracoContentIndexer.RawFieldPrefix, field.Name),
+ e.Fields[field.Name], Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS, Field.TermVector.NO));
+
+ //now replace the original value with the combined/cleaned value
+ e.Document.RemoveField(field.Name);
+ e.Document.Add(
+ new Field(
+ field.Name,
+ sb.ToString(), Field.Store.YES, Field.Index.ANALYZED));
+ }
+ }
+ }
+ catch (JsonException)
+ {
+ //swallow...on purpose, there's a chance that this isn't json and we don't want that to affect
+ // the website.
+ }
+
+ }
+ }
+ }
+ }
+
///
/// Overridden to ensure that the value is validated
///