Merge remote-tracking branch 'origin/7.0.0' into 7.0.0

This commit is contained in:
Shannon
2013-10-17 11:29:04 +11:00
31 changed files with 239 additions and 82 deletions

View File

@@ -7,7 +7,7 @@
* Used by editors that require naming an entity. Shows a textbox/headline with a required validator within it's own form.
**/
angular.module("umbraco.directives")
.directive('umbContentName', function ($timeout) {
.directive('umbContentName', function ($timeout, localizationService) {
return {
require: "ngModel",
restrict: 'E',
@@ -19,7 +19,13 @@ angular.module("umbraco.directives")
},
link: function(scope, element, attrs, ngModel) {
var inputElement = element.find("input");
var inputElement = element.find("input");
if(scope.placeholder && scope.placeholder[0] === "@"){
localizationService.localize(scope.placeholder.substring(1))
.then(function(value){
scope.placeholder = value;
});
}
ngModel.$render = function(){
$timeout(function(){

View File

@@ -4,8 +4,10 @@
**/
angular.module("umbraco.directives")
.directive('hotkey', function ($window, keyboardService, $log) {
return function (scope, el, attrs) {
var keyCombo = attrs["hotkey"];
keyboardService.bind(keyCombo, function() {
var element = $(el);
if(element.is("a,button,input[type='button'],input[type='submit']")){

View File

@@ -8,8 +8,9 @@ angular.module("umbraco.directives")
replace: true,
link: function (scope, element, attrs) {
var key = scope.key;
var value = localizationService.localize(key);
element.html(value);
localizationService.localize(key).then(function(value){
element.html(value);
});
}
};
})
@@ -19,26 +20,18 @@ angular.module("umbraco.directives")
link: function (scope, element, attrs) {
var keys = attrs.localize.split(',');
for (var i = keys.length - 1; i >= 0; i--) {
var attr = element.attr(keys[i]);
angular.forEach(keys, function(value, key){
var attr = element.attr(value);
if(attr){
var localizer = attr.split(':');
var tokens;
var key = localizer[0];
if(localizer.length > 0){
tokens = localizer[1].split(',');
for (var x = 0; x < tokens.length; x++) {
tokens[x] = scope.$eval(tokens[x]);
}
}
if(key[0] === '@'){
element.attr(keys[i], localizationService.localize(key.substring(1), tokens));
if(attr[0] === '@'){
var t = localizationService.tokenize(attr.substring(1), scope);
localizationService.localize(t.key, t.tokens).then(function(val){
element.attr(value, val);
});
}
}
}
});
}
};
});

View File

@@ -32,7 +32,7 @@ angular.module("umbraco.directives")
if(!hideheader){
template +='<div>' +
'<h5><a href="#/{{section}}" ng-click="select(this, tree.root, $event)" class="root-link">{{tree.name}}</a></h5>' +
'<h5><a href="#/{{section}}" ng-click="select(this, tree.root, $event)" on-right-click="altSelect(this, node, $event)" class="root-link">{{tree.name}}</a></h5>' +
'<a href class="umb-options" ng-hide="tree.root.isContainer || !tree.root.menuUrl" ng-click="options(this, tree.root, $event)" ng-swipe-right="options(this, tree.root, $event)"><i></i><i></i><i></i></a>' +
'</div>';
}
@@ -126,7 +126,10 @@ angular.module("umbraco.directives")
emitEvent("treeNodeSelect", { element: e, node: n, event: ev });
};
scope.altSelect = function(e,n,ev){
emitEvent("treeNodeAltSelect", { element: e, tree: scope.tree, node: n, event: ev });
};
//watch for section changes
scope.$watch("section", function (newVal, oldVal) {

View File

@@ -37,7 +37,7 @@ angular.module("umbraco.directives")
'<ins ng-hide="node.hasChildren" style="background:none;width:18px;"></ins>' +
'<ins ng-show="node.hasChildren" ng-class="{\'icon-navigation-right\': !node.expanded, \'icon-navigation-down\': node.expanded}" ng-click="load(this, node)"></ins>' +
'<i title="#{{node.routePath}}" class="{{node.cssClass}}" style="{{node.style}}"></i>' +
'<a href ng-click="select(this, node, $event)" >{{node.name}}</a>' +
'<a href ng-click="select(this, node, $event)" on-right-click="altSelect(this, node, $event)" >{{node.name}}</a>' +
'<a href class="umb-options" ng-hide="!node.menuUrl" ng-click="options(this, node, $event)"><i></i><i></i><i></i></a>' +
'<div ng-show="node.loading" class="l"><div></div></div>' +
'</div>' +
@@ -75,6 +75,16 @@ angular.module("umbraco.directives")
emitEvent("treeNodeSelect", { element: e, tree: scope.tree, node: n, event: ev });
};
/**
Method called when an item is right-clicked in the tree, this passes the
DOM element, the tree node object and the original click
and emits it as a treeNodeSelect element if there is a callback object
defined on the tree
*/
scope.altSelect = function(e,n,ev){
emitEvent("treeNodeAltSelect", { element: e, tree: scope.tree, node: n, event: ev });
};
/** method to set the current animation for the node.
* This changes dynamically based on if we are changing sections or just loading normal tree data.
* When changing sections we don't want all of the tree-ndoes to do their 'leave' animations.

View File

@@ -33,4 +33,17 @@ angular.module('umbraco.directives')
scope.$apply(attrs.onFocus);
});
};
})
.directive('onRightClick',function(){
document.oncontextmenu = function (e) {
if(e.target.hasAttribute('on-right-click')) {
return false;
}
};
return function(scope,el,attrs){
el.bind('contextmenu',function(e){
scope.$apply(attrs.onRightClick);
}) ;
};
});

View File

@@ -0,0 +1,15 @@
angular.module("umbraco.filters").filter('timespan', function() {
return function(input) {
var sec_num = parseInt(input, 10);
var hours = Math.floor(sec_num / 3600);
var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
var seconds = sec_num - (hours * 3600) - (minutes * 60);
if (hours < 10) {hours = "0"+hours;}
if (minutes < 10) {minutes = "0"+minutes;}
if (seconds < 10) {seconds = "0"+seconds;}
var time = hours+':'+minutes+':'+seconds;
return time;
};
});

View File

@@ -11,11 +11,20 @@ angular.module('umbraco.services')
'keyCode': false
};
var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0;
// Store all keyboard combination shortcuts
keyboardManagerService.keyboardEvent = {};
// Add a new keyboard combination shortcut
keyboardManagerService.bind = function (label, callback, opt) {
//replace ctrl key with meta key
if(isMac){
label = label.replace("ctrl","meta");
}
var fct, elt, code, k;
// Initialize opt object
opt = angular.extend({}, defaultOpt, opt);

View File

@@ -52,7 +52,7 @@ angular.module('umbraco.services')
if(value){
var localizer = value.split(':');
var retval = {tokens: undefined, key: localizer[0].substring(0)};
if(localizer.length > 0){
if(localizer.length > 1){
retval.tokens = localizer[1].split(',');
for (var x = 0; x < retval.tokens.length; x++) {
retval.tokens[x] = scope.$eval(retval.tokens[x]);
@@ -65,13 +65,19 @@ angular.module('umbraco.services')
// checks the dictionary for a localized resource string
localize: function(value,tokens) {
var deferred = $q.defer();
if(service.resourceFileLoaded){
return service._lookup(value,tokens);
var val = service._lookup(value,tokens);
deferred.resolve(val);
}else{
service.initLocalizedResources().then(function(dic){
return service._lookup(value,tokens);
var val = service._lookup(value,tokens);
deferred.resolve(val);
});
}
return deferred.promise;
},
_lookup: function(value,tokens){
var entry = service.dictionary[value];

View File

@@ -230,13 +230,14 @@ angular.module('umbraco.services')
return;
}
service.active = false;
$timeout(function(){
if(!service.active){
service.hideTree();
}
}, 300);
if(!service.touchDevice){
service.active = false;
$timeout(function(){
if(!service.active){
service.hideTree();
}
}, 300);
}
},
/**

View File

@@ -5,7 +5,7 @@
position: absolute;
top: 0px; bottom: 0px; left: 0px; right: 0px;}
.umb-panel-nobody{padding-top: 100px;}
.umb-panel-nobody{padding-top: 100px; overflow: auto;}
.umb-panel-header {
background: @grayLighter;
border-bottom: 1px solid @grayLight;

View File

@@ -154,6 +154,7 @@ a.umb-options {
position: absolute;
right: 0px;
top: 0px;
background: @grayLighter;
}
a.umb-options i {
@@ -162,8 +163,7 @@ a.umb-options i {
border-radius: 20px;
background: #333;
display: inline-block;
border: 3px solid @grayLighter;
margin: 10px -2px 0 0;
margin: 10px 2px 0 0;
}
li.root > div > a.umb-options {
@@ -174,8 +174,6 @@ li.root > div > a.umb-options {
.hide-header h5{display: none !important}
.umb-icon-item {
padding: 2px;
padding-left: 55px;
@@ -474,4 +472,10 @@ body.touch .umb-tree li div {
font-size: 110%;
}
body.touch .umb-actions a{
padding: 14px 25px 14px 20px;
font-size: 110%;
}
body.touch a.umb-options i {margin-top: 20px;}

View File

@@ -8,15 +8,17 @@
*
*/
function DashboardController($scope, $routeParams, dashboardResource) {
function DashboardController($scope, $routeParams, dashboardResource, localizationService) {
$scope.dashboard = {};
$scope.dashboard.name = $routeParams.section;
localizationService.localize("sections_" + $routeParams.section).then(function(name){
$scope.dashboard.name = name;
});
dashboardResource.getDashboard($scope.dashboard.name).then(function(tabs){
dashboardResource.getDashboard($routeParams.section).then(function(tabs){
$scope.dashboard.tabs = tabs;
});
}
//register it
angular.module('umbraco').controller("Umbraco.DashboardController", DashboardController);
angular.module('umbraco').controller("Umbraco.DashboardController", DashboardController);

View File

@@ -2,14 +2,17 @@
<div class="umb-panel-header">
<div class="umb-el-wrap umb-panel-buttons">
<div class="btn-toolbar umb-btn-toolbar">
<input type="button" ng-click="logout()" class="btn btn-warning" value="Log out" />
<button ng-click="logout()" class="btn btn-warning">
<localize key="general_logout">Log out</localize>
</button>
</div>
</div>
<h1 class="headline">{{user.name}}</h1>
<p class="muted">
<small>Session expires in {{user.remainingAuthSeconds | number:0}} seconds</small>
<small>
<localize key="user_sessionExpires" />: {{user.remainingAuthSeconds | timespan}}</small>
</p>
</div>
@@ -18,15 +21,17 @@
<div class="tab-content umb-control-group">
<div class="umb-pane">
<h5>Your profile</h5>
<h5><localize key="user_yourProfile" /></h5>
<p>
<a href="#/users/framed/%252Fumbraco%252Fusers%252Fedituser.aspx%253Fid%253D{{user.id}}" class="btn btn-primary">Edit your profile</a>
<a href="#/users/framed/%252Fumbraco%252Fusers%252Fedituser.aspx%253Fid%253D{{user.id}}" class="btn btn-primary">
<localize key="general_edit">Edit</localize>
</a>
</p>
</div>
<div class="umb-pane">
<h5>Your recent history</h5>
<h5><localize key="user_yourHistory" /></h5>
<ul class="umb-tree">
<li ng-repeat="item in history | orderBy:'time'">
<a ng-href="{{item.link}}" ng-click="gotoHistory(item.link)" prevent-default>

View File

@@ -14,6 +14,7 @@ function MainController($scope, $location, $routeParams, $rootScope, $timeout, $
//detect if the current device is touch-enabled
$scope.touchDevice = ("ontouchstart" in window || window.touch || window.navigator.msMaxTouchPoints===5 || window.DocumentTouch && document instanceof DocumentTouch);
//$scope.touchDevice = true;
navigationService.touchDevice = $scope.touchDevice;
//the null is important because we do an explicit bool check on this in the view

View File

@@ -59,6 +59,18 @@ function NavigationController($scope,$rootScope, $location, $log, $routeParams,
navigationService.showMenu(ev, args);
});
$scope.treeEventHandler.bind("treeNodeAltSelect", function (ev, args) {
ev.stopPropagation();
ev.preventDefault();
$scope.currentNode = args.node;
args.scope = $scope;
args.skipDefault = true;
navigationService.showMenu(ev, args);
});
//this reacts to the options item in the tree
$scope.searchShowMenu = function (ev, args) {
@@ -79,7 +91,10 @@ function NavigationController($scope,$rootScope, $location, $log, $routeParams,
var n = args.node;
//here we need to check for some legacy tree code
/*if(n.metaData && n.metaData.application){
$location.path(n.metaData.application).search("");
}else*/
if (n.metaData && n.metaData["jsClickCallback"] && angular.isString(n.metaData["jsClickCallback"]) && n.metaData["jsClickCallback"] !== "") {
//this is a legacy tree node!
var jsPrefix = "javascript:";
@@ -106,10 +121,13 @@ function NavigationController($scope,$rootScope, $location, $log, $routeParams,
historyService.add({ name: n.name, link: n.routePath, icon: n.icon });
//not legacy, lets just set the route value and clear the query string if there is one.
$location.path(n.routePath).search("");
}else if(n.metaData && n.metaData.application){
$location.path("#/" + n.metaData.application);
}
navigationService.hideNavigation();
});
/** Opens a dialog but passes in this scope instance to be used for the dialog */
$scope.openDialog = function (currentNode, action, currentSection) {

View File

@@ -1,7 +1,7 @@
<div class="umb-dialog-body with-footer" ng-controller="Umbraco.Editors.Content.CreateController">
<div class="umb-pane">
<h5><localize key="create_createunder">Create a page under</localize> {{currentNode.name}}</h5>
<h5><localize key="create_createUnder">Create a page under</localize> {{currentNode.name}}</h5>
<ul class="umb-actions umb-actions-child">
<li ng-repeat="docType in allowedTypes">

View File

@@ -8,7 +8,7 @@
<div class="span4">
<umb-content-name
placeholder="Enter a name..."
placeholder="@placeholders_name"
ng-model="content.name"></umb-content-name>
</div>

View File

@@ -17,7 +17,8 @@
id="search-field"
ng-model="nav.ui.searchTerm"
class="umb-search-field search-query"
placeholder="Type to search..."
localize="placeholder"
placeholder="@placeholders_search"
on-blur="deActivateSearch()"
on-keyup="performSearch(nav.ui.searchTerm)">
</form>
@@ -31,7 +32,7 @@
<ul class="umb-tree">
<li class="root">
<div>
<h5>Search results</h5>
<h5><localize key="general_searchResults">Search results</localize></h5>
</div>
<ul class="umb-search-group" ng-repeat="resultGroup in nav.ui.search.results">

View File

@@ -28,7 +28,7 @@
<li class="help">
<a class="help" ng-click="helpClick()" prevent-default>
<i class="icon-help-alt"></i>
<span>Help</span>
<span><localize key="sections_help">Help</localize></span>
</a>
</li>
</ul>

View File

@@ -1,7 +1,7 @@
<div class="umb-dialog-body with-footer" ng-controller="Umbraco.Editors.Media.CreateController">
<div class="umb-pane">
<h5>Create media under {{currentNode.name}}</h5>
<h5><localize key="create_createUnder">Create under</localize> {{currentNode.name}}</h5>
<ul class="umb-actions">
<li class="action">
<ul class="umb-actions-child">
@@ -39,5 +39,7 @@
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<button class="btn" ng-click="nav.hideDialog()">Do something else</button>
<button class="btn" ng-click="nav.hideDialog()">
<localize key="buttons_somethingElse">Do something else</localize>
</button>
</div>

View File

@@ -7,8 +7,8 @@
<umb-header tabs="content.tabs">
<div class="span4">
<umb-content-name
placeholder="Enter a name..."
<umb-content-name
placeholder="@placeholders_name"
ng-model="content.name"></umb-content-name>
</div>
@@ -19,7 +19,9 @@
</div>
<div class="btn-group">
<button type="submit" data-hotkey="ctrl+s" class="btn btn-success">Save</button>
<button type="submit" data-hotkey="ctrl+s" class="btn btn-success">
<localize key="buttons_save">Save</localize>
</button>
</div>
</div>
</div>

View File

@@ -13,7 +13,7 @@
<ul class="unstyled">
<li>
<a href="#" ng-click="openContentPicker()" prevent-default>
<i class="icon icon-add"></i> Add
<i class="icon icon-add"></i> <localize key="general_add">Add</localize>
</a>
</li>
</ul>

View File

@@ -202,7 +202,7 @@ angular.module("umbraco")
};
if ($routeParams.id) {
$scope.pagination = new Array(100);
$scope.pagination = new Array(10);
$scope.listViewAllowedTypes = contentTypeResource.getAllowedTypes($routeParams.id);
$scope.reloadView($routeParams.id);

View File

@@ -5,7 +5,7 @@
<div class="btn-group" ng-show="listViewAllowedTypes">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
Create
<localize key="actions_create">Create</localize>
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
@@ -21,13 +21,18 @@
<div class="btn-group" ng-show="isAnythingSelected()">
<a class="btn btn-success" ng-disabled="actionInProgress" ng-click="publish()" prevent-default>Publish</a>
<a class="btn btn-success" ng-disabled="actionInProgress" ng-click="publish()" prevent-default>
<localize key="actions_publish">Publish</localize></a>
</div>
<div class="btn-group" ng-show="isAnythingSelected()">
<a class="btn btn-warning" ng-disabled="actionInProgress" ng-click="unpublish()" prevent-default>Unpublish</a>
<a class="btn btn-warning" ng-disabled="actionInProgress" ng-click="unpublish()" prevent-default>
<localize key="actions_unpublish">Unpublish</localize>
</a>
</div>
<div class="btn-group" ng-show="isAnythingSelected()">
<a class="btn btn-danger" ng-disabled="actionInProgress" ng-click="delete()" prevent-default>Delete</a>
<a class="btn btn-danger" ng-disabled="actionInProgress" ng-click="delete()" prevent-default>
<localize key="actions_delete">Delete</localize>
</a>
</div>
<span ng-bind="bulkStatus" ng-show="isAnythingSelected()"></span>
</div>
@@ -36,9 +41,15 @@
<thead>
<tr>
<td with="20"><input type="checkbox" ng-click="selectAll($event)" ng-checked="isSelectedAll()"></td>
<td><a href="#" ng-click="sort('Name')" prevent-default>Name <i class="icon-sort"></i></a></td>
<td><a href="#" ng-click="sort('UpdateDate')" prevent-default>Last updated <i class="icon-sort"></i></a></td>
<td><a href="#" ng-click="sort('Owner')" prevent-default>Editor <i class="icon-sort"></i></a></td>
<td><a href="#" ng-click="sort('Name')" prevent-default>
<localize key="general_name">Name</localize>
<i class="icon-sort"></i></a></td>
<td><a href="#" ng-click="sort('UpdateDate')" prevent-default>
<localize key="defaultdialogs_lastEdited">Last edited</localize>
<i class="icon-sort"></i></a></td>
<td><a href="#" ng-click="sort('Owner')" prevent-default>
<localize key="content_updatedBy">Updated by</localize>
<i class="icon-sort"></i></a></td>
<td with="20"><form class="pull-right" novalidate>
<i class="icon-search"></i>
<input type="text" ng-model="options.filter" on-keyup="reloadView(contentId)">
@@ -72,14 +83,16 @@
</div>
<div class="pagination pagination-right">
<ul>
<li><a href="#" ng-click="prev()" prevent-default>Prev</a></li>
<li><a href="#" ng-click="prev()" prevent-default><localize key="general_previous">Previous</localize></a></li>
<li ng-repeat="pgn in pagination track by $index"
ng-class="{active:$index==options.offset}">
<a href="#" ng-click="goToPage($index)" prevent-default>{{$index + 1}}</a>
</li>
<li><a href="#" ng-click="next()" prevent-default>Next</a></li>
<li><a href="#" ng-click="next()" prevent-default>
<localize key="general_next">Next</localize>
</a></li>
</ul>
</div>

View File

@@ -14,7 +14,7 @@
<ul class="unstyled">
<li>
<a href="#" ng-click="openMemberPicker()" prevent-default>
<i class="icon icon-add"></i> Add
<i class="icon icon-add"></i> <localize key="general_add">Add</localize>
</a>
</li>
</ul>

View File

@@ -1,4 +1,3 @@
<div class="umb-editor umb-templatepicker">
<h5>TODO: Implement this picker</h5>
<div ng-model="model.value">{{model.value | json}}</div>
</div>

View File

@@ -67,6 +67,16 @@
<area alias="auditTrails">
<key alias="atViewingFor">Viewing for</key>
</area>
<area alias="placeholders">
<key alias="username">Enter your username</key>
<key alias="password">Enter your password</key>
<key alias="name">Enter a name...</key>
<key alias="search">Type to search...</key>
<key alias="filter">Type to filter...</key>
</area>
<area alias="buttons">
<key alias="select">Select</key>
<key alias="somethingElse">Do something else</key>
@@ -124,6 +134,7 @@
<key alias="alternativeUrls">Alternative Links</key>
<key alias="clickToEdit">Click to edit this item</key>
<key alias="createBy">Created by</key>
<key alias="updatedBy" version="7.0">Updated by</key>
<key alias="createDate">Created</key>
<key alias="documentType">Document Type</key>
<key alias="editing">Editing</key>
@@ -372,6 +383,8 @@
<key alias="width">Width</key>
<key alias="yes">Yes</key>
<key alias="folder">Folder</key>
<key alias="searchResults">Search results</key>
</area>
<area alias="graphicheadline">
<key alias="backgroundcolor">Background color</key>
@@ -511,8 +524,17 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="renewSession">Renew now to save your work</key>
</area>
<area alias="login">
<key alias="greeting1">Happy super sunday</key>
<key alias="greeting2">Happy manic monday </key>
<key alias="greeting3">Happy tremendous tuesday</key>
<key alias="greeting4">Happy wonderfull wednesday</key>
<key alias="greeting5">Happy thunder thursday</key>
<key alias="greeting6">Happy friendly friday</key>
<key alias="greeting7">Happy shiny saturday</key>
<key alias="instruction">log in below:</key>
<key alias="bottomText"><![CDATA[<p style="text-align:right;">&copy; 2001 - %0% <br /><a href="http://umbraco.org" style="text-decoration: none" target="_blank">umbraco.org</a></p> ]]></key>
<key alias="topText">Welcome to umbraco, type your username and password in the boxes below:</key>
</area>
<area alias="main">
<key alias="dashboard">Dashboard</key>
@@ -696,6 +718,8 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="translation">Translation</key>
<key alias="users">Users</key>
<key alias="contour" version="4.0">Umbraco Contour</key>
<key alias="help" version="7.0">Help</key>
</area>
<area alias="settings">
<key alias="defaulttemplate">Default template</key>
@@ -943,5 +967,9 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="usertype">User type</key>
<key alias="userTypes">User types</key>
<key alias="writer">Writer</key>
<key alias="yourProfile" version="7.0">Your profile</key>
<key alias="yourHistory" version="7.0">Your recent history</key>
<key alias="sessionExpires" version="7.0">Session expires in</key>
</area>
</language>
</language>

View File

@@ -53,6 +53,14 @@
<area alias="auditTrails">
<key alias="atViewingFor">Viewing for</key>
</area>
<area alias="placeholders">
<key alias="username">Enter your username</key>
<key alias="password">Enter your password</key>
<key alias="search">Type to search</key>
<key alias="filter">Type to filter</key>
</area>
<area alias="buttons">
<key alias="bold">Bold</key>
<key alias="deindent">Cancel Paragraph Indent</key>
@@ -536,9 +544,21 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="lockoutWillOccur">You've been idle and logout will automatically occur in</key>
<key alias="renewSession">Renew now to save your work</key>
</area>
<area alias="login">
<key alias="greeting1">Happy super sunday</key>
<key alias="greeting2">Happy manic monday </key>
<key alias="greeting3">Happy tremendous tuesday</key>
<key alias="greeting4">Happy wonderfull wednesday</key>
<key alias="greeting5">Happy thunder thursday</key>
<key alias="greeting6">Happy friendly friday</key>
<key alias="greeting7">Happy shiny saturday</key>
<key alias="topText">log in below:</key>
<key alias="bottomText"><![CDATA[<p style="text-align:right;">&copy; 2001 - %0% <br /><a href="http://umbraco.org" style="text-decoration: none" target="_blank">umbraco.org</a></p> ]]></key>
<key alias="topText">Welcome to umbraco, type your username and password in the boxes below:</key>
</area>
<area alias="main">
<key alias="dashboard">Dashboard</key>

View File

@@ -1935,7 +1935,9 @@
<Content Include="umbraco.presentation\umbraco\developer\Xslt\getXsltStatus.asmx" />
<Content Include="umbraco.presentation\umbraco\developer\Xslt\xsltChooseExtension.aspx" />
<Content Include="umbraco.presentation\umbraco\developer\Xslt\xsltInsertValueOf.aspx" />
<Content Include="umbraco.presentation\umbraco\js\language.aspx" />
<Content Include="umbraco.presentation\umbraco\js\language.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\members\EditMember.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>

View File

@@ -6,16 +6,18 @@ using umbraco.BusinessLogic;
namespace umbraco.js
{
public partial class language : UmbracoEnsuredPage
public partial class language : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "application/json";
User u = base.getUser();
if(u == null)
return;
string lang = u.Language;
XmlDocument all = ui.getLanguageFile(lang);
string lang = "en";
if(ValidateCurrentUser()){
lang = UmbracoUser.Language;
}
XmlDocument all = ui.getLanguageFile(lang);
if(all == null)
return;