diff --git a/zero.Core/Api/BackofficeApi.cs b/zero.Core/Api/BackofficeApi.cs
index 33fe06c1..f36bfe30 100644
--- a/zero.Core/Api/BackofficeApi.cs
+++ b/zero.Core/Api/BackofficeApi.cs
@@ -74,6 +74,21 @@ namespace zero.Core.Api
}
+ ///
+ public async Task> GetByIds(params string[] ids) where T : IZeroIdEntity
+ {
+ using (IAsyncDocumentSession session = Raven.OpenAsyncSession())
+ {
+ IList items = await session.Query()
+ .Scope(Scope)
+ .Where(x => x.Id.In(ids))
+ .ToListAsync();
+
+ return ids.ToDictionary(x => x, x => items.FirstOrDefault(item => item.Id == x));
+ }
+ }
+
+
///
public async Task> SaveModel(T model, IValidator validator = null) where T : IZeroIdEntity
@@ -223,6 +238,12 @@ namespace zero.Core.Api
///
Task GetById(string id) where T : IZeroIdEntity;
+ ///
+ /// Get entities by ids.
+ /// If the requested entity is an IAppAwareEntity it will only return entities for the currently selected app + shared app
+ ///
+ Task> GetByIds(params string[] ids) where T : IZeroIdEntity;
+
///
/// Updates or creates an entity with an optional validator
///
diff --git a/zero.Web.UI/App/components/pickers/pick/pick.vue b/zero.Web.UI/App/components/pickers/pick.vue
similarity index 97%
rename from zero.Web.UI/App/components/pickers/pick/pick.vue
rename to zero.Web.UI/App/components/pickers/pick.vue
index e7312362..d4e23d50 100644
--- a/zero.Web.UI/App/components/pickers/pick/pick.vue
+++ b/zero.Web.UI/App/components/pickers/pick.vue
@@ -149,9 +149,13 @@
watch: {
- config()
- {
- this.buildConfig();
+ config: {
+ deep: true,
+ handler()
+ {
+ this.buildConfig();
+ this.loaded = false;
+ }
},
value(val)
{
@@ -212,18 +216,12 @@
},
- mounted()
- {
- this.load();
- },
-
-
methods: {
buildConfig()
{
var config = JSON.parse(JSON.stringify(defaultConfig));
- this.configuration = _extend(defaultConfig, this.config);
+ this.configuration = _extend(JSON.parse(JSON.stringify(config)), this.config);
this.configuration.search = _extend(config.search, this.config.search || {});
this.configuration.addButton = _extend(config.addButton, this.config.addButton || {});
this.configuration.preview = _extend(config.preview, this.config.preview || {});
@@ -234,6 +232,10 @@
overlayOpened()
{
+ if (!this.loaded)
+ {
+ this.load();
+ }
if (this.configuration.search.focus)
{
this.$nextTick(() => this.$refs.search.focus());
diff --git a/zero.Web.UI/App/components/tree/tree-item.vue b/zero.Web.UI/App/components/tree/tree-item.vue
index e2a1d41f..789fadd6 100644
--- a/zero.Web.UI/App/components/tree/tree-item.vue
+++ b/zero.Web.UI/App/components/tree/tree-item.vue
@@ -141,7 +141,7 @@
height: 100%;
align-items: center;
position: relative;
- color: var(--color-fg-mid);
+ color: var(--color-fg);
&:hover
{
diff --git a/zero.Web.UI/Sass/Modules/Buttons/_button.scss b/zero.Web.UI/Sass/Modules/Buttons/_button.scss
index c1a033ff..b004cddd 100644
--- a/zero.Web.UI/Sass/Modules/Buttons/_button.scss
+++ b/zero.Web.UI/Sass/Modules/Buttons/_button.scss
@@ -302,7 +302,7 @@ button::-moz-focus-inner
display: inline-flex;
justify-content: center;
align-items: center;
- padding: 5px;
+ padding: 10px;
}
}