A pile of fixups
This commit is contained in:
parent
1f9288176b
commit
4f5f51a085
@ -130,7 +130,7 @@
|
||||
}
|
||||
|
||||
#header .padded{
|
||||
margin-right:40px;
|
||||
margin-right:12px;
|
||||
}
|
||||
|
||||
#document-title {
|
||||
@ -170,6 +170,8 @@
|
||||
|
||||
#mainContainer{
|
||||
position: absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
z-index: 500;
|
||||
background-color: #ddd !important;
|
||||
}
|
||||
@ -246,36 +248,42 @@
|
||||
}
|
||||
|
||||
#members {
|
||||
left: auto !important;
|
||||
right:0px;
|
||||
top: 4px !important;
|
||||
padding-top: 47px !important;
|
||||
background-color: #ddd !important;
|
||||
z-index: 540;
|
||||
}
|
||||
|
||||
.memberListButton {
|
||||
.webodfeditor-memberListButton {
|
||||
background-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.memberListButton span {
|
||||
.webodfeditor-memberListButton span {
|
||||
display: block;
|
||||
border-radius: 3px;
|
||||
display: block;
|
||||
margin: auto;
|
||||
border-radius: 3px;
|
||||
display: block;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.memberListButton img{
|
||||
.webodfeditor-memberListButton img{
|
||||
border: 0 none !important;
|
||||
}
|
||||
|
||||
.memberListButton input{
|
||||
.webodfeditor-memberListButton input{
|
||||
width:46px;
|
||||
}
|
||||
|
||||
#memberList .memberListLabel {
|
||||
#memberList .webodfeditor-memberListLabel {
|
||||
color: #555 !important;
|
||||
border-radius: 3px !important;
|
||||
padding: 0 !important;
|
||||
margin-bottom: 10px;
|
||||
font-size: 10px !important;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
#ocToolbar, #ocToolbarInside{
|
||||
@ -289,7 +297,7 @@
|
||||
min-height: 29px !important;
|
||||
border-bottom: none !important;
|
||||
border-radius: 2px;
|
||||
margin: 7px 30px 0 0 !important;
|
||||
margin: 6px 30px 0 0 !important;
|
||||
padding: 0 !important;
|
||||
box-shadow: none !important;
|
||||
background: #F5F5F5 !important;
|
||||
@ -313,11 +321,11 @@
|
||||
|
||||
#toolbar > .dijitComboBox .dijitInputInner{
|
||||
vertical-align: middle;
|
||||
line-height: 1.45em;
|
||||
line-height: 1.7em;
|
||||
}
|
||||
|
||||
#container {
|
||||
top: 44px !important;
|
||||
top: 39px !important;
|
||||
}
|
||||
|
||||
#canvas > div {
|
||||
|
@ -29,8 +29,7 @@ namespace OCA\Documents;
|
||||
\OCP\App::setActiveNavigationEntry( 'documents_index' );
|
||||
|
||||
\OCP\Util::addStyle( 'documents', 'style' );
|
||||
\OCP\Util::addStyle( 'documents', '3rdparty/webodf/dojo-app');
|
||||
\OCP\Util::addStyle( 'documents', '3rdparty/webodf/editor');
|
||||
\OCP\Util::addStyle( 'documents', '3rdparty/webodf/dojo-app' );
|
||||
|
||||
\OCP\Util::addScript('documents', 'documents');
|
||||
|
||||
|
58
js/3rdparty/webodf/editor/Editor.js
vendored
58
js/3rdparty/webodf/editor/Editor.js
vendored
@ -443,6 +443,21 @@ define("webodf/editor/Editor", [
|
||||
editorSession.sessionController.getEventManager().focus();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if either all features are wanted and this one is not explicitely disabled
|
||||
* or if not all features are wanted by default and it is explicitely enabled
|
||||
* @param {?boolean|undefined} isFeatureEnabled explicit flag which enables a feature
|
||||
* @param {!boolean=} isUnstable set to true if the feature is not stable (in collab mode)
|
||||
* @return {!boolean}
|
||||
*/
|
||||
function isEnabled(isFeatureEnabled, isUnstable) {
|
||||
if (isUnstable && ! args.unstableFeaturesEnabled) {
|
||||
return false;
|
||||
}
|
||||
return args.allFeaturesEnabled ? (isFeatureEnabled !== false) : isFeatureEnabled;
|
||||
}
|
||||
|
||||
// init
|
||||
function init() {
|
||||
var editorPane, memberListPane,
|
||||
@ -451,13 +466,16 @@ define("webodf/editor/Editor", [
|
||||
container = document.getElementById('container'),
|
||||
memberListElement = document.getElementById('memberList'),
|
||||
collabEditing = Boolean(server),
|
||||
directParagraphStylingEnabled = (! collabEditing) || args.unstableFeaturesEnabled,
|
||||
imageInsertingEnabled = (! collabEditing) || args.unstableFeaturesEnabled,
|
||||
hyperlinkEditingEnabled = (! collabEditing) || args.unstableFeaturesEnabled,
|
||||
// annotations not yet properly supported for OT
|
||||
annotationsEnabled = (! collabEditing) || args.unstableFeaturesEnabled,
|
||||
// undo manager is not yet integrated with collaboration
|
||||
undoRedoEnabled = (! collabEditing),
|
||||
directTextStylingEnabled = isEnabled(args.directTextStylingEnabled),
|
||||
directParagraphStylingEnabled = isEnabled(args.directParagraphStylingEnabled),
|
||||
paragraphStyleSelectingEnabled = isEnabled(args.paragraphStyleSelectingEnabled),
|
||||
paragraphStyleEditingEnabled = isEnabled(args.paragraphStyleEditingEnabled),
|
||||
imageEditingEnabled = isEnabled(args.imageEditingEnabled, true),
|
||||
hyperlinkEditingEnabled = isEnabled(args.hyperlinkEditingEnabled, true),
|
||||
reviewModeEnabled = isEnabled(args.reviewModeEnabled, true),
|
||||
annotationsEnabled = reviewModeEnabled || isEnabled(args.annotationsEnabled),
|
||||
undoRedoEnabled = false, // no proper mechanism yet for collab
|
||||
zoomingEnabled = isEnabled(args.zoomingEnabled),
|
||||
closeCallback;
|
||||
|
||||
// Extend runtime with a convenient translation function
|
||||
@ -513,16 +531,19 @@ define("webodf/editor/Editor", [
|
||||
inviteButton.onclick = window.inviteButtonProxy.clicked;
|
||||
}
|
||||
|
||||
tools = new Tools({
|
||||
tools = new Tools('toolbar', {
|
||||
onToolDone: setFocusToOdfCanvas,
|
||||
loadOdtFile: loadOdtFile,
|
||||
saveOdtFile: saveOdtFile,
|
||||
close: close,
|
||||
directTextStylingEnabled: directTextStylingEnabled,
|
||||
directParagraphStylingEnabled: directParagraphStylingEnabled,
|
||||
imageInsertingEnabled: imageInsertingEnabled,
|
||||
paragraphStyleSelectingEnabled: paragraphStyleSelectingEnabled,
|
||||
paragraphStyleEditingEnabled: paragraphStyleEditingEnabled,
|
||||
imageInsertingEnabled: imageEditingEnabled,
|
||||
hyperlinkEditingEnabled: hyperlinkEditingEnabled,
|
||||
annotationsEnabled: annotationsEnabled,
|
||||
undoRedoEnabled: undoRedoEnabled
|
||||
undoRedoEnabled: undoRedoEnabled,
|
||||
zoomingEnabled: zoomingEnabled
|
||||
});
|
||||
|
||||
odfCanvas = new odf.OdfCanvas(canvasElement);
|
||||
@ -536,12 +557,23 @@ define("webodf/editor/Editor", [
|
||||
};
|
||||
|
||||
// create session around loaded document
|
||||
var viewOptions = {
|
||||
editInfoMarkersInitiallyVisible: true,
|
||||
caretAvatarsInitiallyVisible: false,
|
||||
caretBlinksOnRangeSelect: true
|
||||
};
|
||||
session = new ops.Session(odfCanvas);
|
||||
editorSession = new EditorSession(session, pendingMemberId, {
|
||||
viewOptions: viewOptions,
|
||||
directTextStylingEnabled: directTextStylingEnabled,
|
||||
directParagraphStylingEnabled: directParagraphStylingEnabled,
|
||||
imageInsertingEnabled: imageInsertingEnabled,
|
||||
hyperlinkEditingEnabled: hyperlinkEditingEnabled
|
||||
paragraphStyleSelectingEnabled: paragraphStyleSelectingEnabled,
|
||||
paragraphStyleEditingEnabled: paragraphStyleEditingEnabled,
|
||||
imageEditingEnabled: imageEditingEnabled,
|
||||
hyperlinkEditingEnabled: hyperlinkEditingEnabled,
|
||||
annotationsEnabled: annotationsEnabled,
|
||||
zoomingEnabled: zoomingEnabled,
|
||||
reviewModeEnabled: reviewModeEnabled
|
||||
});
|
||||
if (undoRedoEnabled) {
|
||||
editorSession.sessionController.setUndoManager(new gui.TrivialUndoManager());
|
||||
|
@ -26,9 +26,9 @@
|
||||
/*global define, require, OC*/
|
||||
|
||||
define("owncloud/ServerFactory", [
|
||||
"webodf/editor/server/pullbox/Server",
|
||||
"webodf/editor/server/pullbox/OperationRouter",
|
||||
"webodf/editor/server/pullbox/SessionList"],
|
||||
"webodf/editor/backend/pullbox/Server",
|
||||
"webodf/editor/backend/pullbox/OperationRouter",
|
||||
"webodf/editor/backend/pullbox/SessionList"],
|
||||
function (PullBoxServer, PullBoxOperationRouter, PullBoxSessionList) {
|
||||
"use strict";
|
||||
|
||||
|
@ -158,17 +158,17 @@ var documentsMain = {
|
||||
|
||||
UI : {
|
||||
/* Editor wrapper HTML */
|
||||
container : '<div id = "mainContainer" class="claro">' +
|
||||
' <div id = "editor">' +
|
||||
' <div id = "container">' +
|
||||
' <div id="canvas"></div>' +
|
||||
container : '<div id="mainContainer" class="claro">' +
|
||||
' <div id="editor" class="webodfeditor-editor">' +
|
||||
' <div id="container" class="webodfeditor-canvascontainer">' +
|
||||
' <div id="canvas" class="webodfeditor-canvas"></div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' <div id = "collaboration">' +
|
||||
' <div id = "collabContainer">' +
|
||||
' <div id = "members">' +
|
||||
' <div id = "inviteButton"></div>' +
|
||||
' <div id = "memberList"></div>' +
|
||||
' <div id="collaboration">' +
|
||||
' <div id="collabContainer">' +
|
||||
' <div id="members">' +
|
||||
' <div id="inviteButton"></div>' +
|
||||
' <div id="memberList"></div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
@ -204,7 +204,7 @@ var documentsMain = {
|
||||
// Fade out editor
|
||||
$('#mainContainer').fadeOut('fast', function() {
|
||||
$('#mainContainer').remove();
|
||||
$('#content').fadeIn('fast');
|
||||
$('#content-wrapper').fadeIn('fast');
|
||||
$(document.body).removeClass('claro');
|
||||
$('title').text(documentsMain.UI.mainTitle);
|
||||
});
|
||||
@ -332,7 +332,7 @@ var documentsMain = {
|
||||
&& typeof OC.Share !== 'undefined' && response.permissions & OC.PERMISSION_SHARE;
|
||||
require({ }, ["owncloud/ServerFactory", "webodf/editor/Editor"], function (ServerFactory, Editor) {
|
||||
// fade out file list and show WebODF canvas
|
||||
$('#content').fadeOut('fast').promise().done(function() {
|
||||
$('#content-wrapper').fadeOut('fast').promise().done(function() {
|
||||
|
||||
documentsMain.fileId = response.file_id;
|
||||
documentsMain.fileName = response.title;
|
||||
@ -350,7 +350,14 @@ var documentsMain = {
|
||||
|
||||
documentsMain.webodfServerInstance = serverFactory.createServer();
|
||||
documentsMain.webodfServerInstance.setToken(oc_requesttoken);
|
||||
documentsMain.webodfEditorInstance = new Editor({unstableFeaturesEnabled: documentsMain.useUnstable}, documentsMain.webodfServerInstance, serverFactory);
|
||||
documentsMain.webodfEditorInstance = new Editor(
|
||||
{
|
||||
allFeaturesEnabled: true,
|
||||
collabEditingEnabled: true
|
||||
},
|
||||
documentsMain.webodfServerInstance, serverFactory
|
||||
);
|
||||
|
||||
documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_BEFORESAVETOFILE, documentsMain.UI.showSave);
|
||||
documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_SAVEDTOFILE, documentsMain.UI.hideSave);
|
||||
documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_ERROR, documentsMain.onEditorShutdown);
|
||||
@ -691,6 +698,8 @@ $(document).ready(function() {
|
||||
$('.add-document .upload').css({opacity:0.7});
|
||||
documentsMain.show();
|
||||
});
|
||||
OC.addStyle('documents', '3rdparty/webodf/wodotexteditor');
|
||||
OC.addStyle('documents', '/3rdparty/webodf/wodocollabpane');
|
||||
|
||||
OC.addScript('documents', '3rdparty/webodf/dojo-amalgamation', documentsMain.onStartup);
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ define("owncloud/widgets/ocLogo",
|
||||
["dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "webodf/editor/EditorSession"],
|
||||
function (declare, _WidgetBase, _TemplatedMixin, EditorSession) {
|
||||
return declare("OcLogo", [_WidgetBase, _TemplatedMixin], {
|
||||
templateString: '<div style="float:left" class="padded"><a href="' + (OC.webroot || '/') +'"><div class="logo-wide"></div></a></div>',
|
||||
templateString: '<div style="float:left" class="padded"><a href="' + (OC.webroot || '/') +'"><div class="logo-icon"></div></a></div>',
|
||||
startup: function () {
|
||||
$('#header').children(':not(#ocToolbar)').hide();
|
||||
this.inherited(arguments);
|
||||
|
@ -3,7 +3,7 @@ define("owncloud/widgets/ocShare",
|
||||
["dojo/_base/declare", "dojo/dom-style", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "webodf/editor/EditorSession"],
|
||||
function (declare, domStyle, _WidgetBase, _TemplatedMixin, EditorSession) {
|
||||
return declare("OcShare", [_WidgetBase, _TemplatedMixin], {
|
||||
templateString: '<div class="dijit" style="float:left;margin-top:5px">'
|
||||
templateString: '<div class="dijit" style="float:left;margin-top:3px">'
|
||||
+ '<button id="odf-invite" class="drop icon-share svg" data-dojo-attach-event="onclick: showDropdown">' +
|
||||
t('documents', 'Share') +
|
||||
'</button></div>',
|
||||
|
@ -42,7 +42,7 @@ define("owncloud/widgets/zoomCombo",
|
||||
class: "dijit",
|
||||
value: defaultZoom,
|
||||
style: {
|
||||
height: '20px',
|
||||
height: '23px',
|
||||
width: '60px',
|
||||
float: 'right'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user