summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-30 21:49:28 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-30 21:49:28 +0200
commitb483f2aab856e3324026588a9702043072fd7ad2 (patch)
tree9a5696d43ae53160bee592e1b6874185cbd98ad4 /core
parentcbaf858dea0f2094805edb6aa223bdd6877fff5b (diff)
parent598815b21e94219eb66684c64802e165a35180ad (diff)
downloadnextcloud-server-b483f2aab856e3324026588a9702043072fd7ad2.tar.gz
nextcloud-server-b483f2aab856e3324026588a9702043072fd7ad2.zip
Merge branch 'master' into routing
Conflicts: apps/contacts/js/contacts.js apps/contacts/lib/search.php apps/files_archive/js/archive.js apps/gallery/lib/tiles.php apps/gallery/templates/index.php lib/ocs.php
Diffstat (limited to 'core')
-rw-r--r--core/ajax/share.php15
-rw-r--r--core/css/share.css4
-rw-r--r--core/css/styles.css2
-rw-r--r--core/js/LICENSE.jquery.inview41
-rw-r--r--core/js/jquery.inview.js134
-rw-r--r--core/js/jquery.inview.txt15
-rw-r--r--core/js/js.js19
-rw-r--r--core/js/share.js119
-rw-r--r--core/l10n/hi.php14
-rw-r--r--core/l10n/id.php17
-rw-r--r--core/l10n/it.php4
-rw-r--r--core/l10n/nb_NO.php1
-rw-r--r--core/templates/layout.base.php37
13 files changed, 352 insertions, 70 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 806ca9fb98f..debdf612c0e 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -26,8 +26,12 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
case 'share':
if (isset($_POST['shareType']) && isset($_POST['shareWith']) && isset($_POST['permissions'])) {
try {
- OCP\Share::shareItem($_POST['itemType'], $_POST['itemSource'], (int)$_POST['shareType'], $_POST['shareWith'], $_POST['permissions']);
- // TODO May need to return private link
+ if ((int)$_POST['shareType'] === OCP\Share::SHARE_TYPE_LINK && $_POST['shareWith'] == '') {
+ $shareWith = null;
+ } else {
+ $shareWith = $_POST['shareWith'];
+ }
+ OCP\Share::shareItem($_POST['itemType'], $_POST['itemSource'], (int)$_POST['shareType'], $shareWith, $_POST['permissions']);
OC_JSON::success();
} catch (Exception $exception) {
OC_JSON::error(array('data' => array('message' => $exception->getMessage())));
@@ -36,7 +40,12 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
break;
case 'unshare':
if (isset($_POST['shareType']) && isset($_POST['shareWith'])) {
- $return = OCP\Share::unshare($_POST['itemType'], $_POST['itemSource'], $_POST['shareType'], $_POST['shareWith']);
+ if ((int)$_POST['shareType'] === OCP\Share::SHARE_TYPE_LINK && $_POST['shareWith'] == '') {
+ $shareWith = null;
+ } else {
+ $shareWith = $_POST['shareWith'];
+ }
+ $return = OCP\Share::unshare($_POST['itemType'], $_POST['itemSource'], $_POST['shareType'], $shareWith);
($return) ? OC_JSON::success() : OC_JSON::error();
}
break;
diff --git a/core/css/share.css b/core/css/share.css
index e4b4870dd16..abaeb07dd8a 100644
--- a/core/css/share.css
+++ b/core/css/share.css
@@ -15,4 +15,6 @@ a.showCruds { display:inline; opacity:.5; }
a.showCruds:hover { opacity:1; }
a.unshare { float:right; display:inline; padding:.3em 0 0 .3em !important; opacity:.5; }
a.unshare:hover { opacity:1; }
-#privateLink { border-top:1px solid #ddd; padding-top:0.5em; } \ No newline at end of file
+#link { border-top:1px solid #ddd; padding-top:0.5em; }
+input[type="text"], input[type="password"] { width:90%; }
+#linkText, #linkPass { display:none; }
diff --git a/core/css/styles.css b/core/css/styles.css
index dd6f9d4675d..488ac48e4b4 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -95,7 +95,7 @@ label.infield { cursor: text !important; }
/* NAVIGATION ------------------------------------------------------------- */
#navigation { position:fixed; top:3.5em; float:left; width:12.5em; padding:0; z-index:75; height:100%; background:#eee; border-right: 1px #ccc solid; -moz-box-shadow: -3px 0 7px #000; -webkit-box-shadow: -3px 0 7px #000; box-shadow: -3px 0 7px #000; overflow:hidden;}
-#navigation a { display:block; padding:.6em .5em .4em 2.5em; background:#eee 1em center no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; -webkit-transition:background 300ms; -moz-transition:background 300ms; -o-transition:background 300ms; transition:background 300ms; }
+#navigation a { display:block; padding:.6em .5em .4em 2.5em; background:#eee 1em center no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; }
#navigation a.active, #navigation a:hover, #navigation a:focus { background-color:#dbdbdb; border-top:1px solid #d4d4d4; border-bottom:1px solid #ccc; color:#333; }
#navigation a.active { background-color:#ddd; }
#navigation #settings { position:absolute; bottom:3.5em; width:100%; }
diff --git a/core/js/LICENSE.jquery.inview b/core/js/LICENSE.jquery.inview
new file mode 100644
index 00000000000..1ed340edbe5
--- /dev/null
+++ b/core/js/LICENSE.jquery.inview
@@ -0,0 +1,41 @@
+Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales
+
+http://creativecommons.org/licenses/by-nc-sa/2.0/uk/
+
+You are free:
+
+ * to copy, distribute, display, and perform the work
+ * to make derivative works
+
+
+Under the following conditions:
+
+ * Attribution — You must give the original author credit.
+ Attribute this work:
+ Information
+ What does "Attribute this work" mean?
+ The page you came from contained embedded licensing metadata,
+ including how the creator wishes to be attributed for re-use.
+ You can use the HTML here to cite the work. Doing so will
+ also include metadata on your page so that others can find the
+ original work as well.
+
+ * Non-Commercial — You may not use this work for commercial
+ purposes.
+ * Share Alike — If you alter, transform, or build upon this
+ work, you may distribute the resulting work only under a
+ licence identical to this one.
+
+With the understanding that:
+
+ * Waiver — Any of the above conditions can be waived if you get
+ permission from the copyright holder.
+ * Other Rights — In no way are any of the following rights
+ affected by the license:
+ o Your fair dealing or fair use rights;
+ o The author's moral rights;
+ o Rights other persons may have either in the work itself
+ or in how the work is used, such as publicity or privacy rights.
+ * Notice — For any reuse or distribution, you must make clear to
+ others the licence terms of this work.
+
diff --git a/core/js/jquery.inview.js b/core/js/jquery.inview.js
new file mode 100644
index 00000000000..9687cd83368
--- /dev/null
+++ b/core/js/jquery.inview.js
@@ -0,0 +1,134 @@
+/**
+ * author Christopher Blum
+ * - based on the idea of Remy Sharp, http://remysharp.com/2009/01/26/element-in-view-event-plugin/
+ * - forked from http://github.com/zuk/jquery.inview/
+ */
+(function ($) {
+ var inviewObjects = {}, viewportSize, viewportOffset,
+ d = document, w = window, documentElement = d.documentElement, expando = $.expando, isFiring = false, $elements = {};
+
+ $.event.special.inview = {
+ add: function(data) {
+ var inviewObject = { data: data, $element: $(this) }
+ inviewObjects[data.guid + "-" + this[expando]] = inviewObject;
+ var selector = inviewObject.data.selector,
+ $element = inviewObject.$element;
+ var hash = parseInt(getHash( data.guid + this[expando]));
+ $elements[hash] = selector ? $element.find(selector) : $element;
+ },
+
+ remove: function(data) {
+ try { delete inviewObjects[data.guid + "-" + this[expando]]; } catch(e) {}
+ try {
+ var hash = parseInt(getHash(data.guid + this[expando]));
+ delete($elements[hash]);
+ } catch (e){}
+ }
+ };
+
+
+ function getHash(str){
+ str = str+'';
+ var hash = 0;
+ if (str.length == 0) return hash;
+ for (i = 0; i < str.length; i++) {
+ char = str.charCodeAt(i);
+ hash = ((hash<<5)-hash)+char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return Math.abs(hash);
+ }
+
+ function getViewportSize() {
+ var mode, domObject, size = { height: w.innerHeight, width: w.innerWidth };
+
+ // if this is correct then return it. iPad has compat Mode, so will
+ // go into check clientHeight/clientWidth (which has the wrong value).
+ if (!size.height) {
+ mode = d.compatMode;
+ if (mode || !$.support.boxModel) { // IE, Gecko
+ domObject = mode === 'CSS1Compat' ?
+ documentElement : // Standards
+ d.body; // Quirks
+ size = {
+ height: domObject.clientHeight,
+ width: domObject.clientWidth
+ };
+ }
+ }
+
+ return size;
+ }
+
+ function getViewportOffset() {
+ return {
+ top: w.pageYOffset || documentElement.scrollTop || (d.body?d.body.scrollTop:0),
+ left: w.pageXOffset || documentElement.scrollLeft || (d.body?d.body.scrollLeft:0)
+ };
+ }
+
+ function checkInView() {
+ if (isFiring){
+ return;
+ }
+ isFiring = true;
+ viewportSize = viewportSize || getViewportSize();
+ viewportOffset = viewportOffset || getViewportOffset();
+
+ for (var i in $elements) {
+ if (isNaN(parseInt(i))) {
+ continue;
+ }
+
+ var $element = $($elements[i]),
+ elementSize = { height: $element.height(), width: $element.width() },
+ elementOffset = $element.offset(),
+ inView = $element.data('inview'),
+ visiblePartX,
+ visiblePartY,
+ visiblePartsMerged;
+
+ // Don't ask me why because I haven't figured out yet:
+ // viewportOffset and viewportSize are sometimes suddenly null in Firefox 5.
+ // Even though it sounds weird:
+ // It seems that the execution of this function is interferred by the onresize/onscroll event
+ // where viewportOffset and viewportSize are unset
+ if (!viewportOffset || !viewportSize) {
+ isFiring = false;
+ return;
+ }
+
+ if (elementOffset.top + elementSize.height > viewportOffset.top &&
+ elementOffset.top < viewportOffset.top + viewportSize.height &&
+ elementOffset.left + elementSize.width > viewportOffset.left &&
+ elementOffset.left < viewportOffset.left + viewportSize.width) {
+ visiblePartX = (viewportOffset.left > elementOffset.left ?
+ 'right' : (viewportOffset.left + viewportSize.width) < (elementOffset.left + elementSize.width) ?
+ 'left' : 'both');
+ visiblePartY = (viewportOffset.top > elementOffset.top ?
+ 'bottom' : (viewportOffset.top + viewportSize.height) < (elementOffset.top + elementSize.height) ?
+ 'top' : 'both');
+ visiblePartsMerged = visiblePartX + "-" + visiblePartY;
+ if (!inView || inView !== visiblePartsMerged) {
+ $element.data('inview', visiblePartsMerged).trigger('inview', [true, visiblePartX, visiblePartY]);
+ }
+ } else if (inView) {
+ $element.data('inview', false).trigger('inview', [false]);
+ }
+ }
+ isFiring = false;
+ }
+
+ $(w).bind("scroll resize", function() {
+ viewportSize = viewportOffset = null;
+ });
+
+ // Use setInterval in order to also make sure this captures elements within
+ // "overflow:scroll" elements or elements that appeared in the dom tree due to
+ // dom manipulation and reflow
+ // old: $(window).scroll(checkInView);
+ //
+ // By the way, iOS (iPad, iPhone, ...) seems to not execute, or at least delays
+ // intervals while the user scrolls. Therefore the inview event might fire a bit late there
+ setInterval(checkInView, 250);
+})(jQuery); \ No newline at end of file
diff --git a/core/js/jquery.inview.txt b/core/js/jquery.inview.txt
new file mode 100644
index 00000000000..c53dbd1d97c
--- /dev/null
+++ b/core/js/jquery.inview.txt
@@ -0,0 +1,15 @@
+jQuery.inview is licensed Attribution-Non-Commercial-Share Alike 2.0 but the
+conditions has been waived by the author in the following tweet:
+
+https://twitter.com/#!/ChristopherBlum/status/148382899887013888
+
+Saying:
+
+Thomas Tanghus @tanghus 18 Dec. 2011
+
+@ChristopherBlum Hi. Is it OK if I use https://github.com/protonet/jquery.inview in ownCloud? Preferably under an AGPL license ;-) owncloud.org
+
+
+Christopher Blum Christopher Blum @ChristopherBlum 18 Dec. 2011
+
+@tanghus Feel free to! :)
diff --git a/core/js/js.js b/core/js/js.js
index e50b407bacf..f1ed6070c32 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -29,6 +29,16 @@ function t(app,text){
}
t.cache={};
+/**
+* Get the path to download a file
+* @param file The filename
+* @param dir The directory the file is in - e.g. $('#dir').val()
+* @return string
+*/
+function fileDownloadPath(dir, file) {
+ return OC.filePath('files', 'ajax', 'download.php')+encodeURIComponent('?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir));
+}
+
OC={
webroot:oc_webroot,
appswebroots:oc_appswebroots,
@@ -110,18 +120,19 @@ OC={
*/
addScript:function(app,script,ready){
var path=OC.filePath(app,'js',script+'.js');
- if(OC.addScript.loaded.indexOf(path)==-1){
- OC.addScript.loaded.push(path);
+ if(!OC.addScript.loaded[path]){
if(ready){
- $.getScript(path,ready);
+ var deferred=$.getScript(path,ready);
}else{
- $.getScript(path);
+ var deferred=$.getScript(path);
}
+ OC.addScript.loaded[path]=deferred;
}else{
if(ready){
ready();
}
}
+ return OC.addScript.loaded[path];
},
/**
* load a css file and load it
diff --git a/core/js/share.js b/core/js/share.js
index 3db69dc6901..8bfbdd36e19 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -1,7 +1,7 @@
OC.Share={
SHARE_TYPE_USER:0,
SHARE_TYPE_GROUP:1,
- SHARE_TYPE_PRIVATE_LINK:3,
+ SHARE_TYPE_LINK:3,
SHARE_TYPE_EMAIL:4,
PERMISSION_CREATE:4,
PERMISSION_READ:1,
@@ -118,7 +118,7 @@ OC.Share={
}
});
},
- showDropDown:function(itemType, itemSource, appendTo, privateLink, possiblePermissions) {
+ showDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions) {
var data = OC.Share.loadItem(itemType, itemSource);
var html = '<div id="dropdown" class="drop" data-item-type="'+itemType+'" data-item-source="'+itemSource+'">';
if (data.reshare) {
@@ -130,14 +130,19 @@ OC.Share={
html += '<br />';
}
if (possiblePermissions & OC.Share.PERMISSION_SHARE) {
- html += '<input id="shareWith" type="text" placeholder="Share with" style="width:90%;"/>';
+ html += '<input id="shareWith" type="text" placeholder="Share with" />';
html += '<ul id="shareWithList">';
html += '</ul>';
- if (privateLink) {
- html += '<div id="privateLink">';
- html += '<input type="checkbox" name="privateLinkCheckbox" id="privateLinkCheckbox" value="1" /><label for="privateLinkCheckbox">Share with private link</label>';
+ if (link) {
+ html += '<div id="link">';
+ html += '<input type="checkbox" name="linkCheckbox" id="linkCheckbox" value="1" /><label for="linkCheckbox">Share with link</label>';
+ // TODO Change to lock/unlock icon?
+ html += '<a href="#" id="showPassword" style="display:none;"><img class="svg" alt="Password protect" src="'+OC.imagePath('core', 'actions/triangle-n')+'"/></a>';
html += '<br />';
- html += '<input id="privateLinkText" style="display:none; width:90%;" readonly="readonly" />';
+ html += '<input id="linkText" type="text" readonly="readonly" />';
+ html += '<div id="linkPass">';
+ html += '<input id="linkPassText" type="password" placeholder="Password" />';
+ html += '</div>'
html += '</div>';
}
html += '</div>';
@@ -146,8 +151,8 @@ OC.Share={
OC.Share.itemShares = [];
if (data.shares) {
$.each(data.shares, function(index, share) {
- if (share.share_type == OC.Share.SHARE_TYPE_PRIVATE_LINK) {
- OC.Share.showPrivateLink(item, share.share_with);
+ if (share.share_type == OC.Share.SHARE_TYPE_LINK) {
+ OC.Share.showLink(itemSource, share.share_with);
} else {
OC.Share.addShareWith(share.share_type, share.share_with, share.permissions, possiblePermissions);
}
@@ -264,36 +269,28 @@ OC.Share={
$(html).appendTo('#shareWithList');
},
- showPrivateLink:function(item, token) {
- $('#privateLinkCheckbox').attr('checked', true);
- var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&token='+token;
- if (token.indexOf('&path=') == -1) {
- link += '&file=' + encodeURIComponent(item).replace(/%2F/g, '/');
+ showLink:function(itemSource, password) {
+ $('#linkCheckbox').attr('checked', true);
+ var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file');
+ if ($('#dir').val() == '/') {
+ var file = $('#dir').val() + filename;
} else {
- // Disable checkbox if inside a shared parent folder
- $('#privateLinkCheckbox').attr('disabled', 'true');
+ var file = $('#dir').val() + '/' + filename;
+ }
+ file = '/'+OC.currentUser+'/files'+file;
+ var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&file='+file;
+ $('#linkText').val(link);
+ $('#linkText').show('blind');
+ $('#showPassword').show();
+ if (password.length > 0) {
+ $('#linkPass').show('blind');
+ $('#linkPassText').attr('placeholder', 'Password protected');
}
- $('#privateLinkText').val(link);
- $('#privateLinkText').show('blind', function() {
- $('#privateLinkText').after('<br id="emailBreak" />');
- $('#email').show();
- $('#emailButton').show();
- });
- },
- hidePrivateLink:function() {
- $('#privateLinkText').hide('blind');
- $('#emailBreak').remove();
- $('#email').hide();
- $('#emailButton').hide();
},
- emailPrivateLink:function() {
- var link = $('#privateLinkText').val();
- var file = link.substr(link.lastIndexOf('/') + 1).replace(/%20/g, ' ');
- $.post(OC.filePath('files_sharing', 'ajax', 'email.php'), { toaddress: $('#email').val(), link: link, file: file } );
- $('#email').css('font-weight', 'bold');
- $('#email').animate({ fontWeight: 'normal' }, 2000, function() {
- $(this).val('');
- }).val('Email sent');
+ hideLink:function() {
+ $('#linkText').hide('blind');
+ $('#showPassword').hide();
+ $('#linkPass').hide();
},
dirname:function(path) {
return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, '');
@@ -308,21 +305,21 @@ $(document).ready(function() {
var itemType = $(this).data('item-type');
var itemSource = $(this).data('item');
var appendTo = $(this).parent().parent();
- var privateLink = false;
+ var link = false;
var possiblePermissions = $(this).data('possible-permissions');
- if ($(this).data('private-link') !== undefined && $(this).data('private-link') == true) {
- privateLink = true;
+ if ($(this).data('link') !== undefined && $(this).data('link') == true) {
+ link = true;
}
if (OC.Share.droppedDown) {
if (itemSource != $('#dropdown').data('item')) {
OC.Share.hideDropDown(function () {
- OC.Share.showDropDown(itemType, itemSource, appendTo, privateLink, possiblePermissions);
+ OC.Share.showDropDown(itemType, itemSource, appendTo, link, possiblePermissions);
});
} else {
OC.Share.hideDropDown();
}
} else {
- OC.Share.showDropDown(itemType, itemSource, appendTo, privateLink, possiblePermissions);
+ OC.Share.showDropDown(itemType, itemSource, appendTo, link, possiblePermissions);
}
}
});
@@ -396,36 +393,40 @@ $(document).ready(function() {
OC.Share.setPermissions($('#dropdown').data('item-type'), $('#dropdown').data('item-source'), $(li).data('share-type'), $(li).data('share-with'), permissions);
});
- $('#privateLinkCheckbox').live('change', function() {
+ $('#linkCheckbox').live('change', function() {
var itemType = $('#dropdown').data('item-type');
- var item = $('#dropdown').data('item');
+ var itemSource = $('#dropdown').data('item-source');
if (this.checked) {
- // Create a private link
- OC.Share.share(itemType, item, OC.Share.SHARE_TYPE_PRIVATE_LINK, 0, 0, function(token) {
- OC.Share.showPrivateLink(item, 'foo');
- // Change icon
- OC.Share.icons[item] = OC.imagePath('core', 'actions/public');
+ // Create a link
+ OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', OC.Share.PERMISSION_READ, function() {
+ OC.Share.showLink(itemSource);
+ // TODO Change icon
});
} else {
// Delete private link
- OC.Share.unshare(item, 'public', function() {
- OC.Share.hidePrivateLink();
- // Change icon
- if (OC.Share.itemUsers || OC.Share.itemGroups) {
- OC.Share.icons[item] = OC.imagePath('core', 'actions/shared');
- } else {
- OC.Share.icons[item] = OC.imagePath('core', 'actions/share');
- }
+ OC.Share.unshare(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', function() {
+ OC.Share.hideLink();
});
}
});
- $('#privateLinkText').live('click', function() {
+ $('#linkText').live('click', function() {
$(this).focus();
$(this).select();
});
- $('#emailPrivateLink').live('submit', function() {
- OC.Share.emailPrivateLink();
+ $('#showPassword').live('click', function() {
+ $('#linkPass').toggle('blind');
+ });
+
+ $('#linkPassText').live('keyup', function(event) {
+ if (event.keyCode == 13) {
+ var itemType = $('#dropdown').data('item-type');
+ var itemSource = $('#dropdown').data('item-source');
+ OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, $(this).val(), OC.Share.PERMISSION_READ, function() {
+ $('#linkPassText').val('');
+ $('#linkPassText').attr('placeholder', 'Password protected');
+ });
+ }
});
});
diff --git a/core/l10n/hi.php b/core/l10n/hi.php
new file mode 100644
index 00000000000..cc9cbdb22f3
--- /dev/null
+++ b/core/l10n/hi.php
@@ -0,0 +1,14 @@
+<?php $TRANSLATIONS = array(
+"Username" => "प्रयोक्ता का नाम",
+"Cloud not found" => "क्लौड नहीं मिला ",
+"Create an <strong>admin account</strong>" => "व्यवस्थापक खाता बनाएँ",
+"Password" => "पासवर्ड",
+"Advanced" => "उन्नत",
+"Configure the database" => "डेटाबेस कॉन्फ़िगर करें ",
+"Database user" => "डेटाबेस उपयोगकर्ता",
+"Database password" => "डेटाबेस पासवर्ड",
+"Finish setup" => "सेटअप समाप्त करे",
+"You are logged out." => "आप लोग आउट कर दिए गए हैं.",
+"prev" => "पिछला",
+"next" => "अगला"
+);
diff --git a/core/l10n/id.php b/core/l10n/id.php
index 296e2d62a4a..47758f8861b 100644
--- a/core/l10n/id.php
+++ b/core/l10n/id.php
@@ -3,6 +3,23 @@
"No category to add?" => "Tidak ada kategori yang akan ditambahkan?",
"This category already exists: " => "Kategori ini sudah ada:",
"Settings" => "Setelan",
+"January" => "Januari",
+"February" => "Februari",
+"March" => "Maret",
+"April" => "April",
+"May" => "Mei",
+"June" => "Juni",
+"July" => "Juli",
+"August" => "Agustus",
+"September" => "September",
+"October" => "Oktober",
+"November" => "Nopember",
+"December" => "Desember",
+"Cancel" => "Batalkan",
+"No" => "Tidak",
+"Yes" => "Ya",
+"Ok" => "Oke",
+"No categories selected for deletion." => "Tidak ada kategori terpilih untuk penghapusan.",
"ownCloud password reset" => "reset password ownCloud",
"Use the following link to reset your password: {link}" => "Gunakan tautan berikut untuk mereset password anda: {link}",
"You will receive a link to reset your password via Email." => "Anda akan mendapatkan link untuk mereset password anda lewat Email.",
diff --git a/core/l10n/it.php b/core/l10n/it.php
index 1c0bf94ca71..ca80770a3c5 100644
--- a/core/l10n/it.php
+++ b/core/l10n/it.php
@@ -39,7 +39,7 @@
"Admin" => "Admin",
"Help" => "Aiuto",
"Access forbidden" => "Accesso negato",
-"Cloud not found" => "Cloud non trovata",
+"Cloud not found" => "Nuvola non trovata",
"Edit categories" => "Modifica le categorie",
"Add" => "Aggiungi",
"Create an <strong>admin account</strong>" => "Crea un <strong>account amministratore</strong>",
@@ -47,7 +47,7 @@
"Advanced" => "Avanzate",
"Data folder" => "Cartella dati",
"Configure the database" => "Configura il database",
-"will be used" => "sarà usato",
+"will be used" => "sarà utilizzato",
"Database user" => "Utente del database",
"Database password" => "Password del database",
"Database name" => "Nome del database",
diff --git a/core/l10n/nb_NO.php b/core/l10n/nb_NO.php
index a8bfebb8a55..d30823b59f2 100644
--- a/core/l10n/nb_NO.php
+++ b/core/l10n/nb_NO.php
@@ -2,6 +2,7 @@
"Application name not provided." => "Applikasjonsnavn ikke angitt.",
"No category to add?" => "Ingen kategorier å legge til?",
"This category already exists: " => "Denne kategorien finnes allerede:",
+"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=",
"Settings" => "Innstillinger",
"January" => "Januar",
"February" => "Februar",
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
new file mode 100644
index 00000000000..bfd23a9ce97
--- /dev/null
+++ b/core/templates/layout.base.php
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>ownCloud</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
+ <?php if (!empty(OC_Util::$core_styles)): ?>
+ <link rel="stylesheet" href="<?php echo OC_Helper::linkToRemote('core.css', false) ?>" type="text/css" media="screen" />
+ <?php endif ?>
+ <?php foreach ($_['cssfiles'] as $cssfile): ?>
+ <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
+ <?php endforeach; ?>
+ <script type="text/javascript">
+ var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
+ var oc_appswebroots = <?php echo $_['apps_paths'] ?>;
+ </script>
+ <?php if (!empty(OC_Util::$core_scripts)): ?>
+ <script type="text/javascript" src="<?php echo OC_Helper::linkToRemote('core.js', false) ?>"></script>
+ <?php endif ?>
+ <?php foreach ($_['jsfiles'] as $jsfile): ?>
+ <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
+ <?php endforeach; ?>
+ <?php foreach ($_['headers'] as $header): ?>
+ <?php
+ echo '<'.$header['tag'].' ';
+ foreach ($header['attributes'] as $name => $value) {
+ echo "$name='$value' ";
+ };
+ echo '/>';
+ ?>
+ <?php endforeach; ?>
+ </head>
+
+ <body>
+ <?php echo $_['content']; ?>
+ </body>
+</html>