Merge branch 'dev-v7.6' into temp-U4-9687
This commit is contained in:
@@ -17,6 +17,7 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat
|
||||
hideheader: '@',
|
||||
cachekey: '@',
|
||||
isdialog: '@',
|
||||
onlyinitialized: '@',
|
||||
//Custom query string arguments to pass in to the tree as a string, example: "startnodeid=123&something=value"
|
||||
customtreeparams: '@',
|
||||
eventhandler: '=',
|
||||
@@ -252,7 +253,7 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat
|
||||
deleteAnimations = false;
|
||||
|
||||
//default args
|
||||
var args = { section: scope.section, tree: scope.treealias, cacheKey: scope.cachekey, isDialog: scope.isdialog ? scope.isdialog : false };
|
||||
var args = { section: scope.section, tree: scope.treealias, cacheKey: scope.cachekey, isDialog: scope.isdialog ? scope.isdialog : false, onlyinitialized: scope.onlyinitialized };
|
||||
|
||||
//add the extra query string params if specified
|
||||
if (scope.customtreeparams) {
|
||||
|
||||
@@ -51,10 +51,15 @@ function treeResource($q, $http, umbRequestHelper) {
|
||||
if (!options.isDialog) {
|
||||
options.isDialog = false;
|
||||
}
|
||||
|
||||
|
||||
//create the query string for the tree request, these are the mandatory options:
|
||||
var query = "application=" + options.section + "&tree=" + options.tree + "&isDialog=" + options.isDialog;
|
||||
|
||||
//if you need to load a not initialized tree set this value to false - default is true
|
||||
if (options.onlyinitialized) {
|
||||
query += "&onlyInitialized=" + options.onlyinitialized;
|
||||
}
|
||||
|
||||
//the options can contain extra query string parameters
|
||||
if (options.queryString) {
|
||||
query += "&" + options.queryString;
|
||||
|
||||
@@ -104,13 +104,18 @@
|
||||
function openPartialOverlay() {
|
||||
vm.partialItemOverlay = {
|
||||
view: "treepicker",
|
||||
section: "settings",
|
||||
section: "settings",
|
||||
treeAlias: "partialViews",
|
||||
entityType: "partialView",
|
||||
multiPicker: false,
|
||||
show: true,
|
||||
filter: function(i) {
|
||||
if(i.name.indexOf(".cshtml") === -1 && i.name.indexOf(".vbhtml") === -1) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
filterCssClass: "not-allowed",
|
||||
title: localizationService.localize("template_insertPartialView"),
|
||||
|
||||
show: true,
|
||||
select: function(node){
|
||||
|
||||
$scope.model.insert = {
|
||||
|
||||
@@ -10,6 +10,8 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
|
||||
$scope.treeAlias = dialogOptions.treeAlias;
|
||||
$scope.multiPicker = dialogOptions.multiPicker;
|
||||
$scope.hideHeader = true;
|
||||
// if you need to load a not initialized tree set this value to false - default is true
|
||||
$scope.onlyInitialized = dialogOptions.onlyInitialized;
|
||||
$scope.searchInfo = {
|
||||
searchFromId: dialogOptions.startNodeId,
|
||||
searchFromName: null,
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
hideheader="{{hideHeader}}"
|
||||
hideoptions="true"
|
||||
isdialog="true"
|
||||
onlyinitialized="{{onlyInitialized}}"
|
||||
customtreeparams="{{customTreeParams}}"
|
||||
eventhandler="dialogTreeEventHandler"
|
||||
enablelistviewsearch="true"
|
||||
|
||||
@@ -419,6 +419,12 @@
|
||||
multiPicker: false,
|
||||
show: true,
|
||||
title: localizationService.localize("template_insertPartialView"),
|
||||
filter: function(i) {
|
||||
if(i.name.indexOf(".cshtml") === -1 && i.name.indexOf(".vbhtml") === -1) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
filterCssClass: "not-allowed",
|
||||
select: function(node){
|
||||
|
||||
var code = templateHelper.getInsertPartialSnippet(node.parentId, node.name);
|
||||
|
||||
Reference in New Issue
Block a user