Merge branch '7.0.0' of https://github.com/umbraco/Umbraco-CMS into 7.0.0
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
set { base["guid"] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("repositoryurl", DefaultValue = "http://packages.umbraco.org")]
|
||||
[ConfigurationProperty("repositoryurl", DefaultValue = "http://our.umbraco.org")]
|
||||
public string RepositoryUrl
|
||||
{
|
||||
get { return (string)base["repositoryurl"]; }
|
||||
|
||||
@@ -361,7 +361,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
else {
|
||||
//instead of calling just the dialog service we funnel it through the global
|
||||
//event emitter
|
||||
getRootScope().$emit("closeDialogs", event);
|
||||
getRootScope().$emit("closeDialogs", undefined);
|
||||
}
|
||||
},
|
||||
_debug: function(strMsg) {
|
||||
|
||||
@@ -4,11 +4,59 @@
|
||||
* @restrict E
|
||||
**/
|
||||
angular.module("umbraco.directives.html")
|
||||
.directive('umbPanel', function(){
|
||||
.directive('umbPanel', function($timeout){
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: 'true',
|
||||
templateUrl: 'views/directives/html/umb-panel.html'
|
||||
templateUrl: 'views/directives/html/umb-panel.html',
|
||||
link: function (scope, el, attrs) {
|
||||
|
||||
function _setClass(resize){
|
||||
var bar = $(".tab-content .active .umb-tab-buttons");
|
||||
|
||||
//incase this runs without any tabs
|
||||
if(bar.length === 0){
|
||||
bar = $(".tab-content .umb-tab-buttons");
|
||||
}
|
||||
|
||||
//no need to process
|
||||
if(resize){
|
||||
bar.removeClass("umb-bottom-bar");
|
||||
}
|
||||
|
||||
//already positioned
|
||||
if(bar.hasClass("umb-bottom-bar")){
|
||||
return;
|
||||
}
|
||||
|
||||
var offset = bar.offset();
|
||||
|
||||
if(offset){
|
||||
var bottom = bar.offset().top + bar.height();
|
||||
if(bottom > $(window).height()){
|
||||
bar.addClass("umb-bottom-bar");
|
||||
$(".tab-content .active").addClass("with-buttons");
|
||||
}else{
|
||||
bar.removeClass("umb-bottom-bar");
|
||||
$(".tab-content .active").removeClass("with-buttons");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//initial loading
|
||||
$timeout(function(){
|
||||
$('a[data-toggle="tab"]').on('shown', function (e) {
|
||||
_setClass();
|
||||
});
|
||||
_setClass();
|
||||
}, 1000, false);
|
||||
|
||||
|
||||
$(window).bind("resize", function () {
|
||||
_setClass(true);
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -17,8 +17,9 @@ angular.module("umbraco.directives")
|
||||
function collectFromDom(activeTab){
|
||||
var $panes = $('div.tab-content');
|
||||
|
||||
$panes.find('.tab-pane').each(function (index) {
|
||||
var $this = angular.element(this);
|
||||
angular.forEach($panes.find('.tab-pane'), function (pane, index) {
|
||||
var $this = angular.element(pane);
|
||||
|
||||
var id = $this.attr("rel");
|
||||
var label = $this.attr("label");
|
||||
var tab = {id: id, label: label, active: false};
|
||||
@@ -35,15 +36,10 @@ angular.module("umbraco.directives")
|
||||
}
|
||||
|
||||
if(label){
|
||||
if(scope.visibleTabs.length < maxTabs || tab.id === 0){
|
||||
scope.visibleTabs.push(tab);
|
||||
}else{
|
||||
scope.overflownTabs.push(tab);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
scope.showTabs = iAttrs.tabs ? true : false;
|
||||
@@ -58,15 +54,9 @@ angular.module("umbraco.directives")
|
||||
//unfortunately twitter bootstrap tabs is not playing perfectly with angular.
|
||||
scope.$watch("tabs", function (newValue, oldValue) {
|
||||
|
||||
$(newValue).each(function(i, val){
|
||||
angular.forEach(newValue, function(val, index){
|
||||
var tab = {id: val.id, label: val.label};
|
||||
if(scope.visibleTabs.length < maxTabs || tab.id === 0){
|
||||
scope.visibleTabs.push(tab);
|
||||
}else{
|
||||
scope.overflownTabs.push(tab);
|
||||
}
|
||||
|
||||
//scope.visibleTabs.push({id: val.id, label: val.label});
|
||||
scope.visibleTabs.push(tab);
|
||||
});
|
||||
|
||||
//don't process if we cannot or have already done so
|
||||
|
||||
@@ -9,50 +9,6 @@ angular.module("umbraco.directives")
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: 'true',
|
||||
templateUrl: 'views/directives/umb-tab-view.html',
|
||||
|
||||
link: function (scope, el, attrs) {
|
||||
|
||||
function _setClass(resize){
|
||||
var bar = $(".tab-content .active .umb-tab-buttons");
|
||||
|
||||
//no need to process
|
||||
if(resize){
|
||||
bar.removeClass("umb-bottom-bar");
|
||||
}
|
||||
|
||||
//already positioned
|
||||
if(bar.hasClass("umb-bottom-bar")){
|
||||
return;
|
||||
}
|
||||
|
||||
var offset = bar.offset();
|
||||
|
||||
if(offset){
|
||||
var bottom = bar.offset().top + bar.height();
|
||||
if(bottom > $(window).height()){
|
||||
bar.addClass("umb-bottom-bar");
|
||||
$(".tab-content .active").addClass("with-buttons");
|
||||
}else{
|
||||
bar.removeClass("umb-bottom-bar");
|
||||
$(".tab-content .active").removeClass("with-buttons");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//initial loading
|
||||
$timeout(function(){
|
||||
$('a[data-toggle="tab"]').on('shown', function (e) {
|
||||
_setClass();
|
||||
});
|
||||
|
||||
_setClass();
|
||||
}, 500, false);
|
||||
|
||||
$(window).bind("resize", function () {
|
||||
_setClass(true);
|
||||
});
|
||||
}
|
||||
templateUrl: 'views/directives/umb-tab-view.html'
|
||||
};
|
||||
});
|
||||
@@ -422,7 +422,7 @@ angular.module('umbraco.services').factory('umbDataFormatter', umbDataFormatter)
|
||||
* @name umbraco.services.iconHelper
|
||||
* @description A helper service for dealing with icons, mostly dealing with legacy tree icons
|
||||
**/
|
||||
function iconHelper($q) {
|
||||
function iconHelper($q, $timeout) {
|
||||
|
||||
var converter = [
|
||||
{ oldIcon: ".sprNew", newIcon: "add" },
|
||||
@@ -566,40 +566,41 @@ function iconHelper($q) {
|
||||
|
||||
/** Return a list of icons, optionally filter them */
|
||||
/** It fetches them directly from the active stylesheets in the browser */
|
||||
getIcons: function(filter){
|
||||
|
||||
getIcons: function(){
|
||||
var deferred = $q.defer();
|
||||
if(collectedIcons){
|
||||
deferred.resolve(collectedIcons);
|
||||
}
|
||||
$timeout(function(){
|
||||
if(collectedIcons){
|
||||
deferred.resolve(collectedIcons);
|
||||
}else{
|
||||
collectedIcons = [];
|
||||
var c = ".icon-";
|
||||
|
||||
collectedIcons = [];
|
||||
var f = filter || "";
|
||||
var c = ".icon-" + f;
|
||||
for (var i = document.styleSheets.length - 1; i >= 0; i--) {
|
||||
var classes = document.styleSheets[i].rules || document.styleSheets[i].cssRules;
|
||||
|
||||
for(var x=0;x<classes.length;x++) {
|
||||
var cur = classes[x];
|
||||
if(cur.selectorText && cur.selectorText.indexOf(c) === 0) {
|
||||
var s = cur.selectorText.substring(1);
|
||||
var hasSpace = s.indexOf(" ");
|
||||
if(hasSpace>0){
|
||||
s = s.substring(0, hasSpace);
|
||||
}
|
||||
var hasPseudo = s.indexOf(":");
|
||||
if(hasPseudo>0){
|
||||
s = s.substring(0, hasPseudo);
|
||||
}
|
||||
for (var i = document.styleSheets.length - 1; i >= 0; i--) {
|
||||
var classes = document.styleSheets[i].rules || document.styleSheets[i].cssRules;
|
||||
|
||||
for(var x=0;x<classes.length;x++) {
|
||||
var cur = classes[x];
|
||||
if(cur.selectorText && cur.selectorText.indexOf(c) === 0) {
|
||||
var s = cur.selectorText.substring(1);
|
||||
var hasSpace = s.indexOf(" ");
|
||||
if(hasSpace>0){
|
||||
s = s.substring(0, hasSpace);
|
||||
}
|
||||
var hasPseudo = s.indexOf(":");
|
||||
if(hasPseudo>0){
|
||||
s = s.substring(0, hasPseudo);
|
||||
}
|
||||
|
||||
if(collectedIcons.indexOf(s) < 0){
|
||||
collectedIcons.push(s);
|
||||
if(collectedIcons.indexOf(s) < 0){
|
||||
collectedIcons.push(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
deferred.resolve(collectedIcons);
|
||||
}
|
||||
}
|
||||
|
||||
deferred.resolve(collectedIcons);
|
||||
}, 100);
|
||||
|
||||
return deferred.promise;
|
||||
},
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
.ui-sortable-placeholder {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.controls-row img {
|
||||
max-width: none;
|
||||
}
|
||||
@@ -28,11 +27,6 @@ iframe, .content-column-body {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* ng-cloak support with lazyloading */
|
||||
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* JQUERY FILEUPLOAD TEMP STYLES */
|
||||
.fileinput-button {
|
||||
position: relative;
|
||||
|
||||
@@ -126,7 +126,6 @@
|
||||
|
||||
|
||||
/* Publish */
|
||||
|
||||
.umb-btn-toolbar .dropdown-menu {
|
||||
right: 0;
|
||||
left: auto;
|
||||
@@ -171,7 +170,7 @@
|
||||
.umb-tab-buttons{padding-left: 240px;}
|
||||
.umb-tab-pane.with-buttons{padding-bottom: 80px}
|
||||
|
||||
|
||||
.tab-content{overflow: visible; }
|
||||
|
||||
|
||||
// Utility classes
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.Dialogs.IconPickerController",
|
||||
function ($scope, iconHelper) {
|
||||
iconHelper.getIcons("").then(function(icons){
|
||||
|
||||
iconHelper.getIcons().then(function(icons){
|
||||
$scope.icons = icons;
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
);
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
<div class="umb-panel-body with-footer">
|
||||
|
||||
<div class="umb-loader" ng-hide="icons"></div>
|
||||
<div class="umb-control-group">
|
||||
<ul class="umb-thumbnails thumbnails">
|
||||
<li class="span1" ng-repeat="icon in icons|filter: searchTerm">
|
||||
|
||||
@@ -8,21 +8,7 @@
|
||||
<li ng-class="{active: $first, 'tab-error': tabHasError}" ng-repeat="tab in visibleTabs" val-tab>
|
||||
<a href="#tab{{tab.id}}" data-toggle="tab">{{ tab.label }}</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li ng-show="overflownTabs.length > 0">
|
||||
<div class="btn-group">
|
||||
<a href class="btn btn-link dropdown-toggle" data-toggle="dropdown">
|
||||
<localize key="general_more">More</localize>
|
||||
<i class="icon-navigation-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-class="{'tab-error': tabHasError}" ng-repeat="overflownTab in overflownTabs" val-tab>
|
||||
<a href="#tab{{overflownTab.id}}" data-toggle="tab">{{overflownTab.label}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,7 +59,7 @@
|
||||
<cc2:Pane runat="server">
|
||||
<cc2:PropertyPanel ID="pp_icon" runat="server" Text="Icon">
|
||||
<div class="umbIconDropdownList">
|
||||
<a href="#" class="icon-picker"> <i class="<asp:Literal runat="server" ID="lt_icon" />"></i> Choose...</a>
|
||||
<a href="#" class="btn btn-link picker-icons"> <i class="<asp:Literal runat="server" ID="lt_icon" />"></i> Choose...</a>
|
||||
<asp:HiddenField ID="tb_icon" runat="server" />
|
||||
</div>
|
||||
</cc2:PropertyPanel>
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
duplicatePropertyNameAsSafeAlias('ul.addNewProperty .prop-name', 'ul.addNewProperty .prop-alias');
|
||||
|
||||
jQuery(".icon-picker").click(function(){
|
||||
jQuery(".picker-icons").click(function(){
|
||||
var that = this;
|
||||
UmbClientMgr.openAngularModalWindow({
|
||||
template: 'views/common/dialogs/iconpicker.html',
|
||||
|
||||
@@ -124,9 +124,11 @@ namespace umbraco
|
||||
|
||||
case "BrowseRepository.aspx":
|
||||
|
||||
/*
|
||||
//Gets all the repositories registered in umbracoSettings.config
|
||||
var repos = cms.businesslogic.packager.repositories.Repository.getAll();
|
||||
|
||||
|
||||
//if more then one repo, then list them as child nodes under the "Install from repository" node.
|
||||
// the repositories will then be fetched from the loadPackages class.
|
||||
if (repos.Count > 1)
|
||||
@@ -136,24 +138,17 @@ namespace umbraco
|
||||
xNode.Text = ui.Text("treeHeaders", "repositories");
|
||||
xNode.HasChildren = true;
|
||||
}
|
||||
|
||||
*/
|
||||
//if only one repo, then just list it directly and name it as the repository.
|
||||
//the packages will be loaded from the loadPackages class with a repoAlias querystring
|
||||
else if (repos.Count == 1)
|
||||
{
|
||||
xNode.Text = repos[0].Name;
|
||||
xNode.Source = "tree.aspx?app=" + this._app + "&id=" + this._id + "&treeType=packagerPackages&packageType=repository&repoGuid=" + repos[0].Guid + "&rnd=" + Guid.NewGuid();
|
||||
xNode.NodeType = "packagesRepository";
|
||||
xNode.Action = "javascript:openPackageCategory('BrowseRepository.aspx?repoGuid=" + repos[0].Guid + "');";
|
||||
xNode.Icon = "icon-server-alt";
|
||||
xNode.HasChildren = true;
|
||||
}
|
||||
|
||||
//if none registered, then remove the repo node.
|
||||
else if (repos.Count == 0)
|
||||
{
|
||||
xNode.Text = "";
|
||||
}
|
||||
var repos = cms.businesslogic.packager.repositories.Repository.getAll();
|
||||
|
||||
xNode.Text = repos[0].Name;
|
||||
xNode.Source = "tree.aspx?app=" + this._app + "&id=" + this._id + "&treeType=packagerPackages&packageType=repository&repoGuid=" + repos[0].Guid + "&rnd=" + Guid.NewGuid();
|
||||
xNode.NodeType = "packagesRepository";
|
||||
xNode.Action = "javascript:openPackageCategory('BrowseRepository.aspx?repoGuid=" + repos[0].Guid + "');";
|
||||
xNode.Icon = "icon-server-alt";
|
||||
xNode.HasChildren = true;
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@@ -112,22 +112,18 @@ namespace umbraco
|
||||
case "repository":
|
||||
|
||||
_repoGuid = HttpContext.Current.Request.QueryString["repoGuid"];
|
||||
var currentRepo = cms.businesslogic.packager.repositories.Repository.getByGuid(_repoGuid);
|
||||
if (currentRepo != null)
|
||||
Umbraco.Web.org.umbraco.our.Repository r = new Umbraco.Web.org.umbraco.our.Repository();
|
||||
foreach (var cat in r.Categories(_repoGuid))
|
||||
{
|
||||
|
||||
foreach (cms.businesslogic.packager.repositories.Category cat in currentRepo.Webservice.Categories(currentRepo.Guid))
|
||||
{
|
||||
|
||||
XmlTreeNode xNode = XmlTreeNode.Create(this);
|
||||
xNode.Text = cat.Text;
|
||||
xNode.Action = "javascript:openPackageCategory('BrowseRepository.aspx?category=" + cat.Id + "&repoGuid=" + currentRepo.Guid + "');";
|
||||
xNode.Icon = "icon-folder";
|
||||
xNode.OpenIcon = "icon-folder";
|
||||
xNode.NodeType = "packagesCategory" + cat.Id;
|
||||
tree.Add(xNode);
|
||||
}
|
||||
XmlTreeNode xNode = XmlTreeNode.Create(this);
|
||||
xNode.Text = cat.Text;
|
||||
xNode.Action = "javascript:openPackageCategory('BrowseRepository.aspx?category=" + cat.Id + "&repoGuid=" + _repoGuid + "');";
|
||||
xNode.Icon = "icon-folder";
|
||||
xNode.OpenIcon = "icon-folder";
|
||||
xNode.NodeType = "packagesCategory" + cat.Id;
|
||||
tree.Add(xNode);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace umbraco.presentation.developer.packages {
|
||||
|
||||
iframeGen.Text =
|
||||
string.Format(
|
||||
"<iframe id=\"repoFrame\" frameborder=\"1\" style=\"border: none; display: block\" src=\"{0}?repoGuid={1}{2}&callback={3}:{4}{5}/developer/packages/proxy.htm?/{6}/developer/packages/installer.aspx?repoGuid={7}&version=v45&fullVersion={8}.{9}.{10}&useLegacySchema={11}&dotnetVersion={12}&trustLevel={13}\"></iframe>",
|
||||
"<iframe id=\"repoFrame\" frameborder=\"1\" style=\"border: none; display: block\" src=\"{0}/repo/?repoGuid={1}{2}&callback={3}:{4}{5}/developer/packages/proxy.htm?/{6}/developer/packages/installer.aspx?repoGuid={7}&version=v45&fullVersion={8}.{9}.{10}&useLegacySchema={11}&dotnetVersion={12}&trustLevel={13}\"></iframe>",
|
||||
url, repoGuid, category, Request.ServerVariables["SERVER_NAME"],
|
||||
Request.ServerVariables["SERVER_PORT"], IOHelper.ResolveUrl(SystemDirectories.Umbraco),
|
||||
IOHelper.ResolveUrl(SystemDirectories.Umbraco).Trim('/'), repoGuid,
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace umbraco.cms.businesslogic.packager.repositories
|
||||
/// <remarks/>
|
||||
public RepositoryWebservice(string url)
|
||||
{
|
||||
this.Url = url;//"http://packages.umbraco.org/umbraco/webservices/api/repository.asmx";
|
||||
this.Url = url;//"http://our.umbraco.org/umbraco/webservices/api/repository.asmx";
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
|
||||
Reference in New Issue
Block a user