Merge branch 'temp8' into temp8-203

This commit is contained in:
Shannon
2018-09-14 12:29:50 +10:00
29 changed files with 850 additions and 542 deletions

View File

@@ -178,6 +178,15 @@
variant.variants[i].active = false;
}
}
// keep track of the open variants across the different split views
// push the first variant then update the variant index based on the editor index
if(vm.openVariants && vm.openVariants.length === 0) {
vm.openVariants.push(variant.language.culture);
} else {
vm.openVariants[editorIndex] = variant.language.culture;
}
}
//then assign the variant to a view model to the content app
@@ -185,14 +194,6 @@
return a.alias === "content";
});
contentApp.viewModel = variant;
// keep track of the open variants across the different split views
// push the first variant then update the variant index based on the editor index
if(vm.openVariants && vm.openVariants.length === 0) {
vm.openVariants.push(variant.language.culture);
} else {
vm.openVariants[editorIndex] = variant.language.culture;
}
// make sure the same app it set to active in the new variant
if(activeAppAlias) {

View File

@@ -204,6 +204,29 @@ function navigationService($rootScope, $route, $routeParams, $log, $location, $q
});
},
/**
* @ngdoc method
* @name umbraco.services.navigationService#retainQueryStrings
* @methodOf umbraco.services.navigationService
*
* @description
* Will check the next route parameters to see if any of the query strings that should be retained from the previous route are missing,
* if they are they will be merged and an object containing all route parameters is returned. If nothing should be changed, then null is returned.
* @param {Object} currRouteParams The current route parameters
* @param {Object} nextRouteParams The next route parameters
*/
retainQueryStrings: function (currRouteParams, nextRouteParams) {
var toRetain = angular.copy(nextRouteParams);
var updated = false;
_.each(retainedQueryStrings, function (r) {
if (currRouteParams[r] && !nextRouteParams[r]) {
toRetain[r] = currRouteParams[r];
updated = true;
}
});
return updated ? toRetain : null;
},
/**
* @ngdoc method
* @name umbraco.services.navigationService#load

View File

@@ -122,12 +122,25 @@ app.run(['userService', '$q', '$log', '$rootScope', '$route', '$location', 'urlH
$route.reload();
}
else {
//check if the location being changed is only the mculture query string, if so, cancel the routing since this is just
//used as a global persistent query string that does not change routes.
//check if the location being changed is only due to global/state query strings which means the location change
//isn't actually going to cause a route change.
if (navigationService.isRouteChangingNavigation(currentRouteParams, next.params)) {
//continue the route
$route.reload();
//The location change will cause a route change. We need to ensure that the global/state
//query strings have not been stripped out. If they have, we'll re-add them and re-route.
var toRetain = navigationService.retainQueryStrings(currentRouteParams, next.params);
if (toRetain) {
$route.updateParams(toRetain);
}
else {
//continue the route
$route.reload();
}
}
else {
//navigation is not changing but we should update the currentRouteParams to include all current parameters
currentRouteParams = angular.copy(next.params);
}
}
});

View File

@@ -36,7 +36,7 @@
}
.umb-content-grid__icon.-light {
color: @gray-8;
color: @gray-5;
}
@@ -58,7 +58,7 @@
}
.umb-content-grid__item-name.-light {
color: @gray-8;
color: @gray-5;
}
.umb-content-grid__details-list {
@@ -69,7 +69,7 @@
}
.umb-content-grid__details-list.-light {
color: @gray-8;
color: @gray-5;
}
.umb-content-grid__details-label {

View File

@@ -15,12 +15,16 @@
{{ item.name }}
</div>
<ul class="umb-content-grid__details-list" ng-class="{'-light': !item.published&& item.updater != null}">
<li class="umb-content-grid__details-item" ng-repeat="property in contentProperties">
<div class="umb-content-grid__details-label">{{ property.header }}:</div>
<div class="umb-content-grid__details-value">{{ item[property.alias] }}</div>
</li>
</ul>
<ul class="umb-content-grid__details-list" ng-class="{'-light': !item.published && item.updater != null}">
<li class="umb-content-grid__details-item" ng-if="item.state">
<div class="umb-content-grid__details-label"><localize key="general_status"></localize>:</div>
<div class="umb-content-grid__details-value"><umb-variant-state variant="item"></umb-variant-state></div>
</li>
<li class="umb-content-grid__details-item" ng-repeat="property in contentProperties">
<div class="umb-content-grid__details-label">{{ property.header }}:</div>
<div class="umb-content-grid__details-value">{{ item[property.alias] }}</div>
</li>
</ul>
</div>
@@ -32,4 +36,4 @@
<localize key="content_noItemsToShow">There are no items to show</localize>
</umb-empty-state>
</div>
</div>

View File

@@ -15,6 +15,9 @@
<i class="umb-table-head__icon icon" ng-class="{'icon-navigation-up': isSortDirection('Name', 'asc'), 'icon-navigation-down': isSortDirection('Name', 'desc')}"></i>
</a>
</div>
<div class="umb-table-cell" ng-if="items[0].state">
<localize key="general_status">Status</localize>
</div>
<div class="umb-table-cell" ng-repeat="column in itemProperties">
<a class="umb-table-head__link" title="Sort by {{ column.header }}" href="#"
ng-click="sort(column.alias, column.allowSorting, column.isSystem)"
@@ -46,6 +49,11 @@
ng-bind="item.name">
</a>
</div>
<div class="umb-table-cell" ng-if="item.state">
<umb-variant-state
variant="item">
</umb-variant-state>
</div>
<div class="umb-table-cell" ng-repeat="column in itemProperties">
<span title="{{column.header}}: {{item[column.alias]}}">