Revert "Remove jquery sourcemap reference"

This reverts commit fbdd94e577.
This commit is contained in:
perploug
2013-09-04 15:35:57 +02:00
parent fbdd94e577
commit 87df168c7d
202 changed files with 314 additions and 25152 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,19 +1,6 @@
//TODO: WE NEED TO CONVERT ALL OF THESE METHODS TO PROXY TO OUR APPLICATION SINCE MANY CUSTOM APPS USE THIS!
//TEST to mock iframe, this intercepts calls directly
//to the old iframe, and funnels requests to angular directly
var right = {document: {location: {}}};
Object.defineProperty(right.document.location, "href", {
get: function() {
return this._href ? this._href : "";
},
set: function(value) {
this._href = value;
UmbClientMgr.contentFrame(value);
},
});
Umbraco.Sys.registerNamespace("Umbraco.Application");
(function($) {
@@ -143,13 +130,13 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
contentFrame: function (strLocation) {
if (!strLocation || strLocation == "") {
//SD: NOTE: We used to return the content iframe object but now I'm not sure we should do that ?!
if (typeof top.right != "undefined") {
return top.right;
}
else {
return top; //return the current window if the content frame doesn't exist in the current context
//SD: NOTE: We used to return the content iframe object but now I'm not sure we should do that ?!
if (typeof top.right != "undefined") {
return top.right;
}
else {
return top; //return the current window if the content frame doesn't exist in the current context
}
//return;
}
@@ -180,15 +167,15 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
var injector = getRootInjector();
var dialogService = injector.get("dialogService");
var dialog = dialogService.open({
var dialog = dialogService.open({
template: url,
width: width,
height: height,
iframe: true,
show: true,
callback: function (result) {
dialog.hide();
}
callback: function (result) {
dialog.hide();
}
});
// var m = new Umbraco.Controls.ModalWindow();

View File

@@ -1,9 +1,9 @@
angular.module("umbraco.directives")
angular.module("umbraco.directives")
.directive('sectionIcon', function ($compile, iconHelper) {
return {
restrict: 'E',
replace: true,
restrict: 'E',
replace: true,
link: function (scope, element, attrs) {
var icon = attrs.icon;
@@ -13,18 +13,13 @@
element.html("<i class='" + iconHelper.convertFromLegacyIcon(icon) + "'></i>");
}
else if (iconHelper.isFileBasedIcon(icon)) {
var convert = iconHelper.convertFromLegacyImage(icon);
if(convert){
element.html("<i class='icon-section " + convert + "'></i>");
}else{
element.html("<img src='images/tray/" + icon + "'>");
}
//it's a file, normally legacy so look in the icon tray images
element.html("<img src='images/tray/" + icon + "'>");
}
else {
//it's normal
element.html("<i class='icon-section " + icon + "'></i>");
}
element.html("<i class='" + icon + "'></i>");
}
}
};
});

View File

@@ -12,40 +12,9 @@ angular.module("umbraco.directives")
},
link: function (scope, iElement, iAttrs) {
function collectFromDom(activeTab){
var $panes = $('div.tab-content');
$panes.find('.tab-pane').each(function (index) {
var $this = angular.element(this);
var id = $this.attr("rel");
var label = $this.attr("label");
var tab = {id: id, label: label, active: false};
if(!activeTab){
tab.active = true;
activeTab = tab;
}
if ($this.attr("rel") === String(activeTab.id)) {
$this.addClass('active');
}
else {
$this.removeClass('active');
}
//this is sorta hacky since we add a tab object to the tabs collection
//based on a dom element, there is most likely a better way...
if (label) {
scope.collectedTabs.push(tab);
}
});
}
scope.showTabs = iAttrs.tabs ? true : false;
scope.collectedTabs = [];
$timeout(function () {
collectFromDom(undefined);
}, 500);
//when the tabs change, we need to hack the planet a bit and force the first tab content to be active,
//unfortunately twitter bootstrap tabs is not playing perfectly with angular.
scope.$watch("tabs", function (newValue, oldValue) {
@@ -63,17 +32,33 @@ angular.module("umbraco.directives")
//set the flag
//hasProcessed = true;
var $panes = $('div.tab-content');
var activeTab = _.find(newValue, function (item) {
return item.active;
});
//we need to do a timeout here so that the current sync operation can complete
// and update the UI, then this will fire and the UI elements will be available.
$timeout(function () {
collectFromDom(activeTab);
}, 500);
$panes.find('.tab-pane').each(function (index) {
var $this = angular.element(this);
var id = $this.attr("rel");
var label = $this.attr("data-label");
if ($this.attr("rel") === String(activeTab.id)) {
$this.addClass('active');
}
else {
$this.removeClass('active');
}
//this is sorta hacky since we add a tab object to the tabs collection
//based on a dom element, there is most likely a better way...
if (label) {
scope.collectedTabs.push({id: id, label: label});
}
});
});
});
}

View File

@@ -21,10 +21,7 @@ angular.module('umbraco.services')
//TODO: would be nicer to set all of the options here first instead of implicitly below!
var ui = {};
$rootScope.$on("closeDialogs", function(){
});
function setMode(mode) {
switch (mode) {
case 'tree':

View File

@@ -332,14 +332,9 @@ function iconHelper() {
{ oldIcon: ".sprTreeDeveloperCacheTypes", newIcon: "icon-box" },
{ oldIcon: ".sprTreeDeveloperMacro", newIcon: "icon-cogs" },
{ oldIcon: ".sprTreeDeveloperRegistry", newIcon: "icon-windows" },
{ oldIcon: ".sprTreeDeveloperPython", newIcon: "icon-linux" },
{ oldIcon: "images/tray/contour.png", newIcon: "icon-umb-contour" }
{ oldIcon: ".sprTreeDeveloperPython", newIcon: "icon-linux" }
];
var imageConverter = [
{oldImage: "contour.png", newIcon: "icon-umb-contour"}
];
return {
/** Used by the create dialogs for content/media types to format the data so that the thumbnails are styled properly */
@@ -420,14 +415,6 @@ function iconHelper() {
}
return icon;
},
convertFromLegacyImage: function (icon) {
var found = _.find(imageConverter, function (item) {
return item.oldImage.toLowerCase() === icon.toLowerCase();
});
return (found ? found.newIcon : undefined);
},
/** If we detect that the tree node has legacy icons that can be converted, this will convert them */
convertFromLegacyTreeNodeIcon: function (treeNode) {
if (this.isLegacyTreeNodeIcon(treeNode)) {

View File

@@ -1,36 +0,0 @@
body.dragging, body.dragging * {
cursor: move !important;
}
.dragged {
position: absolute;
opacity: 0.5;
z-index: 2000;
}
.umb-sort li{
display: block;
margin: 5px;
padding: 5px;
border: 1px solid #CCC;
background: @grayLighter;
}
.umb-sort li.placeholder {
position: relative;
margin: 0;
padding: 0;
border: none;
}
.umb-sort li.placeholder:before {
position: absolute;
content: "";
width: 0;
height: 0;
margin-top: -5px;
left: -5px;
top: -4px;
border: 5px solid transparent;
border-left-color: red;
border-right: none;
}

View File

@@ -2,6 +2,7 @@
font-family: 'icomoon';
src:url('../fonts/helveticons/helveticons.eot');
src:url('../fonts/helveticons/helveticons.eot?#iefix') format('embedded-opentype'),
url('../fonts/helveticons/helveticons.woff') format('woff'),
url('../fonts/helveticons/helveticons.ttf') format('truetype'),
url('../fonts/helveticons/helveticons.svg#icomoon') format('svg');
font-weight: normal;
@@ -93,6 +94,9 @@ i.small:before{
.icon-wall-plug:before {
content: "\e014";
}
.icon-umb-members:before {
content: "\e015";
}
.icon-voice:before {
content: "\e016";
}
@@ -147,28 +151,24 @@ i.small:before{
.icon-umb-deploy:before {
content: "\e027";
}
.icon-umb-contour:before, .traycontent:before, {
.icon-umb-contour:before {
content: "\e028";
}
.icon-umb-settings:before, .traysettings:before, {
.icon-umb-settings:before {
content: "\e029";
}
.icon-umb-users:before, .trayusers:before, {
.icon-umb-users:before {
content: "\e02a";
}
.icon-umb-media:before, .traymedia:before, {
.icon-umb-media:before {
content: "\e02b";
}
.icon-umb-content:before, .traycontent:before{
.icon-umb-content:before {
content: "\e02c";
}
.icon-umb-developer:before, .traydeveloper:before, {
.icon-umb-developer:before {
content: "\e02d";
}
.icon-umb-members:before, .traymember:before {
content: "\e015";
}
.icon-tv:before {
content: "\e02e";
}

View File

@@ -11,10 +11,13 @@ ul.sections {
ul.sections li {
border-bottom: 1px solid @grayDark;
display: block;
padding: 0px;
height: 56px;
padding: 23px 0 0 0
}
ul.sections li [class^="icon-"]:before, ul.sections li [class*=" icon-"]:before{
font-size: 24px;
font-size: 32px;
}
ul.sections li a {
@@ -22,24 +25,24 @@ ul.sections li a {
text-decoration: none;
font-size: 10px;
text-align: center;
color: @gray;
-webkit-transition: color .5s linear;
-moz-transition: color .5s linear;
transition: color .5s linear;
padding-top: 15px;
padding-bottom: 15px;
color: @grayLight;
-webkit-transition: color .2s linear;
-moz-transition: color .2s linear;
transition: color .2s linear;
}
ul.sections a span {
display: block;
visibility: hidden;
font-size: 10px;
line-height: 1em;
-webkit-transition: color .2s linear;
-moz-transition: color .2s linear;
transition: color .2s linear;
}
ul.sections:hover li a {
color: @grayLight;
ul.sections:hover li a span {
visibility: visible;
}
@@ -54,7 +57,6 @@ ul.sections li.avatar {
ul.sections li.avatar a {
margin: 0 auto;
padding: 0;
width: 40px;
height: 40px;
}
@@ -69,20 +71,38 @@ ul.sections li.avatar a img {
ul.sections li i {
display: inline-block;
}
ul.sections li a {
display: inline-block;
padding-left: 4px;
padding-right: 4px;
background-repeat: no-repeat;
background-position: 0 0;
width: 30px;
height: 30px
}
ul.sections li.current {
border-left: 4px @orange solid;
}
ul.sections li.current a{
padding-left: 0px;
ul.sections li i.traycontent {
background-image: url(../img/applicationIcons/Umbraco_icons-02.svg);
}
ul.sections li i.traymedia {
background-image: url(../img/applicationIcons/Umbraco_icons-03.svg);
}
ul.sections li i.traysettings {
background-image: url(../img/applicationIcons/Umbraco_icons-05.svg);
}
ul.sections li i.traydeveloper {
background-image: url(../img/applicationIcons/Umbraco_icons-01.svg);
}
ul.sections li i.trayusers {
background-image: url(../img/applicationIcons/Umbraco_icons-04.svg);
}
ul.sections li i.traymember {
background-image: url(../img/applicationIcons/Umbraco_icons-05.svg);
}
ul.sections li.help {
@@ -95,3 +115,9 @@ ul.sections li.help {
display: block;
width: 100%;
}
ul.sections li.help a span {
visibility: hidden;// remove when helvicons is ready
}

View File

@@ -36,11 +36,9 @@ function MainController($scope, $routeParams, $rootScope, $timeout, $http, $log,
//only close dialogs if non-lin and non-buttons are clicked
var el = event.target.nodeName;
var pEl = event.target.parentElement.nodeName;
var close = $(event.target).closest("#navigation");
var parents = $(event.target).parents("#navigation");
//SD: I've updated this so that we don't close the dialog when clicking inside of the dialog
if (parents.length === 1) {
if ($(event.target).closest("#navigation").length === 1) {
return;
}

View File

@@ -38,7 +38,7 @@ function NavigationController($scope,$rootScope, $location, $log, $routeParams,
//This reacts to clicks passed to the body element which emits a global call to close all dialogs
$rootScope.$on("closeDialogs", function (event) {
if (navigationService.ui.stickyNavigation) {
if (navigationService.ui.stickyNavigation && (!event.target || $(event.target).parents(".umb-modalcolumn").size() == 0)) {
navigationService.hideNavigation();
angularHelper.safeApply($scope);
}

View File

@@ -21,7 +21,7 @@
<li class="help">
<a class="help" href="#/help">
<i class="icon-help-alt"></i>
<span>Help</span>
<span>{{currentSection}}</span>
</a>
</li>
</ul>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlCustom="private" cacheControlMode="UseMaxAge" cacheControlMaxAge="3.00:00:00" />
</staticContent>
</system.webServer>
</configuration>