diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/css/header.css | 6 | ||||
-rw-r--r-- | core/css/styles.css | 6 | ||||
-rwxr-xr-x | core/js/snap.js | 1349 | ||||
-rw-r--r-- | core/l10n/ast.php | 1 | ||||
-rw-r--r-- | core/l10n/ca.php | 1 | ||||
-rw-r--r-- | core/l10n/cs_CZ.php | 1 | ||||
-rw-r--r-- | core/l10n/da.php | 1 | ||||
-rw-r--r-- | core/l10n/de.php | 1 | ||||
-rw-r--r-- | core/l10n/de_DE.php | 1 | ||||
-rw-r--r-- | core/l10n/el.php | 1 | ||||
-rw-r--r-- | core/l10n/en_GB.php | 1 | ||||
-rw-r--r-- | core/l10n/es.php | 1 | ||||
-rw-r--r-- | core/l10n/et_EE.php | 1 | ||||
-rw-r--r-- | core/l10n/eu.php | 1 | ||||
-rw-r--r-- | core/l10n/fi_FI.php | 1 | ||||
-rw-r--r-- | core/l10n/fr.php | 1 | ||||
-rw-r--r-- | core/l10n/gl.php | 1 | ||||
-rw-r--r-- | core/l10n/hu_HU.php | 1 | ||||
-rw-r--r-- | core/l10n/it.php | 1 | ||||
-rw-r--r-- | core/l10n/ja.php | 1 | ||||
-rw-r--r-- | core/l10n/nb_NO.php | 1 | ||||
-rw-r--r-- | core/l10n/nl.php | 1 | ||||
-rw-r--r-- | core/l10n/pl.php | 3 | ||||
-rw-r--r-- | core/l10n/pt_BR.php | 1 | ||||
-rw-r--r-- | core/l10n/pt_PT.php | 1 | ||||
-rw-r--r-- | core/l10n/ru.php | 1 | ||||
-rw-r--r-- | core/l10n/sk_SK.php | 1 | ||||
-rw-r--r-- | core/l10n/sl.php | 1 | ||||
-rw-r--r-- | core/l10n/sv.php | 1 | ||||
-rw-r--r-- | core/l10n/tr.php | 1 | ||||
-rw-r--r-- | core/l10n/ur_PK.php | 1 | ||||
-rw-r--r-- | core/l10n/zh_CN.php | 20 | ||||
-rw-r--r-- | core/setup/controller.php | 2 |
33 files changed, 815 insertions, 598 deletions
diff --git a/core/css/header.css b/core/css/header.css index 91dfeb798a5..86db48a3f08 100644 --- a/core/css/header.css +++ b/core/css/header.css @@ -241,20 +241,26 @@ float: left; display: inline-block; margin-right: 5px; + cursor: pointer; } #header .avatardiv img { opacity: 1; + cursor: pointer; } #settings { float: right; color: #bbb; + cursor: pointer; } #expand { display: block; padding: 7px 12px 6px 7px; cursor: pointer; } +#expand * { + cursor: pointer; +} #expand:hover, #expand:focus, #expand:active { color:#fff; } #expand img { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70); opacity:.7; margin-bottom:-2px; } #expand:hover img, #expand:focus img, #expand:active img { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; } diff --git a/core/css/styles.css b/core/css/styles.css index d959aec0361..78b9b930f35 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -420,13 +420,13 @@ input[name='password-clone'] { #password-icon { position: absolute; left: 16px; - top: 20px; + top: 22px; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; filter: alpha(opacity=30); opacity: .3; } #adminpass-icon, #password-icon { - top: 15px; + top: 17px; } /* General new input field look */ @@ -474,10 +474,10 @@ label.infield { #body-login form input[type="checkbox"]+label { position: relative; margin: 0; - font-size: 13px; padding: 14px; padding-left: 28px; margin-left: -28px; + vertical-align: middle; } #body-login form .errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 2em; padding:1em; } #body-login .success { background:#d7fed7; border:1px solid #0f0; width: 35%; margin: 30px auto; padding:1em; text-align: center;} diff --git a/core/js/snap.js b/core/js/snap.js index 0bbefe44203..19942e866a9 100755 --- a/core/js/snap.js +++ b/core/js/snap.js @@ -1,568 +1,785 @@ -/* - * Snap.js - * - * Copyright 2013, Jacob Kelley - http://jakiestfu.com/ - * Released under the MIT Licence - * http://opensource.org/licenses/MIT - * - * Github: http://github.com/jakiestfu/Snap.js/ - * Version: 1.9.3 - */ -/*jslint browser: true*/ -/*global define, module, ender*/ +/*! Snap.js v2.0.0-rc1 */ (function(win, doc) { - 'use strict'; - var Snap = Snap || function(userOpts) { - var settings = { - element: null, - dragger: null, - disable: 'none', - addBodyClasses: true, - hyperextensible: true, - resistance: 0.5, - flickThreshold: 50, - transitionSpeed: 0.3, - easing: 'ease', - maxPosition: 266, - minPosition: -266, - tapToClose: true, - touchToDrag: true, - slideIntent: 40, // degrees - minDragDistance: 5 - }, - cache = { - simpleStates: { - opening: null, - towards: null, - hyperExtending: null, - halfway: null, - flick: null, - translation: { - absolute: 0, - relative: 0, - sinceDirectionChange: 0, - percentage: 0 - } - } - }, - eventList = {}, - utils = { - hasTouch: ('ontouchstart' in doc.documentElement || win.navigator.msPointerEnabled), - eventType: function(action) { - var eventTypes = { - down: (utils.hasTouch ? 'touchstart' : 'mousedown'), - move: (utils.hasTouch ? 'touchmove' : 'mousemove'), - up: (utils.hasTouch ? 'touchend' : 'mouseup'), - out: (utils.hasTouch ? 'touchcancel' : 'mouseout') - }; - return eventTypes[action]; - }, - page: function(t, e){ - return (utils.hasTouch && e.touches.length && e.touches[0]) ? e.touches[0]['page'+t] : e['page'+t]; - }, - klass: { - has: function(el, name){ - return (el.className).indexOf(name) !== -1; - }, - add: function(el, name){ - if(!utils.klass.has(el, name) && settings.addBodyClasses){ - el.className += " "+name; - } - }, - remove: function(el, name){ - if(settings.addBodyClasses){ - el.className = (el.className).replace(name, "").replace(/^\s+|\s+$/g, ''); - } - } - }, - dispatchEvent: function(type) { - if (typeof eventList[type] === 'function') { - return eventList[type].call(); - } - }, - vendor: function(){ - var tmp = doc.createElement("div"), - prefixes = 'webkit Moz O ms'.split(' '), - i; - for (i in prefixes) { - if (typeof tmp.style[prefixes[i] + 'Transition'] !== 'undefined') { - return prefixes[i]; - } - } - }, - transitionCallback: function(){ - return (cache.vendor==='Moz' || cache.vendor==='ms') ? 'transitionend' : cache.vendor+'TransitionEnd'; - }, - canTransform: function(){ - return typeof settings.element.style[cache.vendor+'Transform'] !== 'undefined'; - }, - deepExtend: function(destination, source) { - var property; - for (property in source) { - if (source[property] && source[property].constructor && source[property].constructor === Object) { - destination[property] = destination[property] || {}; - utils.deepExtend(destination[property], source[property]); - } else { - destination[property] = source[property]; - } - } - return destination; - }, - angleOfDrag: function(x, y) { - var degrees, theta; - // Calc Theta - theta = Math.atan2(-(cache.startDragY - y), (cache.startDragX - x)); - if (theta < 0) { - theta += 2 * Math.PI; - } - // Calc Degrees - degrees = Math.floor(theta * (180 / Math.PI) - 180); - if (degrees < 0 && degrees > -180) { - degrees = 360 - Math.abs(degrees); - } - return Math.abs(degrees); - }, - events: { - addEvent: function addEvent(element, eventName, func) { - if (element.addEventListener) { - return element.addEventListener(eventName, func, false); - } else if (element.attachEvent) { - return element.attachEvent("on" + eventName, func); - } - }, - removeEvent: function addEvent(element, eventName, func) { - if (element.addEventListener) { - return element.removeEventListener(eventName, func, false); - } else if (element.attachEvent) { - return element.detachEvent("on" + eventName, func); - } - }, - prevent: function(e) { - if (e.preventDefault) { - e.preventDefault(); - } else { - e.returnValue = false; - } - } - }, - parentUntil: function(el, attr) { - var isStr = typeof attr === 'string'; - while (el.parentNode) { - if (isStr && el.getAttribute && el.getAttribute(attr)){ - return el; - } else if(!isStr && el === attr){ - return el; - } - el = el.parentNode; - } - return null; - } - }, - action = { - translate: { - get: { - matrix: function(index) { - - if( !utils.canTransform() ){ - return parseInt(settings.element.style.left, 10); - } else { - var matrix = win.getComputedStyle(settings.element)[cache.vendor+'Transform'].match(/\((.*)\)/), - ieOffset = 8; - if (matrix) { - matrix = matrix[1].split(','); - if(matrix.length===16){ - index+=ieOffset; - } - return parseInt(matrix[index], 10); - } - return 0; - } - } - }, - easeCallback: function(){ - settings.element.style[cache.vendor+'Transition'] = ''; - cache.translation = action.translate.get.matrix(4); - cache.easing = false; - clearInterval(cache.animatingInterval); - - if(cache.easingTo===0){ - utils.klass.remove(doc.body, 'snapjs-right'); - utils.klass.remove(doc.body, 'snapjs-left'); - } - - utils.dispatchEvent('animated'); - utils.events.removeEvent(settings.element, utils.transitionCallback(), action.translate.easeCallback); - }, - easeTo: function(n) { - - if( !utils.canTransform() ){ - cache.translation = n; - action.translate.x(n); - } else { - cache.easing = true; - cache.easingTo = n; - - settings.element.style[cache.vendor+'Transition'] = 'all ' + settings.transitionSpeed + 's ' + settings.easing; - - cache.animatingInterval = setInterval(function() { - utils.dispatchEvent('animating'); - }, 1); - - utils.events.addEvent(settings.element, utils.transitionCallback(), action.translate.easeCallback); - action.translate.x(n); - } - if(n===0){ - settings.element.style[cache.vendor+'Transform'] = ''; - } - }, - x: function(n) { - if( (settings.disable==='left' && n>0) || - (settings.disable==='right' && n<0) - ){ return; } - - if( !settings.hyperextensible ){ - if( n===settings.maxPosition || n>settings.maxPosition ){ - n=settings.maxPosition; - } else if( n===settings.minPosition || n<settings.minPosition ){ - n=settings.minPosition; - } - } - - n = parseInt(n, 10); - if(isNaN(n)){ - n = 0; - } - - if( utils.canTransform() ){ - var theTranslate = 'translate3d(' + n + 'px, 0,0)'; - settings.element.style[cache.vendor+'Transform'] = theTranslate; - } else { - settings.element.style.width = (win.innerWidth || doc.documentElement.clientWidth)+'px'; - - settings.element.style.left = n+'px'; - settings.element.style.right = ''; - } - } - }, - drag: { - listen: function() { - cache.translation = 0; - cache.easing = false; - utils.events.addEvent(settings.element, utils.eventType('down'), action.drag.startDrag); - utils.events.addEvent(settings.element, utils.eventType('move'), action.drag.dragging); - utils.events.addEvent(settings.element, utils.eventType('up'), action.drag.endDrag); - }, - stopListening: function() { - utils.events.removeEvent(settings.element, utils.eventType('down'), action.drag.startDrag); - utils.events.removeEvent(settings.element, utils.eventType('move'), action.drag.dragging); - utils.events.removeEvent(settings.element, utils.eventType('up'), action.drag.endDrag); - }, - startDrag: function(e) { - // No drag on ignored elements - var target = e.target ? e.target : e.srcElement, - ignoreParent = utils.parentUntil(target, 'data-snap-ignore'); - - if (ignoreParent) { - utils.dispatchEvent('ignore'); - return; - } - - - if(settings.dragger){ - var dragParent = utils.parentUntil(target, settings.dragger); - - // Only use dragger if we're in a closed state - if( !dragParent && - (cache.translation !== settings.minPosition && - cache.translation !== settings.maxPosition - )){ - return; - } - } - - utils.dispatchEvent('start'); - settings.element.style[cache.vendor+'Transition'] = ''; - cache.isDragging = true; - cache.hasIntent = null; - cache.intentChecked = false; - cache.startDragX = utils.page('X', e); - cache.startDragY = utils.page('Y', e); - cache.dragWatchers = { - current: 0, - last: 0, - hold: 0, - state: '' - }; - cache.simpleStates = { - opening: null, - towards: null, - hyperExtending: null, - halfway: null, - flick: null, - translation: { - absolute: 0, - relative: 0, - sinceDirectionChange: 0, - percentage: 0 - } - }; - }, - dragging: function(e) { - if (cache.isDragging && settings.touchToDrag) { - - var thePageX = utils.page('X', e), - thePageY = utils.page('Y', e), - translated = cache.translation, - absoluteTranslation = action.translate.get.matrix(4), - whileDragX = thePageX - cache.startDragX, - openingLeft = absoluteTranslation > 0, - translateTo = whileDragX, - diff; - - // Shown no intent already - if((cache.intentChecked && !cache.hasIntent)){ - return; - } - - if(settings.addBodyClasses){ - if((absoluteTranslation)>0){ - utils.klass.add(doc.body, 'snapjs-left'); - utils.klass.remove(doc.body, 'snapjs-right'); - } else if((absoluteTranslation)<0){ - utils.klass.add(doc.body, 'snapjs-right'); - utils.klass.remove(doc.body, 'snapjs-left'); - } - } - - if (cache.hasIntent === false || cache.hasIntent === null) { - var deg = utils.angleOfDrag(thePageX, thePageY), - inRightRange = (deg >= 0 && deg <= settings.slideIntent) || (deg <= 360 && deg > (360 - settings.slideIntent)), - inLeftRange = (deg >= 180 && deg <= (180 + settings.slideIntent)) || (deg <= 180 && deg >= (180 - settings.slideIntent)); - if (!inLeftRange && !inRightRange) { - cache.hasIntent = false; - } else { - cache.hasIntent = true; - } - cache.intentChecked = true; - } - - if ( - (settings.minDragDistance>=Math.abs(thePageX-cache.startDragX)) || // Has user met minimum drag distance? - (cache.hasIntent === false) - ) { - return; - } - - utils.events.prevent(e); - utils.dispatchEvent('drag'); - - cache.dragWatchers.current = thePageX; - // Determine which direction we are going - if (cache.dragWatchers.last > thePageX) { - if (cache.dragWatchers.state !== 'left') { - cache.dragWatchers.state = 'left'; - cache.dragWatchers.hold = thePageX; - } - cache.dragWatchers.last = thePageX; - } else if (cache.dragWatchers.last < thePageX) { - if (cache.dragWatchers.state !== 'right') { - cache.dragWatchers.state = 'right'; - cache.dragWatchers.hold = thePageX; - } - cache.dragWatchers.last = thePageX; - } - if (openingLeft) { - // Pulling too far to the right - if (settings.maxPosition < absoluteTranslation) { - diff = (absoluteTranslation - settings.maxPosition) * settings.resistance; - translateTo = whileDragX - diff; - } - cache.simpleStates = { - opening: 'left', - towards: cache.dragWatchers.state, - hyperExtending: settings.maxPosition < absoluteTranslation, - halfway: absoluteTranslation > (settings.maxPosition / 2), - flick: Math.abs(cache.dragWatchers.current - cache.dragWatchers.hold) > settings.flickThreshold, - translation: { - absolute: absoluteTranslation, - relative: whileDragX, - sinceDirectionChange: (cache.dragWatchers.current - cache.dragWatchers.hold), - percentage: (absoluteTranslation/settings.maxPosition)*100 - } - }; - } else { - // Pulling too far to the left - if (settings.minPosition > absoluteTranslation) { - diff = (absoluteTranslation - settings.minPosition) * settings.resistance; - translateTo = whileDragX - diff; - } - cache.simpleStates = { - opening: 'right', - towards: cache.dragWatchers.state, - hyperExtending: settings.minPosition > absoluteTranslation, - halfway: absoluteTranslation < (settings.minPosition / 2), - flick: Math.abs(cache.dragWatchers.current - cache.dragWatchers.hold) > settings.flickThreshold, - translation: { - absolute: absoluteTranslation, - relative: whileDragX, - sinceDirectionChange: (cache.dragWatchers.current - cache.dragWatchers.hold), - percentage: (absoluteTranslation/settings.minPosition)*100 - } - }; - } - action.translate.x(translateTo + translated); - } - }, - endDrag: function(e) { - if (cache.isDragging) { - utils.dispatchEvent('end'); - var translated = action.translate.get.matrix(4); - - // Tap Close - if (cache.dragWatchers.current === 0 && translated !== 0 && settings.tapToClose) { - utils.dispatchEvent('close'); - utils.events.prevent(e); - action.translate.easeTo(0); - cache.isDragging = false; - cache.startDragX = 0; - return; - } - - // Revealing Left - if (cache.simpleStates.opening === 'left') { - // Halfway, Flicking, or Too Far Out - if ((cache.simpleStates.halfway || cache.simpleStates.hyperExtending || cache.simpleStates.flick)) { - if (cache.simpleStates.flick && cache.simpleStates.towards === 'left') { // Flicking Closed - action.translate.easeTo(0); - } else if ( - (cache.simpleStates.flick && cache.simpleStates.towards === 'right') || // Flicking Open OR - (cache.simpleStates.halfway || cache.simpleStates.hyperExtending) // At least halfway open OR hyperextending - ) { - action.translate.easeTo(settings.maxPosition); // Open Left - } - } else { - action.translate.easeTo(0); // Close Left - } - // Revealing Right - } else if (cache.simpleStates.opening === 'right') { - // Halfway, Flicking, or Too Far Out - if ((cache.simpleStates.halfway || cache.simpleStates.hyperExtending || cache.simpleStates.flick)) { - if (cache.simpleStates.flick && cache.simpleStates.towards === 'right') { // Flicking Closed - action.translate.easeTo(0); - } else if ( - (cache.simpleStates.flick && cache.simpleStates.towards === 'left') || // Flicking Open OR - (cache.simpleStates.halfway || cache.simpleStates.hyperExtending) // At least halfway open OR hyperextending - ) { - action.translate.easeTo(settings.minPosition); // Open Right - } - } else { - action.translate.easeTo(0); // Close Right - } - } - cache.isDragging = false; - cache.startDragX = utils.page('X', e); - } - } - } - }, - init = function(opts) { - if (opts.element) { - utils.deepExtend(settings, opts); - cache.vendor = utils.vendor(); - action.drag.listen(); - } - }; - /* - * Public - */ - this.open = function(side) { - utils.dispatchEvent('open'); - utils.klass.remove(doc.body, 'snapjs-expand-left'); - utils.klass.remove(doc.body, 'snapjs-expand-right'); - - if (side === 'left') { - cache.simpleStates.opening = 'left'; - cache.simpleStates.towards = 'right'; - utils.klass.add(doc.body, 'snapjs-left'); - utils.klass.remove(doc.body, 'snapjs-right'); - action.translate.easeTo(settings.maxPosition); - } else if (side === 'right') { - cache.simpleStates.opening = 'right'; - cache.simpleStates.towards = 'left'; - utils.klass.remove(doc.body, 'snapjs-left'); - utils.klass.add(doc.body, 'snapjs-right'); - action.translate.easeTo(settings.minPosition); - } - }; - this.close = function() { - utils.dispatchEvent('close'); - action.translate.easeTo(0); - }; - this.expand = function(side){ - var to = win.innerWidth || doc.documentElement.clientWidth; - - if(side==='left'){ - utils.dispatchEvent('expandLeft'); - utils.klass.add(doc.body, 'snapjs-expand-left'); - utils.klass.remove(doc.body, 'snapjs-expand-right'); - } else { - utils.dispatchEvent('expandRight'); - utils.klass.add(doc.body, 'snapjs-expand-right'); - utils.klass.remove(doc.body, 'snapjs-expand-left'); - to *= -1; - } - action.translate.easeTo(to); - }; - - this.on = function(evt, fn) { - eventList[evt] = fn; - return this; - }; - this.off = function(evt) { - if (eventList[evt]) { - eventList[evt] = false; - } - }; - - this.enable = function() { - utils.dispatchEvent('enable'); - action.drag.listen(); - }; - this.disable = function() { - utils.dispatchEvent('disable'); - action.drag.stopListening(); - }; - - this.settings = function(opts){ - utils.deepExtend(settings, opts); - }; - - this.state = function() { - var state, - fromLeft = action.translate.get.matrix(4); - if (fromLeft === settings.maxPosition) { - state = 'left'; - } else if (fromLeft === settings.minPosition) { - state = 'right'; - } else { - state = 'closed'; - } - return { - state: state, - info: cache.simpleStates - }; - }; - init(userOpts); - }; - if ((typeof module !== 'undefined') && module.exports) { - module.exports = Snap; - } - if (typeof ender === 'undefined') { - this.Snap = Snap; - } - if ((typeof define === "function") && define.amd) { - define("snap", [], function() { - return Snap; - }); - } + + 'use strict'; + + // Our export + var Namespace = 'Snap'; + + // Our main toolbelt + var utils = { + + /** + * Deeply extends two objects + * @param {Object} destination The destination object + * @param {Object} source The custom options to extend destination by + * @return {Object} The desination object + */ + extend: function(destination, source) { + var property; + for (property in source) { + if (source[property] && source[property].constructor && source[property].constructor === Object) { + destination[property] = destination[property] || {}; + utils.extend(destination[property], source[property]); + } else { + destination[property] = source[property]; + } + } + return destination; + } + }; + + /** + * Our Snap global that initializes our instance + * @param {Object} opts The custom Snap.js options + */ + var Core = function( opts ) { + + var self = this; + + /** + * Our default settings for a Snap instance + * @type {Object} + */ + var settings = self.settings = { + element: null, + dragger: null, + disable: 'none', + addBodyClasses: true, + hyperextensible: true, + resistance: 0.5, + flickThreshold: 50, + transitionSpeed: 0.3, + easing: 'ease', + maxPosition: 266, + minPosition: -266, + tapToClose: true, + touchToDrag: true, + clickToDrag: true, + slideIntent: 40, // degrees + minDragDistance: 5 + }; + + /** + * Stores internally global data + * @type {Object} + */ + var cache = self.cache = { + isDragging: false, + simpleStates: { + opening: null, + towards: null, + hyperExtending: null, + halfway: null, + flick: null, + translation: { + absolute: 0, + relative: 0, + sinceDirectionChange: 0, + percentage: 0 + } + } + }; + + var eventList = self.eventList = {}; + + utils.extend(utils, { + + /** + * Determines if we are interacting with a touch device + * @type {Boolean} + */ + hasTouch: ('ontouchstart' in doc.documentElement || win.navigator.msPointerEnabled), + + /** + * Returns the appropriate event type based on whether we are a touch device or not + * @param {String} action The "action" event you're looking for: up, down, move, out + * @return {String} The browsers supported event name + */ + eventType: function(action) { + var eventTypes = { + down: (utils.hasTouch ? 'touchstart' : settings.clickToDrag ? 'mousedown' : ''), + move: (utils.hasTouch ? 'touchmove' : settings.clickToDrag ? 'mousemove' : ''), + up: (utils.hasTouch ? 'touchend' : settings.clickToDrag ? 'mouseup': ''), + out: (utils.hasTouch ? 'touchcancel' : settings.clickToDrag ? 'mouseout' : '') + }; + return eventTypes[action]; + }, + + /** + * Returns the correct "cursor" position on both browser and mobile + * @param {String} t The coordinate to retrieve, either "X" or "Y" + * @param {Object} e The event object being triggered + * @return {Number} The desired coordiante for the events interaction + */ + page: function(t, e){ + return (utils.hasTouch && e.touches.length && e.touches[0]) ? e.touches[0]['page'+t] : e['page'+t]; + }, + + + klass: { + + /** + * Checks if an element has a class name + * @param {Object} el The element to check + * @param {String} name The class name to search for + * @return {Boolean} Returns true if the class exists + */ + has: function(el, name){ + return (el.className).indexOf(name) !== -1; + }, + + /** + * Adds a class name to an element + * @param {Object} el The element to add to + * @param {String} name The class name to add + */ + add: function(el, name){ + if(!utils.klass.has(el, name) && settings.addBodyClasses){ + el.className += " "+name; + } + }, + + /** + * Removes a class name + * @param {Object} el The element to remove from + * @param {String} name The class name to remove + */ + remove: function(el, name){ + if(utils.klass.has(el, name) && settings.addBodyClasses){ + el.className = (el.className).replace(name, "").replace(/^\s+|\s+$/g, ''); + } + } + }, + + /** + * Dispatch a custom Snap.js event + * @param {String} type The event name + */ + dispatchEvent: function(type) { + if( typeof eventList[type] === 'function') { + return eventList[type].apply(); + } + }, + + /** + * Determines the browsers vendor prefix for CSS3 + * @return {String} The browsers vendor prefix + */ + vendor: function(){ + var tmp = doc.createElement("div"), + prefixes = 'webkit Moz O ms'.split(' '), + i; + for (i in prefixes) { + if (typeof tmp.style[prefixes[i] + 'Transition'] !== 'undefined') { + return prefixes[i]; + } + } + }, + + /** + * Determines the browsers vendor prefix for transition callback events + * @return {String} The event name + */ + transitionCallback: function(){ + return (cache.vendor==='Moz' || cache.vendor==='ms') ? 'transitionend' : cache.vendor+'TransitionEnd'; + }, + + /** + * Determines if the users browser supports CSS3 transformations + * @return {[type]} [description] + */ + canTransform: function(){ + return typeof settings.element.style[cache.vendor+'Transform'] !== 'undefined'; + }, + + /** + * Determines an angle between two points + * @param {Number} x The X coordinate + * @param {Number} y The Y coordinate + * @return {Number} The number of degrees between the two points + */ + angleOfDrag: function(x, y) { + var degrees, theta; + // Calc Theta + theta = Math.atan2(-(cache.startDragY - y), (cache.startDragX - x)); + if (theta < 0) { + theta += 2 * Math.PI; + } + // Calc Degrees + degrees = Math.floor(theta * (180 / Math.PI) - 180); + if (degrees < 0 && degrees > -180) { + degrees = 360 - Math.abs(degrees); + } + return Math.abs(degrees); + }, + + + events: { + + /** + * Adds an event to an element + * @param {Object} element Element to add event to + * @param {String} eventName The event name + * @param {Function} func Callback function + */ + addEvent: function addEvent(element, eventName, func) { + if (element.addEventListener) { + return element.addEventListener(eventName, func, false); + } else if (element.attachEvent) { + return element.attachEvent("on" + eventName, func); + } + }, + + /** + * Removes an event to an element + * @param {Object} element Element to remove event from + * @param {String} eventName The event name + * @param {Function} func Callback function + */ + removeEvent: function addEvent(element, eventName, func) { + if (element.addEventListener) { + return element.removeEventListener(eventName, func, false); + } else if (element.attachEvent) { + return element.detachEvent("on" + eventName, func); + } + }, + + /** + * Prevents the default event + * @param {Object} e The event object + */ + prevent: function(e) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + } + }, + + /** + * Searches the parent element until a specified attribute has been matched + * @param {Object} el The element to search from + * @param {String} attr The attribute to search for + * @return {Object|null} Returns a matched element if it exists, else, null + */ + parentUntil: function(el, attr) { + var isStr = typeof attr === 'string'; + while (el.parentNode) { + if (isStr && el.getAttribute && el.getAttribute(attr)){ + return el; + } else if(!isStr && el === attr){ + return el; + } + el = el.parentNode; + } + return null; + } + }); + + + var action = self.action = { + + /** + * Handles translating the elements position + * @type {Object} + */ + translate: { + get: { + + /** + * Returns the amount an element is translated + * @param {Number} index The index desired from the CSS3 values of translate3d + * @return {Number} The amount of pixels an element is translated + */ + matrix: function(index) { + + if( !cache.canTransform ){ + return parseInt(settings.element.style.left, 10); + } else { + var matrix = win.getComputedStyle(settings.element)[cache.vendor+'Transform'].match(/\((.*)\)/), + ieOffset = 8; + if (matrix) { + matrix = matrix[1].split(','); + + // Internet Explorer likes to give us 16 fucking values + if(matrix.length===16){ + index+=ieOffset; + } + return parseInt(matrix[index], 10); + } + return 0; + } + } + }, + + /** + * Called when the element has finished transitioning + */ + easeCallback: function(fn){ + settings.element.style[cache.vendor+'Transition'] = ''; + cache.translation = action.translate.get.matrix(4); + cache.easing = false; + + if(cache.easingTo===0){ + utils.klass.remove(doc.body, 'snapjs-right'); + utils.klass.remove(doc.body, 'snapjs-left'); + } + + if( cache.once ){ + cache.once.call(self, self.state()); + delete cache.once; + } + + utils.dispatchEvent('animated'); + utils.events.removeEvent(settings.element, utils.transitionCallback(), action.translate.easeCallback); + + }, + + /** + * Animates the pane by the specified amount of pixels + * @param {Number} n The amount of pixels to move the pane + */ + easeTo: function(n, cb) { + + if( !cache.canTransform ){ + cache.translation = n; + action.translate.x(n); + } else { + cache.easing = true; + cache.easingTo = n; + + settings.element.style[cache.vendor+'Transition'] = 'all ' + settings.transitionSpeed + 's ' + settings.easing; + + cache.once = cb; + + utils.events.addEvent(settings.element, utils.transitionCallback(), action.translate.easeCallback); + action.translate.x(n); + } + if(n===0){ + settings.element.style[cache.vendor+'Transform'] = ''; + } + }, + + /** + * Immediately translates the element on its X axis + * @param {Number} n Amount of pixels to translate + */ + x: function(n) { + if( (settings.disable==='left' && n>0) || + (settings.disable==='right' && n<0) + ){ return; } + + if( !settings.hyperextensible ){ + if( n===settings.maxPosition || n>settings.maxPosition ){ + n=settings.maxPosition; + } else if( n===settings.minPosition || n<settings.minPosition ){ + n=settings.minPosition; + } + } + + n = parseInt(n, 10); + if(isNaN(n)){ + n = 0; + } + + if( cache.canTransform ){ + var theTranslate = 'translate3d(' + n + 'px, 0,0)'; + settings.element.style[cache.vendor+'Transform'] = theTranslate; + } else { + settings.element.style.width = (win.innerWidth || doc.documentElement.clientWidth)+'px'; + + settings.element.style.left = n+'px'; + settings.element.style.right = ''; + } + } + }, + + /** + * Handles all the events that interface with dragging + * @type {Object} + */ + drag: { + + /** + * Begins listening for drag events on our element + */ + listen: function() { + cache.translation = 0; + cache.easing = false; + utils.events.addEvent(self.settings.element, utils.eventType('down'), action.drag.startDrag); + utils.events.addEvent(self.settings.element, utils.eventType('move'), action.drag.dragging); + utils.events.addEvent(self.settings.element, utils.eventType('up'), action.drag.endDrag); + }, + + /** + * Stops listening for drag events on our element + */ + stopListening: function() { + utils.events.removeEvent(settings.element, utils.eventType('down'), action.drag.startDrag); + utils.events.removeEvent(settings.element, utils.eventType('move'), action.drag.dragging); + utils.events.removeEvent(settings.element, utils.eventType('up'), action.drag.endDrag); + }, + + /** + * Fired immediately when the user begins to drag the content pane + * @param {Object} e Event object + */ + startDrag: function(e) { + // No drag on ignored elements + var target = e.target ? e.target : e.srcElement, + ignoreParent = utils.parentUntil(target, 'data-snap-ignore'); + + if (ignoreParent) { + utils.dispatchEvent('ignore'); + return; + } + + + if(settings.dragger){ + var dragParent = utils.parentUntil(target, settings.dragger); + + // Only use dragger if we're in a closed state + if( !dragParent && + (cache.translation !== settings.minPosition && + cache.translation !== settings.maxPosition + )){ + return; + } + } + + utils.dispatchEvent('start'); + settings.element.style[cache.vendor+'Transition'] = ''; + cache.isDragging = true; + + cache.intentChecked = false; + cache.startDragX = utils.page('X', e); + cache.startDragY = utils.page('Y', e); + cache.dragWatchers = { + current: 0, + last: 0, + hold: 0, + state: '' + }; + cache.simpleStates = { + opening: null, + towards: null, + hyperExtending: null, + halfway: null, + flick: null, + translation: { + absolute: 0, + relative: 0, + sinceDirectionChange: 0, + percentage: 0 + } + }; + }, + + /** + * Fired while the user is moving the content pane + * @param {Object} e Event object + */ + dragging: function(e) { + + if (cache.isDragging && settings.touchToDrag) { + + var thePageX = utils.page('X', e), + thePageY = utils.page('Y', e), + translated = cache.translation, + absoluteTranslation = action.translate.get.matrix(4), + whileDragX = thePageX - cache.startDragX, + openingLeft = absoluteTranslation > 0, + translateTo = whileDragX, + diff; + + // Shown no intent already + if((cache.intentChecked && !cache.hasIntent)){ + return; + } + + if(settings.addBodyClasses){ + if((absoluteTranslation)>0){ + utils.klass.add(doc.body, 'snapjs-left'); + utils.klass.remove(doc.body, 'snapjs-right'); + } else if((absoluteTranslation)<0){ + utils.klass.add(doc.body, 'snapjs-right'); + utils.klass.remove(doc.body, 'snapjs-left'); + } + } + + if (cache.hasIntent === false || cache.hasIntent === null) { + + var deg = utils.angleOfDrag(thePageX, thePageY), + inRightRange = (deg >= 0 && deg <= settings.slideIntent) || (deg <= 360 && deg > (360 - settings.slideIntent)), + inLeftRange = (deg >= 180 && deg <= (180 + settings.slideIntent)) || (deg <= 180 && deg >= (180 - settings.slideIntent)); + if (!inLeftRange && !inRightRange) { + cache.hasIntent = false; + } else { + cache.hasIntent = true; + } + cache.intentChecked = true; + } + + if ( + (settings.minDragDistance>=Math.abs(thePageX-cache.startDragX)) || // Has user met minimum drag distance? + (cache.hasIntent === false) + ) { + return; + } + + utils.events.prevent(e); + utils.dispatchEvent('drag'); + + cache.dragWatchers.current = thePageX; + + // Determine which direction we are going + if (cache.dragWatchers.last > thePageX) { + if (cache.dragWatchers.state !== 'left') { + cache.dragWatchers.state = 'left'; + cache.dragWatchers.hold = thePageX; + } + cache.dragWatchers.last = thePageX; + } else if (cache.dragWatchers.last < thePageX) { + if (cache.dragWatchers.state !== 'right') { + cache.dragWatchers.state = 'right'; + cache.dragWatchers.hold = thePageX; + } + cache.dragWatchers.last = thePageX; + } + if (openingLeft) { + // Pulling too far to the right + if (settings.maxPosition < absoluteTranslation) { + diff = (absoluteTranslation - settings.maxPosition) * settings.resistance; + translateTo = whileDragX - diff; + } + cache.simpleStates = { + opening: 'left', + towards: cache.dragWatchers.state, + hyperExtending: settings.maxPosition < absoluteTranslation, + halfway: absoluteTranslation > (settings.maxPosition / 2), + flick: Math.abs(cache.dragWatchers.current - cache.dragWatchers.hold) > settings.flickThreshold, + translation: { + absolute: absoluteTranslation, + relative: whileDragX, + sinceDirectionChange: (cache.dragWatchers.current - cache.dragWatchers.hold), + percentage: (absoluteTranslation/settings.maxPosition)*100 + } + }; + } else { + // Pulling too far to the left + if (settings.minPosition > absoluteTranslation) { + diff = (absoluteTranslation - settings.minPosition) * settings.resistance; + translateTo = whileDragX - diff; + } + cache.simpleStates = { + opening: 'right', + towards: cache.dragWatchers.state, + hyperExtending: settings.minPosition > absoluteTranslation, + halfway: absoluteTranslation < (settings.minPosition / 2), + flick: Math.abs(cache.dragWatchers.current - cache.dragWatchers.hold) > settings.flickThreshold, + translation: { + absolute: absoluteTranslation, + relative: whileDragX, + sinceDirectionChange: (cache.dragWatchers.current - cache.dragWatchers.hold), + percentage: (absoluteTranslation/settings.minPosition)*100 + } + }; + } + action.translate.x(translateTo + translated); + } + }, + + /** + * Fired when the user releases the content pane + * @param {Object} e Event object + */ + endDrag: function(e) { + if (cache.isDragging) { + utils.dispatchEvent('end'); + var translated = action.translate.get.matrix(4); + + // Tap Close + if (cache.dragWatchers.current === 0 && translated !== 0 && settings.tapToClose) { + utils.dispatchEvent('close'); + utils.events.prevent(e); + action.translate.easeTo(0); + cache.isDragging = false; + cache.startDragX = 0; + return; + } + + // Revealing Left + if (cache.simpleStates.opening === 'left') { + // Halfway, Flicking, or Too Far Out + if ((cache.simpleStates.halfway || cache.simpleStates.hyperExtending || cache.simpleStates.flick)) { + if (cache.simpleStates.flick && cache.simpleStates.towards === 'left') { // Flicking Closed + action.translate.easeTo(0); + } else if ( + (cache.simpleStates.flick && cache.simpleStates.towards === 'right') || // Flicking Open OR + (cache.simpleStates.halfway || cache.simpleStates.hyperExtending) // At least halfway open OR hyperextending + ) { + action.translate.easeTo(settings.maxPosition); // Open Left + } + } else { + action.translate.easeTo(0); // Close Left + } + // Revealing Right + } else if (cache.simpleStates.opening === 'right') { + // Halfway, Flicking, or Too Far Out + if ((cache.simpleStates.halfway || cache.simpleStates.hyperExtending || cache.simpleStates.flick)) { + if (cache.simpleStates.flick && cache.simpleStates.towards === 'right') { // Flicking Closed + action.translate.easeTo(0); + } else if ( + (cache.simpleStates.flick && cache.simpleStates.towards === 'left') || // Flicking Open OR + (cache.simpleStates.halfway || cache.simpleStates.hyperExtending) // At least halfway open OR hyperextending + ) { + action.translate.easeTo(settings.minPosition); // Open Right + } + } else { + action.translate.easeTo(0); // Close Right + } + } + cache.isDragging = false; + cache.startDragX = utils.page('X', e); + } + } + } + }; + + + // Initialize + if (opts.element) { + utils.extend(settings, opts); + cache.vendor = utils.vendor(); + cache.canTransform = utils.canTransform(); + action.drag.listen(); + } + }; + + + utils.extend(Core.prototype, { + + /** + * Opens the specified side menu + * @param {String} side Must be "left" or "right" + */ + open: function(side, cb) { + utils.dispatchEvent('open'); + utils.klass.remove(doc.body, 'snapjs-expand-left'); + utils.klass.remove(doc.body, 'snapjs-expand-right'); + + if (side === 'left') { + this.cache.simpleStates.opening = 'left'; + this.cache.simpleStates.towards = 'right'; + utils.klass.add(doc.body, 'snapjs-left'); + utils.klass.remove(doc.body, 'snapjs-right'); + this.action.translate.easeTo(this.settings.maxPosition, cb); + } else if (side === 'right') { + this.cache.simpleStates.opening = 'right'; + this.cache.simpleStates.towards = 'left'; + utils.klass.remove(doc.body, 'snapjs-left'); + utils.klass.add(doc.body, 'snapjs-right'); + this.action.translate.easeTo(this.settings.minPosition, cb); + } + }, + + /** + * Closes the pane + */ + close: function(cb) { + utils.dispatchEvent('close'); + this.action.translate.easeTo(0, cb); + }, + + /** + * Hides the content pane completely allowing for full menu visibility + * @param {String} side Must be "left" or "right" + */ + expand: function(side){ + var to = win.innerWidth || doc.documentElement.clientWidth; + + if(side==='left'){ + utils.dispatchEvent('expandLeft'); + utils.klass.add(doc.body, 'snapjs-expand-left'); + utils.klass.remove(doc.body, 'snapjs-expand-right'); + } else { + utils.dispatchEvent('expandRight'); + utils.klass.add(doc.body, 'snapjs-expand-right'); + utils.klass.remove(doc.body, 'snapjs-expand-left'); + to *= -1; + } + this.action.translate.easeTo(to); + }, + + /** + * Listen in to custom Snap events + * @param {String} evt The snap event name + * @param {Function} fn Callback function + * @return {Object} Snap instance + */ + on: function(evt, fn) { + this.eventList[evt] = fn; + return this; + }, + + /** + * Stops listening to custom Snap events + * @param {String} evt The snap event name + */ + off: function(evt) { + if (this.eventList[evt]) { + this.eventList[evt] = false; + } + }, + + /** + * Enables Snap.js events + */ + enable: function() { + utils.dispatchEvent('enable'); + this.action.drag.listen(); + }, + + /** + * Disables Snap.js events + */ + disable: function() { + utils.dispatchEvent('disable'); + this.action.drag.stopListening(); + }, + + /** + * Updates the instances settings + * @param {Object} opts The Snap options to set + */ + settings: function(opts){ + utils.extend(this.settings, opts); + }, + + /** + * Returns information about the state of the content pane + * @return {Object} Information regarding the state of the pane + */ + state: function() { + var state, + fromLeft = this.action.translate.get.matrix(4); + if (fromLeft === this.settings.maxPosition) { + state = 'left'; + } else if (fromLeft === this.settings.minPosition) { + state = 'right'; + } else { + state = 'closed'; + } + return { + state: state, + info: this.cache.simpleStates + }; + } + }); + + // Assign to the global namespace + this[Namespace] = Core; + }).call(this, window, document); diff --git a/core/l10n/ast.php b/core/l10n/ast.php index fe575a69e38..ad721ee5711 100644 --- a/core/l10n/ast.php +++ b/core/l10n/ast.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Compartir col usuariu o grupu ...", "Share link" => "Compartir enllaz", "The public link will expire no later than {days} days after it is created" => "L'enllaz públicu va caducar enantes de {days} díes dende la so creación", -"By default the public link will expire after {days} days" => "Por defeutu, l'enllaz públicu va caducar dempués de {days} díes", "Password protect" => "Protexer con contraseña", "Choose a password for the public link" => "Escueyi una contraseña pal enllaz públicu", "Allow Public Upload" => "Permitir xuba pública", diff --git a/core/l10n/ca.php b/core/l10n/ca.php index 17528bee940..534c08eccbb 100644 --- a/core/l10n/ca.php +++ b/core/l10n/ca.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Comparteix amb usuari o grup...", "Share link" => "Enllaç de compartició", "The public link will expire no later than {days} days after it is created" => "L'enllaç públic tindrà venciment abans de {days} dies després de crear-lo", -"By default the public link will expire after {days} days" => "Per defecte l'enllaç públic té venciment en {days} dies", "Password protect" => "Protegir amb contrasenya", "Choose a password for the public link" => "Escolliu una contrasenya per l'enllaç públic", "Allow Public Upload" => "Permet pujada pública", diff --git a/core/l10n/cs_CZ.php b/core/l10n/cs_CZ.php index ed2dfad8366..88f2d4442a9 100644 --- a/core/l10n/cs_CZ.php +++ b/core/l10n/cs_CZ.php @@ -87,7 +87,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Sdílet s uživatelem nebo skupinou", "Share link" => "Sdílet odkaz", "The public link will expire no later than {days} days after it is created" => "Veřejný odkaz nevyprší dříve než za {days} dní po svém vytvoření", -"By default the public link will expire after {days} days" => "Ve výchozím nastavení vyprší veřejný odkaz za {days} dní", "Password protect" => "Chránit heslem", "Choose a password for the public link" => "Zadej heslo pro tento veřejný odkaz", "Allow Public Upload" => "Povolit veřejné nahrávání", diff --git a/core/l10n/da.php b/core/l10n/da.php index b8a0d32b6f2..a1dfa6ca354 100644 --- a/core/l10n/da.php +++ b/core/l10n/da.php @@ -86,7 +86,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Del med bruger eller gruppe ...", "Share link" => "Del link", "The public link will expire no later than {days} days after it is created" => "Det offentlige link udløber senest {days} dage efter det blev oprettet", -"By default the public link will expire after {days} days" => "Som standard udløber det offentlige link efter {days} dage", "Password protect" => "Beskyt med adgangskode", "Choose a password for the public link" => "Vælg et kodeord til det offentlige link", "Allow Public Upload" => "Tillad Offentlig Upload", diff --git a/core/l10n/de.php b/core/l10n/de.php index 632fcc8ce3d..7f1a8e602d8 100644 --- a/core/l10n/de.php +++ b/core/l10n/de.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Mit Benutzer oder Gruppe teilen ....", "Share link" => "Link Teilen", "The public link will expire no later than {days} days after it is created" => "Der öffentliche Link wird spätestens nach {days} Tagen, nach Erstellung, ablaufen", -"By default the public link will expire after {days} days" => "Standardmäßig wird der öffentliche Link nach {days} Tagen ablaufen", "Password protect" => "Passwortschutz", "Choose a password for the public link" => "Wählen Sie ein Passwort für den öffentlichen Link", "Allow Public Upload" => "Öffentliches Hochladen erlauben", diff --git a/core/l10n/de_DE.php b/core/l10n/de_DE.php index 32e613862cd..709b313eb09 100644 --- a/core/l10n/de_DE.php +++ b/core/l10n/de_DE.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Mit Benutzer oder Gruppe teilen ....", "Share link" => "Link teilen", "The public link will expire no later than {days} days after it is created" => "Der öffentliche Link wird spätestens nach {days} Tagen, nach Erstellung, ablaufen", -"By default the public link will expire after {days} days" => "Standardmäßig wird der öffentliche Link nach {days} Tagen ablaufen", "Password protect" => "Passwortschutz", "Choose a password for the public link" => "Wählen Sie ein Passwort für den öffentlichen Link", "Allow Public Upload" => "Öffentliches Hochladen erlauben", diff --git a/core/l10n/el.php b/core/l10n/el.php index c16ab0e9cf3..3e7a43c6554 100644 --- a/core/l10n/el.php +++ b/core/l10n/el.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Διαμοιρασμός με χρήστη ή ομάδα ...", "Share link" => "Διαμοιρασμός συνδέσμου", "The public link will expire no later than {days} days after it is created" => "Ο δημόσιος σύνδεσμος θα απενεργοποιηθεί το πολύ {days} ημέρες μετά την δημιουργία του", -"By default the public link will expire after {days} days" => "Ο δημόσιος σύνδεσμος θα απενεργοποιηθεί ερήμην μετά από {days} ημέρες", "Password protect" => "Προστασία συνθηματικού", "Choose a password for the public link" => "Επιλέξτε κωδικό για τον δημόσιο σύνδεσμο", "Allow Public Upload" => "Επιτρέπεται η Δημόσια Αποστολή", diff --git a/core/l10n/en_GB.php b/core/l10n/en_GB.php index 8c477442699..6bdd4d4ef8d 100644 --- a/core/l10n/en_GB.php +++ b/core/l10n/en_GB.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Share with user or group …", "Share link" => "Share link", "The public link will expire no later than {days} days after it is created" => "The public link will expire no later than {days} days after it is created", -"By default the public link will expire after {days} days" => "By default the public link will expire after {days} days", "Password protect" => "Password protect", "Choose a password for the public link" => "Choose a password for the public link", "Allow Public Upload" => "Allow Public Upload", diff --git a/core/l10n/es.php b/core/l10n/es.php index 8cf5edfc107..f3a6eb1fb10 100644 --- a/core/l10n/es.php +++ b/core/l10n/es.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Compartido con el usuario o con el grupo ...", "Share link" => "Enlace compartido", "The public link will expire no later than {days} days after it is created" => "El link publico no expirará antes de {days} desde que fué creado", -"By default the public link will expire after {days} days" => "El link publico expirará por defecto pasados {days} dias", "Password protect" => "Protección con contraseña", "Choose a password for the public link" => "Elija una contraseña para el enlace publico", "Allow Public Upload" => "Permitir Subida Pública", diff --git a/core/l10n/et_EE.php b/core/l10n/et_EE.php index af3bc1e83ef..81d294d7ed4 100644 --- a/core/l10n/et_EE.php +++ b/core/l10n/et_EE.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Jaga kasutaja või grupiga ...", "Share link" => "Jaga linki", "The public link will expire no later than {days} days after it is created" => "Avalik link aegub mitte hiljem kui pärast {days} päeva selle loomist", -"By default the public link will expire after {days} days" => "Avalik link aegub vaikimisi pärast {days} päeva", "Password protect" => "Parooliga kaitstud", "Choose a password for the public link" => "Vali avaliku lingi jaoks parool", "Allow Public Upload" => "Luba avalik üleslaadimine", diff --git a/core/l10n/eu.php b/core/l10n/eu.php index ec1cb68556d..995a9148f86 100644 --- a/core/l10n/eu.php +++ b/core/l10n/eu.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Elkarbanatu erabiltzaile edo taldearekin...", "Share link" => "Elkarbanatu lotura", "The public link will expire no later than {days} days after it is created" => "Esteka publikoak iraungi egingo du, askoz jota, sortu eta {days} egunetara.", -"By default the public link will expire after {days} days" => "Besterik ezean esteka publikoak {days} egun eta gero iraungi egingo du.", "Password protect" => "Babestu pasahitzarekin", "Choose a password for the public link" => "Aukeratu pasahitz bat esteka publikorako", "Allow Public Upload" => "Gaitu igotze publikoa", diff --git a/core/l10n/fi_FI.php b/core/l10n/fi_FI.php index cea884cac7c..3c9d8161874 100644 --- a/core/l10n/fi_FI.php +++ b/core/l10n/fi_FI.php @@ -85,7 +85,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Jaa käyttäjän tai ryhmän kanssa…", "Share link" => "Jaa linkki", "The public link will expire no later than {days} days after it is created" => "Julkinen linkki vanhenee {days} päivän jälkeen sen luomisesta", -"By default the public link will expire after {days} days" => "Oletuksena julkinen linkki vanhenee {days} päivässä", "Password protect" => "Suojaa salasanalla", "Choose a password for the public link" => "Valitse salasana julkiselle linkille", "Allow Public Upload" => "Salli julkinen lähetys", diff --git a/core/l10n/fr.php b/core/l10n/fr.php index 9723ec427bd..aa9e63598b7 100644 --- a/core/l10n/fr.php +++ b/core/l10n/fr.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Partager avec un utilisateur ou un groupe...", "Share link" => "Partager le lien", "The public link will expire no later than {days} days after it is created" => "Ce lien public expirera au plus tard, dans {days} jours après sa création.", -"By default the public link will expire after {days} days" => "Par défaut, le lien public expire après {days} jour(s).", "Password protect" => "Protéger par un mot de passe", "Choose a password for the public link" => "Choisissez un mot de passe pour le lien public.", "Allow Public Upload" => "Autoriser l'upload par les utilisateurs non enregistrés", diff --git a/core/l10n/gl.php b/core/l10n/gl.php index af868e6c4d6..f328d0ef256 100644 --- a/core/l10n/gl.php +++ b/core/l10n/gl.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Compartir cun usuario ou grupo ...", "Share link" => "Ligazón para compartir", "The public link will expire no later than {days} days after it is created" => "A ligazón pública caducará, a máis tardar, {days} días após a súa creación", -"By default the public link will expire after {days} days" => "De xeito predeterminado, a ligazón pública caduca aos {days} días", "Password protect" => "Protexido con contrasinal", "Choose a password for the public link" => "Escolla un contrasinal para a ligazón pública", "Allow Public Upload" => "Permitir o envío público", diff --git a/core/l10n/hu_HU.php b/core/l10n/hu_HU.php index b857120798a..2cd8f85b74b 100644 --- a/core/l10n/hu_HU.php +++ b/core/l10n/hu_HU.php @@ -83,7 +83,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Megosztani egy felhasználóval vagy csoporttal ...", "Share link" => "Megosztás hivatkozással", "The public link will expire no later than {days} days after it is created" => "A nyilvános link érvényessége legkorábban {days} nappal a létrehozása után jár csak le", -"By default the public link will expire after {days} days" => "A nyilvános link érvényessége alapértelmezetten {days} nap múlva jár le", "Password protect" => "Jelszóval is védem", "Choose a password for the public link" => "Válasszon egy jelszót a nyilvános linkhez", "Allow Public Upload" => "Feltöltést is engedélyezek", diff --git a/core/l10n/it.php b/core/l10n/it.php index 106a4af2a56..09b8ad2d925 100644 --- a/core/l10n/it.php +++ b/core/l10n/it.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Condividi con utente o gruppo ...", "Share link" => "Condividi collegamento", "The public link will expire no later than {days} days after it is created" => "Il collegamento pubblico scadrà non più tardi di {days} giorni dopo la sua creazione", -"By default the public link will expire after {days} days" => "In modo predefinito, il collegamento pubblico scadrà dopo {days} giorni", "Password protect" => "Proteggi con password", "Choose a password for the public link" => "Scegli una password per il collegamento pubblico", "Allow Public Upload" => "Consenti caricamento pubblico", diff --git a/core/l10n/ja.php b/core/l10n/ja.php index 1c887e8b072..92bbac6a1fd 100644 --- a/core/l10n/ja.php +++ b/core/l10n/ja.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "ユーザーもしくはグループと共有 ...", "Share link" => "URLで共有", "The public link will expire no later than {days} days after it is created" => "URLによる共有は、作成してから {days} 日以内に有効期限切れになります", -"By default the public link will expire after {days} days" => "デフォルトの設定では、URLによる共有は {days} 日後に有効期限切れになります", "Password protect" => "パスワード保護を有効化", "Choose a password for the public link" => "URLによる共有のパスワードを入力", "Allow Public Upload" => "アップロードを許可", diff --git a/core/l10n/nb_NO.php b/core/l10n/nb_NO.php index 4c98e1b97a6..0bd73627675 100644 --- a/core/l10n/nb_NO.php +++ b/core/l10n/nb_NO.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Del med bruker eller gruppe …", "Share link" => "Del lenke", "The public link will expire no later than {days} days after it is created" => "Den offentlige lenken vil utløpe senest {days} dager etter at den lages", -"By default the public link will expire after {days} days" => "Som standard vil den offentlige lenken utløpe etter {days} dager", "Password protect" => "Passordbeskyttet", "Choose a password for the public link" => "Velg et passord for den offentlige lenken", "Allow Public Upload" => "Tillat Offentlig Opplasting", diff --git a/core/l10n/nl.php b/core/l10n/nl.php index df1af1ecab6..16fa773ad02 100644 --- a/core/l10n/nl.php +++ b/core/l10n/nl.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Delen met gebruiker of groep ...", "Share link" => "Deel link", "The public link will expire no later than {days} days after it is created" => "De openbare link vervalt niet eerder dan {days} dagen na het aanmaken", -"By default the public link will expire after {days} days" => "Standaard vervalt een openbare link na {days} dagen", "Password protect" => "Wachtwoord beveiligd", "Choose a password for the public link" => "Kies een wachtwoord voor de openbare link", "Allow Public Upload" => "Sta publieke uploads toe", diff --git a/core/l10n/pl.php b/core/l10n/pl.php index bc22a87122b..7a8ea922ec2 100644 --- a/core/l10n/pl.php +++ b/core/l10n/pl.php @@ -48,6 +48,8 @@ $TRANSLATIONS = array( "last year" => "w zeszłym roku", "years ago" => "lat temu", "Couldn't send reset email. Please contact your administrator." => "Nie mogę wysłać maila resetującego. Skontaktuj się z administratorem.", +"The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." => "Link do zresetowanego hasła, został wysłany na twój adres e-mail. Jeśli nie dostałeś wiadomości w rozsądnym czasie, sprawdź folder ze spamem.<br> Jeśli nie ma wiadomości w tym folderze, skontaktuj się ze swoim administratorem.", +"Your files are encrypted. If you haven't enabled the recovery key, there will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" => "Twoje pliki są zaszyfrowane. Jeśli nie włączyłeś klucza odzyskiwania, nie będzie możliwości odszyfrowania tych plików po zresetowaniu hasła.<br>Jeśli nie jesteś pewien co zrobić, skontaktuj się ze swoim administratorem, zanim bedziesz kontynuował. <br/> Czy chcesz kontynuować?\n ", "I know what I'm doing" => "Wiem co robię", "Reset password" => "Zresetuj hasło", "Password can not be changed. Please contact your administrator." => "Hasło nie może zostać zmienione. Skontaktuj się z administratorem.", @@ -86,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Współdziel z użytkownikiem lub grupą ...", "Share link" => "Udostępnij link", "The public link will expire no later than {days} days after it is created" => "Link publiczny wygaśnie nie później niż po {days} dniach od utworzenia", -"By default the public link will expire after {days} days" => "Domyślnie link publiczny wygaśnie po {days} dniach", "Password protect" => "Zabezpiecz hasłem", "Choose a password for the public link" => "Wybierz hasło dla linku publicznego", "Allow Public Upload" => "Pozwól na publiczne wczytywanie", diff --git a/core/l10n/pt_BR.php b/core/l10n/pt_BR.php index 58d8ed46739..7b165bb6b4e 100644 --- a/core/l10n/pt_BR.php +++ b/core/l10n/pt_BR.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Compartilhar com usuário ou grupo ...", "Share link" => "Compartilher link", "The public link will expire no later than {days} days after it is created" => "O link público irá expirar não antes de {days} depois de ser criado", -"By default the public link will expire after {days} days" => "Por padrão o link público irá expirar após {days} dias", "Password protect" => "Proteger com senha", "Choose a password for the public link" => "Escolha uma senha para o link público", "Allow Public Upload" => "Permitir Envio Público", diff --git a/core/l10n/pt_PT.php b/core/l10n/pt_PT.php index 6288ec464e9..2a687d37d2d 100644 --- a/core/l10n/pt_PT.php +++ b/core/l10n/pt_PT.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Partilhar com utilizador ou grupo...", "Share link" => "Partilhar o link", "The public link will expire no later than {days} days after it is created" => "O link público expira, o mais tardar {days} dias após sua criação", -"By default the public link will expire after {days} days" => "Por defeito, o link publico irá expirar depois de {days} dias", "Password protect" => "Proteger com palavra-passe", "Choose a password for the public link" => "Defina a palavra-passe para o link público", "Allow Public Upload" => "Permitir Envios Públicos", diff --git a/core/l10n/ru.php b/core/l10n/ru.php index 77e7764d2b3..6754c8eac4c 100644 --- a/core/l10n/ru.php +++ b/core/l10n/ru.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Поделиться с пользователем или группой...", "Share link" => "Поделиться ссылкой", "The public link will expire no later than {days} days after it is created" => "Срок действия публичной ссылки истекает не позже чем через {days} дней, после её создания", -"By default the public link will expire after {days} days" => "По умолчанию срок действия публичной ссылки истекает через {days} дней", "Password protect" => "Защитить паролем", "Choose a password for the public link" => "Выберите пароль для публичной ссылки", "Allow Public Upload" => "Разрешить загрузку", diff --git a/core/l10n/sk_SK.php b/core/l10n/sk_SK.php index 7a274e648ac..6f15600e900 100644 --- a/core/l10n/sk_SK.php +++ b/core/l10n/sk_SK.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Zdieľať s používateľom alebo skupinou ...", "Share link" => "Zdieľať linku", "The public link will expire no later than {days} days after it is created" => "Verejný odkaz nevyprší skôr než za {days} dní po vytvorení", -"By default the public link will expire after {days} days" => "Vo východzom nastavení vyprší verejný odkaz za {days} dní", "Password protect" => "Chrániť heslom", "Choose a password for the public link" => "Zadajte heslo pre tento verejný odkaz", "Allow Public Upload" => "Povoliť verejné nahrávanie", diff --git a/core/l10n/sl.php b/core/l10n/sl.php index efbb651e79d..16d8639adde 100644 --- a/core/l10n/sl.php +++ b/core/l10n/sl.php @@ -72,6 +72,7 @@ $TRANSLATIONS = array( "Strong password" => "Odlično geslo", "Shared" => "V souporabi", "Shared by {owner}" => "Souporabo omogoča {owner}", +"Shared with {recipients}" => "V souporabi z {recipients}", "Share" => "Souporaba", "Error" => "Napaka", "Error while sharing" => "Napaka med souporabo", diff --git a/core/l10n/sv.php b/core/l10n/sv.php index 1558ba80984..71a22e8f555 100644 --- a/core/l10n/sv.php +++ b/core/l10n/sv.php @@ -87,7 +87,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Dela med användare eller grupp...", "Share link" => "Dela länk", "The public link will expire no later than {days} days after it is created" => "Den publika länken kommer sluta gälla inte senare än {days} dagar efter att den skapades", -"By default the public link will expire after {days} days" => "Som standard kommer den publika länken att sluta gälla efter {days} dagar", "Password protect" => "Lösenordsskydda", "Choose a password for the public link" => "Välj ett lösenord för den publika länken", "Allow Public Upload" => "Tillåt publik uppladdning", diff --git a/core/l10n/tr.php b/core/l10n/tr.php index 7ffc312a7ed..e0120150585 100644 --- a/core/l10n/tr.php +++ b/core/l10n/tr.php @@ -88,7 +88,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "Kullanıcı veya grup ile paylaş...", "Share link" => "Paylaşma bağlantısı", "The public link will expire no later than {days} days after it is created" => "Herkese açık bağlantı, oluşturulduktan en geç {days} gün sonra sona erecek", -"By default the public link will expire after {days} days" => "Öntanımlı olarak herkese açık bağlantı {days} gün sonra sona erecek", "Password protect" => "Parola koruması", "Choose a password for the public link" => "Herkese açık bağlantı için bir parola seçin", "Allow Public Upload" => "Herkes Tarafından Gönderime İzin Ver", diff --git a/core/l10n/ur_PK.php b/core/l10n/ur_PK.php index a8d64ba7822..1ce29c2d2f0 100644 --- a/core/l10n/ur_PK.php +++ b/core/l10n/ur_PK.php @@ -68,7 +68,6 @@ $TRANSLATIONS = array( "Shared with you by {owner}" => "اشتراک شدہ آپ سے{مالک}", "Share with user or group …" => "صارف یا مجموعہ کے ساتھ اشتراک کریں ...", "Share link" => "اشتراک لنک", -"By default the public link will expire after {days} days" => "ڈیفالٹ میں عوامی لنک ختم ہو جائے گا {دن} دن", "Password protect" => "محفوظ پاسورڈ", "Choose a password for the public link" => "عوامی لنک کے لئےپاس ورڈ منتخب کریں", "Allow Public Upload" => "پبلک اپ لوڈ کرنے کی اجازت دیں", diff --git a/core/l10n/zh_CN.php b/core/l10n/zh_CN.php index 4cf679658c2..335086d907b 100644 --- a/core/l10n/zh_CN.php +++ b/core/l10n/zh_CN.php @@ -5,6 +5,7 @@ $TRANSLATIONS = array( "Turned on maintenance mode" => "启用维护模式", "Turned off maintenance mode" => "关闭维护模式", "Updated database" => "数据库已更新", +"Disabled incompatible apps: %s" => "禁用不兼容应用:%s", "No image or file provided" => "没有提供图片或文件", "Unknown filetype" => "未知的文件类型", "Invalid image" => "无效的图像", @@ -33,6 +34,7 @@ $TRANSLATIONS = array( "File" => "文件", "Folder" => "文件夹", "Image" => "图像", +"Audio" => "声音", "Saving..." => "保存中", "seconds ago" => "秒前", "_%n minute ago_::_%n minutes ago_" => array("%n 分钟前"), @@ -44,7 +46,10 @@ $TRANSLATIONS = array( "_%n month ago_::_%n months ago_" => array("%n 月前"), "last year" => "去年", "years ago" => "年前", +"Couldn't send reset email. Please contact your administrator." => "未能成功发送重置邮件,请联系管理员。", +"I know what I'm doing" => "我知道我在做什么", "Reset password" => "重置密码", +"Password can not be changed. Please contact your administrator." => "无法修改密码,请联系管理员。", "Yes" => "是", "No" => "否", "Choose" => "选择(&C)...", @@ -69,6 +74,7 @@ $TRANSLATIONS = array( "Strong password" => "强密码", "Shared" => "已共享", "Shared by {owner}" => "由{owner}共享", +"Shared with {recipients}" => "由{recipients}分享", "Share" => "分享", "Error" => "错误", "Error while sharing" => "共享时出错", @@ -79,7 +85,6 @@ $TRANSLATIONS = array( "Share with user or group …" => "分享给其他用户或组 ...", "Share link" => "分享链接", "The public link will expire no later than {days} days after it is created" => "这个共享链接将在创建后 {days} 天失效", -"By default the public link will expire after {days} days" => "默认共享链接失效天数为 {days} ", "Password protect" => "密码保护", "Choose a password for the public link" => "为共享链接设置密码", "Allow Public Upload" => "允许公开上传", @@ -113,8 +118,13 @@ $TRANSLATIONS = array( "Edit tags" => "编辑标签", "Error loading dialog template: {error}" => "加载对话框模板出错: {error}", "No tags selected for deletion." => "请选择要删除的标签。", +"Updating {productName} to version {version}, this may take a while." => "更新 {productName} 到版本 {version},这可能需要一些时间。", "Please reload the page." => "请重新加载页面。", +"The update was unsuccessful." => "更新未成功。", "The update was successful. Redirecting you to ownCloud now." => "更新成功。正在重定向至 ownCloud。", +"Couldn't reset password because the token is invalid" => "令牌无效,无法重置密码", +"Couldn't send reset email. Please make sure your username is correct." => "无法发送重置邮件,请检查您的用户名是否正确。", +"Couldn't send reset email because there is no email address for this username. Please contact your administrator." => "此用户名的电子邮件地址不存在导致无法发送重置邮件,请联系管理员。", "%s password reset" => "重置 %s 的密码", "Use the following link to reset your password: {link}" => "使用以下链接重置您的密码:{link}", "You will receive a link to reset your password via Email." => "您将会收到包含可以重置密码链接的邮件。", @@ -123,6 +133,7 @@ $TRANSLATIONS = array( "Yes, I really want to reset my password now" => "使得,我真的要现在重设密码", "Reset" => "重置", "New password" => "新密码", +"New Password" => "新密码", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " => "Mac OS X 不被支持并且 %s 在这个平台上无法正常工作。请自行承担风险!", "For the best results, please consider using a GNU/Linux server instead." => "为了达到最好的效果,请考虑使用 GNU/Linux 服务器。", "Personal" => "个人", @@ -154,6 +165,7 @@ $TRANSLATIONS = array( "Storage & database" => "存储 & 数据库", "Data folder" => "数据目录", "Configure the database" => "配置数据库", +"Only %s is available." => "仅 %s 可用。", "Database user" => "数据库用户", "Database password" => "数据库密码", "Database name" => "数据库名", @@ -169,6 +181,7 @@ $TRANSLATIONS = array( "Please change your password to secure your account again." => "请修改您的密码,以保护您的账户安全。", "Server side authentication failed!" => "服务端验证失败!", "Please contact your administrator." => "请联系你的管理员。", +"Forgot your password? Reset it!" => "忘记密码?立即重置!", "remember" => "记住", "Log in" => "登录", "Alternative Logins" => "其他登录方式", @@ -177,6 +190,11 @@ $TRANSLATIONS = array( "This means only administrators can use the instance." => "这意味着只有管理员才能在实例上操作。", "Contact your system administrator if this message persists or appeared unexpectedly." => "如果这个消息一直存在或不停出现,请联系你的系统管理员。", "Thank you for your patience." => "感谢让你久等了。", +"%s will be updated to version %s." => "%s 将会更新到版本 %s。", +"The following apps will be disabled:" => "以下应用将会被禁用:", +"The theme %s has been disabled." => "%s 主题已被禁用。", +"Please make sure that the database, the config folder and the data folder have been backed up before proceeding." => "在继续之前,请确认数据库、配置文件夹和数据文件夹已经备份。", +"Start update" => "开始更新", "This ownCloud instance is currently being updated, which may take a while." => "当前ownCloud实例正在更新,可能需要一段时间。", "Please reload this page after a short time to continue using ownCloud." => "请稍后重新加载这个页面,以继续使用ownCloud。" ); diff --git a/core/setup/controller.php b/core/setup/controller.php index cdbe0f7e129..e764b232e89 100644 --- a/core/setup/controller.php +++ b/core/setup/controller.php @@ -41,7 +41,7 @@ class Controller { 'dbpass' => '', 'dbname' => '', 'dbtablespace' => '', - 'dbhost' => '', + 'dbhost' => 'localhost', 'dbtype' => '', ); $parameters = array_merge($defaults, $post); |