Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2014-01-21 22:42:52 +0400
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2014-01-21 22:44:02 +0400
commita46677bbe92281c5ca89d7c734d44448a31c90f3 (patch)
tree4bb80b43c3d1a3d1435b6fb085af8e80ff0922e8
parentec9bcccddaa1041eac5d26b1f3e32d9e93999230 (diff)
Initial save indicator. Ref #114
-rwxr-xr-xcss/style.css5
-rw-r--r--js/documents.js17
2 files changed, 21 insertions, 1 deletions
diff --git a/css/style.css b/css/style.css
index 41a57601..04becc31 100755
--- a/css/style.css
+++ b/css/style.css
@@ -195,6 +195,11 @@
z-index:20;
}
+#saving-document{
+ float:right;
+ display:none;
+}
+
#warning-connection-lost{
padding: 6px 0;
text-align: center;
diff --git a/js/documents.js b/js/documents.js
index 75adaa05..8dcfc387 100644
--- a/js/documents.js
+++ b/js/documents.js
@@ -23,6 +23,9 @@ var documentsMain = {
' <button id="odf-close">' +
t('documents', 'Close') +
' </button>' +
+ ' <img id="saving-document" alt=""' +
+ ' src="' + OC.imagePath('core', 'loading.gif') + '"' +
+ ' />' +
' <button id="odf-invite" class="drop">' +
t('documents', 'Share') +
' </button>' +
@@ -88,6 +91,17 @@ var documentsMain = {
$('title').text(documentsMain.UI.mainTitle);
});
},
+
+ showSave : function (){
+ $('#odf-close').hide();
+ $('#saving-document').show();
+ },
+
+ hideSave : function(){
+ $('#saving-document').hide();
+ $('#odf-close').show();
+ },
+
showProgress : function(message){
if (!message){
message = '&nbsp;';
@@ -206,7 +220,8 @@ var documentsMain = {
documentsMain.webodfServerInstance = serverFactory.createServer();
documentsMain.webodfServerInstance.setToken(oc_requesttoken);
documentsMain.webodfEditorInstance = new Editor({unstableFeaturesEnabled: documentsMain.useUnstable}, documentsMain.webodfServerInstance, serverFactory);
-
+ documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_BEFORESAVETOFILE, documentsMain.UI.showSave);
+ documentsMain.webodfEditorInstance.addEventListener(Editor.EVENT_SAVEDTOFILE, documentsMain.UI.hideSave);
// load the document and get called back when it's live
documentsMain.webodfEditorInstance.openSession(documentsMain.esId, documentsMain.memberId, function() {
documentsMain.webodfEditorInstance.startEditing();