diff --git a/DocService/App_Code/DocServiceUtils.cs b/DocService/App_Code/DocServiceUtils.cs index 79971c5f..e9c6bc5d 100644 --- a/DocService/App_Code/DocServiceUtils.cs +++ b/DocService/App_Code/DocServiceUtils.cs @@ -49,15 +49,32 @@ public static class UrlBuilder try { string sHostHeader = oHttpRequest.Headers["Host"]; + string sForwardedHostHeader = oHttpRequest.Headers["X-Forwarded-Host"]; + string sForwardedProtoHeader = oHttpRequest.Headers["X-Forwarded-Proto"]; Uri oSiteUri = oHttpRequest.Url; - sSiteUrl = oSiteUri.Scheme + "://"; + if (!String.IsNullOrEmpty(sForwardedProtoHeader)) + { + sSiteUrl += sForwardedProtoHeader; + } + else + { + sSiteUrl += oSiteUri.Scheme; + } - if (!String.IsNullOrEmpty(sHostHeader)) + sSiteUrl += "://"; + + if (!String.IsNullOrEmpty(sForwardedHostHeader)) + { + sSiteUrl += sForwardedHostHeader; + } + + else if (!String.IsNullOrEmpty(sHostHeader)) { sSiteUrl += sHostHeader; } + else { sSiteUrl += oSiteUri.Host; diff --git a/DocService/CanvasService.ashx b/DocService/CanvasService.ashx index e649f061..f133f886 100644 --- a/DocService/CanvasService.ashx +++ b/DocService/CanvasService.ashx @@ -113,9 +113,15 @@ public class CanvasService : IHttpAsyncHandler if (ErrorTypes.NoError == eError) { InputCommand cmd = ReadCommand(strStream); - - if(null != cmd) - { + if (null == cmd) + { + + eError = ErrorTypes.Unknown; + WriteOutputCommand(oTransportClassContextRead, new OutputCommand(eError)); + eError = ErrorTypes.NoError; + } + else + { try { @@ -149,8 +155,9 @@ public class CanvasService : IHttpAsyncHandler { _log.Error("Exception catched in Print error:", e); } - } - eError = ProcessCommand(oTransportClassContextRead, cmd); + + eError = ProcessCommand(oTransportClassContextRead, cmd); + } } } catch (Exception e) @@ -1371,13 +1378,18 @@ public class CanvasService : IHttpAsyncHandler break; case FileStatus.SaveVersion: { - ITaskResultInterface oTaskResult = TaskResult.NewTaskResult(); - TaskResultDataToUpdate oTask = new TaskResultDataToUpdate(); - oTask.eStatus = FileStatus.Ok; - TaskResultDataToUpdate oMask = new TaskResultDataToUpdate(); - oMask.eStatus = FileStatus.SaveVersion; - TransportClassTaskResult oTransportClassTaskResult = new TransportClassTaskResult(oTransportClassMainAshx, cmd, oTaskResult); - oTaskResult.UpdateIfBegin(cmd.id, oMask, oTask, TaskResultUpdateIfCallback2, oTransportClassTaskResult); + if (cmd.viewmode) + WriteOutputCommand(oTransportClassMainAshx, new OutputCommand("updateversion", cmd.id + "/Editor.bin")); + else + { + ITaskResultInterface oTaskResult = TaskResult.NewTaskResult(); + TaskResultDataToUpdate oTask = new TaskResultDataToUpdate(); + oTask.eStatus = FileStatus.Ok; + TaskResultDataToUpdate oMask = new TaskResultDataToUpdate(); + oMask.eStatus = FileStatus.SaveVersion; + TransportClassTaskResult oTransportClassTaskResult = new TransportClassTaskResult(oTransportClassMainAshx, cmd, oTaskResult); + oTaskResult.UpdateIfBegin(cmd.id, oMask, oTask, TaskResultUpdateIfCallback2, oTransportClassTaskResult); + } } break; case FileStatus.UpdateVersion: @@ -1746,30 +1758,7 @@ public class CanvasService : IHttpAsyncHandler _log.DebugFormat("Enter DocsCallbacksGetCallback(id={0})", cmd.id); ErrorTypes eError = oTransportClassSaveChanges2.m_oDocsCallbacks.GetEnd(ar, out oTransportClassSaveChanges2.m_sCallbackUrl); if (ErrorTypes.NoError == eError && !string.IsNullOrEmpty(oTransportClassSaveChanges2.m_sCallbackUrl)) - { - TaskResultData oTaskResultData = oTransportClassSaveChanges2.m_oTaskResultData; - OutputSfc oOutputSfc = new OutputSfc(); - oOutputSfc.key = oTransportClassSaveChanges2.m_oTaskQueueData.m_sFromKey; - if (FileStatus.Ok == oTaskResultData.eStatus || (FileStatus.Err == oTaskResultData.eStatus && (int)ErrorTypes.ConvertCorrupted == oTaskResultData.nStatusInfo)) - oOutputSfc.url = GetResultUrl(UrlBuilder.UrlWithoutPath(oTransportClassSaveChanges2.m_oHttpContext.Request), oTaskResultData.sKey, oTaskResultData.sTitle, oTaskResultData.sTitle, false); - _log.DebugFormat("saved file url:{0}", oOutputSfc.url); - if (!string.IsNullOrEmpty(oTransportClassSaveChanges2.m_oInputCommand.userid)) - oOutputSfc.users.Add(oTransportClassSaveChanges2.m_oInputCommand.userid); - FileStatusOut eFileStatusOut = FileStatusOut.NotFound; - if (FileStatus.Ok == oTaskResultData.eStatus && !string.IsNullOrEmpty(oOutputSfc.url) && oOutputSfc.users.Count > 0) - eFileStatusOut = FileStatusOut.MustSave; - else - eFileStatusOut = FileStatusOut.Corrupted; - oOutputSfc.status = (int)eFileStatusOut; - - string sJson = new JavaScriptSerializer().Serialize(oOutputSfc); - uint attempcount = uint.Parse(ConfigurationSettings.AppSettings["sfc.webrequest.attempcount"] ?? "1"); - uint attempdelay = uint.Parse(ConfigurationSettings.AppSettings["sfc.webrequest.attempdelay"] ?? "0"); - AsyncWebRequestOperation oAsyncWebRequestOperation = new AsyncWebRequestOperation(attempcount, attempdelay); - oTransportClassSaveChanges2.m_oAsyncWebRequestOperation = oAsyncWebRequestOperation; - _log.DebugFormat("TaskResultRemoveCallback4 url:{0}", oTransportClassSaveChanges2.m_sCallbackUrl); - oTransportClassSaveChanges2.m_oAsyncWebRequestOperationResult = oAsyncWebRequestOperation.RequestBegin(oTransportClassSaveChanges2.m_sCallbackUrl, "POST", "application/json",Encoding.UTF8.GetBytes(sJson), RequestCallback2, oTransportClassSaveChanges2); - } + oTransportClassSaveChanges2.m_oDocsCallbacks.RemoveBegin(cmd.id, DocsCallbacksRemoveCallback, oTransportClassSaveChanges2); else { RemoveFromCoAuthoringHandler(oTransportClassSaveChanges2); @@ -1781,6 +1770,100 @@ public class CanvasService : IHttpAsyncHandler RemoveFromCoAuthoringHandler(oTransportClassSaveChanges2); } } + private void DocsCallbacksRemoveCallback(IAsyncResult ar) + { + TransportClassSaveChanges2 oTransportClassSaveChanges2 = ar.AsyncState as TransportClassSaveChanges2; + try + { + InputCommand cmd = oTransportClassSaveChanges2.m_oInputCommand; + _log.DebugFormat("Enter DocsCallbacksRemoveCallback(id={0})", cmd.id); + ErrorTypes eError = oTransportClassSaveChanges2.m_oDocsCallbacks.RemoveEnd(ar); + if (ErrorTypes.NoError == eError) + { + TaskResultData oTaskResultData = oTransportClassSaveChanges2.m_oTaskResultData; + if (FileStatus.Ok != oTaskResultData.eStatus && (FileStatus.Err != oTaskResultData.eStatus || (int)ErrorTypes.ConvertCorrupted != oTaskResultData.nStatusInfo)) + { + OutputSfc oOutputSfc = new OutputSfc(); + oOutputSfc.status = (int)FileStatusOut.Corrupted; + SendFileRequest(oOutputSfc, oTransportClassSaveChanges2); + } + else + { + Storage oStorage = new Storage(); + MemoryStream oStream = new MemoryStream(); + TransportClassStorage3 oTransportClassStorage3 = new TransportClassStorage3(oTransportClassSaveChanges2, cmd, oStorage, oStream, oTaskResultData.sKey, oTransportClassSaveChanges2); + oStorage.ReadFileBegin(Path.Combine(oTaskResultData.sKey, "changesHistory.json"), oStream, ReadFileCallback, oTransportClassStorage3); + } + } + else + { + RemoveFromCoAuthoringHandler(oTransportClassSaveChanges2); + } + } + catch (Exception e) + { + _log.Error("Exception catched in DocsCallbacksRemoveCallback:", e); + RemoveFromCoAuthoringHandler(oTransportClassSaveChanges2); + } + } + private void SendFileRequest(OutputSfc oOutputSfc, TransportClassSaveChanges2 oTransportClassSaveChanges2) + { + + string sJson = new JavaScriptSerializer().Serialize(oOutputSfc); + uint attempcount = uint.Parse(ConfigurationSettings.AppSettings["sfc.webrequest.attempcount"] ?? "1"); + uint attempdelay = uint.Parse(ConfigurationSettings.AppSettings["sfc.webrequest.attempdelay"] ?? "0"); + AsyncWebRequestOperation oAsyncWebRequestOperation = new AsyncWebRequestOperation(attempcount, attempdelay); + oTransportClassSaveChanges2.m_oAsyncWebRequestOperation = oAsyncWebRequestOperation; + _log.DebugFormat("TaskResultRemoveCallback4 url:{0}", oTransportClassSaveChanges2.m_sCallbackUrl); + oTransportClassSaveChanges2.m_oAsyncWebRequestOperationResult = oAsyncWebRequestOperation.RequestBegin(oTransportClassSaveChanges2.m_sCallbackUrl, "POST", "application/json", Encoding.UTF8.GetBytes(sJson), RequestCallback2, oTransportClassSaveChanges2); + } + private void ReadFileCallback(IAsyncResult ar) + { + TransportClassStorage3 oTransportClassStorage3 = ar.AsyncState as TransportClassStorage3; + TransportClassSaveChanges2 oTransportClassSaveChanges2 = oTransportClassStorage3.m_oSaveChanges2; + try + { + Storage oStorage = oTransportClassStorage3.m_oStorage; + if (null == oStorage) + { + throw new NullReferenceException(); + } + TaskResultData oTaskResultData = oTransportClassSaveChanges2.m_oTaskResultData; + + int nReadWriteBytes = 0; + ErrorTypes eResult = oStorage.ReadFileEnd(ar, out nReadWriteBytes); + + OutputSfc oOutputSfc = new OutputSfc(); + oOutputSfc.key = oTransportClassSaveChanges2.m_oInputCommand.id; + if (ErrorTypes.NoError == eResult) + { + byte[] buffer = new byte[nReadWriteBytes]; + oTransportClassStorage3.m_oStream.Seek(0, SeekOrigin.Begin); + oTransportClassStorage3.m_oStream.Read(buffer, 0, nReadWriteBytes); + oTransportClassStorage3.m_oStream.Dispose(); + + string strSiteUrl = UrlBuilder.UrlWithoutPath(oTransportClassSaveChanges2.m_oHttpContext.Request); + oOutputSfc.url = GetResultUrl(strSiteUrl, oTaskResultData.sKey, oTaskResultData.sTitle, oTaskResultData.sTitle, false); + oOutputSfc.changesurl = GetResultUrl(strSiteUrl, oTaskResultData.sKey, "changes.zip", oTaskResultData.sTitle, false); + oOutputSfc.changeshistory = Encoding.UTF8.GetString(buffer); + } + _log.DebugFormat("saved file url:{0}", oOutputSfc.url); + if (!string.IsNullOrEmpty(oTransportClassSaveChanges2.m_oInputCommand.userid)) + oOutputSfc.users.Add(oTransportClassSaveChanges2.m_oInputCommand.userid); + FileStatusOut eFileStatusOut = FileStatusOut.NotFound; + if (!string.IsNullOrEmpty(oOutputSfc.url) && oOutputSfc.users.Count > 0) + eFileStatusOut = FileStatusOut.MustSave; + else + eFileStatusOut = FileStatusOut.Corrupted; + oOutputSfc.status = (int)eFileStatusOut; + SendFileRequest(oOutputSfc, oTransportClassSaveChanges2); + } + catch (Exception e) + { + _log.Error("Exception catched in ReadFileCallback:", e); + RemoveFromCoAuthoringHandler(oTransportClassSaveChanges2); + } + } private void RequestCallback2(IAsyncResult ar) { TransportClassSaveChanges2 oTransportClassSaveChanges2 = ar.AsyncState as TransportClassSaveChanges2; @@ -1957,6 +2040,15 @@ public class CanvasService : IHttpAsyncHandler m_oOutputCommand = oOutputCommand; } } + private class TransportClassStorage3 : TransportClassStorage + { + public TransportClassSaveChanges2 m_oSaveChanges2; + public TransportClassStorage3(TransportClassMainAshx oTransportClassMainAshx, InputCommand oInputCommand, Storage oStorage, Stream stream, string sKey, TransportClassSaveChanges2 oSaveChanges2) + : base(oTransportClassMainAshx, oInputCommand, oStorage, stream, sKey) + { + m_oSaveChanges2 = oSaveChanges2; + } + } private class TransportClassTaskQueue : TransportClassMainAshx { public CTaskQueue m_oTaskQueue; @@ -2154,6 +2246,8 @@ public class CanvasService : IHttpAsyncHandler public long status { get; set; } public string url { get; set; } + public string changesurl { get; set; } + public string changeshistory { get; set; } public List users = new List(); } public class OutputWaitSaveData @@ -2187,6 +2281,8 @@ public class CanvasService : IHttpAsyncHandler public class OutputSettingsData { + public bool canLicense; + public bool canEdit; public bool canDownload; public bool canCoAuthoring; @@ -2203,6 +2299,8 @@ public class CanvasService : IHttpAsyncHandler public OutputSettingsData() { + canLicense = true; + canEdit = true; canDownload = true; canCoAuthoring = true; @@ -2243,6 +2341,8 @@ public class CanvasService : IHttpAsyncHandler canDownload = !aViewerFormats.Contains(sFormat); } + canLicense = false; + } } diff --git a/DocService/web.config b/DocService/web.config index 59e05a91..b2f6db15 100644 --- a/DocService/web.config +++ b/DocService/web.config @@ -9,17 +9,6 @@ --> - - -
- -
-
-
-
- - -
@@ -89,10 +78,6 @@ - - - - @@ -106,14 +91,10 @@ affects performance, set this value to true only during development. --> - + - - - - - - + + - - - - - - - - - - - - + - - + + - - + + + + + + + + - + - - - + + - - - - - - - - + @@ -260,16 +228,4 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/NodeJsProjects/CoAuthoring/sources/config.json b/NodeJsProjects/CoAuthoring/sources/config.json index 9d854d20..4da633ac 100644 --- a/NodeJsProjects/CoAuthoring/sources/config.json +++ b/NodeJsProjects/CoAuthoring/sources/config.json @@ -6,7 +6,7 @@ "nono_mongodb": { "host": "localhost", "port": 8000, - "database": "coAuthoring" + "database": "onlyoffice" }, "sql": { "type" : "mysql", @@ -22,4 +22,4 @@ "charset" : "utf8", "max_allowed_packet" : 1048575 } -} +} \ No newline at end of file diff --git a/OfficeWeb/apps/api/documents/api.js b/OfficeWeb/apps/api/documents/api.js index 274ec881..d9e1a3cc 100644 --- a/OfficeWeb/apps/api/documents/api.js +++ b/OfficeWeb/apps/api/documents/api.js @@ -68,16 +68,30 @@ }, ... ], - branding: { + customization: { logoUrl: 'header logo url', // default size 88 x 30 + logoUrlEmbedded: 'header logo url', // default size 88 x 30 backgroundColor: 'header background color', textColor: 'header text color', - customer: 'SuperPuper', - customerAddr: 'New-York, 125f-25', - customerMail: 'support@gmail.com', - customerWww: 'www.superpuper.com', - customerInfo: 'Some info', - customerLogo: '' + customer: { + name: 'SuperPuper', + address: 'New-York, 125f-25', + mail: 'support@gmail.com', + www: 'www.superpuper.com', + info: 'Some info', + logo: '' + }, + about: false, + feedback: { + visible: false, + url: http://... + }, + goback: { + visible: false, + text: 'Go to London' + }, + chat: false, + comments: false } }, events: { @@ -126,8 +140,8 @@ _config = config || {}; extend(_config, DocsAPI.DocEditor.defaultConfig); - extend(_config.editorConfig, DocsAPI.DocEditor.defaultConfig.editorConfig); - _config.editorConfig.canBackToFolder = !!_config.events.onBack; + _config.editorConfig.canBackToFolder = _config.events && !!_config.events.onBack; + _config.editorConfig.canUseHistory = !!_config.events.onRequestHistory; var onMouseUp = function (evt) { _processMouse(evt); @@ -286,6 +300,26 @@ }); }; + var _refreshHistory = function(data, message) { + _sendCommand({ + command: 'refreshHistory', + data: { + data: data, + message: message + } + }); + }; + + var _setHistoryData = function(data, message) { + _sendCommand({ + command: 'setHistoryData', + data: { + data: data, + message: message + } + }); + }; + var _processMouse = function(evt) { var r = iframe.getBoundingClientRect(); var data = { @@ -310,12 +344,24 @@ }); }; + (function() { + var result = /[\?\&]placement=(\w+)&?/.exec(window.location.search); + if (!!result && result.length) { + if (result[1] == 'desktop') { + _config.editorConfig.targetApp = result[1]; + _config.editorConfig.canBackToFolder = false; + } + } + })(); + return { showError : _showError, showMessage : _showMessage, applyEditRights : _applyEditRights, processSaveResult : _processSaveResult, processRightsChange : _processRightsChange, + refreshHistory : _refreshHistory, + setHistoryData : _setHistoryData, serviceCommand : _serviceCommand, attachMouseEvents : _attachMouseEvents, detachMouseEvents : _detachMouseEvents @@ -329,12 +375,16 @@ height: '100%', editorConfig: { lang: 'en', - canCoAuthoring: true + canCoAuthoring: true, + customization: { + about: false, + feedback: false + } } }; DocsAPI.DocEditor.version = function() { - return '3.0b'; + return '3.0b##BN#'; }; MessageDispatcher = function(fn, scope) { @@ -441,6 +491,7 @@ iframe.height = config.height; iframe.align = "top"; iframe.frameBorder = 0; + iframe.name = "frameEditor"; return iframe; } @@ -455,8 +506,14 @@ function extend(dest, src) { for (var prop in src) { - if (src.hasOwnProperty(prop) && typeof dest[prop] === 'undefined') { - dest[prop] = src[prop]; + if (src.hasOwnProperty(prop)) { + if (typeof dest[prop] === 'undefined') { + dest[prop] = src[prop]; + } else + if (typeof dest[prop] === 'object' && + typeof src[prop] === 'object') { + extend(dest[prop], src[prop]) + } } } return dest; diff --git a/OfficeWeb/apps/api/documents/index.html b/OfficeWeb/apps/api/documents/index.html index 0092f623..37447ed0 100644 --- a/OfficeWeb/apps/api/documents/index.html +++ b/OfficeWeb/apps/api/documents/index.html @@ -62,12 +62,112 @@ 'onBack': onBack, 'onDocumentStateChange': onDocumentStateChange, 'onRequestEditRights': onRequestEditRights, +// 'onRequestHistory': onRequestHistory, +// 'onRequestHistoryData': onRequestHistoryData, +// 'onRequestHistoryClose': onRequestHistoryClose, 'onSave': onDocumentSave, 'onError': onError } }); // Document Editor event handlers + function onRequestHistory() { + docEditor.refreshHistory({ + 'currentVersion': 3, + 'history': [ + { + 'user': { + id: '8952d4ee-e8a5-42bf-86f0-6cd77801ec15', + name: 'Татьяна Щербакова' + }, + 'changes': null, + 'created': '1/18/2015 6:38 PM', + 'version': 1, + 'version_group': 1, + 'key': 'wyX9AwRq_677SWKjhfk=' + }, + { + 'user': { + id: '8952d4ee-e8a5-42bf-86f0-6cd77801ec15', + name: 'Татьяна Щербакова' + }, + 'changes': [ + { + 'user': { + id: '8952d4ee-e8a5-42bf-86f0-6cd77801ec15', + name: 'Татьяна Щербакова' + }, + 'created': '1/19/2015 6:30 PM' + }, + { + 'user': { + 'userid': '8952d4ee-e8a5-42bf-11f0-6cd77801ec15', + 'username': 'Александр Трофимов' + }, + 'created': '1/19/2015 6:32 PM' + }, + { + 'user': { + id: '8952d4ee-e8a5-42bf-86f0-6cd77801ec15', + name: 'Татьяна Щербакова' + }, + 'created': '1/19/2015 6:38 PM' + } + ], + 'created': '2/19/2015 6:38 PM', + 'version': 2, + 'version_group': 1, + 'key': 'wyX9AwRq_677SWKjhfk=' + }, + { + 'user': { + id: '895255ee-e8a5-42bf-86f0-6cd77801ec15', + name: 'Me' + }, + 'changes': null, + 'created': '2/21/2015 6:38 PM', + 'version': 3, + 'version_group': 2, + 'key': 'wyX9AwRq_677SWKjhfk=' + }, + { + 'user': { + id: '8952d4ee-e8a5-42bf-11f0-6cd77801ec15', + name: 'Александр Трофимов' + }, + 'changes': null, + 'created': '2/22/2015 6:37 PM', + 'version': 4, + 'version_group': 3, + 'key': 'wyX9AwRq_677SWKjhfk=' + }, + { + 'user': { + id: '8952d4ee-e8a5-42bf-11f0-6cd33801ec15', + name: 'Леонид Орлов' + }, + 'changes': null, + 'created': '2/24/2015 6:29 PM', + 'version': 5, + 'version_group': 3, + 'key': 'wyX9AwRq_677SWKjhfk=' + }] + }); + } + + function onRequestHistoryData(revision) { + docEditor.setHistoryData( + { + 'version': revision.data, + 'url': 'http://isa2', + 'urlDiff': 'http://isa2' + } + ); + } + + function onRequestHistoryClose() { + // reload page + } function onDocEditorReady(event) { if (event.target) { @@ -163,17 +263,23 @@ shareUrl : 'http://tl.com/72b4la97', toolbarDocked : 'top' } -// ,branding: { + ,customization: { // logoUrl: 'header logo url', // default size 88 x 30 +// logoUrlEmbedded: 'header logo url', // default size 88 x 30 // backgroundColor: '#ffffff', // textColor: '#ff0000', -// customer: 'SuperPuper', -// customerAddr: 'New-York, 125f-25', -// customerMail: 'support@gmail.com', -// customerWww: 'www.superpuper.com', -// customerInfo: 'Some info', -// customerLogo: 'https://img.imgsmail.ru/r/default/portal/0.1.29/logo.png' -// } +// customer: { +// name: 'SuperPuper', +// address: 'New-York, 125f-25', +// mail: 'support@gmail.com', +// www: 'www.superpuper.com', +// info: 'Some info', +// logo: 'https://img.imgsmail.ru/r/default/portal/0.1.29/logo.png' +// }, +// goback: {text: 'Go To London'} + about: true, + feedback: true + } }; } diff --git a/OfficeWeb/apps/common/Gateway.js b/OfficeWeb/apps/common/Gateway.js index 5b989359..60206b93 100644 --- a/OfficeWeb/apps/common/Gateway.js +++ b/OfficeWeb/apps/common/Gateway.js @@ -54,6 +54,12 @@ Common.Gateway = new(function () { "processRightsChange": function (data) { $me.trigger("processrightschange", data); }, + "refreshHistory": function (data) { + $me.trigger("refreshhistory", data); + }, + "setHistoryData": function (data) { + $me.trigger("sethistorydata", data); + }, "processMouse": function (data) { $me.trigger("processmouse", data); }, @@ -118,6 +124,22 @@ Common.Gateway = new(function () { event: "onRequestEditRights" }); }, + requestHistory: function () { + _postMessage({ + event: "onRequestHistory" + }); + }, + requestHistoryData: function (revision) { + _postMessage({ + event: "onRequestHistoryData", + data: revision + }); + }, + requestHistoryClose: function (revision) { + _postMessage({ + event: "onRequestHistoryClose" + }); + }, reportError: function (code, description) { _postMessage({ event: "onError", diff --git a/OfficeWeb/sdk/Excel/model/Private/CellComment.js b/OfficeWeb/apps/common/main/lib/collection/HistoryVersions.js similarity index 50% rename from OfficeWeb/sdk/Excel/model/Private/CellComment.js rename to OfficeWeb/apps/common/main/lib/collection/HistoryVersions.js index e84e6b87..6bf4ebe1 100644 --- a/OfficeWeb/sdk/Excel/model/Private/CellComment.js +++ b/OfficeWeb/apps/common/main/lib/collection/HistoryVersions.js @@ -29,34 +29,22 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ - "use strict"; -CCellCommentator.prototype.isLockedComment = function (oComment, callbackFunc) { - if (false === this.worksheet.collaborativeEditing.isCoAuthoringExcellEnable()) { - Asc.applyFunction(callbackFunc, true); - return; - } - var objectGuid = oComment.asc_getId(); - if (objectGuid) { - var sheetId = CCellCommentator.sStartCommentId; - if (!oComment.bDocument) { - sheetId += this.worksheet.model.getId(); + if (Common === undefined) { + var Common = {}; +} +Common.Collections = Common.Collections || {}; +define(["underscore", "backbone", "common/main/lib/model/HistoryVersion"], function (_, Backbone) { + Common.Collections.HistoryVersions = Backbone.Collection.extend({ + model: Common.Models.HistoryVersion, + findRevision: function (revision) { + return this.findWhere({ + revision: revision + }); + }, + findRevisions: function (revision) { + return this.where({ + revision: revision + }); } - var lockInfo = this.worksheet.collaborativeEditing.getLockInfo(c_oAscLockTypeElem.Object, null, sheetId, objectGuid); - if (false === this.worksheet.collaborativeEditing.getCollaborativeEditing()) { - Asc.applyFunction(callbackFunc, true); - callbackFunc = undefined; - } - if (false !== this.worksheet.collaborativeEditing.getLockIntersection(lockInfo, c_oAscLockTypes.kLockTypeMine, false)) { - Asc.applyFunction(callbackFunc, true); - return; - } else { - if (false !== this.worksheet.collaborativeEditing.getLockIntersection(lockInfo, c_oAscLockTypes.kLockTypeOther, false)) { - Asc.applyFunction(callbackFunc, false); - return; - } - } - this.worksheet.collaborativeEditing.onStartCheckLock(); - this.worksheet.collaborativeEditing.addCheckLock(lockInfo); - this.worksheet.collaborativeEditing.onEndCheckLock(callbackFunc); - } -}; \ No newline at end of file + }); +}); \ No newline at end of file diff --git a/OfficeWeb/apps/common/main/lib/collection/Users.js b/OfficeWeb/apps/common/main/lib/collection/Users.js index 53521c25..6441f8f9 100644 --- a/OfficeWeb/apps/common/main/lib/collection/Users.js +++ b/OfficeWeb/apps/common/main/lib/collection/Users.js @@ -46,4 +46,12 @@ }); } }); + Common.Collections.HistoryUsers = Backbone.Collection.extend({ + model: Common.Models.User, + findUser: function (id) { + return this.find(function (model) { + return model.get("id") == id; + }); + } + }); }); \ No newline at end of file diff --git a/OfficeWeb/apps/common/main/lib/component/ComboBoxFonts.js b/OfficeWeb/apps/common/main/lib/component/ComboBoxFonts.js index 24ed6905..ceb97cc5 100644 --- a/OfficeWeb/apps/common/main/lib/component/ComboBoxFonts.js +++ b/OfficeWeb/apps/common/main/lib/component/ComboBoxFonts.js @@ -41,16 +41,22 @@ define(["common/main/lib/component/ComboBox"], function () { thumbCanvas = document.createElement("canvas"), thumbContext = thumbCanvas.getContext("2d"), thumbPath = "../../../sdk/Common/Images/fonts_thumbnail.png", - thumbPath2x = "../../../sdk/Common/Images/fonts_thumbnail@2x.png"; + thumbPath2x = "../../../sdk/Common/Images/fonts_thumbnail@2x.png", + listItemHeight = 36; + if (typeof window["AscDesktopEditor"] === "object") { + thumbPath = window["AscDesktopEditor"].getFontsSprite(); + thumbPath2x = window["AscDesktopEditor"].getFontsSprite(true); + } thumbCanvas.height = isRetina ? iconHeight * 2 : iconHeight; thumbCanvas.width = isRetina ? iconWidth * 2 : iconWidth; return { - template: _.template(['
', '', '
', '', '", "
"].join("")), + template: _.template(['
', '', '
', '', '", "
"].join("")), initialize: function (options) { Common.UI.ComboBox.prototype.initialize.call(this, _.extend(options, { displayField: "name" })); this.recent = _.isNumber(options.recent) ? options.recent : 3; + this.bindUpdateVisibleFontsTiles = _.bind(this.updateVisibleFontsTiles, this); Common.NotificationCenter.on("fonts:change", _.bind(this.onApiChangeFont, this)); Common.NotificationCenter.on("fonts:load", _.bind(this.fillFonts, this)); }, @@ -64,20 +70,86 @@ define(["common/main/lib/component/ComboBox"], function () { this._input.on("keyup", _.bind(this.onInputKeyUp, this)); this._input.on("keydown", _.bind(this.onInputKeyDown, this)); this.scroller.update({ - alwaysVisibleY: true + alwaysVisibleY: true, + onChange: this.bindUpdateVisibleFontsTiles }); return this; }, + onAfterKeydownMenu: function (e) { + var me = this; + if (e.keyCode == Common.UI.Keys.RETURN) { + if ($(e.target).closest("input").length) { + if (this.lastValue !== this._input.val()) { + this._input.trigger("change"); + } + } else { + $(e.target).click(); + if (this.rendered) { + if (Common.Utils.isIE) { + this._input.trigger("change", { + onkeydown: true + }); + } else { + this._input.blur(); + } + } + } + return false; + } else { + if (e.keyCode == Common.UI.Keys.ESC && this.isMenuOpen()) { + this._input.val(this.lastValue); + setTimeout(function () { + me.closeMenu(); + me.onAfterHideMenu(e); + }, + 10); + return false; + } else { + if ((e.keyCode == Common.UI.Keys.HOME || e.keyCode == Common.UI.Keys.END || e.keyCode == Common.UI.Keys.BACKSPACE) && this.isMenuOpen()) { + setTimeout(function () { + me._input.focus(); + }, + 10); + } + } + } + this.updateVisibleFontsTiles(); + }, onInputKeyUp: function (e) { - if (e.keyCode != Common.UI.Keys.RETURN) { - this.selectCandidate(); + if (e.keyCode != Common.UI.Keys.RETURN && e.keyCode !== Common.UI.Keys.SHIFT && e.keyCode !== Common.UI.Keys.CTRL && e.keyCode !== Common.UI.Keys.ALT && e.keyCode !== Common.UI.Keys.LEFT && e.keyCode !== Common.UI.Keys.RIGHT && e.keyCode !== Common.UI.Keys.HOME && e.keyCode !== Common.UI.Keys.END && e.keyCode !== Common.UI.Keys.ESC && e.keyCode !== Common.UI.Keys.INSERT && e.keyCode !== Common.UI.Keys.TAB) { + e.stopPropagation(); + this.selectCandidate(e.keyCode == Common.UI.Keys.DELETE || e.keyCode == Common.UI.Keys.BACKSPACE); + if (this._selectedItem) { + var me = this; + setTimeout(function () { + var input = me._input[0], + text = me._selectedItem.get(me.displayField), + inputVal = input.value; + if (me.rendered) { + if (document.selection) { + document.selection.createRange().text = text; + } else { + if (input.selectionStart || input.selectionStart == "0") { + input.value = text; + input.selectionStart = inputVal.length; + input.selectionEnd = text.length; + } + } + } + }, + 10); + } } }, onInputKeyDown: function (e) { var me = this; if (e.keyCode == Common.UI.Keys.ESC) { - this.closeMenu(); - this.onAfterHideMenu(e); + this._input.val(this.lastValue); + setTimeout(function () { + me.closeMenu(); + me.onAfterHideMenu(e); + }, + 10); } else { if (e.keyCode != Common.UI.Keys.RETURN && e.keyCode != Common.UI.Keys.CTRL && e.keyCode != Common.UI.Keys.SHIFT && e.keyCode != Common.UI.Keys.ALT) { if (!this.isMenuOpen()) { @@ -87,10 +159,11 @@ define(["common/main/lib/component/ComboBox"], function () { _.delay(function () { var selected = me.cmpEl.find("ul li.selected a"); if (selected.length <= 0) { - selected = me.cmpEl.find("ul li:first a"); + selected = me.cmpEl.find("ul li:not(.divider):first a"); } me._skipInputChange = true; selected.focus(); + me.updateVisibleFontsTiles(); }, 10); } else { @@ -120,6 +193,7 @@ define(["common/main/lib/component/ComboBox"], function () { return; } record[this.valueField] = val; + record[this.displayField] = val; this.trigger("changed:before", this, record, e); if (e.isDefaultPrevented()) { return; @@ -129,6 +203,12 @@ define(["common/main/lib/component/ComboBox"], function () { this.setRawValue(record[this.valueField]); this.trigger("selected", this, _.extend({}, this._selectedItem.toJSON()), e); + this.addItemToRecent(this._selectedItem); + this.closeMenu(); + } else { + this.setRawValue(record[this.valueField]); + record["isNewFont"] = true; + this.trigger("selected", this, record, e); this.closeMenu(); } this.trigger("changed:after", this, record, e); @@ -153,6 +233,9 @@ define(["common/main/lib/component/ComboBox"], function () { getImageHeight: function () { return iconHeight; }, + getListItemHeight: function () { + return listItemHeight; + }, loadSprite: function (callback) { if (callback) { this.spriteThumbs = new Image(); @@ -200,28 +283,11 @@ define(["common/main/lib/component/ComboBox"], function () { var record = this.store.findWhere({ id: el.attr("id") }); - if (record.get("type") != FONT_TYPE_RECENT && !this.store.findWhere({ - name: record.get("name"), - type: FONT_TYPE_RECENT - })) { - var fonts = this.store.where({ - type: FONT_TYPE_RECENT - }); - if (! (fonts.length < this.recent)) { - this.store.remove(fonts[0]); - } - var new_record = record.clone(); - new_record.set({ - "type": FONT_TYPE_RECENT, - "id": Common.UI.getId(), - cloneid: record.id - }); - this.store.add(new_record); - } + this.addItemToRecent(record); Common.UI.ComboBox.prototype.itemClicked.apply(this, arguments); }, onInsertItem: function (item) { - $(this.el).find("ul").prepend(_.template(['
  • ', '', '', "", "
  • "].join(""), { + $(this.el).find("ul").prepend(_.template(['
  • ', '', "
  • "].join(""), { item: item.attributes, scope: this })); @@ -229,6 +295,17 @@ define(["common/main/lib/component/ComboBox"], function () { onRemoveItem: function (item, store, opts) { $(this.el).find("ul > li#" + item.id).remove(); }, + onBeforeShowMenu: function (e) { + Common.UI.ComboBox.prototype.onBeforeShowMenu.apply(this, arguments); + if (!this.getSelectedRecord() && !!this.getRawValue()) { + var record = this.store.where({ + name: this.getRawValue() + }); + if (record && record.length) { + this.selectRecord(record[record.length - 1]); + } + } + }, onAfterShowMenu: function (e) { if (this.recent > 0) { if (this.scroller && !this._scrollerIsInited) { @@ -240,20 +317,52 @@ define(["common/main/lib/component/ComboBox"], function () { } else { Common.UI.ComboBox.prototype.onAfterShowMenu.apply(this, arguments); } + this.updateVisibleFontsTiles(null, 0); }, - selectCandidate: function () { + onAfterHideMenu: function (e) { + if (this.lastValue !== this._input.val()) { + this._input.val(this.lastValue); + } + this.flushVisibleFontsTiles(); + Common.UI.ComboBox.prototype.onAfterHideMenu.apply(this, arguments); + }, + addItemToRecent: function (record) { + if (record.get("type") != FONT_TYPE_RECENT && !this.store.findWhere({ + name: record.get("name"), + type: FONT_TYPE_RECENT + })) { + var fonts = this.store.where({ + type: FONT_TYPE_RECENT + }); + if (! (fonts.length < this.recent)) { + this.store.remove(fonts[this.recent - 1]); + } + var new_record = record.clone(); + new_record.set({ + "type": FONT_TYPE_RECENT, + "id": Common.UI.getId(), + cloneid: record.id + }); + this.store.add(new_record, { + at: 0 + }); + } + }, + selectCandidate: function (full) { var me = this, inputVal = this._input.val().toLowerCase(); if (!this._fontsArray) { this._fontsArray = this.store.toJSON(); } var font = _.find(this._fontsArray, function (font) { - return (font[me.displayField].toLowerCase().indexOf(inputVal) == 0); + return (full) ? (font[me.displayField].toLowerCase() == inputVal) : (font[me.displayField].toLowerCase().indexOf(inputVal) == 0); }); if (font) { this._selectedItem = this.store.findWhere({ id: font.id }); + } else { + this._selectedItem = null; } $(".selected", $(this.el)).removeClass("selected"); if (this._selectedItem) { @@ -268,6 +377,63 @@ define(["common/main/lib/component/ComboBox"], function () { } } } + }, + updateVisibleFontsTiles: function (e, scrollY) { + var me = this, + j = 0, + storeCount = me.store.length, + index = 0; + if (!me.tiles) { + me.tiles = []; + } + if (storeCount !== me.tiles.length) { + for (j = me.tiles.length; j < storeCount; ++j) { + me.tiles.push(null); + } + } + if (_.isUndefined(scrollY)) { + scrollY = parseInt($(me.el).find(".ps-scrollbar-x-rail").css("bottom")); + } + var scrollH = $(me.el).find(".dropdown-menu").height(), + count = Math.max(Math.floor(scrollH / listItemHeight) + 3, 0), + from = Math.max(Math.floor(-(scrollY / listItemHeight)) - 1, 0), + to = from + count; + var listItems = $(me.el).find("a"); + for (j = 0; j < storeCount; ++j) { + if (from <= j && j < to) { + if (null === me.tiles[j]) { + var fontImage = document.createElement("canvas"); + var context = fontImage.getContext("2d"); + fontImage.height = isRetina ? iconHeight * 2 : iconHeight; + fontImage.width = isRetina ? iconWidth * 2 : iconWidth; + fontImage.style.width = iconWidth + "px"; + fontImage.style.height = iconHeight + "px"; + index = me.store.at(j).get("imgidx"); + if (isRetina) { + context.clearRect(0, 0, iconWidth * 2, iconHeight * 2); + context.drawImage(me.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * 2 * index); + } else { + context.clearRect(0, 0, iconWidth, iconHeight); + context.drawImage(me.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * index); + } + me.tiles[j] = fontImage; + $(listItems[j]).get(0).appendChild(fontImage); + } + } else { + if (me.tiles[j]) { + me.tiles[j].parentNode.removeChild(me.tiles[j]); + me.tiles[j] = null; + } + } + } + }, + flushVisibleFontsTiles: function () { + for (var j = this.tiles.length - 1; j >= 0; --j) { + if (this.tiles[j]) { + this.tiles[j].parentNode.removeChild(this.tiles[j]); + this.tiles[j] = null; + } + } } }; })()); diff --git a/OfficeWeb/apps/common/main/lib/controller/Chat.js b/OfficeWeb/apps/common/main/lib/controller/Chat.js index d1f060d1..c3cbbea3 100644 --- a/OfficeWeb/apps/common/main/lib/controller/Chat.js +++ b/OfficeWeb/apps/common/main/lib/controller/Chat.js @@ -51,13 +51,13 @@ setMode: function (mode) { this.mode = mode; if (this.api) { - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { this.api.asc_registerCallback("asc_onCoAuthoringChatReceiveMessage", _.bind(this.onReceiveMessage, this)); } this.api.asc_registerCallback("asc_onAuthParticipantsChanged", _.bind(this.onUsersChanged, this)); this.api.asc_registerCallback("asc_onConnectionStateChanged", _.bind(this.onUserConnection, this)); this.api.asc_coAuthoringGetUsers(); - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { this.api.asc_coAuthoringChatGetMessages(); } } diff --git a/OfficeWeb/apps/common/main/lib/controller/Comments.js b/OfficeWeb/apps/common/main/lib/controller/Comments.js index 540fd362..0d3ccb50 100644 --- a/OfficeWeb/apps/common/main/lib/controller/Comments.js +++ b/OfficeWeb/apps/common/main/lib/controller/Comments.js @@ -616,6 +616,9 @@ define(["core", "common/main/lib/model/Comment", "common/main/lib/collection/Com if (hint && this.isSelectedComment && (0 === _.difference(this.uids, uids).length)) { return; } + if (this.mode && !this.mode.canComments) { + hint = true; + } if (this.getPopover()) { this.clearDummyComment(); if (this.isSelectedComment && (0 === _.difference(this.uids, uids).length)) { @@ -817,7 +820,7 @@ define(["core", "common/main/lib/model/Comment", "common/main/lib/collection/Com this.view.update(); }, disableHint: function (comment) { - if (comment) { + if (comment && this.mode.canComments) { comment.set("hint", false); this.isSelectedComment = true; } diff --git a/OfficeWeb/apps/common/main/lib/controller/History.js b/OfficeWeb/apps/common/main/lib/controller/History.js new file mode 100644 index 00000000..826892f2 --- /dev/null +++ b/OfficeWeb/apps/common/main/lib/controller/History.js @@ -0,0 +1,119 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2015 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, + * EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + define(["core", "common/main/lib/collection/HistoryVersions", "common/main/lib/view/History"], function () { + Common.Controllers.History = Backbone.Controller.extend(_.extend({ + models: [], + collections: ["Common.Collections.HistoryVersions"], + views: ["Common.Views.History"], + initialize: function () { + this.currentChangeId = -1; + this.currentArrColors = []; + this.currentDocId = ""; + this.currentDocIdPrev = ""; + }, + events: {}, + onLaunch: function () { + this.panelHistory = this.createView("Common.Views.History", { + storeHistory: this.getApplication().getCollection("Common.Collections.HistoryVersions") + }); + this.panelHistory.on("render:after", _.bind(this.onAfterRender, this)); + Common.Gateway.on("sethistorydata", _.bind(this.onSetHistoryData, this)); + }, + setApi: function (api) { + this.api = api; + }, + onAfterRender: function (historyView) { + historyView.viewHistoryList.on("item:click", _.bind(this.onSelectRevision, this)); + historyView.btnBackToDocument.on("click", _.bind(this.onClickBackToDocument, this)); + }, + onSelectRevision: function (picker, item, record) { + var url = record.get("url"), + rev = record.get("revision"); + this.currentChangeId = record.get("changeid"); + this.currentArrColors = record.get("arrColors"); + this.currentDocId = record.get("docId"); + this.currentDocIdPrev = record.get("docIdPrev"); + if (_.isEmpty(url)) { + _.delay(function () { + Common.Gateway.requestHistoryData(rev); + }, + 10); + } else { + var urlDiff = record.get("urlDiff"), + hist = new Asc.asc_CVersionHistory(); + hist.asc_setDocId(_.isEmpty(urlDiff) ? this.currentDocId : this.currentDocIdPrev); + hist.asc_setUrl(url); + hist.asc_setUrlChanges(urlDiff); + hist.asc_setCurrentChangeId(this.currentChangeId); + hist.asc_setArrColors(this.currentArrColors); + this.api.asc_showRevision(hist); + } + }, + onSetHistoryData: function (opts) { + if (opts.data.error) { + var config = { + closable: false, + title: this.notcriticalErrorTitle, + msg: opts.data.error, + iconCls: "warn", + buttons: ["ok"] + }; + Common.UI.alert(config); + } else { + var data = opts.data; + var historyStore = this.getApplication().getCollection("Common.Collections.HistoryVersions"); + if (historyStore && data !== null) { + var rev, revisions = historyStore.findRevisions(data.version); + if (revisions && revisions.length > 0) { + for (var i = 0; i < revisions.length; i++) { + rev = revisions[i]; + rev.set("url", opts.data.url); + rev.set("urlDiff", opts.data.urlDiff); + } + } + var hist = new Asc.asc_CVersionHistory(); + hist.asc_setUrl(opts.data.url); + hist.asc_setUrlChanges(opts.data.urlDiff); + hist.asc_setDocId(_.isEmpty(opts.data.urlDiff) ? this.currentDocId : this.currentDocIdPrev); + hist.asc_setCurrentChangeId(this.currentChangeId); + hist.asc_setArrColors(this.currentArrColors); + this.api.asc_showRevision(hist); + } + } + }, + onClickBackToDocument: function () { + Common.Gateway.requestHistoryClose(); + }, + notcriticalErrorTitle: "Warning" + }, + Common.Controllers.History || {})); +}); \ No newline at end of file diff --git a/OfficeWeb/apps/common/main/lib/model/HistoryVersion.js b/OfficeWeb/apps/common/main/lib/model/HistoryVersion.js new file mode 100644 index 00000000..72ab8889 --- /dev/null +++ b/OfficeWeb/apps/common/main/lib/model/HistoryVersion.js @@ -0,0 +1,57 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2015 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, + * EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + if (Common === undefined) { + var Common = {}; +} +Common.Models = Common.Models || {}; +define(["underscore", "backbone", "common/main/lib/component/BaseView"], function (_, Backbone) { + Common.Models.HistoryVersion = Backbone.Model.extend({ + defaults: function () { + return { + version: 0, + revision: 0, + changeid: undefined, + userid: undefined, + username: "Guest", + usercolor: "#ff0000", + created: undefined, + id: Common.UI.getId(), + url: "", + urlDiff: "", + docId: "", + docIdPrev: "", + arrColors: [], + markedAsVersion: false + }; + } + }); +}); \ No newline at end of file diff --git a/OfficeWeb/apps/common/main/lib/model/User.js b/OfficeWeb/apps/common/main/lib/model/User.js index c4611152..15e76803 100644 --- a/OfficeWeb/apps/common/main/lib/model/User.js +++ b/OfficeWeb/apps/common/main/lib/model/User.js @@ -36,6 +36,7 @@ id: undefined, username: "Guest", color: "#fff", + colorval: null, online: false } }); diff --git a/OfficeWeb/apps/common/main/lib/mods/perfect-scrollbar.js b/OfficeWeb/apps/common/main/lib/mods/perfect-scrollbar.js index 5828720f..e4790028 100644 --- a/OfficeWeb/apps/common/main/lib/mods/perfect-scrollbar.js +++ b/OfficeWeb/apps/common/main/lib/mods/perfect-scrollbar.js @@ -211,6 +211,9 @@ scrollbarXLeft = containerWidth - scrollbarXWidth; } updateScrollbarCss(); + if (settings.onChange) { + settings.onChange(this); + } }; var bindMouseScrollXHandler = function () { var currentLeft, currentPageX; diff --git a/OfficeWeb/apps/common/main/lib/util/utils.js b/OfficeWeb/apps/common/main/lib/util/utils.js index 24657b37..4146862a 100644 --- a/OfficeWeb/apps/common/main/lib/util/utils.js +++ b/OfficeWeb/apps/common/main/lib/util/utils.js @@ -490,6 +490,27 @@ Common.Utils.showBrowserRestriction = function () { $("#loading-mask").hide().remove(); $("#viewport").hide().remove(); }; +Common.Utils.applyCustomization = function (config, elmap) { + for (var name in config) { + var $el; + if ( !! elmap[name]) { + $el = $(elmap[name]); + if ($el.length) { + var item = config[name]; + if (item === false || item.visible === false) { + $el.hide(); + } else { + if ( !! item.text) { + $el.text(item.text); + } + if (item.visible === false) { + $el.hide(); + } + } + } + } + } +}; String.prototype.strongMatch = function (regExp) { if (regExp && regExp instanceof RegExp) { var arr = this.toString().match(regExp); diff --git a/OfficeWeb/apps/common/main/lib/view/About.js b/OfficeWeb/apps/common/main/lib/view/About.js index 9ba529fa..d19d3156 100644 --- a/OfficeWeb/apps/common/main/lib/view/About.js +++ b/OfficeWeb/apps/common/main/lib/view/About.js @@ -68,20 +68,21 @@ return this; }, setLicInfo: function (data) { - if (data && typeof(data) == "object") { + if (data && typeof(data) == "object" && typeof(data.customer) == "object") { + var customer = data.customer; $("#id-about-licensor-logo").addClass("hidden"); $("#id-about-licensor-short").removeClass("hidden"); this.cntLicensorInfo.addClass("hidden"); this.cntLicenseeInfo.removeClass("hidden"); this.cntLicensorInfo.removeClass("margin-bottom"); - var value = data.customer; + var value = customer.name; value && value.length ? this.lblCompanyName.text(value) : this.lblCompanyName.parents("tr").addClass("hidden"); - value = data.customerAddr; + value = customer.address; value && value.length ? this.lblCompanyAddress.text(value) : this.lblCompanyAddress.parents("tr").addClass("hidden"); - (value = data.customerMail) && value.length ? this.lblCompanyMail.attr("href", "mailto:" + value).text(value) : this.lblCompanyMail.parents("tr").addClass("hidden"); - (value = data.customerWww) && value.length ? this.lblCompanyUrl.attr("href", "http://" + value).text(value) : this.lblCompanyUrl.parents("tr").addClass("hidden"); - (value = data.customerInfo) && value.length ? this.lblCompanyLic.text(value) : this.lblCompanyLic.parents("tr").addClass("hidden"); - (value = data.customerLogo) && value.length ? this.divCompanyLogo.html('') : this.divCompanyLogo.parents("tr").addClass("hidden"); + (value = customer.mail) && value.length ? this.lblCompanyMail.attr("href", "mailto:" + value).text(value) : this.lblCompanyMail.parents("tr").addClass("hidden"); + (value = customer.www) && value.length ? this.lblCompanyUrl.attr("href", "http://" + value).text(value) : this.lblCompanyUrl.parents("tr").addClass("hidden"); + (value = customer.info) && value.length ? this.lblCompanyLic.text(value) : this.lblCompanyLic.parents("tr").addClass("hidden"); + (value = customer.logo) && value.length ? this.divCompanyLogo.html('') : this.divCompanyLogo.parents("tr").addClass("hidden"); } else { this.cntLicenseeInfo.addClass("hidden"); this.cntLicensorInfo.addClass("margin-bottom"); diff --git a/OfficeWeb/apps/common/main/lib/view/Header.js b/OfficeWeb/apps/common/main/lib/view/Header.js index 7f182121..130132ec 100644 --- a/OfficeWeb/apps/common/main/lib/view/Header.js +++ b/OfficeWeb/apps/common/main/lib/view/Header.js @@ -54,7 +54,7 @@ define(["backbone", "text!common/main/lib/template/Header.template", "core"], fu this.headerCaption = this.options.headerCaption; this.documentCaption = this.options.documentCaption; this.canBack = this.options.canBack; - this.branding = this.options.branding; + this.branding = this.options.customization; }, render: function () { $(this.el).html(this.template({ diff --git a/OfficeWeb/apps/common/main/lib/view/History.js b/OfficeWeb/apps/common/main/lib/view/History.js new file mode 100644 index 00000000..628bf1b9 --- /dev/null +++ b/OfficeWeb/apps/common/main/lib/view/History.js @@ -0,0 +1,66 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2015 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, + * EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + if (Common === undefined) { + var Common = {}; +} +Common.Views = Common.Views || {}; +define(["common/main/lib/util/utils", "common/main/lib/component/BaseView", "common/main/lib/component/Layout"], function (template) { + Common.Views.History = Common.UI.BaseView.extend(_.extend({ + el: "#left-panel-history", + storeHistory: undefined, + template: _.template(['
    ', '
    ', '', "
    ", '
    ', "
    ", "
    "].join("")), + initialize: function (options) { + _.extend(this, options); + Common.UI.BaseView.prototype.initialize.call(this, arguments); + }, + render: function (el) { + el = el || this.el; + $(el).html(this.template({ + scope: this + })).width((parseInt(localStorage.getItem("de-mainmenu-width")) || MENU_SCALE_PART) - SCALE_MIN); + this.viewHistoryList = new Common.UI.DataView({ + el: $("#history-list"), + store: this.storeHistory, + enableKeyEvents: false, + itemTemplate: _.template(['
    ', '
    <%= created %>
    ', "<% if (markedAsVersion) { %>", '
    ver.<%=version%>
    ', "<% } %>", '
    ', '
    ;" + '" >', "
    <%= Common.Utils.String.htmlEncode(username) %>", "
    ", "
    "].join("")) + }); + this.btnBackToDocument = new Common.UI.Button({ + el: $("#history-btn-back"), + enableToggle: false + }); + this.trigger("render:after", this); + return this; + }, + textHistoryHeader: "Back to Document" + }, + Common.Views.History || {})); +}); \ No newline at end of file diff --git a/OfficeWeb/apps/common/main/resources/less/dropdown-menu.less b/OfficeWeb/apps/common/main/resources/less/dropdown-menu.less index 6967a29f..275a0cbc 100644 --- a/OfficeWeb/apps/common/main/resources/less/dropdown-menu.less +++ b/OfficeWeb/apps/common/main/resources/less/dropdown-menu.less @@ -43,7 +43,6 @@ display: inline-block; float: left; margin-left: -18px; - background-image: ~"url('@{common-image-path}/@{common-controls}')"; background-repeat: no-repeat; background-position: @menu-check-offset-x @menu-check-offset-y; .background-ximage('@{common-image-path}/@{common-controls}', '@{common-image-path}/@{common-controls2x}', 100px); diff --git a/OfficeWeb/apps/common/main/resources/less/history.less b/OfficeWeb/apps/common/main/resources/less/history.less new file mode 100644 index 00000000..1a7f36ea --- /dev/null +++ b/OfficeWeb/apps/common/main/resources/less/history.less @@ -0,0 +1,129 @@ +#history-box { + position: relative; + width: 100%; + height: 100%; + border-collapse: collapse; + background-color: #f4f4f4; + border-right: 1px solid #cbcbcb; + + .layout-resizer { + border-bottom:none !important; + border-top:none !important; + + &.move { + border-top: 1px solid @gray-dark !important; + border-bottom: 1px solid @gray-dark !important; + opacity: 0.4; + } + } + + #history-header { + position: absolute; + height: 45px; + text-align: center; + left: 0; + top: 0; + right: 0; + overflow: hidden; + border-bottom: 1px solid @gray-dark; + + label { + color: @black; + font-size: 12px; + font-family: arial; + line-height: normal; + border-bottom: 1px dotted @black; + padding-top: 12px; + outline: none; + height: 29px; + cursor: pointer; + } + } + + #history-list { + height: 100%; + overflow: hidden; + padding-top: 45px; + + .dataview { + & > div:not(.ps-scrollbar-x-rail):not(.ps-scrollbar-y-rail) { + display: block; + border: none; + width: 100%; + .box-shadow(none); + margin: 0; + font-size: 12px; + + &:hover:not(.selected), + &.over { + background-color: #e5e5e5; + + .user-version { + color: #fff; + background-color: #ababab; + } + } + + &.selected { + background-color: @primary; + + .user-date { + color: #fff; + } + + .user-name { + color: #fff; + } + } + } + + .history-item-wrap { + padding: 10px 2px 15px 20px; + + .user-date { + display: inline-block; + color: @gray-deep; + font-size: 12px; + font-weight: bold; + min-width: 135px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .user-version { + display: inline-block; + width: 36px; + height: 18px; + color: @primary; + font-size: 10px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + background-color: #e6e6e6; + text-align: center; + padding: 1px 0; + border-radius: 2px; + } + + .user-name { + width: 100%; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + color: @gray-deep; + font-size: 12px; + cursor: pointer; + } + + .color { + width: 12px; + height: 12px; + border: 1px solid @gray-dark; + margin: 0 5px 3px 0; + vertical-align: middle; + } + } + } + } +} \ No newline at end of file diff --git a/OfficeWeb/apps/common/main/resources/less/scroller.less b/OfficeWeb/apps/common/main/resources/less/scroller.less index 5373e0f9..639d6b59 100644 --- a/OfficeWeb/apps/common/main/resources/less/scroller.less +++ b/OfficeWeb/apps/common/main/resources/less/scroller.less @@ -21,11 +21,6 @@ width: 9px; background-color: @gray-light; -// background-image: ~"url('@{common-image-path}/controls/Scroll_center.png')"; -// background-image: ~"-webkit-image-set(url('@{common-image-path}/controls/Scroll_center.png') 1x, url('@{common-image-path}/controls/Scroll_center@2x.png') 2x)"; - /*background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RURFNzkyNkE0RTFGMTFFNDkyRUNFRUEwNkNERTY4N0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RURFNzkyNkI0RTFGMTFFNDkyRUNFRUEwNkNERTY4N0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFREU3OTI2ODRFMUYxMUU0OTJFQ0VFQTA2Q0RFNjg3RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFREU3OTI2OTRFMUYxMUU0OTJFQ0VFQTA2Q0RFNjg3RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtLoUWcAAAA2SURBVHjaYvz//z8DCFy4cAHCgABGEGFoaAjmfPz4EUOOAaQRppkUwDhq46iNdLORGUQABBgA2y5vq3CS7yUAAAAASUVORK5CYII=');*/ - /*background-image: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RURFNzkyNkE0RTFGMTFFNDkyRUNFRUEwNkNERTY4N0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RURFNzkyNkI0RTFGMTFFNDkyRUNFRUEwNkNERTY4N0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFREU3OTI2ODRFMUYxMUU0OTJFQ0VFQTA2Q0RFNjg3RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFREU3OTI2OTRFMUYxMUU0OTJFQ0VFQTA2Q0RFNjg3RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtLoUWcAAAA2SURBVHjaYvz//z8DCFy4cAHCgABGEGFoaAjmfPz4EUOOAaQRppkUwDhq46iNdLORGUQABBgA2y5vq3CS7yUAAAAASUVORK5CYII=') 1x,*/ - /*url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAaCAYAAACkVDyJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDlFQjdBRjE0RTFGMTFFNDk3Q0ZDOUVBNkQwRkFGNTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDlFQjdBRjI0RTFGMTFFNDk3Q0ZDOUVBNkQwRkFGNTYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEOUVCN0FFRjRFMUYxMUU0OTdDRkM5RUE2RDBGQUY1NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEOUVCN0FGMDRFMUYxMUU0OTdDRkM5RUE2RDBGQUY1NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PupPpWQAAABYSURBVHjaYvz//z8DMrhw4QKqABQYGBgwMuABnz59wqqPj48PRR8TA50BCxYxRjLNIkrfoPDhfzJ9QJS+0TgcjcPROByNw9E4HI3D0TgcjcPROCQDAAQYAPFLF1XTzO2YAAAAAElFTkSuQmCC') 2x);*/ .background-ximage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RURFNzkyNkE0RTFGMTFFNDkyRUNFRUEwNkNERTY4N0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RURFNzkyNkI0RTFGMTFFNDkyRUNFRUEwNkNERTY4N0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFREU3OTI2ODRFMUYxMUU0OTJFQ0VFQTA2Q0RFNjg3RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFREU3OTI2OTRFMUYxMUU0OTJFQ0VFQTA2Q0RFNjg3RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtLoUWcAAAA2SURBVHjaYvz//z8DCFy4cAHCgABGEGFoaAjmfPz4EUOOAaQRppkUwDhq46iNdLORGUQABBgA2y5vq3CS7yUAAAAASUVORK5CYII=', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAaCAYAAACkVDyJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDlFQjdBRjE0RTFGMTFFNDk3Q0ZDOUVBNkQwRkFGNTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDlFQjdBRjI0RTFGMTFFNDk3Q0ZDOUVBNkQwRkFGNTYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEOUVCN0FFRjRFMUYxMUU0OTdDRkM5RUE2RDBGQUY1NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEOUVCN0FGMDRFMUYxMUU0OTdDRkM5RUE2RDBGQUY1NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PupPpWQAAABYSURBVHjaYvz//z8DMrhw4QKqABQYGBgwMuABnz59wqqPj48PRR8TA50BCxYxRjLNIkrfoPDhfzJ9QJS+0TgcjcPROByNw9E4HI3D0TgcjcPROCQDAAQYAPFLF1XTzO2YAAAAAElFTkSuQmCC', 14px); diff --git a/OfficeWeb/apps/documenteditor/embed/index.html b/OfficeWeb/apps/documenteditor/embed/index.html index 3b609fd6..2e78d59f 100644 --- a/OfficeWeb/apps/documenteditor/embed/index.html +++ b/OfficeWeb/apps/documenteditor/embed/index.html @@ -198,7 +198,7 @@
      -
    • +
    • diff --git a/OfficeWeb/apps/documenteditor/embed/index.html.deploy b/OfficeWeb/apps/documenteditor/embed/index.html.deploy index 34109e0c..cf710f0e 100644 --- a/OfficeWeb/apps/documenteditor/embed/index.html.deploy +++ b/OfficeWeb/apps/documenteditor/embed/index.html.deploy @@ -188,7 +188,7 @@
        -
      • +
      • diff --git a/OfficeWeb/apps/documenteditor/embed/js/ApplicationController.js b/OfficeWeb/apps/documenteditor/embed/js/ApplicationController.js index 87bd2c5c..82f79701 100644 --- a/OfficeWeb/apps/documenteditor/embed/js/ApplicationController.js +++ b/OfficeWeb/apps/documenteditor/embed/js/ApplicationController.js @@ -30,7 +30,8 @@ * */ var ApplicationController = new(function () { - var me, api, docConfig = {}, + var me, api, config = {}, + docConfig = {}, embedConfig = {}, permissions = {}, maxPages = 0, @@ -40,6 +41,7 @@ embedCode = '', maxZIndex = 9090, created = false; + Common.Analytics.initialize("UA-12442749-13", "Embedded ONLYOFFICE Document"); if (typeof isBrowserSupported !== "undefined" && !isBrowserSupported()) { Common.Gateway.reportError(undefined, "Your browser is not supported."); return; @@ -80,6 +82,7 @@ } } function loadConfig(data) { + config = $.extend(config, data.config); embedConfig = $.extend(embedConfig, data.config.embedded); $("#id-short-url").val(embedConfig.shareUrl || "Unavailable"); $("#id-textarea-embed").text(embedCode.replace("{embed-url}", embedConfig.embedUrl).replace("{width}", minEmbedWidth).replace("{height}", minEmbedHeight)); @@ -99,7 +102,7 @@ if (typeof embedConfig.fullscreenUrl === "undefined") { $("#id-btn-fullscreen").hide(); } - if (typeof data.config.canBackToFolder === "undefined" || !data.config.canBackToFolder) { + if (typeof config.canBackToFolder === "undefined" || !config.canBackToFolder) { $("#id-btn-close").hide(); } if (embedConfig.toolbarDocked === "top") { @@ -125,6 +128,8 @@ docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); if (api) { + api.asc_registerCallback("asc_onGetEditorPermissions", onEditorPermissions); + api.asc_getEditorPermissions(); api.LoadDocument(docInfo); api.Resize(); api.zoomFitToWidth(); @@ -207,6 +212,15 @@ hidePreloader(); Common.Analytics.trackEvent("Load", "Complete"); } + function onEditorPermissions(params) { + if (params.asc_getCanBranding() && (typeof config.customization == "object") && config.customization && config.customization.logoUrlEmbedded) { + $("#header-logo").css({ + "background-image": 'url("' + config.customization.logoUrlEmbedded + '")', + "background-position": "0 center", + "background-repeat": "no-repeat" + }); + } + } function showMask() { $("#id-loadmask").modal({ backdrop: "static", diff --git a/OfficeWeb/apps/documenteditor/main/app.js b/OfficeWeb/apps/documenteditor/main/app.js index 5f10e35d..5e8967f6 100644 --- a/OfficeWeb/apps/documenteditor/main/app.js +++ b/OfficeWeb/apps/documenteditor/main/app.js @@ -43,6 +43,8 @@ require.config({ jmousewheel: "../vendor/perfect-scrollbar/src/jquery.mousewheel", xregexp: "../vendor/xregexp/xregexp-all-min", sockjs: "../vendor/sockjs/sockjs.min", + jszip: "../vendor/jszip/jszip.min", + jsziputils: "../vendor/jszip-utils/jszip-utils.min", allfonts: "../sdk/Common/AllFonts", sdk: "../sdk/Word/sdk-all", api: "api/documents/api", @@ -76,7 +78,7 @@ require.config({ deps: ["backbone", "notification", "irregularstack"] }, sdk: { - deps: ["jquery", "underscore", "allfonts", "xregexp", "sockjs"] + deps: ["jquery", "underscore", "allfonts", "xregexp", "sockjs", "jszip", "jsziputils"] }, gateway: { deps: ["jquery"] @@ -91,10 +93,10 @@ require(["backbone", "bootstrap", "core", "sdk", "api", "analytics", "gateway", var app = new Backbone.Application({ nameSpace: "DE", autoCreate: false, - controllers: ["Viewport", "DocumentHolder", "Toolbar", "Statusbar", "RightMenu", "LeftMenu", "Main", "Common.Controllers.Fonts", "Common.Controllers.Chat", "Common.Controllers.Comments", "Common.Controllers.ExternalDiagramEditor"] + controllers: ["Viewport", "DocumentHolder", "Toolbar", "Statusbar", "RightMenu", "LeftMenu", "Main", "Common.Controllers.Fonts", "Common.Controllers.History", "Common.Controllers.Chat", "Common.Controllers.Comments", "Common.Controllers.ExternalDiagramEditor"] }); Common.Locale.apply(); - require(["documenteditor/main/app/controller/Viewport", "documenteditor/main/app/controller/DocumentHolder", "documenteditor/main/app/controller/Toolbar", "documenteditor/main/app/controller/Statusbar", "documenteditor/main/app/controller/RightMenu", "documenteditor/main/app/controller/LeftMenu", "documenteditor/main/app/controller/Main", "documenteditor/main/app/view/ParagraphSettings", "documenteditor/main/app/view/HeaderFooterSettings", "documenteditor/main/app/view/ImageSettings", "documenteditor/main/app/view/TableSettings", "documenteditor/main/app/view/ShapeSettings", "common/main/lib/util/utils", "common/main/lib/controller/Fonts", "common/main/lib/controller/Comments", "common/main/lib/controller/Chat", "documenteditor/main/app/view/ChartSettings", "common/main/lib/controller/ExternalDiagramEditor"], function () { + require(["documenteditor/main/app/controller/Viewport", "documenteditor/main/app/controller/DocumentHolder", "documenteditor/main/app/controller/Toolbar", "documenteditor/main/app/controller/Statusbar", "documenteditor/main/app/controller/RightMenu", "documenteditor/main/app/controller/LeftMenu", "documenteditor/main/app/controller/Main", "documenteditor/main/app/view/ParagraphSettings", "documenteditor/main/app/view/HeaderFooterSettings", "documenteditor/main/app/view/ImageSettings", "documenteditor/main/app/view/TableSettings", "documenteditor/main/app/view/ShapeSettings", "common/main/lib/util/utils", "common/main/lib/controller/Fonts", "common/main/lib/controller/History", "common/main/lib/controller/Comments", "common/main/lib/controller/Chat", "documenteditor/main/app/view/ChartSettings", "common/main/lib/controller/ExternalDiagramEditor"], function () { app.start(); }); }); \ No newline at end of file diff --git a/OfficeWeb/apps/documenteditor/main/app/controller/LeftMenu.js b/OfficeWeb/apps/documenteditor/main/app/controller/LeftMenu.js index d8010fb9..c49309e0 100644 --- a/OfficeWeb/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/OfficeWeb/apps/documenteditor/main/app/controller/LeftMenu.js @@ -92,10 +92,13 @@ this.api.asc_registerCallback("asc_onReplaceAll", _.bind(this.onApiTextReplaced, this)); this.api.asc_registerCallback("asc_onСoAuthoringDisconnect", _.bind(this.onApiServerDisconnect, this)); Common.NotificationCenter.on("api:disconnect", _.bind(this.onApiServerDisconnect, this)); - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { this.api.asc_registerCallback("asc_onCoAuthoringChatReceiveMessage", _.bind(this.onApiChatMessage, this)); } this.leftMenu.getMenu("file").setApi(api); + if (this.mode.canUseHistory) { + this.getApplication().getController("Common.Controllers.History").setApi(this.api); + } return this; }, setMode: function (mode) { @@ -106,14 +109,21 @@ }, createDelayedElements: function () { if (this.mode.canCoAuthoring) { - this.leftMenu.btnComments[this.mode.isEdit ? "show" : "hide"](); - this.leftMenu.btnChat.show(); - this.leftMenu.setOptionsPanel("chat", this.getApplication().getController("Common.Controllers.Chat").getView("Common.Views.Chat")); - this.leftMenu.setOptionsPanel("comment", this.getApplication().getController("Common.Controllers.Comments").getView("Common.Views.Comments")); + this.leftMenu.btnComments[this.mode.isEdit && this.mode.canComments ? "show" : "hide"](); + if (this.mode.canComments) { + this.leftMenu.setOptionsPanel("comment", this.getApplication().getController("Common.Controllers.Comments").getView("Common.Views.Comments")); + } + this.leftMenu.btnChat[this.mode.canChat ? "show" : "hide"](); + if (this.mode.canChat) { + this.leftMenu.setOptionsPanel("chat", this.getApplication().getController("Common.Controllers.Chat").getView("Common.Views.Chat")); + } } else { this.leftMenu.btnChat.hide(); this.leftMenu.btnComments.hide(); } + if (this.mode.canUseHistory) { + this.leftMenu.setOptionsPanel("history", this.getApplication().getController("Common.Controllers.History").getView("Common.Views.History")); + } Common.util.Shortcuts.resumeEvents(); return this; }, @@ -142,6 +152,30 @@ this.onCreateNew(undefined, "blank"); } break; + case "history": + if (this.api.isDocumentModified()) { + var me = this; + this.api.asc_stopSaving(); + Common.UI.warning({ + closable: false, + title: this.notcriticalErrorTitle, + msg: this.leavePageText, + buttons: ["ok", "cancel"], + primary: "ok", + callback: _.bind(function (btn) { + if (btn == "ok") { + me.api.asc_undoAllChanges(); + me.showHistory(); + } else { + me.api.asc_continueSaving(); + } + }, + this) + }); + } else { + this.showHistory(); + } + break; default: close_menu = false; } @@ -231,7 +265,7 @@ } }, clickStatusbarUsers: function () { - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { if (this.leftMenu.btnChat.pressed) { this.leftMenu.close(); } else { @@ -333,6 +367,14 @@ this.dlgSearch["hide"](); } }, + SetDisabled: function (disable) { + this.mode.isEdit = !disable; + if (disable) { + this.leftMenu.close(); + } + this.leftMenu.btnComments.setDisabled(disable); + this.leftMenu.btnChat.setDisabled(disable); + }, onApiChatMessage: function () { this.leftMenu.markCoauthOptions(); }, @@ -405,13 +447,13 @@ } break; case "chat": - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { Common.UI.Menu.Manager.hideAll(); this.leftMenu.showMenu("chat"); } return false; case "comments": - if (this.mode.canCoAuthoring && this.mode.isEdit) { + if (this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) { Common.UI.Menu.Manager.hideAll(); this.leftMenu.showMenu("comments"); this.getApplication().getController("Common.Controllers.Comments").focusOnInput(); @@ -419,11 +461,25 @@ return false; } }, + showHistory: function () { + var maincontroller = DE.getController("Main"); + if (!maincontroller.loadMask) { + maincontroller.loadMask = new Common.UI.LoadMask({ + owner: $("#viewport") + }); + } + maincontroller.loadMask.setTitle(this.textLoadHistory); + maincontroller.loadMask.show(); + Common.Gateway.requestHistory(); + }, textNoTextFound: "Text not found", newDocumentTitle: "Unnamed document", requestEditRightsText: "Requesting editing rights...", textReplaceSuccess: "Search has been done. {0} occurrences have been replaced", - textReplaceSkipped: "The replacement has been made. {0} occurrences were skipped." + textReplaceSkipped: "The replacement has been made. {0} occurrences were skipped.", + textLoadHistory: "Loading versions history...", + notcriticalErrorTitle: "Warning", + leavePageText: "All unsaved changes in this document will be lost.
        Click 'Cancel' then 'Save' to save them. Click 'OK' to discard all the unsaved changes." }, DE.Controllers.LeftMenu || {})); }); \ No newline at end of file diff --git a/OfficeWeb/apps/documenteditor/main/app/controller/Main.js b/OfficeWeb/apps/documenteditor/main/app/controller/Main.js index 80c459ed..1637e012 100644 --- a/OfficeWeb/apps/documenteditor/main/app/controller/Main.js +++ b/OfficeWeb/apps/documenteditor/main/app/controller/Main.js @@ -33,9 +33,14 @@ DE.Controllers.Main = Backbone.Controller.extend(_.extend((function () { var ApplyEditRights = -255; var LoadingDocument = -256; + var mapCustomizationElements = { + about: "button#left-btn-about", + feedback: "button#left-btn-support", + goback: "#fm-btn-back > a, #header-back > div" + }; return { models: [], - collections: ["ShapeGroups", "EquationGroups"], + collections: ["ShapeGroups", "EquationGroups", "Common.Collections.HistoryUsers"], views: [], initialize: function () {}, onLaunch: function () { @@ -49,7 +54,9 @@ return obj1.type === obj2.type; } }); - this._state = {}; + this._state = { + isDisconnected: false + }; if (!Common.Utils.isBrowserSupported()) { Common.Utils.showBrowserRestriction(); Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText); @@ -161,8 +168,9 @@ this.appOptions.user = this.editorConfig.user; this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.editorConfig.canBackToFolder === true; this.appOptions.nativeApp = this.editorConfig.nativeApp === true; - this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl); - this.appOptions.canOpenRecent = this.editorConfig.nativeApp !== true && this.editorConfig.recent !== undefined; + this.appOptions.isDesktopApp = this.editorConfig.targetApp == "desktop"; + this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl) && !this.appOptions.isDesktopApp; + this.appOptions.canOpenRecent = this.editorConfig.nativeApp !== true && this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp; this.appOptions.templates = this.editorConfig.templates; this.appOptions.recent = this.editorConfig.recent; this.appOptions.createUrl = this.editorConfig.createUrl; @@ -190,7 +198,6 @@ docInfo.put_UserId(this.editorConfig.user.id); docInfo.put_UserName(this.editorConfig.user.name); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); - docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); } this.api.asc_registerCallback("asc_onGetEditorPermissions", _.bind(this.onEditorPermissions, this)); this.api.asc_setDocInfo(docInfo); @@ -211,7 +218,7 @@ onProcessRightsChange: function (data) { if (data && data.enabled === false) { this.api.asc_coAuthoringDisconnect(); - this.getApplication().getController("LeftMenu").leftMenu.getMenu("file").panels["info"].onLostEditRights(); + this.getApplication().getController("LeftMenu").leftMenu.getMenu("file").panels["rights"].onLostEditRights(); Common.UI.warning({ title: this.notcriticalErrorTitle, msg: _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message @@ -227,6 +234,144 @@ } } }, + onRefreshHistory: function (opts) { + this.loadMask && this.loadMask.hide(); + if (opts.data.error) { + var config = { + closable: false, + title: this.notcriticalErrorTitle, + msg: opts.data.error, + iconCls: "warn", + buttons: ["ok"], + callback: _.bind(function (btn) { + this.onEditComplete(); + }, + this) + }; + Common.UI.alert(config); + } else { + this.api.asc_coAuthoringDisconnect(); + this.getApplication().getController("LeftMenu").getView("LeftMenu").showHistory(); + this.disableEditing(true); + var versions = opts.data.history, + historyStore = this.getApplication().getCollection("Common.Collections.HistoryVersions"), + currentVersion = null; + if (historyStore) { + var arrVersions = [], + ver, + version, + group = -1, + prev_ver = -1, + arrColors = [], + docIdPrev = "", + usersStore = this.getApplication().getCollection("Common.Collections.HistoryUsers"), + user = null, + usersCnt = 0; + for (ver = versions.length - 1; ver >= 0; ver--) { + version = versions[ver]; + if (version && version.user) { + docIdPrev = (ver > 0 && versions[ver - 1]) ? versions[ver - 1].key : version.key + "0"; + user = usersStore.findUser(version.user.id); + if (!user) { + user = new Common.Models.User({ + id: version.user.id, + username: version.user.name, + colorval: c_oAscArrUserColors[usersCnt], + color: this.generateUserColor(c_oAscArrUserColors[usersCnt++]) + }); + usersStore.add(user); + } + arrVersions.push(new Common.Models.HistoryVersion({ + version: version.version_group, + revision: version.version, + userid: version.user.id, + username: version.user.name, + usercolor: user.get("color"), + created: version.created, + docId: version.key, + markedAsVersion: (group !== version.version_group), + selected: (opts.data.currentVersion == version.version) + })); + if (opts.data.currentVersion == version.version) { + currentVersion = arrVersions[arrVersions.length - 1]; + } + group = version.version_group; + if (prev_ver !== version.version) { + prev_ver = version.version; + arrColors.reverse(); + for (i = 0; i < arrColors.length; i++) { + arrVersions[arrVersions.length - i - 2].set("arrColors", arrColors); + } + arrColors = []; + } + arrColors.push(user.get("colorval")); + var changes = version.changes, + change, i; + if (changes) { + if (changes.length > 0) { + arrVersions[arrVersions.length - 1].set("changeid", changes.length - 1); + arrVersions[arrVersions.length - 1].set("docIdPrev", docIdPrev); + } + for (i = changes.length - 2; i >= 0; i--) { + change = changes[i]; + user = usersStore.findUser(change.user.id); + if (!user) { + user = new Common.Models.User({ + id: change.user.id, + username: change.user.name, + colorval: c_oAscArrUserColors[usersCnt], + color: this.generateUserColor(c_oAscArrUserColors[usersCnt++]) + }); + usersStore.add(user); + } + arrVersions.push(new Common.Models.HistoryVersion({ + version: version.version_group, + revision: version.version, + changeid: i, + userid: change.user.id, + username: change.user.name, + usercolor: user.get("color"), + created: change.created, + docId: version.key, + docIdPrev: docIdPrev, + selected: false + })); + arrColors.push(user.get("colorval")); + } + } + } + } + if (arrColors.length > 0) { + arrColors.reverse(); + for (i = 0; i < arrColors.length; i++) { + arrVersions[arrVersions.length - i - 1].set("arrColors", arrColors); + } + arrColors = []; + } + historyStore[historyStore.size() > 0 ? "add" : "reset"](arrVersions); + if (currentVersion) { + this.getApplication().getController("Common.Controllers.History").onSelectRevision(null, null, currentVersion); + } + } + } + }, + generateUserColor: function (color) { + return "#" + ("000000" + color.toString(16)).substr(-6); + }, + disableEditing: function (disable) { + var app = this.getApplication(); + if (this.appOptions.isEdit) { + app.getController("Toolbar").DisableToolbar(disable, disable); + app.getController("RightMenu").SetDisabled(disable, false); + app.getController("Statusbar").getView("Statusbar").btnLanguage.setDisabled(disable); + app.getController("Statusbar").getView("Statusbar").btnDocLanguage.setDisabled(disable); + var tooltip = app.getController("Toolbar").getView("Toolbar").synchTooltip; + if (tooltip) { + tooltip.hide(); + } + } + app.getController("LeftMenu").SetDisabled(disable); + }, goBack: function () { Common.Gateway.goBack(); }, @@ -429,9 +574,11 @@ value = window.localStorage.getItem("de-settings-spellcheck"); me.api.asc_setSpellCheck(value === null || parseInt(value) == 1); window.localStorage.setItem("de-settings-showsnaplines", me.api.get_ShowSnapLines() ? 1 : 0); - Common.Utils.isIE9m && tips.push(me.warnBrowserIE9); ! Common.Utils.isGecko && (Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, "{0}")); - if (tips.length) { - me.showTips(tips); + if ( !! window["AscDesktopEditor"]) { + Common.Utils.isIE9m && tips.push(me.warnBrowserIE9); ! Common.Utils.isGecko && (Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, "{0}")); + if (tips.length) { + me.showTips(tips); + } } me.api.asc_registerCallback("asc_onStartAction", _.bind(me.onLongActionBegin, me)); me.api.asc_registerCallback("asc_onEndAction", _.bind(me.onLongActionEnd, me)); @@ -463,7 +610,7 @@ statusbarController.createDelayedElements(); leftmenuController.getView("LeftMenu").disableMenu("all", false); if (me.appOptions.canBranding) { - me.getApplication().getController("LeftMenu").leftMenu.getMenu("about").setLicInfo(me.editorConfig.branding); + me.getApplication().getController("LeftMenu").leftMenu.getMenu("about").setLicInfo(me.editorConfig.customization); } documentHolderController.getView("DocumentHolder").setApi(me.api).on("editcomplete", _.bind(me.onEditComplete, me)); if (me.appOptions.isEdit) { @@ -500,26 +647,33 @@ } me.api.asc_setAutoSaveGap(value); if (this.appOptions.canAnalytics) { - Common.Gateway.on("applyeditrights", _.bind(me.onApplyEditRights, me)); + Common.component.Analytics.initialize("UA-12442749-13", "Document Editor"); } + Common.Gateway.on("applyeditrights", _.bind(me.onApplyEditRights, me)); Common.Gateway.on("processsaveresult", _.bind(me.onProcessSaveResult, me)); Common.Gateway.on("processrightschange", _.bind(me.onProcessRightsChange, me)); Common.Gateway.on("processmouse", _.bind(me.onProcessMouse, me)); + Common.Gateway.on("refreshhistory", _.bind(me.onRefreshHistory, me)); $(document).on("contextmenu", _.bind(me.onContextMenu, me)); }, onOpenDocument: function () {}, onEditorPermissions: function (params) { this.permissions.edit !== false && (this.permissions.edit = params.asc_getCanEdit()); this.permissions.download !== false && (this.permissions.download = params.asc_getCanDownload()); - this.appOptions.canCoAuthoring = params.asc_getCanCoAuthoring(); + this.appOptions.canCoAuthoring = true; this.appOptions.canEdit = this.permissions.edit === true; this.appOptions.isEdit = this.appOptions.canEdit && this.editorConfig.mode !== "view"; this.appOptions.canDownload = !this.appOptions.nativeApp && this.permissions.download; this.appOptions.canAutosave = this.editorConfig.canAutosave !== false && params.asc_getIsAutosaveEnable(); this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); - this.appOptions.canBranding = params.asc_getCanBranding() && (typeof(this.editorConfig.branding) == "object"); + this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false; + this.appOptions.canComments = this.appOptions.canLicense && !((typeof(this.editorConfig.customization) == "object") && this.editorConfig.customization.comments === false); + this.appOptions.canChat = this.appOptions.canLicense && !((typeof(this.editorConfig.customization) == "object") && this.editorConfig.customization.chat === false); + this.appOptions.customization = this.editorConfig.customization; + this.appOptions.canUseHistory = this.appOptions.canLicense && this.editorConfig.canUseHistory && this.appOptions.canEdit && this.appOptions.canCoAuthoring; + this.appOptions.canBranding = params.asc_getCanBranding() && (typeof(this.editorConfig.customization) == "object"); if (this.appOptions.canBranding) { - this.getApplication().getController("Viewport").getView("Common.Views.Header").setBranding(this.editorConfig.branding); + this.getApplication().getController("Viewport").getView("Common.Views.Header").setBranding(this.editorConfig.customization); } this.applyModeCommonElements(); this.applyModeEditorElements(); @@ -541,7 +695,7 @@ documentHolder = app.getController("DocumentHolder").getView("DocumentHolder"); if (headerView) { headerView.setHeaderCaption(this.appOptions.isEdit ? "Document Editor" : "Document Viewer"); - headerView.setVisible(!this.appOptions.nativeApp && !value); + headerView.setVisible(!this.appOptions.nativeApp && !value && !this.appOptions.isDesktopApp); } if (this.appOptions.nativeApp) { $("body").removeClass("safari"); @@ -817,6 +971,10 @@ } }, hidePreloader: function () { + if ( !! this.appOptions.customization && !this.appOptions.customization.done) { + this.appOptions.customization.done = true; + Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); + } Common.NotificationCenter.trigger("layout:changed", "main"); $("#loading-mask").hide().remove(); }, diff --git a/OfficeWeb/apps/documenteditor/main/app/controller/RightMenu.js b/OfficeWeb/apps/documenteditor/main/app/controller/RightMenu.js index e83d5d8d..47850f5d 100644 --- a/OfficeWeb/apps/documenteditor/main/app/controller/RightMenu.js +++ b/OfficeWeb/apps/documenteditor/main/app/controller/RightMenu.js @@ -209,12 +209,7 @@ this._settings[c_oAscTypeSelectElement.Shape].needShow = false; }, onCoAuthoringDisconnect: function () { - if (this.rightmenu) { - this.rightmenu.SetDisabled("", true, true); - } - this.setMode({ - isEdit: false - }); + this.SetDisabled(true, false); }, onInsertTable: function () { this._settings[c_oAscTypeSelectElement.Table].needShow = true; @@ -274,6 +269,32 @@ this.rightmenu.SetActivePane(type, true); this._settings[type].panel.ChangeSettings.call(this._settings[type].panel, this._settings[type].props); } + }, + SetDisabled: function (disabled, allowMerge) { + if (this.rightmenu) { + this.rightmenu.paragraphSettings.disableControls(disabled); + this.rightmenu.shapeSettings.disableControls(disabled); + this.rightmenu.headerSettings.disableControls(disabled); + this.rightmenu.tableSettings.disableControls(disabled); + this.rightmenu.imageSettings.disableControls(disabled); + this.rightmenu.chartSettings.disableControls(disabled); + if (disabled) { + this.rightmenu.btnText.setDisabled(disabled); + this.rightmenu.btnTable.setDisabled(disabled); + this.rightmenu.btnImage.setDisabled(disabled); + this.rightmenu.btnHeaderFooter.setDisabled(disabled); + this.rightmenu.btnShape.setDisabled(disabled); + this.rightmenu.btnChart.setDisabled(disabled); + } else { + var selectedElements = this.api.getSelectedElements(); + if (selectedElements.length > 0) { + this.onFocusObject(selectedElements); + } + } + } + this.setMode({ + isEdit: !disabled + }); } }); }); \ No newline at end of file diff --git a/OfficeWeb/apps/documenteditor/main/app/controller/Toolbar.js b/OfficeWeb/apps/documenteditor/main/app/controller/Toolbar.js index 60fade94..74d11b81 100644 --- a/OfficeWeb/apps/documenteditor/main/app/controller/Toolbar.js +++ b/OfficeWeb/apps/documenteditor/main/app/controller/Toolbar.js @@ -756,20 +756,24 @@ onCopyPaste: function (copy, e) { var me = this; if (me.api) { - var value = window.localStorage.getItem("de-hide-copywarning"); - if (! (value && parseInt(value) == 1) && this._state.show_copywarning) { - (new Common.Views.CopyWarningDialog({ - handler: function (dontshow) { - copy ? me.api.Copy() : me.api.Paste(); - if (dontshow) { - window.localStorage.setItem("de-hide-copywarning", 1); - } - Common.NotificationCenter.trigger("edit:complete", me.toolbar); - } - })).show(); - } else { + if (typeof window["AscDesktopEditor"] === "object") { copy ? me.api.Copy() : me.api.Paste(); - Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } else { + var value = window.localStorage.getItem("de-hide-copywarning"); + if (! (value && parseInt(value) == 1) && this._state.show_copywarning) { + (new Common.Views.CopyWarningDialog({ + handler: function (dontshow) { + copy ? me.api.Copy() : me.api.Paste(); + if (dontshow) { + window.localStorage.setItem("de-hide-copywarning", 1); + } + Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } + })).show(); + } else { + copy ? me.api.Copy() : me.api.Paste(); + Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } } Common.component.Analytics.trackEvent("ToolBar", "Copy Warning"); } else { @@ -2302,7 +2306,11 @@ }); this.editMode = false; }, - DisableToolbar: function (disable) { + DisableToolbar: function (disable, viewMode) { + if (viewMode !== undefined) { + this.editMode = !viewMode; + } + disable = disable || !this.editMode; var mask = $(".toolbar-mask"); if (disable && mask.length > 0 || !disable && mask.length == 0) { return; diff --git a/OfficeWeb/apps/documenteditor/main/app/controller/Viewport.js b/OfficeWeb/apps/documenteditor/main/app/controller/Viewport.js index d00dcb3d..7b251095 100644 --- a/OfficeWeb/apps/documenteditor/main/app/controller/Viewport.js +++ b/OfficeWeb/apps/documenteditor/main/app/controller/Viewport.js @@ -45,8 +45,11 @@ }).render(); Common.NotificationCenter.on("layout:changed", _.bind(this.onLayoutChanged, this)); $(window).on("resize", _.bind(this.onWindowResize, this)); + var leftPanel = $("#left-menu"), + histPanel = $("#left-panel-history"); this.viewport.hlayout.on("layout:resizedrag", function () { this.api.Resize(); + localStorage.setItem("de-mainmenu-width", histPanel.is(":visible") ? (histPanel.width() + SCALE_MIN) : leftPanel.width()); }, this); this.boxSdk = $("#editor_sdk"); @@ -59,6 +62,14 @@ case "rightmenu": this.viewport.hlayout.doLayout(); break; + case "history": + var panel = this.viewport.hlayout.items[1]; + if (panel.resize.el) { + this.boxSdk.css("border-left", ""); + panel.resize.el.show(); + } + this.viewport.hlayout.doLayout(); + break; case "leftmenu": var panel = this.viewport.hlayout.items[0]; if (panel.resize.el) { diff --git a/OfficeWeb/apps/documenteditor/main/app/template/FileMenu.template b/OfficeWeb/apps/documenteditor/main/app/template/FileMenu.template index 7076563b..04588b9b 100644 --- a/OfficeWeb/apps/documenteditor/main/app/template/FileMenu.template +++ b/OfficeWeb/apps/documenteditor/main/app/template/FileMenu.template @@ -11,6 +11,8 @@
      • +
      • +
      • @@ -23,6 +25,7 @@
        +
        \ No newline at end of file diff --git a/OfficeWeb/apps/documenteditor/main/app/template/Viewport.template b/OfficeWeb/apps/documenteditor/main/app/template/Viewport.template index 6e652321..6d545747 100644 --- a/OfficeWeb/apps/documenteditor/main/app/template/Viewport.template +++ b/OfficeWeb/apps/documenteditor/main/app/template/Viewport.template @@ -9,6 +9,7 @@
        +
        diff --git a/OfficeWeb/apps/documenteditor/main/app/view/DocumentHolder.js b/OfficeWeb/apps/documenteditor/main/app/view/DocumentHolder.js index 35814621..b335514f 100644 --- a/OfficeWeb/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/OfficeWeb/apps/documenteditor/main/app/view/DocumentHolder.js @@ -649,7 +649,7 @@ this.api.asc_registerCallback("asc_doubleClickOnChart", onDoubleClickOnChart); this.api.asc_registerCallback("asc_onSpellCheckVariantsFound", _.bind(onSpellCheckVariantsFound, this)); } - this.mode = m; ! (this.mode.canCoAuthoring && this.mode.isEdit) ? Common.util.Shortcuts.suspendEvents(hkComments) : Common.util.Shortcuts.resumeEvents(hkComments); + this.mode = m; ! (this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) ? Common.util.Shortcuts.suspendEvents(hkComments) : Common.util.Shortcuts.resumeEvents(hkComments); this.editorConfig = { user: m.user }; @@ -797,7 +797,7 @@ } }, addComment: function (item, e, eOpt) { - if (this.api && this.mode.canCoAuthoring && this.mode.isEdit) { + if (this.api && this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) { this.suppressEditComplete = true; this.api.asc_enableKeyEvents(false); var controller = DE.getController("Common.Controllers.Comments"); @@ -840,20 +840,24 @@ onCutCopyPaste: function (item, e) { var me = this; if (me.api) { - var value = window.localStorage.getItem("de-hide-copywarning"); - if (! (value && parseInt(value) == 1) && me.show_copywarning) { - (new Common.Views.CopyWarningDialog({ - handler: function (dontshow) { - (item.value == "cut") ? me.api.Cut() : ((item.value == "copy") ? me.api.Copy() : me.api.Paste()); - if (dontshow) { - window.localStorage.setItem("de-hide-copywarning", 1); - } - me.fireEvent("editcomplete", me); - } - })).show(); - } else { + if (typeof window["AscDesktopEditor"] === "object") { (item.value == "cut") ? me.api.Cut() : ((item.value == "copy") ? me.api.Copy() : me.api.Paste()); - me.fireEvent("editcomplete", me); + } else { + var value = window.localStorage.getItem("de-hide-copywarning"); + if (! (value && parseInt(value) == 1) && me.show_copywarning) { + (new Common.Views.CopyWarningDialog({ + handler: function (dontshow) { + (item.value == "cut") ? me.api.Cut() : ((item.value == "copy") ? me.api.Copy() : me.api.Paste()); + if (dontshow) { + window.localStorage.setItem("de-hide-copywarning", 1); + } + me.fireEvent("editcomplete", me); + } + })).show(); + } else { + (item.value == "cut") ? me.api.Cut() : ((item.value == "copy") ? me.api.Copy() : me.api.Paste()); + me.fireEvent("editcomplete", me); + } } } else { me.fireEvent("editcomplete", me); @@ -1548,7 +1552,7 @@ menuAddHyperlinkTable.hyperProps.value = new CHyperlinkProperty(); menuAddHyperlinkTable.hyperProps.value.put_Text(text); } - menuAddCommentTable.setVisible(me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring); + menuAddCommentTable.setVisible(me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments); menuAddCommentTable.setDisabled(value.paraProps !== undefined && value.paraProps.locked === true); menuParagraphTable.setVisible(value.paraProps !== undefined); if (value.paraProps) { @@ -1836,8 +1840,8 @@ if (me.api) { text = me.api.can_AddHyperlink(); } - menuCommentSeparatorPara.setVisible(!isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring); - menuAddCommentPara.setVisible(!isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring); + menuCommentSeparatorPara.setVisible(!isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments); + menuAddCommentPara.setVisible(!isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments); menuAddCommentPara.setDisabled(value.paraProps && value.paraProps.locked === true); me.menuSpellPara.setVisible(value.spellProps !== undefined && value.spellProps.value.get_Checked() === false); menuSpellcheckParaSeparator.setVisible(value.spellProps !== undefined && value.spellProps.value.get_Checked() === false); diff --git a/OfficeWeb/apps/documenteditor/main/app/view/FileMenu.js b/OfficeWeb/apps/documenteditor/main/app/view/FileMenu.js index 929d583b..f3844374 100644 --- a/OfficeWeb/apps/documenteditor/main/app/view/FileMenu.js +++ b/OfficeWeb/apps/documenteditor/main/app/view/FileMenu.js @@ -102,6 +102,16 @@ action: "info", caption: this.btnInfoCaption, canFocused: false + }), new Common.UI.MenuItem({ + el: $("#fm-btn-rights", this.el), + action: "rights", + caption: this.btnRightsCaption, + canFocused: false + }), new Common.UI.MenuItem({ + el: $("#fm-btn-history", this.el), + action: "history", + caption: this.btnHistoryCaption, + canFocused: false }), new Common.UI.MenuItem({ el: $("#fm-btn-settings", this.el), action: "opts", @@ -131,6 +141,9 @@ "info": (new DE.Views.FileMenuPanels.DocumentInfo({ menu: me })).render(), + "rights": (new DE.Views.FileMenuPanels.DocumentRights({ + menu: me + })).render(), "help": (new DE.Views.FileMenuPanels.Help({ menu: me })).render() @@ -162,16 +175,17 @@ this.api.asc_enableKeyEvents(true); }, applyMode: function () { - this.items[0][this.mode.canBack ? "show" : "hide"](); - this.items[0].$el.find("+.devider")[this.mode.canBack ? "show" : "hide"](); this.items[5][this.mode.canOpenRecent ? "show" : "hide"](); this.items[6][this.mode.canCreateNew ? "show" : "hide"](); this.items[6].$el.find("+.devider")[this.mode.canCreateNew ? "show" : "hide"](); this.items[3][this.mode.canDownload ? "show" : "hide"](); this.items[1][this.mode.isEdit ? "show" : "hide"](); this.items[2][!this.mode.isEdit && this.mode.canEdit ? "show" : "hide"](); + this.mode.canBack ? this.$el.find("#fm-btn-back").show().prev().show() : this.$el.find("#fm-btn-back").hide().prev().hide(); + this.items[8][(this.document && this.document.info && (this.document.info.sharingSettings && this.document.info.sharingSettings.length > 0 || this.mode.sharingSettingsUrl && this.mode.sharingSettingsUrl.length)) ? "show" : "hide"](); this.panels["opts"].setMode(this.mode); this.panels["info"].setMode(this.mode).updateInfo(this.document); + this.panels["rights"].setMode(this.mode).updateInfo(this.document); if (this.mode.canCreateNew) { if (this.mode.templates && this.mode.templates.length) { $("a", this.items[6].$el).text(this.btnCreateNewCaption + "..."); @@ -189,12 +203,16 @@ })).render(); } } + if (this.mode.isDesktopApp) {} this.panels["help"].setLangConfig(this.mode.lang); + this.items[9][this.mode.canUseHistory ? "show" : "hide"](); + this.items[9].setDisabled(this.mode.isDisconnected); }, setMode: function (mode, delay) { if (mode.isDisconnected) { this.mode.canEdit = this.mode.isEdit = false; this.mode.canOpenRecent = this.mode.canCreateNew = false; + this.mode.isDisconnected = mode.isDisconnected; } else { this.mode = mode; } @@ -230,6 +248,7 @@ btnSaveCaption: "Save", btnDownloadCaption: "Download as...", btnInfoCaption: "Document Info...", + btnRightsCaption: "Access Rights...", btnCreateNewCaption: "Create New", btnRecentFilesCaption: "Open Recent...", btnPrintCaption: "Print", @@ -237,7 +256,8 @@ btnReturnCaption: "Back to Document", btnToEditCaption: "Edit Document", btnBackCaption: "Go to Documents", - btnSettingsCaption: "Advanced Settings..." + btnSettingsCaption: "Advanced Settings...", + btnHistoryCaption: "Versions History" }, DE.Views.FileMenu || {})); }); \ No newline at end of file diff --git a/OfficeWeb/apps/documenteditor/main/app/view/FileMenuPanels.js b/OfficeWeb/apps/documenteditor/main/app/view/FileMenuPanels.js index dd70e491..47167175 100644 --- a/OfficeWeb/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/OfficeWeb/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -398,8 +398,7 @@ initialize: function (options) { Common.UI.BaseView.prototype.initialize.call(this, arguments); this.rendered = false; - this.template = _.template(['', "", '", '', "", '', '", '', "", '', '", '', "", '', '", '', "", '', '', '", '', "", '', '", "", '', "", '", '", "", "
        -
        ', "", "", "", '', "", "", "", '', "", "", "", '', "", "", "", '', "", "", "", '', "", "
        ", "
        "].join("")); - this.templateRights = _.template(["", "<% _.each(users, function(item) { %>", "", '', "", "", "<% }); %>", "
        <%= Common.Utils.String.htmlEncode(item.user) %><%= Common.Utils.String.htmlEncode(item.permissions) %>
        "].join("")); + this.template = _.template(['', "", '", '', "", '', '", '', "", '', '", '', "", '', '", '', "", '', "", '", '", "", "
        -
        ', "", "", "", '', "", "", "", '', "", "", "", '', "", "", "", '', "", "", "", '', "", "
        ", "
        "].join("")); this.infoObj = { PageCount: 0, WordsCount: 0, @@ -421,11 +420,6 @@ this.lblStatParagraphs = $("#id-info-paragraphs"); this.lblStatSymbols = $("#id-info-symbols"); this.lblStatSpaces = $("#id-info-spaces"); - this.cntRights = $("#id-info-rights"); - this.btnEditRights = new Common.UI.Button({ - el: "#id-info-btn-edit" - }); - this.btnEditRights.on("click", _.bind(this.changeAccessRights, this)); this.rendered = true; this.updateInfo(this.doc); if (_.isUndefined(this.scroller)) { @@ -464,13 +458,6 @@ this.lblPlacement.text(doc.info.folder); } this._ShowHideInfoItem("placement", doc.info.folder !== undefined && doc.info.folder !== null); - if (doc.info.sharingSettings) { - this.cntRights.html(this.templateRights({ - users: doc.info.sharingSettings - })); - } - this._ShowHideInfoItem("rights", doc.info.sharingSettings !== undefined && doc.info.sharingSettings !== null && this._readonlyRights !== true); - this._ShowHideInfoItem("edit-rights", !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && this._readonlyRights !== true); } else { this._ShowHideDocInfo(false); } @@ -482,8 +469,6 @@ this._ShowHideInfoItem("date", visible); this._ShowHideInfoItem("placement", visible); this._ShowHideInfoItem("author", visible); - this._ShowHideInfoItem("rights", visible); - this._ShowHideInfoItem("edit-rights", visible); }, updateStatisticInfo: function () { if (this.api && this.doc) { @@ -504,7 +489,6 @@ return this; }, setMode: function (mode) { - this.sharingSettingsUrl = mode.sharingSettingsUrl; return this; }, _onGetDocInfoStart: function () { @@ -556,6 +540,85 @@ this.lblStatSymbols.text(this.infoObj.SymbolsCount); this.lblStatSpaces.text(this.infoObj.SymbolsWSCount); }, + txtTitle: "Document Title", + txtAuthor: "Author", + txtPlacement: "Placement", + txtDate: "Creation Date", + txtStatistics: "Statistics", + txtPages: "Pages", + txtWords: "Words", + txtParagraphs: "Paragraphs", + txtSymbols: "Symbols", + txtSpaces: "Symbols with spaces", + txtLoading: "Loading..." + }, + DE.Views.FileMenuPanels.DocumentInfo || {})); + DE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ + el: "#panel-rights", + menu: undefined, + initialize: function (options) { + Common.UI.BaseView.prototype.initialize.call(this, arguments); + this.rendered = false; + this.template = _.template(['', '', '", '', "", '', '", "", "
        "].join("")); + this.templateRights = _.template(["", "<% _.each(users, function(item) { %>", "", '', "", "", "<% }); %>", "
        <%= Common.Utils.String.htmlEncode(item.user) %><%= Common.Utils.String.htmlEncode(item.permissions) %>
        "].join("")); + this.menu = options.menu; + }, + render: function () { + $(this.el).html(this.template()); + this.cntRights = $("#id-info-rights"); + this.btnEditRights = new Common.UI.Button({ + el: "#id-info-btn-edit" + }); + this.btnEditRights.on("click", _.bind(this.changeAccessRights, this)); + this.rendered = true; + this.updateInfo(this.doc); + if (_.isUndefined(this.scroller)) { + this.scroller = new Common.UI.Scroller({ + el: $(this.el), + suppressScrollX: true + }); + } + return this; + }, + show: function () { + Common.UI.BaseView.prototype.show.call(this, arguments); + }, + hide: function () { + Common.UI.BaseView.prototype.hide.call(this, arguments); + }, + updateInfo: function (doc) { + this.doc = doc; + if (!this.rendered) { + return; + } + doc = doc || {}; + if (doc.info) { + if (doc.info.sharingSettings) { + this.cntRights.html(this.templateRights({ + users: doc.info.sharingSettings + })); + } + this._ShowHideInfoItem("rights", doc.info.sharingSettings !== undefined && doc.info.sharingSettings !== null && doc.info.sharingSettings.length > 0); + this._ShowHideInfoItem("edit-rights", !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && this._readonlyRights !== true); + } else { + this._ShowHideDocInfo(false); + } + }, + _ShowHideInfoItem: function (cls, visible) { + $("tr." + cls, this.el)[visible ? "show" : "hide"](); + }, + _ShowHideDocInfo: function (visible) { + this._ShowHideInfoItem("rights", visible); + this._ShowHideInfoItem("edit-rights", visible); + }, + setApi: function (o) { + this.api = o; + return this; + }, + setMode: function (mode) { + this.sharingSettingsUrl = mode.sharingSettingsUrl; + return this; + }, changeAccessRights: function (btn, event, opts) { var me = this; var win = new Common.Views.DocumentAccessDialog({ @@ -563,6 +626,7 @@ }); win.on("accessrights", function (obj, rights) { me.doc.info.sharingSettings = rights; + me._ShowHideInfoItem("rights", me.doc.info.sharingSettings !== undefined && me.doc.info.sharingSettings !== null && me.doc.info.sharingSettings.length > 0); me.cntRights.html(me.templateRights({ users: me.doc.info.sharingSettings })); @@ -574,24 +638,12 @@ if (!this.rendered) { return; } - this._ShowHideInfoItem("rights", false); this._ShowHideInfoItem("edit-rights", false); }, - txtTitle: "Document Title", - txtAuthor: "Author", - txtPlacement: "Placement", - txtDate: "Creation Date", txtRights: "Persons who have rights", - txtStatistics: "Statistics", - txtPages: "Pages", - txtWords: "Words", - txtParagraphs: "Paragraphs", - txtSymbols: "Symbols", - txtSpaces: "Symbols with spaces", - txtLoading: "Loading...", txtBtnAccessRights: "Change access rights" }, - DE.Views.FileMenuPanels.DocumentInfo || {})); + DE.Views.FileMenuPanels.DocumentRights || {})); DE.Views.FileMenuPanels.Help = Common.UI.BaseView.extend({ el: "#panel-help", menu: undefined, diff --git a/OfficeWeb/apps/documenteditor/main/app/view/LeftMenu.js b/OfficeWeb/apps/documenteditor/main/app/view/LeftMenu.js index 8b6e5e60..b83e1893 100644 --- a/OfficeWeb/apps/documenteditor/main/app/view/LeftMenu.js +++ b/OfficeWeb/apps/documenteditor/main/app/view/LeftMenu.js @@ -29,7 +29,7 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ - define(["text!documenteditor/main/app/template/LeftMenu.template", "jquery", "underscore", "backbone", "common/main/lib/component/Button", "common/main/lib/view/About", "common/main/lib/view/Comments", "common/main/lib/view/Chat", "common/main/lib/view/About", "common/main/lib/view/SearchDialog", "documenteditor/main/app/view/FileMenu"], function (menuTemplate, $, _, Backbone) { + define(["text!documenteditor/main/app/template/LeftMenu.template", "jquery", "underscore", "backbone", "common/main/lib/component/Button", "common/main/lib/view/About", "common/main/lib/view/Comments", "common/main/lib/view/Chat", "common/main/lib/view/History", "common/main/lib/view/About", "common/main/lib/view/SearchDialog", "documenteditor/main/app/view/FileMenu"], function (menuTemplate, $, _, Backbone) { var SCALE_MIN = 40; var MENU_SCALE_PART = 300; DE.Views.LeftMenu = Backbone.View.extend(_.extend({ @@ -140,7 +140,7 @@ if (btn.options.action == "search") {} else { if (btn.pressed) { if (! (this.$el.width() > SCALE_MIN)) { - this.$el.width(localStorage.getItem("de-mainmenu-width") || MENU_SCALE_PART); + this.$el.width(parseInt(localStorage.getItem("de-mainmenu-width")) || MENU_SCALE_PART); } } else { localStorage.setItem("de-mainmenu-width", this.$el.width()); @@ -152,25 +152,20 @@ }, onCoauthOptions: function (e) { if (this.mode.canCoAuthoring) { - this.panelComments[this.btnComments.pressed ? "show" : "hide"](); - this.fireEvent((this.btnComments.pressed) ? "comments:show": "comments:hide", this); - if (this.btnChat.pressed) { - if (this.btnChat.$el.hasClass("notify")) { - this.btnChat.$el.removeClass("notify"); - } - this.panelChat.show(); - this.panelChat.focus(); - } else { - this.panelChat["hide"](); + if (this.mode.canComments) { + this.panelComments[this.btnComments.pressed ? "show" : "hide"](); + this.fireEvent((this.btnComments.pressed) ? "comments:show": "comments:hide", this); } - } - }, - setOptionsPanel: function (name, panel) { - if (name == "chat") { - this.panelChat = panel.render("#left-panel-chat"); - } else { - if (name == "comment") { - this.panelComments = panel; + if (this.mode.canChat) { + if (this.btnChat.pressed) { + if (this.btnChat.$el.hasClass("notify")) { + this.btnChat.$el.removeClass("notify"); + } + this.panelChat.show(); + this.panelChat.focus(); + } else { + this.panelChat["hide"](); + } } } }, @@ -179,18 +174,35 @@ this.btnChat.$el.addClass("notify"); } }, + setOptionsPanel: function (name, panel) { + if (name == "chat") { + this.panelChat = panel.render("#left-panel-chat"); + } else { + if (name == "comment") { + this.panelComments = panel; + } else { + if (name == "history") { + this.panelHistory = panel.render("#left-panel-history"); + } + } + } + }, close: function (menu) { this.btnFile.toggle(false); this.btnAbout.toggle(false); this.$el.width(SCALE_MIN); if (this.mode.canCoAuthoring) { - this.panelComments["hide"](); - this.panelChat["hide"](); - if (this.btnComments.pressed) { - this.fireEvent("comments:hide", this); + if (this.mode.canComments) { + this.panelComments["hide"](); + if (this.btnComments.pressed) { + this.fireEvent("comments:hide", this); + } + this.btnComments.toggle(false, true); + } + if (this.mode.canChat) { + this.panelChat["hide"](); + this.btnChat.toggle(false, true); } - this.btnComments.toggle(false, true); - this.btnChat.toggle(false, true); } }, isOpened: function () { @@ -245,6 +257,12 @@ this.mode = mode; return this; }, + showHistory: function () { + this.panelHistory.show(); + this.panelHistory.$el.width((parseInt(localStorage.getItem("de-mainmenu-width")) || MENU_SCALE_PART) - SCALE_MIN); + this.btnFile.panel.items[9].hide(); + Common.NotificationCenter.trigger("layout:changed", "history"); + }, tipComments: "Comments", tipChat: "Chat", tipAbout: "About", diff --git a/OfficeWeb/apps/documenteditor/main/app/view/StatusBar.js b/OfficeWeb/apps/documenteditor/main/app/view/StatusBar.js index 0872c478..1445e284 100644 --- a/OfficeWeb/apps/documenteditor/main/app/view/StatusBar.js +++ b/OfficeWeb/apps/documenteditor/main/app/view/StatusBar.js @@ -123,19 +123,24 @@ define([ hint: this.tipSetLang, hintAnchor: 'top-left' }); - this.btnLanguage.cmpEl.on('show.bs.dropdown', function () { + this.btnLanguage.cmpEl.on({ + 'show.bs.dropdown': function () { _.defer(function(){ me.api.asc_enableKeyEvents(false); me.btnLanguage.cmpEl.find('ul').focus(); }, 100); - } - ); - this.btnLanguage.cmpEl.on('hide.bs.dropdown', function () { + }, + 'hide.bs.dropdown': function () { _.defer(function(){ me.api.asc_enableKeyEvents(true); }, 100); + }, + 'click': function (e) { + if (me.btnLanguage.isDisabled()) { + return false; + } } - ); + }); this.langMenu.render(panelLang); this.langMenu.cmpEl.attr({tabindex: -1}); diff --git a/OfficeWeb/apps/documenteditor/main/app/view/Toolbar.js b/OfficeWeb/apps/documenteditor/main/app/view/Toolbar.js index 11a96dcd..e2272781 100644 --- a/OfficeWeb/apps/documenteditor/main/app/view/Toolbar.js +++ b/OfficeWeb/apps/documenteditor/main/app/view/Toolbar.js @@ -2040,6 +2040,10 @@ nativeBtnGroup.hide(); } } + if (mode.isDesktopApp) { + $(".toolbar-group-native").hide(); + this.mnuitemHideTitleBar.hide(); + } }, changeViewMode: function (item, compact) { var me = this, diff --git a/OfficeWeb/apps/documenteditor/main/app/view/Viewport.js b/OfficeWeb/apps/documenteditor/main/app/view/Viewport.js index 29225272..b00be935 100644 --- a/OfficeWeb/apps/documenteditor/main/app/view/Viewport.js +++ b/OfficeWeb/apps/documenteditor/main/app/view/Viewport.js @@ -84,6 +84,16 @@ max: 600 } }, + { + el: items[3], + rely: true, + resize: { + hidden: true, + autohide: false, + min: 300, + max: 600 + } + }, { el: items[1], stretch: true diff --git a/OfficeWeb/apps/documenteditor/main/locale/de.json b/OfficeWeb/apps/documenteditor/main/locale/de.json index 472eefd6..26707898 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/de.json +++ b/OfficeWeb/apps/documenteditor/main/locale/de.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Warnung", "Common.Controllers.Chat.textEnterMessage": "Geben Sie Ihre Nachricht hier ein", - "Common.Controllers.Chat.textUserLimit": "Sie benutzen ONLYOFFICE Free Edition.
        Nur zwei Benutzer können das Dokument gleichzeitig bearbeiten.
        Möchten Sie mehr? Erwerben Sie kommerzielle Version von ONLYOFFICE Enterprise Edition.
        Lesen Sie mehr davon", + "Common.Controllers.Chat.textUserLimit": "Sie benutzen ONLYOFFICE Free Edition.
        Nur zwei Benutzer können das Dokument gleichzeitig bearbeiten.
        Möchten Sie mehr? Erwerben Sie kommerzielle Version von ONLYOFFICE Enterprise Edition.
        Lesen Sie mehr davon", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anonym", "Common.Controllers.ExternalDiagramEditor.textClose": "Schließen", "Common.Controllers.ExternalDiagramEditor.warningText": "Das Objekt ist deaktiviert, weil es momentan von einem anderen Benutzer bearbeitet wird.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Warnung", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Anonymous", + "Common.Controllers.ExternalMergeEditor.textClose": "Close", + "Common.Controllers.ExternalMergeEditor.warningText": "The object is disabled because it is being edited by another user.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Warning", + "Common.Controllers.History.notcriticalErrorTitle": "Warning", "Common.UI.ComboBorderSize.txtNoBorders": "Kein Rahmen", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "Kein Rahmen", "Common.UI.ComboDataView.emptyComboText": "Keine Stile", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "Nein", "Common.UI.Window.okButtonText": "OK", "Common.UI.Window.textConfirmation": "Bestätigung", + "Common.UI.Window.textDontShow": "Diese Meldung nicht mehr anzeigen", "Common.UI.Window.textError": "Fehler", "Common.UI.Window.textInformation": "Information", "Common.UI.Window.textWarning": "Warnung", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Schließen", "Common.Views.ExternalDiagramEditor.textSave": "Übernehmen", "Common.Views.ExternalDiagramEditor.textTitle": "Diagramm bearbeiten", + "Common.Views.ExternalMergeEditor.textClose": "Close", + "Common.Views.ExternalMergeEditor.textSave": "Save & Exit", + "Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients", + "Common.Views.Header.openNewTabText": "Open in New Tab", "Common.Views.Header.textBack": "Zu Dokumenten übergehen", + "Common.Views.History.textHistoryHeader": "Zurück zum Dokument", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Abbrechen", "Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.textUrl": "Bild-URL einfügen:", @@ -86,8 +97,11 @@ "Common.Views.InsertTableDialog.txtMinText": "Der minimale Wert für dieses Feld ist {0}.", "Common.Views.InsertTableDialog.txtRows": "Zeilenanzahl", "Common.Views.InsertTableDialog.txtTitle": "Größe der Tabelle", + "DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
        Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "DE.Controllers.LeftMenu.newDocumentTitle": "Unbetiteltes Dokument", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", "DE.Controllers.LeftMenu.requestEditRightsText": "Anfrage betreffend die Bearbeitungsberechtigung...", + "DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...", "DE.Controllers.LeftMenu.textNoTextFound": "Die Daten, nach denen Sie gesucht haben, können nicht gefunden werden. Bitte ändern Sie die Suchparameter.", "DE.Controllers.LeftMenu.textReplaceSkipped": "Der Ersatzvorgang wurde durchgeführt. {0} Vorkommen wurden ausgelassen.", "DE.Controllers.LeftMenu.textReplaceSuccess": "Der Suchvorgang wurde durchgeführt. Vorkommen wurden ersetzt:{0}", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Fehler", "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", "DE.Controllers.Main.downloadErrorText": "Download ist fehlgeschlagen.", + "DE.Controllers.Main.downloadMergeText": "Downloading...", + "DE.Controllers.Main.downloadMergeTitle": "Downloading", "DE.Controllers.Main.downloadTextText": "Dokument wird heruntergeladen...", "DE.Controllers.Main.downloadTitleText": "Herunterladen des Dokuments", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Verbindung zum Server verloren. Das Dokument kann momentan nicht bearbeitet werden.", @@ -108,6 +124,8 @@ "DE.Controllers.Main.errorFilePassProtect": "Das Dokument ist ein Kennwort geschützt und kann nicht geöffnet werden.", "DE.Controllers.Main.errorKeyEncrypt": "Unbekannter Schlüsseldeskriptor", "DE.Controllers.Main.errorKeyExpire": "Der Schlüsseldeskriptor ist abgelaufen", + "DE.Controllers.Main.errorMailMergeLoadFile": "Loading failed", + "DE.Controllers.Main.errorMailMergeSaveFile": "Merge failed.", "DE.Controllers.Main.errorProcessSaveResult": "Speichern fehlgeschlagen.", "DE.Controllers.Main.errorStockChart": "Falsche Reihenfolge der Zeilen. Um ein Kursdiagramm zu erstellen, ordnen Sie die Daten auf dem Blatt folgendermaßen an:
        Eröffnungspreis, Höchstpreis, Tiefstpreis, Schlusskurs.", "DE.Controllers.Main.errorUpdateVersion": "Die Dateiversion wurde geändert. Die Seite wird neu geladen.", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Laden des Bildes", "DE.Controllers.Main.loadingDocumentTextText": "Laden des Dokuments...", "DE.Controllers.Main.loadingDocumentTitleText": "Laden des Dokuments...", + "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.notcriticalErrorTitle": "Warnung", "DE.Controllers.Main.openTextText": "Dokument wird geöffnet...", "DE.Controllers.Main.openTitleText": "Öffnen des Dokuments", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Speichervorbereitung. Bitte warten...", "DE.Controllers.Main.saveTextText": "Dokument wird gespeichert...", "DE.Controllers.Main.saveTitleText": "Speichern des Dokuments", + "DE.Controllers.Main.sendMergeText": "Sending Merge...", + "DE.Controllers.Main.sendMergeTitle": "Sending Merge", "DE.Controllers.Main.splitDividerErrorText": "Die Zeilenanzahl muss ein Divisor von %1 sein.", "DE.Controllers.Main.splitMaxColsErrorText": "Die Spaltenanzahl muss weniger sein als %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "Die Zeilenanzahl muss weniger sein als %1.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Buttons", "DE.Controllers.Main.txtCallouts": "Legenden", "DE.Controllers.Main.txtCharts": "Diagramme", + "DE.Controllers.Main.txtDiagramTitle": "Diagrammtitel", "DE.Controllers.Main.txtEditingMode": "Bearbeitungsmodul festlegen...", "DE.Controllers.Main.txtFiguredArrows": "Geformte Pfeile", "DE.Controllers.Main.txtLines": "Linien", "DE.Controllers.Main.txtMath": "Mathematik", "DE.Controllers.Main.txtNeedSynchronize": "Änderungen wurden vorgenommen", "DE.Controllers.Main.txtRectangles": "Rechtecke", + "DE.Controllers.Main.txtSeries": "Reihe", "DE.Controllers.Main.txtStarsRibbons": "Sterne und Bänder", + "DE.Controllers.Main.txtXAxis": "x-Achse", + "DE.Controllers.Main.txtYAxis": "y-Achse", "DE.Controllers.Main.unknownErrorText": "Unbekannter Fehler.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Ihr Webbrowser wird nicht unterstützt.", "DE.Controllers.Main.uploadImageExtMessage": "Unbekanntes Bildformat.", @@ -165,6 +191,7 @@ "DE.Controllers.Main.warnBrowserZoom": "Die aktuelle Zoom-Einstellung Ihres Webbrowsers wird nicht völlig unterstützt. Bitte stellen Sie die Standardeinstellung mithilfe der Tastenkombination Strg+0 wieder her.", "DE.Controllers.Main.warnProcessRightsChange": "Das Recht, die Datei zu bearbeiten, wurde Ihnen verweigert.", "DE.Controllers.Statusbar.zoomText": "Zoom {0}%", + "DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
        The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
        Do you want to continue?", "DE.Controllers.Toolbar.textAccent": "Akzente", "DE.Controllers.Toolbar.textBracket": "Klammern", "DE.Controllers.Toolbar.textEmptyImgUrl": "Sie müssen eine Bild-URL angeben.", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Zeile löschen", "DE.Views.DocumentHolder.deleteTableText": "Tabelle löschen", "DE.Views.DocumentHolder.deleteText": "Löschen", + "DE.Views.DocumentHolder.direct270Text": "Rotate at 270°", + "DE.Views.DocumentHolder.direct90Text": "Rotate at 90°", + "DE.Views.DocumentHolder.directHText": "Horizontal", + "DE.Views.DocumentHolder.directionText": "Text Direction", "DE.Views.DocumentHolder.editChartText": "Daten ändern", "DE.Views.DocumentHolder.editFooterText": "Fußzeile bearbeiten", "DE.Views.DocumentHolder.editHeaderText": "Kopfzeile bearbeiten", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Neues erstellen", "DE.Views.FileMenu.btnDownloadCaption": "Herunterladen als...", "DE.Views.FileMenu.btnHelpCaption": "Hilfe...", + "DE.Views.FileMenu.btnHistoryCaption": "Versionsgeschichte", "DE.Views.FileMenu.btnInfoCaption": "Dokumenteninfo...", "DE.Views.FileMenu.btnPrintCaption": "Drucken", "DE.Views.FileMenu.btnRecentFilesCaption": "Zuletzt benutztes öffnen...", "DE.Views.FileMenu.btnReturnCaption": "Zurück zum Dokument", + "DE.Views.FileMenu.btnRightsCaption": "Access Rights...", "DE.Views.FileMenu.btnSaveCaption": "Speichern", "DE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen...", "DE.Views.FileMenu.btnToEditCaption": "Dokument bearbeiten", @@ -688,6 +721,8 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Zeichen", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titel des Dokuments", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Wörter", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Zugriffsrechte ändern", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Personen mit Berechtigungen", "DE.Views.FileMenuPanels.Settings.okButtonText": "Übernehmen", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Ausrichtungslinien einschalten", "DE.Views.FileMenuPanels.Settings.strAutosave": "AutoSpeichern einschalten", @@ -823,6 +858,56 @@ "DE.Views.LeftMenu.tipSearch": "Suche", "DE.Views.LeftMenu.tipSupport": "Feedback und Support", "DE.Views.LeftMenu.tipTitles": "Titel", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Send", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Theme", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Attach as DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Attach as PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "File name", + "DE.Views.MailMergeEmailDlg.textFormat": "Mail format", + "DE.Views.MailMergeEmailDlg.textFrom": "From", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Message", + "DE.Views.MailMergeEmailDlg.textSubject": "Subject Line", + "DE.Views.MailMergeEmailDlg.textTitle": "Send to E-mail", + "DE.Views.MailMergeEmailDlg.textTo": "To", + "DE.Views.MailMergeEmailDlg.textWarning": "Warning!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Please note that mailing cannot be stopped once your click the 'Send' button.", + "DE.Views.MailMergeRecepients.textLoading": "Ladevorgang", + "DE.Views.MailMergeRecepients.textTitle": "Datenquelle auswählen", + "DE.Views.MailMergeSaveDlg.textLoading": "Loading", + "DE.Views.MailMergeSaveDlg.textTitle": "Folder for save", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Merging", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Merge failed.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Warning", + "DE.Views.MailMergeSettings.textAll": "All records", + "DE.Views.MailMergeSettings.textCurrent": "Current record", + "DE.Views.MailMergeSettings.textDataSource": "Data Source", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Download", + "DE.Views.MailMergeSettings.textEditData": "Empfängerliste bearbeiten", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "From", + "DE.Views.MailMergeSettings.textHighlight": "Highlight merge fields", + "DE.Views.MailMergeSettings.textInsertField": "Insert Merge Field", + "DE.Views.MailMergeSettings.textMaxRecepients": "Max 100 recipients.", + "DE.Views.MailMergeSettings.textMerge": "Merge", + "DE.Views.MailMergeSettings.textMergeFields": "Felder zusammenführen", + "DE.Views.MailMergeSettings.textMergeTo": "Merge to", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Save", + "DE.Views.MailMergeSettings.textPreview": "Preview results", + "DE.Views.MailMergeSettings.textReadMore": "Read more", + "DE.Views.MailMergeSettings.textSendMsg": "All mail messages are ready and will be sent out within some time.
        The speed of mailing depends on your mail service.
        You can continue working with document or close it. After the operation is over the notification will be sent to your %1 email address.", + "DE.Views.MailMergeSettings.textTo": "To", + "DE.Views.MailMergeSettings.txtFirst": "To first field", + "DE.Views.MailMergeSettings.txtFromToError": "\"From\" value must be less than \"To\" value", + "DE.Views.MailMergeSettings.txtLast": "To last field", + "DE.Views.MailMergeSettings.txtNext": "To next field", + "DE.Views.MailMergeSettings.txtPrev": "To previous field", + "DE.Views.MailMergeSettings.txtUntitled": "Untitled", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Starting merge failed", "DE.Views.ParagraphSettings.strLineHeight": "Zeilenabstand", "DE.Views.ParagraphSettings.strParagraphSpacing": "Abstand", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "Kein Abstand zwischen Absätzen gleicher Formatierung", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Diagrammeinstellungen", "DE.Views.RightMenu.txtHeaderFooterSettings": "Kopf- und Fußzeileneinstellungen", "DE.Views.RightMenu.txtImageSettings": "Bildeinstellungen", + "DE.Views.RightMenu.txtMailMergeSettings": "Mail Merge Settings", "DE.Views.RightMenu.txtParagraphSettings": "Absatzeinstellungen", "DE.Views.RightMenu.txtShapeSettings": "Formeinstellungen", "DE.Views.RightMenu.txtTableSettings": "Tabelleneinstellungen", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Tabelle einfügen", "DE.Views.Toolbar.tipInsertText": "Text einfügen", "DE.Views.Toolbar.tipLineSpace": "Zeilenabstand", + "DE.Views.Toolbar.tipMailRecepients": "Mail Merge", "DE.Views.Toolbar.tipMarkers": "Aufzählung", "DE.Views.Toolbar.tipMultilevels": "Gliederung", "DE.Views.Toolbar.tipNewDocument": "Neues Dokument", diff --git a/OfficeWeb/apps/documenteditor/main/locale/en.json b/OfficeWeb/apps/documenteditor/main/locale/en.json index ea5a30ff..62b91e8b 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/en.json +++ b/OfficeWeb/apps/documenteditor/main/locale/en.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Warning", "Common.Controllers.Chat.textEnterMessage": "Enter your message here", - "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
        Only two users can co-edit the document simultaneously.
        Want more? Consider buying ONLYOFFICE Enterprise Edition.
        Read more", + "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
        Only two users can co-edit the document simultaneously.
        Want more? Consider buying ONLYOFFICE Enterprise Edition.
        Read more", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anonymous", "Common.Controllers.ExternalDiagramEditor.textClose": "Close", "Common.Controllers.ExternalDiagramEditor.warningText": "The object is disabled because it is being edited by another user.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Warning", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Anonymous", + "Common.Controllers.ExternalMergeEditor.textClose": "Close", + "Common.Controllers.ExternalMergeEditor.warningText": "The object is disabled because it is being edited by another user.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Warning", + "Common.Controllers.History.notcriticalErrorTitle": "Warning", "Common.UI.ComboBorderSize.txtNoBorders": "No borders", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders", "Common.UI.ComboDataView.emptyComboText": "No styles", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "No", "Common.UI.Window.okButtonText": "OK", "Common.UI.Window.textConfirmation": "Confirmation", + "Common.UI.Window.textDontShow": "Don't show this message again", "Common.UI.Window.textError": "Error", "Common.UI.Window.textInformation": "Information", "Common.UI.Window.textWarning": "Warning", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Close", "Common.Views.ExternalDiagramEditor.textSave": "Save & Exit", "Common.Views.ExternalDiagramEditor.textTitle": "Chart Editor", + "Common.Views.ExternalMergeEditor.textClose": "Close", + "Common.Views.ExternalMergeEditor.textSave": "Save & Exit", + "Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients", + "Common.Views.Header.openNewTabText": "Open in New Tab", "Common.Views.Header.textBack": "Go to Documents", + "Common.Views.History.textHistoryHeader": "Back to Document", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel", "Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:", @@ -86,8 +97,11 @@ "Common.Views.InsertTableDialog.txtMinText": "The minimum value for this field is {0}.", "Common.Views.InsertTableDialog.txtRows": "Number of Rows", "Common.Views.InsertTableDialog.txtTitle": "Table Size", + "DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
        Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "DE.Controllers.LeftMenu.newDocumentTitle": "Unnamed document", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", "DE.Controllers.LeftMenu.requestEditRightsText": "Requesting editing rights...", + "DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...", "DE.Controllers.LeftMenu.textNoTextFound": "The data you have been searching for could not be found. Please adjust your search options.", "DE.Controllers.LeftMenu.textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.", "DE.Controllers.LeftMenu.textReplaceSuccess": "The search has been done. Occurrences replaced: {0}", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Error", "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", "DE.Controllers.Main.downloadErrorText": "Download failed.", + "DE.Controllers.Main.downloadMergeText": "Downloading...", + "DE.Controllers.Main.downloadMergeTitle": "Downloading", "DE.Controllers.Main.downloadTextText": "Downloading document...", "DE.Controllers.Main.downloadTitleText": "Downloading Document", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Server connection lost. The document cannot be edited right now.", @@ -108,6 +124,8 @@ "DE.Controllers.Main.errorFilePassProtect": "The document is password protected and could not be opened.", "DE.Controllers.Main.errorKeyEncrypt": "Unknown key descriptor", "DE.Controllers.Main.errorKeyExpire": "Key descriptor expired", + "DE.Controllers.Main.errorMailMergeLoadFile": "Loading failed", + "DE.Controllers.Main.errorMailMergeSaveFile": "Merge failed.", "DE.Controllers.Main.errorProcessSaveResult": "Saving failed.", "DE.Controllers.Main.errorStockChart": "Incorrect row order. To build a stock chart place the data on the sheet in the following order:
        opening price, max price, min price, closing price.", "DE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Loading Image", "DE.Controllers.Main.loadingDocumentTextText": "Loading document...", "DE.Controllers.Main.loadingDocumentTitleText": "Loading Document", + "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.notcriticalErrorTitle": "Warning", "DE.Controllers.Main.openTextText": "Opening document...", "DE.Controllers.Main.openTitleText": "Opening Document", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...", "DE.Controllers.Main.saveTextText": "Saving document...", "DE.Controllers.Main.saveTitleText": "Saving Document", + "DE.Controllers.Main.sendMergeText": "Sending Merge...", + "DE.Controllers.Main.sendMergeTitle": "Sending Merge", "DE.Controllers.Main.splitDividerErrorText": "The number of rows must be a divisor of %1.", "DE.Controllers.Main.splitMaxColsErrorText": "The number of columns must be less than %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "The number of rows must be less than %1.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Buttons", "DE.Controllers.Main.txtCallouts": "Callouts", "DE.Controllers.Main.txtCharts": "Charts", + "DE.Controllers.Main.txtDiagramTitle": "Chart Title", "DE.Controllers.Main.txtEditingMode": "Set editing mode...", "DE.Controllers.Main.txtFiguredArrows": "Figured Arrows", "DE.Controllers.Main.txtLines": "Lines", "DE.Controllers.Main.txtMath": "Math", "DE.Controllers.Main.txtNeedSynchronize": "You have updates", "DE.Controllers.Main.txtRectangles": "Rectangles", + "DE.Controllers.Main.txtSeries": "Series", "DE.Controllers.Main.txtStarsRibbons": "Stars & Ribbons", + "DE.Controllers.Main.txtXAxis": "X Axis", + "DE.Controllers.Main.txtYAxis": "Y Axis", "DE.Controllers.Main.unknownErrorText": "Unknown error.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Your browser is not supported.", "DE.Controllers.Main.uploadImageExtMessage": "Unknown image format.", @@ -165,6 +191,7 @@ "DE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "DE.Controllers.Statusbar.zoomText": "Zoom {0}%", + "DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
        The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
        Do you want to continue?", "DE.Controllers.Toolbar.textAccent": "Accents", "DE.Controllers.Toolbar.textBracket": "Brackets", "DE.Controllers.Toolbar.textEmptyImgUrl": "You need to specify image URL.", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Delete Row", "DE.Views.DocumentHolder.deleteTableText": "Delete Table", "DE.Views.DocumentHolder.deleteText": "Delete", + "DE.Views.DocumentHolder.direct270Text": "Rotate at 270°", + "DE.Views.DocumentHolder.direct90Text": "Rotate at 90°", + "DE.Views.DocumentHolder.directHText": "Horizontal", + "DE.Views.DocumentHolder.directionText": "Text Direction", "DE.Views.DocumentHolder.editChartText": "Edit Data", "DE.Views.DocumentHolder.editFooterText": "Edit Footer", "DE.Views.DocumentHolder.editHeaderText": "Edit Header", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Create New", "DE.Views.FileMenu.btnDownloadCaption": "Download as...", "DE.Views.FileMenu.btnHelpCaption": "Help...", + "DE.Views.FileMenu.btnHistoryCaption": "Version History", "DE.Views.FileMenu.btnInfoCaption": "Document Info...", "DE.Views.FileMenu.btnPrintCaption": "Print", "DE.Views.FileMenu.btnRecentFilesCaption": "Open Recent...", "DE.Views.FileMenu.btnReturnCaption": "Back to Document", + "DE.Views.FileMenu.btnRightsCaption": "Access Rights...", "DE.Views.FileMenu.btnSaveCaption": "Save", "DE.Views.FileMenu.btnSettingsCaption": "Advanced Settings...", "DE.Views.FileMenu.btnToEditCaption": "Edit Document", @@ -688,6 +721,8 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Symbols", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Document Title", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Words", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights", "DE.Views.FileMenuPanels.Settings.okButtonText": "Apply", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", "DE.Views.FileMenuPanels.Settings.strAutosave": "Turn on autosave", @@ -823,6 +858,56 @@ "DE.Views.LeftMenu.tipSearch": "Search", "DE.Views.LeftMenu.tipSupport": "Feedback & Support", "DE.Views.LeftMenu.tipTitles": "Titles", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Send", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Theme", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Attach as DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Attach as PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "File name", + "DE.Views.MailMergeEmailDlg.textFormat": "Mail format", + "DE.Views.MailMergeEmailDlg.textFrom": "From", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Message", + "DE.Views.MailMergeEmailDlg.textSubject": "Subject Line", + "DE.Views.MailMergeEmailDlg.textTitle": "Send to E-mail", + "DE.Views.MailMergeEmailDlg.textTo": "To", + "DE.Views.MailMergeEmailDlg.textWarning": "Warning!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Please note that mailing cannot be stopped once your click the 'Send' button.", + "DE.Views.MailMergeRecepients.textLoading": "Loading", + "DE.Views.MailMergeRecepients.textTitle": "Select Data Source", + "DE.Views.MailMergeSaveDlg.textLoading": "Loading", + "DE.Views.MailMergeSaveDlg.textTitle": "Folder for save", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Merging", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Merge failed.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Warning", + "DE.Views.MailMergeSettings.textAll": "All records", + "DE.Views.MailMergeSettings.textCurrent": "Current record", + "DE.Views.MailMergeSettings.textDataSource": "Data Source", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Download", + "DE.Views.MailMergeSettings.textEditData": "Edit recipient list", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "From", + "DE.Views.MailMergeSettings.textHighlight": "Highlight merge fields", + "DE.Views.MailMergeSettings.textInsertField": "Insert Merge Field", + "DE.Views.MailMergeSettings.textMaxRecepients": "Max 100 recipients.", + "DE.Views.MailMergeSettings.textMerge": "Merge", + "DE.Views.MailMergeSettings.textMergeFields": "Merge Fields", + "DE.Views.MailMergeSettings.textMergeTo": "Merge to", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Save", + "DE.Views.MailMergeSettings.textPreview": "Preview results", + "DE.Views.MailMergeSettings.textReadMore": "Read more", + "DE.Views.MailMergeSettings.textSendMsg": "All mail messages are ready and will be sent out within some time.
        The speed of mailing depends on your mail service.
        You can continue working with document or close it. After the operation is over the notification will be sent to your %1 email address.", + "DE.Views.MailMergeSettings.textTo": "To", + "DE.Views.MailMergeSettings.txtFirst": "To first field", + "DE.Views.MailMergeSettings.txtFromToError": "\"From\" value must be less than \"To\" value", + "DE.Views.MailMergeSettings.txtLast": "To last field", + "DE.Views.MailMergeSettings.txtNext": "To next field", + "DE.Views.MailMergeSettings.txtPrev": "To previous field", + "DE.Views.MailMergeSettings.txtUntitled": "Untitled", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Starting merge failed", "DE.Views.ParagraphSettings.strLineHeight": "Line Spacing", "DE.Views.ParagraphSettings.strParagraphSpacing": "Spacing", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "Don't add interval between paragraphs of the same style", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Chart Settings", "DE.Views.RightMenu.txtHeaderFooterSettings": "Header and Footer Settings", "DE.Views.RightMenu.txtImageSettings": "Image Settings", + "DE.Views.RightMenu.txtMailMergeSettings": "Mail Merge Settings", "DE.Views.RightMenu.txtParagraphSettings": "Paragraph Settings", "DE.Views.RightMenu.txtShapeSettings": "Shape Settings", "DE.Views.RightMenu.txtTableSettings": "Table Settings", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Insert Table", "DE.Views.Toolbar.tipInsertText": "Insert Text", "DE.Views.Toolbar.tipLineSpace": "Paragraph Line Spacing", + "DE.Views.Toolbar.tipMailRecepients": "Mail Merge", "DE.Views.Toolbar.tipMarkers": "Bullets", "DE.Views.Toolbar.tipMultilevels": "Outline", "DE.Views.Toolbar.tipNewDocument": "New Document", diff --git a/OfficeWeb/apps/documenteditor/main/locale/es.json b/OfficeWeb/apps/documenteditor/main/locale/es.json index 701cea9b..faf086d1 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/es.json +++ b/OfficeWeb/apps/documenteditor/main/locale/es.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Aviso", "Common.Controllers.Chat.textEnterMessage": "Introduzca su mensaje aquí", - "Common.Controllers.Chat.textUserLimit": "Usted está usando la edición ONLYOFFICE gratuita.
        Sólo dos usuarios pueden editar el documento simultáneamente.
        ¿Quiere más? Compre la edición Empresa ONLYOFFICE.
        Saber más", + "Common.Controllers.Chat.textUserLimit": "Usted está usando la edición ONLYOFFICE gratuita.
        Sólo dos usuarios pueden editar el documento simultáneamente.
        ¿Quiere más? Compre la edición Empresa ONLYOFFICE.
        Saber más", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anónimo", "Common.Controllers.ExternalDiagramEditor.textClose": "Cerrar", "Common.Controllers.ExternalDiagramEditor.warningText": "El objeto está desactivado porque se está editando por otro usuario.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Aviso", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Anónimo", + "Common.Controllers.ExternalMergeEditor.textClose": "Cerrar", + "Common.Controllers.ExternalMergeEditor.warningText": "El objeto está desactivado porque se está editando por otro usuario.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Aviso", + "Common.Controllers.History.notcriticalErrorTitle": "Aviso", "Common.UI.ComboBorderSize.txtNoBorders": "Sin bordes", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "Sin bordes", "Common.UI.ComboDataView.emptyComboText": "Sin estilo", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "No", "Common.UI.Window.okButtonText": "OK", "Common.UI.Window.textConfirmation": "Confirmación", + "Common.UI.Window.textDontShow": "No volver a mostrar este mensaje", "Common.UI.Window.textError": "Error", "Common.UI.Window.textInformation": "Información", "Common.UI.Window.textWarning": "Aviso", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Cerrar", "Common.Views.ExternalDiagramEditor.textSave": "Guardar y salir", "Common.Views.ExternalDiagramEditor.textTitle": "Editor de gráfico", + "Common.Views.ExternalMergeEditor.textClose": "Cerrar", + "Common.Views.ExternalMergeEditor.textSave": "Guardar y salir", + "Common.Views.ExternalMergeEditor.textTitle": "Receptores de Fusión de Correo", + "Common.Views.Header.openNewTabText": "Abrir en pestaña nueva", "Common.Views.Header.textBack": "Ir a Documentos", + "Common.Views.History.textHistoryHeader": "Volver a Documento", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancelar", "Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.textUrl": "Pegar URL de imagen:", @@ -86,8 +97,11 @@ "Common.Views.InsertTableDialog.txtMinText": "El valor mínimo para este campo es {0}.", "Common.Views.InsertTableDialog.txtRows": "Número de filas", "Common.Views.InsertTableDialog.txtTitle": "Tamaño de tabla", + "DE.Controllers.LeftMenu.leavePageText": "Todos los cambios no guardados de este documento se perderán.
        Pulse \"Cancelar\" después \"Guardar\" para guardarlos. Pulse \"OK\" para deshacer todos los cambios no guardados.", "DE.Controllers.LeftMenu.newDocumentTitle": "Documento sin título", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Aviso", "DE.Controllers.LeftMenu.requestEditRightsText": "Solicitando derechos de edición...", + "DE.Controllers.LeftMenu.textLoadHistory": "Cargando historial de versiones...", "DE.Controllers.LeftMenu.textNoTextFound": "No se puede encontrar los datos que usted busca. Por favor, ajuste los parámetros de búsqueda.", "DE.Controllers.LeftMenu.textReplaceSkipped": "Se ha realizado el reemplazo. {0} ocurrencias fueron saltadas.", "DE.Controllers.LeftMenu.textReplaceSuccess": "La búsqueda se ha realizado. Ocurrencias reemplazadas: {0}", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Error", "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", "DE.Controllers.Main.downloadErrorText": "Error de descarga.", + "DE.Controllers.Main.downloadMergeText": "Descargando...", + "DE.Controllers.Main.downloadMergeTitle": "Descargando", "DE.Controllers.Main.downloadTextText": "Cargando documento...", "DE.Controllers.Main.downloadTitleText": "Cargando documento", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Se ha perdido la conexión con servidor. El documento no puede ser editado ahora.", @@ -108,6 +124,8 @@ "DE.Controllers.Main.errorFilePassProtect": "El documento está protegido por una contraseña y no puede ser abierto.", "DE.Controllers.Main.errorKeyEncrypt": "Descriptor de clave desconocido", "DE.Controllers.Main.errorKeyExpire": "Descriptor de clave ha expirado", + "DE.Controllers.Main.errorMailMergeLoadFile": "Error de carga", + "DE.Controllers.Main.errorMailMergeSaveFile": "Error de fusión.", "DE.Controllers.Main.errorProcessSaveResult": "Problemas al guardar", "DE.Controllers.Main.errorStockChart": "Orden de las filas incorrecto. Para crear un gráfico de cotizaciones introduzca los datos en la hoja de la forma siguiente:
        precio de apertura, precio máximo, precio mínimo, precio de cierre.", "DE.Controllers.Main.errorUpdateVersion": "Se ha cambiado la versión del archivo. La página será actualizada.", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Cargando imagen", "DE.Controllers.Main.loadingDocumentTextText": "Cargando documento...", "DE.Controllers.Main.loadingDocumentTitleText": "Cargando documento", + "DE.Controllers.Main.mailMergeLoadFileText": "Cargando fuente de datos...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Cargando fuente de datos", "DE.Controllers.Main.notcriticalErrorTitle": "Aviso", "DE.Controllers.Main.openTextText": "Abriendo documento...", "DE.Controllers.Main.openTitleText": "Abriendo documento", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Preparando para guardar.Espere por favor...", "DE.Controllers.Main.saveTextText": "Guardando documento...", "DE.Controllers.Main.saveTitleText": "Guardando documento", + "DE.Controllers.Main.sendMergeText": "Envío de fusión...", + "DE.Controllers.Main.sendMergeTitle": "Envío de fusión", "DE.Controllers.Main.splitDividerErrorText": "El número de filas debe ser un divisor de %1.", "DE.Controllers.Main.splitMaxColsErrorText": "El número de columnas debe ser menos que %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "El número de filas debe ser menos que %1.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Botones", "DE.Controllers.Main.txtCallouts": "Llamadas", "DE.Controllers.Main.txtCharts": "Gráficos", + "DE.Controllers.Main.txtDiagramTitle": "Título de diagrama", "DE.Controllers.Main.txtEditingMode": "Establecer el modo de edición...", "DE.Controllers.Main.txtFiguredArrows": "Formas de flecha", "DE.Controllers.Main.txtLines": "Líneas", "DE.Controllers.Main.txtMath": "Matemáticas", "DE.Controllers.Main.txtNeedSynchronize": "Usted tiene actualizaciones", "DE.Controllers.Main.txtRectangles": "Rectángulos", + "DE.Controllers.Main.txtSeries": "Serie", "DE.Controllers.Main.txtStarsRibbons": "Cintas y estrellas", + "DE.Controllers.Main.txtXAxis": "Eje X", + "DE.Controllers.Main.txtYAxis": "Eje Y", "DE.Controllers.Main.unknownErrorText": "Error desconocido.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Su navegador no está soportado.", "DE.Controllers.Main.uploadImageExtMessage": "Formato de imagen desconocido.", @@ -165,6 +191,7 @@ "DE.Controllers.Main.warnBrowserZoom": "La configuración actual de zoom de su navegador no está soportada por completo. Por favor restablezca zoom predeterminado pulsando Ctrl+0.", "DE.Controllers.Main.warnProcessRightsChange": "El derecho de edición del archivo es denegado", "DE.Controllers.Statusbar.zoomText": "Zoom {0}%", + "DE.Controllers.Toolbar.confirmAddFontName": "El tipo de letra que usted va a guardar no está disponible en este dispositivo.
        El estilo de letra se mostrará usando uno de los tipos de letra del dispositivo, el tipo de letra guardado va a usarse cuando esté disponible.
        ¿Desea continuar?", "DE.Controllers.Toolbar.textAccent": "Acentos", "DE.Controllers.Toolbar.textBracket": "Paréntesis", "DE.Controllers.Toolbar.textEmptyImgUrl": "Hay que especificar URL de imagen", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Borrar fila", "DE.Views.DocumentHolder.deleteTableText": "Borrar tabla", "DE.Views.DocumentHolder.deleteText": "Borrar", + "DE.Views.DocumentHolder.direct270Text": "Girar a 270°", + "DE.Views.DocumentHolder.direct90Text": "Girar a 90°", + "DE.Views.DocumentHolder.directHText": "Horizontal ", + "DE.Views.DocumentHolder.directionText": "Dirección de texto", "DE.Views.DocumentHolder.editChartText": "Editar datos", "DE.Views.DocumentHolder.editFooterText": "Editar pie de página", "DE.Views.DocumentHolder.editHeaderText": "Editar encabezado", @@ -630,7 +661,7 @@ "DE.Views.DropcapSettingsAdvanced.textColumn": "Columna", "DE.Views.DropcapSettingsAdvanced.textDistance": "Distancia del texto", "DE.Views.DropcapSettingsAdvanced.textExact": "Exacto", - "DE.Views.DropcapSettingsAdvanced.textFlow": "Marco de flujo", + "DE.Views.DropcapSettingsAdvanced.textFlow": "Marco flujo", "DE.Views.DropcapSettingsAdvanced.textFont": "Letra ", "DE.Views.DropcapSettingsAdvanced.textFrame": "Marco", "DE.Views.DropcapSettingsAdvanced.textHeight": "Altura", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Crear nuevo", "DE.Views.FileMenu.btnDownloadCaption": "Descargar como...", "DE.Views.FileMenu.btnHelpCaption": "Ayuda...", + "DE.Views.FileMenu.btnHistoryCaption": "Historial de las Versiones", "DE.Views.FileMenu.btnInfoCaption": "Info sobre documento...", "DE.Views.FileMenu.btnPrintCaption": "Imprimir", "DE.Views.FileMenu.btnRecentFilesCaption": "Abrir reciente...", "DE.Views.FileMenu.btnReturnCaption": "Volver a Documento", + "DE.Views.FileMenu.btnRightsCaption": "Derechos de acceso...", "DE.Views.FileMenu.btnSaveCaption": "Guardar", "DE.Views.FileMenu.btnSettingsCaption": "Ajustes avanzados...", "DE.Views.FileMenu.btnToEditCaption": "Editar documento", @@ -688,6 +721,8 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Símbolos", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Título de documento", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Palabras", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Cambiar derechos de acceso", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Personas que tienen derechos", "DE.Views.FileMenuPanels.Settings.okButtonText": "Aplicar", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Activar guías de alineación", "DE.Views.FileMenuPanels.Settings.strAutosave": "Activar autoguardado", @@ -823,6 +858,56 @@ "DE.Views.LeftMenu.tipSearch": "Búsqueda", "DE.Views.LeftMenu.tipSupport": "Feedback & Support", "DE.Views.LeftMenu.tipTitles": "Títulos", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancelar", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Enviar", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Tema", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Adjuntar como DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Adjuntar como PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "Nombre de archivo", + "DE.Views.MailMergeEmailDlg.textFormat": "Formato", + "DE.Views.MailMergeEmailDlg.textFrom": "De", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Mensaje", + "DE.Views.MailMergeEmailDlg.textSubject": "Línea de tema", + "DE.Views.MailMergeEmailDlg.textTitle": "Enviar vía e-mail", + "DE.Views.MailMergeEmailDlg.textTo": "Para", + "DE.Views.MailMergeEmailDlg.textWarning": "¡Aviso!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Note, por favor, que no se puede detener el envío, una vez pulsado el botón 'Enviar'.", + "DE.Views.MailMergeRecepients.textLoading": "Cargando", + "DE.Views.MailMergeRecepients.textTitle": "Seleccionar Origen de Datos", + "DE.Views.MailMergeSaveDlg.textLoading": "Cargando", + "DE.Views.MailMergeSaveDlg.textTitle": "Carpeta para guardar", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Fusión", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Error de fusión.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Aviso", + "DE.Views.MailMergeSettings.textAll": "Todos registros", + "DE.Views.MailMergeSettings.textCurrent": "Registro actual", + "DE.Views.MailMergeSettings.textDataSource": "Fuente de datos", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Descargar", + "DE.Views.MailMergeSettings.textEditData": "Editar lista de destinatarios", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "De", + "DE.Views.MailMergeSettings.textHighlight": "Resaltar campos unidos", + "DE.Views.MailMergeSettings.textInsertField": "Insertar campo unido", + "DE.Views.MailMergeSettings.textMaxRecepients": "Máximo - 100 receptores", + "DE.Views.MailMergeSettings.textMerge": "Fusión", + "DE.Views.MailMergeSettings.textMergeFields": "Combinar Campos", + "DE.Views.MailMergeSettings.textMergeTo": "Fusión en", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Guardar", + "DE.Views.MailMergeSettings.textPreview": "Vista previa de resultados", + "DE.Views.MailMergeSettings.textReadMore": "Leer más", + "DE.Views.MailMergeSettings.textSendMsg": "Todos los mensajes de email están listos y se enviarán en poco tiempo.
        La velocidad de envío depende de su servicio de correo.
        Usted puede continuar trabajando en el documento o cerrarlo. Una vez terminada la operación la notificación se enviará a su dirección de email %1.", + "DE.Views.MailMergeSettings.textTo": "a", + "DE.Views.MailMergeSettings.txtFirst": "Primer campo", + "DE.Views.MailMergeSettings.txtFromToError": "El valor \"De\" debe ser menor que \"A\"", + "DE.Views.MailMergeSettings.txtLast": "Último campo", + "DE.Views.MailMergeSettings.txtNext": "Campo siguente", + "DE.Views.MailMergeSettings.txtPrev": "Campo anterior", + "DE.Views.MailMergeSettings.txtUntitled": "Sin título", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Imposible empezar fusión", "DE.Views.ParagraphSettings.strLineHeight": "Espaciado de línea", "DE.Views.ParagraphSettings.strParagraphSpacing": "Espaciado", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "No añadir intervalo entre párrafos del mismo estilo", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Ajustes de gráfico", "DE.Views.RightMenu.txtHeaderFooterSettings": "Ajustes de encabezado y pie de página", "DE.Views.RightMenu.txtImageSettings": "Ajustes de imagen", + "DE.Views.RightMenu.txtMailMergeSettings": "Ajustes de fusión", "DE.Views.RightMenu.txtParagraphSettings": "Ajustes de párrafo", "DE.Views.RightMenu.txtShapeSettings": "Ajustes de forma", "DE.Views.RightMenu.txtTableSettings": "Ajustes de tabla", @@ -971,8 +1057,8 @@ "DE.Views.TableSettings.deleteColumnText": "Borrar columna", "DE.Views.TableSettings.deleteRowText": "Borrar fila", "DE.Views.TableSettings.deleteTableText": "Borrar tabla", - "DE.Views.TableSettings.insertColumnLeftText": "Insertar columna izquierda", - "DE.Views.TableSettings.insertColumnRightText": "Insertar columna derecha", + "DE.Views.TableSettings.insertColumnLeftText": "Insertar columna a la izquierda", + "DE.Views.TableSettings.insertColumnRightText": "Insertar columna a la derecha", "DE.Views.TableSettings.insertRowAboveText": "Insertar fila arriba", "DE.Views.TableSettings.insertRowBelowText": "Insertar fila abajo", "DE.Views.TableSettings.mergeCellsText": "Unir celdas", @@ -1042,7 +1128,7 @@ "DE.Views.TableSettingsAdvanced.textLeft": "Izquierdo", "DE.Views.TableSettingsAdvanced.textLeftTooltip": "Izquierdo", "DE.Views.TableSettingsAdvanced.textMargin": "Margen", - "DE.Views.TableSettingsAdvanced.textMargins": "Márgenes de celdas", + "DE.Views.TableSettingsAdvanced.textMargins": "Márgenes de celda", "DE.Views.TableSettingsAdvanced.textMove": "Desplazar objeto con texto", "DE.Views.TableSettingsAdvanced.textNewColor": "Color personalizado", "DE.Views.TableSettingsAdvanced.textOnlyCells": "Sólo para celdas seleccionadas", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Insertar tabla", "DE.Views.Toolbar.tipInsertText": "Insertar texto", "DE.Views.Toolbar.tipLineSpace": "Espaciado de línea de párrafo", + "DE.Views.Toolbar.tipMailRecepients": "Combinación de Correspondencia", "DE.Views.Toolbar.tipMarkers": "Viñetas", "DE.Views.Toolbar.tipMultilevels": "Esquema", "DE.Views.Toolbar.tipNewDocument": "Nuevo documento", diff --git a/OfficeWeb/apps/documenteditor/main/locale/fr.json b/OfficeWeb/apps/documenteditor/main/locale/fr.json index 68e8c560..a89bc7c9 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/fr.json +++ b/OfficeWeb/apps/documenteditor/main/locale/fr.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Avertissement", "Common.Controllers.Chat.textEnterMessage": "Entrez votre message ici", - "Common.Controllers.Chat.textUserLimit": "Vous êtes en train d'utiliser ONLYOFFICE Free Edition.
        Ce ne sont que deux utilisateurs qui peuvent éditer le document simultanément.
        Voulez plus ? Envisagez d'acheter ONLYOFFICE Enterprise Edition.
        En savoir plus", + "Common.Controllers.Chat.textUserLimit": "Vous êtes en train d'utiliser ONLYOFFICE Free Edition.
        Ce ne sont que deux utilisateurs qui peuvent éditer le document simultanément.
        Voulez plus ? Envisagez d'acheter ONLYOFFICE Enterprise Edition.
        En savoir plus", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anonyme", "Common.Controllers.ExternalDiagramEditor.textClose": "Fermer", "Common.Controllers.ExternalDiagramEditor.warningText": "L'objet est désactivé car il est en cours de modification par un autre utilisateur.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Avertissement", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Anonymous", + "Common.Controllers.ExternalMergeEditor.textClose": "Close", + "Common.Controllers.ExternalMergeEditor.warningText": "The object is disabled because it is being edited by another user.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Warning", + "Common.Controllers.History.notcriticalErrorTitle": "Warning", "Common.UI.ComboBorderSize.txtNoBorders": "Pas de bordures", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "Pas de bordures", "Common.UI.ComboDataView.emptyComboText": "Aucun style", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "Non", "Common.UI.Window.okButtonText": "OK", "Common.UI.Window.textConfirmation": "Confirmation", + "Common.UI.Window.textDontShow": "Ne plus afficher ce message", "Common.UI.Window.textError": "Erreur", "Common.UI.Window.textInformation": "Information", "Common.UI.Window.textWarning": "Avertissement", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Fermer", "Common.Views.ExternalDiagramEditor.textSave": "Enregistrer", "Common.Views.ExternalDiagramEditor.textTitle": "Éditeur de graphique", + "Common.Views.ExternalMergeEditor.textClose": "Close", + "Common.Views.ExternalMergeEditor.textSave": "Save & Exit", + "Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients", + "Common.Views.Header.openNewTabText": "Open in New Tab", "Common.Views.Header.textBack": "Aller aux Documents", + "Common.Views.History.textHistoryHeader": "Retour au Document", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Annuler", "Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.textUrl": "Coller URL d'image", @@ -86,8 +97,11 @@ "Common.Views.InsertTableDialog.txtMinText": "La valeur minimale pour ce champ est {0}.", "Common.Views.InsertTableDialog.txtRows": "Nombre de lignes", "Common.Views.InsertTableDialog.txtTitle": "Taille du tableau", + "DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
        Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "DE.Controllers.LeftMenu.newDocumentTitle": "Document sans nom", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", "DE.Controllers.LeftMenu.requestEditRightsText": "Demande des droits de modification...", + "DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...", "DE.Controllers.LeftMenu.textNoTextFound": "Votre recherche n'a donné aucun résultat.S'il vous plaît, modifiez vos critères de recherche.", "DE.Controllers.LeftMenu.textReplaceSkipped": "Le remplacement est fait. {0} occurrences ont été ignorées.", "DE.Controllers.LeftMenu.textReplaceSuccess": "La recherche est effectuée. Occurrences ont été remplacées:{0}", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Erreur", "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", "DE.Controllers.Main.downloadErrorText": "Échec du téléchargement.", + "DE.Controllers.Main.downloadMergeText": "Downloading...", + "DE.Controllers.Main.downloadMergeTitle": "Downloading", "DE.Controllers.Main.downloadTextText": "Téléchargement du document...", "DE.Controllers.Main.downloadTitleText": "Téléchargement du document", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Connexion au serveur perdue. Le document ne peut être modifié en ce moment.", @@ -108,6 +124,8 @@ "DE.Controllers.Main.errorFilePassProtect": "Le document est protégé par le mot de passe et ne peut être ouvert.", "DE.Controllers.Main.errorKeyEncrypt": "Descripteur de clés inconnu", "DE.Controllers.Main.errorKeyExpire": "Key descriptor expired", + "DE.Controllers.Main.errorMailMergeLoadFile": "Loading failed", + "DE.Controllers.Main.errorMailMergeSaveFile": "Merge failed.", "DE.Controllers.Main.errorProcessSaveResult": "Échec de l'enregistrement", "DE.Controllers.Main.errorStockChart": "Ordre des lignes est incorrect. Pour créer un graphique boursier organisez vos données sur la feuille de calcul dans l'ordre suivant:
        cours à l'ouverture, cours maximal, cours minimal, cours à la clôture.", "DE.Controllers.Main.errorUpdateVersion": "La version du fichier a été changée. La page sera rechargée.", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Chargement d'une image", "DE.Controllers.Main.loadingDocumentTextText": "Chargement du document...", "DE.Controllers.Main.loadingDocumentTitleText": "Chargement du document", + "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.notcriticalErrorTitle": "Avertissement", "DE.Controllers.Main.openTextText": "Ouverture du document...", "DE.Controllers.Main.openTitleText": "Ouverture du document", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Préparation à l'enregistrement en cours. Veuillez patienter...", "DE.Controllers.Main.saveTextText": "Enregistrement du document...", "DE.Controllers.Main.saveTitleText": "Enregistrement du document", + "DE.Controllers.Main.sendMergeText": "Sending Merge...", + "DE.Controllers.Main.sendMergeTitle": "Sending Merge", "DE.Controllers.Main.splitDividerErrorText": "Le nombre de lignes doit être un diviseur de %1.", "DE.Controllers.Main.splitMaxColsErrorText": "Le nombre de colonnes doivent être inférieure à %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "Le nombre de lignes doit être inférieure à %1.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Boutons", "DE.Controllers.Main.txtCallouts": "Légendes", "DE.Controllers.Main.txtCharts": "Graphiques", + "DE.Controllers.Main.txtDiagramTitle": "Titre du diagramme", "DE.Controllers.Main.txtEditingMode": "Définissez le mode d'édition...", "DE.Controllers.Main.txtFiguredArrows": "Flèches figurées", "DE.Controllers.Main.txtLines": "Lignes", "DE.Controllers.Main.txtMath": "Maths", "DE.Controllers.Main.txtNeedSynchronize": "Vous avez des mises à jour", "DE.Controllers.Main.txtRectangles": "Rectangles", + "DE.Controllers.Main.txtSeries": "Série", "DE.Controllers.Main.txtStarsRibbons": "Étoiles et rubans", + "DE.Controllers.Main.txtXAxis": "Axe X", + "DE.Controllers.Main.txtYAxis": "Axe Y", "DE.Controllers.Main.unknownErrorText": "Erreur inconnue.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Votre navigateur n'est pas pris en charge.", "DE.Controllers.Main.uploadImageExtMessage": "Format d'image inconnu.", @@ -165,6 +191,7 @@ "DE.Controllers.Main.warnBrowserZoom": "Le paramètre actuel de zoom de votre navigateur n'est pas accepté. Veuillez rétablir le niveau de zoom par défaut en appuyant sur Ctrl+0.", "DE.Controllers.Main.warnProcessRightsChange": "Le droit d'édition du fichier vous a été refusé.", "DE.Controllers.Statusbar.zoomText": "Zoom {0}%", + "DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
        The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
        Do you want to continue?", "DE.Controllers.Toolbar.textAccent": "Types d'accentuation", "DE.Controllers.Toolbar.textBracket": "Crochets", "DE.Controllers.Toolbar.textEmptyImgUrl": "Specifiez URL d'image", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Supprimer la ligne", "DE.Views.DocumentHolder.deleteTableText": "Supprimer le tableau", "DE.Views.DocumentHolder.deleteText": "Supprimer", + "DE.Views.DocumentHolder.direct270Text": "Rotate at 270°", + "DE.Views.DocumentHolder.direct90Text": "Rotate at 90°", + "DE.Views.DocumentHolder.directHText": "Horizontal", + "DE.Views.DocumentHolder.directionText": "Text Direction", "DE.Views.DocumentHolder.editChartText": "Modifier données", "DE.Views.DocumentHolder.editFooterText": "Modifier le pied de page", "DE.Views.DocumentHolder.editHeaderText": "Modifier l'en-tête", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Nouvel objet", "DE.Views.FileMenu.btnDownloadCaption": "Télécharger comme...", "DE.Views.FileMenu.btnHelpCaption": "Aide...", + "DE.Views.FileMenu.btnHistoryCaption": "Version History", "DE.Views.FileMenu.btnInfoCaption": "Descriptif du document...", "DE.Views.FileMenu.btnPrintCaption": "Imprimer", "DE.Views.FileMenu.btnRecentFilesCaption": "Ouvrir récent...", "DE.Views.FileMenu.btnReturnCaption": "Retour au Document", + "DE.Views.FileMenu.btnRightsCaption": "Access Rights...", "DE.Views.FileMenu.btnSaveCaption": "Enregistrer", "DE.Views.FileMenu.btnSettingsCaption": "Paramètres avancés...", "DE.Views.FileMenu.btnToEditCaption": "Modifier le document", @@ -688,6 +721,8 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Symboles", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titre du document", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Mots", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Changer les droits d'accès", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Personnes qui ont des droits", "DE.Views.FileMenuPanels.Settings.okButtonText": "Appliquer", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Activer les repères d'alignement", "DE.Views.FileMenuPanels.Settings.strAutosave": "Activer l'enregistrement automatique", @@ -823,6 +858,56 @@ "DE.Views.LeftMenu.tipSearch": "Recherche", "DE.Views.LeftMenu.tipSupport": "Feedback & Support", "DE.Views.LeftMenu.tipTitles": "Titres", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Send", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Theme", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Attach as DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Attach as PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "File name", + "DE.Views.MailMergeEmailDlg.textFormat": "Mail format", + "DE.Views.MailMergeEmailDlg.textFrom": "From", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Message", + "DE.Views.MailMergeEmailDlg.textSubject": "Subject Line", + "DE.Views.MailMergeEmailDlg.textTitle": "Send to E-mail", + "DE.Views.MailMergeEmailDlg.textTo": "To", + "DE.Views.MailMergeEmailDlg.textWarning": "Warning!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Please note that mailing cannot be stopped once your click the 'Send' button.", + "DE.Views.MailMergeRecepients.textLoading": "Loading", + "DE.Views.MailMergeRecepients.textTitle": "Select Data Source", + "DE.Views.MailMergeSaveDlg.textLoading": "Loading", + "DE.Views.MailMergeSaveDlg.textTitle": "Folder for save", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Merging", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Merge failed.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Warning", + "DE.Views.MailMergeSettings.textAll": "All records", + "DE.Views.MailMergeSettings.textCurrent": "Current record", + "DE.Views.MailMergeSettings.textDataSource": "Data Source", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Download", + "DE.Views.MailMergeSettings.textEditData": "Edit recipients list", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "From", + "DE.Views.MailMergeSettings.textHighlight": "Highlight merge fields", + "DE.Views.MailMergeSettings.textInsertField": "Insert Merge Field", + "DE.Views.MailMergeSettings.textMaxRecepients": "Max 100 recipients.", + "DE.Views.MailMergeSettings.textMerge": "Merge", + "DE.Views.MailMergeSettings.textMergeFields": "Merge Fields", + "DE.Views.MailMergeSettings.textMergeTo": "Merge to", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Save", + "DE.Views.MailMergeSettings.textPreview": "Preview results", + "DE.Views.MailMergeSettings.textReadMore": "Read more", + "DE.Views.MailMergeSettings.textSendMsg": "All mail messages are ready and will be sent out within some time.
        The speed of mailing depends on your mail service.
        You can continue working with document or close it. After the operation is over the notification will be sent to your %1 email address.", + "DE.Views.MailMergeSettings.textTo": "To", + "DE.Views.MailMergeSettings.txtFirst": "To first field", + "DE.Views.MailMergeSettings.txtFromToError": "\"From\" value must be less than \"To\" value", + "DE.Views.MailMergeSettings.txtLast": "To last field", + "DE.Views.MailMergeSettings.txtNext": "To next field", + "DE.Views.MailMergeSettings.txtPrev": "To previous field", + "DE.Views.MailMergeSettings.txtUntitled": "Untitled", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Starting merge failed", "DE.Views.ParagraphSettings.strLineHeight": "Interligne", "DE.Views.ParagraphSettings.strParagraphSpacing": "Espacement", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "N'ajoutez pas l'intervalle entre paragraphes du même style", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Paramètres du graphique", "DE.Views.RightMenu.txtHeaderFooterSettings": "Paramètres d'en-têtes et de pieds de page", "DE.Views.RightMenu.txtImageSettings": "Paramètres de l'image", + "DE.Views.RightMenu.txtMailMergeSettings": "Mail Merge Settings", "DE.Views.RightMenu.txtParagraphSettings": "Paramètres du paragraphe", "DE.Views.RightMenu.txtShapeSettings": "Paramètres de la forme", "DE.Views.RightMenu.txtTableSettings": "Paramètres du tableau", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Insérer un tableau", "DE.Views.Toolbar.tipInsertText": "Insérer du texte", "DE.Views.Toolbar.tipLineSpace": "Interligne du paragraphe", + "DE.Views.Toolbar.tipMailRecepients": "Mail Merge", "DE.Views.Toolbar.tipMarkers": "Puces", "DE.Views.Toolbar.tipMultilevels": "Plan", "DE.Views.Toolbar.tipNewDocument": "Nouveau document", diff --git a/OfficeWeb/apps/documenteditor/main/locale/it.json b/OfficeWeb/apps/documenteditor/main/locale/it.json index 4b5b4b35..f2aa1630 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/it.json +++ b/OfficeWeb/apps/documenteditor/main/locale/it.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Avviso", "Common.Controllers.Chat.textEnterMessage": "Scrivi il tuo messaggio qui", - "Common.Controllers.Chat.textUserLimit": "Stai usando ONLYOFFICE Free Edition.
        Solo due utenti possono modificare il documento contemporaneamente.
        Si desidera di più? Considera l'acquisto di ONLYOFFICE Enterprise Edition.
        Ulteriori informazioni", + "Common.Controllers.Chat.textUserLimit": "Stai usando ONLYOFFICE Free Edition.
        Solo due utenti possono modificare il documento contemporaneamente.
        Si desidera di più? Considera l'acquisto di ONLYOFFICE Enterprise Edition.
        Ulteriori informazioni", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anonimo", "Common.Controllers.ExternalDiagramEditor.textClose": "Chiudi", "Common.Controllers.ExternalDiagramEditor.warningText": "L'oggetto è disabilitato perché si sta modificando da un altro utente.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Avviso", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Anonymous", + "Common.Controllers.ExternalMergeEditor.textClose": "Close", + "Common.Controllers.ExternalMergeEditor.warningText": "The object is disabled because it is being edited by another user.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Warning", + "Common.Controllers.History.notcriticalErrorTitle": "Warning", "Common.UI.ComboBorderSize.txtNoBorders": "Nessun bordo", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "Nessun bordo", "Common.UI.ComboDataView.emptyComboText": "Nessuno stile", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "No", "Common.UI.Window.okButtonText": "OK", "Common.UI.Window.textConfirmation": "Conferma", + "Common.UI.Window.textDontShow": "Non visualizzare più questo messaggio", "Common.UI.Window.textError": "Errore", "Common.UI.Window.textInformation": "Informazione", "Common.UI.Window.textWarning": "Avviso", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Chiudi", "Common.Views.ExternalDiagramEditor.textSave": "Salva ed esci", "Common.Views.ExternalDiagramEditor.textTitle": "Modifica grafico", + "Common.Views.ExternalMergeEditor.textClose": "Close", + "Common.Views.ExternalMergeEditor.textSave": "Save & Exit", + "Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients", + "Common.Views.Header.openNewTabText": "Open in New Tab", "Common.Views.Header.textBack": "Va' ai Documenti", + "Common.Views.History.textHistoryHeader": "Back to Document", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Annulla", "Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.textUrl": "Incolla URL immagine:", @@ -86,8 +97,11 @@ "Common.Views.InsertTableDialog.txtMinText": "Il valore minimo di questo campo è {0}.", "Common.Views.InsertTableDialog.txtRows": "Numero di righe", "Common.Views.InsertTableDialog.txtTitle": "Dimensioni tabella", + "DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
        Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "DE.Controllers.LeftMenu.newDocumentTitle": "Documento senza nome", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", "DE.Controllers.LeftMenu.requestEditRightsText": "Richiesta di autorizzazione di modifica...", + "DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...", "DE.Controllers.LeftMenu.textNoTextFound": "I dati da cercare non sono stati trovati. Modifica i parametri di ricerca.", "DE.Controllers.LeftMenu.textReplaceSkipped": "La sostituzione è stata effettuata. {0} occorrenze sono state saltate.", "DE.Controllers.LeftMenu.textReplaceSuccess": "La ricerca è stata effettuata. Occorrenze sostituite: {0}", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Errore", "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", "DE.Controllers.Main.downloadErrorText": "Download fallito.", + "DE.Controllers.Main.downloadMergeText": "Downloading...", + "DE.Controllers.Main.downloadMergeTitle": "Downloading", "DE.Controllers.Main.downloadTextText": "Download del documento in corso...", "DE.Controllers.Main.downloadTitleText": "Download del documento", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Connessione al server persa. Impossibile modificare il documento.", @@ -108,6 +124,8 @@ "DE.Controllers.Main.errorFilePassProtect": "Il documento è protetto da una password. Impossibile aprirlo.", "DE.Controllers.Main.errorKeyEncrypt": "Descrittore di chiave sconosciuto", "DE.Controllers.Main.errorKeyExpire": "Descrittore di chiave scaduto", + "DE.Controllers.Main.errorMailMergeLoadFile": "Loading failed", + "DE.Controllers.Main.errorMailMergeSaveFile": "Merge failed.", "DE.Controllers.Main.errorProcessSaveResult": "Salvataggio non riuscito", "DE.Controllers.Main.errorStockChart": "Ordine di righe scorretto. Per creare o grafico in pila posiziona i dati nel foglio nel seguente ordine:
        prezzo di apertura, prezzo massimo, prezzo minimo, prezzo di chiusura.", "DE.Controllers.Main.errorUpdateVersion": "La versione file è stata moificata. La pagina verrà ricaricata.", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Caricamento dell'immagine", "DE.Controllers.Main.loadingDocumentTextText": "Caricamento del documento in corso...", "DE.Controllers.Main.loadingDocumentTitleText": "Caricamento del documento", + "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.notcriticalErrorTitle": "Avviso", "DE.Controllers.Main.openTextText": "Apertura del documento in corso...", "DE.Controllers.Main.openTitleText": "Apertura del documento", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Preparazione al salvataggio. Si prega di aspettare...", "DE.Controllers.Main.saveTextText": "Salvataggio del documento in corso...", "DE.Controllers.Main.saveTitleText": "Salvataggio del documento", + "DE.Controllers.Main.sendMergeText": "Sending Merge...", + "DE.Controllers.Main.sendMergeTitle": "Sending Merge", "DE.Controllers.Main.splitDividerErrorText": "Il numero di righe deve essere un divisore di %1.", "DE.Controllers.Main.splitMaxColsErrorText": "Il numero di colonne deve essere inferiore a %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "Il numero di righe deve essere inferiore a %1.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Bottoni", "DE.Controllers.Main.txtCallouts": "Callout", "DE.Controllers.Main.txtCharts": "Grafici", + "DE.Controllers.Main.txtDiagramTitle": "Titolo diagramma", "DE.Controllers.Main.txtEditingMode": "Impostazione modo di modifica...", "DE.Controllers.Main.txtFiguredArrows": "Frecce decorate", "DE.Controllers.Main.txtLines": "Linee", "DE.Controllers.Main.txtMath": "Matematica", "DE.Controllers.Main.txtNeedSynchronize": "Ci sono aggiornamenti disponibili", "DE.Controllers.Main.txtRectangles": "Rettangoli", + "DE.Controllers.Main.txtSeries": "Serie", "DE.Controllers.Main.txtStarsRibbons": "Stelle e nastri", + "DE.Controllers.Main.txtXAxis": "Asse X", + "DE.Controllers.Main.txtYAxis": "Asse Y", "DE.Controllers.Main.unknownErrorText": "Errore sconosciuto.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Il tuo browser non è supportato.", "DE.Controllers.Main.uploadImageExtMessage": "Formato immagine sconosciuto.", @@ -165,6 +191,7 @@ "DE.Controllers.Main.warnBrowserZoom": "Le impostazioni correnti di zoom del tuo browser non sono completamente supportate. Per favore, ritorna allo zoom predefinito premendo Ctrl+0.", "DE.Controllers.Main.warnProcessRightsChange": "Ci stato negato il diritto alla modifica del file.", "DE.Controllers.Statusbar.zoomText": "Zoom {0}%", + "DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
        The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
        Do you want to continue?", "DE.Controllers.Toolbar.textAccent": "Accents", "DE.Controllers.Toolbar.textBracket": "Brackets", "DE.Controllers.Toolbar.textEmptyImgUrl": "Specifica URL immagine.", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Elimina riga", "DE.Views.DocumentHolder.deleteTableText": "Elimina tabella", "DE.Views.DocumentHolder.deleteText": "Elimina", + "DE.Views.DocumentHolder.direct270Text": "Rotate at 270°", + "DE.Views.DocumentHolder.direct90Text": "Rotate at 90°", + "DE.Views.DocumentHolder.directHText": "Horizontal", + "DE.Views.DocumentHolder.directionText": "Text Direction", "DE.Views.DocumentHolder.editChartText": "Modifica dati", "DE.Views.DocumentHolder.editFooterText": "Modifica piè di pagina", "DE.Views.DocumentHolder.editHeaderText": "Modifica intestazione", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Crea nuovo oggetto", "DE.Views.FileMenu.btnDownloadCaption": "Scarica in...", "DE.Views.FileMenu.btnHelpCaption": "Guida...", + "DE.Views.FileMenu.btnHistoryCaption": "Version History", "DE.Views.FileMenu.btnInfoCaption": "Informazioni documento...", "DE.Views.FileMenu.btnPrintCaption": "Stampa", "DE.Views.FileMenu.btnRecentFilesCaption": "Apri recenti...", "DE.Views.FileMenu.btnReturnCaption": "Torna al documento", + "DE.Views.FileMenu.btnRightsCaption": "Access Rights...", "DE.Views.FileMenu.btnSaveCaption": "Salva", "DE.Views.FileMenu.btnSettingsCaption": "Impostazioni avanzate...", "DE.Views.FileMenu.btnToEditCaption": "Modifica documento", @@ -688,6 +721,8 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Simboli", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titolo documento", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Parole", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Cambia diritti di accesso", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Persone con diritti", "DE.Views.FileMenuPanels.Settings.okButtonText": "Applica", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Abilita guide di allineamento", "DE.Views.FileMenuPanels.Settings.strAutosave": "Attiva salvataggio automatico", @@ -823,6 +858,56 @@ "DE.Views.LeftMenu.tipSearch": "Ricerca", "DE.Views.LeftMenu.tipSupport": "Feedback & Support", "DE.Views.LeftMenu.tipTitles": "Titoli", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Send", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Theme", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Attach as DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Attach as PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "File name", + "DE.Views.MailMergeEmailDlg.textFormat": "Mail format", + "DE.Views.MailMergeEmailDlg.textFrom": "From", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Message", + "DE.Views.MailMergeEmailDlg.textSubject": "Subject Line", + "DE.Views.MailMergeEmailDlg.textTitle": "Send to E-mail", + "DE.Views.MailMergeEmailDlg.textTo": "To", + "DE.Views.MailMergeEmailDlg.textWarning": "Warning!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Please note that mailing cannot be stopped once your click the 'Send' button.", + "DE.Views.MailMergeRecepients.textLoading": "Loading", + "DE.Views.MailMergeRecepients.textTitle": "Select Data Source", + "DE.Views.MailMergeSaveDlg.textLoading": "Loading", + "DE.Views.MailMergeSaveDlg.textTitle": "Folder for save", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Merging", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Merge failed.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Warning", + "DE.Views.MailMergeSettings.textAll": "All records", + "DE.Views.MailMergeSettings.textCurrent": "Current record", + "DE.Views.MailMergeSettings.textDataSource": "Data Source", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Download", + "DE.Views.MailMergeSettings.textEditData": "Edit recipients list", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "From", + "DE.Views.MailMergeSettings.textHighlight": "Highlight merge fields", + "DE.Views.MailMergeSettings.textInsertField": "Insert Merge Field", + "DE.Views.MailMergeSettings.textMaxRecepients": "Max 100 recipients.", + "DE.Views.MailMergeSettings.textMerge": "Merge", + "DE.Views.MailMergeSettings.textMergeFields": "Merge Fields", + "DE.Views.MailMergeSettings.textMergeTo": "Merge to", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Save", + "DE.Views.MailMergeSettings.textPreview": "Preview results", + "DE.Views.MailMergeSettings.textReadMore": "Read more", + "DE.Views.MailMergeSettings.textSendMsg": "All mail messages are ready and will be sent out within some time.
        The speed of mailing depends on your mail service.
        You can continue working with document or close it. After the operation is over the notification will be sent to your %1 email address.", + "DE.Views.MailMergeSettings.textTo": "To", + "DE.Views.MailMergeSettings.txtFirst": "To first field", + "DE.Views.MailMergeSettings.txtFromToError": "\"From\" value must be less than \"To\" value", + "DE.Views.MailMergeSettings.txtLast": "To last field", + "DE.Views.MailMergeSettings.txtNext": "To next field", + "DE.Views.MailMergeSettings.txtPrev": "To previous field", + "DE.Views.MailMergeSettings.txtUntitled": "Untitled", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Starting merge failed", "DE.Views.ParagraphSettings.strLineHeight": "Interlinea", "DE.Views.ParagraphSettings.strParagraphSpacing": "Spaziatura", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "Non aggiungere intervallo tra paragrafi dello stesso stile", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Impostazioni grafico", "DE.Views.RightMenu.txtHeaderFooterSettings": "Impostazioni intestazione e piè di pagina", "DE.Views.RightMenu.txtImageSettings": "Impostazioni immagine", + "DE.Views.RightMenu.txtMailMergeSettings": "Mail Merge Settings", "DE.Views.RightMenu.txtParagraphSettings": "Impostazioni paragrafo", "DE.Views.RightMenu.txtShapeSettings": "Impostazioni forma", "DE.Views.RightMenu.txtTableSettings": "Impostazioni tabella", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Inserisci tabella", "DE.Views.Toolbar.tipInsertText": "Inserisci testo", "DE.Views.Toolbar.tipLineSpace": "Interlinea tra i paragrafi", + "DE.Views.Toolbar.tipMailRecepients": "Mail Merge", "DE.Views.Toolbar.tipMarkers": "Elenchi puntati", "DE.Views.Toolbar.tipMultilevels": "Struttura", "DE.Views.Toolbar.tipNewDocument": "Nuovo documento", diff --git a/OfficeWeb/apps/documenteditor/main/locale/pt.json b/OfficeWeb/apps/documenteditor/main/locale/pt.json index 716ff5ba..7ca9bb3f 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/pt.json +++ b/OfficeWeb/apps/documenteditor/main/locale/pt.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Aviso", - "Common.Controllers.Chat.textEnterMessage": "Inserir sua mensagem aqui", - "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
        Only two users can co-edit the document simultaneously.
        Want more? Consider buying ONLYOFFICE Enterprise Edition.
        Read more", + "Common.Controllers.Chat.textEnterMessage": "Insira sua mensagem aqui", + "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
        Only two users can co-edit the document simultaneously.
        Want more? Consider buying ONLYOFFICE Enterprise Edition.
        Read more", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anônimo", "Common.Controllers.ExternalDiagramEditor.textClose": "Fechar", "Common.Controllers.ExternalDiagramEditor.warningText": "O objeto está desabilitado por que está sendo editado por outro usuário.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Aviso", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Anonymous", + "Common.Controllers.ExternalMergeEditor.textClose": "Close", + "Common.Controllers.ExternalMergeEditor.warningText": "The object is disabled because it is being edited by another user.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Warning", + "Common.Controllers.History.notcriticalErrorTitle": "Warning", "Common.UI.ComboBorderSize.txtNoBorders": "Sem bordas", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "Sem bordas", "Common.UI.ComboDataView.emptyComboText": "Sem estilos", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "Não", "Common.UI.Window.okButtonText": "OK", "Common.UI.Window.textConfirmation": "Confirmação", + "Common.UI.Window.textDontShow": "Não exibir esta mensagem novamente", "Common.UI.Window.textError": "Erro", "Common.UI.Window.textInformation": "Informações", "Common.UI.Window.textWarning": "Aviso", @@ -41,7 +47,7 @@ "Common.Views.About.txtLicensee": "LICENÇA", "Common.Views.About.txtLicensor": "LICENCIANTE", "Common.Views.About.txtMail": "e-mail:", - "Common.Views.About.txtPoweredBy": "Powered by", + "Common.Views.About.txtPoweredBy": "Desenvolvido por", "Common.Views.About.txtTel": "tel.: ", "Common.Views.About.txtVersion": "Versão", "Common.Views.AdvancedSettingsWindow.cancelButtonText": "Cancelar", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Fechar", "Common.Views.ExternalDiagramEditor.textSave": "Salvar e Sair", "Common.Views.ExternalDiagramEditor.textTitle": "Editor de gráfico", + "Common.Views.ExternalMergeEditor.textClose": "Close", + "Common.Views.ExternalMergeEditor.textSave": "Save & Exit", + "Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recepients", + "Common.Views.Header.openNewTabText": "Open in New Tab", "Common.Views.Header.textBack": "Ir para Documentos", + "Common.Views.History.textHistoryHeader": "Back to Document", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancelar", "Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.textUrl": "Colar uma URL de imagem:", @@ -86,11 +97,14 @@ "Common.Views.InsertTableDialog.txtMinText": "O valor mínimo para este campo é {0}.", "Common.Views.InsertTableDialog.txtRows": "Número de linhas", "Common.Views.InsertTableDialog.txtTitle": "Tamanho da tabela", + "DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
        Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "DE.Controllers.LeftMenu.newDocumentTitle": "Documento sem nome", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", "DE.Controllers.LeftMenu.requestEditRightsText": "Solicitando direitos de edição...", + "DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...", "DE.Controllers.LeftMenu.textNoTextFound": "Os dados que você tem estado procurando não podem ser encontrados. Ajuste suas opções de pesquisa.", "DE.Controllers.LeftMenu.textReplaceSkipped": "A substituição foi realizada. {0} ocorrências foram ignoradas.", - "DE.Controllers.LeftMenu.textReplaceSuccess": "A pesquisa foi realizada. {0} ocorrências foram substituídas.", + "DE.Controllers.LeftMenu.textReplaceSuccess": "A pesquisa foi realizada. Ocorrências substituídas: {0}", "DE.Controllers.Main.applyChangesTextText": "Carregando as alterações...", "DE.Controllers.Main.applyChangesTitleText": "Carregando as alterações", "DE.Controllers.Main.convertationErrorText": "Conversão falhou.", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Erro", "DE.Controllers.Main.defaultTitleText": "Editor de documento ONLYOFFICE", "DE.Controllers.Main.downloadErrorText": "Download falhou.", + "DE.Controllers.Main.downloadMergeText": "Downloading...", + "DE.Controllers.Main.downloadMergeTitle": "Downloading", "DE.Controllers.Main.downloadTextText": "Baixando documento...", "DE.Controllers.Main.downloadTitleText": "Baixando documento", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Conexão com servidor perdida. O documento não pode ser editado neste momento.", @@ -108,10 +124,12 @@ "DE.Controllers.Main.errorFilePassProtect": "O documento é protegido por senha e não pode ser aberto.", "DE.Controllers.Main.errorKeyEncrypt": "Descritor de chave desconhecido", "DE.Controllers.Main.errorKeyExpire": "Descritor de chave expirado", + "DE.Controllers.Main.errorMailMergeLoadFile": "Loading failed", + "DE.Controllers.Main.errorMailMergeSaveFile": "Merge failed.", "DE.Controllers.Main.errorProcessSaveResult": "Salvamento falhou.", "DE.Controllers.Main.errorStockChart": "Ordem da linha incorreta. Para criar um gráfico de ações coloque os dados na planilha na seguinte ordem:
        preço de abertura, preço máx., preço mín., preço de fechamento.", "DE.Controllers.Main.errorUpdateVersion": "A versão do arquivo foi alterada. A página será recarregada.", - "DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.", + "DE.Controllers.Main.errorUserDrop": "O arquivo não pode ser acessado agora.", "DE.Controllers.Main.errorUsersExceed": "O número de usuários permitidos pelo plano de preços foi excedido", "DE.Controllers.Main.leavePageText": "Você não salvou as alterações neste documento. Clique em \"Permanecer nesta página\", em seguida, clique em \"Salvar\" para salvá-las. Clique em \"Sair desta página\" para descartar todas as alterações não salvas.", "DE.Controllers.Main.loadFontsTextText": "Carregando dados...", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Carregando imagem", "DE.Controllers.Main.loadingDocumentTextText": "Carregando documento...", "DE.Controllers.Main.loadingDocumentTitleText": "Carregando documento", + "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.notcriticalErrorTitle": "Aviso", "DE.Controllers.Main.openTextText": "Abrindo documento...", "DE.Controllers.Main.openTitleText": "Abrindo documento", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Preparando para salvar. Aguarde...", "DE.Controllers.Main.saveTextText": "Salvando documento...", "DE.Controllers.Main.saveTitleText": "Salvando documento", + "DE.Controllers.Main.sendMergeText": "Sending Merge...", + "DE.Controllers.Main.sendMergeTitle": "Sending Merge", "DE.Controllers.Main.splitDividerErrorText": "O número de linhas deve ser um divisor de %1.", "DE.Controllers.Main.splitMaxColsErrorText": "O número de colunas deve ser inferior a %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "O número de linhas deve ser inferior a %1.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Botões", "DE.Controllers.Main.txtCallouts": "Textos explicativos", "DE.Controllers.Main.txtCharts": "Gráficos", + "DE.Controllers.Main.txtDiagramTitle": "Título do diagrama", "DE.Controllers.Main.txtEditingMode": "Definir modo de edição...", "DE.Controllers.Main.txtFiguredArrows": "Setas figuradas", "DE.Controllers.Main.txtLines": "Linhas", "DE.Controllers.Main.txtMath": "Matemática", "DE.Controllers.Main.txtNeedSynchronize": "Você tem atualizações", "DE.Controllers.Main.txtRectangles": "Retângulos", + "DE.Controllers.Main.txtSeries": "Série", "DE.Controllers.Main.txtStarsRibbons": "Estrelas e arco-íris", + "DE.Controllers.Main.txtXAxis": "Eixo X", + "DE.Controllers.Main.txtYAxis": "Eixo Y", "DE.Controllers.Main.unknownErrorText": "Erro desconhecido.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Seu navegador não é suportado.", "DE.Controllers.Main.uploadImageExtMessage": "Formato de imagem desconhecido.", @@ -165,335 +191,336 @@ "DE.Controllers.Main.warnBrowserZoom": "A configuração de zoom atual de seu navegador não é completamente suportada. Redefina para o zoom padrão pressionando Ctrl+0.", "DE.Controllers.Main.warnProcessRightsChange": "Foi negado a você o direito de editar o arquivo.", "DE.Controllers.Statusbar.zoomText": "Zoom {0}%", - "DE.Controllers.Toolbar.textAccent": "Accents", - "DE.Controllers.Toolbar.textBracket": "Brackets", + "DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
        The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
        Do you want to continue?", + "DE.Controllers.Toolbar.textAccent": "Destaques", + "DE.Controllers.Toolbar.textBracket": "Parênteses", "DE.Controllers.Toolbar.textEmptyImgUrl": "Você precisa especificar uma URL de imagem.", "DE.Controllers.Toolbar.textFontSizeErr": "O valor inserido está incorreto.
        Insira um valor numérico entre 1 e 100", - "DE.Controllers.Toolbar.textFraction": "Fractions", - "DE.Controllers.Toolbar.textFunction": "Functions", - "DE.Controllers.Toolbar.textIntegral": "Integrals", - "DE.Controllers.Toolbar.textLargeOperator": "Large Operators", - "DE.Controllers.Toolbar.textLimitAndLog": "Limits And Logarithms", - "DE.Controllers.Toolbar.textMatrix": "Matrixes", - "DE.Controllers.Toolbar.textOperator": "Operators", - "DE.Controllers.Toolbar.textRadical": "Radicals", + "DE.Controllers.Toolbar.textFraction": "Frações", + "DE.Controllers.Toolbar.textFunction": "Funções", + "DE.Controllers.Toolbar.textIntegral": "Inteiros", + "DE.Controllers.Toolbar.textLargeOperator": "Grandes operadores", + "DE.Controllers.Toolbar.textLimitAndLog": "Limites e logaritmos", + "DE.Controllers.Toolbar.textMatrix": "Matrizes", + "DE.Controllers.Toolbar.textOperator": "Operadores", + "DE.Controllers.Toolbar.textRadical": "Radicais", "DE.Controllers.Toolbar.textScript": "Scripts", - "DE.Controllers.Toolbar.textSymbols": "Symbols", + "DE.Controllers.Toolbar.textSymbols": "Símbolos", "DE.Controllers.Toolbar.textWarning": "Aviso", - "DE.Controllers.Toolbar.txtAccent_Accent": "Acute", - "DE.Controllers.Toolbar.txtAccent_ArrowD": "Right-Left Arrow Above", - "DE.Controllers.Toolbar.txtAccent_ArrowL": "Leftwards Arrow Above", - "DE.Controllers.Toolbar.txtAccent_ArrowR": "Rightwards Arrow Above", - "DE.Controllers.Toolbar.txtAccent_Bar": "Bar", - "DE.Controllers.Toolbar.txtAccent_BarBot": "Underbar", - "DE.Controllers.Toolbar.txtAccent_BarTop": "Overbar", - "DE.Controllers.Toolbar.txtAccent_BorderBox": "Boxed Formula (With Placeholder)", - "DE.Controllers.Toolbar.txtAccent_BorderBoxCustom": "Boxed Formula(Example)", - "DE.Controllers.Toolbar.txtAccent_Check": "Check", - "DE.Controllers.Toolbar.txtAccent_CurveBracketBot": "Underbrace", - "DE.Controllers.Toolbar.txtAccent_CurveBracketTop": "Overbrace", - "DE.Controllers.Toolbar.txtAccent_Custom_1": "Vector A", - "DE.Controllers.Toolbar.txtAccent_Custom_2": "ABC With Overbar", - "DE.Controllers.Toolbar.txtAccent_Custom_3": "x XOR y With Overbar", - "DE.Controllers.Toolbar.txtAccent_DDDot": "Triple Dot", - "DE.Controllers.Toolbar.txtAccent_DDot": "Double Dot", - "DE.Controllers.Toolbar.txtAccent_Dot": "Dot", - "DE.Controllers.Toolbar.txtAccent_DoubleBar": "Double Overbar", + "DE.Controllers.Toolbar.txtAccent_Accent": "Agudo", + "DE.Controllers.Toolbar.txtAccent_ArrowD": "Seta para direita-esquerda acima", + "DE.Controllers.Toolbar.txtAccent_ArrowL": "Seta adiante para cima", + "DE.Controllers.Toolbar.txtAccent_ArrowR": "Seta para direita acima", + "DE.Controllers.Toolbar.txtAccent_Bar": "Barra", + "DE.Controllers.Toolbar.txtAccent_BarBot": "Barra inferior", + "DE.Controllers.Toolbar.txtAccent_BarTop": "Barra superior", + "DE.Controllers.Toolbar.txtAccent_BorderBox": "Fórmula embalada (com Placeholder)", + "DE.Controllers.Toolbar.txtAccent_BorderBoxCustom": "Fórmula embalada(Exemplo)", + "DE.Controllers.Toolbar.txtAccent_Check": "Verificar", + "DE.Controllers.Toolbar.txtAccent_CurveBracketBot": "Chave Inferior", + "DE.Controllers.Toolbar.txtAccent_CurveBracketTop": "Chave Superior", + "DE.Controllers.Toolbar.txtAccent_Custom_1": "Vetor A", + "DE.Controllers.Toolbar.txtAccent_Custom_2": "Barra superior com ABC", + "DE.Controllers.Toolbar.txtAccent_Custom_3": "x XOR y com barra superior", + "DE.Controllers.Toolbar.txtAccent_DDDot": "Ponto triplo", + "DE.Controllers.Toolbar.txtAccent_DDot": "Ponto duplo", + "DE.Controllers.Toolbar.txtAccent_Dot": "Ponto", + "DE.Controllers.Toolbar.txtAccent_DoubleBar": "Barra superior dupla", "DE.Controllers.Toolbar.txtAccent_Grave": "Grave", - "DE.Controllers.Toolbar.txtAccent_GroupBot": "Grouping Character Below", - "DE.Controllers.Toolbar.txtAccent_GroupTop": "Grouping Character Above", - "DE.Controllers.Toolbar.txtAccent_HarpoonL": "Leftwards Harpoon Above", - "DE.Controllers.Toolbar.txtAccent_HarpoonR": "Rightwards Harpoon Above", - "DE.Controllers.Toolbar.txtAccent_Hat": "Hat", + "DE.Controllers.Toolbar.txtAccent_GroupBot": "Agrupamento de caracteres abaixo", + "DE.Controllers.Toolbar.txtAccent_GroupTop": "Agrupamento de caracteres acima", + "DE.Controllers.Toolbar.txtAccent_HarpoonL": "Arpão adiante para cima", + "DE.Controllers.Toolbar.txtAccent_HarpoonR": "Arpão para direita acima", + "DE.Controllers.Toolbar.txtAccent_Hat": "Acento circunflexo", "DE.Controllers.Toolbar.txtAccent_Smile": "Breve", - "DE.Controllers.Toolbar.txtAccent_Tilde": "Tilde", - "DE.Controllers.Toolbar.txtBracket_Angle": "Brackets", - "DE.Controllers.Toolbar.txtBracket_Angle_Delimiter_2": "Brackets with Separators", - "DE.Controllers.Toolbar.txtBracket_Angle_Delimiter_3": "Brackets with Separators", - "DE.Controllers.Toolbar.txtBracket_Angle_NoneOpen": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Angle_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Curve": "Brackets", - "DE.Controllers.Toolbar.txtBracket_Curve_Delimiter_2": "Brackets with Separators", - "DE.Controllers.Toolbar.txtBracket_Curve_NoneOpen": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Curve_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Custom_1": "Cases (Two Conditions)", - "DE.Controllers.Toolbar.txtBracket_Custom_2": "Cases (Three Conditions)", - "DE.Controllers.Toolbar.txtBracket_Custom_3": "Stack Object", - "DE.Controllers.Toolbar.txtBracket_Custom_4": "Stack Object", - "DE.Controllers.Toolbar.txtBracket_Custom_5": "Cases Example", - "DE.Controllers.Toolbar.txtBracket_Custom_6": "Binomial Coefficient", - "DE.Controllers.Toolbar.txtBracket_Custom_7": "Binomial Coefficient", - "DE.Controllers.Toolbar.txtBracket_Line": "Brackets", - "DE.Controllers.Toolbar.txtBracket_Line_NoneOpen": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Line_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_LineDouble": "Brackets", - "DE.Controllers.Toolbar.txtBracket_LineDouble_NoneOpen": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_LineDouble_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_LowLim": "Brackets", - "DE.Controllers.Toolbar.txtBracket_LowLim_NoneNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_LowLim_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Round": "Brackets", - "DE.Controllers.Toolbar.txtBracket_Round_Delimiter_2": "Brackets with Separators", - "DE.Controllers.Toolbar.txtBracket_Round_NoneOpen": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Round_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Square": "Brackets", - "DE.Controllers.Toolbar.txtBracket_Square_CloseClose": "Brackets", - "DE.Controllers.Toolbar.txtBracket_Square_CloseOpen": "Brackets", - "DE.Controllers.Toolbar.txtBracket_Square_NoneOpen": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Square_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_Square_OpenOpen": "Brackets", - "DE.Controllers.Toolbar.txtBracket_SquareDouble": "Brackets", - "DE.Controllers.Toolbar.txtBracket_SquareDouble_NoneOpen": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_SquareDouble_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_UppLim": "Brackets", - "DE.Controllers.Toolbar.txtBracket_UppLim_NoneOpen": "Single Bracket", - "DE.Controllers.Toolbar.txtBracket_UppLim_OpenNone": "Single Bracket", - "DE.Controllers.Toolbar.txtFractionDiagonal": "Skewed Fraction", - "DE.Controllers.Toolbar.txtFractionDifferential_1": "Differential", - "DE.Controllers.Toolbar.txtFractionDifferential_2": "Differential", - "DE.Controllers.Toolbar.txtFractionDifferential_3": "Differential", - "DE.Controllers.Toolbar.txtFractionDifferential_4": "Differential", - "DE.Controllers.Toolbar.txtFractionHorizontal": "Linear Fraction", - "DE.Controllers.Toolbar.txtFractionPi_2": "Pi Over 2", - "DE.Controllers.Toolbar.txtFractionSmall": "Small Fraction", - "DE.Controllers.Toolbar.txtFractionVertical": "Stacked Fraction", - "DE.Controllers.Toolbar.txtFunction_1_Cos": "Inverse Cosine Function", - "DE.Controllers.Toolbar.txtFunction_1_Cosh": "Hyperbolic Inverse Cosine Function", - "DE.Controllers.Toolbar.txtFunction_1_Cot": "Inverse Cotangent Function", - "DE.Controllers.Toolbar.txtFunction_1_Coth": "Hyperbolic Inverse Cotangent Function", - "DE.Controllers.Toolbar.txtFunction_1_Csc": "Inverse Cosecant Function", - "DE.Controllers.Toolbar.txtFunction_1_Csch": "Hyperbolic Inverse Cosecant Function", - "DE.Controllers.Toolbar.txtFunction_1_Sec": "Inverse Secant Function", - "DE.Controllers.Toolbar.txtFunction_1_Sech": "Hyperbolic Inverse Secant Function", - "DE.Controllers.Toolbar.txtFunction_1_Sin": "Inverse Sine Function", - "DE.Controllers.Toolbar.txtFunction_1_Sinh": "Hyperbolic Inverse Sine Function", - "DE.Controllers.Toolbar.txtFunction_1_Tan": "Inverse Tangent Function", - "DE.Controllers.Toolbar.txtFunction_1_Tanh": "Hyperbolic Inverse Tangent Function", - "DE.Controllers.Toolbar.txtFunction_Cos": "Cosine Function", - "DE.Controllers.Toolbar.txtFunction_Cosh": "Hyperbolic Cosine Function", - "DE.Controllers.Toolbar.txtFunction_Cot": "Cotangent Function", - "DE.Controllers.Toolbar.txtFunction_Coth": "Hyperbolic Cotangent Function", - "DE.Controllers.Toolbar.txtFunction_Csc": "Cosecant Function", - "DE.Controllers.Toolbar.txtFunction_Csch": "Hyperbolic Cosecant Function", - "DE.Controllers.Toolbar.txtFunction_Custom_1": "Sine theta", + "DE.Controllers.Toolbar.txtAccent_Tilde": "Til", + "DE.Controllers.Toolbar.txtBracket_Angle": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_Angle_Delimiter_2": "Parênteses com separadores", + "DE.Controllers.Toolbar.txtBracket_Angle_Delimiter_3": "Parênteses com separadores", + "DE.Controllers.Toolbar.txtBracket_Angle_NoneOpen": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Angle_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Curve": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_Curve_Delimiter_2": "Parênteses com separadores", + "DE.Controllers.Toolbar.txtBracket_Curve_NoneOpen": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Curve_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Custom_1": "Casos (Duas Condições)", + "DE.Controllers.Toolbar.txtBracket_Custom_2": "Casos (Três Condições)", + "DE.Controllers.Toolbar.txtBracket_Custom_3": "Objeto Empilhado", + "DE.Controllers.Toolbar.txtBracket_Custom_4": "Objeto Empilhado", + "DE.Controllers.Toolbar.txtBracket_Custom_5": "Exemplo de casos", + "DE.Controllers.Toolbar.txtBracket_Custom_6": "Coeficiente binominal", + "DE.Controllers.Toolbar.txtBracket_Custom_7": "Coeficiente binominal", + "DE.Controllers.Toolbar.txtBracket_Line": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_Line_NoneOpen": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Line_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_LineDouble": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_LineDouble_NoneOpen": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_LineDouble_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_LowLim": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_LowLim_NoneNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_LowLim_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Round": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_Round_Delimiter_2": "Parênteses com separadores", + "DE.Controllers.Toolbar.txtBracket_Round_NoneOpen": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Round_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Square": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_Square_CloseClose": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_Square_CloseOpen": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_Square_NoneOpen": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Square_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_Square_OpenOpen": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_SquareDouble": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_SquareDouble_NoneOpen": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_SquareDouble_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_UppLim": "Parênteses", + "DE.Controllers.Toolbar.txtBracket_UppLim_NoneOpen": "Colchete Simples", + "DE.Controllers.Toolbar.txtBracket_UppLim_OpenNone": "Colchete Simples", + "DE.Controllers.Toolbar.txtFractionDiagonal": "Fração inclinada", + "DE.Controllers.Toolbar.txtFractionDifferential_1": "Diferencial", + "DE.Controllers.Toolbar.txtFractionDifferential_2": "Diferencial", + "DE.Controllers.Toolbar.txtFractionDifferential_3": "Diferencial", + "DE.Controllers.Toolbar.txtFractionDifferential_4": "Diferencial", + "DE.Controllers.Toolbar.txtFractionHorizontal": "Fração linear", + "DE.Controllers.Toolbar.txtFractionPi_2": "Pi sobre 2", + "DE.Controllers.Toolbar.txtFractionSmall": "Fração pequena", + "DE.Controllers.Toolbar.txtFractionVertical": "Fração Empilhada", + "DE.Controllers.Toolbar.txtFunction_1_Cos": "Função cosseno inverso", + "DE.Controllers.Toolbar.txtFunction_1_Cosh": "Função cosseno inverso hiperbólico", + "DE.Controllers.Toolbar.txtFunction_1_Cot": "Função cotangente inversa", + "DE.Controllers.Toolbar.txtFunction_1_Coth": "Função cotangente inversa hiperbólica", + "DE.Controllers.Toolbar.txtFunction_1_Csc": "Função cossecante inversa", + "DE.Controllers.Toolbar.txtFunction_1_Csch": "Função cossecante inversa hiperbólica", + "DE.Controllers.Toolbar.txtFunction_1_Sec": "Função secante inversa", + "DE.Controllers.Toolbar.txtFunction_1_Sech": "Função secante inversa hiperbólica", + "DE.Controllers.Toolbar.txtFunction_1_Sin": "Função seno inverso", + "DE.Controllers.Toolbar.txtFunction_1_Sinh": "Função seno inverso hiperbólico", + "DE.Controllers.Toolbar.txtFunction_1_Tan": "Função tangente inversa", + "DE.Controllers.Toolbar.txtFunction_1_Tanh": "Função tangente inversa hiperbólica", + "DE.Controllers.Toolbar.txtFunction_Cos": "Função cosseno", + "DE.Controllers.Toolbar.txtFunction_Cosh": "Função cosseno hiperbólico", + "DE.Controllers.Toolbar.txtFunction_Cot": "Função cotangente", + "DE.Controllers.Toolbar.txtFunction_Coth": "Função cotangente hiperbólica", + "DE.Controllers.Toolbar.txtFunction_Csc": "Função cossecante", + "DE.Controllers.Toolbar.txtFunction_Csch": "Função co-secante hiperbólica", + "DE.Controllers.Toolbar.txtFunction_Custom_1": "Teta seno", "DE.Controllers.Toolbar.txtFunction_Custom_2": "Cos 2x", - "DE.Controllers.Toolbar.txtFunction_Custom_3": "Tangent formula", - "DE.Controllers.Toolbar.txtFunction_Sec": "Secant Function", - "DE.Controllers.Toolbar.txtFunction_Sech": "Hyperbolic Secant Function", - "DE.Controllers.Toolbar.txtFunction_Sin": "Sine Function", - "DE.Controllers.Toolbar.txtFunction_Sinh": "Hyperbolic Sine Function", - "DE.Controllers.Toolbar.txtFunction_Tan": "Tangent Function", - "DE.Controllers.Toolbar.txtFunction_Tanh": "Hyperbolic Tangent Function", + "DE.Controllers.Toolbar.txtFunction_Custom_3": "Fórmula da tangente", + "DE.Controllers.Toolbar.txtFunction_Sec": "Função secante", + "DE.Controllers.Toolbar.txtFunction_Sech": "Função secante hiperbólica", + "DE.Controllers.Toolbar.txtFunction_Sin": "Função de seno", + "DE.Controllers.Toolbar.txtFunction_Sinh": "Função seno hiperbólico", + "DE.Controllers.Toolbar.txtFunction_Tan": "Função da tangente", + "DE.Controllers.Toolbar.txtFunction_Tanh": "Função tangente hiperbólica", "DE.Controllers.Toolbar.txtIntegral": "Integral", - "DE.Controllers.Toolbar.txtIntegral_dtheta": "Differential theta", - "DE.Controllers.Toolbar.txtIntegral_dx": "Differential x", - "DE.Controllers.Toolbar.txtIntegral_dy": "Differential y", + "DE.Controllers.Toolbar.txtIntegral_dtheta": "Teta diferencial", + "DE.Controllers.Toolbar.txtIntegral_dx": "Diferencial x", + "DE.Controllers.Toolbar.txtIntegral_dy": "Diferencial y", "DE.Controllers.Toolbar.txtIntegralCenterSubSup": "Integral", - "DE.Controllers.Toolbar.txtIntegralDouble": "Double Integral", - "DE.Controllers.Toolbar.txtIntegralDoubleCenterSubSup": "Double Integral", - "DE.Controllers.Toolbar.txtIntegralDoubleSubSup": "Double Integral", - "DE.Controllers.Toolbar.txtIntegralOriented": "Contour Integral", - "DE.Controllers.Toolbar.txtIntegralOrientedCenterSubSup": "Contour Integral", - "DE.Controllers.Toolbar.txtIntegralOrientedDouble": "Surface Integral", - "DE.Controllers.Toolbar.txtIntegralOrientedDoubleCenterSubSup": "Surface Integral", - "DE.Controllers.Toolbar.txtIntegralOrientedDoubleSubSup": "Surface Integral", - "DE.Controllers.Toolbar.txtIntegralOrientedSubSup": "Contour Integral", + "DE.Controllers.Toolbar.txtIntegralDouble": "Inteiro duplo", + "DE.Controllers.Toolbar.txtIntegralDoubleCenterSubSup": "Inteiro duplo", + "DE.Controllers.Toolbar.txtIntegralDoubleSubSup": "Inteiro duplo", + "DE.Controllers.Toolbar.txtIntegralOriented": "Contorno integral", + "DE.Controllers.Toolbar.txtIntegralOrientedCenterSubSup": "Contorno integral", + "DE.Controllers.Toolbar.txtIntegralOrientedDouble": "Integral de Superfície", + "DE.Controllers.Toolbar.txtIntegralOrientedDoubleCenterSubSup": "Integral de Superfície", + "DE.Controllers.Toolbar.txtIntegralOrientedDoubleSubSup": "Integral de Superfície", + "DE.Controllers.Toolbar.txtIntegralOrientedSubSup": "Contorno integral", "DE.Controllers.Toolbar.txtIntegralOrientedTriple": "Volume Integral", "DE.Controllers.Toolbar.txtIntegralOrientedTripleCenterSubSup": "Volume Integral", "DE.Controllers.Toolbar.txtIntegralOrientedTripleSubSup": "Volume Integral", "DE.Controllers.Toolbar.txtIntegralSubSup": "Integral", - "DE.Controllers.Toolbar.txtIntegralTriple": "Triple Integral", - "DE.Controllers.Toolbar.txtIntegralTripleCenterSubSup": "Triple Integral", - "DE.Controllers.Toolbar.txtIntegralTripleSubSup": "Triple Integral", - "DE.Controllers.Toolbar.txtLargeOperator_Conjunction": "Wedge", - "DE.Controllers.Toolbar.txtLargeOperator_Conjunction_CenterSub": "Wedge", - "DE.Controllers.Toolbar.txtLargeOperator_Conjunction_CenterSubSup": "Wedge", - "DE.Controllers.Toolbar.txtLargeOperator_Conjunction_Sub": "Wedge", - "DE.Controllers.Toolbar.txtLargeOperator_Conjunction_SubSup": "Wedge", - "DE.Controllers.Toolbar.txtLargeOperator_CoProd": "Co-Product", - "DE.Controllers.Toolbar.txtLargeOperator_CoProd_CenterSub": "Co-Product", - "DE.Controllers.Toolbar.txtLargeOperator_CoProd_CenterSubSup": "Co-Product", - "DE.Controllers.Toolbar.txtLargeOperator_CoProd_Sub": "Co-Product", - "DE.Controllers.Toolbar.txtLargeOperator_CoProd_SubSup": "Co-Product", - "DE.Controllers.Toolbar.txtLargeOperator_Custom_1": "Summation", - "DE.Controllers.Toolbar.txtLargeOperator_Custom_2": "Summation", - "DE.Controllers.Toolbar.txtLargeOperator_Custom_3": "Summation", - "DE.Controllers.Toolbar.txtLargeOperator_Custom_4": "Product", - "DE.Controllers.Toolbar.txtLargeOperator_Custom_5": "Union", + "DE.Controllers.Toolbar.txtIntegralTriple": "Integral Tripla", + "DE.Controllers.Toolbar.txtIntegralTripleCenterSubSup": "Integral Tripla", + "DE.Controllers.Toolbar.txtIntegralTripleSubSup": "Integral Tripla", + "DE.Controllers.Toolbar.txtLargeOperator_Conjunction": "Triangular", + "DE.Controllers.Toolbar.txtLargeOperator_Conjunction_CenterSub": "Triangular", + "DE.Controllers.Toolbar.txtLargeOperator_Conjunction_CenterSubSup": "Triangular", + "DE.Controllers.Toolbar.txtLargeOperator_Conjunction_Sub": "Triangular", + "DE.Controllers.Toolbar.txtLargeOperator_Conjunction_SubSup": "Triangular", + "DE.Controllers.Toolbar.txtLargeOperator_CoProd": "Coproduto", + "DE.Controllers.Toolbar.txtLargeOperator_CoProd_CenterSub": "Coproduto", + "DE.Controllers.Toolbar.txtLargeOperator_CoProd_CenterSubSup": "Coproduto", + "DE.Controllers.Toolbar.txtLargeOperator_CoProd_Sub": "Coproduto", + "DE.Controllers.Toolbar.txtLargeOperator_CoProd_SubSup": "Coproduto", + "DE.Controllers.Toolbar.txtLargeOperator_Custom_1": "Somatório", + "DE.Controllers.Toolbar.txtLargeOperator_Custom_2": "Somatório", + "DE.Controllers.Toolbar.txtLargeOperator_Custom_3": "Somatório", + "DE.Controllers.Toolbar.txtLargeOperator_Custom_4": "Produto", + "DE.Controllers.Toolbar.txtLargeOperator_Custom_5": "União", "DE.Controllers.Toolbar.txtLargeOperator_Disjunction": "Vee", "DE.Controllers.Toolbar.txtLargeOperator_Disjunction_CenterSub": "Vee", "DE.Controllers.Toolbar.txtLargeOperator_Disjunction_CenterSubSup": "Vee", "DE.Controllers.Toolbar.txtLargeOperator_Disjunction_Sub": "Vee", "DE.Controllers.Toolbar.txtLargeOperator_Disjunction_SubSup": "Vee", - "DE.Controllers.Toolbar.txtLargeOperator_Intersection": "Intersection", - "DE.Controllers.Toolbar.txtLargeOperator_Intersection_CenterSub": "Intersection", - "DE.Controllers.Toolbar.txtLargeOperator_Intersection_CenterSubSup": "Intersection", - "DE.Controllers.Toolbar.txtLargeOperator_Intersection_Sub": "Intersection", - "DE.Controllers.Toolbar.txtLargeOperator_Intersection_SubSup": "Intersection", - "DE.Controllers.Toolbar.txtLargeOperator_Prod": "Product", - "DE.Controllers.Toolbar.txtLargeOperator_Prod_CenterSub": "Product", - "DE.Controllers.Toolbar.txtLargeOperator_Prod_CenterSubSup": "Product", - "DE.Controllers.Toolbar.txtLargeOperator_Prod_Sub": "Product", - "DE.Controllers.Toolbar.txtLargeOperator_Prod_SubSup": "Product", - "DE.Controllers.Toolbar.txtLargeOperator_Sum": "Summation", - "DE.Controllers.Toolbar.txtLargeOperator_Sum_CenterSub": "Summation", - "DE.Controllers.Toolbar.txtLargeOperator_Sum_CenterSubSup": "Summation", - "DE.Controllers.Toolbar.txtLargeOperator_Sum_Sub": "Summation", - "DE.Controllers.Toolbar.txtLargeOperator_Sum_SubSup": "Summation", - "DE.Controllers.Toolbar.txtLargeOperator_Union": "Union", - "DE.Controllers.Toolbar.txtLargeOperator_Union_CenterSub": "Union", - "DE.Controllers.Toolbar.txtLargeOperator_Union_CenterSubSup": "Union", - "DE.Controllers.Toolbar.txtLargeOperator_Union_Sub": "Union", - "DE.Controllers.Toolbar.txtLargeOperator_Union_SubSup": "Union", - "DE.Controllers.Toolbar.txtLimitLog_Custom_1": "Limit Example", - "DE.Controllers.Toolbar.txtLimitLog_Custom_2": "Maximum Example", - "DE.Controllers.Toolbar.txtLimitLog_Lim": "Limit", - "DE.Controllers.Toolbar.txtLimitLog_Ln": "Natural Logarithm", - "DE.Controllers.Toolbar.txtLimitLog_Log": "Logarithm", - "DE.Controllers.Toolbar.txtLimitLog_LogBase": "Logarithm", - "DE.Controllers.Toolbar.txtLimitLog_Max": "Maximum", - "DE.Controllers.Toolbar.txtLimitLog_Min": "Minimum", - "DE.Controllers.Toolbar.txtMatrix_1_2": "1x2 Empty Matrix", - "DE.Controllers.Toolbar.txtMatrix_1_3": "1x3 Empty Matrix", - "DE.Controllers.Toolbar.txtMatrix_2_1": "2x1 Empty Matrix", - "DE.Controllers.Toolbar.txtMatrix_2_2": "2x2 Empty Matrix", - "DE.Controllers.Toolbar.txtMatrix_2_2_DLineBracket": "Empty Matrix with Brackets", - "DE.Controllers.Toolbar.txtMatrix_2_2_LineBracket": "Empty Matrix with Brackets", - "DE.Controllers.Toolbar.txtMatrix_2_2_RoundBracket": "Empty Matrix with Brackets", - "DE.Controllers.Toolbar.txtMatrix_2_2_SquareBracket": "Empty Matrix with Brackets", - "DE.Controllers.Toolbar.txtMatrix_2_3": "2x3 Empty Matrix", - "DE.Controllers.Toolbar.txtMatrix_3_1": "3x1 Empty Matrix", - "DE.Controllers.Toolbar.txtMatrix_3_2": "3x2 Empty Matrix", - "DE.Controllers.Toolbar.txtMatrix_3_3": "3x3 Empty Matrix", - "DE.Controllers.Toolbar.txtMatrix_Dots_Baseline": "Baseline Dots", - "DE.Controllers.Toolbar.txtMatrix_Dots_Center": "Midline Dots", - "DE.Controllers.Toolbar.txtMatrix_Dots_Diagonal": "Diagonal Dots", - "DE.Controllers.Toolbar.txtMatrix_Dots_Vertical": "Vertical Dots", - "DE.Controllers.Toolbar.txtMatrix_Flat_Round": "Sparse Matrix", - "DE.Controllers.Toolbar.txtMatrix_Flat_Square": "Sparse Matrix", - "DE.Controllers.Toolbar.txtMatrix_Identity_2": "2x2 Identity Matrix", - "DE.Controllers.Toolbar.txtMatrix_Identity_2_NoZeros": "3x3 Identity Matrix", - "DE.Controllers.Toolbar.txtMatrix_Identity_3": "3x3 Identity Matrix", - "DE.Controllers.Toolbar.txtMatrix_Identity_3_NoZeros": "3x3 Identity Matrix", - "DE.Controllers.Toolbar.txtOperator_ArrowD_Bot": "Right-Left Arrow Below", - "DE.Controllers.Toolbar.txtOperator_ArrowD_Top": "Right-Left Arrow Above", - "DE.Controllers.Toolbar.txtOperator_ArrowL_Bot": "Leftwards Arrow Below", - "DE.Controllers.Toolbar.txtOperator_ArrowL_Top": "Leftwards Arrow Above", - "DE.Controllers.Toolbar.txtOperator_ArrowR_Bot": "Rightwards Arrow Below", - "DE.Controllers.Toolbar.txtOperator_ArrowR_Top": "Rightwards Arrow Above", - "DE.Controllers.Toolbar.txtOperator_ColonEquals": "Colon Equal", - "DE.Controllers.Toolbar.txtOperator_Custom_1": "Yields", - "DE.Controllers.Toolbar.txtOperator_Custom_2": "Delta Yields", - "DE.Controllers.Toolbar.txtOperator_Definition": "Equal to By Definition", - "DE.Controllers.Toolbar.txtOperator_DeltaEquals": "Delta Equal To", - "DE.Controllers.Toolbar.txtOperator_DoubleArrowD_Bot": "Right-Left Arrow Below", - "DE.Controllers.Toolbar.txtOperator_DoubleArrowD_Top": "Right-Left Arrow Above", - "DE.Controllers.Toolbar.txtOperator_DoubleArrowL_Bot": "Leftwards Arrow Below", - "DE.Controllers.Toolbar.txtOperator_DoubleArrowL_Top": "Leftwards Arrow Above", - "DE.Controllers.Toolbar.txtOperator_DoubleArrowR_Bot": "Rightwards Arrow Below", + "DE.Controllers.Toolbar.txtLargeOperator_Intersection": "Interseção", + "DE.Controllers.Toolbar.txtLargeOperator_Intersection_CenterSub": "Interseção", + "DE.Controllers.Toolbar.txtLargeOperator_Intersection_CenterSubSup": "Interseção", + "DE.Controllers.Toolbar.txtLargeOperator_Intersection_Sub": "Interseção", + "DE.Controllers.Toolbar.txtLargeOperator_Intersection_SubSup": "Interseção", + "DE.Controllers.Toolbar.txtLargeOperator_Prod": "Produto", + "DE.Controllers.Toolbar.txtLargeOperator_Prod_CenterSub": "Produto", + "DE.Controllers.Toolbar.txtLargeOperator_Prod_CenterSubSup": "Produto", + "DE.Controllers.Toolbar.txtLargeOperator_Prod_Sub": "Produto", + "DE.Controllers.Toolbar.txtLargeOperator_Prod_SubSup": "Produto", + "DE.Controllers.Toolbar.txtLargeOperator_Sum": "Somatório", + "DE.Controllers.Toolbar.txtLargeOperator_Sum_CenterSub": "Somatório", + "DE.Controllers.Toolbar.txtLargeOperator_Sum_CenterSubSup": "Somatório", + "DE.Controllers.Toolbar.txtLargeOperator_Sum_Sub": "Somatório", + "DE.Controllers.Toolbar.txtLargeOperator_Sum_SubSup": "Somatório", + "DE.Controllers.Toolbar.txtLargeOperator_Union": "União", + "DE.Controllers.Toolbar.txtLargeOperator_Union_CenterSub": "União", + "DE.Controllers.Toolbar.txtLargeOperator_Union_CenterSubSup": "União", + "DE.Controllers.Toolbar.txtLargeOperator_Union_Sub": "União", + "DE.Controllers.Toolbar.txtLargeOperator_Union_SubSup": "União", + "DE.Controllers.Toolbar.txtLimitLog_Custom_1": "Exemplo limite", + "DE.Controllers.Toolbar.txtLimitLog_Custom_2": "Exemplo máximo", + "DE.Controllers.Toolbar.txtLimitLog_Lim": "Limite", + "DE.Controllers.Toolbar.txtLimitLog_Ln": "Logaritmo natural", + "DE.Controllers.Toolbar.txtLimitLog_Log": "Logaritmo", + "DE.Controllers.Toolbar.txtLimitLog_LogBase": "Logaritmo", + "DE.Controllers.Toolbar.txtLimitLog_Max": "Máximo", + "DE.Controllers.Toolbar.txtLimitLog_Min": "Mínimo", + "DE.Controllers.Toolbar.txtMatrix_1_2": "Matriz Vazia 1x2", + "DE.Controllers.Toolbar.txtMatrix_1_3": "Matriz Vazia 1x3", + "DE.Controllers.Toolbar.txtMatrix_2_1": "Matriz Vazia 2x1", + "DE.Controllers.Toolbar.txtMatrix_2_2": "Matriz Vazia 2x2", + "DE.Controllers.Toolbar.txtMatrix_2_2_DLineBracket": "Matriz vazia com parênteses", + "DE.Controllers.Toolbar.txtMatrix_2_2_LineBracket": "Matriz vazia com parênteses", + "DE.Controllers.Toolbar.txtMatrix_2_2_RoundBracket": "Matriz vazia com parênteses", + "DE.Controllers.Toolbar.txtMatrix_2_2_SquareBracket": "Matriz vazia com parênteses", + "DE.Controllers.Toolbar.txtMatrix_2_3": "Matriz Vazia 2x3", + "DE.Controllers.Toolbar.txtMatrix_3_1": "Matriz Vazia 3x1", + "DE.Controllers.Toolbar.txtMatrix_3_2": "Matriz Vazia 3x2", + "DE.Controllers.Toolbar.txtMatrix_3_3": "Matriz Vazia 3x3", + "DE.Controllers.Toolbar.txtMatrix_Dots_Baseline": "Pontos de linha de base", + "DE.Controllers.Toolbar.txtMatrix_Dots_Center": "Pontos de linha média", + "DE.Controllers.Toolbar.txtMatrix_Dots_Diagonal": "Pontos diagonais", + "DE.Controllers.Toolbar.txtMatrix_Dots_Vertical": "Pontos verticais", + "DE.Controllers.Toolbar.txtMatrix_Flat_Round": "Matriz dispersa", + "DE.Controllers.Toolbar.txtMatrix_Flat_Square": "Matriz dispersa", + "DE.Controllers.Toolbar.txtMatrix_Identity_2": "Matriz da identidade 2x2", + "DE.Controllers.Toolbar.txtMatrix_Identity_2_NoZeros": "Matriz da identidade 3x3", + "DE.Controllers.Toolbar.txtMatrix_Identity_3": "Matriz da identidade 3x3", + "DE.Controllers.Toolbar.txtMatrix_Identity_3_NoZeros": "Matriz da identidade 3x3", + "DE.Controllers.Toolbar.txtOperator_ArrowD_Bot": "Seta para direita esquerda abaixo", + "DE.Controllers.Toolbar.txtOperator_ArrowD_Top": "Seta para direita-esquerda acima", + "DE.Controllers.Toolbar.txtOperator_ArrowL_Bot": "Seta adiante para baixo", + "DE.Controllers.Toolbar.txtOperator_ArrowL_Top": "Seta adiante para cima", + "DE.Controllers.Toolbar.txtOperator_ArrowR_Bot": "Seta para direita abaixo", + "DE.Controllers.Toolbar.txtOperator_ArrowR_Top": "Seta para direita acima", + "DE.Controllers.Toolbar.txtOperator_ColonEquals": "Dois-pontos-Sinal de Igual", + "DE.Controllers.Toolbar.txtOperator_Custom_1": "Resultados", + "DE.Controllers.Toolbar.txtOperator_Custom_2": "Resultados de Delta", + "DE.Controllers.Toolbar.txtOperator_Definition": "Igual a por definição", + "DE.Controllers.Toolbar.txtOperator_DeltaEquals": "Delta igual a", + "DE.Controllers.Toolbar.txtOperator_DoubleArrowD_Bot": "Seta para direita esquerda abaixo", + "DE.Controllers.Toolbar.txtOperator_DoubleArrowD_Top": "Seta para direita-esquerda acima", + "DE.Controllers.Toolbar.txtOperator_DoubleArrowL_Bot": "Seta adiante para baixo", + "DE.Controllers.Toolbar.txtOperator_DoubleArrowL_Top": "Seta adiante para cima", + "DE.Controllers.Toolbar.txtOperator_DoubleArrowR_Bot": "Seta para direita abaixo", "DE.Controllers.Toolbar.txtOperator_DoubleArrowR_Top": "Rightwards Arrow Above", - "DE.Controllers.Toolbar.txtOperator_EqualsEquals": "Equal Equal", - "DE.Controllers.Toolbar.txtOperator_MinusEquals": "Minus Equal", - "DE.Controllers.Toolbar.txtOperator_PlusEquals": "Plus Equal", - "DE.Controllers.Toolbar.txtOperator_UnitOfMeasure": "Measured By", + "DE.Controllers.Toolbar.txtOperator_EqualsEquals": "Sinal de Igual-Sinal de Igual", + "DE.Controllers.Toolbar.txtOperator_MinusEquals": "Sinal de Menos-Sinal de Igual", + "DE.Controllers.Toolbar.txtOperator_PlusEquals": "Sinal de Mais-Sinal de Igual", + "DE.Controllers.Toolbar.txtOperator_UnitOfMeasure": "Medido por", "DE.Controllers.Toolbar.txtRadicalCustom_1": "Radical", "DE.Controllers.Toolbar.txtRadicalCustom_2": "Radical", - "DE.Controllers.Toolbar.txtRadicalRoot_2": "Square Root With Degree", - "DE.Controllers.Toolbar.txtRadicalRoot_3": "Cubic Root", - "DE.Controllers.Toolbar.txtRadicalRoot_n": "Radical With Degree", - "DE.Controllers.Toolbar.txtRadicalSqrt": "Square Root", + "DE.Controllers.Toolbar.txtRadicalRoot_2": "Raiz quadrada com grau", + "DE.Controllers.Toolbar.txtRadicalRoot_3": "Raiz cúbica", + "DE.Controllers.Toolbar.txtRadicalRoot_n": "Radical com grau", + "DE.Controllers.Toolbar.txtRadicalSqrt": "Raiz quadrada", "DE.Controllers.Toolbar.txtScriptCustom_1": "Script", "DE.Controllers.Toolbar.txtScriptCustom_2": "Script", "DE.Controllers.Toolbar.txtScriptCustom_3": "Script", "DE.Controllers.Toolbar.txtScriptCustom_4": "Script", - "DE.Controllers.Toolbar.txtScriptSub": "Subscript", - "DE.Controllers.Toolbar.txtScriptSubSup": "Subscript-Superscript", + "DE.Controllers.Toolbar.txtScriptSub": "Subscrito", + "DE.Controllers.Toolbar.txtScriptSubSup": "Subscrito-Sobrescrito", "DE.Controllers.Toolbar.txtScriptSubSupLeft": "LeftSubscript-Superscript", - "DE.Controllers.Toolbar.txtScriptSup": "Superscript", - "DE.Controllers.Toolbar.txtSymbol_about": "Approximately", - "DE.Controllers.Toolbar.txtSymbol_additional": "Complement", + "DE.Controllers.Toolbar.txtScriptSup": "Sobrescrito", + "DE.Controllers.Toolbar.txtSymbol_about": "Aproximadamente", + "DE.Controllers.Toolbar.txtSymbol_additional": "Complemento", "DE.Controllers.Toolbar.txtSymbol_aleph": "Alef", - "DE.Controllers.Toolbar.txtSymbol_alpha": "Alpha", - "DE.Controllers.Toolbar.txtSymbol_approx": "Almost Equal To", - "DE.Controllers.Toolbar.txtSymbol_ast": "Asterisk Operator", + "DE.Controllers.Toolbar.txtSymbol_alpha": "Alfa", + "DE.Controllers.Toolbar.txtSymbol_approx": "Quase igual a", + "DE.Controllers.Toolbar.txtSymbol_ast": "Operador de asterisco", "DE.Controllers.Toolbar.txtSymbol_beta": "Beta", - "DE.Controllers.Toolbar.txtSymbol_beth": "Bet", - "DE.Controllers.Toolbar.txtSymbol_bullet": "Bullet Operator", - "DE.Controllers.Toolbar.txtSymbol_cap": "Intersection", - "DE.Controllers.Toolbar.txtSymbol_cbrt": "Cube Root", - "DE.Controllers.Toolbar.txtSymbol_cdots": "Midline Horizontal Ellipsis", - "DE.Controllers.Toolbar.txtSymbol_celsius": "Degrees Celsius", - "DE.Controllers.Toolbar.txtSymbol_chi": "Chi", - "DE.Controllers.Toolbar.txtSymbol_cong": "Approximately Equal To", - "DE.Controllers.Toolbar.txtSymbol_cup": "Union", - "DE.Controllers.Toolbar.txtSymbol_ddots": "Down Right Diagonal Ellipsis", - "DE.Controllers.Toolbar.txtSymbol_degree": "Degrees", + "DE.Controllers.Toolbar.txtSymbol_beth": "Aposta", + "DE.Controllers.Toolbar.txtSymbol_bullet": "Operador de marcador", + "DE.Controllers.Toolbar.txtSymbol_cap": "Interseção", + "DE.Controllers.Toolbar.txtSymbol_cbrt": "Raiz cúbica", + "DE.Controllers.Toolbar.txtSymbol_cdots": "Reticências horizontais de linha média", + "DE.Controllers.Toolbar.txtSymbol_celsius": "Graus Celsius", + "DE.Controllers.Toolbar.txtSymbol_chi": "Ki", + "DE.Controllers.Toolbar.txtSymbol_cong": "Aproximadamente igual a", + "DE.Controllers.Toolbar.txtSymbol_cup": "União", + "DE.Controllers.Toolbar.txtSymbol_ddots": "Reticências diagonal para baixo à direita", + "DE.Controllers.Toolbar.txtSymbol_degree": "Graus", "DE.Controllers.Toolbar.txtSymbol_delta": "Delta", - "DE.Controllers.Toolbar.txtSymbol_div": "Division Sign", - "DE.Controllers.Toolbar.txtSymbol_downarrow": "Down Arrow", - "DE.Controllers.Toolbar.txtSymbol_emptyset": "Empty Set", - "DE.Controllers.Toolbar.txtSymbol_epsilon": "Epsilon", - "DE.Controllers.Toolbar.txtSymbol_equals": "Equal", - "DE.Controllers.Toolbar.txtSymbol_equiv": "Identical To", + "DE.Controllers.Toolbar.txtSymbol_div": "Sinal de divisão", + "DE.Controllers.Toolbar.txtSymbol_downarrow": "Seta para baixo", + "DE.Controllers.Toolbar.txtSymbol_emptyset": "Conjunto vazio", + "DE.Controllers.Toolbar.txtSymbol_epsilon": "Epsílon", + "DE.Controllers.Toolbar.txtSymbol_equals": "Igual", + "DE.Controllers.Toolbar.txtSymbol_equiv": "Idêntico a", "DE.Controllers.Toolbar.txtSymbol_eta": "Eta", - "DE.Controllers.Toolbar.txtSymbol_exists": "There Exist", - "DE.Controllers.Toolbar.txtSymbol_factorial": "Factorial", - "DE.Controllers.Toolbar.txtSymbol_fahrenheit": "Degrees Fahrenheit", - "DE.Controllers.Toolbar.txtSymbol_forall": "For All", - "DE.Controllers.Toolbar.txtSymbol_gamma": "Gamma", - "DE.Controllers.Toolbar.txtSymbol_geq": "Greater Than or Equal To", - "DE.Controllers.Toolbar.txtSymbol_gg": "Much Greater Than", - "DE.Controllers.Toolbar.txtSymbol_greater": "Greater Than", - "DE.Controllers.Toolbar.txtSymbol_in": "Element Of", - "DE.Controllers.Toolbar.txtSymbol_inc": "Increment", - "DE.Controllers.Toolbar.txtSymbol_infinity": "Infinity", + "DE.Controllers.Toolbar.txtSymbol_exists": "Existe", + "DE.Controllers.Toolbar.txtSymbol_factorial": "Fatorial", + "DE.Controllers.Toolbar.txtSymbol_fahrenheit": "Graus Fahrenheit", + "DE.Controllers.Toolbar.txtSymbol_forall": "Para todos", + "DE.Controllers.Toolbar.txtSymbol_gamma": "Gama", + "DE.Controllers.Toolbar.txtSymbol_geq": "Superior a ou igual a", + "DE.Controllers.Toolbar.txtSymbol_gg": "Muito superior a", + "DE.Controllers.Toolbar.txtSymbol_greater": "Superior a", + "DE.Controllers.Toolbar.txtSymbol_in": "Elemento de", + "DE.Controllers.Toolbar.txtSymbol_inc": "Incremento", + "DE.Controllers.Toolbar.txtSymbol_infinity": "Infinidade", "DE.Controllers.Toolbar.txtSymbol_iota": "Iota", - "DE.Controllers.Toolbar.txtSymbol_kappa": "Kappa", + "DE.Controllers.Toolbar.txtSymbol_kappa": "Capa", "DE.Controllers.Toolbar.txtSymbol_lambda": "Lambda", - "DE.Controllers.Toolbar.txtSymbol_leftarrow": "Left Arrow", - "DE.Controllers.Toolbar.txtSymbol_leftrightarrow": "Left-Right Arrow", - "DE.Controllers.Toolbar.txtSymbol_leq": "Less Than or Equal To", - "DE.Controllers.Toolbar.txtSymbol_less": "Less Than", - "DE.Controllers.Toolbar.txtSymbol_ll": "Much Less Than", - "DE.Controllers.Toolbar.txtSymbol_minus": "Minus", - "DE.Controllers.Toolbar.txtSymbol_mp": "Minus Plus", + "DE.Controllers.Toolbar.txtSymbol_leftarrow": "Seta para esquerda", + "DE.Controllers.Toolbar.txtSymbol_leftrightarrow": "Seta esquerda-direita", + "DE.Controllers.Toolbar.txtSymbol_leq": "Inferior a ou igual a", + "DE.Controllers.Toolbar.txtSymbol_less": "Inferior a", + "DE.Controllers.Toolbar.txtSymbol_ll": "Muito inferior a", + "DE.Controllers.Toolbar.txtSymbol_minus": "Menos", + "DE.Controllers.Toolbar.txtSymbol_mp": "Sinal de Menos-Sinal de Mais", "DE.Controllers.Toolbar.txtSymbol_mu": "Mu", "DE.Controllers.Toolbar.txtSymbol_nabla": "Nabla", - "DE.Controllers.Toolbar.txtSymbol_neq": "Not Equal To", - "DE.Controllers.Toolbar.txtSymbol_ni": "Contains as Member", - "DE.Controllers.Toolbar.txtSymbol_not": "Not Sign", - "DE.Controllers.Toolbar.txtSymbol_notexists": "There Does Not Exist", + "DE.Controllers.Toolbar.txtSymbol_neq": "Não igual a", + "DE.Controllers.Toolbar.txtSymbol_ni": "Contém como membro", + "DE.Controllers.Toolbar.txtSymbol_not": "Não entrar", + "DE.Controllers.Toolbar.txtSymbol_notexists": "Não existe", "DE.Controllers.Toolbar.txtSymbol_nu": "Nu", "DE.Controllers.Toolbar.txtSymbol_o": "Omicron", - "DE.Controllers.Toolbar.txtSymbol_omega": "Omega", - "DE.Controllers.Toolbar.txtSymbol_partial": "Partial Differential", - "DE.Controllers.Toolbar.txtSymbol_percent": "Percentage", - "DE.Controllers.Toolbar.txtSymbol_phi": "Phi", + "DE.Controllers.Toolbar.txtSymbol_omega": "Ômega", + "DE.Controllers.Toolbar.txtSymbol_partial": "Diferencial parcial", + "DE.Controllers.Toolbar.txtSymbol_percent": "Porcentagem", + "DE.Controllers.Toolbar.txtSymbol_phi": "Fi", "DE.Controllers.Toolbar.txtSymbol_pi": "Pi", - "DE.Controllers.Toolbar.txtSymbol_plus": "Plus", - "DE.Controllers.Toolbar.txtSymbol_pm": "Plus Minus", - "DE.Controllers.Toolbar.txtSymbol_propto": "Proportional To", + "DE.Controllers.Toolbar.txtSymbol_plus": "Mais", + "DE.Controllers.Toolbar.txtSymbol_pm": "Sinal de Menos-Sinal de Igual", + "DE.Controllers.Toolbar.txtSymbol_propto": "Proporcional a", "DE.Controllers.Toolbar.txtSymbol_psi": "Psi", - "DE.Controllers.Toolbar.txtSymbol_qdrt": "Fourth Root", - "DE.Controllers.Toolbar.txtSymbol_QED": "End of Proof", - "DE.Controllers.Toolbar.txtSymbol_rddots": "Up Right Diagonal Ellipsis", - "DE.Controllers.Toolbar.txtSymbol_rho": "Rho", - "DE.Controllers.Toolbar.txtSymbol_rightarrow": "Right Arrow", + "DE.Controllers.Toolbar.txtSymbol_qdrt": "Quarta raiz", + "DE.Controllers.Toolbar.txtSymbol_QED": "Fim da prova", + "DE.Controllers.Toolbar.txtSymbol_rddots": "Reticências diagonal direitas para cima", + "DE.Controllers.Toolbar.txtSymbol_rho": "Rô", + "DE.Controllers.Toolbar.txtSymbol_rightarrow": "Seta para direita", "DE.Controllers.Toolbar.txtSymbol_sigma": "Sigma", - "DE.Controllers.Toolbar.txtSymbol_sqrt": "Radical Sign", + "DE.Controllers.Toolbar.txtSymbol_sqrt": "Sinal de Radical", "DE.Controllers.Toolbar.txtSymbol_tau": "Tau", - "DE.Controllers.Toolbar.txtSymbol_therefore": "Therefore", - "DE.Controllers.Toolbar.txtSymbol_theta": "Theta", - "DE.Controllers.Toolbar.txtSymbol_times": "Multiplication Sign", - "DE.Controllers.Toolbar.txtSymbol_uparrow": "Up Arrow", - "DE.Controllers.Toolbar.txtSymbol_upsilon": "Upsilon", - "DE.Controllers.Toolbar.txtSymbol_varepsilon": "Epsilon Variant", - "DE.Controllers.Toolbar.txtSymbol_varphi": "Phi Variant", - "DE.Controllers.Toolbar.txtSymbol_varpi": "Pi Variant", - "DE.Controllers.Toolbar.txtSymbol_varrho": "Rho Variant", - "DE.Controllers.Toolbar.txtSymbol_varsigma": "Sigma Variant", - "DE.Controllers.Toolbar.txtSymbol_vartheta": "Theta Variant", - "DE.Controllers.Toolbar.txtSymbol_vdots": "Vertical Ellipsis", + "DE.Controllers.Toolbar.txtSymbol_therefore": "Portanto", + "DE.Controllers.Toolbar.txtSymbol_theta": "Teta", + "DE.Controllers.Toolbar.txtSymbol_times": "Sinal de multiplicação", + "DE.Controllers.Toolbar.txtSymbol_uparrow": "Seta para cima", + "DE.Controllers.Toolbar.txtSymbol_upsilon": "Ípsilon", + "DE.Controllers.Toolbar.txtSymbol_varepsilon": "Variante de Epsílon", + "DE.Controllers.Toolbar.txtSymbol_varphi": "Variante de fi", + "DE.Controllers.Toolbar.txtSymbol_varpi": "Variante de Pi", + "DE.Controllers.Toolbar.txtSymbol_varrho": "Variante de Rô", + "DE.Controllers.Toolbar.txtSymbol_varsigma": "Variante de Sigma", + "DE.Controllers.Toolbar.txtSymbol_vartheta": "Variante de Teta", + "DE.Controllers.Toolbar.txtSymbol_vdots": "Reticências verticais", "DE.Controllers.Toolbar.txtSymbol_Xsi": "Xi", "DE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", "DE.Views.ChartSettings.textAdvanced": "Exibir configurações avançadas", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Excluir linha", "DE.Views.DocumentHolder.deleteTableText": "Excluir tabela", "DE.Views.DocumentHolder.deleteText": "Excluir", + "DE.Views.DocumentHolder.direct270Text": "Rotate at 270°", + "DE.Views.DocumentHolder.direct90Text": "Rotate at 90°", + "DE.Views.DocumentHolder.directHText": "Horizontal", + "DE.Views.DocumentHolder.directionText": "Text Direction", "DE.Views.DocumentHolder.editChartText": "Editar dados", "DE.Views.DocumentHolder.editFooterText": "Editar rodapé", "DE.Views.DocumentHolder.editHeaderText": "Editar cabeçalho", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Criar novo", "DE.Views.FileMenu.btnDownloadCaption": "Baixar como...", "DE.Views.FileMenu.btnHelpCaption": "Ajuda...", + "DE.Views.FileMenu.btnHistoryCaption": "Version History", "DE.Views.FileMenu.btnInfoCaption": "Informações do documento...", "DE.Views.FileMenu.btnPrintCaption": "Imprimir", "DE.Views.FileMenu.btnRecentFilesCaption": "Abrir recente...", "DE.Views.FileMenu.btnReturnCaption": "Voltar para documento", + "DE.Views.FileMenu.btnRightsCaption": "Access Rights...", "DE.Views.FileMenu.btnSaveCaption": "Salvar", "DE.Views.FileMenu.btnSettingsCaption": "Configurações avançadas...", "DE.Views.FileMenu.btnToEditCaption": "Editar documento", @@ -688,8 +721,10 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Símbolos", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Título do documento", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Palavras", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Alterar direitos de acesso", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Pessoas que têm direitos", "DE.Views.FileMenuPanels.Settings.okButtonText": "Aplicar", - "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", + "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Ativar guias de alinhamento", "DE.Views.FileMenuPanels.Settings.strAutosave": "Ativar salvamento automático", "DE.Views.FileMenuPanels.Settings.strFontRender": "Dicas de fonte", "DE.Views.FileMenuPanels.Settings.strInputMode": "Ativar hieróglifos", @@ -702,7 +737,7 @@ "DE.Views.FileMenuPanels.Settings.text30Minutes": "Cada 30 minutos", "DE.Views.FileMenuPanels.Settings.text5Minutes": "Cada 5 minutos", "DE.Views.FileMenuPanels.Settings.text60Minutes": "Cada hora", - "DE.Views.FileMenuPanels.Settings.textAlignGuides": "Alignment Guides", + "DE.Views.FileMenuPanels.Settings.textAlignGuides": "Guias de alinhamento", "DE.Views.FileMenuPanels.Settings.textAutoSave": "Salvamento automático", "DE.Views.FileMenuPanels.Settings.textDisabled": "Desabilitado", "DE.Views.FileMenuPanels.Settings.textMinute": "Cada minuto", @@ -823,6 +858,56 @@ "DE.Views.LeftMenu.tipSearch": "Pesquisar", "DE.Views.LeftMenu.tipSupport": "Feedback e Suporte", "DE.Views.LeftMenu.tipTitles": "Títulos", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Send", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Theme", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Attach as DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Attach as PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "File name", + "DE.Views.MailMergeEmailDlg.textFormat": "Mail format", + "DE.Views.MailMergeEmailDlg.textFrom": "From", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Message", + "DE.Views.MailMergeEmailDlg.textSubject": "Subject Line", + "DE.Views.MailMergeEmailDlg.textTitle": "Send to E-mail", + "DE.Views.MailMergeEmailDlg.textTo": "To", + "DE.Views.MailMergeEmailDlg.textWarning": "Warning!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Please note that mailing cannot be stopped once your click the 'Send' button.", + "DE.Views.MailMergeRecepients.textLoading": "Loading", + "DE.Views.MailMergeRecepients.textTitle": "Select Data Source", + "DE.Views.MailMergeSaveDlg.textLoading": "Loading", + "DE.Views.MailMergeSaveDlg.textTitle": "Folder for save", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Merging", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Merge failed.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Warning", + "DE.Views.MailMergeSettings.textAll": "All records", + "DE.Views.MailMergeSettings.textCurrent": "Current record", + "DE.Views.MailMergeSettings.textDataSource": "Data Source", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Download", + "DE.Views.MailMergeSettings.textEditData": "Edit data source", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "From", + "DE.Views.MailMergeSettings.textHighlight": "Highlight merge fields", + "DE.Views.MailMergeSettings.textInsertField": "Insert Merge Field", + "DE.Views.MailMergeSettings.textMaxRecepients": "Max 100 recepients.", + "DE.Views.MailMergeSettings.textMerge": "Merge", + "DE.Views.MailMergeSettings.textMergeFields": "Merge Fields", + "DE.Views.MailMergeSettings.textMergeTo": "Merge to", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Save", + "DE.Views.MailMergeSettings.textPreview": "Preview results", + "DE.Views.MailMergeSettings.textReadMore": "Read more", + "DE.Views.MailMergeSettings.textSendMsg": "All mail messages are ready and will be sent out within some time.
        The speed of mailing depends on your mail service.
        You can continue working with document or close it. After the operation is over the notification will be sent to your %1 email address.", + "DE.Views.MailMergeSettings.textTo": "To", + "DE.Views.MailMergeSettings.txtFirst": "To first field", + "DE.Views.MailMergeSettings.txtFromToError": "\"From\" value must be less than \"To\" value", + "DE.Views.MailMergeSettings.txtLast": "To last field", + "DE.Views.MailMergeSettings.txtNext": "To next field", + "DE.Views.MailMergeSettings.txtPrev": "To previous field", + "DE.Views.MailMergeSettings.txtUntitled": "Untitled", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Starting merge failed", "DE.Views.ParagraphSettings.strLineHeight": "Espaçamento de linha", "DE.Views.ParagraphSettings.strParagraphSpacing": "Espaçamento", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "Não adicionar intervalo entre parágrafos do mesmo estilo", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Configurações de gráfico", "DE.Views.RightMenu.txtHeaderFooterSettings": "Configurações de cabeçalho e rodapé", "DE.Views.RightMenu.txtImageSettings": "Configurações de imagem", + "DE.Views.RightMenu.txtMailMergeSettings": "Mail Merge Settings", "DE.Views.RightMenu.txtParagraphSettings": "Configurações do parágrafo", "DE.Views.RightMenu.txtShapeSettings": "Configurações da forma", "DE.Views.RightMenu.txtTableSettings": "Configurações da tabela", @@ -1144,7 +1230,7 @@ "DE.Views.Toolbar.tipIncFont": "Aumentar tamanho da fonte", "DE.Views.Toolbar.tipIncPrLeft": "Aumentar recuo", "DE.Views.Toolbar.tipInsertChart": "Inserir gráfico", - "DE.Views.Toolbar.tipInsertEquation": "Insert Equation", + "DE.Views.Toolbar.tipInsertEquation": "Inserir equação", "DE.Views.Toolbar.tipInsertHyperlink": "Adicionar hiperlink", "DE.Views.Toolbar.tipInsertImage": "Inserir imagem", "DE.Views.Toolbar.tipInsertNum": "Inserir número da página", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Inserir tabela", "DE.Views.Toolbar.tipInsertText": "Inserir texto", "DE.Views.Toolbar.tipLineSpace": "Espaçamento entre linhas do parágrafo", + "DE.Views.Toolbar.tipMailRecepients": "Select Recepients", "DE.Views.Toolbar.tipMarkers": "Marcadores", "DE.Views.Toolbar.tipMultilevels": "Contorno", "DE.Views.Toolbar.tipNewDocument": "Novo documento", diff --git a/OfficeWeb/apps/documenteditor/main/locale/ru.json b/OfficeWeb/apps/documenteditor/main/locale/ru.json index 7fa9df6a..da61e676 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/ru.json +++ b/OfficeWeb/apps/documenteditor/main/locale/ru.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Предупреждение", "Common.Controllers.Chat.textEnterMessage": "Введите здесь своё сообщение", - "Common.Controllers.Chat.textUserLimit": "Вы используете бесплатную версию ONLYOFFICE.
        Только два пользователя одновременно могут совместно редактировать документ.
        Требуется больше? Рекомендуем приобрести корпоративную версию ONLYOFFICE.
        Читать дальше", + "Common.Controllers.Chat.textUserLimit": "Вы используете бесплатную версию ONLYOFFICE.
        Только два пользователя одновременно могут совместно редактировать документ.
        Требуется больше? Рекомендуем приобрести корпоративную версию ONLYOFFICE.
        Читать дальше", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Аноним", "Common.Controllers.ExternalDiagramEditor.textClose": "Закрыть", "Common.Controllers.ExternalDiagramEditor.warningText": "Объект недоступен, так как редактируется другим пользователем.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Предупреждение", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Анонимный пользователь", + "Common.Controllers.ExternalMergeEditor.textClose": "Закрыть", + "Common.Controllers.ExternalMergeEditor.warningText": "Объект недоступен, так как редактируется другим пользователем.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Внимание", + "Common.Controllers.History.notcriticalErrorTitle": "Внимание", "Common.UI.ComboBorderSize.txtNoBorders": "Без границ", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "Без границ", "Common.UI.ComboDataView.emptyComboText": "Без стилей", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "Нет", "Common.UI.Window.okButtonText": "OK", "Common.UI.Window.textConfirmation": "Подтверждение", + "Common.UI.Window.textDontShow": "Больше не показывать это сообщение", "Common.UI.Window.textError": "Ошибка", "Common.UI.Window.textInformation": "Информация", "Common.UI.Window.textWarning": "Предупреждение", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Закрыть", "Common.Views.ExternalDiagramEditor.textSave": "Сохранить и выйти", "Common.Views.ExternalDiagramEditor.textTitle": "Редактор диаграмм", + "Common.Views.ExternalMergeEditor.textClose": "Закрыть", + "Common.Views.ExternalMergeEditor.textSave": "Сохранить и выйти", + "Common.Views.ExternalMergeEditor.textTitle": "Получатели слияния", + "Common.Views.Header.openNewTabText": "Открыть в новой вкладке", "Common.Views.Header.textBack": "Перейти к Документам", + "Common.Views.History.textHistoryHeader": "Вернуться к документу", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Отмена", "Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.textUrl": "Вставьте URL изображения:", @@ -86,8 +97,11 @@ "Common.Views.InsertTableDialog.txtMinText": "Минимальное значение для этого поля - {0}.", "Common.Views.InsertTableDialog.txtRows": "Количество строк", "Common.Views.InsertTableDialog.txtTitle": "Размер таблицы", + "DE.Controllers.LeftMenu.leavePageText": "Все несохраненные изменения в этом документе будут потеряны.
        Нажмите кнопку \"Отмена\", а затем нажмите кнопку \"Сохранить\", чтобы сохранить их. Нажмите кнопку \"OK\", чтобы сбросить все несохраненные изменения.", "DE.Controllers.LeftMenu.newDocumentTitle": "Документ без имени", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Внимание", "DE.Controllers.LeftMenu.requestEditRightsText": "Запрос прав на редактирование...", + "DE.Controllers.LeftMenu.textLoadHistory": "Загрузка журнала версий...", "DE.Controllers.LeftMenu.textNoTextFound": "Искомые данные не найдены. Пожалуйста, измените параметры поиска.", "DE.Controllers.LeftMenu.textReplaceSkipped": "Замена выполнена. Пропущено вхождений - {0}.", "DE.Controllers.LeftMenu.textReplaceSuccess": "Поиск выполнен. Заменено вхождений: {0}", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Ошибка", "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", "DE.Controllers.Main.downloadErrorText": "Загрузка не удалась.", + "DE.Controllers.Main.downloadMergeText": "Загрузка...", + "DE.Controllers.Main.downloadMergeTitle": "Загрузка", "DE.Controllers.Main.downloadTextText": "Загрузка документа...", "DE.Controllers.Main.downloadTitleText": "Загрузка документа", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Потеряно соединение с сервером. В данный момент нельзя отредактировать документ.", @@ -108,6 +124,8 @@ "DE.Controllers.Main.errorFilePassProtect": "Документ защищен паролем и не может быть открыт.", "DE.Controllers.Main.errorKeyEncrypt": "Неизвестный дескриптор ключа", "DE.Controllers.Main.errorKeyExpire": "Срок действия дескриптора ключа истек", + "DE.Controllers.Main.errorMailMergeLoadFile": "Сбой при загрузке", + "DE.Controllers.Main.errorMailMergeSaveFile": "Не удалось выполнить слияние.", "DE.Controllers.Main.errorProcessSaveResult": "Сбой при сохранении.", "DE.Controllers.Main.errorStockChart": "Неверный порядок строк. Чтобы создать биржевую диаграмму, расположите данные на листе в следующем порядке:
        цена открытия, максимальная цена, минимальная цена, цена закрытия.", "DE.Controllers.Main.errorUpdateVersion": "Версия файла была изменена. Страница будет перезагружена.", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Загрузка изображения", "DE.Controllers.Main.loadingDocumentTextText": "Загрузка документа...", "DE.Controllers.Main.loadingDocumentTitleText": "Загрузка документа", + "DE.Controllers.Main.mailMergeLoadFileText": "Загрузка источника данных...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Загрузка источника данных", "DE.Controllers.Main.notcriticalErrorTitle": "Предупреждение", "DE.Controllers.Main.openTextText": "Открытие документа...", "DE.Controllers.Main.openTitleText": "Открытие документа", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Подготовка к сохранению. Пожалуйста, подождите...", "DE.Controllers.Main.saveTextText": "Сохранение документа...", "DE.Controllers.Main.saveTitleText": "Сохранение документа", + "DE.Controllers.Main.sendMergeText": "Отправка результатов слияния...", + "DE.Controllers.Main.sendMergeTitle": "Отправка результатов слияния", "DE.Controllers.Main.splitDividerErrorText": "Число строк должно являться делителем для %1.", "DE.Controllers.Main.splitMaxColsErrorText": "Число столбцов должно быть меньше, чем %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "Число строк должно быть меньше, чем %1.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Кнопки", "DE.Controllers.Main.txtCallouts": "Выноски", "DE.Controllers.Main.txtCharts": "Схемы", + "DE.Controllers.Main.txtDiagramTitle": "Заголовок диаграммы", "DE.Controllers.Main.txtEditingMode": "Установка режима редактирования...", "DE.Controllers.Main.txtFiguredArrows": "Фигурные стрелки", "DE.Controllers.Main.txtLines": "Линии", "DE.Controllers.Main.txtMath": "Математические знаки", "DE.Controllers.Main.txtNeedSynchronize": "Есть обновления", "DE.Controllers.Main.txtRectangles": "Прямоугольники", + "DE.Controllers.Main.txtSeries": "Ряд", "DE.Controllers.Main.txtStarsRibbons": "Звезды и ленты", + "DE.Controllers.Main.txtXAxis": "Ось X", + "DE.Controllers.Main.txtYAxis": "Ось Y", "DE.Controllers.Main.unknownErrorText": "Неизвестная ошибка.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Ваш браузер не поддерживается.", "DE.Controllers.Main.uploadImageExtMessage": "Неизвестный формат изображения.", @@ -165,6 +191,7 @@ "DE.Controllers.Main.warnBrowserZoom": "Текущее значение масштаба страницы в браузере поддерживается не полностью. Вернитесь к масштабу по умолчанию, нажав Ctrl+0.", "DE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.", "DE.Controllers.Statusbar.zoomText": "Масштаб {0}%", + "DE.Controllers.Toolbar.confirmAddFontName": "Шрифт, который вы собираетесь сохранить, недоступен на этом устройстве.
        Стиль текста будет отображаться с использованием одного из шрифтов устройства; сохраненный шрифт будет использоваться, когда он будет доступен.
        Вы хотите продолжить?", "DE.Controllers.Toolbar.textAccent": "Диакритические знаки", "DE.Controllers.Toolbar.textBracket": "Скобки", "DE.Controllers.Toolbar.textEmptyImgUrl": "Необходимо указать URL изображения.", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Удалить строку", "DE.Views.DocumentHolder.deleteTableText": "Удалить таблицу", "DE.Views.DocumentHolder.deleteText": "Удалить", + "DE.Views.DocumentHolder.direct270Text": "Поворот на 270°", + "DE.Views.DocumentHolder.direct90Text": "Поворот на 90°", + "DE.Views.DocumentHolder.directHText": "Горизонтальное", + "DE.Views.DocumentHolder.directionText": "Направление текста", "DE.Views.DocumentHolder.editChartText": "Изменить данные", "DE.Views.DocumentHolder.editFooterText": "Изменить нижний колонтитул", "DE.Views.DocumentHolder.editHeaderText": "Изменить верхний колонтитул", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Создать новый", "DE.Views.FileMenu.btnDownloadCaption": "Скачать как...", "DE.Views.FileMenu.btnHelpCaption": "Справка...", + "DE.Views.FileMenu.btnHistoryCaption": "Журнал версий", "DE.Views.FileMenu.btnInfoCaption": "Сведения о документе...", "DE.Views.FileMenu.btnPrintCaption": "Печать", "DE.Views.FileMenu.btnRecentFilesCaption": "Открыть последние...", "DE.Views.FileMenu.btnReturnCaption": "Вернуться к документу", + "DE.Views.FileMenu.btnRightsCaption": "Права доступа...", "DE.Views.FileMenu.btnSaveCaption": "Сохранить", "DE.Views.FileMenu.btnSettingsCaption": "Дополнительные параметры...", "DE.Views.FileMenu.btnToEditCaption": "Редактировать", @@ -688,6 +721,8 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Символы", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Название документа", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Слова", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Изменить права доступа", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Люди, имеющие права", "DE.Views.FileMenuPanels.Settings.okButtonText": "Применить", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Включить направляющие выравнивания", "DE.Views.FileMenuPanels.Settings.strAutosave": "Включить автосохранение", @@ -823,6 +858,56 @@ "DE.Views.LeftMenu.tipSearch": "Поиск", "DE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка", "DE.Views.LeftMenu.tipTitles": "Заголовки", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Отмена", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Отправить", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Тема", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Прикрепить как DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Прикрепить как PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "Имя файла", + "DE.Views.MailMergeEmailDlg.textFormat": "Формат", + "DE.Views.MailMergeEmailDlg.textFrom": "От кого", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Сообщение", + "DE.Views.MailMergeEmailDlg.textSubject": "Строка темы", + "DE.Views.MailMergeEmailDlg.textTitle": "Отправить по электронной почте", + "DE.Views.MailMergeEmailDlg.textTo": "Кому", + "DE.Views.MailMergeEmailDlg.textWarning": "Внимание!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Пожалуйста, обратите внимание: после нажатия кнопки 'Отправить' отправку нельзя будет остановить.", + "DE.Views.MailMergeRecepients.textLoading": "Загрузка", + "DE.Views.MailMergeRecepients.textTitle": "Выбрать источник данных", + "DE.Views.MailMergeSaveDlg.textLoading": "Загрузка", + "DE.Views.MailMergeSaveDlg.textTitle": "Папка для сохранения", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Слияние", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Не удалось выполнить слияние.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Внимание", + "DE.Views.MailMergeSettings.textAll": "Все записи", + "DE.Views.MailMergeSettings.textCurrent": "Текущая запись", + "DE.Views.MailMergeSettings.textDataSource": "Источник данных", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Скачать", + "DE.Views.MailMergeSettings.textEditData": "Изменить список получателей", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "С", + "DE.Views.MailMergeSettings.textHighlight": "Выделить поля слияния", + "DE.Views.MailMergeSettings.textInsertField": "Вставить поле слияния", + "DE.Views.MailMergeSettings.textMaxRecepients": "Макс. 100 получателей.", + "DE.Views.MailMergeSettings.textMerge": "Слияние", + "DE.Views.MailMergeSettings.textMergeFields": "Поля слияния", + "DE.Views.MailMergeSettings.textMergeTo": "Слияние в", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Сохранить", + "DE.Views.MailMergeSettings.textPreview": "Просмотр результатов", + "DE.Views.MailMergeSettings.textReadMore": "Подробнее", + "DE.Views.MailMergeSettings.textSendMsg": "Письма сформированы и будут отправлены в течение некоторого времени.
        Скорость отправки писем зависит от вашего почтового сервиса.
        Вы можете продолжить работу с документом или закрыть документ. По завершению процесса отправки на ваш почтовый ящик %1 придет уведомление.", + "DE.Views.MailMergeSettings.textTo": "По", + "DE.Views.MailMergeSettings.txtFirst": "Первое поле", + "DE.Views.MailMergeSettings.txtFromToError": "Значение \"С\" должно быть меньше значения \"По\"", + "DE.Views.MailMergeSettings.txtLast": "Последнее поле", + "DE.Views.MailMergeSettings.txtNext": "Следующее поле", + "DE.Views.MailMergeSettings.txtPrev": "Предыдущее поле", + "DE.Views.MailMergeSettings.txtUntitled": "Без имени", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Не удалось начать слияние", "DE.Views.ParagraphSettings.strLineHeight": "Междустрочный", "DE.Views.ParagraphSettings.strParagraphSpacing": "Интервал", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "Не добавлять интервал между абзацами одного стиля", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Параметры диаграммы", "DE.Views.RightMenu.txtHeaderFooterSettings": "Параметры верхнего и нижнего колонтитулов", "DE.Views.RightMenu.txtImageSettings": "Параметры изображения", + "DE.Views.RightMenu.txtMailMergeSettings": "Параметры слияния", "DE.Views.RightMenu.txtParagraphSettings": "Параметры абзаца", "DE.Views.RightMenu.txtShapeSettings": "Параметры фигуры", "DE.Views.RightMenu.txtTableSettings": "Параметры таблицы", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Вставить таблицу", "DE.Views.Toolbar.tipInsertText": "Вставить текст", "DE.Views.Toolbar.tipLineSpace": "Междустрочный интервал в абзацах", + "DE.Views.Toolbar.tipMailRecepients": "Слияние", "DE.Views.Toolbar.tipMarkers": "Маркированный список", "DE.Views.Toolbar.tipMultilevels": "Структура", "DE.Views.Toolbar.tipNewDocument": "Новый документ", diff --git a/OfficeWeb/apps/documenteditor/main/locale/sl.json b/OfficeWeb/apps/documenteditor/main/locale/sl.json index 036e2461..6f85fbce 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/sl.json +++ b/OfficeWeb/apps/documenteditor/main/locale/sl.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Opozorilo", "Common.Controllers.Chat.textEnterMessage": "Svoje sporočilo vnesite tu", - "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
        Only two users can co-edit the document simultaneously.
        Want more? Consider buying ONLYOFFICE Enterprise Edition.
        Read more", + "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
        Only two users can co-edit the document simultaneously.
        Want more? Consider buying ONLYOFFICE Enterprise Edition.
        Read more", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anonimno", "Common.Controllers.ExternalDiagramEditor.textClose": "Zapri", "Common.Controllers.ExternalDiagramEditor.warningText": "Objekt je onemogočen, saj ga ureja drug uporabnik.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Opozorilo", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Anonymous", + "Common.Controllers.ExternalMergeEditor.textClose": "Close", + "Common.Controllers.ExternalMergeEditor.warningText": "The object is disabled because it is being edited by another user.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Warning", + "Common.Controllers.History.notcriticalErrorTitle": "Warning", "Common.UI.ComboBorderSize.txtNoBorders": "Ni mej", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "Ni mej", "Common.UI.ComboDataView.emptyComboText": "Ni slogov", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "Ne", "Common.UI.Window.okButtonText": "OK", "Common.UI.Window.textConfirmation": "Potrditev", + "Common.UI.Window.textDontShow": "Tega sporočila ne prikaži več", "Common.UI.Window.textError": "Napaka", "Common.UI.Window.textInformation": "Informacija", "Common.UI.Window.textWarning": "Opozorilo", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Zapri", "Common.Views.ExternalDiagramEditor.textSave": "Shrani & Zapusti", "Common.Views.ExternalDiagramEditor.textTitle": "Urejevalec grafa", + "Common.Views.ExternalMergeEditor.textClose": "Close", + "Common.Views.ExternalMergeEditor.textSave": "Save & Exit", + "Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients", + "Common.Views.Header.openNewTabText": "Open in New Tab", "Common.Views.Header.textBack": "Pojdi v dokumente", + "Common.Views.History.textHistoryHeader": "Back to Document", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Prekliči", "Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.textUrl": "Prilepi URL slike:", @@ -86,8 +97,11 @@ "Common.Views.InsertTableDialog.txtMinText": "Minimalna vrednost za to polje je {0}.", "Common.Views.InsertTableDialog.txtRows": "Število vrstic", "Common.Views.InsertTableDialog.txtTitle": "Velikost tabele", + "DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
        Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "DE.Controllers.LeftMenu.newDocumentTitle": "Neimenovan dokument", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", "DE.Controllers.LeftMenu.requestEditRightsText": "Zahtevanje urejevalnih pravic...", + "DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...", "DE.Controllers.LeftMenu.textNoTextFound": "Podatkov, katere iščete, ni bilo mogoče najti. Prosim nastavite svoje možnosti iskanja.", "DE.Controllers.LeftMenu.textReplaceSkipped": "Nadomestek je bil izdelan. {0} dogodki so bili preskočeni.", "DE.Controllers.LeftMenu.textReplaceSuccess": "Iskanje je bilo storjeno. Dogodki nadomeščeni: {0}", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Napaka", "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE urejevalec dokumentov", "DE.Controllers.Main.downloadErrorText": "Prenos ni uspel.", + "DE.Controllers.Main.downloadMergeText": "Downloading...", + "DE.Controllers.Main.downloadMergeTitle": "Downloading", "DE.Controllers.Main.downloadTextText": "Prenašanje dokumenta...", "DE.Controllers.Main.downloadTitleText": "Prenašanje dokumenta", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Povezava s strežnikom izgubljena. Dokument v tem trenutku ne more biti urejen.", @@ -108,6 +124,8 @@ "DE.Controllers.Main.errorFilePassProtect": "Dokument je zaščiten z geslom in ga ni mogoče odpreti.", "DE.Controllers.Main.errorKeyEncrypt": "Neznan ključni deskriptor", "DE.Controllers.Main.errorKeyExpire": "Ključni deskriptor je potekel", + "DE.Controllers.Main.errorMailMergeLoadFile": "Loading failed", + "DE.Controllers.Main.errorMailMergeSaveFile": "Merge failed.", "DE.Controllers.Main.errorProcessSaveResult": "Shranjevanje ni bilo uspešno", "DE.Controllers.Main.errorStockChart": "Nepravilen vrstni red vrstic. Za izgradnjo razpredelnice delnic podatke na strani navedite v sledečem vrstnem redu:
        otvoritvena cena, maksimalna cena, minimalna cena, zaključna cena.", "DE.Controllers.Main.errorUpdateVersion": "Različica datoteke je bila spremenjena. Stran bo osvežena.", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Nalaganje Slike", "DE.Controllers.Main.loadingDocumentTextText": "Nalaganje dokumenta...", "DE.Controllers.Main.loadingDocumentTitleText": "Nalaganje Dokumenta", + "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.notcriticalErrorTitle": "Opozorilo", "DE.Controllers.Main.openTextText": "Odpiranje dokumenta...", "DE.Controllers.Main.openTitleText": "Odpiranje dokumenta", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Priprava za shranjevanje. Prosim počakajte...", "DE.Controllers.Main.saveTextText": "Shranjevanje dokumenta...", "DE.Controllers.Main.saveTitleText": "Shranjevanje dokumenta", + "DE.Controllers.Main.sendMergeText": "Sending Merge...", + "DE.Controllers.Main.sendMergeTitle": "Sending Merge", "DE.Controllers.Main.splitDividerErrorText": "Število vrstic mora biti razdelilec %1.", "DE.Controllers.Main.splitMaxColsErrorText": "Število stolpcev mora biti manj kot 1%.", "DE.Controllers.Main.splitMaxRowsErrorText": "Število vrstic mora biti manj kot %1.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Gumbi", "DE.Controllers.Main.txtCallouts": "Oblački", "DE.Controllers.Main.txtCharts": "Grafi", + "DE.Controllers.Main.txtDiagramTitle": "Naslov diagrama", "DE.Controllers.Main.txtEditingMode": "Nastavi način urejanja...", "DE.Controllers.Main.txtFiguredArrows": "Figurirane puščice", "DE.Controllers.Main.txtLines": "Vrste", "DE.Controllers.Main.txtMath": "Matematika", "DE.Controllers.Main.txtNeedSynchronize": "Imate posodobitve", "DE.Controllers.Main.txtRectangles": "Pravokotniki", + "DE.Controllers.Main.txtSeries": "Serije", "DE.Controllers.Main.txtStarsRibbons": "Zvezde & Trakovi", + "DE.Controllers.Main.txtXAxis": "X os", + "DE.Controllers.Main.txtYAxis": "Y os", "DE.Controllers.Main.unknownErrorText": "Neznana napaka.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Vaš brskalnik ni podprt.", "DE.Controllers.Main.uploadImageExtMessage": "Neznan format slike.", @@ -165,6 +191,7 @@ "DE.Controllers.Main.warnBrowserZoom": "Nastavitve povečave vašega trenutnega brskalnika niso popolnoma podprte. Prosim ponastavite na privzeto povečanje s pritiskom na Ctrl+0.", "DE.Controllers.Main.warnProcessRightsChange": "Pravica, da urejate datoteko je bila zavrnjena.", "DE.Controllers.Statusbar.zoomText": "Povečava {0}%", + "DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
        The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
        Do you want to continue?", "DE.Controllers.Toolbar.textAccent": "Narečja", "DE.Controllers.Toolbar.textBracket": "Oklepaji", "DE.Controllers.Toolbar.textEmptyImgUrl": "Določiti morate URL slike.", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Izbriši vrsto", "DE.Views.DocumentHolder.deleteTableText": "Izbriši tabelo", "DE.Views.DocumentHolder.deleteText": "Izbriši", + "DE.Views.DocumentHolder.direct270Text": "Rotate at 270°", + "DE.Views.DocumentHolder.direct90Text": "Rotate at 90°", + "DE.Views.DocumentHolder.directHText": "Horizontal", + "DE.Views.DocumentHolder.directionText": "Text Direction", "DE.Views.DocumentHolder.editChartText": "Uredi podatke", "DE.Views.DocumentHolder.editFooterText": "Uredi nogo", "DE.Views.DocumentHolder.editHeaderText": "Uredi glavo", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Ustvari nov", "DE.Views.FileMenu.btnDownloadCaption": "Prenesi kot...", "DE.Views.FileMenu.btnHelpCaption": "Pomoč...", + "DE.Views.FileMenu.btnHistoryCaption": "Version History", "DE.Views.FileMenu.btnInfoCaption": "Informacije dokumenta...", "DE.Views.FileMenu.btnPrintCaption": "Natisni", "DE.Views.FileMenu.btnRecentFilesCaption": "Odpri nedavno...", "DE.Views.FileMenu.btnReturnCaption": "Nazaj v dokument", + "DE.Views.FileMenu.btnRightsCaption": "Access Rights...", "DE.Views.FileMenu.btnSaveCaption": "Shrani", "DE.Views.FileMenu.btnSettingsCaption": "Napredne nastavitve...", "DE.Views.FileMenu.btnToEditCaption": "Uredi dokument", @@ -688,6 +721,8 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Simboli", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Naslov dokumenta", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Besede", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Spremeni pravice dostopa", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Osebe, ki imajo pravice", "DE.Views.FileMenuPanels.Settings.okButtonText": "Uporabi", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Vključi vodnike poravnave", "DE.Views.FileMenuPanels.Settings.strAutosave": "Vključi samodejno shranjevanje", @@ -816,13 +851,63 @@ "DE.Views.ImageSettingsAdvanced.textWrapThroughTooltip": "Preko", "DE.Views.ImageSettingsAdvanced.textWrapTightTooltip": "Tesen", "DE.Views.ImageSettingsAdvanced.textWrapTopbottomTooltip": "Vrh in Dno", - "DE.Views.LeftMenu.tipAbout": "o", + "DE.Views.LeftMenu.tipAbout": "O programu", "DE.Views.LeftMenu.tipChat": "Pogovor", "DE.Views.LeftMenu.tipComments": "Komentarji", "DE.Views.LeftMenu.tipFile": "Datoteka", "DE.Views.LeftMenu.tipSearch": "Iskanje", "DE.Views.LeftMenu.tipSupport": "Povratne informacije & Pomoč", "DE.Views.LeftMenu.tipTitles": "Naslovi", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Send", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Theme", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Attach as DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Attach as PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "File name", + "DE.Views.MailMergeEmailDlg.textFormat": "Mail format", + "DE.Views.MailMergeEmailDlg.textFrom": "From", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Message", + "DE.Views.MailMergeEmailDlg.textSubject": "Subject Line", + "DE.Views.MailMergeEmailDlg.textTitle": "Send to E-mail", + "DE.Views.MailMergeEmailDlg.textTo": "To", + "DE.Views.MailMergeEmailDlg.textWarning": "Warning!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Please note that mailing cannot be stopped once your click the 'Send' button.", + "DE.Views.MailMergeRecepients.textLoading": "Loading", + "DE.Views.MailMergeRecepients.textTitle": "Select Data Source", + "DE.Views.MailMergeSaveDlg.textLoading": "Loading", + "DE.Views.MailMergeSaveDlg.textTitle": "Folder for save", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Merging", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Merge failed.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Warning", + "DE.Views.MailMergeSettings.textAll": "All records", + "DE.Views.MailMergeSettings.textCurrent": "Current record", + "DE.Views.MailMergeSettings.textDataSource": "Data Source", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Download", + "DE.Views.MailMergeSettings.textEditData": "Edit recipients list", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "From", + "DE.Views.MailMergeSettings.textHighlight": "Highlight merge fields", + "DE.Views.MailMergeSettings.textInsertField": "Insert Merge Field", + "DE.Views.MailMergeSettings.textMaxRecepients": "Max 100 recipients.", + "DE.Views.MailMergeSettings.textMerge": "Merge", + "DE.Views.MailMergeSettings.textMergeFields": "Merge Fields", + "DE.Views.MailMergeSettings.textMergeTo": "Merge to", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Save", + "DE.Views.MailMergeSettings.textPreview": "Preview results", + "DE.Views.MailMergeSettings.textReadMore": "Read more", + "DE.Views.MailMergeSettings.textSendMsg": "All mail messages are ready and will be sent out within some time.
        The speed of mailing depends on your mail service.
        You can continue working with document or close it. After the operation is over the notification will be sent to your %1 email address.", + "DE.Views.MailMergeSettings.textTo": "To", + "DE.Views.MailMergeSettings.txtFirst": "To first field", + "DE.Views.MailMergeSettings.txtFromToError": "\"From\" value must be less than \"To\" value", + "DE.Views.MailMergeSettings.txtLast": "To last field", + "DE.Views.MailMergeSettings.txtNext": "To next field", + "DE.Views.MailMergeSettings.txtPrev": "To previous field", + "DE.Views.MailMergeSettings.txtUntitled": "Untitled", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Starting merge failed", "DE.Views.ParagraphSettings.strLineHeight": "Razmik med vrsticami", "DE.Views.ParagraphSettings.strParagraphSpacing": "Razmik", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "Med odstavke enakega sloga ne dodaj intervalov", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Nastavitve grafa", "DE.Views.RightMenu.txtHeaderFooterSettings": "Nastavitve glave in noge", "DE.Views.RightMenu.txtImageSettings": "Nastavitve slike", + "DE.Views.RightMenu.txtMailMergeSettings": "Mail Merge Settings", "DE.Views.RightMenu.txtParagraphSettings": "Nastavitve odstavka", "DE.Views.RightMenu.txtShapeSettings": "Nastavitve oblike", "DE.Views.RightMenu.txtTableSettings": "Nastavitve tabele", @@ -1089,7 +1175,7 @@ "DE.Views.Toolbar.textArea": "Ploščinski grafikon", "DE.Views.Toolbar.textAutoColor": "Samodejen", "DE.Views.Toolbar.textBar": "Stolpični grafikon", - "DE.Views.Toolbar.textBold": "Drzen", + "DE.Views.Toolbar.textBold": "Krepko", "DE.Views.Toolbar.textColumn": "Stolpični grafikon", "DE.Views.Toolbar.textCompactView": "Poglej kompaktno orodno vrstico", "DE.Views.Toolbar.textContPage": "Neprekinjena stran", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Vstavi tabelo", "DE.Views.Toolbar.tipInsertText": "Vstavi besedilo", "DE.Views.Toolbar.tipLineSpace": "Razmik črt odstavka", + "DE.Views.Toolbar.tipMailRecepients": "Mail Merge", "DE.Views.Toolbar.tipMarkers": "Krogle", "DE.Views.Toolbar.tipMultilevels": "Obroba", "DE.Views.Toolbar.tipNewDocument": "Nov dokument", diff --git a/OfficeWeb/apps/documenteditor/main/locale/tr.json b/OfficeWeb/apps/documenteditor/main/locale/tr.json index bf54105f..3c81fdaf 100644 --- a/OfficeWeb/apps/documenteditor/main/locale/tr.json +++ b/OfficeWeb/apps/documenteditor/main/locale/tr.json @@ -1,11 +1,16 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Dikkat", "Common.Controllers.Chat.textEnterMessage": "Mesajınızı buraya giriniz", - "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
        Only two users can co-edit the document simultaneously.
        Want more? Consider buying ONLYOFFICE Enterprise Edition.
        Read more", + "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
        Only two users can co-edit the document simultaneously.
        Want more? Consider buying ONLYOFFICE Enterprise Edition.
        Read more", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anonim", "Common.Controllers.ExternalDiagramEditor.textClose": "Kapat", "Common.Controllers.ExternalDiagramEditor.warningText": "Obje devre dışı bırakıldı, çünkü başka kullanıcı tarafından düzenleniyor.", "Common.Controllers.ExternalDiagramEditor.warningTitle": "Dikkat", + "Common.Controllers.ExternalMergeEditor.textAnonymous": "Anonymous", + "Common.Controllers.ExternalMergeEditor.textClose": "Close", + "Common.Controllers.ExternalMergeEditor.warningText": "The object is disabled because it is being edited by another user.", + "Common.Controllers.ExternalMergeEditor.warningTitle": "Warning", + "Common.Controllers.History.notcriticalErrorTitle": "Warning", "Common.UI.ComboBorderSize.txtNoBorders": "Sınır yok", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "Sınır yok", "Common.UI.ComboDataView.emptyComboText": "Stil yok", @@ -32,6 +37,7 @@ "Common.UI.Window.noButtonText": "Hayır", "Common.UI.Window.okButtonText": "TAMAM", "Common.UI.Window.textConfirmation": "Konfirmasyon", + "Common.UI.Window.textDontShow": "Bu mesajı bir daha gösterme", "Common.UI.Window.textError": "Hata", "Common.UI.Window.textInformation": "Bilgi", "Common.UI.Window.textWarning": "Dikkat", @@ -72,7 +78,12 @@ "Common.Views.ExternalDiagramEditor.textClose": "Kapat", "Common.Views.ExternalDiagramEditor.textSave": "Kaydet & Çık", "Common.Views.ExternalDiagramEditor.textTitle": "Grafik Editörü", + "Common.Views.ExternalMergeEditor.textClose": "Close", + "Common.Views.ExternalMergeEditor.textSave": "Save & Exit", + "Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients", + "Common.Views.Header.openNewTabText": "Open in New Tab", "Common.Views.Header.textBack": "Dökümanlara Git", + "Common.Views.History.textHistoryHeader": "Back to Document", "Common.Views.ImageFromUrlDialog.cancelButtonText": "İptal Et", "Common.Views.ImageFromUrlDialog.okButtonText": "TAMAM", "Common.Views.ImageFromUrlDialog.textUrl": "Resim URL'sini yapıştır:", @@ -86,8 +97,11 @@ "Common.Views.InsertTableDialog.txtMinText": "Bu alan için minimum değer: {0}.", "Common.Views.InsertTableDialog.txtRows": "Sıra Sayısı", "Common.Views.InsertTableDialog.txtTitle": "Tablo Boyutu", + "DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.
        Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "DE.Controllers.LeftMenu.newDocumentTitle": "İsimlendirilmemiş döküman", + "DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning", "DE.Controllers.LeftMenu.requestEditRightsText": "Düzenleme hakları isteniyor...", + "DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...", "DE.Controllers.LeftMenu.textNoTextFound": "Aradığınız veri bulunamadı. Lütfen arama seçeneklerinizi ayarlayınız.", "DE.Controllers.LeftMenu.textReplaceSkipped": "Değiştirme yapıldı. {0} olay atlandı.", "DE.Controllers.LeftMenu.textReplaceSuccess": "Arama yapıldı. {0} olay değiştirildi.", @@ -99,6 +113,8 @@ "DE.Controllers.Main.criticalErrorTitle": "Hata", "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Döküman Editörü", "DE.Controllers.Main.downloadErrorText": "Yükleme başarısız oldu.", + "DE.Controllers.Main.downloadMergeText": "Downloading...", + "DE.Controllers.Main.downloadMergeTitle": "Downloading", "DE.Controllers.Main.downloadTextText": "Döküman yükleniyor...", "DE.Controllers.Main.downloadTitleText": "Döküman yükleniyor", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Sunucu bağlantısı kesildi. Döküman şu an düzenlenemez.", @@ -108,6 +124,8 @@ "DE.Controllers.Main.errorFilePassProtect": "Döküman şifre korumalı ve açılamadı", "DE.Controllers.Main.errorKeyEncrypt": "Bilinmeyen anahtar tanımlayıcı", "DE.Controllers.Main.errorKeyExpire": "Anahtar tanımlayıcının süresi doldu", + "DE.Controllers.Main.errorMailMergeLoadFile": "Loading failed", + "DE.Controllers.Main.errorMailMergeSaveFile": "Merge failed.", "DE.Controllers.Main.errorProcessSaveResult": "Kaydetme başarısız.", "DE.Controllers.Main.errorStockChart": "Yanlış dizi sırası. Stok grafiği oluşturma için tablodaki verileri şu sırada yerleştirin:
        açılış fiyatı, maksimum fiyat, minimum fiyat, kapanış fiyatı. ", "DE.Controllers.Main.errorUpdateVersion": "Dosya versiyonu değiştirildi. Sayfa yenilenecektir.", @@ -124,6 +142,8 @@ "DE.Controllers.Main.loadImageTitleText": "Resim yükleniyor", "DE.Controllers.Main.loadingDocumentTextText": "Döküman yükleniyor...", "DE.Controllers.Main.loadingDocumentTitleText": "Döküman yükleniyor", + "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.notcriticalErrorTitle": "Dikkat", "DE.Controllers.Main.openTextText": "Döküman Açılıyor", "DE.Controllers.Main.openTitleText": "Döküman Açılıyor", @@ -136,6 +156,8 @@ "DE.Controllers.Main.savePreparingTitle": "Kaydetmeye hazırlanıyor. Lütfen bekleyin...", "DE.Controllers.Main.saveTextText": "Döküman kaydediliyor...", "DE.Controllers.Main.saveTitleText": "Döküman Kaydediliyor", + "DE.Controllers.Main.sendMergeText": "Sending Merge...", + "DE.Controllers.Main.sendMergeTitle": "Sending Merge", "DE.Controllers.Main.splitDividerErrorText": "Satır sayısı %1'in böleni olmalıdır.", "DE.Controllers.Main.splitMaxColsErrorText": "Sütun sayısı %1'den az olmalıdır.", "DE.Controllers.Main.splitMaxRowsErrorText": "Satır sayısı %1'den az olmalıdır.", @@ -147,13 +169,17 @@ "DE.Controllers.Main.txtButtons": "Tuşlar", "DE.Controllers.Main.txtCallouts": "Belirtme Çizgiler", "DE.Controllers.Main.txtCharts": "Grafikler", + "DE.Controllers.Main.txtDiagramTitle": "Diagram Başlığı", "DE.Controllers.Main.txtEditingMode": "Düzenleme modunu belirle", "DE.Controllers.Main.txtFiguredArrows": "Şekilli Oklar", "DE.Controllers.Main.txtLines": "Satırlar", "DE.Controllers.Main.txtMath": "Matematik", "DE.Controllers.Main.txtNeedSynchronize": "Güncellemeleriniz var", "DE.Controllers.Main.txtRectangles": "Dikdörtgenler", + "DE.Controllers.Main.txtSeries": "Seriler", "DE.Controllers.Main.txtStarsRibbons": "Yıldızlar & Kurdeleler", + "DE.Controllers.Main.txtXAxis": "X Ekseni", + "DE.Controllers.Main.txtYAxis": "Y Ekseni", "DE.Controllers.Main.unknownErrorText": "Bilinmeyen hata.", "DE.Controllers.Main.unsupportedBrowserErrorText ": "Tarayıcınız desteklenmiyor.", "DE.Controllers.Main.uploadImageExtMessage": "Bilinmeyen resim formatı", @@ -165,6 +191,7 @@ "DE.Controllers.Main.warnBrowserZoom": "Tarayıcınızın mevcut zum ayarı tam olarak desteklenmiyor. Ctrl+0'a basarak varsayılan zumu sıfırlayınız.", "DE.Controllers.Main.warnProcessRightsChange": "Dosyayı düzenleme hakkınız reddedildi", "DE.Controllers.Statusbar.zoomText": "Zum {0}%", + "DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
        The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
        Do you want to continue?", "DE.Controllers.Toolbar.textAccent": "Accents", "DE.Controllers.Toolbar.textBracket": "Brackets", "DE.Controllers.Toolbar.textEmptyImgUrl": "Resim URL'si belirtmelisiniz.", @@ -541,6 +568,10 @@ "DE.Views.DocumentHolder.deleteRowText": "Satırı Sil", "DE.Views.DocumentHolder.deleteTableText": "Tabloyu Sil", "DE.Views.DocumentHolder.deleteText": "Sil", + "DE.Views.DocumentHolder.direct270Text": "Rotate at 270°", + "DE.Views.DocumentHolder.direct90Text": "Rotate at 90°", + "DE.Views.DocumentHolder.directHText": "Horizontal", + "DE.Views.DocumentHolder.directionText": "Text Direction", "DE.Views.DocumentHolder.editChartText": "Veri düzenle", "DE.Views.DocumentHolder.editFooterText": "Altlığı Düzenle", "DE.Views.DocumentHolder.editHeaderText": "Üstlüğü Düzenle", @@ -663,10 +694,12 @@ "DE.Views.FileMenu.btnCreateNewCaption": "Yeni oluştur", "DE.Views.FileMenu.btnDownloadCaption": "Farklı Yükle...", "DE.Views.FileMenu.btnHelpCaption": "Yardım...", + "DE.Views.FileMenu.btnHistoryCaption": "Version History", "DE.Views.FileMenu.btnInfoCaption": "Döküman Bilgisi...", "DE.Views.FileMenu.btnPrintCaption": "Yazdır", "DE.Views.FileMenu.btnRecentFilesCaption": "En sonunucuyu aç...", "DE.Views.FileMenu.btnReturnCaption": "Dökümana Geri Dön", + "DE.Views.FileMenu.btnRightsCaption": "Access Rights...", "DE.Views.FileMenu.btnSaveCaption": "Kaydet", "DE.Views.FileMenu.btnSettingsCaption": "Gelişmiş Ayarlar...", "DE.Views.FileMenu.btnToEditCaption": "Döküman Düzenle", @@ -688,6 +721,8 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Semboller", "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Döküman Başlığı", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Kelimeler", + "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Erişim haklarını değiştir", + "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Hakkı olan kişiler", "DE.Views.FileMenuPanels.Settings.okButtonText": "Uygula", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", "DE.Views.FileMenuPanels.Settings.strAutosave": "Otomatik kaydetmeyi aç", @@ -823,6 +858,56 @@ "DE.Views.LeftMenu.tipSearch": "Ara", "DE.Views.LeftMenu.tipSupport": "Geri Bildirim & Destek", "DE.Views.LeftMenu.tipTitles": "Başlıklar", + "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel", + "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", + "DE.Views.MailMergeEmailDlg.okButtonText": "Send", + "DE.Views.MailMergeEmailDlg.subjectPlaceholder": "Theme", + "DE.Views.MailMergeEmailDlg.textAttachDocx": "Attach as DOCX", + "DE.Views.MailMergeEmailDlg.textAttachPdf": "Attach as PDF", + "DE.Views.MailMergeEmailDlg.textFileName": "File name", + "DE.Views.MailMergeEmailDlg.textFormat": "Mail format", + "DE.Views.MailMergeEmailDlg.textFrom": "From", + "DE.Views.MailMergeEmailDlg.textHTML": "HTML", + "DE.Views.MailMergeEmailDlg.textMessage": "Message", + "DE.Views.MailMergeEmailDlg.textSubject": "Subject Line", + "DE.Views.MailMergeEmailDlg.textTitle": "Send to E-mail", + "DE.Views.MailMergeEmailDlg.textTo": "To", + "DE.Views.MailMergeEmailDlg.textWarning": "Warning!", + "DE.Views.MailMergeEmailDlg.textWarningMsg": "Please note that mailing cannot be stopped once your click the 'Send' button.", + "DE.Views.MailMergeRecepients.textLoading": "Loading", + "DE.Views.MailMergeRecepients.textTitle": "Select Data Source", + "DE.Views.MailMergeSaveDlg.textLoading": "Loading", + "DE.Views.MailMergeSaveDlg.textTitle": "Folder for save", + "DE.Views.MailMergeSettings.downloadMergeTitle": "Merging", + "DE.Views.MailMergeSettings.errorMailMergeSaveFile": "Merge failed.", + "DE.Views.MailMergeSettings.notcriticalErrorTitle": "Warning", + "DE.Views.MailMergeSettings.textAll": "All records", + "DE.Views.MailMergeSettings.textCurrent": "Current record", + "DE.Views.MailMergeSettings.textDataSource": "Data Source", + "DE.Views.MailMergeSettings.textDocx": "Docx", + "DE.Views.MailMergeSettings.textDownload": "Download", + "DE.Views.MailMergeSettings.textEditData": "Edit recipients list", + "DE.Views.MailMergeSettings.textEmail": "E-mail", + "DE.Views.MailMergeSettings.textFrom": "From", + "DE.Views.MailMergeSettings.textHighlight": "Highlight merge fields", + "DE.Views.MailMergeSettings.textInsertField": "Insert Merge Field", + "DE.Views.MailMergeSettings.textMaxRecepients": "Max 100 recipients.", + "DE.Views.MailMergeSettings.textMerge": "Merge", + "DE.Views.MailMergeSettings.textMergeFields": "Merge Fields", + "DE.Views.MailMergeSettings.textMergeTo": "Merge to", + "DE.Views.MailMergeSettings.textPdf": "PDF", + "DE.Views.MailMergeSettings.textPortal": "Save", + "DE.Views.MailMergeSettings.textPreview": "Preview results", + "DE.Views.MailMergeSettings.textReadMore": "Read more", + "DE.Views.MailMergeSettings.textSendMsg": "All mail messages are ready and will be sent out within some time.
        The speed of mailing depends on your mail service.
        You can continue working with document or close it. After the operation is over the notification will be sent to your %1 email address.", + "DE.Views.MailMergeSettings.textTo": "To", + "DE.Views.MailMergeSettings.txtFirst": "To first field", + "DE.Views.MailMergeSettings.txtFromToError": "\"From\" value must be less than \"To\" value", + "DE.Views.MailMergeSettings.txtLast": "To last field", + "DE.Views.MailMergeSettings.txtNext": "To next field", + "DE.Views.MailMergeSettings.txtPrev": "To previous field", + "DE.Views.MailMergeSettings.txtUntitled": "Untitled", + "DE.Views.MailMergeSettings.warnProcessMailMerge": "Starting merge failed", "DE.Views.ParagraphSettings.strLineHeight": "Satır Aralığı", "DE.Views.ParagraphSettings.strParagraphSpacing": "Aralık", "DE.Views.ParagraphSettings.strSomeParagraphSpace": "Aynı stildeki paragraflar arasına aralık ekleme", @@ -897,6 +982,7 @@ "DE.Views.RightMenu.txtChartSettings": "Grafik Ayarları", "DE.Views.RightMenu.txtHeaderFooterSettings": "Üst Başlık ve Alt Başlık Ayarları", "DE.Views.RightMenu.txtImageSettings": "Resim Ayarları", + "DE.Views.RightMenu.txtMailMergeSettings": "Mail Merge Settings", "DE.Views.RightMenu.txtParagraphSettings": "Paragraf Ayarları", "DE.Views.RightMenu.txtShapeSettings": "Şekil Ayarları", "DE.Views.RightMenu.txtTableSettings": "Tablo Ayarları", @@ -1152,6 +1238,7 @@ "DE.Views.Toolbar.tipInsertTable": "Tablo ekle", "DE.Views.Toolbar.tipInsertText": "Metin ekle", "DE.Views.Toolbar.tipLineSpace": "Paragraf Satır Aralığı", + "DE.Views.Toolbar.tipMailRecepients": "Mail Merge", "DE.Views.Toolbar.tipMarkers": "İmler", "DE.Views.Toolbar.tipMultilevels": "Çerçeve", "DE.Views.Toolbar.tipNewDocument": "Yeni Döküman", diff --git a/OfficeWeb/apps/documenteditor/main/resources/less/app.less b/OfficeWeb/apps/documenteditor/main/resources/less/app.less index 19122565..abdc6c2b 100644 --- a/OfficeWeb/apps/documenteditor/main/resources/less/app.less +++ b/OfficeWeb/apps/documenteditor/main/resources/less/app.less @@ -109,6 +109,7 @@ @import "../../../../common/main/resources/less/scroller.less"; @import "../../../../common/main/resources/less/synchronize-tip.less"; @import "../../../../common/main/resources/less/common.less"; +@import "../../../../common/main/resources/less/history.less"; // App // -------------------------------------------------- diff --git a/OfficeWeb/apps/documenteditor/main/resources/less/layout.less b/OfficeWeb/apps/documenteditor/main/resources/less/layout.less index 967f29d0..1215b908 100644 --- a/OfficeWeb/apps/documenteditor/main/resources/less/layout.less +++ b/OfficeWeb/apps/documenteditor/main/resources/less/layout.less @@ -68,4 +68,11 @@ label { .tooltip-inner { max-width: none; } +} + +#left-panel-history { + left: 40px; + width: 300px; + height: 100%; + display: none; } \ No newline at end of file diff --git a/OfficeWeb/apps/documenteditor/main/resources/less/leftmenu.less b/OfficeWeb/apps/documenteditor/main/resources/less/leftmenu.less index 79d7e938..cf4a6974 100644 --- a/OfficeWeb/apps/documenteditor/main/resources/less/leftmenu.less +++ b/OfficeWeb/apps/documenteditor/main/resources/less/leftmenu.less @@ -36,6 +36,19 @@ } } +#left-panel-history { + &+.layout-resizer { + border-left: 0 none; + border-right: 0 none; + + &.move { + border-left: 1px solid @gray-dark; + border-right: 1px solid @gray-dark; + opacity: 0.4; + } + } +} + .tool-menu-btns { width: 40px; height: 100%; @@ -59,6 +72,9 @@ #left-panel-comments { height: 100%; } + #left-panel-history { + height: 100%; + } } .left-menu-full-ct { @@ -387,7 +403,8 @@ } } - #panel-info { + #panel-info, + #panel-rights { padding: 0 30px; table { tr { diff --git a/OfficeWeb/apps/documenteditor/main/resources/less/statusbar.less b/OfficeWeb/apps/documenteditor/main/resources/less/statusbar.less index 162dbb9e..96f21862 100644 --- a/OfficeWeb/apps/documenteditor/main/resources/less/statusbar.less +++ b/OfficeWeb/apps/documenteditor/main/resources/less/statusbar.less @@ -48,7 +48,7 @@ } &[disabled] .btn-icon { - background-position: -60px @top-position; + background-position: -40px @top-position; } &.active { @@ -146,6 +146,14 @@ .apply-language-flag(); } } + + &.disabled { + cursor: default; + label, .icon-lang-flag { + cursor: default; + opacity: 0.4; + } + } } .cnt-zoom { diff --git a/OfficeWeb/apps/documenteditor/mobile/app/controller/Main.js b/OfficeWeb/apps/documenteditor/mobile/app/controller/Main.js index 09c76917..4de18715 100644 --- a/OfficeWeb/apps/documenteditor/mobile/app/controller/Main.js +++ b/OfficeWeb/apps/documenteditor/mobile/app/controller/Main.js @@ -39,6 +39,7 @@ return; } this.initControl(); + Common.component.Analytics.initialize("UA-12442749-13", "Document Editor Mobile"); var api = this.api, app = this.getApplication(); api = new asc_docs_api("id-sdkeditor"); diff --git a/OfficeWeb/apps/documenteditor/mobile/index.html b/OfficeWeb/apps/documenteditor/mobile/index.html index 8d060625..7fecc731 100644 --- a/OfficeWeb/apps/documenteditor/mobile/index.html +++ b/OfficeWeb/apps/documenteditor/mobile/index.html @@ -18,149 +18,149 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 20002; + z-index: 100; } - .loadmask-body { - position:relative; - top:44%; + .loader-page { + top: 50%; + left: 50%; + width: 50px; + height: 180px; + position: absolute; + margin-top: -100px; } - .loadmask-logo { - display: inline-block; - min-width:220px; - min-height:62px; - vertical-align: top; - background-image: url('./resources/img/loading-logo.gif'); - background-image: -webkit-image-set(url('./resources/img/loading-logo.gif') 1x, url('./resources/img/loading-logo@2x.gif') 2x); - background-repeat: no-repeat; + .romb { + width: 40px; + height: 40px; + -webkit-transform: rotate(135deg) skew(20deg, 20deg); + -moz-transform: rotate(135deg) skew(20deg, 20deg); + -ms-transform: rotate(135deg) skew(20deg, 20deg); + -o-transform: rotate(135deg) skew(20deg, 20deg); + position: absolute; + background: red; + border-radius: 6px; + -webkit-animation: movedown 3s infinite ease; + -moz-animation: movedown 3s infinite ease; + -ms-animation: movedown 3s infinite ease; + -o-animation: movedown 3s infinite ease; + animation: movedown 3s infinite ease; + } + + #blue { + z-index: 3; + background: #55bce6; + -webkit-animation-name: blue; + -moz-animation-name: blue; + -ms-animation-name: blue; + -o-animation-name: blue; + animation-name: blue; + } + + #red { + z-index:1; + background: #de7a59; + -webkit-animation-name: red; + -moz-animation-name: red; + -ms-animation-name: red; + -o-animation-name: red; + animation-name: red; + } + + #green { + z-index: 2; + background: #a1cb5c; + -webkit-animation-name: green; + -moz-animation-name: green; + -ms-animation-name: green; + -o-animation-name: green; + animation-name: green; + } + + @-webkit-keyframes red { + 0% { top:120px; background: #de7a59; } + 10% { top:120px; background: #F2CBBF; } + 14% { background: #f4f4f4; top:120px; } + 15% { background: #f4f4f4; top:0;} + 20% { background: #E6E4E4; } + 30% { background: #D2D2D2; } + 40% { top:120px; } + 100% { top:120px; background: #de7a59; } + } + + @keyframes red { + 0% { top:120px; background: #de7a59; } + 10% { top:120px; background: #F2CBBF; } + 14% { background: #f4f4f4; top:120px; } + 15% { background: #f4f4f4; top:0; } + 20% { background: #E6E4E4; } + 30% { background: #D2D2D2; } + 40% { top:120px; } + 100% { top:120px; background: #de7a59; } + } + + @-webkit-keyframes green { + 0% { top:110px; background: #a1cb5c; opacity:1; } + 10% { top:110px; background: #CBE0AC; opacity:1; } + 14% { background: #f4f4f4; top:110px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #EFEFEF; top:0; opacity:1; } + 30% { background:#E6E4E4; } + 70% { top:110px; } + 100% { top:110px; background: #a1cb5c; } + } + + @keyframes green { + 0% { top:110px; background: #a1cb5c; opacity:1; } + 10% { top:110px; background: #CBE0AC; opacity:1; } + 14% { background: #f4f4f4; top:110px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #EFEFEF; top:0; opacity:1; } + 30% { background:#E6E4E4; } + 70% { top:110px; } + 100% { top:110px; background: #a1cb5c; } + } + + @-webkit-keyframes blue { + 0% { top:100px; background: #55bce6; opacity:1; } + 10% { top:100px; background: #BFE8F8; opacity:1; } + 14% { background: #f4f4f4; top:100px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #f4f4f4; top:0; opacity:0; } + 45% { background: #EFEFEF; top:0; opacity:0,2; } + 100% { top:100px; background: #55bce6; } + } + + @keyframes blue { + 0% { top:100px; background: #55bce6; opacity:1; } + 10% { top:100px; background: #BFE8F8; opacity:1; } + 14% { background: #f4f4f4; top:100px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #fff; top:0; opacity:0; } + 45% { background: #EFEFEF; top:0; opacity:0,2; } + 100% { top:100px; background: #55bce6; } } - + + + + + - - - + + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/OfficeWeb/apps/presentationeditor/embed/index.html b/OfficeWeb/apps/presentationeditor/embed/index.html index 2fd0cbfb..bb1e674e 100644 --- a/OfficeWeb/apps/presentationeditor/embed/index.html +++ b/OfficeWeb/apps/presentationeditor/embed/index.html @@ -7,6 +7,10 @@ + + + + - - @@ -46,6 +158,11 @@ + + + + +
        -
        -
        - -
        +
        +
        +
        +
        +
        @@ -79,14 +197,14 @@
          -
        • +
          -
        • of 0
        • +
        • of 0
        • @@ -110,112 +228,20 @@
          Please wait...
        - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + diff --git a/OfficeWeb/apps/presentationeditor/embed/index.html.deploy b/OfficeWeb/apps/presentationeditor/embed/index.html.deploy index 7f487ce5..de5dce6e 100644 --- a/OfficeWeb/apps/presentationeditor/embed/index.html.deploy +++ b/OfficeWeb/apps/presentationeditor/embed/index.html.deploy @@ -189,7 +189,7 @@
          -
        • +
        • diff --git a/OfficeWeb/apps/presentationeditor/embed/js/ApplicationController.js b/OfficeWeb/apps/presentationeditor/embed/js/ApplicationController.js index 38762fd0..3c28417b 100644 --- a/OfficeWeb/apps/presentationeditor/embed/js/ApplicationController.js +++ b/OfficeWeb/apps/presentationeditor/embed/js/ApplicationController.js @@ -30,7 +30,8 @@ * */ var ApplicationController = new(function () { - var me, api, docConfig = {}, + var me, api, config = {}, + docConfig = {}, embedConfig = {}, permissions = {}, maxPages = 0, @@ -40,6 +41,7 @@ embedCode = '', maxZIndex = 9090, created = false; + Common.Analytics.initialize("UA-12442749-13", "Embedded ONLYOFFICE Presentation"); if (typeof isBrowserSupported !== "undefined" && !isBrowserSupported()) { Common.Gateway.reportError(undefined, "Your browser is not supported."); return; @@ -77,6 +79,7 @@ } } function loadConfig(data) { + config = $.extend(config, data.config); embedConfig = $.extend(embedConfig, data.config.embedded); $("#id-short-url").text(embedConfig.shareUrl || "Unavailable"); $("#id-textarea-embed").text(embedCode.replace("{embed-url}", embedConfig.embedUrl).replace("{width}", minEmbedWidth).replace("{height}", minEmbedHeight)); @@ -96,7 +99,7 @@ if (typeof embedConfig.fullscreenUrl === "undefined") { $("#id-btn-fullscreen").hide(); } - if (typeof data.config.canBackToFolder === "undefined" || !data.config.canBackToFolder) { + if (typeof config.canBackToFolder === "undefined" || !config.canBackToFolder) { $("#id-btn-close").hide(); } if (embedConfig.toolbarDocked === "top") { @@ -122,6 +125,8 @@ docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); if (api) { + api.asc_registerCallback("asc_onGetEditorPermissions", onEditorPermissions); + api.asc_getEditorPermissions(); api.asc_enableKeyEvents(true); api.SetViewMode(true); api.LoadDocument(docInfo); @@ -204,6 +209,15 @@ hidePreloader(); Common.Analytics.trackEvent("Load", "Complete"); } + function onEditorPermissions(params) { + if (params.asc_getCanBranding() && (typeof config.customization == "object") && config.customization && config.customization.logoUrlEmbedded) { + $("#header-logo").css({ + "background-image": 'url("' + config.customization.logoUrlEmbedded + '")', + "background-position": "0 center", + "background-repeat": "no-repeat" + }); + } + } function showMask() { $("#id-loadmask").modal({ backdrop: "static", diff --git a/OfficeWeb/apps/presentationeditor/main/app/controller/LeftMenu.js b/OfficeWeb/apps/presentationeditor/main/app/controller/LeftMenu.js index 40711617..a02b8060 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/OfficeWeb/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -94,7 +94,7 @@ this.api.asc_registerCallback("asc_onThumbnailsShow", _.bind(this.onThumbnailsShow, this)); this.api.asc_registerCallback("asc_onСoAuthoringDisconnect", _.bind(this.onApiServerDisconnect, this)); Common.NotificationCenter.on("api:disconnect", _.bind(this.onApiServerDisconnect, this)); - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { this.api.asc_registerCallback("asc_onCoAuthoringChatReceiveMessage", _.bind(this.onApiChatMessage, this)); } this.api.asc_registerCallback("asc_onCountPages", _.bind(this.onApiCountPages, this)); @@ -110,10 +110,14 @@ }, createDelayedElements: function () { if (this.mode.canCoAuthoring) { - this.leftMenu.btnComments[this.mode.isEdit ? "show" : "hide"](); - this.leftMenu.btnChat.show(); - this.leftMenu.setOptionsPanel("chat", this.getApplication().getController("Common.Controllers.Chat").getView("Common.Views.Chat")); - this.leftMenu.setOptionsPanel("comment", this.getApplication().getController("Common.Controllers.Comments").getView("Common.Views.Comments")); + this.leftMenu.btnComments[this.mode.isEdit && this.mode.canComments ? "show" : "hide"](); + if (this.mode.canComments) { + this.leftMenu.setOptionsPanel("comment", this.getApplication().getController("Common.Controllers.Comments").getView("Common.Views.Comments")); + } + this.leftMenu.btnChat[this.mode.canChat ? "show" : "hide"](); + if (this.mode.canChat) { + this.leftMenu.setOptionsPanel("chat", this.getApplication().getController("Common.Controllers.Chat").getView("Common.Views.Chat")); + } } else { this.leftMenu.btnChat.hide(); this.leftMenu.btnComments.hide(); @@ -214,7 +218,7 @@ this.leftMenu.getMenu("file").disableMenu("save", status); }, clickStatusbarUsers: function () { - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { if (this.leftMenu.btnChat.pressed) { this.leftMenu.close(); } else { @@ -366,13 +370,13 @@ } break; case "chat": - if (this.mode.canCoAuthoring && (!previewPanel || !previewPanel.isVisible())) { + if (this.mode.canCoAuthoring && this.mode.canChat && (!previewPanel || !previewPanel.isVisible())) { Common.UI.Menu.Manager.hideAll(); this.leftMenu.showMenu("chat"); } return false; case "comments": - if (this.mode.canCoAuthoring && this.mode.isEdit && (!previewPanel || !previewPanel.isVisible()) && !this._state.no_slides) { + if (this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments && (!previewPanel || !previewPanel.isVisible()) && !this._state.no_slides) { Common.UI.Menu.Manager.hideAll(); this.leftMenu.showMenu("comments"); this.getApplication().getController("Common.Controllers.Comments").focusOnInput(); diff --git a/OfficeWeb/apps/presentationeditor/main/app/controller/Main.js b/OfficeWeb/apps/presentationeditor/main/app/controller/Main.js index 1a034c4b..10c618d5 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/controller/Main.js +++ b/OfficeWeb/apps/presentationeditor/main/app/controller/Main.js @@ -33,6 +33,11 @@ PE.Controllers.Main = Backbone.Controller.extend(_.extend((function () { var ApplyEditRights = -255; var LoadingDocument = -256; + var mapCustomizationElements = { + about: "button#left-btn-about", + feedback: "button#left-btn-support", + goback: "#fm-btn-back > a, #header-back > div" + }; return { models: [], collections: ["ShapeGroups", "SlideLayouts"], @@ -148,14 +153,16 @@ this.appOptions.user = this.editorConfig.user; this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.editorConfig.canBackToFolder === true; this.appOptions.nativeApp = this.editorConfig.nativeApp === true; - this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl); - this.appOptions.canOpenRecent = this.editorConfig.nativeApp !== true && this.editorConfig.recent !== undefined; + this.appOptions.isDesktopApp = this.editorConfig.targetApp == "desktop"; + this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl) && !this.appOptions.isDesktopApp; + this.appOptions.canOpenRecent = this.editorConfig.nativeApp !== true && this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp; this.appOptions.templates = this.editorConfig.templates; this.appOptions.recent = this.editorConfig.recent; this.appOptions.createUrl = this.editorConfig.createUrl; this.appOptions.lang = this.editorConfig.lang; this.appOptions.sharingSettingsUrl = this.editorConfig.sharingSettingsUrl; this.appOptions.canAnalytics = false; + this.appOptions.customization = this.editorConfig.customization; this.getApplication().getController("Viewport").getView("Common.Views.Header").setCanBack(this.editorConfig.canBackToFolder === true); if (this.editorConfig.lang) { this.api.asc_setLocale(this.editorConfig.lang); @@ -177,7 +184,6 @@ docInfo.put_UserId(this.editorConfig.user.id); docInfo.put_UserName(this.editorConfig.user.name); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); - docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); } this.api.asc_registerCallback("asc_onGetEditorPermissions", _.bind(this.onEditorPermissions, this)); this.api.asc_setDocInfo(docInfo); @@ -198,7 +204,7 @@ onProcessRightsChange: function (data) { if (data && data.enabled === false) { this.api.asc_coAuthoringDisconnect(); - this.getApplication().getController("LeftMenu").leftMenu.getMenu("file").panels["info"].onLostEditRights(); + this.getApplication().getController("LeftMenu").leftMenu.getMenu("file").panels["rights"].onLostEditRights(); Common.UI.warning({ title: this.notcriticalErrorTitle, msg: _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message @@ -406,9 +412,11 @@ value = window.localStorage.getItem("pe-settings-zoom"); var zf = (value !== null) ? parseInt(value) : -1; (zf == -1) ? this.api.zoomFitToPage() : this.api.zoom(zf); - Common.Utils.isIE9m && tips.push(me.warnBrowserIE9); ! Common.Utils.isGecko && (Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, "{0}")); - if (tips.length) { - me.showTips(tips); + if ( !! window["AscDesktopEditor"]) { + Common.Utils.isIE9m && tips.push(me.warnBrowserIE9); ! Common.Utils.isGecko && (Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, "{0}")); + if (tips.length) { + me.showTips(tips); + } } me.api.asc_registerCallback("asc_onStartAction", _.bind(me.onLongActionBegin, me)); me.api.asc_registerCallback("asc_onEndAction", _.bind(me.onLongActionEnd, me)); @@ -441,7 +449,7 @@ statusbarController.createDelayedElements(); leftmenuController.getView("LeftMenu").disableMenu("all", false); if (me.appOptions.canBranding) { - me.getApplication().getController("LeftMenu").leftMenu.getMenu("about").setLicInfo(me.editorConfig.branding); + me.getApplication().getController("LeftMenu").leftMenu.getMenu("about").setLicInfo(me.editorConfig.customization); } documentHolderController.getView("DocumentHolder").setApi(me.api).on("editcomplete", _.bind(me.onEditComplete, me)); application.getController("Viewport").getView("DocumentPreview").setApi(me.api).on("editcomplete", _.bind(me.onEditComplete, me)); @@ -480,8 +488,9 @@ } me.api.asc_setAutoSaveGap(value); if (this.appOptions.canAnalytics) { - Common.Gateway.on("applyeditrights", _.bind(me.onApplyEditRights, me)); + Common.component.Analytics.initialize("UA-12442749-13", "Presentation Editor"); } + Common.Gateway.on("applyeditrights", _.bind(me.onApplyEditRights, me)); Common.Gateway.on("processsaveresult", _.bind(me.onProcessSaveResult, me)); Common.Gateway.on("processrightschange", _.bind(me.onProcessRightsChange, me)); Common.Gateway.on("processmouse", _.bind(me.onProcessMouse, me)); @@ -500,15 +509,18 @@ onEditorPermissions: function (params) { this.permissions.edit !== false && (this.permissions.edit = params.asc_getCanEdit()); this.permissions.download !== false && (this.permissions.download = params.asc_getCanDownload()); - this.appOptions.canCoAuthoring = params.asc_getCanCoAuthoring(); + this.appOptions.canCoAuthoring = true; this.appOptions.canEdit = this.permissions.edit === true; this.appOptions.isEdit = this.appOptions.canEdit && this.editorConfig.mode !== "view"; this.appOptions.canDownload = !this.appOptions.nativeApp && this.permissions.download; this.appOptions.canAutosave = this.editorConfig.canAutosave !== false && params.asc_getIsAutosaveEnable(); this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); - this.appOptions.canBranding = params.asc_getCanBranding() && (typeof(this.editorConfig.branding) == "object"); + this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false; + this.appOptions.canComments = this.appOptions.canLicense && !((typeof(this.editorConfig.customization) == "object") && this.editorConfig.customization.comments === false); + this.appOptions.canChat = this.appOptions.canLicense && !((typeof(this.editorConfig.customization) == "object") && this.editorConfig.customization.chat === false); + this.appOptions.canBranding = params.asc_getCanBranding() && (typeof(this.editorConfig.customization) == "object"); if (this.appOptions.canBranding) { - this.getApplication().getController("Viewport").getView("Common.Views.Header").setBranding(this.editorConfig.branding); + this.getApplication().getController("Viewport").getView("Common.Views.Header").setBranding(this.editorConfig.customization); } this.applyModeCommonElements(); this.applyModeEditorElements(); @@ -530,7 +542,7 @@ documentHolder = app.getController("DocumentHolder").getView("DocumentHolder"); if (headerView) { headerView.setHeaderCaption(this.appOptions.isEdit ? "Presentation Editor" : "Presentation Viewer"); - headerView.setVisible(!this.appOptions.nativeApp && !value); + headerView.setVisible(!this.appOptions.nativeApp && !value && !this.appOptions.isDesktopApp); } viewport && viewport.setMode(this.appOptions, true); statusbarView && statusbarView.setMode(this.appOptions); @@ -807,6 +819,10 @@ } }, hidePreloader: function () { + if ( !! this.appOptions.customization && !this.appOptions.customization.done) { + this.appOptions.customization.done = true; + Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); + } Common.NotificationCenter.trigger("layout:changed", "main"); $("#loading-mask").hide().remove(); }, diff --git a/OfficeWeb/apps/presentationeditor/main/app/controller/Toolbar.js b/OfficeWeb/apps/presentationeditor/main/app/controller/Toolbar.js index f362fd5a..c903d3fd 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/OfficeWeb/apps/presentationeditor/main/app/controller/Toolbar.js @@ -803,20 +803,25 @@ onCopyPaste: function (copy, e) { var me = this; if (me.api) { - var value = window.localStorage.getItem("pe-hide-copywarning"); - if (! (value && parseInt(value) == 1) && this._state.show_copywarning) { - (new Common.Views.CopyWarningDialog({ - handler: function (dontshow) { - copy ? me.api.Copy() : me.api.Paste(); - if (dontshow) { - window.localStorage.setItem("pe-hide-copywarning", 1); - } - Common.NotificationCenter.trigger("edit:complete", me.toolbar); - } - })).show(); - } else { + if (typeof window["AscDesktopEditor"] === "object") { copy ? me.api.Copy() : me.api.Paste(); Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } else { + var value = window.localStorage.getItem("pe-hide-copywarning"); + if (! (value && parseInt(value) == 1) && this._state.show_copywarning) { + (new Common.Views.CopyWarningDialog({ + handler: function (dontshow) { + copy ? me.api.Copy() : me.api.Paste(); + if (dontshow) { + window.localStorage.setItem("pe-hide-copywarning", 1); + } + Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } + })).show(); + } else { + copy ? me.api.Copy() : me.api.Paste(); + Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } } Common.component.Analytics.trackEvent("ToolBar", "Copy Warning"); } else { diff --git a/OfficeWeb/apps/presentationeditor/main/app/template/FileMenu.template b/OfficeWeb/apps/presentationeditor/main/app/template/FileMenu.template index 7076563b..967d44b6 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/template/FileMenu.template +++ b/OfficeWeb/apps/presentationeditor/main/app/template/FileMenu.template @@ -11,6 +11,7 @@
        • +
        • @@ -23,6 +24,7 @@
          +
          \ No newline at end of file diff --git a/OfficeWeb/apps/presentationeditor/main/app/view/DocumentHolder.js b/OfficeWeb/apps/presentationeditor/main/app/view/DocumentHolder.js index 3b968205..b0480dee 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/OfficeWeb/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -581,7 +581,7 @@ me.api.asc_registerCallback("asc_onDialogAddHyperlink", _.bind(onDialogAddHyperlink, me)); me.api.asc_registerCallback("asc_doubleClickOnChart", onDoubleClickOnChart); } - me.mode = mode; ! (me.mode.canCoAuthoring && me.mode.isEdit) ? Common.util.Shortcuts.suspendEvents(hkComments) : Common.util.Shortcuts.resumeEvents(hkComments); + me.mode = mode; ! (me.mode.canCoAuthoring && me.mode.isEdit && me.mode.canComments) ? Common.util.Shortcuts.suspendEvents(hkComments) : Common.util.Shortcuts.resumeEvents(hkComments); me.editorConfig = { user: mode.user }; @@ -650,7 +650,7 @@ } }, addComment: function (item, e, eOpt) { - if (this.api && this.mode.canCoAuthoring && this.mode.isEdit) { + if (this.api && this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) { this.suppressEditComplete = true; this.api.asc_enableKeyEvents(false); var controller = PE.getController("Common.Controllers.Comments"); @@ -673,20 +673,24 @@ onCutCopyPaste: function (item, e) { var me = this; if (me.api) { - var value = window.localStorage.getItem("pe-hide-copywarning"); - if (! (value && parseInt(value) == 1) && me.show_copywarning) { - (new Common.Views.CopyWarningDialog({ - handler: function (dontshow) { - (item.value == "cut") ? me.api.Cut() : ((item.value == "copy") ? me.api.Copy() : me.api.Paste()); - if (dontshow) { - window.localStorage.setItem("pe-hide-copywarning", 1); - } - me.fireEvent("editcomplete", me); - } - })).show(); - } else { + if (typeof window["AscDesktopEditor"] === "object") { (item.value == "cut") ? me.api.Cut() : ((item.value == "copy") ? me.api.Copy() : me.api.Paste()); - me.fireEvent("editcomplete", me); + } else { + var value = window.localStorage.getItem("pe-hide-copywarning"); + if (! (value && parseInt(value) == 1) && me.show_copywarning) { + (new Common.Views.CopyWarningDialog({ + handler: function (dontshow) { + (item.value == "cut") ? me.api.Cut() : ((item.value == "copy") ? me.api.Copy() : me.api.Paste()); + if (dontshow) { + window.localStorage.setItem("pe-hide-copywarning", 1); + } + me.fireEvent("editcomplete", me); + } + })).show(); + } else { + (item.value == "cut") ? me.api.Cut() : ((item.value == "copy") ? me.api.Copy() : me.api.Paste()); + me.fireEvent("editcomplete", me); + } } } else { me.fireEvent("editcomplete", me); @@ -1330,7 +1334,7 @@ menuAddHyperlinkPara.hyperProps.value = new CHyperlinkProperty(); menuAddHyperlinkPara.hyperProps.value.put_Text(text); } - menuAddCommentPara.setVisible(!isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring); + menuAddCommentPara.setVisible(!isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments); menuCommentParaSeparator.setVisible(menuAddCommentPara.isVisible() || menuAddHyperlinkPara.isVisible() || menuHyperlinkPara.isVisible()); menuAddHyperlinkPara.setDisabled(disabled); menuHyperlinkPara.setDisabled(disabled); @@ -1386,7 +1390,7 @@ menuAddHyperlinkTable.setDisabled(value.paraProps.locked || disabled); menuHyperlinkTable.setDisabled(value.paraProps.locked || disabled); } - menuAddCommentTable.setVisible(me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring); + menuAddCommentTable.setVisible(me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments); menuAddCommentTable.setDisabled(!_.isUndefined(value.paraProps) && value.paraProps.locked || disabled); menuHyperlinkSeparator.setVisible(menuAddHyperlinkTable.isVisible() || menuHyperlinkTable.isVisible() || menuAddCommentTable.isVisible()); }, @@ -1515,7 +1519,7 @@ menuShapeAdvanced.setVisible(_.isUndefined(value.imgProps) && _.isUndefined(value.chartProps)); menuChartEdit.setVisible(_.isUndefined(value.imgProps) && !_.isUndefined(value.chartProps) && (_.isUndefined(value.shapeProps) || value.shapeProps.isChart)); menuImgShapeSeparator.setVisible(menuImageAdvanced.isVisible() || menuShapeAdvanced.isVisible() || menuChartEdit.isVisible()); - menuAddCommentImg.setVisible(me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring); + menuAddCommentImg.setVisible(me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments); menuCommentSeparatorImg.setVisible(menuAddCommentImg.isVisible()); menuAddCommentImg.setDisabled(disabled); menuImgShapeAlign.setDisabled(disabled); diff --git a/OfficeWeb/apps/presentationeditor/main/app/view/FileMenu.js b/OfficeWeb/apps/presentationeditor/main/app/view/FileMenu.js index fb624d8b..fe81bb7d 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/view/FileMenu.js +++ b/OfficeWeb/apps/presentationeditor/main/app/view/FileMenu.js @@ -106,6 +106,11 @@ action: "info", caption: this.btnInfoCaption, canFocused: false + }), new Common.UI.MenuItem({ + el: $("#fm-btn-rights", this.el), + action: "rights", + caption: this.btnRightsCaption, + canFocused: false }), new Common.UI.MenuItem({ el: $("#fm-btn-settings", this.el), action: "opts", @@ -135,6 +140,9 @@ "info": (new PE.Views.FileMenuPanels.DocumentInfo({ menu: me })).render(), + "rights": (new PE.Views.FileMenuPanels.DocumentRights({ + menu: me + })).render(), "help": (new PE.Views.FileMenuPanels.Help({ menu: me })).render() @@ -166,16 +174,17 @@ this.api.asc_enableKeyEvents(true); }, applyMode: function () { - this.items[0][this.mode.canBack ? "show" : "hide"](); - this.items[0].$el.find("+.devider")[this.mode.canBack ? "show" : "hide"](); this.items[5][this.mode.canOpenRecent ? "show" : "hide"](); this.items[6][this.mode.canCreateNew ? "show" : "hide"](); this.items[6].$el.find("+.devider")[this.mode.canCreateNew ? "show" : "hide"](); this.items[3][this.mode.canDownload ? "show" : "hide"](); this.items[1][this.mode.isEdit ? "show" : "hide"](); this.items[2][!this.mode.isEdit && this.mode.canEdit ? "show" : "hide"](); + this.mode.canBack ? this.$el.find("#fm-btn-back").show().prev().show() : this.$el.find("#fm-btn-back").hide().prev().hide(); + this.items[8][(this.document && this.document.info && (this.document.info.sharingSettings && this.document.info.sharingSettings.length > 0 || this.mode.sharingSettingsUrl && this.mode.sharingSettingsUrl.length)) ? "show" : "hide"](); this.panels["opts"].setMode(this.mode); this.panels["info"].setMode(this.mode).updateInfo(this.document); + this.panels["rights"].setMode(this.mode).updateInfo(this.document); if (this.mode.canCreateNew) { if (this.mode.templates && this.mode.templates.length) { $("a", this.items[6].$el).text(this.btnCreateNewCaption + "..."); @@ -193,6 +202,9 @@ })).render(); } } + if (this.mode.targetApp == "desktop") { + this.$el.find("#fm-btn-create, #fm-btn-back, #fm-btn-create+.devider").hide(); + } this.panels["help"].setLangConfig(this.mode.lang); }, setMode: function (mode, delay) { @@ -241,6 +253,7 @@ btnSaveCaption: "Save", btnDownloadCaption: "Download as...", btnInfoCaption: "Document Info...", + btnRightsCaption: "Access Rights...", btnCreateNewCaption: "Create New", btnRecentFilesCaption: "Open Recent...", btnPrintCaption: "Print", diff --git a/OfficeWeb/apps/presentationeditor/main/app/view/FileMenuPanels.js b/OfficeWeb/apps/presentationeditor/main/app/view/FileMenuPanels.js index 961d816a..52a28eff 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/OfficeWeb/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -339,8 +339,7 @@ initialize: function (options) { Common.UI.BaseView.prototype.initialize.call(this, arguments); this.rendered = false; - this.template = _.template(['', "", '", '', "", '', '", '', "", '', '", '', "", '', '", '', "", '', '', '", '', "", '', '", "", "
          -
          "].join("")); - this.templateRights = _.template(["", "<% _.each(users, function(item) { %>", "", '', "", "", "<% }); %>", "
          <%= Common.Utils.String.htmlEncode(item.user) %><%= Common.Utils.String.htmlEncode(item.permissions) %>
          "].join("")); + this.template = _.template(['', "", '", '', "", '', '", '', "", '', '", '', "", '', '", '', "", '', "
          -
          "].join("")); this.menu = options.menu; }, render: function () { @@ -349,11 +348,6 @@ this.lblPlacement = $("#id-info-placement"); this.lblDate = $("#id-info-date"); this.lblAuthor = $("#id-info-author"); - this.cntRights = $("#id-info-rights"); - this.btnEditRights = new Common.UI.Button({ - el: "#id-info-btn-edit" - }); - this.btnEditRights.on("click", _.bind(this.changeAccessRights, this)); this.rendered = true; this.updateInfo(this.doc); if (_.isUndefined(this.scroller)) { @@ -390,13 +384,6 @@ this.lblPlacement.text(doc.info.folder); } this._ShowHideInfoItem("placement", doc.info.folder !== undefined && doc.info.folder !== null); - if (doc.info.sharingSettings) { - this.cntRights.html(this.templateRights({ - users: doc.info.sharingSettings - })); - } - this._ShowHideInfoItem("rights", doc.info.sharingSettings !== undefined && doc.info.sharingSettings !== null && this._readonlyRights !== true); - this._ShowHideInfoItem("edit-rights", !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && this._readonlyRights !== true); } else { this._ShowHideDocInfo(false); } @@ -408,6 +395,71 @@ this._ShowHideInfoItem("date", visible); this._ShowHideInfoItem("placement", visible); this._ShowHideInfoItem("author", visible); + }, + setMode: function (mode) { + return this; + }, + txtTitle: "Document Title", + txtAuthor: "Author", + txtPlacement: "Placement", + txtDate: "Creation Date" + }, + PE.Views.FileMenuPanels.DocumentInfo || {})); + PE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ + el: "#panel-rights", + menu: undefined, + initialize: function (options) { + Common.UI.BaseView.prototype.initialize.call(this, arguments); + this.rendered = false; + this.template = _.template(['', '', '", '', "", '', '", "", "
          "].join("")); + this.templateRights = _.template(["", "<% _.each(users, function(item) { %>", "", '', "", "", "<% }); %>", "
          <%= Common.Utils.String.htmlEncode(item.user) %><%= Common.Utils.String.htmlEncode(item.permissions) %>
          "].join("")); + this.menu = options.menu; + }, + render: function () { + $(this.el).html(this.template()); + this.cntRights = $("#id-info-rights"); + this.btnEditRights = new Common.UI.Button({ + el: "#id-info-btn-edit" + }); + this.btnEditRights.on("click", _.bind(this.changeAccessRights, this)); + this.rendered = true; + this.updateInfo(this.doc); + if (_.isUndefined(this.scroller)) { + this.scroller = new Common.UI.Scroller({ + el: $(this.el), + suppressScrollX: true + }); + } + return this; + }, + show: function () { + Common.UI.BaseView.prototype.show.call(this, arguments); + }, + hide: function () { + Common.UI.BaseView.prototype.hide.call(this, arguments); + }, + updateInfo: function (doc) { + this.doc = doc; + if (!this.rendered) { + return; + } + doc = doc || {}; + if (doc.info) { + if (doc.info.sharingSettings) { + this.cntRights.html(this.templateRights({ + users: doc.info.sharingSettings + })); + } + this._ShowHideInfoItem("rights", doc.info.sharingSettings !== undefined && doc.info.sharingSettings !== null && doc.info.sharingSettings.length > 0); + this._ShowHideInfoItem("edit-rights", !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && this._readonlyRights !== true); + } else { + this._ShowHideDocInfo(false); + } + }, + _ShowHideInfoItem: function (cls, visible) { + $("tr." + cls, this.el)[visible ? "show" : "hide"](); + }, + _ShowHideDocInfo: function (visible) { this._ShowHideInfoItem("rights", visible); this._ShowHideInfoItem("edit-rights", visible); }, @@ -416,34 +468,35 @@ return this; }, changeAccessRights: function (btn, event, opts) { + if (this._docAccessDlg) { + return; + } var me = this; - var win = new Common.Views.DocumentAccessDialog({ + me._docAccessDlg = new Common.Views.DocumentAccessDialog({ settingsurl: this.sharingSettingsUrl }); - win.on("accessrights", function (obj, rights) { + me._docAccessDlg.on("accessrights", function (obj, rights) { me.doc.info.sharingSettings = rights; + me._ShowHideInfoItem("rights", me.doc.info.sharingSettings !== undefined && me.doc.info.sharingSettings !== null && me.doc.info.sharingSettings.length > 0); me.cntRights.html(me.templateRights({ users: me.doc.info.sharingSettings })); + }).on("close", function (obj) { + me._docAccessDlg = undefined; }); - win.show(); + me._docAccessDlg.show(); }, onLostEditRights: function () { this._readonlyRights = true; if (!this.rendered) { return; } - this._ShowHideInfoItem("rights", false); this._ShowHideInfoItem("edit-rights", false); }, - txtTitle: "Document Title", - txtAuthor: "Author", - txtPlacement: "Placement", - txtDate: "Creation Date", txtRights: "Persons who have rights", txtBtnAccessRights: "Change access rights" }, - PE.Views.FileMenuPanels.DocumentInfo || {})); + PE.Views.FileMenuPanels.DocumentRights || {})); PE.Views.FileMenuPanels.Help = Common.UI.BaseView.extend({ el: "#panel-help", menu: undefined, diff --git a/OfficeWeb/apps/presentationeditor/main/app/view/LeftMenu.js b/OfficeWeb/apps/presentationeditor/main/app/view/LeftMenu.js index 3ab112fe..156dbef2 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/view/LeftMenu.js +++ b/OfficeWeb/apps/presentationeditor/main/app/view/LeftMenu.js @@ -178,16 +178,20 @@ }, onCoauthOptions: function (e) { if (this.mode.canCoAuthoring) { - this.panelComments[this.btnComments.pressed ? "show" : "hide"](); - this.fireEvent((this.btnComments.pressed) ? "comments:show": "comments:hide", this); - if (this.btnChat.pressed) { - if (this.btnChat.$el.hasClass("notify")) { - this.btnChat.$el.removeClass("notify"); + if (this.mode.canComments) { + this.panelComments[this.btnComments.pressed ? "show" : "hide"](); + this.fireEvent((this.btnComments.pressed) ? "comments:show": "comments:hide", this); + } + if (this.mode.canChat) { + if (this.btnChat.pressed) { + if (this.btnChat.$el.hasClass("notify")) { + this.btnChat.$el.removeClass("notify"); + } + this.panelChat.show(); + this.panelChat.focus(); + } else { + this.panelChat["hide"](); } - this.panelChat.show(); - this.panelChat.focus(); - } else { - this.panelChat["hide"](); } } }, @@ -211,13 +215,17 @@ this.btnThumbs.toggle(false); this.$el.width(SCALE_MIN); if (this.mode.canCoAuthoring) { - this.panelComments["hide"](); - this.panelChat["hide"](); - if (this.btnComments.pressed) { - this.fireEvent("comments:hide", this); + if (this.mode.canComments) { + this.panelComments["hide"](); + if (this.btnComments.pressed) { + this.fireEvent("comments:hide", this); + } + this.btnComments.toggle(false, true); + } + if (this.mode.canChat) { + this.panelChat["hide"](); + this.btnChat.toggle(false, true); } - this.btnComments.toggle(false, true); - this.btnChat.toggle(false, true); } this.fireEvent("panel:show", [this, "", false]); }, diff --git a/OfficeWeb/apps/presentationeditor/main/app/view/Toolbar.js b/OfficeWeb/apps/presentationeditor/main/app/view/Toolbar.js index c845daea..4e3070a3 100644 --- a/OfficeWeb/apps/presentationeditor/main/app/view/Toolbar.js +++ b/OfficeWeb/apps/presentationeditor/main/app/view/Toolbar.js @@ -1564,6 +1564,10 @@ nativeBtnGroup.hide(); } } + if (mode.isDesktopApp) { + $(".toolbar-group-native").hide(); + this.mnuitemHideTitleBar.hide(); + } }, changeViewMode: function (item, compact) { var me = this, diff --git a/OfficeWeb/apps/presentationeditor/main/locale/de.json b/OfficeWeb/apps/presentationeditor/main/locale/de.json index 1f0207ba..1e66ceef 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/de.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/de.json @@ -304,6 +304,7 @@ "PE.Views.FileMenu.btnPrintCaption": "Drucken", "PE.Views.FileMenu.btnRecentFilesCaption": "Zuletzt benutzte öffnen...", "PE.Views.FileMenu.btnReturnCaption": "Zurück zur Präsentation", + "PE.Views.FileMenu.btnRightsCaption": "Access Rights...", "PE.Views.FileMenu.btnSaveCaption": "Speichern", "PE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen...", "PE.Views.FileMenu.btnToEditCaption": "Präsentation bearbeiten", @@ -313,10 +314,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "Neue Präsentation", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "Es gibt keine Vorlagen", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autor", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Zugriffsrechte ändern", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Zugriffsrechte ändern", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Erstellungsdatum", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Speicherort", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personen mit Berechtigungen", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Personen mit Berechtigungen", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titel der Präsentation", "PE.Views.FileMenuPanels.Settings.okButtonText": "Übernehmen", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Ausrichtungslinien einschalten", diff --git a/OfficeWeb/apps/presentationeditor/main/locale/en.json b/OfficeWeb/apps/presentationeditor/main/locale/en.json index 8a035423..9ec468ba 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/en.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/en.json @@ -301,6 +301,7 @@ "PE.Views.FileMenu.btnDownloadCaption": "Download as...", "PE.Views.FileMenu.btnHelpCaption": "Help...", "PE.Views.FileMenu.btnInfoCaption": "Presentation Info...", + "PE.Views.FileMenu.btnRightsCaption": "Access Rights...", "PE.Views.FileMenu.btnPrintCaption": "Print", "PE.Views.FileMenu.btnRecentFilesCaption": "Open Recent...", "PE.Views.FileMenu.btnReturnCaption": "Back to Presentation", @@ -313,10 +314,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "New Presentation", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "There are no templates", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Author", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Change access rights", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Location", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persons who have rights", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Presentation Title", "PE.Views.FileMenuPanels.Settings.okButtonText": "Apply", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", diff --git a/OfficeWeb/apps/presentationeditor/main/locale/es.json b/OfficeWeb/apps/presentationeditor/main/locale/es.json index 88c0da14..f15da4b8 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/es.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/es.json @@ -304,6 +304,7 @@ "PE.Views.FileMenu.btnPrintCaption": "Imprimir", "PE.Views.FileMenu.btnRecentFilesCaption": "Abrir reciente...", "PE.Views.FileMenu.btnReturnCaption": "Ir a presentación", + "PE.Views.FileMenu.btnRightsCaption": "Derechos de acceso...", "PE.Views.FileMenu.btnSaveCaption": "Guardar", "PE.Views.FileMenu.btnSettingsCaption": "Ajustes avanzados...", "PE.Views.FileMenu.btnToEditCaption": "Editar presentación", @@ -313,10 +314,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "Presentación nueva", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "No hay ningunas plantillas", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autor", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Cambiar derechos de acceso", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Cambiar derechos de acceso", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Fecha de creación", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Ubicación", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personas que tienen derechos", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Personas que tienen derechos", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Título de presentación", "PE.Views.FileMenuPanels.Settings.okButtonText": "Aplicar", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Activar guías de alineación", diff --git a/OfficeWeb/apps/presentationeditor/main/locale/fr.json b/OfficeWeb/apps/presentationeditor/main/locale/fr.json index 3a95c19c..739bde9c 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/fr.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/fr.json @@ -313,10 +313,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nouvelle présentation", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "Pas de modèles", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Auteur", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Changer les droits d'accès", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Changer les droits d'accès", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Date de création", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Emplacement", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personnes qui ont des droits", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Personnes qui ont des droits", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titre de la présentation", "PE.Views.FileMenuPanels.Settings.okButtonText": "Appliquer", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Activer les repères d'alignement", diff --git a/OfficeWeb/apps/presentationeditor/main/locale/it.json b/OfficeWeb/apps/presentationeditor/main/locale/it.json index 994c26da..894c31f3 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/it.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/it.json @@ -313,10 +313,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nuova presentazione", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "Nessun modello", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autore", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Cambia diritti di accesso", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Cambia diritti di accesso", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Data di creazione", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Percorso", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persone con diritti", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Persone con diritti", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titolo presentazione", "PE.Views.FileMenuPanels.Settings.okButtonText": "Applica", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", diff --git a/OfficeWeb/apps/presentationeditor/main/locale/pt.json b/OfficeWeb/apps/presentationeditor/main/locale/pt.json index 498460d8..7e845795 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/pt.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/pt.json @@ -313,10 +313,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nova apresentação", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "Não há modelos", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autor", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Alterar direitos de acesso", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Alterar direitos de acesso", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Data de criação", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Localização", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Pessoas que têm direitos", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Pessoas que têm direitos", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Título de apresentação", "PE.Views.FileMenuPanels.Settings.okButtonText": "Aplicar", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", diff --git a/OfficeWeb/apps/presentationeditor/main/locale/ru.json b/OfficeWeb/apps/presentationeditor/main/locale/ru.json index 2ae66d90..5933bbe2 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/ru.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/ru.json @@ -304,6 +304,7 @@ "PE.Views.FileMenu.btnPrintCaption": "Печать", "PE.Views.FileMenu.btnRecentFilesCaption": "Открыть последние...", "PE.Views.FileMenu.btnReturnCaption": "Вернуться к презентации", + "PE.Views.FileMenu.btnRightsCaption": "Права доступа...", "PE.Views.FileMenu.btnSaveCaption": "Сохранить", "PE.Views.FileMenu.btnSettingsCaption": "Дополнительные параметры...", "PE.Views.FileMenu.btnToEditCaption": "Редактировать", @@ -313,10 +314,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "Новая презентация", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "Шаблоны отсутствуют", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Автор", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Изменить права доступа", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Изменить права доступа", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Дата создания", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Размещение", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Люди, имеющие права", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Люди, имеющие права", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Название презентации", "PE.Views.FileMenuPanels.Settings.okButtonText": "Применить", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Включить направляющие выравнивания", diff --git a/OfficeWeb/apps/presentationeditor/main/locale/sl.json b/OfficeWeb/apps/presentationeditor/main/locale/sl.json index 559514ca..ccfdd269 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/sl.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/sl.json @@ -313,10 +313,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nova predstavitev", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "Ni predlog", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Avtor", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Spremeni pravice dostopa", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Spremeni pravice dostopa", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Datum nastanka", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Lokacija", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Osebe, ki imajo pravice", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Osebe, ki imajo pravice", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Naslov predstavitve", "PE.Views.FileMenuPanels.Settings.okButtonText": "Uporabi", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Vključi vodnike poravnave", diff --git a/OfficeWeb/apps/presentationeditor/main/locale/tr.json b/OfficeWeb/apps/presentationeditor/main/locale/tr.json index a740fb35..a1925817 100644 --- a/OfficeWeb/apps/presentationeditor/main/locale/tr.json +++ b/OfficeWeb/apps/presentationeditor/main/locale/tr.json @@ -313,10 +313,10 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "Yeni Sunum", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "Şablon yok", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Yayıncı", - "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Erişim haklarını değiştir", + "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Erişim haklarını değiştir", "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Oluşturulma tarihi", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Lokasyon", - "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Hakkı olan kişiler", + "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Hakkı olan kişiler", "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Sunum Başlığı", "PE.Views.FileMenuPanels.Settings.okButtonText": "Uygula", "PE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", diff --git a/OfficeWeb/apps/presentationeditor/main/resources/less/leftmenu.less b/OfficeWeb/apps/presentationeditor/main/resources/less/leftmenu.less index 281715f3..46497fda 100644 --- a/OfficeWeb/apps/presentationeditor/main/resources/less/leftmenu.less +++ b/OfficeWeb/apps/presentationeditor/main/resources/less/leftmenu.less @@ -397,7 +397,8 @@ } } - #panel-info { + #panel-info, + #panel-rights { padding: 0 30px; table { tr { diff --git a/OfficeWeb/apps/presentationeditor/mobile/app/controller/Main.js b/OfficeWeb/apps/presentationeditor/mobile/app/controller/Main.js index e85cff9a..6053c36a 100644 --- a/OfficeWeb/apps/presentationeditor/mobile/app/controller/Main.js +++ b/OfficeWeb/apps/presentationeditor/mobile/app/controller/Main.js @@ -39,6 +39,7 @@ return; } this.initControl(); + Common.component.Analytics.initialize("UA-12442749-13", "Presentation Editor Mobile"); var api = this.api, app = this.getApplication(), profile = app.getCurrentProfile(); diff --git a/OfficeWeb/apps/presentationeditor/mobile/index.html b/OfficeWeb/apps/presentationeditor/mobile/index.html index a9b2b0cf..27c4dbd1 100644 --- a/OfficeWeb/apps/presentationeditor/mobile/index.html +++ b/OfficeWeb/apps/presentationeditor/mobile/index.html @@ -18,154 +18,149 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 20002; + z-index: 100; } - .loadmask-body { - position:relative; - top:44%; + .loader-page { + top: 50%; + left: 50%; + width: 50px; + height: 180px; + position: absolute; + margin-top: -100px; } - .loadmask-logo { - display: inline-block; - min-width:220px; - min-height:62px; - vertical-align: top; - background-image: url('./resources/img/loading-logo.gif'); - background-image: -webkit-image-set(url('./resources/img/loading-logo.gif') 1x, url('./resources/img/loading-logo@2x.gif') 2x); - background-repeat: no-repeat; + .romb { + width: 40px; + height: 40px; + -webkit-transform: rotate(135deg) skew(20deg, 20deg); + -moz-transform: rotate(135deg) skew(20deg, 20deg); + -ms-transform: rotate(135deg) skew(20deg, 20deg); + -o-transform: rotate(135deg) skew(20deg, 20deg); + position: absolute; + background: red; + border-radius: 6px; + -webkit-animation: movedown 3s infinite ease; + -moz-animation: movedown 3s infinite ease; + -ms-animation: movedown 3s infinite ease; + -o-animation: movedown 3s infinite ease; + animation: movedown 3s infinite ease; + } + + #blue { + z-index: 3; + background: #55bce6; + -webkit-animation-name: blue; + -moz-animation-name: blue; + -ms-animation-name: blue; + -o-animation-name: blue; + animation-name: blue; + } + + #red { + z-index:1; + background: #de7a59; + -webkit-animation-name: red; + -moz-animation-name: red; + -ms-animation-name: red; + -o-animation-name: red; + animation-name: red; + } + + #green { + z-index: 2; + background: #a1cb5c; + -webkit-animation-name: green; + -moz-animation-name: green; + -ms-animation-name: green; + -o-animation-name: green; + animation-name: green; + } + + @-webkit-keyframes red { + 0% { top:120px; background: #de7a59; } + 10% { top:120px; background: #F2CBBF; } + 14% { background: #f4f4f4; top:120px; } + 15% { background: #f4f4f4; top:0;} + 20% { background: #E6E4E4; } + 30% { background: #D2D2D2; } + 40% { top:120px; } + 100% { top:120px; background: #de7a59; } + } + + @keyframes red { + 0% { top:120px; background: #de7a59; } + 10% { top:120px; background: #F2CBBF; } + 14% { background: #f4f4f4; top:120px; } + 15% { background: #f4f4f4; top:0; } + 20% { background: #E6E4E4; } + 30% { background: #D2D2D2; } + 40% { top:120px; } + 100% { top:120px; background: #de7a59; } + } + + @-webkit-keyframes green { + 0% { top:110px; background: #a1cb5c; opacity:1; } + 10% { top:110px; background: #CBE0AC; opacity:1; } + 14% { background: #f4f4f4; top:110px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #EFEFEF; top:0; opacity:1; } + 30% { background:#E6E4E4; } + 70% { top:110px; } + 100% { top:110px; background: #a1cb5c; } + } + + @keyframes green { + 0% { top:110px; background: #a1cb5c; opacity:1; } + 10% { top:110px; background: #CBE0AC; opacity:1; } + 14% { background: #f4f4f4; top:110px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #EFEFEF; top:0; opacity:1; } + 30% { background:#E6E4E4; } + 70% { top:110px; } + 100% { top:110px; background: #a1cb5c; } + } + + @-webkit-keyframes blue { + 0% { top:100px; background: #55bce6; opacity:1; } + 10% { top:100px; background: #BFE8F8; opacity:1; } + 14% { background: #f4f4f4; top:100px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #f4f4f4; top:0; opacity:0; } + 45% { background: #EFEFEF; top:0; opacity:0,2; } + 100% { top:100px; background: #55bce6; } + } + + @keyframes blue { + 0% { top:100px; background: #55bce6; opacity:1; } + 10% { top:100px; background: #BFE8F8; opacity:1; } + 14% { background: #f4f4f4; top:100px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #fff; top:0; opacity:0; } + 45% { background: #EFEFEF; top:0; opacity:0,2; } + 100% { top:100px; background: #55bce6; } } + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/OfficeWeb/apps/spreadsheeteditor/embed/index.html b/OfficeWeb/apps/spreadsheeteditor/embed/index.html index 8591a8e3..a636c1fc 100644 --- a/OfficeWeb/apps/spreadsheeteditor/embed/index.html +++ b/OfficeWeb/apps/spreadsheeteditor/embed/index.html @@ -200,7 +200,7 @@
            -
          • +
          • diff --git a/OfficeWeb/apps/spreadsheeteditor/embed/index.html.deploy b/OfficeWeb/apps/spreadsheeteditor/embed/index.html.deploy index c27d6a7a..869c8cf5 100644 --- a/OfficeWeb/apps/spreadsheeteditor/embed/index.html.deploy +++ b/OfficeWeb/apps/spreadsheeteditor/embed/index.html.deploy @@ -189,7 +189,7 @@
              -
            • +
            • diff --git a/OfficeWeb/apps/spreadsheeteditor/embed/js/ApplicationController.js b/OfficeWeb/apps/spreadsheeteditor/embed/js/ApplicationController.js index 18ef1a39..06b462fa 100644 --- a/OfficeWeb/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/OfficeWeb/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -30,7 +30,8 @@ * */ var ApplicationController = new(function () { - var me, api, docConfig = {}, + var me, api, config = {}, + docConfig = {}, embedConfig = {}, permissions = {}, maxPages = 0, @@ -40,6 +41,7 @@ embedCode = '', maxZIndex = 9090, created = false; + Common.Analytics.initialize("UA-12442749-13", "Embedded ONLYOFFICE Spreadsheet"); if (typeof isBrowserSupported !== "undefined" && !isBrowserSupported()) { Common.Gateway.reportError(undefined, "Your browser is not supported."); return; @@ -77,6 +79,7 @@ } } function loadConfig(data) { + config = $.extend(config, data.config); embedConfig = $.extend(embedConfig, data.config.embedded); $("#id-short-url").val(embedConfig.shareUrl || "Unavailable"); $("#id-textarea-embed").text(embedCode.replace("{embed-url}", embedConfig.embedUrl).replace("{width}", minEmbedWidth).replace("{height}", minEmbedHeight)); @@ -84,7 +87,7 @@ if ($("#id-popover-social-container ul")) { $("#id-popover-social-container ul").append('
            • '); $("#id-popover-social-container ul").append(''); - $("#id-popover-social-container ul").append(''); + $("#id-popover-social-container ul").append(''); } } if (typeof embedConfig.shareUrl === "undefined") { @@ -96,7 +99,7 @@ if (typeof embedConfig.fullscreenUrl === "undefined") { $("#id-btn-fullscreen").hide(); } - if (typeof data.config.canBackToFolder === "undefined" || !data.config.canBackToFolder) { + if (typeof config.canBackToFolder === "undefined" || !config.canBackToFolder) { $("#id-btn-close").hide(); } if (embedConfig.toolbarDocked === "top") { @@ -119,11 +122,19 @@ docInfo.VKey = docConfig.vkey; docInfo.Origin = docConfig.origin; if (api) { + api.asc_registerCallback("asc_onGetEditorPermissions", onEditorPermissions); + api.asc_getEditorPermissions(); api.asc_enableKeyEvents(true); api.asc_setViewerMode(true); api.asc_LoadDocument(docInfo); Common.Analytics.trackEvent("Load", "Start"); } + if (docConfig.title && !embedConfig.docTitle) { + var el = $("#id-popover-social-container ul .share-mail > a"); + if (el.length) { + el.attr("href", el.attr("href").replace(/:\sundefined&/, ": " + docConfig.title + "&")); + } + } } } function onSheetsChanged() { @@ -176,6 +187,15 @@ hidePreloader(); Common.Analytics.trackEvent("Load", "Complete"); } + function onEditorPermissions(params) { + if (params.asc_getCanBranding() && (typeof config.customization == "object") && config.customization && config.customization.logoUrlEmbedded) { + $("#header-logo").css({ + "background-image": 'url("' + config.customization.logoUrlEmbedded + '")', + "background-position": "0 center", + "background-repeat": "no-repeat" + }); + } + } function showMask() { $("#id-loadmask").modal({ backdrop: "static", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/OfficeWeb/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index a78c906c..5d8e0b30 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -167,7 +167,7 @@ this.editorConfig = data.config; }, setMode: function (permissions) { - this.permissions = permissions; ! (this.permissions.canCoAuthoring && this.permissions.isEdit) ? Common.util.Shortcuts.suspendEvents(this.hkComments) : Common.util.Shortcuts.resumeEvents(this.hkComments); + this.permissions = permissions; ! (this.permissions.canCoAuthoring && this.permissions.isEdit && this.permissions.canComments) ? Common.util.Shortcuts.suspendEvents(this.hkComments) : Common.util.Shortcuts.resumeEvents(this.hkComments); }, setApi: function (api) { this.api = api; @@ -187,22 +187,26 @@ onCopyPaste: function (item) { var me = this; if (me.api) { - var value = window.localStorage.getItem("sse-hide-copywarning"); - if (! (value && parseInt(value) == 1) && me.show_copywarning) { - (new Common.Views.CopyWarningDialog({ - handler: function (dontshow) { - (item.value == "cut") ? me.api.asc_Cut() : ((item.value == "copy") ? me.api.asc_Copy() : me.api.asc_Paste()); - if (dontshow) { - window.localStorage.setItem("sse-hide-copywarning", 1); - } - Common.NotificationCenter.trigger("edit:complete", me.documentHolder); - } - })).show(); - } else { + if (typeof window["AscDesktopEditor"] === "object") { (item.value == "cut") ? me.api.asc_Cut() : ((item.value == "copy") ? me.api.asc_Copy() : me.api.asc_Paste()); - Common.NotificationCenter.trigger("edit:complete", me.documentHolder); + } else { + var value = window.localStorage.getItem("sse-hide-copywarning"); + if (! (value && parseInt(value) == 1) && me.show_copywarning) { + (new Common.Views.CopyWarningDialog({ + handler: function (dontshow) { + (item.value == "cut") ? me.api.asc_Cut() : ((item.value == "copy") ? me.api.asc_Copy() : me.api.asc_Paste()); + if (dontshow) { + window.localStorage.setItem("sse-hide-copywarning", 1); + } + Common.NotificationCenter.trigger("edit:complete", me.documentHolder); + } + })).show(); + } else { + (item.value == "cut") ? me.api.asc_Cut() : ((item.value == "copy") ? me.api.asc_Copy() : me.api.asc_Paste()); + Common.NotificationCenter.trigger("edit:complete", me.documentHolder); + } + Common.component.Analytics.trackEvent("ToolBar", "Copy Warning"); } - Common.component.Analytics.trackEvent("ToolBar", "Copy Warning"); } }, onInsertEntire: function (item) { @@ -342,7 +346,7 @@ } }, onAddComment: function (item) { - if (this.api && this.permissions.canCoAuthoring && this.permissions.isEdit) { + if (this.api && this.permissions.canCoAuthoring && this.permissions.isEdit && this.permissions.canComments) { this.api.asc_enableKeyEvents(false); var controller = SSE.getController("Common.Controllers.Comments"), cellinfo = this.api.asc_getCellInfo(); @@ -910,8 +914,8 @@ documentHolder.pmiColumnWidth.setVisible(iscolmenu || isallmenu); documentHolder.pmiEntireHide.setVisible(iscolmenu || isrowmenu); documentHolder.pmiEntireShow.setVisible(iscolmenu || isrowmenu); - documentHolder.ssMenu.items[10].setVisible(iscellmenu && !iscelledit && this.permissions.canCoAuthoring); - documentHolder.pmiAddComment.setVisible(iscellmenu && !iscelledit && this.permissions.canCoAuthoring); + documentHolder.ssMenu.items[10].setVisible(iscellmenu && !iscelledit && this.permissions.canCoAuthoring && this.permissions.canComments); + documentHolder.pmiAddComment.setVisible(iscellmenu && !iscelledit && this.permissions.canCoAuthoring && this.permissions.canComments); documentHolder.pmiCellMenuSeparator.setVisible(iscellmenu || isrowmenu || iscolmenu || isallmenu || insfunc); documentHolder.pmiEntireHide.isrowmenu = isrowmenu; documentHolder.pmiEntireShow.isrowmenu = isrowmenu; diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/OfficeWeb/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index 40db5672..28b865e6 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -103,7 +103,7 @@ this.api.asc_registerCallback("asc_onRenameCellTextEnd", _.bind(this.onRenameText, this)); this.api.asc_registerCallback("asc_onСoAuthoringDisconnect", _.bind(this.onApiServerDisconnect, this)); Common.NotificationCenter.on("api:disconnect", _.bind(this.onApiServerDisconnect, this)); - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { this.api.asc_registerCallback("asc_onCoAuthoringChatReceiveMessage", _.bind(this.onApiChatMessage, this)); } if (!this.mode.isEditDiagram) { @@ -120,10 +120,14 @@ }, createDelayedElements: function () { if (this.mode.canCoAuthoring) { - this.leftMenu.btnComments[this.mode.isEdit ? "show" : "hide"](); - this.leftMenu.btnChat.show(); - this.leftMenu.setOptionsPanel("chat", this.getApplication().getController("Common.Controllers.Chat").getView("Common.Views.Chat")); - this.leftMenu.setOptionsPanel("comment", this.getApplication().getController("Common.Controllers.Comments").getView("Common.Views.Comments")); + this.leftMenu.btnComments[this.mode.isEdit && this.mode.canComments ? "show" : "hide"](); + if (this.mode.canComments) { + this.leftMenu.setOptionsPanel("comment", this.getApplication().getController("Common.Controllers.Comments").getView("Common.Views.Comments")); + } + this.leftMenu.btnChat[this.mode.canChat ? "show" : "hide"](); + if (this.mode.canChat) { + this.leftMenu.setOptionsPanel("chat", this.getApplication().getController("Common.Controllers.Chat").getView("Common.Views.Chat")); + } } else { this.leftMenu.btnChat.hide(); this.leftMenu.btnComments.hide(); @@ -236,7 +240,7 @@ } }, clickStatusbarUsers: function () { - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { if (this.leftMenu.btnChat.pressed) { this.leftMenu.close(); } else { @@ -523,13 +527,13 @@ } break; case "chat": - if (this.mode.canCoAuthoring) { + if (this.mode.canCoAuthoring && this.mode.canChat) { Common.UI.Menu.Manager.hideAll(); this.leftMenu.showMenu("chat"); } return false; case "comments": - if (this.mode.canCoAuthoring && this.mode.isEdit) { + if (this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) { Common.UI.Menu.Manager.hideAll(); this.leftMenu.showMenu("comments"); this.getApplication().getController("Common.Controllers.Comments").focusOnInput(); diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/controller/Main.js b/OfficeWeb/apps/spreadsheeteditor/main/app/controller/Main.js index e5712786..414697ab 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/controller/Main.js @@ -34,6 +34,11 @@ var InitApplication = -254; var ApplyEditRights = -255; var LoadingDocument = -256; + var mapCustomizationElements = { + about: "button#left-btn-about", + feedback: "button#left-btn-support", + goback: "#fm-btn-back > a, #header-back > div" + }; return { models: [], collections: ["ShapeGroups", "TableTemplates"], @@ -159,8 +164,9 @@ this.appOptions.user = this.editorConfig.user; this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.editorConfig.canBackToFolder === true; this.appOptions.nativeApp = this.editorConfig.nativeApp === true; - this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl); - this.appOptions.canOpenRecent = this.editorConfig.nativeApp !== true && this.editorConfig.recent !== undefined; + this.appOptions.isDesktopApp = this.editorConfig.targetApp == "desktop"; + this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl) && !this.appOptions.isDesktopApp; + this.appOptions.canOpenRecent = this.editorConfig.nativeApp !== true && this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp; this.appOptions.templates = this.editorConfig.templates; this.appOptions.recent = this.editorConfig.recent; this.appOptions.createUrl = this.editorConfig.createUrl; @@ -169,6 +175,7 @@ this.appOptions.canAnalytics = false; this.appOptions.sharingSettingsUrl = this.editorConfig.sharingSettingsUrl; this.appOptions.isEditDiagram = this.editorConfig.mode == "editdiagram"; + this.appOptions.customization = this.editorConfig.customization; this.headerView = this.getApplication().getController("Viewport").getView("Common.Views.Header"); this.headerView.setCanBack(this.editorConfig.canBackToFolder === true); if (this.editorConfig.lang) { @@ -191,7 +198,6 @@ docInfo.VKey = data.doc.vkey; docInfo.Origin = data.doc.origin; docInfo.CallbackUrl = this.editorConfig.callbackUrl; - docInfo.OfflineApp = this.editorConfig.nativeApp === true; this.headerView.setDocumentCaption(data.doc.title); } if (this.appOptions.isEditDiagram) { @@ -214,7 +220,7 @@ onProcessRightsChange: function (data) { if (data && data.enabled === false) { this.api.asc_coAuthoringDisconnect(); - this.getApplication().getController("LeftMenu").leftMenu.getMenu("file").panels["info"].onLostEditRights(); + this.getApplication().getController("LeftMenu").leftMenu.getMenu("file").panels["rights"].onLostEditRights(); Common.UI.warning({ title: this.notcriticalErrorTitle, msg: _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message @@ -417,7 +423,7 @@ leftmenuController.setMode(me.appOptions).createDelayedElements().setApi(me.api); leftMenuView.disableMenu("all", false); if (!me.appOptions.isEditDiagram && me.appOptions.canBranding) { - me.getApplication().getController("LeftMenu").leftMenu.getMenu("about").setLicInfo(me.editorConfig.branding); + me.getApplication().getController("LeftMenu").leftMenu.getMenu("about").setLicInfo(me.editorConfig.customization); } documentHolderController.setApi(me.api).loadConfig({ config: me.editorConfig @@ -471,15 +477,18 @@ } me.api.asc_setAutoSaveGap(value); if (me.appOptions.canAnalytics) { - Common.Gateway.on("applyeditrights", _.bind(me.onApplyEditRights, me)); + Common.component.Analytics.initialize("UA-12442749-13", "Spreadsheet Editor"); } + Common.Gateway.on("applyeditrights", _.bind(me.onApplyEditRights, me)); Common.Gateway.on("processsaveresult", _.bind(me.onProcessSaveResult, me)); Common.Gateway.on("processrightschange", _.bind(me.onProcessRightsChange, me)); Common.Gateway.on("processmouse", _.bind(me.onProcessMouse, me)); $(document).on("contextmenu", _.bind(me.onContextMenu, me)); - Common.Utils.isIE9m && tips.push(me.warnBrowserIE9); ! Common.Utils.isGecko && !me.appOptions.isEditDiagram && !me.appOptions.nativeApp && (Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, "{0}")); - if (tips.length) { - me.showTips(tips); + if ( !! window["AscDesktopEditor"]) { + Common.Utils.isIE9m && tips.push(me.warnBrowserIE9); ! Common.Utils.isGecko && !me.appOptions.isEditDiagram && !me.appOptions.nativeApp && (Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, "{0}")); + if (tips.length) { + me.showTips(tips); + } } }, onOpenDocument: function (progress) { @@ -494,10 +503,13 @@ this.permissions.download !== false && (this.permissions.download = params.asc_getCanDownload()); this.appOptions.canAutosave = this.editorConfig.canAutosave !== false && params.asc_getIsAutosaveEnable(); this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); - this.appOptions.canCoAuthoring = params.asc_getCanCoAuthoring(); - this.appOptions.canBranding = params.asc_getCanBranding() && (typeof(this.editorConfig.branding) == "object"); + this.appOptions.canCoAuthoring = true; + this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false; + this.appOptions.canComments = this.appOptions.canLicense && !((typeof(this.editorConfig.customization) == "object") && this.editorConfig.customization.comments === false); + this.appOptions.canChat = this.appOptions.canLicense && !((typeof(this.editorConfig.customization) == "object") && this.editorConfig.customization.chat === false); + this.appOptions.canBranding = params.asc_getCanBranding() && (typeof(this.editorConfig.customization) == "object"); if (this.appOptions.canBranding) { - this.headerView.setBranding(this.editorConfig.branding); + this.headerView.setBranding(this.editorConfig.customization); } } this.appOptions.canEdit = this.permissions.edit === true; @@ -521,7 +533,7 @@ statusbarView = app.getController("Statusbar").getView("Statusbar"); if (this.headerView) { this.headerView.setHeaderCaption(this.appOptions.isEdit ? "Spreadsheet Editor" : "Spreadsheet Viewer"); - this.headerView.setVisible(!this.appOptions.nativeApp && !value && !this.appOptions.isEditDiagram); + this.headerView.setVisible(!this.appOptions.nativeApp && !value && !this.appOptions.isDesktopApp && !this.appOptions.isEditDiagram); } viewport && viewport.setMode(this.appOptions, true); statusbarView && statusbarView.setMode(this.appOptions); @@ -870,6 +882,10 @@ } }, hidePreloader: function () { + if ( !! this.appOptions.customization && !this.appOptions.customization.done) { + this.appOptions.customization.done = true; + Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); + } this.stackLongActions.pop({ id: InitApplication, type: c_oAscAsyncActionType.BlockInteraction diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/OfficeWeb/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 89050464..19610c27 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -287,20 +287,25 @@ onCopyPaste: function (copy, e) { var me = this; if (me.api) { - var value = window.localStorage.getItem("sse-hide-copywarning"); - if (! (value && parseInt(value) == 1) && this._state.show_copywarning) { - (new Common.Views.CopyWarningDialog({ - handler: function (dontshow) { - copy ? me.api.asc_Copy() : me.api.asc_Paste(); - if (dontshow) { - window.localStorage.setItem("sse-hide-copywarning", 1); - } - Common.NotificationCenter.trigger("edit:complete", me.toolbar); - } - })).show(); - } else { + if (typeof window["AscDesktopEditor"] === "object") { copy ? me.api.asc_Copy() : me.api.asc_Paste(); Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } else { + var value = window.localStorage.getItem("sse-hide-copywarning"); + if (! (value && parseInt(value) == 1) && this._state.show_copywarning) { + (new Common.Views.CopyWarningDialog({ + handler: function (dontshow) { + copy ? me.api.asc_Copy() : me.api.asc_Paste(); + if (dontshow) { + window.localStorage.setItem("sse-hide-copywarning", 1); + } + Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } + })).show(); + } else { + copy ? me.api.asc_Copy() : me.api.asc_Paste(); + Common.NotificationCenter.trigger("edit:complete", me.toolbar); + } } Common.component.Analytics.trackEvent("ToolBar", "Copy Warning"); } else { diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/template/FileMenu.template b/OfficeWeb/apps/spreadsheeteditor/main/app/template/FileMenu.template index 7076563b..967d44b6 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/template/FileMenu.template +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/template/FileMenu.template @@ -11,6 +11,7 @@
            • +
            • @@ -23,6 +24,7 @@
              +
              \ No newline at end of file diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/view/FileMenu.js b/OfficeWeb/apps/spreadsheeteditor/main/app/view/FileMenu.js index bd0b307c..027b8b0e 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -102,6 +102,11 @@ action: "info", caption: this.btnInfoCaption, canFocused: false + }), new Common.UI.MenuItem({ + el: $("#fm-btn-rights", this.el), + action: "rights", + caption: this.btnRightsCaption, + canFocused: false }), new Common.UI.MenuItem({ el: $("#fm-btn-settings", this.el), action: "opts", @@ -131,6 +136,9 @@ "info": (new SSE.Views.FileMenuPanels.DocumentInfo({ menu: me })).render(), + "rights": (new SSE.Views.FileMenuPanels.DocumentRights({ + menu: me + })).render(), "help": (new SSE.Views.FileMenuPanels.Help({ menu: me })).render() @@ -161,18 +169,18 @@ this.api.asc_enableKeyEvents(true); }, applyMode: function () { - this.items[0][this.mode.canBack ? "show" : "hide"](); - this.items[0].$el.find("+.devider")[this.mode.canBack ? "show" : "hide"](); this.items[5][this.mode.canOpenRecent ? "show" : "hide"](); this.items[6][this.mode.canCreateNew ? "show" : "hide"](); this.items[6].$el.find("+.devider")[this.mode.canCreateNew ? "show" : "hide"](); this.items[3][this.mode.canDownload ? "show" : "hide"](); this.items[1][this.mode.isEdit ? "show" : "hide"](); this.items[2][!this.mode.isEdit && this.mode.canEdit ? "show" : "hide"](); - this.items[8][this.mode.isEdit ? "show" : "hide"](); - this.items[8].$el.find("+.devider")[this.mode.isEdit ? "show" : "hide"](); + this.items[8][(this.document && this.document.info && (this.document.info.sharingSettings && this.document.info.sharingSettings.length > 0 || this.mode.sharingSettingsUrl && this.mode.sharingSettingsUrl.length)) ? "show" : "hide"](); + this.items[9][this.mode.isEdit ? "show" : "hide"](); + this.items[9].$el.find("+.devider")[this.mode.isEdit ? "show" : "hide"](); this.panels["opts"].setMode(this.mode); this.panels["info"].setMode(this.mode).updateInfo(this.document); + this.panels["rights"].setMode(this.mode).updateInfo(this.document); if (this.mode.canCreateNew) { if (this.mode.templates && this.mode.templates.length) { $("a", this.items[6].$el).text(this.btnCreateNewCaption + "..."); @@ -230,6 +238,7 @@ btnSaveCaption: "Save", btnDownloadCaption: "Download as...", btnInfoCaption: "Document Info...", + btnRightsCaption: "Access Rights...", btnCreateNewCaption: "Create New", btnRecentFilesCaption: "Open Recent...", btnPrintCaption: "Print", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/OfficeWeb/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 3643865e..0df177cf 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -117,7 +117,7 @@ panel: this.printSettings, iconCls: "mnu-print" }]), - itemTemplate: _.template(['
              ', '
              <%= name %>
              ', "
              "].join("")) + itemTemplate: _.template(['
              ', '
              ', "
              <%= name %>", "
              "].join("")) }); this.viewSettingsPicker.on("item:select", _.bind(function (dataview, itemview, record) { var panel = record.get("panel"); @@ -594,8 +594,7 @@ initialize: function (options) { Common.UI.BaseView.prototype.initialize.call(this, arguments); this.rendered = false; - this.template = _.template(['', "", '", '', "", '', '", '', "", '', '", '', "", '', '", '', "", '', '', '", '', "", '', '", "", "
              -
              "].join("")); - this.templateRights = _.template(["", "<% _.each(users, function(item) { %>", "", '', "", "", "<% }); %>", "
              <%= Common.Utils.String.htmlEncode(item.user) %><%= Common.Utils.String.htmlEncode(item.permissions) %>
              "].join("")); + this.template = _.template(['', "", '", '', "", '', '", '', "", '', '", '', "", '', '", '', "", '', "
              -
              "].join("")); this.menu = options.menu; }, render: function () { @@ -604,11 +603,6 @@ this.lblPlacement = $("#id-info-placement"); this.lblDate = $("#id-info-date"); this.lblAuthor = $("#id-info-author"); - this.cntRights = $("#id-info-rights"); - this.btnEditRights = new Common.UI.Button({ - el: "#id-info-btn-edit" - }); - this.btnEditRights.on("click", _.bind(this.changeAccessRights, this)); this.rendered = true; this.updateInfo(this.doc); if (_.isUndefined(this.scroller)) { @@ -645,13 +639,6 @@ this.lblPlacement.text(doc.info.folder); } this._ShowHideInfoItem("placement", doc.info.folder !== undefined && doc.info.folder !== null); - if (doc.info.sharingSettings) { - this.cntRights.html(this.templateRights({ - users: doc.info.sharingSettings - })); - } - this._ShowHideInfoItem("rights", doc.info.sharingSettings !== undefined && doc.info.sharingSettings !== null && this._readonlyRights !== true); - this._ShowHideInfoItem("edit-rights", !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && this._readonlyRights !== true); } else { this._ShowHideDocInfo(false); } @@ -663,6 +650,71 @@ this._ShowHideInfoItem("date", visible); this._ShowHideInfoItem("placement", visible); this._ShowHideInfoItem("author", visible); + }, + setMode: function (mode) { + return this; + }, + txtTitle: "Document Title", + txtAuthor: "Author", + txtPlacement: "Placement", + txtDate: "Creation Date" + }, + SSE.Views.FileMenuPanels.DocumentInfo || {})); + SSE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ + el: "#panel-rights", + menu: undefined, + initialize: function (options) { + Common.UI.BaseView.prototype.initialize.call(this, arguments); + this.rendered = false; + this.template = _.template(['', '', '", '', "", '', '", "", "
              "].join("")); + this.templateRights = _.template(["", "<% _.each(users, function(item) { %>", "", '', "", "", "<% }); %>", "
              <%= Common.Utils.String.htmlEncode(item.user) %><%= Common.Utils.String.htmlEncode(item.permissions) %>
              "].join("")); + this.menu = options.menu; + }, + render: function () { + $(this.el).html(this.template()); + this.cntRights = $("#id-info-rights"); + this.btnEditRights = new Common.UI.Button({ + el: "#id-info-btn-edit" + }); + this.btnEditRights.on("click", _.bind(this.changeAccessRights, this)); + this.rendered = true; + this.updateInfo(this.doc); + if (_.isUndefined(this.scroller)) { + this.scroller = new Common.UI.Scroller({ + el: $(this.el), + suppressScrollX: true + }); + } + return this; + }, + show: function () { + Common.UI.BaseView.prototype.show.call(this, arguments); + }, + hide: function () { + Common.UI.BaseView.prototype.hide.call(this, arguments); + }, + updateInfo: function (doc) { + this.doc = doc; + if (!this.rendered) { + return; + } + doc = doc || {}; + if (doc.info) { + if (doc.info.sharingSettings) { + this.cntRights.html(this.templateRights({ + users: doc.info.sharingSettings + })); + } + this._ShowHideInfoItem("rights", doc.info.sharingSettings !== undefined && doc.info.sharingSettings !== null && doc.info.sharingSettings.length > 0); + this._ShowHideInfoItem("edit-rights", !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && this._readonlyRights !== true); + } else { + this._ShowHideDocInfo(false); + } + }, + _ShowHideInfoItem: function (cls, visible) { + $("tr." + cls, this.el)[visible ? "show" : "hide"](); + }, + _ShowHideDocInfo: function (visible) { this._ShowHideInfoItem("rights", visible); this._ShowHideInfoItem("edit-rights", visible); }, @@ -671,34 +723,35 @@ return this; }, changeAccessRights: function (btn, event, opts) { + if (this._docAccessDlg) { + return; + } var me = this; - var win = new Common.Views.DocumentAccessDialog({ + me._docAccessDlg = new Common.Views.DocumentAccessDialog({ settingsurl: this.sharingSettingsUrl }); - win.on("accessrights", function (obj, rights) { + me._docAccessDlg.on("accessrights", function (obj, rights) { me.doc.info.sharingSettings = rights; + me._ShowHideInfoItem("rights", me.doc.info.sharingSettings !== undefined && me.doc.info.sharingSettings !== null && me.doc.info.sharingSettings.length > 0); me.cntRights.html(me.templateRights({ users: me.doc.info.sharingSettings })); + }).on("close", function (obj) { + me._docAccessDlg = undefined; }); - win.show(); + me._docAccessDlg.show(); }, onLostEditRights: function () { this._readonlyRights = true; if (!this.rendered) { return; } - this._ShowHideInfoItem("rights", false); this._ShowHideInfoItem("edit-rights", false); }, - txtTitle: "Document Title", - txtAuthor: "Author", - txtPlacement: "Placement", - txtDate: "Creation Date", txtRights: "Persons who have rights", txtBtnAccessRights: "Change access rights" }, - SSE.Views.FileMenuPanels.DocumentInfo || {})); + SSE.Views.FileMenuPanels.DocumentRights || {})); SSE.Views.FileMenuPanels.Help = Common.UI.BaseView.extend({ el: "#panel-help", menu: undefined, diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/view/LeftMenu.js b/OfficeWeb/apps/spreadsheeteditor/main/app/view/LeftMenu.js index 8aefee6f..04e13fa9 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/view/LeftMenu.js +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/view/LeftMenu.js @@ -147,16 +147,20 @@ }, onCoauthOptions: function (e) { if (this.mode.canCoAuthoring) { - this.panelComments[this.btnComments.pressed ? "show" : "hide"](); - this.fireEvent((this.btnComments.pressed) ? "comments:show": "comments:hide", this); - if (this.btnChat.pressed) { - if (this.btnChat.$el.hasClass("notify")) { - this.btnChat.$el.removeClass("notify"); + if (this.mode.canComments) { + this.panelComments[this.btnComments.pressed ? "show" : "hide"](); + this.fireEvent((this.btnComments.pressed) ? "comments:show": "comments:hide", this); + } + if (this.mode.canChat) { + if (this.btnChat.pressed) { + if (this.btnChat.$el.hasClass("notify")) { + this.btnChat.$el.removeClass("notify"); + } + this.panelChat.show(); + this.panelChat.focus(); + } else { + this.panelChat["hide"](); } - this.panelChat.show(); - this.panelChat.focus(); - } else { - this.panelChat["hide"](); } } }, @@ -179,13 +183,17 @@ this.btnAbout.toggle(false); this.$el.width(SCALE_MIN); if (this.mode.canCoAuthoring) { - this.panelComments["hide"](); - this.panelChat["hide"](); - if (this.btnComments.pressed) { - this.fireEvent("comments:hide", this); + if (this.mode.canComments) { + this.panelComments["hide"](); + if (this.btnComments.pressed) { + this.fireEvent("comments:hide", this); + } + this.btnComments.toggle(false, true); + } + if (this.mode.canChat) { + this.panelChat["hide"](); + this.btnChat.toggle(false, true); } - this.btnComments.toggle(false, true); - this.btnChat.toggle(false, true); } }, isOpened: function () { diff --git a/OfficeWeb/apps/spreadsheeteditor/main/app/view/Toolbar.js b/OfficeWeb/apps/spreadsheeteditor/main/app/view/Toolbar.js index 51830a69..b14275a9 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/OfficeWeb/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -909,7 +909,7 @@ iconCls: "mnu-icon-item mnu-border-width", template: _.template('<%= caption %>'), menu: (function () { - var itemTemplate = _.template('
              '); + var itemTemplate = _.template('
              '); me.mnuBorderWidth = new Common.UI.Menu({ style: "min-width: 100px;", menuAlign: "tl-tr", @@ -1884,13 +1884,12 @@ checkable: true, checked: me.isCompactView, value: "compact" - }), { + }), me.mnuitemHideTitleBar = new Common.UI.MenuItem({ caption: me.textHideTBar, checkable: true, checked: !!options.title, value: "title" - }, - { + }), { caption: me.textHideFBar, checkable: true, checked: !!options.formula, @@ -2206,6 +2205,10 @@ nativeBtnGroup.hide(); } } + if (mode.isDesktopApp) { + $(".toolbar-group-native").hide(); + this.mnuitemHideTitleBar.hide(); + } } }, onApiSendThemeColorSchemes: function (schemas) { diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/de.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/de.json index 79fc4e49..b6ce474f 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/de.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/de.json @@ -412,6 +412,7 @@ "SSE.Views.FileMenu.btnPrintCaption": "Drucken", "SSE.Views.FileMenu.btnRecentFilesCaption": "Zuletzt benutzte öffnen...", "SSE.Views.FileMenu.btnReturnCaption": "Zurück zur Tabelle", + "SSE.Views.FileMenu.btnRightsCaption": "Access Rights...", "SSE.Views.FileMenu.btnSaveCaption": "Speichern", "SSE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen...", "SSE.Views.FileMenu.btnToEditCaption": "Tabelle bearbeiten", @@ -420,10 +421,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Erstellen Sie eine neue Kalkulationstabelle, die Sie nach ihrer Erstellung bei der Bearbeitung formatieren können. Oder wählen Sie eine der Vorlagen, um eine Kalkulationstabelle eines bestimmten Typs (für einen bestimmten Zweck) zu erstellen, wo einige Stile bereits angewandt sind.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Neue Kalkulationstabelle", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autor", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Zugriffsrechte ändern", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Zugriffsrechte ändern", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Erstellungsdatum", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Speicherort", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personen mit Berechtigungen", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Personen mit Berechtigungen", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titel der Kalkulationstabelle", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Übernehmen", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "AutoSpeichern einschalten", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/en.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/en.json index bc97985d..14230adc 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/en.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/en.json @@ -409,6 +409,7 @@ "SSE.Views.FileMenu.btnDownloadCaption": "Download as...", "SSE.Views.FileMenu.btnHelpCaption": "Help...", "SSE.Views.FileMenu.btnInfoCaption": "Spreadsheet Info...", + "SSE.Views.FileMenu.btnRightsCaption": "Access Rights...", "SSE.Views.FileMenu.btnPrintCaption": "Print", "SSE.Views.FileMenu.btnRecentFilesCaption": "Open Recent...", "SSE.Views.FileMenu.btnReturnCaption": "Back to Spreadsheet", @@ -420,10 +421,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Create a new blank spreadsheet which you will be able to style and format after it is created during the editing. Or choose one of the templates to start a spreadsheet of a certain type or purpose where some styles have already been pre-applied.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "New Spreadsheet", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Author", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Change access rights", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Location", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persons who have rights", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Spreadsheet Title", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Apply", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Turn on autosave", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/es.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/es.json index 36af8f31..9927af8a 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/es.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/es.json @@ -412,6 +412,7 @@ "SSE.Views.FileMenu.btnPrintCaption": "Imprimir", "SSE.Views.FileMenu.btnRecentFilesCaption": "Abrir reciente...", "SSE.Views.FileMenu.btnReturnCaption": "Volver a hoja de cálculo", + "SSE.Views.FileMenu.btnRightsCaption": "Derechos de acceso...", "SSE.Views.FileMenu.btnSaveCaption": "Guardar", "SSE.Views.FileMenu.btnSettingsCaption": "Ajustes avanzados...", "SSE.Views.FileMenu.btnToEditCaption": "Editar hoja de cálculo", @@ -420,10 +421,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Cree nueva hoja de cálculo en blanco para poder ajustar sus estilos y el formato. O seleccione una de las plantillas para iniciar hoja de cálculo de cierto tipo o motivo donde algunos estilos se han aplicado antes.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nueva hoja de cálculo", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autor", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Cambiar derechos de acceso", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Cambiar derechos de acceso", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Fecha de creación", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Ubicación", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personas que tienen derechos", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Personas que tienen derechos", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Título de hoja de cálculo", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Aplicar", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Activar autoguardado", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/fr.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/fr.json index e6e2d6e8..294cb95d 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/fr.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/fr.json @@ -420,10 +420,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Créez un classeur que vous serez en mesure de styliser et de mettre en forme une fois qu'il est créé. Ou choisissez l'un des modèles pour commencer un classeur d'un certain type où certains styles sont déjà pré-appliqués.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nouveau classeur", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Auteur", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Changer les droits d'accès", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Changer les droits d'accès", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Date de création", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Emplacement", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personnes qui ont des droits", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Personnes qui ont des droits", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titre du classeur", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Appliquer", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Activer l'enregistrement automatique", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/it.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/it.json index 5b848de1..0b9ee91a 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/it.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/it.json @@ -420,10 +420,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Crea un nuovo foglio elettronico vuoto che potrai formattare durante la modifica. O scegli uno dei modelli per creare un foglio elettronico di un certo tipo a quale sono già applicati certi stili.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nuovo foglio elettronico", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autore", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Cambia diritti di accesso", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Cambia diritti di accesso", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Data di creazione", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Percorso", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persone con diritti", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Persone con diritti", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titolo foglio elettronico", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Applica", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Attiva salvataggio automatico", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/lv.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/lv.json index c44691aa..f9915f57 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/lv.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/lv.json @@ -418,10 +418,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Izveidot jaunu tukšu izklājlapu, kurā jūs varēsiet piemērot stilu un formātu pēc izveides rediģēšanas laikā. Vai izvēlēties kādu no veidnēm, lai sāktu dokumentu konkrēta veida vai stilā, kur daži stili jau iepriekš piemēroti.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Jauna Izklājlapa", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autors", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Change access rights", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Izveides datums", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Vieta", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personas kuriem ir tiesības", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Personas kuriem ir tiesības", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Izklājlapas Nosaukums", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Piemērot", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Turn on autosave", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/pt.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/pt.json index 8b23a290..45bef4ef 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/pt.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/pt.json @@ -420,10 +420,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Crie uma nova planilha em branco que você será capaz de nomear e formatar após ela ser criada durante a edição. Ou escolha um dos modelos para começar uma planilha de um tipo ou propósito determinado onde alguns estilos já foram pré-aplicados.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nova planilha", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autor", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Alterar direitos de acesso", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Alterar direitos de acesso", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Data de criação", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Localização", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Pessoas que têm direitos", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Pessoas que têm direitos", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Título da planilha", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Aplicar", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Ativar salvamento automático", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/ru.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/ru.json index 3b3bd12f..5c9ffdd5 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/ru.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/ru.json @@ -412,6 +412,7 @@ "SSE.Views.FileMenu.btnPrintCaption": "Печать", "SSE.Views.FileMenu.btnRecentFilesCaption": "Открыть последние...", "SSE.Views.FileMenu.btnReturnCaption": "Вернуться к таблице", + "SSE.Views.FileMenu.btnRightsCaption": "Права доступа...", "SSE.Views.FileMenu.btnSaveCaption": "Сохранить", "SSE.Views.FileMenu.btnSettingsCaption": "Дополнительные параметры...", "SSE.Views.FileMenu.btnToEditCaption": "Редактировать таблицу", @@ -420,10 +421,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Создайте новую пустую электронную таблицу, к которой Вы сможете применить стили и отформатировать при редактировании после того, как она создана. Или выберите один из шаблонов, чтобы создать электронную таблицу определенного типа или предназначения, где уже предварительно применены некоторые стили.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Новая электронная таблица", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Автор", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Изменить права доступа", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Изменить права доступа", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Дата создания", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Размещение", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Люди, имеющие права", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Люди, имеющие права", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Название электронной таблицы", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Применить", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Включить автосохранение", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/sl.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/sl.json index 0350e61e..b60a7913 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/sl.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/sl.json @@ -420,10 +420,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Ustvari novo prazno razpredelnico, ki jo boste lahko med urejanjem stilizirali in formatirali, ko je ustvarjena. Ali pa izberite eno izmed predlog za ustvarjanje razpredelnice določene vrste ali namena, kjer so bili nekateri slogi določeni vnaprej.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Nova razpredelnica", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Avtor", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Spremeni pravice dostopa", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Spremeni pravice dostopa", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Datum nastanka", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Lokacija", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Osebe, ki imajo pravice", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Osebe, ki imajo pravice", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Naslov razpredelnice", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Uporabi", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Vključi samodejno shranjevanje", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/locale/tr.json b/OfficeWeb/apps/spreadsheeteditor/main/locale/tr.json index faa857b2..60aac206 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/locale/tr.json +++ b/OfficeWeb/apps/spreadsheeteditor/main/locale/tr.json @@ -420,10 +420,10 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Oluşturulduktan sonra düzenleme sırasında stil ve format verebileceğiniz yeni boş bir spreadsheet oluşturun. Yada şablonlardan birini seçerek belli tipte yada amaç için spreadsheet başlatın.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "Yeni Spreadsheet", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Yayıncı", - "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Erişim haklarını değiştir", + "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Erişim haklarını değiştir", "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Oluşturulma tarihi", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Lokasyon", - "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Hakkı olan kişiler", + "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Hakkı olan kişiler", "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Spreadsheet Başlığı", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Uygula", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Otomatik kaydetmeyi aç", diff --git a/OfficeWeb/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/OfficeWeb/apps/spreadsheeteditor/main/resources/less/leftmenu.less index 1c617168..f579a4aa 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/resources/less/leftmenu.less +++ b/OfficeWeb/apps/spreadsheeteditor/main/resources/less/leftmenu.less @@ -201,14 +201,15 @@ font-size: 12px; .settings-item-wrap { - padding: 7px 2px 7px 20px; + padding: 4px 2px 4px 20px; .settings-icon { width: 20px; height: 20px; - position: absolute; background-repeat: no-repeat; .background-ximage('@{app-image-path}/toolbar-menu.png', '@{app-image-path}/toolbar-menu@2x.png', 60px); + margin: 0 5px 3px 0; + vertical-align: middle; &.mnu-print { background-position: 0 -220px; @@ -218,11 +219,6 @@ background-position: 0 -1141px; } } - - .caption { - vertical-align: middle; - padding-left: 25px; - } } &:hover, @@ -465,7 +461,8 @@ } } - #panel-info { + #panel-info, + #panel-rights { padding: 0 30px; table { tr { diff --git a/OfficeWeb/apps/spreadsheeteditor/main/resources/less/toolbar.less b/OfficeWeb/apps/spreadsheeteditor/main/resources/less/toolbar.less index 70f6d2b6..8e7c79d6 100644 --- a/OfficeWeb/apps/spreadsheeteditor/main/resources/less/toolbar.less +++ b/OfficeWeb/apps/spreadsheeteditor/main/resources/less/toolbar.less @@ -238,3 +238,13 @@ #id-toolbar-btn-num-format button .caption { display: inline-block; } + +#id-toolbar-mnu-item-border-width { + .border-size-item { + background: ~"url('@{app-image-path}/toolbar/BorderSize.png') repeat-x scroll 0 0"; + width: 80px; + height: 20px; + margin-top: -3px; + margin-bottom: -2px; + } +} diff --git a/OfficeWeb/apps/spreadsheeteditor/mobile/app/controller/Main.js b/OfficeWeb/apps/spreadsheeteditor/mobile/app/controller/Main.js index d45660f4..9f022c15 100644 --- a/OfficeWeb/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/OfficeWeb/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -44,6 +44,7 @@ return; } this.initControl(); + Common.component.Analytics.initialize("UA-12442749-13", "Spreadsheet Mobile"); var app = this.getApplication(); this.api = new Asc.spreadsheet_api("id-sdkeditor", "", SSE.controller.ApiEvents, {}, {}); diff --git a/OfficeWeb/apps/spreadsheeteditor/mobile/index.html b/OfficeWeb/apps/spreadsheeteditor/mobile/index.html index 6e056eb5..fe665aaf 100644 --- a/OfficeWeb/apps/spreadsheeteditor/mobile/index.html +++ b/OfficeWeb/apps/spreadsheeteditor/mobile/index.html @@ -18,166 +18,150 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 20002; + z-index: 100; } - .loadmask-body { - position:relative; - top:44%; + .loader-page { + top: 50%; + left: 50%; + width: 50px; + height: 180px; + z-index: 100; + position: absolute; + margin-top: -100px; } - .loadmask-logo { - display:inline-block; - min-width:220px; - min-height:62px; - vertical-align:top; - background-image:url('./resources/img/loading-logo.gif'); - background-image: -webkit-image-set(url('./resources/img/loading-logo.gif') 1x, url('./resources/img/loading-logo@2x.gif') 2x); - background-repeat:no-repeat; + .romb { + width: 40px; + height: 40px; + -webkit-transform: rotate(135deg) skew(20deg, 20deg); + -moz-transform: rotate(135deg) skew(20deg, 20deg); + -ms-transform: rotate(135deg) skew(20deg, 20deg); + -o-transform: rotate(135deg) skew(20deg, 20deg); + position: absolute; + background: red; + border-radius: 6px; + -webkit-animation: movedown 3s infinite ease; + -moz-animation: movedown 3s infinite ease; + -ms-animation: movedown 3s infinite ease; + -o-animation: movedown 3s infinite ease; + animation: movedown 3s infinite ease; + } + + #blue { + z-index: 3; + background: #55bce6; + -webkit-animation-name: blue; + -moz-animation-name: blue; + -ms-animation-name: blue; + -o-animation-name: blue; + animation-name: blue; + } + + #red { + z-index:1; + background: #de7a59; + -webkit-animation-name: red; + -moz-animation-name: red; + -ms-animation-name: red; + -o-animation-name: red; + animation-name: red; + } + + #green { + z-index: 2; + background: #a1cb5c; + -webkit-animation-name: green; + -moz-animation-name: green; + -ms-animation-name: green; + -o-animation-name: green; + animation-name: green; + } + + @-webkit-keyframes red { + 0% { top:120px; background: #de7a59; } + 10% { top:120px; background: #F2CBBF; } + 14% { background: #f4f4f4; top:120px; } + 15% { background: #f4f4f4; top:0;} + 20% { background: #E6E4E4; } + 30% { background: #D2D2D2; } + 40% { top:120px; } + 100% { top:120px; background: #de7a59; } + } + + @keyframes red { + 0% { top:120px; background: #de7a59; } + 10% { top:120px; background: #F2CBBF; } + 14% { background: #f4f4f4; top:120px; } + 15% { background: #f4f4f4; top:0; } + 20% { background: #E6E4E4; } + 30% { background: #D2D2D2; } + 40% { top:120px; } + 100% { top:120px; background: #de7a59; } + } + + @-webkit-keyframes green { + 0% { top:110px; background: #a1cb5c; opacity:1; } + 10% { top:110px; background: #CBE0AC; opacity:1; } + 14% { background: #f4f4f4; top:110px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #EFEFEF; top:0; opacity:1; } + 30% { background:#E6E4E4; } + 70% { top:110px; } + 100% { top:110px; background: #a1cb5c; } + } + + @keyframes green { + 0% { top:110px; background: #a1cb5c; opacity:1; } + 10% { top:110px; background: #CBE0AC; opacity:1; } + 14% { background: #f4f4f4; top:110px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #EFEFEF; top:0; opacity:1; } + 30% { background:#E6E4E4; } + 70% { top:110px; } + 100% { top:110px; background: #a1cb5c; } + } + + @-webkit-keyframes blue { + 0% { top:100px; background: #55bce6; opacity:1; } + 10% { top:100px; background: #BFE8F8; opacity:1; } + 14% { background: #f4f4f4; top:100px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #f4f4f4; top:0; opacity:0; } + 45% { background: #EFEFEF; top:0; opacity:0,2; } + 100% { top:100px; background: #55bce6; } + } + + @keyframes blue { + 0% { top:100px; background: #55bce6; opacity:1; } + 10% { top:100px; background: #BFE8F8; opacity:1; } + 14% { background: #f4f4f4; top:100px; opacity:1; } + 15% { background: #f4f4f4; top:0; opacity:1; } + 20% { background: #f4f4f4; top:0; opacity:0; } + 25% { background: #f4f4f4; top:0; opacity:0; } + 45% { background: #EFEFEF; top:0; opacity:0,2; } + 100% { top:100px; background: #55bce6; } } - + - + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/OfficeWeb/build/Gruntfile.js b/OfficeWeb/build/Gruntfile.js index 5e54881b..830657bf 100644 --- a/OfficeWeb/build/Gruntfile.js +++ b/OfficeWeb/build/Gruntfile.js @@ -35,7 +35,14 @@ packageFile, revisionHash = "@@REVISION", revisionTimeStamp = "@@REVISIONDATE"; - grunt.loadNpmTasks("grunt-contrib"); + grunt.loadNpmTasks("grunt-contrib-clean"); + grunt.loadNpmTasks("grunt-contrib-copy"); + grunt.loadNpmTasks("grunt-contrib-uglify"); + grunt.loadNpmTasks("grunt-contrib-less"); + grunt.loadNpmTasks("grunt-contrib-requirejs"); + grunt.loadNpmTasks("grunt-contrib-concat"); + grunt.loadNpmTasks("grunt-contrib-imagemin"); + grunt.loadNpmTasks("grunt-contrib-cssmin"); grunt.loadNpmTasks("grunt-text-replace"); grunt.loadNpmTasks("grunt-mocha"); function doRegisterTask(name, callbackConfig) { @@ -133,6 +140,8 @@ doRegisterTask("underscore"); doRegisterTask("zeroclipboard"); doRegisterTask("bootstrap"); + doRegisterTask("jszip"); + doRegisterTask("jsziputils"); doRegisterTask("requirejs", function (defaultConfig, packageFile) { return { uglify: { @@ -157,10 +166,11 @@ files: packageFile["main"]["clean"] }, less: { - options: { - cleancss: true - }, production: { + options: { + compress: true, + plugins: [new(require("less-plugin-clean-css"))()], + }, files: { "<%= pkg.main.less.files.dest %>": packageFile["main"]["less"]["files"]["src"] } @@ -209,6 +219,46 @@ } }); }); + grunt.registerTask("lessPostFix", function () { + if (!grunt.option("image-url")) { + grunt.config("replace.urlToUri", { + src: ["<%= pkg.main.less.files.dest %>"], + overwrite: true, + replacements: [{ + from: /url\(([^\)\'\"]+)/g, + to: function (matchedWord, index, fullText, regexMatches) { + return "data-uri('" + regexMatches + "'"; + } + }, + { + from: /filter\:\s?alpha\(opacity\s?=\s?[0-9]{1,3}\)\;/g, + to : "" + }] + }); + grunt.config("less.uriPostfix", { + options: { + compress: true, + ieCompat: false + }, + files: { + "<%= pkg.main.less.files.dest %>": "<%= pkg.main.less.files.dest %>" + } + }); + grunt.config("clean.files", "<%= pkg.main.clean %>/resources/img"); + grunt.task.run("replace:urlToUri", "less:uriPostfix", "clean"); + } + grunt.config("replace.writeVersion", { + src: ["<%= pkg.api.copy.script.dest %>" + "/documents/api.js"], + overwrite: true, + replacements: [{ + from: /(\#{2}BN\#)/, + to: function (matchedWord, index, fullText, regexMatches) { + return "." + (process.env["BUILD_NUMBER"] || packageFile.build); + } + }] + }); + grunt.task.run("replace:writeVersion"); + }); grunt.registerTask("mobile-app-init", function () { grunt.initConfig({ pkg: grunt.file.readJSON(defaultConfig), @@ -301,8 +351,10 @@ grunt.registerTask("deploy-underscore", ["underscore-init", "clean", "copy"]); grunt.registerTask("deploy-zeroclipboard", ["zeroclipboard-init", "clean", "copy"]); grunt.registerTask("deploy-bootstrap", ["bootstrap-init", "clean", "copy"]); + grunt.registerTask("deploy-jszip", ["jszip-init", "clean", "copy"]); + grunt.registerTask("deploy-jsziputils", ["jsziputils-init", "clean", "copy"]); grunt.registerTask("deploy-requirejs", ["requirejs-init", "clean", "uglify"]); - grunt.registerTask("deploy-app-main", ["main-app-init", "clean", "less", "replace:fixLessUrl", "requirejs", "concat", "imagemin", "copy"]); + grunt.registerTask("deploy-app-main", ["main-app-init", "clean", "less", "replace:fixLessUrl", "requirejs", "concat", "imagemin", "copy", "lessPostFix"]); grunt.registerTask("deploy-app-mobile", ["mobile-app-init", "clean", "uglify", "cssmin:styles", "copy"]); grunt.registerTask("deploy-app-embed", ["embed-app-init", "clean", "uglify", "less", "copy"]); doRegisterInitializeAppTask("documenteditor", "DocumentEditor", "documenteditor.json"); @@ -322,5 +374,6 @@ grunt.registerTask("deploy-documenteditor", ["init-build-documenteditor", "init-config", "deploy-app"]); grunt.registerTask("deploy-spreadsheeteditor", ["init-build-spreadsheeteditor", "init-config", "deploy-app"]); grunt.registerTask("deploy-presentationeditor", ["init-build-presentationeditor", "init-config", "deploy-app"]); + grunt.option("image-url", true); grunt.registerTask("default", ["deploy-documenteditor", "deploy-spreadsheeteditor", "deploy-presentationeditor"]); }; \ No newline at end of file diff --git a/OfficeWeb/build/documenteditor.json b/OfficeWeb/build/documenteditor.json index e4875f02..04ea263f 100644 --- a/OfficeWeb/build/documenteditor.json +++ b/OfficeWeb/build/documenteditor.json @@ -1,16 +1,9 @@ { "name": "documenteditor", "version": "3.0.0", - "build": 960, + "build": 959, "homepage": "http://www.onlyoffice.com", "private": true, - "dependencies": { - "grunt": "~0.4.2", - "grunt-contrib": "~0.9.0", - "grunt-exec": "~0.4.5", - "grunt-replace": "~0.7.3", - "grunt-html-minify": "~0.3.1" - }, "sdk": { "clean": [ "../deploy/sdk/Common", @@ -29,12 +22,7 @@ ], "dest": "../deploy/sdk/Common/" }, - { - "expand": true, - "cwd": "../sdk/Fonts/", - "src": "**/**", - "dest": "../deploy/sdk/Fonts/" - }, + { "src": "../sdk/Word/sdk-all.js", "dest": "../deploy/sdk/Word/sdk-all.js" @@ -80,6 +68,8 @@ "jmousewheel": "../vendor/perfect-scrollbar/src/jquery.mousewheel", "xregexp": "empty:", "sockjs": "empty:", + "jszip": "empty:", + "jszip-utils": "empty:", "coapisettings": "empty:", "allfonts": "empty:", "sdk": "empty:", @@ -132,7 +122,9 @@ "coapisettings", "allfonts", "xregexp", - "sockjs" + "sockjs", + "jszip", + "jszip-utils" ] }, "gateway": { @@ -448,6 +440,28 @@ } } }, + "jszip": { + "clean": [ + "../deploy/vendor/jszip" + ], + "copy": { + "script": { + "src": "../vendor/jszip/jszip.min.js", + "dest": "../deploy/vendor/jszip/jszip.min.js" + } + } + }, + "jsziputils": { + "clean": [ + "../deploy/vendor/jszip-utils" + ], + "copy": { + "script": { + "src": "../vendor/jszip-utils/jszip-utils.min.js", + "dest": "../deploy/vendor/jszip-utils/jszip-utils.min.js" + } + } + }, "underscore": { "clean": [ "../deploy/vendor/underscore" @@ -522,6 +536,8 @@ "deploy-underscore", "deploy-zeroclipboard", "deploy-bootstrap", + "deploy-jszip", + "deploy-jsziputils", "deploy-app-main", "deploy-app-mobile", "deploy-app-embed" diff --git a/OfficeWeb/build/package.json b/OfficeWeb/build/package.json index d6d9db65..2c4db792 100644 --- a/OfficeWeb/build/package.json +++ b/OfficeWeb/build/package.json @@ -1,19 +1,27 @@ { - "name": "common", - "version": "0.0.0", - "homepage": "http://www.onlyoffice.com", - "private": true, - "dependencies": { - "lodash": "2.4.1", - "grunt": "0.4.2", - "grunt-contrib": "0.9.0", - "grunt-exec": "0.4.5", - "grunt-replace": "0.7.3", - "grunt-html-minify": "0.3.1", - "grunt-text-replace": "0.3.11", - "mocha": "1.18.2", - "chai": "1.9.1", - "grunt-mocha": "0.4.11", - "grunt-jscoverage": "0.1.1" - } -} \ No newline at end of file + "name": "common", + "version": "0.0.0", + "homepage": "http://www.onlyoffice.com", + "private": true, + "dependencies": { + "lodash": "2.4.1", + "grunt": "0.4.5", + "grunt-exec": "0.4.5", + "grunt-replace": "0.7.3", + "grunt-html-minify": "0.3.1", + "grunt-text-replace": "0.3.11", + "mocha": "1.18.2", + "chai": "1.9.1", + "grunt-mocha": "0.4.11", + "grunt-jscoverage": "0.1.1", + "grunt-contrib-less": "^1.0.0", + "grunt-contrib-requirejs": "^0.4.4", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-copy": "^0.8.0", + "grunt-contrib-uglify": "^0.8.1", + "grunt-contrib-concat": "^0.5.1", + "grunt-contrib-imagemin": "^0.9.4", + "grunt-contrib-cssmin": "^0.12.2", + "less-plugin-clean-css": "1.5.0" + } +} diff --git a/OfficeWeb/build/presentationeditor.json b/OfficeWeb/build/presentationeditor.json index 26453b51..899ac010 100644 --- a/OfficeWeb/build/presentationeditor.json +++ b/OfficeWeb/build/presentationeditor.json @@ -1,7 +1,7 @@ { "name": "presentationeditor", "version": "3.0.0", - "build": 760, + "build": 759, "homepage": "http://www.onlyoffice.com", "sdk": { "clean": [ @@ -22,12 +22,7 @@ ], "dest": "../deploy/sdk/Common/" }, - { - "expand": true, - "cwd": "../sdk/Fonts/", - "src": "**/**", - "dest": "../deploy/sdk/Fonts/" - }, + { "expand": true, "cwd": "../sdk/PowerPoint/themes/", diff --git a/OfficeWeb/build/spreadsheeteditor.json b/OfficeWeb/build/spreadsheeteditor.json index 04975389..2591de0c 100644 --- a/OfficeWeb/build/spreadsheeteditor.json +++ b/OfficeWeb/build/spreadsheeteditor.json @@ -1,16 +1,9 @@ { "name": "spreadsheeteditor", "version": "3.0.0", - "build": 858, + "build": 857, "homepage": "http://www.onlyoffice.com", "private": true, - "dependencies": { - "grunt": "~0.4.2", - "grunt-contrib": "~0.9.0", - "grunt-exec": "~0.4.5", - "grunt-replace": "~0.7.3", - "grunt-html-minify": "~0.3.1" - }, "sdk": { "clean": [ "../deploy/sdk/Common", @@ -42,12 +35,7 @@ "src": "*.cur", "dest": "../deploy/sdk/Word/Images/" }, - { - "expand": true, - "cwd": "../sdk/Fonts/", - "src": "**/**", - "dest": "../deploy/sdk/Fonts/" - }, + { "src": "../sdk/Excel/sdk-all.js", "dest": "../deploy/sdk/Excel/sdk-all.js" diff --git a/OfficeWeb/sdk/Common/Drawings/Format/Format.js b/OfficeWeb/sdk/Common/Drawings/Format/Format.js index cd326262..6482bb3c 100644 --- a/OfficeWeb/sdk/Common/Drawings/Format/Format.js +++ b/OfficeWeb/sdk/Common/Drawings/Format/Format.js @@ -73,16 +73,21 @@ function scRGB_to_sRGB(value) { } function checkRasterImageId(rasterImageId) { var api_sheet = window["Asc"]["editor"]; - var sFindString; + var sFindString, sFindString2; if (api_sheet) { sFindString = api_sheet.wbModel.sUrlPath + "media/"; } else { sFindString = window.editor.DocumentUrl + "media/"; + sFindString2 = documentOrigin + sFindString; } if (0 === rasterImageId.indexOf(sFindString)) { return rasterImageId.substring(sFindString.length); } else { - return rasterImageId; + if (0 === rasterImageId.indexOf(sFindString2)) { + return rasterImageId.substring(sFindString2.length); + } else { + return rasterImageId; + } } } var g_oThemeFontsName = {}; diff --git a/OfficeWeb/sdk/Common/FontsFreeType/font_map.js b/OfficeWeb/sdk/Common/FontsFreeType/font_map.js index 1f243847..62e07799 100644 --- a/OfficeWeb/sdk/Common/FontsFreeType/font_map.js +++ b/OfficeWeb/sdk/Common/FontsFreeType/font_map.js @@ -698,11 +698,16 @@ CFontSelect.prototype = { if (bIsDictionary !== false) { _len = fs.GetLong(); this.m_wsFontPath = fs.GetString(_len >> 1); - var _found1 = this.m_wsFontPath.lastIndexOf("/"); - var _found2 = this.m_wsFontPath.lastIndexOf("\\"); - var _found = Math.max(_found1, _found2); - if (0 <= _found) { - this.m_wsFontPath = this.m_wsFontPath.substring(_found + 1); + if (undefined === window["AscDesktopEditor"]) { + var _found1 = this.m_wsFontPath.lastIndexOf("/"); + var _found2 = this.m_wsFontPath.lastIndexOf("\\"); + var _found = Math.max(_found1, _found2); + if (0 <= _found) { + this.m_wsFontPath = this.m_wsFontPath.substring(_found + 1); + } + } else { + this.m_wsFontPath = this.m_wsFontPath.replace(/\\\\/g, "\\"); + this.m_wsFontPath = this.m_wsFontPath.replace(/\\/g, "/"); } } this.m_lIndex = fs.GetLong(); diff --git a/OfficeWeb/sdk/Common/Private/Locks.js b/OfficeWeb/sdk/Common/Locks.js similarity index 100% rename from OfficeWeb/sdk/Common/Private/Locks.js rename to OfficeWeb/sdk/Common/Locks.js diff --git a/OfficeWeb/sdk/Common/Native/jquery_native.js b/OfficeWeb/sdk/Common/Native/jquery_native.js index a4e8fd31..ed890e50 100644 --- a/OfficeWeb/sdk/Common/Native/jquery_native.js +++ b/OfficeWeb/sdk/Common/Native/jquery_native.js @@ -1,6180 +1,8998 @@ - /* - * jQuery JavaScript Library v1.7.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Nov 21 21:11:03 2011 -0500 +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 */ -(function (window, undefined) { - var document = window.document, - navigator = window.navigator, - location = window.location; - var jQuery = (function () { - var jQuery = function (selector, context) { - return new jQuery.fn.init(selector, context, rootjQuery); - }, - _jQuery = window.jQuery, - _$ = window.$, - rootjQuery, - quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - rnotwhite = /\S/, - trimLeft = /^\s+/, - trimRight = /\s+$/, - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - rdashAlpha = /-([a-z]|[0-9])/ig, - rmsPrefix = /^-ms-/, - fcamelCase = function (all, letter) { - return (letter + "").toUpperCase(); - }, - userAgent = navigator.userAgent, - browserMatch, - readyList, - DOMContentLoaded, - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - class2type = {}; - jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function (selector, context, rootjQuery) { - if (!selector) { - return this; - } - if (selector.nodeType) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - if (jQuery.isFunction(selector)) { - return rootjQuery.ready(selector); - } - return jQuery.makeArray(_null_object, this); - }, - selector: "", - jquery: "1.7.1", - length: 0, - size: function () { - return this.length; - }, - toArray: function () { - return slice.call(this, 0); - }, - get: function (num) { - return num == null ? this.toArray() : (num < 0 ? this[this.length + num] : this[num]); - }, - pushStack: function (elems, name, selector) { - var ret = this.constructor(); - if (jQuery.isArray(elems)) { - push.apply(ret, elems); - } else { - jQuery.merge(ret, elems); - } - ret.prevObject = this; - ret.context = this.context; - if (name === "find") { - ret.selector = this.selector + (this.selector ? " " : "") + selector; - } else { - if (name) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - } - return ret; - }, - each: function (callback, args) { - return jQuery.each(this, callback, args); - }, - ready: function (fn) { - jQuery.bindReady(); - readyList.add(fn); - return this; - }, - eq: function (i) { - i = +i; - return i === -1 ? this.slice(i) : this.slice(i, i + 1); - }, - first: function () { - return this.eq(0); - }, - last: function () { - return this.eq(-1); - }, - slice: function () { - return this.pushStack(slice.apply(this, arguments), "slice", slice.call(arguments).join(",")); - }, - map: function (callback) { - return this.pushStack(jQuery.map(this, function (elem, i) { - return callback.call(elem, i, elem); - })); - }, - end: function () { - return this.prevObject || this.constructor(null); - }, - push: push, - sort: [].sort, - splice: [].splice - }; - jQuery.fn.init.prototype = jQuery.fn; - jQuery.extend = jQuery.fn.extend = function () { - var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - if (typeof target === "boolean") { - deep = target; - target = arguments[1] || {}; - i = 2; - } - if (typeof target !== "object" && !jQuery.isFunction(target)) { - target = {}; - } - if (length === i) { - target = this; - --i; - } - for (; i < length; i++) { - if ((options = arguments[i]) != null) { - for (name in options) { - src = target[name]; - copy = options[name]; - if (target === copy) { - continue; - } - if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) { - if (copyIsArray) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - target[name] = jQuery.extend(deep, clone, copy); - } else { - if (copy !== undefined) { - target[name] = copy; - } - } - } - } - } - return target; - }; - jQuery.extend({ - noConflict: function (deep) { - if (window.$ === jQuery) { - window.$ = _$; - } - if (deep && window.jQuery === jQuery) { - window.jQuery = _jQuery; - } - return jQuery; - }, - isReady: false, - readyWait: 1, - holdReady: function (hold) { - if (hold) { - jQuery.readyWait++; - } else { - jQuery.ready(true); - } - }, - ready: function (wait) { - if ((wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady)) { - if (!document.body) { - return setTimeout(jQuery.ready, 1); - } - jQuery.isReady = true; - if (wait !== true && --jQuery.readyWait > 0) { - return; - } - readyList.fireWith(document, [jQuery]); - if (jQuery.fn.trigger) { - jQuery(document).trigger("ready").off("ready"); - } - } - }, - bindReady: function () { - if (readyList) { - return; - } - readyList = jQuery.Callbacks("once memory"); - if (document.readyState === "complete") { - return setTimeout(jQuery.ready, 1); - } - if (document.addEventListener) { - document.addEventListener("DOMContentLoaded", DOMContentLoaded, false); - window.addEventListener("load", jQuery.ready, false); - } else { - if (document.attachEvent) { - document.attachEvent("onreadystatechange", DOMContentLoaded); - window.attachEvent("onload", jQuery.ready); - var toplevel = false; - try { - toplevel = window.frameElement == null; - } catch(e) {} - if (document.documentElement.doScroll && toplevel) { - doScrollCheck(); - } - } - } - }, - isFunction: function (obj) { - return jQuery.type(obj) === "function"; - }, - isArray: Array.isArray || - function (obj) { - return jQuery.type(obj) === "array"; - }, - isWindow: function (obj) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - isNumeric: function (obj) { - return !isNaN(parseFloat(obj)) && isFinite(obj); - }, - type: function (obj) { - return obj == null ? String(obj) : class2type[toString.call(obj)] || "object"; - }, - isPlainObject: function (obj) { - if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) { - return false; - } - try { - if (obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { - return false; - } - } catch(e) { - return false; - } - var key; - for (key in obj) {} - return key === undefined || hasOwn.call(obj, key); - }, - isEmptyObject: function (obj) { - for (var name in obj) { - return false; - } - return true; - }, - error: function (msg) { - throw new Error(msg); - }, - parseJSON: function (data) { - if (typeof data !== "string" || !data) { - return null; - } - data = jQuery.trim(data); - if (window.JSON && window.JSON.parse) { - return window.JSON.parse(data); - } - if (rvalidchars.test(data.replace(rvalidescape, "@").replace(rvalidtokens, "]").replace(rvalidbraces, ""))) { - return (new Function("return " + data))(); - } - jQuery.error("Invalid JSON: " + data); - }, - parseXML: function (data) { - var xml, tmp; - try { - if (window.DOMParser) { - tmp = new DOMParser(); - xml = tmp.parseFromString(data, "text/xml"); - } else { - xml = new ActiveXObject("Microsoft.XMLDOM"); - xml.async = "false"; - xml.loadXML(data); - } - } catch(e) { - xml = undefined; - } - if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) { - jQuery.error("Invalid XML: " + data); - } - return xml; - }, - noop: function () {}, - globalEval: function (data) { - if (data && rnotwhite.test(data)) { - (window.execScript || - function (data) { - window["eval"].call(window, data); - })(data); - } - }, - camelCase: function (string) { - return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); - }, - nodeName: function (elem, name) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - each: function (object, callback, args) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction(object); - if (args) { - if (isObj) { - for (name in object) { - if (callback.apply(object[name], args) === false) { - break; - } - } - } else { - for (; i < length;) { - if (callback.apply(object[i++], args) === false) { - break; - } - } - } - } else { - if (isObj) { - for (name in object) { - if (callback.call(object[name], name, object[name]) === false) { - break; - } - } - } else { - for (; i < length;) { - if (callback.call(object[i], i, object[i++]) === false) { - break; - } - } - } - } - return object; - }, - trim: trim ? - function (text) { - return text == null ? "" : trim.call(text); - } : function (text) { - return text == null ? "" : text.toString().replace(trimLeft, "").replace(trimRight, ""); - }, - makeArray: function (array, results) { - var ret = results || []; - if (array != null) { - var type = jQuery.type(array); - if (array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow(array)) { - push.call(ret, array); - } else { - jQuery.merge(ret, array); - } - } - return ret; - }, - inArray: function (elem, array, i) { - var len; - if (array) { - if (indexOf) { - return indexOf.call(array, elem, i); - } - len = array.length; - i = i ? i < 0 ? Math.max(0, len + i) : i : 0; - for (; i < len; i++) { - if (i in array && array[i] === elem) { - return i; - } - } - } - return -1; - }, - merge: function (first, second) { - var i = first.length, - j = 0; - if (typeof second.length === "number") { - for (var l = second.length; j < l; j++) { - first[i++] = second[j]; - } - } else { - while (second[j] !== undefined) { - first[i++] = second[j++]; - } - } - first.length = i; - return first; - }, - grep: function (elems, callback, inv) { - var ret = [], - retVal; - inv = !!inv; - for (var i = 0, length = elems.length; i < length; i++) { - retVal = !!callback(elems[i], i); - if (inv !== retVal) { - ret.push(elems[i]); - } - } - return ret; - }, - map: function (elems, callback, arg) { - var value, key, ret = [], - i = 0, - length = elems.length, - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ((length > 0 && elems[0] && elems[length - 1]) || length === 0 || jQuery.isArray(elems)); - if (isArray) { - for (; i < length; i++) { - value = callback(elems[i], i, arg); - if (value != null) { - ret[ret.length] = value; - } - } - } else { - for (key in elems) { - value = callback(elems[key], key, arg); - if (value != null) { - ret[ret.length] = value; - } - } - } - return ret.concat.apply([], ret); - }, - guid: 1, - proxy: function (fn, context) { - if (typeof context === "string") { - var tmp = fn[context]; - context = fn; - fn = tmp; - } - if (!jQuery.isFunction(fn)) { - return undefined; - } - var args = slice.call(arguments, 2), - proxy = function () { - return fn.apply(context, args.concat(slice.call(arguments))); - }; - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - return proxy; - }, - access: function (elems, key, value, exec, fn, pass) { - var length = elems.length; - if (typeof key === "object") { - for (var k in key) { - jQuery.access(elems, k, key[k], exec, fn, value); - } - return elems; - } - if (value !== undefined) { - exec = !pass && exec && jQuery.isFunction(value); - for (var i = 0; i < length; i++) { - fn(elems[i], key, exec ? value.call(elems[i], i, fn(elems[i], key)) : value, pass); - } - return elems; - } - return length ? fn(elems[0], key) : undefined; - }, - now: function () { - return (new Date()).getTime(); - }, - uaMatch: function (ua) { - ua = ua.toLowerCase(); - var match = rwebkit.exec(ua) || ropera.exec(ua) || rmsie.exec(ua) || ua.indexOf("compatible") < 0 && rmozilla.exec(ua) || []; - return { - browser: match[1] || "", - version: match[2] || "0" - }; - }, - sub: function () { - function jQuerySub(selector, context) { - return new jQuerySub.fn.init(selector, context); - } - jQuery.extend(true, jQuerySub, this); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init(selector, context) { - if (context && context instanceof jQuery && !(context instanceof jQuerySub)) { - context = jQuerySub(context); - } - return jQuery.fn.init.call(this, selector, context, rootjQuerySub); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; - }, - browser: {} - }); - jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (i, name) { - class2type["[object " + name + "]"] = name.toLowerCase(); - }); - browserMatch = jQuery.uaMatch(userAgent); - if (browserMatch.browser) { - jQuery.browser[browserMatch.browser] = true; - jQuery.browser.version = browserMatch.version; - } - if (jQuery.browser.webkit) { - jQuery.browser.safari = true; - } - if (rnotwhite.test("\xA0")) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; - } - rootjQuery = jQuery(document); - if (document.addEventListener) { - DOMContentLoaded = function () { - document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false); - jQuery.ready(); - }; - } else { - if (document.attachEvent) { - DOMContentLoaded = function () { - if (document.readyState === "complete") { - document.detachEvent("onreadystatechange", DOMContentLoaded); - jQuery.ready(); - } - }; - } - } - function doScrollCheck() { - if (jQuery.isReady) { - return; - } - try { - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout(doScrollCheck, 1); - return; - } - jQuery.ready(); - } - return jQuery; - })(); - var flagsCache = {}; - function createFlags(flags) { - var object = flagsCache[flags] = {}, - i, - length; - flags = flags.split(/\s+/); - for (i = 0, length = flags.length; i < length; i++) { - object[flags[i]] = true; - } - return object; - } - jQuery.Callbacks = function (flags) { - flags = flags ? (flagsCache[flags] || createFlags(flags)) : {}; - var list = [], - stack = [], - memory, - firing, - firingStart, - firingLength, - firingIndex, - add = function (args) { - var i, length, elem, type, actual; - for (i = 0, length = args.length; i < length; i++) { - elem = args[i]; - type = jQuery.type(elem); - if (type === "array") { - add(elem); - } else { - if (type === "function") { - if (!flags.unique || !self.has(elem)) { - list.push(elem); - } - } - } - } - }, - fire = function (context, args) { - args = args || []; - memory = !flags.memory || [context, args]; - firing = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - for (; list && firingIndex < firingLength; firingIndex++) { - if (list[firingIndex].apply(context, args) === false && flags.stopOnFalse) { - memory = true; - break; - } - } - firing = false; - if (list) { - if (!flags.once) { - if (stack && stack.length) { - memory = stack.shift(); - self.fireWith(memory[0], memory[1]); - } - } else { - if (memory === true) { - self.disable(); - } else { - list = []; - } - } - } - }, - self = { - add: function () { - if (list) { - var length = list.length; - add(arguments); - if (firing) { - firingLength = list.length; - } else { - if (memory && memory !== true) { - firingStart = length; - fire(memory[0], memory[1]); - } - } - } - return this; - }, - remove: function () { - if (list) { - var args = arguments, - argIndex = 0, - argLength = args.length; - for (; argIndex < argLength; argIndex++) { - for (var i = 0; i < list.length; i++) { - if (args[argIndex] === list[i]) { - if (firing) { - if (i <= firingLength) { - firingLength--; - if (i <= firingIndex) { - firingIndex--; - } - } - } - list.splice(i--, 1); - if (flags.unique) { - break; - } - } - } - } - } - return this; - }, - has: function (fn) { - if (list) { - var i = 0, - length = list.length; - for (; i < length; i++) { - if (fn === list[i]) { - return true; - } - } - } - return false; - }, - empty: function () { - list = []; - return this; - }, - disable: function () { - list = stack = memory = undefined; - return this; - }, - disabled: function () { - return !list; - }, - lock: function () { - stack = undefined; - if (!memory || memory === true) { - self.disable(); - } - return this; - }, - locked: function () { - return !stack; - }, - fireWith: function (context, args) { - if (stack) { - if (firing) { - if (!flags.once) { - stack.push([context, args]); - } - } else { - if (! (flags.once && memory)) { - fire(context, args); - } - } - } - return this; - }, - fire: function () { - self.fireWith(this, arguments); - return this; - }, - fired: function () { - return !! memory; - } - }; - return self; - }; - var sliceDeferred = [].slice; - jQuery.extend({ - Deferred: function (func) { - var doneList = jQuery.Callbacks("once memory"), - failList = jQuery.Callbacks("once memory"), - progressList = jQuery.Callbacks("memory"), - state = "pending", - lists = { - resolve: doneList, - reject: failList, - notify: progressList - }, - promise = { - done: doneList.add, - fail: failList.add, - progress: progressList.add, - state: function () { - return state; - }, - isResolved: doneList.fired, - isRejected: failList.fired, - then: function (doneCallbacks, failCallbacks, progressCallbacks) { - deferred.done(doneCallbacks).fail(failCallbacks).progress(progressCallbacks); - return this; - }, - always: function () { - deferred.done.apply(deferred, arguments).fail.apply(deferred, arguments); - return this; - }, - pipe: function (fnDone, fnFail, fnProgress) { - return jQuery.Deferred(function (newDefer) { - jQuery.each({ - done: [fnDone, "resolve"], - fail: [fnFail, "reject"], - progress: [fnProgress, "notify"] - }, - function (handler, data) { - var fn = data[0], - action = data[1], - returned; - if (jQuery.isFunction(fn)) { - deferred[handler](function () { - returned = fn.apply(this, arguments); - if (returned && jQuery.isFunction(returned.promise)) { - returned.promise().then(newDefer.resolve, newDefer.reject, newDefer.notify); - } else { - newDefer[action + "With"](this === deferred ? newDefer : this, [returned]); - } - }); - } else { - deferred[handler](newDefer[action]); - } - }); - }).promise(); - }, - promise: function (obj) { - if (obj == null) { - obj = promise; - } else { - for (var key in promise) { - obj[key] = promise[key]; - } - } - return obj; - } - }, - deferred = promise.promise({}), - key; - for (key in lists) { - deferred[key] = lists[key].fire; - deferred[key + "With"] = lists[key].fireWith; - } - deferred.done(function () { - state = "resolved"; - }, - failList.disable, progressList.lock).fail(function () { - state = "rejected"; - }, - doneList.disable, progressList.lock); - if (func) { - func.call(deferred, deferred); - } - return deferred; - }, - when: function (firstParam) { - var args = sliceDeferred.call(arguments, 0), - i = 0, - length = args.length, - pValues = new Array(length), - count = length, - pCount = length, - deferred = length <= 1 && firstParam && jQuery.isFunction(firstParam.promise) ? firstParam : jQuery.Deferred(), - promise = deferred.promise(); - function resolveFunc(i) { - return function (value) { - args[i] = arguments.length > 1 ? sliceDeferred.call(arguments, 0) : value; - if (! (--count)) { - deferred.resolveWith(deferred, args); - } - }; - } - function progressFunc(i) { - return function (value) { - pValues[i] = arguments.length > 1 ? sliceDeferred.call(arguments, 0) : value; - deferred.notifyWith(promise, pValues); - }; - } - if (length > 1) { - for (; i < length; i++) { - if (args[i] && args[i].promise && jQuery.isFunction(args[i].promise)) { - args[i].promise().then(resolveFunc(i), deferred.reject, progressFunc(i)); - } else { - --count; - } - } - if (!count) { - deferred.resolveWith(deferred, args); - } - } else { - if (deferred !== firstParam) { - deferred.resolveWith(deferred, length ? [firstParam] : []); - } - } - return promise; - } - }); - jQuery.support = (function () { - var support, all, a, select, opt, input, marginDiv, fragment, tds, events, eventName, i, isSupported, div = document.createElement("div"), - documentElement = document.documentElement; - div.setAttribute("className", "t"); - div.innerHTML = "
              a"; - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[0]; - if (!all || !all.length || !a) { - return {}; - } - select = document.createElement("select"); - opt = select.appendChild(document.createElement("option")); - input = div.getElementsByTagName("input")[0]; - support = { - leadingWhitespace: (div.firstChild.nodeType === 3), - tbody: !div.getElementsByTagName("tbody").length, - htmlSerialize: !!div.getElementsByTagName("link").length, - style: /top/.test(a.getAttribute("style")), - hrefNormalized: (a.getAttribute("href") === "/a"), - opacity: /^0.55/.test(a.style.opacity), - cssFloat: !!a.style.cssFloat, - checkOn: (input.value === "on"), - optSelected: opt.selected, - getSetAttribute: div.className !== "t", - enctype: !!document.createElement("form").enctype, - html5Clone: document.createElement("nav").cloneNode(true).outerHTML !== "<:nav>", - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true - }; - input.checked = true; - support.noCloneChecked = input.cloneNode(true).checked; - select.disabled = true; - support.optDisabled = !opt.disabled; - try { - delete div.test; - } catch(e) { - support.deleteExpando = false; - } - if (!div.addEventListener && div.attachEvent && div.fireEvent) { - div.attachEvent("onclick", function () { - support.noCloneEvent = false; - }); - div.cloneNode(true).fireEvent("onclick"); - } - input = document.createElement("input"); - input.value = "t"; - input.setAttribute("type", "radio"); - support.radioValue = input.value === "t"; - input.setAttribute("checked", "checked"); - div.appendChild(input); - fragment = document.createDocumentFragment(); - fragment.appendChild(div.lastChild); - support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; - support.appendChecked = input.checked; - fragment.removeChild(input); - fragment.appendChild(div); - div.innerHTML = ""; - if (window.getComputedStyle) { - marginDiv = document.createElement("div"); - marginDiv.style.width = "0"; - marginDiv.style.marginRight = "0"; - div.style.width = "2px"; - div.appendChild(marginDiv); - support.reliableMarginRight = (parseInt((window.getComputedStyle(marginDiv, null) || { - marginRight: 0 - }).marginRight, 10) || 0) === 0; - } - if (div.attachEvent) { - for (i in { - submit: 1, - change: 1, - focusin: 1 - }) { - eventName = "on" + i; - isSupported = (eventName in div); - if (!isSupported) { - div.setAttribute(eventName, "return;"); - isSupported = (typeof div[eventName] === "function"); - } - support[i + "Bubbles"] = isSupported; - } - } - fragment.removeChild(div); - fragment = select = opt = marginDiv = div = input = null; - jQuery(function () { - var container, outer, inner, table, td, offsetSupport, conMarginTop, ptlm, vb, style, html, body = document.getElementsByTagName("body")[0]; - if (!body) { - return; - } - conMarginTop = 1; - ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;"; - vb = "visibility:hidden;border:0;"; - style = "style='" + ptlm + "border:5px solid #000;padding:0;'"; - html = "
              " + "" + "
              "; - container = document.createElement("div"); - container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; - body.insertBefore(container, body.firstChild); - div = document.createElement("div"); - container.appendChild(div); - div.innerHTML = "
              t
              "; - tds = div.getElementsByTagName("td"); - isSupported = (tds[0].offsetHeight === 0); - tds[0].style.display = ""; - tds[1].style.display = "none"; - support.reliableHiddenOffsets = isSupported && (tds[0].offsetHeight === 0); - div.innerHTML = ""; - div.style.width = div.style.paddingLeft = "1px"; - jQuery.boxModel = support.boxModel = div.offsetWidth === 2; - if (typeof div.style.zoom !== "undefined") { - div.style.display = "inline"; - div.style.zoom = 1; - support.inlineBlockNeedsLayout = (div.offsetWidth === 2); - div.style.display = ""; - div.innerHTML = "
              "; - support.shrinkWrapBlocks = (div.offsetWidth !== 2); - } - div.style.cssText = ptlm + vb; - div.innerHTML = html; - outer = div.firstChild; - inner = outer.firstChild; - td = outer.nextSibling.firstChild.firstChild; - offsetSupport = { - doesNotAddBorder: (inner.offsetTop !== 5), - doesAddBorderForTableAndCells: (td.offsetTop === 5) - }; - inner.style.position = "fixed"; - inner.style.top = "20px"; - offsetSupport.fixedPosition = (inner.offsetTop === 20 || inner.offsetTop === 15); - inner.style.position = inner.style.top = ""; - outer.style.overflow = "hidden"; - outer.style.position = "relative"; - offsetSupport.subtractsBorderForOverflowNotVisible = (inner.offsetTop === -5); - offsetSupport.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== conMarginTop); - body.removeChild(container); - div = container = null; - jQuery.extend(support, offsetSupport); - }); - return support; - })(); - var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - jQuery.extend({ - cache: {}, - uuid: 0, - expando: "jQuery" + (jQuery.fn.jquery + Math.random()).replace(/\D/g, ""), - noData: { - "embed": true, - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - hasData: function (elem) { - elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando]; - return !! elem && !isEmptyDataObject(elem); - }, - data: function (elem, name, data, pvt) { - if (!jQuery.acceptData(elem)) { - return; - } - var privateCache, thisCache, ret, internalKey = jQuery.expando, - getByName = typeof name === "string", - isNode = elem.nodeType, - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[internalKey] : elem[internalKey] && internalKey, - isEvents = name === "events"; - if ((!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined) { - return; - } - if (!id) { - if (isNode) { - elem[internalKey] = id = ++jQuery.uuid; - } else { - id = internalKey; - } - } - if (!cache[id]) { - cache[id] = {}; - if (!isNode) { - cache[id].toJSON = jQuery.noop; - } - } - if (typeof name === "object" || typeof name === "function") { - if (pvt) { - cache[id] = jQuery.extend(cache[id], name); - } else { - cache[id].data = jQuery.extend(cache[id].data, name); - } - } - privateCache = thisCache = cache[id]; - if (!pvt) { - if (!thisCache.data) { - thisCache.data = {}; - } - thisCache = thisCache.data; - } - if (data !== undefined) { - thisCache[jQuery.camelCase(name)] = data; - } - if (isEvents && !thisCache[name]) { - return privateCache.events; - } - if (getByName) { - ret = thisCache[name]; - if (ret == null) { - ret = thisCache[jQuery.camelCase(name)]; - } - } else { - ret = thisCache; - } - return ret; - }, - removeData: function (elem, name, pvt) { - if (!jQuery.acceptData(elem)) { - return; - } - var thisCache, i, l, internalKey = jQuery.expando, - isNode = elem.nodeType, - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[internalKey] : internalKey; - if (!cache[id]) { - return; - } - if (name) { - thisCache = pvt ? cache[id] : cache[id].data; - if (thisCache) { - if (!jQuery.isArray(name)) { - if (name in thisCache) { - name = [name]; - } else { - name = jQuery.camelCase(name); - if (name in thisCache) { - name = [name]; - } else { - name = name.split(" "); - } - } - } - for (i = 0, l = name.length; i < l; i++) { - delete thisCache[name[i]]; - } - if (! (pvt ? isEmptyDataObject : jQuery.isEmptyObject)(thisCache)) { - return; - } - } - } - if (!pvt) { - delete cache[id].data; - if (!isEmptyDataObject(cache[id])) { - return; - } - } - if (jQuery.support.deleteExpando || !cache.setInterval) { - delete cache[id]; - } else { - cache[id] = null; - } - if (isNode) { - if (jQuery.support.deleteExpando) { - delete elem[internalKey]; - } else { - if (elem.removeAttribute) { - elem.removeAttribute(internalKey); - } else { - elem[internalKey] = null; - } - } - } - }, - _data: function (elem, name, data) { - return jQuery.data(elem, name, data, true); - }, - acceptData: function (elem) { - if (elem.nodeName) { - var match = jQuery.noData[elem.nodeName.toLowerCase()]; - if (match) { - return ! (match === true || elem.getAttribute("classid") !== match); - } - } - return true; - } - }); - jQuery.fn.extend({ - data: function (key, value) { - var parts, attr, name, data = null; - if (typeof key === "undefined") { - if (this.length) { - data = jQuery.data(this[0]); - if (this[0].nodeType === 1 && !jQuery._data(this[0], "parsedAttrs")) { - attr = this[0].attributes; - for (var i = 0, l = attr.length; i < l; i++) { - name = attr[i].name; - if (name.indexOf("data-") === 0) { - name = jQuery.camelCase(name.substring(5)); - dataAttr(this[0], name, data[name]); - } - } - jQuery._data(this[0], "parsedAttrs", true); - } - } - return data; - } else { - if (typeof key === "object") { - return this.each(function () { - jQuery.data(this, key); - }); - } - } - parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - if (value === undefined) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - if (data === undefined && this.length) { - data = jQuery.data(this[0], key); - data = dataAttr(this[0], key, data); - } - return data === undefined && parts[1] ? this.data(parts[0]) : data; - } else { - return this.each(function () { - var self = jQuery(this), - args = [parts[0], value]; - self.triggerHandler("setData" + parts[1] + "!", args); - jQuery.data(this, key, value); - self.triggerHandler("changeData" + parts[1] + "!", args); - }); - } - }, - removeData: function (key) { - return this.each(function () { - jQuery.removeData(this, key); - }); - } - }); - function dataAttr(elem, key, data) { - if (data === undefined && elem.nodeType === 1) { - var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase(); - data = elem.getAttribute(name); - if (typeof data === "string") { - try { - data = data === "true" ? true : data === "false" ? false : data === "null" ? null : jQuery.isNumeric(data) ? parseFloat(data) : rbrace.test(data) ? jQuery.parseJSON(data) : data; - } catch(e) {} - jQuery.data(elem, key, data); - } else { - data = undefined; - } - } - return data; - } - function isEmptyDataObject(obj) { - for (var name in obj) { - if (name === "data" && jQuery.isEmptyObject(obj[name])) { - continue; - } - if (name !== "toJSON") { - return false; - } - } - return true; - } - function handleQueueMarkDefer(elem, type, src) { - var deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - defer = jQuery._data(elem, deferDataKey); - if (defer && (src === "queue" || !jQuery._data(elem, queueDataKey)) && (src === "mark" || !jQuery._data(elem, markDataKey))) { - setTimeout(function () { - if (!jQuery._data(elem, queueDataKey) && !jQuery._data(elem, markDataKey)) { - jQuery.removeData(elem, deferDataKey, true); - defer.fire(); - } - }, - 0); - } - } - jQuery.extend({ - _mark: function (elem, type) { - if (elem) { - type = (type || "fx") + "mark"; - jQuery._data(elem, type, (jQuery._data(elem, type) || 0) + 1); - } - }, - _unmark: function (force, elem, type) { - if (force !== true) { - type = elem; - elem = force; - force = false; - } - if (elem) { - type = type || "fx"; - var key = type + "mark", - count = force ? 0 : ((jQuery._data(elem, key) || 1) - 1); - if (count) { - jQuery._data(elem, key, count); - } else { - jQuery.removeData(elem, key, true); - handleQueueMarkDefer(elem, type, "mark"); - } - } - }, - queue: function (elem, type, data) { - var q; - if (elem) { - type = (type || "fx") + "queue"; - q = jQuery._data(elem, type); - if (data) { - if (!q || jQuery.isArray(data)) { - q = jQuery._data(elem, type, jQuery.makeArray(data)); - } else { - q.push(data); - } - } - return q || []; - } - }, - dequeue: function (elem, type) { - type = type || "fx"; - var queue = jQuery.queue(elem, type), - fn = queue.shift(), - hooks = {}; - if (fn === "inprogress") { - fn = queue.shift(); - } - if (fn) { - if (type === "fx") { - queue.unshift("inprogress"); - } - jQuery._data(elem, type + ".run", hooks); - fn.call(elem, function () { - jQuery.dequeue(elem, type); - }, - hooks); - } - if (!queue.length) { - jQuery.removeData(elem, type + "queue " + type + ".run", true); - handleQueueMarkDefer(elem, type, "queue"); - } - } - }); - jQuery.fn.extend({ - queue: function (type, data) { - if (typeof type !== "string") { - data = type; - type = "fx"; - } - if (data === undefined) { - return jQuery.queue(this[0], type); - } - return this.each(function () { - var queue = jQuery.queue(this, type, data); - if (type === "fx" && queue[0] !== "inprogress") { - jQuery.dequeue(this, type); - } - }); - }, - dequeue: function (type) { - return this.each(function () { - jQuery.dequeue(this, type); - }); - }, - delay: function (time, type) { - time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; - type = type || "fx"; - return this.queue(type, function (next, hooks) { - var timeout = setTimeout(next, time); - hooks.stop = function () { - clearTimeout(timeout); - }; - }); - }, - clearQueue: function (type) { - return this.queue(type || "fx", []); - }, - promise: function (type, object) { - if (typeof type !== "string") { - object = type; - type = undefined; - } - type = type || "fx"; - var defer = jQuery.Deferred(), - elements = this, - i = elements.length, - count = 1, - deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - tmp; - function resolve() { - if (! (--count)) { - defer.resolveWith(elements, [elements]); - } - } - while (i--) { - if ((tmp = jQuery.data(elements[i], deferDataKey, undefined, true) || (jQuery.data(elements[i], queueDataKey, undefined, true) || jQuery.data(elements[i], markDataKey, undefined, true)) && jQuery.data(elements[i], deferDataKey, jQuery.Callbacks("once memory"), true))) { - count++; - tmp.add(resolve); - } - } - resolve(); - return defer.promise(); - } - }); - var rclass = /[\n\t\r]/g, - rspace = /\s+/, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - nodeHook, boolHook, fixSpecified; - jQuery.fn.extend({ - attr: function (name, value) { - return jQuery.access(this, name, value, true, jQuery.attr); - }, - removeAttr: function (name) { - return this.each(function () { - jQuery.removeAttr(this, name); - }); - }, - prop: function (name, value) { - return jQuery.access(this, name, value, true, jQuery.prop); - }, - removeProp: function (name) { - name = jQuery.propFix[name] || name; - return this.each(function () { - try { - this[name] = undefined; - delete this[name]; - } catch(e) {} - }); - }, - addClass: function (value) { - var classNames, i, l, elem, setClass, c, cl; - if (jQuery.isFunction(value)) { - return this.each(function (j) { - jQuery(this).addClass(value.call(this, j, this.className)); - }); - } - if (value && typeof value === "string") { - classNames = value.split(rspace); - for (i = 0, l = this.length; i < l; i++) { - elem = this[i]; - if (elem.nodeType === 1) { - if (!elem.className && classNames.length === 1) { - elem.className = value; - } else { - setClass = " " + elem.className + " "; - for (c = 0, cl = classNames.length; c < cl; c++) { - if (!~setClass.indexOf(" " + classNames[c] + " ")) { - setClass += classNames[c] + " "; - } - } - elem.className = jQuery.trim(setClass); - } - } - } - } - return this; - }, - removeClass: function (value) { - var classNames, i, l, elem, className, c, cl; - if (jQuery.isFunction(value)) { - return this.each(function (j) { - jQuery(this).removeClass(value.call(this, j, this.className)); - }); - } - if ((value && typeof value === "string") || value === undefined) { - classNames = (value || "").split(rspace); - for (i = 0, l = this.length; i < l; i++) { - elem = this[i]; - if (elem.nodeType === 1 && elem.className) { - if (value) { - className = (" " + elem.className + " ").replace(rclass, " "); - for (c = 0, cl = classNames.length; c < cl; c++) { - className = className.replace(" " + classNames[c] + " ", " "); - } - elem.className = jQuery.trim(className); - } else { - elem.className = ""; - } - } - } - } - return this; - }, - toggleClass: function (value, stateVal) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - if (jQuery.isFunction(value)) { - return this.each(function (i) { - jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal); - }); - } - return this.each(function () { - if (type === "string") { - var className, i = 0, - self = jQuery(this), - state = stateVal, - classNames = value.split(rspace); - while ((className = classNames[i++])) { - state = isBool ? state : !self.hasClass(className); - self[state ? "addClass" : "removeClass"](className); - } - } else { - if (type === "undefined" || type === "boolean") { - if (this.className) { - jQuery._data(this, "__className__", this.className); - } - this.className = this.className || value === false ? "" : jQuery._data(this, "__className__") || ""; - } - } - }); - }, - hasClass: function (selector) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for (; i < l; i++) { - if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) > -1) { - return true; - } - } - return false; - }, - val: function (value) { - var hooks, ret, isFunction, elem = this[0]; - if (!arguments.length) { - if (elem) { - hooks = jQuery.valHooks[elem.nodeName.toLowerCase()] || jQuery.valHooks[elem.type]; - if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) { - return ret; - } - ret = elem.value; - return typeof ret === "string" ? ret.replace(rreturn, "") : ret == null ? "" : ret; - } - return; - } - isFunction = jQuery.isFunction(value); - return this.each(function (i) { - var self = jQuery(this), - val; - if (this.nodeType !== 1) { - return; - } - if (isFunction) { - val = value.call(this, i, self.val()); - } else { - val = value; - } - if (val == null) { - val = ""; - } else { - if (typeof val === "number") { - val += ""; - } else { - if (jQuery.isArray(val)) { - val = jQuery.map(val, function (value) { - return value == null ? "" : value + ""; - }); - } - } - } - hooks = jQuery.valHooks[this.nodeName.toLowerCase()] || jQuery.valHooks[this.type]; - if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) { - this.value = val; - } - }); - } - }); - jQuery.extend({ - valHooks: { - option: { - get: function (elem) { - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function (elem) { - var value, i, max, option, index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - if (index < 0) { - return null; - } - i = one ? index : 0; - max = one ? index + 1 : options.length; - for (; i < max; i++) { - option = options[i]; - if (option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup"))) { - value = jQuery(option).val(); - if (one) { - return value; - } - values.push(value); - } - } - if (one && !values.length && options.length) { - return jQuery(options[index]).val(); - } - return values; - }, - set: function (elem, value) { - var values = jQuery.makeArray(value); - jQuery(elem).find("option").each(function () { - this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0; - }); - if (!values.length) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - attr: function (elem, name, value, pass) { - var ret, hooks, notxml, nType = elem.nodeType; - if (!elem || nType === 3 || nType === 8 || nType === 2) { - return; - } - if (pass && name in jQuery.attrFn) { - return jQuery(elem)[name](value); - } - if (typeof elem.getAttribute === "undefined") { - return jQuery.prop(elem, name, value); - } - notxml = nType !== 1 || !jQuery.isXMLDoc(elem); - if (notxml) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[name] || (rboolean.test(name) ? boolHook : nodeHook); - } - if (value !== undefined) { - if (value === null) { - jQuery.removeAttr(elem, name); - return; - } else { - if (hooks && "set" in hooks && notxml && (ret = hooks.set(elem, value, name)) !== undefined) { - return ret; - } else { - elem.setAttribute(name, "" + value); - return value; - } - } - } else { - if (hooks && "get" in hooks && notxml && (ret = hooks.get(elem, name)) !== null) { - return ret; - } else { - ret = elem.getAttribute(name); - return ret === null ? undefined : ret; - } - } - }, - removeAttr: function (elem, value) { - var propName, attrNames, name, l, i = 0; - if (value && elem.nodeType === 1) { - attrNames = value.toLowerCase().split(rspace); - l = attrNames.length; - for (; i < l; i++) { - name = attrNames[i]; - if (name) { - propName = jQuery.propFix[name] || name; - jQuery.attr(elem, name, ""); - elem.removeAttribute(getSetAttribute ? name : propName); - if (rboolean.test(name) && propName in elem) { - elem[propName] = false; - } - } - } - } - }, - attrHooks: { - type: { - set: function (elem, value) { - if (rtype.test(elem.nodeName) && elem.parentNode) { - jQuery.error("type property can't be changed"); - } else { - if (!jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input")) { - var val = elem.value; - elem.setAttribute("type", value); - if (val) { - elem.value = val; - } - return value; - } - } - } - }, - value: { - get: function (elem, name) { - if (nodeHook && jQuery.nodeName(elem, "button")) { - return nodeHook.get(elem, name); - } - return name in elem ? elem.value : null; - }, - set: function (elem, value, name) { - if (nodeHook && jQuery.nodeName(elem, "button")) { - return nodeHook.set(elem, value, name); - } - elem.value = value; - } - } - }, - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - prop: function (elem, name, value) { - var ret, hooks, notxml, nType = elem.nodeType; - if (!elem || nType === 3 || nType === 8 || nType === 2) { - return; - } - notxml = nType !== 1 || !jQuery.isXMLDoc(elem); - if (notxml) { - name = jQuery.propFix[name] || name; - hooks = jQuery.propHooks[name]; - } - if (value !== undefined) { - if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) { - return ret; - } else { - return (elem[name] = value); - } - } else { - if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { - return ret; - } else { - return elem[name]; - } - } - }, - propHooks: { - tabIndex: { - get: function (elem) { - var attributeNode = elem.getAttributeNode("tabindex"); - return attributeNode && attributeNode.specified ? parseInt(attributeNode.value, 10) : rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href ? 0 : undefined; - } - } - } - }); - jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; - boolHook = { - get: function (elem, name) { - var attrNode, property = jQuery.prop(elem, name); - return property === true || typeof property !== "boolean" && (attrNode = elem.getAttributeNode(name)) && attrNode.nodeValue !== false ? name.toLowerCase() : undefined; - }, - set: function (elem, value, name) { - var propName; - if (value === false) { - jQuery.removeAttr(elem, name); - } else { - propName = jQuery.propFix[name] || name; - if (propName in elem) { - elem[propName] = true; - } - elem.setAttribute(name, name.toLowerCase()); - } - return name; - } - }; - if (!getSetAttribute) { - fixSpecified = { - name: true, - id: true - }; - nodeHook = jQuery.valHooks.button = { - get: function (elem, name) { - var ret; - ret = elem.getAttributeNode(name); - return ret && (fixSpecified[name] ? ret.nodeValue !== "" : ret.specified) ? ret.nodeValue : undefined; - }, - set: function (elem, value, name) { - var ret = elem.getAttributeNode(name); - if (!ret) { - ret = document.createAttribute(name); - elem.setAttributeNode(ret); - } - return (ret.nodeValue = value + ""); - } - }; - jQuery.attrHooks.tabindex.set = nodeHook.set; - jQuery.each(["width", "height"], function (i, name) { - jQuery.attrHooks[name] = jQuery.extend(jQuery.attrHooks[name], { - set: function (elem, value) { - if (value === "") { - elem.setAttribute(name, "auto"); - return value; - } - } - }); - }); - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function (elem, value, name) { - if (value === "") { - value = "false"; - } - nodeHook.set(elem, value, name); - } - }; - } - if (!jQuery.support.hrefNormalized) { - jQuery.each(["href", "src", "width", "height"], function (i, name) { - jQuery.attrHooks[name] = jQuery.extend(jQuery.attrHooks[name], { - get: function (elem) { - var ret = elem.getAttribute(name, 2); - return ret === null ? undefined : ret; - } - }); - }); - } - if (!jQuery.support.style) { - jQuery.attrHooks.style = { - get: function (elem) { - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function (elem, value) { - return (elem.style.cssText = "" + value); - } - }; - } - if (!jQuery.support.optSelected) { - jQuery.propHooks.selected = jQuery.extend(jQuery.propHooks.selected, { - get: function (elem) { - var parent = elem.parentNode; - if (parent) { - parent.selectedIndex; - if (parent.parentNode) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); - } - if (!jQuery.support.enctype) { - jQuery.propFix.enctype = "encoding"; - } - if (!jQuery.support.checkOn) { - jQuery.each(["radio", "checkbox"], function () { - jQuery.valHooks[this] = { - get: function (elem) { - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); - } - jQuery.each(["radio", "checkbox"], function () { - jQuery.valHooks[this] = jQuery.extend(jQuery.valHooks[this], { - set: function (elem, value) { - if (jQuery.isArray(value)) { - return (elem.checked = jQuery.inArray(jQuery(elem).val(), value) >= 0); - } - } - }); - }); - var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, - rhoverHack = /\bhover(\.\S+)?\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, - quickParse = function (selector) { - var quick = rquickIs.exec(selector); - if (quick) { - quick[1] = (quick[1] || "").toLowerCase(); - quick[3] = quick[3] && new RegExp("(?:^|\\s)" + quick[3] + "(?:\\s|$)"); - } - return quick; - }, - quickIs = function (elem, m) { - var attrs = elem.attributes || {}; - return ((!m[1] || elem.nodeName.toLowerCase() === m[1]) && (!m[2] || (attrs.id || {}).value === m[2]) && (!m[3] || m[3].test((attrs["class"] || {}).value))); - }, - hoverHack = function (events) { - return jQuery.event.special.hover ? events : events.replace(rhoverHack, "mouseenter$1 mouseleave$1"); - }; - jQuery.event = { - add: function (elem, types, handler, data, selector) { - var elemData, eventHandle, events, t, tns, type, namespaces, handleObj, handleObjIn, quick, handlers, special; - if (elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data(elem))) { - return; - } - if (handler.handler) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - if (!handler.guid) { - handler.guid = jQuery.guid++; - } - events = elemData.events; - if (!events) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if (!eventHandle) { - elemData.handle = eventHandle = function (e) { - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply(eventHandle.elem, arguments) : undefined; - }; - eventHandle.elem = elem; - } - types = jQuery.trim(hoverHack(types)).split(" "); - for (t = 0; t < types.length; t++) { - tns = rtypenamespace.exec(types[t]) || []; - type = tns[1]; - namespaces = (tns[2] || "").split(".").sort(); - special = jQuery.event.special[type] || {}; - type = (selector ? special.delegateType : special.bindType) || type; - special = jQuery.event.special[type] || {}; - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - quick: quickParse(selector), - namespace: namespaces.join(".") - }, - handleObjIn); - handlers = events[type]; - if (!handlers) { - handlers = events[type] = []; - handlers.delegateCount = 0; - if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { - if (elem.addEventListener) { - elem.addEventListener(type, eventHandle, false); - } else { - if (elem.attachEvent) { - elem.attachEvent("on" + type, eventHandle); - } - } - } - } - if (special.add) { - special.add.call(elem, handleObj); - if (!handleObj.handler.guid) { - handleObj.handler.guid = handler.guid; - } - } - if (selector) { - handlers.splice(handlers.delegateCount++, 0, handleObj); - } else { - handlers.push(handleObj); - } - jQuery.event.global[type] = true; - } - elem = null; - }, - global: {}, - remove: function (elem, types, handler, selector, mappedTypes) { - var elemData = jQuery.hasData(elem) && jQuery._data(elem), - t, - tns, - type, - origType, - namespaces, - origCount, - j, - events, - special, - handle, - eventType, - handleObj; - if (!elemData || !(events = elemData.events)) { - return; - } - types = jQuery.trim(hoverHack(types || "")).split(" "); - for (t = 0; t < types.length; t++) { - tns = rtypenamespace.exec(types[t]) || []; - type = origType = tns[1]; - namespaces = tns[2]; - if (!type) { - for (type in events) { - jQuery.event.remove(elem, type + types[t], handler, selector, true); - } - continue; - } - special = jQuery.event.special[type] || {}; - type = (selector ? special.delegateType : special.bindType) || type; - eventType = events[type] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - for (j = 0; j < eventType.length; j++) { - handleObj = eventType[j]; - if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!namespaces || namespaces.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) { - eventType.splice(j--, 1); - if (handleObj.selector) { - eventType.delegateCount--; - } - if (special.remove) { - special.remove.call(elem, handleObj); - } - } - } - if (eventType.length === 0 && origCount !== eventType.length) { - if (!special.teardown || special.teardown.call(elem, namespaces) === false) { - jQuery.removeEvent(elem, type, elemData.handle); - } - delete events[type]; - } - } - if (jQuery.isEmptyObject(events)) { - handle = elemData.handle; - if (handle) { - handle.elem = null; - } - jQuery.removeData(elem, ["events", "handle"], true); - } - }, - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - trigger: function (event, data, elem, onlyHandlers) { - if (elem && (elem.nodeType === 3 || elem.nodeType === 8)) { - return; - } - var type = event.type || event, - namespaces = [], - cache, - exclusive, - i, - cur, - old, - ontype, - special, - handle, - eventPath, - bubbleType; - if (rfocusMorph.test(type + jQuery.event.triggered)) { - return; - } - if (type.indexOf("!") >= 0) { - type = type.slice(0, -1); - exclusive = true; - } - if (type.indexOf(".") >= 0) { - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - if ((!elem || jQuery.event.customEvent[type]) && !jQuery.event.global[type]) { - return; - } - event = typeof event === "object" ? event[jQuery.expando] ? event : new jQuery.Event(type, event) : new jQuery.Event(type); - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - ontype = type.indexOf(":") < 0 ? "on" + type : ""; - if (!elem) { - cache = jQuery.cache; - for (i in cache) { - if (cache[i].events && cache[i].events[type]) { - jQuery.event.trigger(event, data, cache[i].handle.elem, true); - } - } - return; - } - event.result = undefined; - if (!event.target) { - event.target = elem; - } - data = data != null ? jQuery.makeArray(data) : []; - data.unshift(event); - special = jQuery.event.special[type] || {}; - if (special.trigger && special.trigger.apply(elem, data) === false) { - return; - } - eventPath = [[elem, special.bindType || type]]; - if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) { - bubbleType = special.delegateType || type; - cur = rfocusMorph.test(bubbleType + type) ? elem : elem.parentNode; - old = null; - for (; cur; cur = cur.parentNode) { - eventPath.push([cur, bubbleType]); - old = cur; - } - if (old && old === elem.ownerDocument) { - eventPath.push([old.defaultView || old.parentWindow || window, bubbleType]); - } - } - for (i = 0; i < eventPath.length && !event.isPropagationStopped(); i++) { - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - handle = (jQuery._data(cur, "events") || {})[event.type] && jQuery._data(cur, "handle"); - if (handle) { - handle.apply(cur, data); - } - handle = ontype && cur[ontype]; - if (handle && jQuery.acceptData(cur) && handle.apply(cur, data) === false) { - event.preventDefault(); - } - } - event.type = type; - if (!onlyHandlers && !event.isDefaultPrevented()) { - if ((!special._default || special._default.apply(elem.ownerDocument, data) === false) && !(type === "click" && jQuery.nodeName(elem, "a")) && jQuery.acceptData(elem)) { - if (ontype && elem[type] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow(elem)) { - old = elem[ontype]; - if (old) { - elem[ontype] = null; - } - jQuery.event.triggered = type; - elem[type](); - jQuery.event.triggered = undefined; - if (old) { - elem[ontype] = old; - } - } - } - } - return event.result; - }, - dispatch: function (event) { - event = jQuery.event.fix(event || window.event); - var handlers = ((jQuery._data(this, "events") || {})[event.type] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call(arguments, 0), - run_all = !event.exclusive && !event.namespace, - handlerQueue = [], - i, - j, - cur, - jqcur, - ret, - selMatch, - matched, - matches, - handleObj, - sel, - related; - args[0] = event; - event.delegateTarget = this; - if (delegateCount && !event.target.disabled && !(event.button && event.type === "click")) { - jqcur = jQuery(this); - jqcur.context = this.ownerDocument || this; - for (cur = event.target; cur != this; cur = cur.parentNode || this) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for (i = 0; i < delegateCount; i++) { - handleObj = handlers[i]; - sel = handleObj.selector; - if (selMatch[sel] === undefined) { - selMatch[sel] = (handleObj.quick ? quickIs(cur, handleObj.quick) : jqcur.is(sel)); - } - if (selMatch[sel]) { - matches.push(handleObj); - } - } - if (matches.length) { - handlerQueue.push({ - elem: cur, - matches: matches - }); - } - } - } - if (handlers.length > delegateCount) { - handlerQueue.push({ - elem: this, - matches: handlers.slice(delegateCount) - }); - } - for (i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++) { - matched = handlerQueue[i]; - event.currentTarget = matched.elem; - for (j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++) { - handleObj = matched.matches[j]; - if (run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test(handleObj.namespace)) { - event.data = handleObj.data; - event.handleObj = handleObj; - ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); - if (ret !== undefined) { - event.result = ret; - if (ret === false) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - return event.result; - }, - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - fixHooks: {}, - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function (event, original) { - if (event.which == null) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - return event; - } - }, - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function (event, original) { - var eventDoc, doc, body, button = original.button, - fromElement = original.fromElement; - if (event.pageX == null && original.clientX != null) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); - event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); - } - if (!event.relatedTarget && fromElement) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - if (!event.which && button !== undefined) { - event.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0))); - } - return event; - } - }, - fix: function (event) { - if (event[jQuery.expando]) { - return event; - } - var i, prop, originalEvent = event, - fixHook = jQuery.event.fixHooks[event.type] || {}, - copy = fixHook.props ? this.props.concat(fixHook.props) : this.props; - event = jQuery.Event(originalEvent); - for (i = copy.length; i;) { - prop = copy[--i]; - event[prop] = originalEvent[prop]; - } - if (!event.target) { - event.target = originalEvent.srcElement || document; - } - if (event.target.nodeType === 3) { - event.target = event.target.parentNode; - } - if (event.metaKey === undefined) { - event.metaKey = event.ctrlKey; - } - return fixHook.filter ? fixHook.filter(event, originalEvent) : event; - }, - special: { - ready: { - setup: jQuery.bindReady - }, - load: { - noBubble: true - }, - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - beforeunload: { - setup: function (data, namespaces, eventHandle) { - if (jQuery.isWindow(this)) { - this.onbeforeunload = eventHandle; - } - }, - teardown: function (namespaces, eventHandle) { - if (this.onbeforeunload === eventHandle) { - this.onbeforeunload = null; - } - } - } - }, - simulate: function (type, elem, event, bubble) { - var e = jQuery.extend(new jQuery.Event(), event, { - type: type, - isSimulated: true, - originalEvent: {} - }); - if (bubble) { - jQuery.event.trigger(e, null, elem); - } else { - jQuery.event.dispatch.call(elem, e); - } - if (e.isDefaultPrevented()) { - event.preventDefault(); - } - } - }; - jQuery.event.handle = jQuery.event.dispatch; - jQuery.removeEvent = document.removeEventListener ? - function (elem, type, handle) { - if (elem.removeEventListener) { - elem.removeEventListener(type, handle, false); - } - } : function (elem, type, handle) { - if (elem.detachEvent) { - elem.detachEvent("on" + type, handle); - } - }; - jQuery.Event = function (src, props) { - if (! (this instanceof jQuery.Event)) { - return new jQuery.Event(src, props); - } - if (src && src.type) { - this.originalEvent = src; - this.type = src.type; - this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; - } else { - this.type = src; - } - if (props) { - jQuery.extend(this, props); - } - this.timeStamp = src && src.timeStamp || jQuery.now(); - this[jQuery.expando] = true; - }; - function returnFalse() { - return false; - } - function returnTrue() { - return true; - } - jQuery.Event.prototype = { - preventDefault: function () { - this.isDefaultPrevented = returnTrue; - var e = this.originalEvent; - if (!e) { - return; - } - if (e.preventDefault) { - e.preventDefault(); - } else { - e.returnValue = false; - } - }, - stopPropagation: function () { - this.isPropagationStopped = returnTrue; - var e = this.originalEvent; - if (!e) { - return; - } - if (e.stopPropagation) { - e.stopPropagation(); - } - e.cancelBubble = true; - }, - stopImmediatePropagation: function () { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse - }; - jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" - }, - function (orig, fix) { - jQuery.event.special[orig] = { - delegateType: fix, - bindType: fix, - handle: function (event) { - var target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector, - ret; - if (!related || (related !== target && !jQuery.contains(target, related))) { - event.type = handleObj.origType; - ret = handleObj.handler.apply(this, arguments); - event.type = fix; - } - return ret; - } - }; - }); - if (!jQuery.support.submitBubbles) { - jQuery.event.special.submit = { - setup: function () { - if (jQuery.nodeName(this, "form")) { - return false; - } - jQuery.event.add(this, "click._submit keypress._submit", function (e) { - var elem = e.target, - form = jQuery.nodeName(elem, "input") || jQuery.nodeName(elem, "button") ? elem.form : undefined; - if (form && !form._submit_attached) { - jQuery.event.add(form, "submit._submit", function (event) { - if (this.parentNode && !event.isTrigger) { - jQuery.event.simulate("submit", this.parentNode, event, true); - } - }); - form._submit_attached = true; - } - }); - }, - teardown: function () { - if (jQuery.nodeName(this, "form")) { - return false; - } - jQuery.event.remove(this, "._submit"); - } - }; - } - if (!jQuery.support.changeBubbles) { - jQuery.event.special.change = { - setup: function () { - if (rformElems.test(this.nodeName)) { - if (this.type === "checkbox" || this.type === "radio") { - jQuery.event.add(this, "propertychange._change", function (event) { - if (event.originalEvent.propertyName === "checked") { - this._just_changed = true; - } - }); - jQuery.event.add(this, "click._change", function (event) { - if (this._just_changed && !event.isTrigger) { - this._just_changed = false; - jQuery.event.simulate("change", this, event, true); - } - }); - } - return false; - } - jQuery.event.add(this, "beforeactivate._change", function (e) { - var elem = e.target; - if (rformElems.test(elem.nodeName) && !elem._change_attached) { - jQuery.event.add(elem, "change._change", function (event) { - if (this.parentNode && !event.isSimulated && !event.isTrigger) { - jQuery.event.simulate("change", this.parentNode, event, true); - } - }); - elem._change_attached = true; - } - }); - }, - handle: function (event) { - var elem = event.target; - if (this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox")) { - return event.handleObj.handler.apply(this, arguments); - } - }, - teardown: function () { - jQuery.event.remove(this, "._change"); - return rformElems.test(this.nodeName); - } - }; - } - if (!jQuery.support.focusinBubbles) { - jQuery.each({ - focus: "focusin", - blur: "focusout" - }, - function (orig, fix) { - var attaches = 0, - handler = function (event) { - jQuery.event.simulate(fix, event.target, jQuery.event.fix(event), true); - }; - jQuery.event.special[fix] = { - setup: function () { - if (attaches++===0) { - document.addEventListener(orig, handler, true); - } - }, - teardown: function () { - if (--attaches === 0) { - document.removeEventListener(orig, handler, true); - } - } - }; - }); - } - jQuery.fn.extend({ - on: function (types, selector, data, fn, one) { - var origFn, type; - if (typeof types === "object") { - if (typeof selector !== "string") { - data = selector; - selector = undefined; - } - for (type in types) { - this.on(type, selector, data, types[type], one); - } - return this; - } - if (data == null && fn == null) { - fn = selector; - data = selector = undefined; - } else { - if (fn == null) { - if (typeof selector === "string") { - fn = data; - data = undefined; - } else { - fn = data; - data = selector; - selector = undefined; - } - } - } - if (fn === false) { - fn = returnFalse; - } else { - if (!fn) { - return this; - } - } - if (one === 1) { - origFn = fn; - fn = function (event) { - jQuery().off(event); - return origFn.apply(this, arguments); - }; - fn.guid = origFn.guid || (origFn.guid = jQuery.guid++); - } - return this.each(function () { - jQuery.event.add(this, types, fn, data, selector); - }); - }, - one: function (types, selector, data, fn) { - return this.on.call(this, types, selector, data, fn, 1); - }, - off: function (types, selector, fn) { - if (types && types.preventDefault && types.handleObj) { - var handleObj = types.handleObj; - jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.type + "." + handleObj.namespace : handleObj.type, handleObj.selector, handleObj.handler); - return this; - } - if (typeof types === "object") { - for (var type in types) { - this.off(type, selector, types[type]); - } - return this; - } - if (selector === false || typeof selector === "function") { - fn = selector; - selector = undefined; - } - if (fn === false) { - fn = returnFalse; - } - return this.each(function () { - jQuery.event.remove(this, types, fn, selector); - }); - }, - bind: function (types, data, fn) { - return this.on(types, null, data, fn); - }, - unbind: function (types, fn) { - return this.off(types, null, fn); - }, - live: function (types, data, fn) { - jQuery(this.context).on(types, this.selector, data, fn); - return this; - }, - die: function (types, fn) { - jQuery(this.context).off(types, this.selector || "**", fn); - return this; - }, - delegate: function (selector, types, data, fn) { - return this.on(types, selector, data, fn); - }, - undelegate: function (selector, types, fn) { - return arguments.length == 1 ? this.off(selector, "**") : this.off(types, selector, fn); - }, - trigger: function (type, data) { - return this.each(function () { - jQuery.event.trigger(type, data, this); - }); - }, - triggerHandler: function (type, data) { - if (this[0]) { - return jQuery.event.trigger(type, data, this[0], true); - } - }, - toggle: function (fn) { - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function (event) { - var lastToggle = (jQuery._data(this, "lastToggle" + fn.guid) || 0) % i; - jQuery._data(this, "lastToggle" + fn.guid, lastToggle + 1); - event.preventDefault(); - return args[lastToggle].apply(this, arguments) || false; - }; - toggler.guid = guid; - while (i < args.length) { - args[i++].guid = guid; - } - return this.click(toggler); - }, - hover: function (fnOver, fnOut) { - return this.mouseenter(fnOver).mouseleave(fnOut || fnOver); - } - }); - jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function (i, name) { - jQuery.fn[name] = function (data, fn) { - if (fn == null) { - fn = data; - data = null; - } - return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name); - }; - if (jQuery.attrFn) { - jQuery.attrFn[name] = true; - } - if (rkeyEvent.test(name)) { - jQuery.event.fixHooks[name] = jQuery.event.keyHooks; - } - if (rmouseEvent.test(name)) { - jQuery.event.fixHooks[name] = jQuery.event.mouseHooks; - } - }); - /* - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Matches dashed string for camelizing + rdashAlpha = /-([a-z]|[0-9])/ig, + rmsPrefix = /^-ms-/, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // The deferred used on DOM ready + readyList, + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + return jQuery.makeArray( _null_object, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.7.1", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.add( fn ); + + return this; + }, + + eq: function( i ) { + i = +i; + return i === -1 ? + this.slice( i ) : + this.slice( i, i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + // Either a released hold or an DOMready/load event and not yet ready + if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.fireWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).off( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyList ) { + return; + } + + readyList = jQuery.Callbacks( "once memory" ); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction( object ); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + break; + } + } + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type( array ); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array, i ) { + var len; + + if ( array ) { + if ( indexOf ) { + return indexOf.call( array, elem, i ); + } + + len = array.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in array && array[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + if ( typeof context === "string" ) { + var tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + var args = slice.call( arguments, 2 ), + proxy = function() { + return fn.apply( context, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can optionally be executed if it's a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +return jQuery; + +})(); + + +// String to Object flags format cache +var flagsCache = {}; + +// Convert String-formatted flags into Object-formatted ones and store in cache +function createFlags( flags ) { + var object = flagsCache[ flags ] = {}, + i, length; + flags = flags.split( /\s+/ ); + for ( i = 0, length = flags.length; i < length; i++ ) { + object[ flags[i] ] = true; + } + return object; +} + +/* + * Create a callback list using the following parameters: + * + * flags: an optional list of space-separated flags that will change how + * the callback list behaves + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible flags: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * */ - (function () { - var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - expando = "sizcache" + (Math.random() + "").replace(".", ""), - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rReturn = /\r\n/g, - rNonWord = /\W/; - [0, 0].sort(function () { - baseHasDuplicate = false; - return 0; - }); - var Sizzle = function (selector, context, results, seed) { - results = results || []; - context = context || document; - var origContext = context; - if (context.nodeType !== 1 && context.nodeType !== 9) { - return []; - } - if (!selector || typeof selector !== "string") { - return results; - } - var m, set, checkSet, extra, ret, cur, pop, i, prune = true, - contextXML = Sizzle.isXML(context), - parts = [], - soFar = selector; - do { - chunker.exec(""); - m = chunker.exec(soFar); - if (m) { - soFar = m[3]; - parts.push(m[1]); - if (m[2]) { - extra = m[3]; - break; - } - } - } while (m); - if (parts.length > 1 && origPOS.exec(selector)) { - if (parts.length === 2 && Expr.relative[parts[0]]) { - set = posProcess(parts[0] + parts[1], context, seed); - } else { - set = Expr.relative[parts[0]] ? [context] : Sizzle(parts.shift(), context); - while (parts.length) { - selector = parts.shift(); - if (Expr.relative[selector]) { - selector += parts.shift(); - } - set = posProcess(selector, set, seed); - } - } - } else { - if (!seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1])) { - ret = Sizzle.find(parts.shift(), context, contextXML); - context = ret.expr ? Sizzle.filter(ret.expr, ret.set)[0] : ret.set[0]; - } - if (context) { - ret = seed ? { - expr: parts.pop(), - set: makeArray(seed) - } : Sizzle.find(parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML); - set = ret.expr ? Sizzle.filter(ret.expr, ret.set) : ret.set; - if (parts.length > 0) { - checkSet = makeArray(set); - } else { - prune = false; - } - while (parts.length) { - cur = parts.pop(); - pop = cur; - if (!Expr.relative[cur]) { - cur = ""; - } else { - pop = parts.pop(); - } - if (pop == null) { - pop = context; - } - Expr.relative[cur](checkSet, pop, contextXML); - } - } else { - checkSet = parts = []; - } - } - if (!checkSet) { - checkSet = set; - } - if (!checkSet) { - Sizzle.error(cur || selector); - } - if (toString.call(checkSet) === "[object Array]") { - if (!prune) { - results.push.apply(results, checkSet); - } else { - if (context && context.nodeType === 1) { - for (i = 0; checkSet[i] != null; i++) { - if (checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i]))) { - results.push(set[i]); - } - } - } else { - for (i = 0; checkSet[i] != null; i++) { - if (checkSet[i] && checkSet[i].nodeType === 1) { - results.push(set[i]); - } - } - } - } - } else { - makeArray(checkSet, results); - } - if (extra) { - Sizzle(extra, origContext, results, seed); - Sizzle.uniqueSort(results); - } - return results; - }; - Sizzle.uniqueSort = function (results) { - if (sortOrder) { - hasDuplicate = baseHasDuplicate; - results.sort(sortOrder); - if (hasDuplicate) { - for (var i = 1; i < results.length; i++) { - if (results[i] === results[i - 1]) { - results.splice(i--, 1); - } - } - } - } - return results; - }; - Sizzle.matches = function (expr, set) { - return Sizzle(expr, null, null, set); - }; - Sizzle.matchesSelector = function (node, expr) { - return Sizzle(expr, null, null, [node]).length > 0; - }; - Sizzle.find = function (expr, context, isXML) { - var set, i, len, match, type, left; - if (!expr) { - return []; - } - for (i = 0, len = Expr.order.length; i < len; i++) { - type = Expr.order[i]; - if ((match = Expr.leftMatch[type].exec(expr))) { - left = match[1]; - match.splice(1, 1); - if (left.substr(left.length - 1) !== "\\") { - match[1] = (match[1] || "").replace(rBackslash, ""); - set = Expr.find[type](match, context, isXML); - if (set != null) { - expr = expr.replace(Expr.match[type], ""); - break; - } - } - } - } - if (!set) { - set = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName("*") : []; - } - return { - set: set, - expr: expr - }; - }; - Sizzle.filter = function (expr, set, inplace, not) { - var match, anyFound, type, found, item, filter, left, i, pass, old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML(set[0]); - while (expr && set.length) { - for (type in Expr.filter) { - if ((match = Expr.leftMatch[type].exec(expr)) != null && match[2]) { - filter = Expr.filter[type]; - left = match[1]; - anyFound = false; - match.splice(1, 1); - if (left.substr(left.length - 1) === "\\") { - continue; - } - if (curLoop === result) { - result = []; - } - if (Expr.preFilter[type]) { - match = Expr.preFilter[type](match, curLoop, inplace, result, not, isXMLFilter); - if (!match) { - anyFound = found = true; - } else { - if (match === true) { - continue; - } - } - } - if (match) { - for (i = 0; - (item = curLoop[i]) != null; i++) { - if (item) { - found = filter(item, match, i, curLoop); - pass = not ^ found; - if (inplace && found != null) { - if (pass) { - anyFound = true; - } else { - curLoop[i] = false; - } - } else { - if (pass) { - result.push(item); - anyFound = true; - } - } - } - } - } - if (found !== undefined) { - if (!inplace) { - curLoop = result; - } - expr = expr.replace(Expr.match[type], ""); - if (!anyFound) { - return []; - } - break; - } - } - } - if (expr === old) { - if (anyFound == null) { - Sizzle.error(expr); - } else { - break; - } - } - old = expr; - } - return curLoop; - }; - Sizzle.error = function (msg) { - throw new Error("Syntax error, unrecognized expression: " + msg); - }; - var getText = Sizzle.getText = function (elem) { - var i, node, nodeType = elem.nodeType, - ret = ""; - if (nodeType) { - if (nodeType === 1 || nodeType === 9) { - if (typeof elem.textContent === "string") { - return elem.textContent; - } else { - if (typeof elem.innerText === "string") { - return elem.innerText.replace(rReturn, ""); - } else { - for (elem = elem.firstChild; elem; elem = elem.nextSibling) { - ret += getText(elem); - } - } - } - } else { - if (nodeType === 3 || nodeType === 4) { - return elem.nodeValue; - } - } - } else { - for (i = 0; - (node = elem[i]); i++) { - if (node.nodeType !== 8) { - ret += getText(node); - } - } - } - return ret; - }; - var Expr = Sizzle.selectors = { - order: ["ID", "NAME", "TAG"], - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS : /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO : /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - leftMatch : {}, - attrMap: { - "class": "className", - "for": "htmlFor" - }, - attrHandle: { - href: function (elem) { - return elem.getAttribute("href"); - }, - type: function (elem) { - return elem.getAttribute("type"); - } - }, - relative: { - "+": function (checkSet, part) { - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test(part), - isPartStrNotTag = isPartStr && !isTag; - if (isTag) { - part = part.toLowerCase(); - } - for (var i = 0, l = checkSet.length, elem; i < l; i++) { - if ((elem = checkSet[i])) { - while ((elem = elem.previousSibling) && elem.nodeType !== 1) {} - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? elem || false : elem === part; - } - } - if (isPartStrNotTag) { - Sizzle.filter(part, checkSet, true); - } - }, - ">": function (checkSet, part) { - var elem, isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - if (isPartStr && !rNonWord.test(part)) { - part = part.toLowerCase(); - for (; i < l; i++) { - elem = checkSet[i]; - if (elem) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - } else { - for (; i < l; i++) { - elem = checkSet[i]; - if (elem) { - checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part; - } - } - if (isPartStr) { - Sizzle.filter(part, checkSet, true); - } - } - }, - "": function (checkSet, part, isXML) { - var nodeCheck, doneName = done++, - checkFn = dirCheck; - if (typeof part === "string" && !rNonWord.test(part)) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML); - }, - "~": function (checkSet, part, isXML) { - var nodeCheck, doneName = done++, - checkFn = dirCheck; - if (typeof part === "string" && !rNonWord.test(part)) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML); - } - }, - find: { - ID: function (match, context, isXML) { - if (typeof context.getElementById !== "undefined" && !isXML) { - var m = context.getElementById(match[1]); - return m && m.parentNode ? [m] : []; - } - }, - NAME: function (match, context) { - if (typeof context.getElementsByName !== "undefined") { - var ret = [], - results = context.getElementsByName(match[1]); - for (var i = 0, l = results.length; i < l; i++) { - if (results[i].getAttribute("name") === match[1]) { - ret.push(results[i]); - } - } - return ret.length === 0 ? null : ret; - } - }, - TAG: function (match, context) { - if (typeof context.getElementsByTagName !== "undefined") { - return context.getElementsByTagName(match[1]); - } - } - }, - preFilter: { - CLASS: function (match, curLoop, inplace, result, not, isXML) { - match = " " + match[1].replace(rBackslash, "") + " "; - if (isXML) { - return match; - } - for (var i = 0, elem; - (elem = curLoop[i]) != null; i++) { - if (elem) { - if (not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0)) { - if (!inplace) { - result.push(elem); - } - } else { - if (inplace) { - curLoop[i] = false; - } - } - } - } - return false; - }, - ID: function (match) { - return match[1].replace(rBackslash, ""); - }, - TAG: function (match, curLoop) { - return match[1].replace(rBackslash, "").toLowerCase(); - }, - CHILD: function (match) { - if (match[1] === "nth") { - if (!match[2]) { - Sizzle.error(match[0]); - } - match[2] = match[2].replace(/^\+|\s*/g, ""); - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || !/\D/.test(match[2]) && "0n+" + match[2] || match[2]); - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } else { - if (match[2]) { - Sizzle.error(match[0]); - } - } - match[0] = done++; - return match; - }, - ATTR: function (match, curLoop, inplace, result, not, isXML) { - var name = match[1] = match[1].replace(rBackslash, ""); - if (!isXML && Expr.attrMap[name]) { - match[1] = Expr.attrMap[name]; - } - match[4] = (match[4] || match[5] || "").replace(rBackslash, ""); - if (match[2] === "~=") { - match[4] = " " + match[4] + " "; - } - return match; - }, - PSEUDO: function (match, curLoop, inplace, result, not) { - if (match[1] === "not") { - if ((chunker.exec(match[3]) || "").length > 1 || /^\w/.test(match[3])) { - match[3] = Sizzle(match[3], null, null, curLoop); - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - if (!inplace) { - result.push.apply(result, ret); - } - return false; - } - } else { - if (Expr.match.POS.test(match[0]) || Expr.match.CHILD.test(match[0])) { - return true; - } - } - return match; - }, - POS: function (match) { - match.unshift(true); - return match; - } - }, - filters: { - enabled: function (elem) { - return elem.disabled === false && elem.type !== "hidden"; - }, - disabled: function (elem) { - return elem.disabled === true; - }, - checked: function (elem) { - return elem.checked === true; - }, - selected: function (elem) { - if (elem.parentNode) { - elem.parentNode.selectedIndex; - } - return elem.selected === true; - }, - parent: function (elem) { - return !! elem.firstChild; - }, - empty: function (elem) { - return !elem.firstChild; - }, - has: function (elem, i, match) { - return !! Sizzle(match[3], elem).length; - }, - header: function (elem) { - return (/h\d/i).test(elem.nodeName); - }, - text: function (elem) { - var attr = elem.getAttribute("type"), - type = elem.type; - return elem.nodeName.toLowerCase() === "input" && "text" === type && (attr === type || attr === null); - }, - radio: function (elem) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - checkbox: function (elem) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - file: function (elem) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - password: function (elem) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - submit: function (elem) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - image: function (elem) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - reset: function (elem) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - button: function (elem) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - input: function (elem) { - return (/input|select|textarea|button/i).test(elem.nodeName); - }, - focus: function (elem) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function (elem, i) { - return i === 0; - }, - last: function (elem, i, match, array) { - return i === array.length - 1; - }, - even: function (elem, i) { - return i % 2 === 0; - }, - odd: function (elem, i) { - return i % 2 === 1; - }, - lt: function (elem, i, match) { - return i < match[3] - 0; - }, - gt: function (elem, i, match) { - return i > match[3] - 0; - }, - nth: function (elem, i, match) { - return match[3] - 0 === i; - }, - eq: function (elem, i, match) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function (elem, match, i, array) { - var name = match[1], - filter = Expr.filters[name]; - if (filter) { - return filter(elem, i, match, array); - } else { - if (name === "contains") { - return (elem.textContent || elem.innerText || getText([elem]) || "").indexOf(match[3]) >= 0; - } else { - if (name === "not") { - var not = match[3]; - for (var j = 0, l = not.length; j < l; j++) { - if (not[j] === elem) { - return false; - } - } - return true; - } else { - Sizzle.error(name); - } - } - } - }, - CHILD: function (elem, match) { - var first, last, doneName, parent, cache, count, diff, type = match[1], - node = elem; - switch (type) { - case "only": - case "first": - while ((node = node.previousSibling)) { - if (node.nodeType === 1) { - return false; - } - } - if (type === "first") { - return true; - } - node = elem; - case "last": - while ((node = node.nextSibling)) { - if (node.nodeType === 1) { - return false; - } - } - return true; - case "nth": - first = match[2]; - last = match[3]; - if (first === 1 && last === 0) { - return true; - } - doneName = match[0]; - parent = elem.parentNode; - if (parent && (parent[expando] !== doneName || !elem.nodeIndex)) { - count = 0; - for (node = parent.firstChild; node; node = node.nextSibling) { - if (node.nodeType === 1) { - node.nodeIndex = ++count; - } - } - parent[expando] = doneName; - } - diff = elem.nodeIndex - last; - if (first === 0) { - return diff === 0; - } else { - return (diff % first === 0 && diff / first >= 0); - } - } - }, - ID: function (elem, match) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - TAG: function (elem, match) { - return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; - }, - CLASS: function (elem, match) { - return (" " + (elem.className || elem.getAttribute("class")) + " ").indexOf(match) > -1; - }, - ATTR: function (elem, match) { - var name = match[1], - result = Sizzle.attr ? Sizzle.attr(elem, name) : Expr.attrHandle[name] ? Expr.attrHandle[name](elem) : elem[name] != null ? elem[name] : elem.getAttribute(name), - value = result + "", - type = match[2], - check = match[4]; - return result == null ? type === "!=" : !type && Sizzle.attr ? result != null : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value !== check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false; - }, - POS: function (elem, match, i, array) { - var name = match[2], - filter = Expr.setFilters[name]; - if (filter) { - return filter(elem, i, match, array); - } - } - } - }; - var origPOS = Expr.match.POS, - fescape = function (all, num) { - return "\\" + (num - 0 + 1); - }; - for (var type in Expr.match) { - Expr.match[type] = new RegExp(Expr.match[type].source + (/(?![^\[]*\])(?![^\(]*\))/.source)); - Expr.leftMatch[type] = new RegExp(/(^(?:.|\r|\n)*?)/.source + Expr.match[type].source.replace(/\\(\d+)/g, fescape)); - } - var makeArray = function (array, results) { - array = Array.prototype.slice.call(array, 0); - if (results) { - results.push.apply(results, array); - return results; - } - return array; - }; - try { - Array.prototype.slice.call(document.documentElement.childNodes, 0)[0].nodeType; - } catch(e) { - makeArray = function (array, results) { - var i = 0, - ret = results || []; - if (toString.call(array) === "[object Array]") { - Array.prototype.push.apply(ret, array); - } else { - if (typeof array.length === "number") { - for (var l = array.length; i < l; i++) { - ret.push(array[i]); - } - } else { - for (; array[i]; i++) { - ret.push(array[i]); - } - } - } - return ret; - }; - } - var sortOrder, siblingCheck; - if (document.documentElement.compareDocumentPosition) { - sortOrder = function (a, b) { - if (a === b) { - hasDuplicate = true; - return 0; - } - if (!a.compareDocumentPosition || !b.compareDocumentPosition) { - return a.compareDocumentPosition ? -1 : 1; - } - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - } else { - sortOrder = function (a, b) { - if (a === b) { - hasDuplicate = true; - return 0; - } else { - if (a.sourceIndex && b.sourceIndex) { - return a.sourceIndex - b.sourceIndex; - } - } - var al, bl, ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - if (aup === bup) { - return siblingCheck(a, b); - } else { - if (!aup) { - return -1; - } else { - if (!bup) { - return 1; - } - } - } - while (cur) { - ap.unshift(cur); - cur = cur.parentNode; - } - cur = bup; - while (cur) { - bp.unshift(cur); - cur = cur.parentNode; - } - al = ap.length; - bl = bp.length; - for (var i = 0; i < al && i < bl; i++) { - if (ap[i] !== bp[i]) { - return siblingCheck(ap[i], bp[i]); - } - } - return i === al ? siblingCheck(a, bp[i], -1) : siblingCheck(ap[i], b, 1); - }; - siblingCheck = function (a, b, ret) { - if (a === b) { - return ret; - } - var cur = a.nextSibling; - while (cur) { - if (cur === b) { - return -1; - } - cur = cur.nextSibling; - } - return 1; - }; - } (function () { - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - form.innerHTML = ""; - root.insertBefore(form, root.firstChild); - if (document.getElementById(id)) { - Expr.find.ID = function (match, context, isXML) { - if (typeof context.getElementById !== "undefined" && !isXML) { - var m = context.getElementById(match[1]); - return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; - } - }; - Expr.filter.ID = function (elem, match) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - root.removeChild(form); - root = form = null; - })(); - (function () { - var div = document.createElement("div"); - div.appendChild(document.createComment("")); - if (div.getElementsByTagName("*").length > 0) { - Expr.find.TAG = function (match, context) { - var results = context.getElementsByTagName(match[1]); - if (match[1] === "*") { - var tmp = []; - for (var i = 0; results[i]; i++) { - if (results[i].nodeType === 1) { - tmp.push(results[i]); - } - } - results = tmp; - } - return results; - }; - } - div.innerHTML = ""; - if (div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#") { - Expr.attrHandle.href = function (elem) { - return elem.getAttribute("href", 2); - }; - } - div = null; - })(); - if (document.querySelectorAll) { - (function () { - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - div.innerHTML = "

              "; - if (div.querySelectorAll && div.querySelectorAll(".TEST").length === 0) { - return; - } - Sizzle = function (query, context, extra, seed) { - context = context || document; - if (!seed && !Sizzle.isXML(context)) { - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query); - if (match && (context.nodeType === 1 || context.nodeType === 9)) { - if (match[1]) { - return makeArray(context.getElementsByTagName(query), extra); - } else { - if (match[2] && Expr.find.CLASS && context.getElementsByClassName) { - return makeArray(context.getElementsByClassName(match[2]), extra); - } - } - } - if (context.nodeType === 9) { - if (query === "body" && context.body) { - return makeArray([context.body], extra); - } else { - if (match && match[3]) { - var elem = context.getElementById(match[3]); - if (elem && elem.parentNode) { - if (elem.id === match[3]) { - return makeArray([elem], extra); - } - } else { - return makeArray([], extra); - } - } - } - try { - return makeArray(context.querySelectorAll(query), extra); - } catch(qsaError) {} - } else { - if (context.nodeType === 1 && context.nodeName.toLowerCase() !== "object") { - var oldContext = context, - old = context.getAttribute("id"), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test(query); - if (!old) { - context.setAttribute("id", nid); - } else { - nid = nid.replace(/'/g, "\\$&"); - } - if (relativeHierarchySelector && hasParent) { - context = context.parentNode; - } - try { - if (!relativeHierarchySelector || hasParent) { - return makeArray(context.querySelectorAll("[id='" + nid + "'] " + query), extra); - } - } catch(pseudoError) {} finally { - if (!old) { - oldContext.removeAttribute("id"); - } - } - } - } - } - return oldSizzle(query, context, extra, seed); - }; - for (var prop in oldSizzle) { - Sizzle[prop] = oldSizzle[prop]; - } - div = null; - })(); - } (function () { - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - if (matches) { - var disconnectedMatch = !matches.call(document.createElement("div"), "div"), - pseudoWorks = false; - try { - matches.call(document.documentElement, "[test!='']:sizzle"); - } catch(pseudoError) { - pseudoWorks = true; - } - Sizzle.matchesSelector = function (node, expr) { - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - if (!Sizzle.isXML(node)) { - try { - if (pseudoWorks || !Expr.match.PSEUDO.test(expr) && !/!=/.test(expr)) { - var ret = matches.call(node, expr); - if (ret || !disconnectedMatch || node.document && node.document.nodeType !== 11) { - return ret; - } - } - } catch(e) {} - } - return Sizzle(expr, null, null, [node]).length > 0; - }; - } - })(); - (function () { - var div = document.createElement("div"); - div.innerHTML = "
              "; - if (!div.getElementsByClassName || div.getElementsByClassName("e").length === 0) { - return; - } - div.lastChild.className = "e"; - if (div.getElementsByClassName("e").length === 1) { - return; - } - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function (match, context, isXML) { - if (typeof context.getElementsByClassName !== "undefined" && !isXML) { - return context.getElementsByClassName(match[1]); - } - }; - div = null; - })(); - function dirNodeCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) { - for (var i = 0, l = checkSet.length; i < l; i++) { - var elem = checkSet[i]; - if (elem) { - var match = false; - elem = elem[dir]; - while (elem) { - if (elem[expando] === doneName) { - match = checkSet[elem.sizset]; - break; - } - if (elem.nodeType === 1 && !isXML) { - elem[expando] = doneName; - elem.sizset = i; - } - if (elem.nodeName.toLowerCase() === cur) { - match = elem; - break; - } - elem = elem[dir]; - } - checkSet[i] = match; - } - } - } - function dirCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) { - for (var i = 0, l = checkSet.length; i < l; i++) { - var elem = checkSet[i]; - if (elem) { - var match = false; - elem = elem[dir]; - while (elem) { - if (elem[expando] === doneName) { - match = checkSet[elem.sizset]; - break; - } - if (elem.nodeType === 1) { - if (!isXML) { - elem[expando] = doneName; - elem.sizset = i; - } - if (typeof cur !== "string") { - if (elem === cur) { - match = true; - break; - } - } else { - if (Sizzle.filter(cur, [elem]).length > 0) { - match = elem; - break; - } - } - } - elem = elem[dir]; - } - checkSet[i] = match; - } - } - } - if (document.documentElement.contains) { - Sizzle.contains = function (a, b) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - } else { - if (document.documentElement.compareDocumentPosition) { - Sizzle.contains = function (a, b) { - return !! (a.compareDocumentPosition(b) & 16); - }; - } else { - Sizzle.contains = function () { - return false; - }; - } - } - Sizzle.isXML = function (elem) { - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; - }; - var posProcess = function (selector, context, seed) { - var match, tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - while ((match = Expr.match.PSEUDO.exec(selector))) { - later += match[0]; - selector = selector.replace(Expr.match.PSEUDO, ""); - } - selector = Expr.relative[selector] ? selector + "*" : selector; - for (var i = 0, l = root.length; i < l; i++) { - Sizzle(selector, root[i], tmpSet, seed); - } - return Sizzle.filter(later, tmpSet); - }; - Sizzle.attr = jQuery.attr; - Sizzle.selectors.attrMap = {}; - jQuery.find = Sizzle; - jQuery.expr = Sizzle.selectors; - jQuery.expr[":"] = jQuery.expr.filters; - jQuery.unique = Sizzle.uniqueSort; - jQuery.text = Sizzle.getText; - jQuery.isXMLDoc = Sizzle.isXML; - jQuery.contains = Sizzle.contains; - })(); - var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS, - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - jQuery.fn.extend({ - find: function (selector) { - var self = this, - i, l; - if (typeof selector !== "string") { - return jQuery(selector).filter(function () { - for (i = 0, l = self.length; i < l; i++) { - if (jQuery.contains(self[i], this)) { - return true; - } - } - }); - } - var ret = this.pushStack("", "find", selector), - length, - n, - r; - for (i = 0, l = this.length; i < l; i++) { - length = ret.length; - jQuery.find(selector, this[i], ret); - if (i > 0) { - for (n = length; n < ret.length; n++) { - for (r = 0; r < length; r++) { - if (ret[r] === ret[n]) { - ret.splice(n--, 1); - break; - } - } - } - } - } - return ret; - }, - has: function (target) { - var targets = jQuery(target); - return this.filter(function () { - for (var i = 0, l = targets.length; i < l; i++) { - if (jQuery.contains(this, targets[i])) { - return true; - } - } - }); - }, - not: function (selector) { - return this.pushStack(winnow(this, selector, false), "not", selector); - }, - filter: function (selector) { - return this.pushStack(winnow(this, selector, true), "filter", selector); - }, - is: function (selector) { - return !! selector && (typeof selector === "string" ? POS.test(selector) ? jQuery(selector, this.context).index(this[0]) >= 0 : jQuery.filter(selector, this).length > 0 : this.filter(selector).length > 0); - }, - closest: function (selectors, context) { - var ret = [], - i, - l, - cur = this[0]; - if (jQuery.isArray(selectors)) { - var level = 1; - while (cur && cur.ownerDocument && cur !== context) { - for (i = 0; i < selectors.length; i++) { - if (jQuery(cur).is(selectors[i])) { - ret.push({ - selector: selectors[i], - elem: cur, - level: level - }); - } - } - cur = cur.parentNode; - level++; - } - return ret; - } - var pos = POS.test(selectors) || typeof selectors !== "string" ? jQuery(selectors, context || this.context) : 0; - for (i = 0, l = this.length; i < l; i++) { - cur = this[i]; - while (cur) { - if (pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors)) { - ret.push(cur); - break; - } else { - cur = cur.parentNode; - if (!cur || !cur.ownerDocument || cur === context || cur.nodeType === 11) { - break; - } - } - } - } - ret = ret.length > 1 ? jQuery.unique(ret) : ret; - return this.pushStack(ret, "closest", selectors); - }, - index: function (elem) { - if (!elem) { - return (this[0] && this[0].parentNode) ? this.prevAll().length : -1; - } - if (typeof elem === "string") { - return jQuery.inArray(this[0], jQuery(elem)); - } - return jQuery.inArray(elem.jquery ? elem[0] : elem, this); - }, - add: function (selector, context) { - var set = typeof selector === "string" ? jQuery(selector, context) : jQuery.makeArray(selector && selector.nodeType ? [selector] : selector), - all = jQuery.merge(this.get(), set); - return this.pushStack(isDisconnected(set[0]) || isDisconnected(all[0]) ? all : jQuery.unique(all)); - }, - andSelf: function () { - return this.add(this.prevObject); - } - }); - function isDisconnected(node) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; - } - jQuery.each({ - parent: function (elem) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function (elem) { - return jQuery.dir(elem, "parentNode"); - }, - parentsUntil: function (elem, i, until) { - return jQuery.dir(elem, "parentNode", until); - }, - next: function (elem) { - return jQuery.nth(elem, 2, "nextSibling"); - }, - prev: function (elem) { - return jQuery.nth(elem, 2, "previousSibling"); - }, - nextAll: function (elem) { - return jQuery.dir(elem, "nextSibling"); - }, - prevAll: function (elem) { - return jQuery.dir(elem, "previousSibling"); - }, - nextUntil: function (elem, i, until) { - return jQuery.dir(elem, "nextSibling", until); - }, - prevUntil: function (elem, i, until) { - return jQuery.dir(elem, "previousSibling", until); - }, - siblings: function (elem) { - return jQuery.sibling(elem.parentNode.firstChild, elem); - }, - children: function (elem) { - return jQuery.sibling(elem.firstChild); - }, - contents: function (elem) { - return jQuery.nodeName(elem, "iframe") ? elem.contentDocument || elem.contentWindow.document : jQuery.makeArray(elem.childNodes); - } - }, - function (name, fn) { - jQuery.fn[name] = function (until, selector) { - var ret = jQuery.map(this, fn, until); - if (!runtil.test(name)) { - selector = until; - } - if (selector && typeof selector === "string") { - ret = jQuery.filter(selector, ret); - } - ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret; - if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) { - ret = ret.reverse(); - } - return this.pushStack(ret, name, slice.call(arguments).join(",")); - }; - }); - jQuery.extend({ - filter: function (expr, elems, not) { - if (not) { - expr = ":not(" + expr + ")"; - } - return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [] : jQuery.find.matches(expr, elems); - }, - dir: function (elem, dir, until) { - var matched = [], - cur = elem[dir]; - while (cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery(cur).is(until))) { - if (cur.nodeType === 1) { - matched.push(cur); - } - cur = cur[dir]; - } - return matched; - }, - nth: function (cur, result, dir, elem) { - result = result || 1; - var num = 0; - for (; cur; cur = cur[dir]) { - if (cur.nodeType === 1 && ++num === result) { - break; - } - } - return cur; - }, - sibling: function (n, elem) { - var r = []; - for (; n; n = n.nextSibling) { - if (n.nodeType === 1 && n !== elem) { - r.push(n); - } - } - return r; - } - }); - function winnow(elements, qualifier, keep) { - qualifier = qualifier || 0; - if (jQuery.isFunction(qualifier)) { - return jQuery.grep(elements, function (elem, i) { - var retVal = !!qualifier.call(elem, i, elem); - return retVal === keep; - }); - } else { - if (qualifier.nodeType) { - return jQuery.grep(elements, function (elem, i) { - return (elem === qualifier) === keep; - }); - } else { - if (typeof qualifier === "string") { - var filtered = jQuery.grep(elements, function (elem) { - return elem.nodeType === 1; - }); - if (isSimple.test(qualifier)) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter(qualifier, filtered); - } - } - } - } - return jQuery.grep(elements, function (elem, i) { - return (jQuery.inArray(elem, qualifier) >= 0) === keep; - }); - } - function createSafeFragment(document) { - var list = nodeNames.split("|"), - safeFrag = document.createDocumentFragment(); - if (safeFrag.createElement) { - while (list.length) { - safeFrag.createElement(list.pop()); - } - } - return safeFrag; - } - var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /", ""], - legend: [1, "
              ", "
              "], - thead: [1, "", "
              "], - tr: [2, "", "
              "], - td: [3, "", "
              "], - col: [2, "", "
              "], - area: [1, "", ""], - _default: [0, "", ""] - }, - safeFragment = createSafeFragment(document); - wrapMap.optgroup = wrapMap.option; - wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; - wrapMap.th = wrapMap.td; - if (!jQuery.support.htmlSerialize) { - wrapMap._default = [1, "div
              ", "
              "]; - } - jQuery.fn.extend({ - text: function (text) { - if (jQuery.isFunction(text)) { - return this.each(function (i) { - var self = jQuery(this); - self.text(text.call(this, i, self.text())); - }); - } - if (typeof text !== "object" && text !== undefined) { - return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(text)); - } - return jQuery.text(this); - }, - wrapAll: function (html) { - if (jQuery.isFunction(html)) { - return this.each(function (i) { - jQuery(this).wrapAll(html.call(this, i)); - }); - } - if (this[0]) { - var wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true); - if (this[0].parentNode) { - wrap.insertBefore(this[0]); - } - wrap.map(function () { - var elem = this; - while (elem.firstChild && elem.firstChild.nodeType === 1) { - elem = elem.firstChild; - } - return elem; - }).append(this); - } - return this; - }, - wrapInner: function (html) { - if (jQuery.isFunction(html)) { - return this.each(function (i) { - jQuery(this).wrapInner(html.call(this, i)); - }); - } - return this.each(function () { - var self = jQuery(this), - contents = self.contents(); - if (contents.length) { - contents.wrapAll(html); - } else { - self.append(html); - } - }); - }, - wrap: function (html) { - var isFunction = jQuery.isFunction(html); - return this.each(function (i) { - jQuery(this).wrapAll(isFunction ? html.call(this, i) : html); - }); - }, - unwrap: function () { - return this.parent().each(function () { - if (!jQuery.nodeName(this, "body")) { - jQuery(this).replaceWith(this.childNodes); - } - }).end(); - }, - append: function () { - return this.domManip(arguments, true, function (elem) { - if (this.nodeType === 1) { - this.appendChild(elem); - } - }); - }, - prepend: function () { - return this.domManip(arguments, true, function (elem) { - if (this.nodeType === 1) { - this.insertBefore(elem, this.firstChild); - } - }); - }, - before: function () { - if (this[0] && this[0].parentNode) { - return this.domManip(arguments, false, function (elem) { - this.parentNode.insertBefore(elem, this); - }); - } else { - if (arguments.length) { - var set = jQuery.clean(arguments); - set.push.apply(set, this.toArray()); - return this.pushStack(set, "before", arguments); - } - } - }, - after: function () { - if (this[0] && this[0].parentNode) { - return this.domManip(arguments, false, function (elem) { - this.parentNode.insertBefore(elem, this.nextSibling); - }); - } else { - if (arguments.length) { - var set = this.pushStack(this, "after", arguments); - set.push.apply(set, jQuery.clean(arguments)); - return set; - } - } - }, - remove: function (selector, keepData) { - for (var i = 0, elem; - (elem = this[i]) != null; i++) { - if (!selector || jQuery.filter(selector, [elem]).length) { - if (!keepData && elem.nodeType === 1) { - jQuery.cleanData(elem.getElementsByTagName("*")); - jQuery.cleanData([elem]); - } - if (elem.parentNode) { - elem.parentNode.removeChild(elem); - } - } - } - return this; - }, - empty: function () { - for (var i = 0, elem; - (elem = this[i]) != null; i++) { - if (elem.nodeType === 1) { - jQuery.cleanData(elem.getElementsByTagName("*")); - } - while (elem.firstChild) { - elem.removeChild(elem.firstChild); - } - } - return this; - }, - clone: function (dataAndEvents, deepDataAndEvents) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - return this.map(function () { - return jQuery.clone(this, dataAndEvents, deepDataAndEvents); - }); - }, - html: function (value) { - if (value === undefined) { - return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(rinlinejQuery, "") : null; - } else { - if (typeof value === "string" && !rnoInnerhtml.test(value) && (jQuery.support.leadingWhitespace || !rleadingWhitespace.test(value)) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { - value = value.replace(rxhtmlTag, "<$1>"); - try { - for (var i = 0, l = this.length; i < l; i++) { - if (this[i].nodeType === 1) { - jQuery.cleanData(this[i].getElementsByTagName("*")); - this[i].innerHTML = value; - } - } - } catch(e) { - this.empty().append(value); - } - } else { - if (jQuery.isFunction(value)) { - this.each(function (i) { - var self = jQuery(this); - self.html(value.call(this, i, self.html())); - }); - } else { - this.empty().append(value); - } - } - } - return this; - }, - replaceWith: function (value) { - if (this[0] && this[0].parentNode) { - if (jQuery.isFunction(value)) { - return this.each(function (i) { - var self = jQuery(this), - old = self.html(); - self.replaceWith(value.call(this, i, old)); - }); - } - if (typeof value !== "string") { - value = jQuery(value).detach(); - } - return this.each(function () { - var next = this.nextSibling, - parent = this.parentNode; - jQuery(this).remove(); - if (next) { - jQuery(next).before(value); - } else { - jQuery(parent).append(value); - } - }); - } else { - return this.length ? this.pushStack(jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value) : this; - } - }, - detach: function (selector) { - return this.remove(selector, true); - }, - domManip: function (args, table, callback) { - var results, first, fragment, parent, value = args[0], - scripts = []; - if (!jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test(value)) { - return this.each(function () { - jQuery(this).domManip(args, table, callback, true); - }); - } - if (jQuery.isFunction(value)) { - return this.each(function (i) { - var self = jQuery(this); - args[0] = value.call(this, i, table ? self.html() : undefined); - self.domManip(args, table, callback); - }); - } - if (this[0]) { - parent = value && value.parentNode; - if (jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length) { - results = { - fragment: parent - }; - } else { - results = jQuery.buildFragment(args, this, scripts); - } - fragment = results.fragment; - if (fragment.childNodes.length === 1) { - first = fragment = fragment.firstChild; - } else { - first = fragment.firstChild; - } - if (first) { - table = table && jQuery.nodeName(first, "tr"); - for (var i = 0, l = this.length, lastIndex = l - 1; i < l; i++) { - callback.call(table ? root(this[i], first) : this[i], results.cacheable || (l > 1 && i < lastIndex) ? jQuery.clone(fragment, true, true) : fragment); - } - } - if (scripts.length) { - jQuery.each(scripts, evalScript); - } - } - return this; - } - }); - function root(elem, cur) { - return jQuery.nodeName(elem, "table") ? (elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody"))) : elem; - } - function cloneCopyEvent(src, dest) { - if (dest.nodeType !== 1 || !jQuery.hasData(src)) { - return; - } - var type, i, l, oldData = jQuery._data(src), - curData = jQuery._data(dest, oldData), - events = oldData.events; - if (events) { - delete curData.handle; - curData.events = {}; - for (type in events) { - for (i = 0, l = events[type].length; i < l; i++) { - jQuery.event.add(dest, type + (events[type][i].namespace ? "." : "") + events[type][i].namespace, events[type][i], events[type][i].data); - } - } - } - if (curData.data) { - curData.data = jQuery.extend({}, - curData.data); - } - } - function cloneFixAttributes(src, dest) { - var nodeName; - if (dest.nodeType !== 1) { - return; - } - if (dest.clearAttributes) { - dest.clearAttributes(); - } - if (dest.mergeAttributes) { - dest.mergeAttributes(src); - } - nodeName = dest.nodeName.toLowerCase(); - if (nodeName === "object") { - dest.outerHTML = src.outerHTML; - } else { - if (nodeName === "input" && (src.type === "checkbox" || src.type === "radio")) { - if (src.checked) { - dest.defaultChecked = dest.checked = src.checked; - } - if (dest.value !== src.value) { - dest.value = src.value; - } - } else { - if (nodeName === "option") { - dest.selected = src.defaultSelected; - } else { - if (nodeName === "input" || nodeName === "textarea") { - dest.defaultValue = src.defaultValue; - } - } - } - } - dest.removeAttribute(jQuery.expando); - } - jQuery.buildFragment = function (args, nodes, scripts) { - var fragment, cacheable, cacheresults, doc, first = args[0]; - doc = document; - if (args.length === 1 && typeof first === "string" && first.length < 512 && doc === document && first.charAt(0) === "<" && !rnocache.test(first) && (jQuery.support.checkClone || !rchecked.test(first)) && (jQuery.support.html5Clone || !rnoshimcache.test(first))) { - cacheable = true; - cacheresults = jQuery.fragments[first]; - if (cacheresults && cacheresults !== 1) { - fragment = cacheresults; - } - } - if (!fragment) { - fragment = doc.createDocumentFragment(); - jQuery.clean(args, doc, fragment, scripts); - } - if (cacheable) { - jQuery.fragments[first] = cacheresults ? fragment : 1; - } - return { - fragment: fragment, - cacheable: cacheable - }; - }; - jQuery.fragments = {}; - jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" - }, - function (name, original) { - jQuery.fn[name] = function (selector) { - var ret = [], - insert = jQuery(selector), - parent = this.length === 1 && this[0].parentNode; - if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) { - insert[original](this[0]); - return this; - } else { - for (var i = 0, l = insert.length; i < l; i++) { - var elems = (i > 0 ? this.clone(true) : this).get(); - jQuery(insert[i])[original](elems); - ret = ret.concat(elems); - } - return this.pushStack(ret, name, insert.selector); - } - }; - }); - function getAll(elem) { - if (typeof elem.getElementsByTagName !== "undefined") { - return elem.getElementsByTagName("*"); - } else { - if (typeof elem.querySelectorAll !== "undefined") { - return elem.querySelectorAll("*"); - } else { - return []; - } - } - } - function fixDefaultChecked(elem) { - if (elem.type === "checkbox" || elem.type === "radio") { - elem.defaultChecked = elem.checked; - } - } - function findInputs(elem) { - var nodeName = (elem.nodeName || "").toLowerCase(); - if (nodeName === "input") { - fixDefaultChecked(elem); - } else { - if (nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined") { - jQuery.grep(elem.getElementsByTagName("input"), fixDefaultChecked); - } - } - } - function shimCloneNode(elem) { - var div = document.createElement("div"); - safeFragment.appendChild(div); - div.innerHTML = elem.outerHTML; - return div.firstChild; - } - jQuery.extend({ - clone: function (elem, dataAndEvents, deepDataAndEvents) { - return elem; - }, - clean: function (elems, context, fragment, scripts) { - return []; - }, - cleanData: function (elems) { - var data, id, cache = jQuery.cache, - special = jQuery.event.special, - deleteExpando = jQuery.support.deleteExpando; - for (var i = 0, elem; - (elem = elems[i]) != null; i++) { - if (elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) { - continue; - } - id = elem[jQuery.expando]; - if (id) { - data = cache[id]; - if (data && data.events) { - for (var type in data.events) { - if (special[type]) { - jQuery.event.remove(elem, type); - } else { - jQuery.removeEvent(elem, type, data.handle); - } - } - if (data.handle) { - data.handle.elem = null; - } - } - if (deleteExpando) { - delete elem[jQuery.expando]; - } else { - if (elem.removeAttribute) { - elem.removeAttribute(jQuery.expando); - } - } - delete cache[id]; - } - } - } - }); - function evalScript(i, elem) { - if (elem.src) { - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - } else { - jQuery.globalEval((elem.text || elem.textContent || elem.innerHTML || "").replace(rcleanScript, "/*$0*/")); - } - if (elem.parentNode) { - elem.parentNode.removeChild(elem); - } - } - var ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - rupper = /([A-Z]|^ms)/g, - rnumpx = /^-?\d+(?:px)?$/i, - rnum = /^-?\d/, - rrelNum = /^([\-+])=([\-+.\de]+)/, - cssShow = { - position: "absolute", - visibility: "hidden", - display: "block" - }, - cssWidth = ["Left", "Right"], - cssHeight = ["Top", "Bottom"], - curCSS, - getComputedStyle, - currentStyle; - jQuery.fn.css = function (name, value) { - if (arguments.length === 2 && value === undefined) { - return this; - } - return jQuery.access(this, name, value, true, function (elem, name, value) { - return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name); - }); - }; - jQuery.extend({ - cssHooks: { - opacity: { - get: function (elem, computed) { - if (computed) { - var ret = curCSS(elem, "opacity", "opacity"); - return ret === "" ? "1" : ret; - } else { - return elem.style.opacity; - } - } - } - }, - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - cssProps: { - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - style: function (elem, name, value, extra) { - if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { - return; - } - var ret, type, origName = jQuery.camelCase(name), - style = elem.style, - hooks = jQuery.cssHooks[origName]; - name = jQuery.cssProps[origName] || origName; - if (value !== undefined) { - type = typeof value; - if (type === "string" && (ret = rrelNum.exec(value))) { - value = (+(ret[1] + 1) * +ret[2]) + parseFloat(jQuery.css(elem, name)); - type = "number"; - } - if (value == null || type === "number" && isNaN(value)) { - return; - } - if (type === "number" && !jQuery.cssNumber[origName]) { - value += "px"; - } - if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value)) !== undefined) { - try { - style[name] = value; - } catch(e) {} - } - } else { - if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) { - return ret; - } - return style[name]; - } - }, - css: function (elem, name, extra) { - var ret, hooks; - name = jQuery.camelCase(name); - hooks = jQuery.cssHooks[name]; - name = jQuery.cssProps[name] || name; - if (name === "cssFloat") { - name = "float"; - } - if (hooks && "get" in hooks && (ret = hooks.get(elem, true, extra)) !== undefined) { - return ret; - } else { - if (curCSS) { - return curCSS(elem, name); - } - } - }, - swap: function (elem, options, callback) { - var old = {}; - for (var name in options) { - old[name] = elem.style[name]; - elem.style[name] = options[name]; - } - callback.call(elem); - for (name in options) { - elem.style[name] = old[name]; - } - } - }); - jQuery.curCSS = jQuery.css; - jQuery.each(["height", "width"], function (i, name) { - jQuery.cssHooks[name] = { - get: function (elem, computed, extra) { - var val; - if (computed) { - if (elem.offsetWidth !== 0) { - return getWH(elem, name, extra); - } else { - jQuery.swap(elem, cssShow, function () { - val = getWH(elem, name, extra); - }); - } - return val; - } - }, - set: function (elem, value) { - if (rnumpx.test(value)) { - value = parseFloat(value); - if (value >= 0) { - return value + "px"; - } - } else { - return value; - } - } - }; - }); - if (!jQuery.support.opacity) { - jQuery.cssHooks.opacity = { - get: function (elem, computed) { - return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ? (parseFloat(RegExp.$1) / 100) + "" : computed ? "1" : ""; - }, - set: function (elem, value) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric(value) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - style.zoom = 1; - if (value >= 1 && jQuery.trim(filter.replace(ralpha, "")) === "") { - style.removeAttribute("filter"); - if (currentStyle && !currentStyle.filter) { - return; - } - } - style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : filter + " " + opacity; - } - }; - } - jQuery(function () { - if (!jQuery.support.reliableMarginRight) { - jQuery.cssHooks.marginRight = { - get: function (elem, computed) { - var ret; - jQuery.swap(elem, { - "display": "inline-block" - }, - function () { - if (computed) { - ret = curCSS(elem, "margin-right", "marginRight"); - } else { - ret = elem.style.marginRight; - } - }); - return ret; - } - }; - } - }); - if (document.defaultView && document.defaultView.getComputedStyle) { - getComputedStyle = function (elem, name) { - var ret, defaultView, computedStyle; - name = name.replace(rupper, "-$1").toLowerCase(); - if ((defaultView = elem.ownerDocument.defaultView) && (computedStyle = defaultView.getComputedStyle(elem, null))) { - ret = computedStyle.getPropertyValue(name); - if (ret === "" && !jQuery.contains(elem.ownerDocument.documentElement, elem)) { - ret = jQuery.style(elem, name); - } - } - return ret; - }; - } - if (document.documentElement.currentStyle) { - currentStyle = function (elem, name) { - var left, rsLeft, uncomputed, ret = elem.currentStyle && elem.currentStyle[name], - style = elem.style; - if (ret === null && style && (uncomputed = style[name])) { - ret = uncomputed; - } - if (!rnumpx.test(ret) && rnum.test(ret)) { - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - if (rsLeft) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : (ret || 0); - ret = style.pixelLeft + "px"; - style.left = left; - if (rsLeft) { - elem.runtimeStyle.left = rsLeft; - } - } - return ret === "" ? "auto" : ret; - }; - } - curCSS = getComputedStyle || currentStyle; - function getWH(elem, name, extra) { - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - which = name === "width" ? cssWidth : cssHeight, - i = 0, - len = which.length; - if (val > 0) { - if (extra !== "border") { - for (; i < len; i++) { - if (!extra) { - val -= parseFloat(jQuery.css(elem, "padding" + which[i])) || 0; - } - if (extra === "margin") { - val += parseFloat(jQuery.css(elem, extra + which[i])) || 0; - } else { - val -= parseFloat(jQuery.css(elem, "border" + which[i] + "Width")) || 0; - } - } - } - return val + "px"; - } - val = curCSS(elem, name, name); - if (val < 0 || val == null) { - val = elem.style[name] || 0; - } - val = parseFloat(val) || 0; - if (extra) { - for (; i < len; i++) { - val += parseFloat(jQuery.css(elem, "padding" + which[i])) || 0; - if (extra !== "padding") { - val += parseFloat(jQuery.css(elem, "border" + which[i] + "Width")) || 0; - } - if (extra === "margin") { - val += parseFloat(jQuery.css(elem, extra + which[i])) || 0; - } - } - } - return val + "px"; - } - if (jQuery.expr && jQuery.expr.filters) { - jQuery.expr.filters.hidden = function (elem) { - var width = elem.offsetWidth, - height = elem.offsetHeight; - return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css(elem, "display")) === "none"); - }; - jQuery.expr.filters.visible = function (elem) { - return !jQuery.expr.filters.hidden(elem); - }; - } - var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /)<[^<]*)*<\/script>/gi, - rselectTextarea = /^(?:select|textarea)/i, - rspacesAjax = /\s+/, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, - _load = jQuery.fn.load, - prefilters = {}, - transports = {}, - ajaxLocation, ajaxLocParts, allTypes = ["*/"] + ["*"]; - try { - ajaxLocation = location.href; - } catch(e) { - ajaxLocation = document.createElement("a"); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; - } - ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || []; - function addToPrefiltersOrTransports(structure) { - return function (dataTypeExpression, func) { - if (typeof dataTypeExpression !== "string") { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - if (jQuery.isFunction(func)) { - var dataTypes = dataTypeExpression.toLowerCase().split(rspacesAjax), - i = 0, - length = dataTypes.length, - dataType, - list, - placeBefore; - for (; i < length; i++) { - dataType = dataTypes[i]; - placeBefore = /^\+/.test(dataType); - if (placeBefore) { - dataType = dataType.substr(1) || "*"; - } - list = structure[dataType] = structure[dataType] || []; - list[placeBefore ? "unshift" : "push"](func); - } - } - }; - } - function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR, dataType, inspected) { - dataType = dataType || options.dataTypes[0]; - inspected = inspected || {}; - inspected[dataType] = true; - var list = structure[dataType], - i = 0, - length = list ? list.length : 0, - executeOnly = (structure === prefilters), - selection; - for (; i < length && (executeOnly || !selection); i++) { - selection = list[i](options, originalOptions, jqXHR); - if (typeof selection === "string") { - if (!executeOnly || inspected[selection]) { - selection = undefined; - } else { - options.dataTypes.unshift(selection); - selection = inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR, selection, inspected); - } - } - } - if ((executeOnly || !selection) && !inspected["*"]) { - selection = inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR, "*", inspected); - } - return selection; - } - function ajaxExtend(target, src) { - var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for (key in src) { - if (src[key] !== undefined) { - (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key]; - } - } - if (deep) { - jQuery.extend(true, target, deep); - } - } - jQuery.fn.extend({ - load: function (url, params, callback) { - if (typeof url !== "string" && _load) { - return _load.apply(this, arguments); - } else { - if (!this.length) { - return this; - } - } - var off = url.indexOf(" "); - if (off >= 0) { - var selector = url.slice(off, url.length); - url = url.slice(0, off); - } - var type = "GET"; - if (params) { - if (jQuery.isFunction(params)) { - callback = params; - params = undefined; - } else { - if (typeof params === "object") { - params = jQuery.param(params, jQuery.ajaxSettings.traditional); - type = "POST"; - } - } - } - var self = this; - jQuery.ajax({ - url: url, - type: type, - dataType: "html", - data: params, - complete: function (jqXHR, status, responseText) { - responseText = jqXHR.responseText; - if (jqXHR.isResolved()) { - jqXHR.done(function (r) { - responseText = r; - }); - self.html(selector ? jQuery("
              ").append(responseText.replace(rscript, "")).find(selector) : responseText); - } - if (callback) { - self.each(callback, [responseText, status, jqXHR]); - } - } - }); - return this; - }, - serialize: function () { - return jQuery.param(this.serializeArray()); - }, - serializeArray: function () { - return this.map(function () { - return this.elements ? jQuery.makeArray(this.elements) : this; - }).filter(function () { - return this.name && !this.disabled && (this.checked || rselectTextarea.test(this.nodeName) || rinput.test(this.type)); - }).map(function (i, elem) { - var val = jQuery(this).val(); - return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function (val, i) { - return { - name: elem.name, - value: val.replace(rCRLF, "\r\n") - }; - }) : { - name: elem.name, - value: val.replace(rCRLF, "\r\n") - }; - }).get(); - } - }); - jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (i, o) { - jQuery.fn[o] = function (f) { - return this.on(o, f); - }; - }); - jQuery.each(["get", "post"], function (i, method) { - jQuery[method] = function (url, data, callback, type) { - if (jQuery.isFunction(data)) { - type = type || callback; - callback = data; - data = undefined; - } - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; - }); - jQuery.extend({ - getScript: function (url, callback) { - return jQuery.get(url, undefined, callback, "script"); - }, - getJSON: function (url, data, callback) { - return jQuery.get(url, data, callback, "json"); - }, - ajaxSetup: function (target, settings) { - if (settings) { - ajaxExtend(target, jQuery.ajaxSettings); - } else { - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend(target, settings); - return target; - }, - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test(ajaxLocParts[1]), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded", - processData: true, - async: true, - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - responseFields: { - xml: "responseXML", - text: "responseText" - }, - converters: { - "* text": window.String, - "text html": true, - "text json": jQuery.parseJSON, - "text xml": jQuery.parseXML - }, - flatOptions: { - context: true, - url: true - } - }, - ajaxPrefilter: addToPrefiltersOrTransports(prefilters), - ajaxTransport: addToPrefiltersOrTransports(transports), - ajax: function (url, options) { - if (typeof url === "object") { - options = url; - url = undefined; - } - options = options || {}; - var s = jQuery.ajaxSetup({}, - options), - callbackContext = s.context || s, - globalEventContext = callbackContext !== s && (callbackContext.nodeType || callbackContext instanceof jQuery) ? jQuery(callbackContext) : jQuery.event, - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks("once memory"), - statusCode = s.statusCode || {}, - ifModifiedKey, - requestHeaders = {}, - requestHeadersNames = {}, - responseHeadersString, - responseHeaders, - transport, - timeoutTimer, - parts, - state = 0, - fireGlobals, - i, - jqXHR = { - readyState: 0, - setRequestHeader: function (name, value) { - if (!state) { - var lname = name.toLowerCase(); - name = requestHeadersNames[lname] = requestHeadersNames[lname] || name; - requestHeaders[name] = value; - } - return this; - }, - getAllResponseHeaders: function () { - return state === 2 ? responseHeadersString : null; - }, - getResponseHeader: function (key) { - var match; - if (state === 2) { - if (!responseHeaders) { - responseHeaders = {}; - while ((match = rheaders.exec(responseHeadersString))) { - responseHeaders[match[1].toLowerCase()] = match[2]; - } - } - match = responseHeaders[key.toLowerCase()]; - } - return match === undefined ? null : match; - }, - overrideMimeType: function (type) { - if (!state) { - s.mimeType = type; - } - return this; - }, - abort: function (statusText) { - statusText = statusText || "abort"; - if (transport) { - transport.abort(statusText); - } - done(0, statusText); - return this; - } - }; - function done(status, nativeStatusText, responses, headers) { - if (state === 2) { - return; - } - state = 2; - if (timeoutTimer) { - clearTimeout(timeoutTimer); - } - transport = undefined; - responseHeadersString = headers || ""; - jqXHR.readyState = status > 0 ? 4 : 0; - var isSuccess, success, error, statusText = nativeStatusText, - response = responses ? ajaxHandleResponses(s, jqXHR, responses) : undefined, - lastModified, - etag; - if (status >= 200 && status < 300 || status === 304) { - if (s.ifModified) { - if ((lastModified = jqXHR.getResponseHeader("Last-Modified"))) { - jQuery.lastModified[ifModifiedKey] = lastModified; - } - if ((etag = jqXHR.getResponseHeader("Etag"))) { - jQuery.etag[ifModifiedKey] = etag; - } - } - if (status === 304) { - statusText = "notmodified"; - isSuccess = true; - } else { - try { - success = ajaxConvert(s, response); - statusText = "success"; - isSuccess = true; - } catch(e) { - statusText = "parsererror"; - error = e; - } - } - } else { - error = statusText; - if (!statusText || status) { - statusText = "error"; - if (status < 0) { - status = 0; - } - } - } - jqXHR.status = status; - jqXHR.statusText = "" + (nativeStatusText || statusText); - if (isSuccess) { - deferred.resolveWith(callbackContext, [success, statusText, jqXHR]); - } else { - deferred.rejectWith(callbackContext, [jqXHR, statusText, error]); - } - jqXHR.statusCode(statusCode); - statusCode = undefined; - if (fireGlobals) { - globalEventContext.trigger("ajax" + (isSuccess ? "Success" : "Error"), [jqXHR, s, isSuccess ? success : error]); - } - completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); - if (fireGlobals) { - globalEventContext.trigger("ajaxComplete", [jqXHR, s]); - if (! (--jQuery.active)) { - jQuery.event.trigger("ajaxStop"); - } - } - } - deferred.promise(jqXHR); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - jqXHR.statusCode = function (map) { - if (map) { - var tmp; - if (state < 2) { - for (tmp in map) { - statusCode[tmp] = [statusCode[tmp], map[tmp]]; - } - } else { - tmp = map[jqXHR.status]; - jqXHR.then(tmp, tmp); - } - } - return this; - }; - s.url = ((url || s.url) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//"); - s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().split(rspacesAjax); - if (s.crossDomain == null) { - parts = rurl.exec(s.url.toLowerCase()); - s.crossDomain = !!(parts && (parts[1] != ajaxLocParts[1] || parts[2] != ajaxLocParts[2] || (parts[3] || (parts[1] === "http:" ? 80 : 443)) != (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? 80 : 443)))); - } - if (s.data && s.processData && typeof s.data !== "string") { - s.data = jQuery.param(s.data, s.traditional); - } - inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); - if (state === 2) { - return false; - } - fireGlobals = s.global; - s.type = s.type.toUpperCase(); - s.hasContent = !rnoContent.test(s.type); - if (fireGlobals && jQuery.active++===0) { - jQuery.event.trigger("ajaxStart"); - } - if (!s.hasContent) { - if (s.data) { - s.url += (rquery.test(s.url) ? "&" : "?") + s.data; - delete s.data; - } - ifModifiedKey = s.url; - if (s.cache === false) { - var ts = jQuery.now(), - ret = s.url.replace(rts, "$1_=" + ts); - s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : ""); - } - } - if (s.data && s.hasContent && s.contentType !== false || options.contentType) { - jqXHR.setRequestHeader("Content-Type", s.contentType); - } - if (s.ifModified) { - ifModifiedKey = ifModifiedKey || s.url; - if (jQuery.lastModified[ifModifiedKey]) { - jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[ifModifiedKey]); - } - if (jQuery.etag[ifModifiedKey]) { - jqXHR.setRequestHeader("If-None-Match", jQuery.etag[ifModifiedKey]); - } - } - jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]); - for (i in s.headers) { - jqXHR.setRequestHeader(i, s.headers[i]); - } - if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) { - jqXHR.abort(); - return false; - } - for (i in { - success: 1, - error: 1, - complete: 1 - }) { - jqXHR[i](s[i]); - } - transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); - if (!transport) { - done(-1, "No Transport"); - } else { - jqXHR.readyState = 1; - if (fireGlobals) { - globalEventContext.trigger("ajaxSend", [jqXHR, s]); - } - if (s.async && s.timeout > 0) { - timeoutTimer = setTimeout(function () { - jqXHR.abort("timeout"); - }, - s.timeout); - } - try { - state = 1; - transport.send(requestHeaders, done); - } catch(e) { - if (state < 2) { - done(-1, e); - } else { - throw e; - } - } - } - return jqXHR; - }, - param: function (a, traditional) { - var s = [], - add = function (key, value) { - value = jQuery.isFunction(value) ? value() : value; - s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value); - }; - if (traditional === undefined) { - traditional = jQuery.ajaxSettings.traditional; - } - if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) { - jQuery.each(a, function () { - add(this.name, this.value); - }); - } else { - for (var prefix in a) { - buildParams(prefix, a[prefix], traditional, add); - } - } - return s.join("&").replace(r20, "+"); - } - }); - function buildParams(prefix, obj, traditional, add) { - if (jQuery.isArray(obj)) { - jQuery.each(obj, function (i, v) { - if (traditional || rbracket.test(prefix)) { - add(prefix, v); - } else { - buildParams(prefix + "[" + (typeof v === "object" || jQuery.isArray(v) ? i : "") + "]", v, traditional, add); - } - }); - } else { - if (!traditional && obj != null && typeof obj === "object") { - for (var name in obj) { - buildParams(prefix + "[" + name + "]", obj[name], traditional, add); - } - } else { - add(prefix, obj); - } - } - } - jQuery.extend({ - active: 0, - lastModified: {}, - etag: {} - }); - function ajaxHandleResponses(s, jqXHR, responses) { - var contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields, - ct, type, finalDataType, firstDataType; - for (type in responseFields) { - if (type in responses) { - jqXHR[responseFields[type]] = responses[type]; - } - } - while (dataTypes[0] === "*") { - dataTypes.shift(); - if (ct === undefined) { - ct = s.mimeType || jqXHR.getResponseHeader("content-type"); - } - } - if (ct) { - for (type in contents) { - if (contents[type] && contents[type].test(ct)) { - dataTypes.unshift(type); - break; - } - } - } - if (dataTypes[0] in responses) { - finalDataType = dataTypes[0]; - } else { - for (type in responses) { - if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) { - finalDataType = type; - break; - } - if (!firstDataType) { - firstDataType = type; - } - } - finalDataType = finalDataType || firstDataType; - } - if (finalDataType) { - if (finalDataType !== dataTypes[0]) { - dataTypes.unshift(finalDataType); - } - return responses[finalDataType]; - } - } - function ajaxConvert(s, response) { - if (s.dataFilter) { - response = s.dataFilter(response, s.dataType); - } - var dataTypes = s.dataTypes, - converters = {}, - i, key, length = dataTypes.length, - tmp, current = dataTypes[0], - prev, - conversion, - conv, - conv1, - conv2; - for (i = 1; i < length; i++) { - if (i === 1) { - for (key in s.converters) { - if (typeof key === "string") { - converters[key.toLowerCase()] = s.converters[key]; - } - } - } - prev = current; - current = dataTypes[i]; - if (current === "*") { - current = prev; - } else { - if (prev !== "*" && prev !== current) { - conversion = prev + " " + current; - conv = converters[conversion] || converters["* " + current]; - if (!conv) { - conv2 = undefined; - for (conv1 in converters) { - tmp = conv1.split(" "); - if (tmp[0] === prev || tmp[0] === "*") { - conv2 = converters[tmp[1] + " " + current]; - if (conv2) { - conv1 = converters[conv1]; - if (conv1 === true) { - conv = conv2; - } else { - if (conv2 === true) { - conv = conv1; - } - } - break; - } - } - } - } - if (! (conv || conv2)) { - jQuery.error("No conversion from " + conversion.replace(" ", " to ")); - } - if (conv !== true) { - response = conv ? conv(response) : conv2(conv1(response)); - } - } - } - } - return response; - } - var jsc = jQuery.now(), - jsre = /(\=)\?(&|$)|\?\?/i; - jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function () { - return jQuery.expando + "_" + (jsc++); - } - }); - jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) { - var inspectData = s.contentType === "application/x-www-form-urlencoded" && (typeof s.data === "string"); - if (s.dataTypes[0] === "jsonp" || s.jsonp !== false && (jsre.test(s.url) || inspectData && jsre.test(s.data))) { - var responseContainer, jsonpCallback = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback, - previous = window[jsonpCallback], - url = s.url, - data = s.data, - replace = "$1" + jsonpCallback + "$2"; - if (s.jsonp !== false) { - url = url.replace(jsre, replace); - if (s.url === url) { - if (inspectData) { - data = data.replace(jsre, replace); - } - if (s.data === data) { - url += (/\?/.test(url) ? "&" : "?") + s.jsonp + "=" + jsonpCallback; - } - } - } - s.url = url; - s.data = data; - window[jsonpCallback] = function (response) { - responseContainer = [response]; - }; - jqXHR.always(function () { - window[jsonpCallback] = previous; - if (responseContainer && jQuery.isFunction(previous)) { - window[jsonpCallback](responseContainer[0]); - } - }); - s.converters["script json"] = function () { - if (!responseContainer) { - jQuery.error(jsonpCallback + " was not called"); - } - return responseContainer[0]; - }; - s.dataTypes[0] = "json"; - return "script"; - } - }); - jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function (text) { - jQuery.globalEval(text); - return text; - } - } - }); - jQuery.ajaxPrefilter("script", function (s) { - if (s.cache === undefined) { - s.cache = false; - } - if (s.crossDomain) { - s.type = "GET"; - s.global = false; - } - }); - jQuery.ajaxTransport("script", function (s) { - if (s.crossDomain) { - var script, head = document.head || document.getElementsByTagName("head")[0] || document.documentElement; - return { - send: function (_, callback) { - script = document.createElement("script"); - script.async = "async"; - if (s.scriptCharset) { - script.charset = s.scriptCharset; - } - script.src = s.url; - script.onload = script.onreadystatechange = function (_, isAbort) { - if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) { - script.onload = script.onreadystatechange = null; - if (head && script.parentNode) { - head.removeChild(script); - } - script = undefined; - if (!isAbort) { - callback(200, "success"); - } - } - }; - head.insertBefore(script, head.firstChild); - }, - abort: function () { - if (script) { - script.onload(0, 1); - } - } - }; - } - }); - var xhrOnUnloadAbort = window.ActiveXObject ? - function () { - for (var key in xhrCallbacks) { - xhrCallbacks[key](0, 1); - } - } : false, - xhrId = 0, - xhrCallbacks; - function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch(e) {} - } - function createActiveXHR() { - try { - return new window.ActiveXObject("Microsoft.XMLHTTP"); - } catch(e) {} - } - jQuery.ajaxSettings.xhr = window.ActiveXObject ? - function () { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : createStandardXHR; - (function (xhr) { - jQuery.extend(jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ("withCredentials" in xhr) - }); - })(jQuery.ajaxSettings.xhr()); - if (jQuery.support.ajax) { - jQuery.ajaxTransport(function (s) { - if (!s.crossDomain || jQuery.support.cors) { - var callback; - return { - send: function (headers, complete) { - var xhr = s.xhr(), - handle, - i; - if (s.username) { - xhr.open(s.type, s.url, s.async, s.username, s.password); - } else { - xhr.open(s.type, s.url, s.async); - } - if (s.xhrFields) { - for (i in s.xhrFields) { - xhr[i] = s.xhrFields[i]; - } - } - if (s.mimeType && xhr.overrideMimeType) { - xhr.overrideMimeType(s.mimeType); - } - if (!s.crossDomain && !headers["X-Requested-With"]) { - headers["X-Requested-With"] = "XMLHttpRequest"; - } - try { - for (i in headers) { - xhr.setRequestHeader(i, headers[i]); - } - } catch(_) {} - xhr.send((s.hasContent && s.data) || null); - callback = function (_, isAbort) { - var status, statusText, responseHeaders, responses, xml; - try { - if (callback && (isAbort || xhr.readyState === 4)) { - callback = undefined; - if (handle) { - xhr.onreadystatechange = jQuery.noop; - if (xhrOnUnloadAbort) { - delete xhrCallbacks[handle]; - } - } - if (isAbort) { - if (xhr.readyState !== 4) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - if (xml && xml.documentElement) { - responses.xml = xml; - } - responses.text = xhr.responseText; - try { - statusText = xhr.statusText; - } catch(e) { - statusText = ""; - } - if (!status && s.isLocal && !s.crossDomain) { - status = responses.text ? 200 : 404; - } else { - if (status === 1223) { - status = 204; - } - } - } - } - } catch(firefoxAccessException) { - if (!isAbort) { - complete(-1, firefoxAccessException); - } - } - if (responses) { - complete(status, statusText, responses, responseHeaders); - } - }; - if (!s.async || xhr.readyState === 4) { - callback(); - } else { - handle = ++xhrId; - if (xhrOnUnloadAbort) { - if (!xhrCallbacks) { - xhrCallbacks = {}; - jQuery(window).unload(xhrOnUnloadAbort); - } - xhrCallbacks[handle] = callback; - } - xhr.onreadystatechange = callback; - } - }, - abort: function () { - if (callback) { - callback(0, 1); - } - } - }; - } - }); - } - var elemdisplay = {}, - iframe, iframeDoc, rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, - timerId, fxAttrs = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]], - fxNow; - jQuery.fn.extend({ - show: function (speed, easing, callback) { - var elem, display; - if (speed || speed === 0) { - return this.animate(genFx("show", 3), speed, easing, callback); - } else { - for (var i = 0, j = this.length; i < j; i++) { - elem = this[i]; - if (elem.style) { - display = elem.style.display; - if (!jQuery._data(elem, "olddisplay") && display === "none") { - display = elem.style.display = ""; - } - if (display === "" && jQuery.css(elem, "display") === "none") { - jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName)); - } - } - } - for (i = 0; i < j; i++) { - elem = this[i]; - if (elem.style) { - display = elem.style.display; - if (display === "" || display === "none") { - elem.style.display = jQuery._data(elem, "olddisplay") || ""; - } - } - } - return this; - } - }, - hide: function (speed, easing, callback) { - if (speed || speed === 0) { - return this.animate(genFx("hide", 3), speed, easing, callback); - } else { - var elem, display, i = 0, - j = this.length; - for (; i < j; i++) { - elem = this[i]; - if (elem.style) { - display = jQuery.css(elem, "display"); - if (display !== "none" && !jQuery._data(elem, "olddisplay")) { - jQuery._data(elem, "olddisplay", display); - } - } - } - for (i = 0; i < j; i++) { - if (this[i].style) { - this[i].style.display = "none"; - } - } - return this; - } - }, - _toggle: jQuery.fn.toggle, - toggle: function (fn, fn2, callback) { - var bool = typeof fn === "boolean"; - if (jQuery.isFunction(fn) && jQuery.isFunction(fn2)) { - this._toggle.apply(this, arguments); - } else { - if (fn == null || bool) { - this.each(function () { - var state = bool ? fn : jQuery(this).is(":hidden"); - jQuery(this)[state ? "show" : "hide"](); - }); - } else { - this.animate(genFx("toggle", 3), fn, fn2, callback); - } - } - return this; - }, - fadeTo: function (speed, to, easing, callback) { - return this.filter(":hidden").css("opacity", 0).show().end().animate({ - opacity: to - }, - speed, easing, callback); - }, - animate: function (prop, speed, easing, callback) { - var optall = jQuery.speed(speed, easing, callback); - if (jQuery.isEmptyObject(prop)) { - return this.each(optall.complete, [false]); - } - prop = jQuery.extend({}, - prop); - function doAnimation() { - if (optall.queue === false) { - jQuery._mark(this); - } - var opt = jQuery.extend({}, - optall), - isElement = this.nodeType === 1, - hidden = isElement && jQuery(this).is(":hidden"), - name, - val, - p, - e, - parts, - start, - end, - unit, - method; - opt.animatedProperties = {}; - for (p in prop) { - name = jQuery.camelCase(p); - if (p !== name) { - prop[name] = prop[p]; - delete prop[p]; - } - val = prop[name]; - if (jQuery.isArray(val)) { - opt.animatedProperties[name] = val[1]; - val = prop[name] = val[0]; - } else { - opt.animatedProperties[name] = opt.specialEasing && opt.specialEasing[name] || opt.easing || "swing"; - } - if (val === "hide" && hidden || val === "show" && !hidden) { - return opt.complete.call(this); - } - if (isElement && (name === "height" || name === "width")) { - opt.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY]; - if (jQuery.css(this, "display") === "inline" && jQuery.css(this, "float") === "none") { - if (!jQuery.support.inlineBlockNeedsLayout || defaultDisplay(this.nodeName) === "inline") { - this.style.display = "inline-block"; - } else { - this.style.zoom = 1; - } - } - } - } - if (opt.overflow != null) { - this.style.overflow = "hidden"; - } - for (p in prop) { - e = new jQuery.fx(this, opt, p); - val = prop[p]; - if (rfxtypes.test(val)) { - method = jQuery._data(this, "toggle" + p) || (val === "toggle" ? hidden ? "show" : "hide" : 0); - if (method) { - jQuery._data(this, "toggle" + p, method === "show" ? "hide" : "show"); - e[method](); - } else { - e[val](); - } - } else { - parts = rfxnum.exec(val); - start = e.cur(); - if (parts) { - end = parseFloat(parts[2]); - unit = parts[3] || (jQuery.cssNumber[p] ? "" : "px"); - if (unit !== "px") { - jQuery.style(this, p, (end || 1) + unit); - start = ((end || 1) / e.cur()) * start; - jQuery.style(this, p, start + unit); - } - if (parts[1]) { - end = ((parts[1] === "-=" ? -1 : 1) * end) + start; - } - e.custom(start, end, unit); - } else { - e.custom(start, val, ""); - } - } - } - return true; - } - return optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation); - }, - stop: function (type, clearQueue, gotoEnd) { - if (typeof type !== "string") { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if (clearQueue && type !== false) { - this.queue(type || "fx", []); - } - return this.each(function () { - var index, hadTimers = false, - timers = jQuery.timers, - data = jQuery._data(this); - if (!gotoEnd) { - jQuery._unmark(true, this); - } - function stopQueue(elem, data, index) { - var hooks = data[index]; - jQuery.removeData(elem, index, true); - hooks.stop(gotoEnd); - } - if (type == null) { - for (index in data) { - if (data[index] && data[index].stop && index.indexOf(".run") === index.length - 4) { - stopQueue(this, data, index); - } - } - } else { - if (data[index = type + ".run"] && data[index].stop) { - stopQueue(this, data, index); - } - } - for (index = timers.length; index--;) { - if (timers[index].elem === this && (type == null || timers[index].queue === type)) { - if (gotoEnd) { - timers[index](true); - } else { - timers[index].saveState(); - } - hadTimers = true; - timers.splice(index, 1); - } - } - if (! (gotoEnd && hadTimers)) { - jQuery.dequeue(this, type); - } - }); - } - }); - function createFxNow() { - setTimeout(clearFxNow, 0); - return (fxNow = jQuery.now()); - } - function clearFxNow() { - fxNow = undefined; - } - function genFx(type, num) { - var obj = {}; - jQuery.each(fxAttrs.concat.apply([], fxAttrs.slice(0, num)), function () { - obj[this] = type; - }); - return obj; - } - jQuery.each({ - slideDown: genFx("show", 1), - slideUp: genFx("hide", 1), - slideToggle: genFx("toggle", 1), - fadeIn: { - opacity: "show" - }, - fadeOut: { - opacity: "hide" - }, - fadeToggle: { - opacity: "toggle" - } - }, - function (name, props) { - jQuery.fn[name] = function (speed, easing, callback) { - return this.animate(props, speed, easing, callback); - }; - }); - jQuery.extend({ - speed: function (speed, easing, fn) { - var opt = speed && typeof speed === "object" ? jQuery.extend({}, - speed) : { - complete: fn || !fn && easing || jQuery.isFunction(speed) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction(easing) && easing - }; - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default; - if (opt.queue == null || opt.queue === true) { - opt.queue = "fx"; - } - opt.old = opt.complete; - opt.complete = function (noUnmark) { - if (jQuery.isFunction(opt.old)) { - opt.old.call(this); - } - if (opt.queue) { - jQuery.dequeue(this, opt.queue); - } else { - if (noUnmark !== false) { - jQuery._unmark(this); - } - } - }; - return opt; - }, - easing: { - linear: function (p, n, firstNum, diff) { - return firstNum + diff * p; - }, - swing: function (p, n, firstNum, diff) { - return ((-Math.cos(p * Math.PI) / 2) + 0.5) * diff + firstNum; - } - }, - timers: [], - fx: function (elem, options, prop) { - this.options = options; - this.elem = elem; - this.prop = prop; - options.orig = options.orig || {}; - } - }); - jQuery.fx.prototype = { - update: function () { - if (this.options.step) { - this.options.step.call(this.elem, this.now, this); - } (jQuery.fx.step[this.prop] || jQuery.fx.step._default)(this); - }, - cur: function () { - if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) { - return this.elem[this.prop]; - } - var parsed, r = jQuery.css(this.elem, this.prop); - return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed; - }, - custom: function (from, to, unit) { - var self = this, - fx = jQuery.fx; - this.startTime = fxNow || createFxNow(); - this.end = to; - this.now = this.start = from; - this.pos = this.state = 0; - this.unit = unit || this.unit || (jQuery.cssNumber[this.prop] ? "" : "px"); - function t(gotoEnd) { - return self.step(gotoEnd); - } - t.queue = this.options.queue; - t.elem = this.elem; - t.saveState = function () { - if (self.options.hide && jQuery._data(self.elem, "fxshow" + self.prop) === undefined) { - jQuery._data(self.elem, "fxshow" + self.prop, self.start); - } - }; - if (t() && jQuery.timers.push(t) && !timerId) { - timerId = setInterval(fx.tick, fx.interval); - } - }, - show: function () { - var dataShow = jQuery._data(this.elem, "fxshow" + this.prop); - this.options.orig[this.prop] = dataShow || jQuery.style(this.elem, this.prop); - this.options.show = true; - if (dataShow !== undefined) { - this.custom(this.cur(), dataShow); - } else { - this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur()); - } - jQuery(this.elem).show(); - }, - hide: function () { - this.options.orig[this.prop] = jQuery._data(this.elem, "fxshow" + this.prop) || jQuery.style(this.elem, this.prop); - this.options.hide = true; - this.custom(this.cur(), 0); - }, - step: function (gotoEnd) { - var p, n, complete, t = fxNow || createFxNow(), - done = true, - elem = this.elem, - options = this.options; - if (gotoEnd || t >= options.duration + this.startTime) { - this.now = this.end; - this.pos = this.state = 1; - this.update(); - options.animatedProperties[this.prop] = true; - for (p in options.animatedProperties) { - if (options.animatedProperties[p] !== true) { - done = false; - } - } - if (done) { - if (options.overflow != null && !jQuery.support.shrinkWrapBlocks) { - jQuery.each(["", "X", "Y"], function (index, value) { - elem.style["overflow" + value] = options.overflow[index]; - }); - } - if (options.hide) { - jQuery(elem).hide(); - } - if (options.hide || options.show) { - for (p in options.animatedProperties) { - jQuery.style(elem, p, options.orig[p]); - jQuery.removeData(elem, "fxshow" + p, true); - jQuery.removeData(elem, "toggle" + p, true); - } - } - complete = options.complete; - if (complete) { - options.complete = false; - complete.call(elem); - } - } - return false; - } else { - if (options.duration == Infinity) { - this.now = t; - } else { - n = t - this.startTime; - this.state = n / options.duration; - this.pos = jQuery.easing[options.animatedProperties[this.prop]](this.state, n, 0, 1, options.duration); - this.now = this.start + ((this.end - this.start) * this.pos); - } - this.update(); - } - return true; - } - }; - jQuery.extend(jQuery.fx, { - tick: function () { - var timer, timers = jQuery.timers, - i = 0; - for (; i < timers.length; i++) { - timer = timers[i]; - if (!timer() && timers[i] === timer) { - timers.splice(i--, 1); - } - } - if (!timers.length) { - jQuery.fx.stop(); - } - }, - interval: 13, - stop: function () { - clearInterval(timerId); - timerId = null; - }, - speeds: { - slow: 600, - fast: 200, - _default: 400 - }, - step: { - opacity: function (fx) { - jQuery.style(fx.elem, "opacity", fx.now); - }, - _default: function (fx) { - if (fx.elem.style && fx.elem.style[fx.prop] != null) { - fx.elem.style[fx.prop] = fx.now + fx.unit; - } else { - fx.elem[fx.prop] = fx.now; - } - } - } - }); - jQuery.each(["width", "height"], function (i, prop) { - jQuery.fx.step[prop] = function (fx) { - jQuery.style(fx.elem, prop, Math.max(0, fx.now) + fx.unit); - }; - }); - if (jQuery.expr && jQuery.expr.filters) { - jQuery.expr.filters.animated = function (elem) { - return jQuery.grep(jQuery.timers, function (fn) { - return elem === fn.elem; - }).length; - }; - } - function defaultDisplay(nodeName) { - if (!elemdisplay[nodeName]) { - var body = document.body, - elem = jQuery("<" + nodeName + ">").appendTo(body), - display = elem.css("display"); - elem.remove(); - if (display === "none" || display === "") { - if (!iframe) { - iframe = document.createElement("iframe"); - iframe.frameBorder = iframe.width = iframe.height = 0; - } - body.appendChild(iframe); - if (!iframeDoc || !iframe.createElement) { - iframeDoc = (iframe.contentWindow || iframe.contentDocument).document; - iframeDoc.write((document.compatMode === "CSS1Compat" ? "" : "") + ""); - iframeDoc.close(); - } - elem = iframeDoc.createElement(nodeName); - iframeDoc.body.appendChild(elem); - display = jQuery.css(elem, "display"); - body.removeChild(iframe); - } - elemdisplay[nodeName] = display; - } - return elemdisplay[nodeName]; - } - var rtable = /^t(?:able|d|h)$/i, - rroot = /^(?:body|html)$/i; - if ("getBoundingClientRect" in document.documentElement) { - jQuery.fn.offset = function (options) { - var elem = this[0], - box; - if (options) { - return this.each(function (i) { - jQuery.offset.setOffset(this, options, i); - }); - } - if (!elem || !elem.ownerDocument) { - return null; - } - if (elem === elem.ownerDocument.body) { - return jQuery.offset.bodyOffset(elem); - } - try { - box = elem.getBoundingClientRect(); - } catch(e) {} - var doc = elem.ownerDocument, - docElem = doc.documentElement; - if (!box || !jQuery.contains(docElem, elem)) { - return box ? { - top: box.top, - left: box.left - } : { - top: 0, - left: 0 - }; - } - var body = doc.body, - win = getWindow(doc), - clientTop = docElem.clientTop || body.clientTop || 0, - clientLeft = docElem.clientLeft || body.clientLeft || 0, - scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, - scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, - top = box.top + scrollTop - clientTop, - left = box.left + scrollLeft - clientLeft; - return { - top: top, - left: left - }; - }; - } else { - jQuery.fn.offset = function (options) { - var elem = this[0]; - if (options) { - return this.each(function (i) { - jQuery.offset.setOffset(this, options, i); - }); - } - if (!elem || !elem.ownerDocument) { - return null; - } - if (elem === elem.ownerDocument.body) { - return jQuery.offset.bodyOffset(elem); - } - var computedStyle, offsetParent = elem.offsetParent, - prevOffsetParent = elem, - doc = elem.ownerDocument, - docElem = doc.documentElement, - body = doc.body, - defaultView = doc.defaultView, - prevComputedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle, - top = elem.offsetTop, - left = elem.offsetLeft; - while ((elem = elem.parentNode) && elem !== body && elem !== docElem) { - if (jQuery.support.fixedPosition && prevComputedStyle.position === "fixed") { - break; - } - computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; - top -= elem.scrollTop; - left -= elem.scrollLeft; - if (elem === offsetParent) { - top += elem.offsetTop; - left += elem.offsetLeft; - if (jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName))) { - top += parseFloat(computedStyle.borderTopWidth) || 0; - left += parseFloat(computedStyle.borderLeftWidth) || 0; - } - prevOffsetParent = offsetParent; - offsetParent = elem.offsetParent; - } - if (jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible") { - top += parseFloat(computedStyle.borderTopWidth) || 0; - left += parseFloat(computedStyle.borderLeftWidth) || 0; - } - prevComputedStyle = computedStyle; - } - if (prevComputedStyle.position === "relative" || prevComputedStyle.position === "static") { - top += body.offsetTop; - left += body.offsetLeft; - } - if (jQuery.support.fixedPosition && prevComputedStyle.position === "fixed") { - top += Math.max(docElem.scrollTop, body.scrollTop); - left += Math.max(docElem.scrollLeft, body.scrollLeft); - } - return { - top: top, - left: left - }; - }; - } - jQuery.offset = { - bodyOffset: function (body) { - var top = body.offsetTop, - left = body.offsetLeft; - if (jQuery.support.doesNotIncludeMarginInBodyOffset) { - top += parseFloat(jQuery.css(body, "marginTop")) || 0; - left += parseFloat(jQuery.css(body, "marginLeft")) || 0; - } - return { - top: top, - left: left - }; - }, - setOffset: function (elem, options, i) { - var position = jQuery.css(elem, "position"); - if (position === "static") { - elem.style.position = "relative"; - } - var curElem = jQuery(elem), - curOffset = curElem.offset(), - curCSSTop = jQuery.css(elem, "top"), - curCSSLeft = jQuery.css(elem, "left"), - calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, - curPosition = {}, - curTop, - curLeft; - if (calculatePosition) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat(curCSSTop) || 0; - curLeft = parseFloat(curCSSLeft) || 0; - } - if (jQuery.isFunction(options)) { - options = options.call(elem, i, curOffset); - } - if (options.top != null) { - props.top = (options.top - curOffset.top) + curTop; - } - if (options.left != null) { - props.left = (options.left - curOffset.left) + curLeft; - } - if ("using" in options) { - options.using.call(elem, props); - } else { - curElem.css(props); - } - } - }; - jQuery.fn.extend({ - position: function () { - if (!this[0]) { - return null; - } - var elem = this[0], - offsetParent = this.offsetParent(), - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { - top: 0, - left: 0 - } : offsetParent.offset(); - offset.top -= parseFloat(jQuery.css(elem, "marginTop")) || 0; - offset.left -= parseFloat(jQuery.css(elem, "marginLeft")) || 0; - parentOffset.top += parseFloat(jQuery.css(offsetParent[0], "borderTopWidth")) || 0; - parentOffset.left += parseFloat(jQuery.css(offsetParent[0], "borderLeftWidth")) || 0; - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - offsetParent: function () { - return this.map(function () { - var offsetParent = this.offsetParent || document.body; - while (offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static")) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent; - }); - } - }); - jQuery.each(["Left", "Top"], function (i, name) { - var method = "scroll" + name; - jQuery.fn[method] = function (val) { - var elem, win; - if (val === undefined) { - elem = this[0]; - if (!elem) { - return null; - } - win = getWindow(elem); - return win ? ("pageXOffset" in win) ? win[i ? "pageYOffset" : "pageXOffset"] : jQuery.support.boxModel && win.document.documentElement[method] || win.document.body[method] : elem[method]; - } - return this.each(function () { - win = getWindow(this); - if (win) { - win.scrollTo(!i ? val : jQuery(win).scrollLeft(), i ? val : jQuery(win).scrollTop()); - } else { - this[method] = val; - } - }); - }; - }); - function getWindow(elem) { - return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; - } - jQuery.each(["Height", "Width"], function (i, name) { - var type = name.toLowerCase(); - jQuery.fn["inner" + name] = function () { - var elem = this[0]; - return elem ? elem.style ? parseFloat(jQuery.css(elem, type, "padding")) : this[type]() : null; - }; - jQuery.fn["outer" + name] = function (margin) { - var elem = this[0]; - return elem ? elem.style ? parseFloat(jQuery.css(elem, type, margin ? "margin" : "border")) : this[type]() : null; - }; - jQuery.fn[type] = function (size) { - var elem = this[0]; - if (!elem) { - return size == null ? null : this; - } - if (jQuery.isFunction(size)) { - return this.each(function (i) { - var self = jQuery(this); - self[type](size.call(this, i, self[type]())); - }); - } - if (jQuery.isWindow(elem)) { - var docElemProp = elem.document.documentElement["client" + name], - body = elem.document.body; - return elem.document.compatMode === "CSS1Compat" && docElemProp || body && body["client" + name] || docElemProp; - } else { - if (elem.nodeType === 9) { - return Math.max(elem.documentElement["client" + name], elem.body["scroll" + name], elem.documentElement["scroll" + name], elem.body["offset" + name], elem.documentElement["offset" + name]); - } else { - if (size === undefined) { - var orig = jQuery.css(elem, type), - ret = parseFloat(orig); - return jQuery.isNumeric(ret) ? ret : orig; - } else { - return this.css(type, typeof size === "string" ? size : size + "px"); - } - } - } - }; - }); - window.jQuery = window.$ = jQuery; - if (typeof define === "function" && define.amd && define.amd.jQuery) { - define("jquery", [], function () { - return jQuery; - }); - } -})(window); +jQuery.Callbacks = function( flags ) { + + // Convert flags from String-formatted to Object-formatted + // (we check in cache first) + flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; + + var // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = [], + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Add one or several callbacks to the list + add = function( args ) { + var i, + length, + elem, + type, + actual; + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + // Inspect recursively + add( elem ); + } else if ( type === "function" ) { + // Add if not in unique mode and callback is not in + if ( !flags.unique || !self.has( elem ) ) { + list.push( elem ); + } + } + } + }, + // Fire callbacks + fire = function( context, args ) { + args = args || []; + memory = !flags.memory || [ context, args ]; + firing = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { + memory = true; // Mark as halted + break; + } + } + firing = false; + if ( list ) { + if ( !flags.once ) { + if ( stack && stack.length ) { + memory = stack.shift(); + self.fireWith( memory[ 0 ], memory[ 1 ] ); + } + } else if ( memory === true ) { + self.disable(); + } else { + list = []; + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + var length = list.length; + add( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away, unless previous + // firing was halted (stopOnFalse) + } else if ( memory && memory !== true ) { + firingStart = length; + fire( memory[ 0 ], memory[ 1 ] ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + var args = arguments, + argIndex = 0, + argLength = args.length; + for ( ; argIndex < argLength ; argIndex++ ) { + for ( var i = 0; i < list.length; i++ ) { + if ( args[ argIndex ] === list[ i ] ) { + // Handle firingIndex and firingLength + if ( firing ) { + if ( i <= firingLength ) { + firingLength--; + if ( i <= firingIndex ) { + firingIndex--; + } + } + } + // Remove the element + list.splice( i--, 1 ); + // If we have some unicity property then + // we only need to do this once + if ( flags.unique ) { + break; + } + } + } + } + } + return this; + }, + // Control if a given callback is in the list + has: function( fn ) { + if ( list ) { + var i = 0, + length = list.length; + for ( ; i < length; i++ ) { + if ( fn === list[ i ] ) { + return true; + } + } + } + return false; + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory || memory === true ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( stack ) { + if ( firing ) { + if ( !flags.once ) { + stack.push( [ context, args ] ); + } + } else if ( !( flags.once && memory ) ) { + fire( context, args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!memory; + } + }; + + return self; +}; + + + + +var // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ + + Deferred: function( func ) { + var doneList = jQuery.Callbacks( "once memory" ), + failList = jQuery.Callbacks( "once memory" ), + progressList = jQuery.Callbacks( "memory" ), + state = "pending", + lists = { + resolve: doneList, + reject: failList, + notify: progressList + }, + promise = { + done: doneList.add, + fail: failList.add, + progress: progressList.add, + + state: function() { + return state; + }, + + // Deprecated + isResolved: doneList.fired, + isRejected: failList.fired, + + then: function( doneCallbacks, failCallbacks, progressCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); + return this; + }, + always: function() { + deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); + return this; + }, + pipe: function( fnDone, fnFail, fnProgress ) { + return jQuery.Deferred(function( newDefer ) { + jQuery.each( { + done: [ fnDone, "resolve" ], + fail: [ fnFail, "reject" ], + progress: [ fnProgress, "notify" ] + }, function( handler, data ) { + var fn = data[ 0 ], + action = data[ 1 ], + returned; + if ( jQuery.isFunction( fn ) ) { + deferred[ handler ](function() { + returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + }); + } else { + deferred[ handler ]( newDefer[ action ] ); + } + }); + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + obj = promise; + } else { + for ( var key in promise ) { + obj[ key ] = promise[ key ]; + } + } + return obj; + } + }, + deferred = promise.promise({}), + key; + + for ( key in lists ) { + deferred[ key ] = lists[ key ].fire; + deferred[ key + "With" ] = lists[ key ].fireWith; + } + + // Handle state + deferred.done( function() { + state = "resolved"; + }, failList.disable, progressList.lock ).fail( function() { + state = "rejected"; + }, doneList.disable, progressList.lock ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( firstParam ) { + var args = sliceDeferred.call( arguments, 0 ), + i = 0, + length = args.length, + pValues = new Array( length ), + count = length, + pCount = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(), + promise = deferred.promise(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + deferred.resolveWith( deferred, args ); + } + }; + } + function progressFunc( i ) { + return function( value ) { + pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + deferred.notifyWith( promise, pValues ); + }; + } + if ( length > 1 ) { + for ( ; i < length; i++ ) { + if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return promise; + } +}); + + + + +jQuery.support = (function() { + + var support, + all, + a, + select, + opt, + input, + marginDiv, + fragment, + tds, + events, + eventName, + i, + isSupported, + div = document.createElement( "div" ), + documentElement = document.documentElement; + + // Preliminary tests + div.setAttribute("className", "t"); + div.innerHTML = "
              a"; + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + div.innerHTML = ""; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( window.getComputedStyle ) { + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.style.width = "2px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for( i in { + submit: 1, + change: 1, + focusin: 1 + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + fragment.removeChild( div ); + + // Null elements to avoid leaks in IE + fragment = select = opt = marginDiv = div = input = null; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, outer, inner, table, td, offsetSupport, + conMarginTop, ptlm, vb, style, html, + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + conMarginTop = 1; + ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;"; + vb = "visibility:hidden;border:0;"; + style = "style='" + ptlm + "border:5px solid #000;padding:0;'"; + html = "
              " + + "" + + "
              "; + + container = document.createElement("div"); + container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "
              t
              "; + tds = div.getElementsByTagName( "td" ); + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Figure out if the W3C box model works as expected + div.innerHTML = ""; + div.style.width = div.style.paddingLeft = "1px"; + jQuery.boxModel = support.boxModel = div.offsetWidth === 2; + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
              "; + support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); + } + + div.style.cssText = ptlm + vb; + div.innerHTML = html; + + outer = div.firstChild; + inner = outer.firstChild; + td = outer.nextSibling.firstChild.firstChild; + + offsetSupport = { + doesNotAddBorder: ( inner.offsetTop !== 5 ), + doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) + }; + + inner.style.position = "fixed"; + inner.style.top = "20px"; + + // safari subtracts parent border width here which is 5px + offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); + inner.style.position = inner.style.top = ""; + + outer.style.overflow = "hidden"; + outer.style.position = "relative"; + + offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); + offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); + + body.removeChild( container ); + div = container = null; + + jQuery.extend( support, offsetSupport ); + }); + + return support; +})(); + + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var privateCache, thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, + isEvents = name === "events"; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = ++jQuery.uuid; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + privateCache = thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Users should not attempt to inspect the internal events object using jQuery.data, + // it is undocumented and subject to change. But does anyone listen? No. + if ( isEvents && !thisCache[ name ] ) { + return privateCache.events; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + // Reference to internal data cache key + internalKey = jQuery.expando, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ internalKey ] : internalKey; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + // Ensure that `cache` is not a window object #10080 + if ( jQuery.support.deleteExpando || !cache.setInterval ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the cache and need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ internalKey ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + } else { + elem[ internalKey ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, attr, name, + data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) { + attr = this[0].attributes; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( this[0], name, data[ name ] ); + } + } + jQuery._data( this[0], "parsedAttrs", true ); + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var self = jQuery( this ), + args = [ parts[0], value ]; + + self.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + jQuery.isNumeric( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +function handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery._data( elem, deferDataKey ); + if ( defer && + ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && + ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery._data( elem, queueDataKey ) && + !jQuery._data( elem, markDataKey ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.fire(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = ( type || "fx" ) + "mark"; + jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); + if ( count ) { + jQuery._data( elem, key, count ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + var q; + if ( elem ) { + type = ( type || "fx" ) + "queue"; + q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = {}; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + jQuery._data( elem, type + ".run", hooks ); + fn.call( elem, function() { + jQuery.dequeue( elem, type ); + }, hooks ); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue " + type + ".run", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function() { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { + count++; + tmp.add( resolve ); + } + } + resolve(); + return defer.promise(); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + nodeHook, boolHook, fixSpecified; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.prop ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = ( value || "" ).split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, l, + i = 0; + + if ( value && elem.nodeType === 1 ) { + attrNames = value.toLowerCase().split( rspace ); + l = attrNames.length; + + for ( ; i < l; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + + // See #9699 for explanation of this approach (setting first, then removal) + jQuery.attr( elem, name, "" ); + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( rboolean.test( name ) && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) +jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.nodeValue = value + "" ); + } + }; + + // Apply the nodeHook to tabindex + jQuery.attrHooks.tabindex.set = nodeHook.set; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); + + + + +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, + rhoverHack = /\bhover(\.\S+)?\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, + quickParse = function( selector ) { + var quick = rquickIs.exec( selector ); + if ( quick ) { + // 0 1 2 3 + // [ _, tag, id, class ] + quick[1] = ( quick[1] || "" ).toLowerCase(); + quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); + } + return quick; + }, + quickIs = function( elem, m ) { + var attrs = elem.attributes || {}; + return ( + (!m[1] || elem.nodeName.toLowerCase() === m[1]) && + (!m[2] || (attrs.id || {}).value === m[2]) && + (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) + ); + }, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, quick, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + quick: quickParse( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + t, tns, type, origType, namespaces, origCount, + j, events, special, handle, eventType, handleObj; + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, [ "events", "handle" ], true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var type = event.type || event, + namespaces = [], + cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + old = null; + for ( ; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old && old === elem.ownerDocument ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments, 0 ), + run_all = !event.exclusive && !event.namespace, + handlerQueue = [], + i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Determine handlers that should run if there are delegated events + // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { + + // Pregenerate a single jQuery object for reuse with .is() + jqcur = jQuery(this); + jqcur.context = this.ownerDocument || this; + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + selMatch = {}; + matches = []; + jqcur[0] = cur; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = ( + handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) + ); + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) + if ( event.metaKey === undefined ) { + event.metaKey = event.ctrlKey; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector, + ret; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !form._submit_attached ) { + jQuery.event.add( form, "submit._submit", function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + }); + form._submit_attached = true; + } + }); + // return undefined since we don't need an event listener + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + jQuery.event.simulate( "change", this, event, true ); + } + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + elem._change_attached = true; + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on.call( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + var handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( var type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + expando = "sizcache" + (Math.random() + '').replace('.', ''), + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rReturn = /\r\n/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context, seed ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set, seed ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set, i, len, match, type, left; + + if ( !expr ) { + return []; + } + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + type, found, item, filter, left, + i, pass, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + filter = Expr.filter[ type ]; + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + pass = not ^ found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Utility function for retreiving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var i, node, + nodeType = elem.nodeType, + ret = ""; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 ) { + // Use textContent || innerText for elements + if ( typeof elem.textContent === 'string' ) { + return elem.textContent; + } else if ( typeof elem.innerText === 'string' ) { + // Replace IE's carriage returns + return elem.innerText.replace( rReturn, '' ); + } else { + // Traverse it's children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + } else { + + // If no nodeType, this is expected to be an array + for ( i = 0; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + if ( node.nodeType !== 8 ) { + ret += getText( node ); + } + } + } + return ret; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var first, last, + doneName, parent, cache, + count, diff, + type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + first = match[2]; + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + doneName = match[0]; + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { + count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent[ expando ] = doneName; + } + + diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Sizzle.attr ? + Sizzle.attr( elem, name ) : + Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + !type && Sizzle.attr ? + result != null : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

              "; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
              "; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context, seed ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet, seed ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +Sizzle.selectors.attrMap = {}; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + POS.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array (deprecated as of jQuery 1.7) + if ( jQuery.isArray( selectors ) ) { + var level = 1; + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( i = 0; i < selectors.length; i++ ) { + + if ( jQuery( cur ).is( selectors[ i ] ) ) { + ret.push({ selector: selectors[ i ], elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} + + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /", "" ], + legend: [ 1, "
              ", "
              " ], + thead: [ 1, "", "
              " ], + tr: [ 2, "", "
              " ], + td: [ 3, "", "
              " ], + col: [ 2, "", "
              " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and