[Pkg-owncloud-commits] [owncloud] 49/75: Fix editing shared files and file opening bug. Fixes oc-209 and oc-195

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:08:39 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v3.0.1
in repository owncloud.

commit b8f36297832debd47ae148313c32dcf4d7d3ace7
Author: Tom Needham <needham.thomas at gmail.com>
Date:   Tue Feb 14 21:49:51 2012 +0000

    Fix editing shared files and file opening bug. Fixes oc-209 and oc-195
---
 apps/files_texteditor/js/editor.js |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js
index 6e154be..2d07c4f 100644
--- a/apps/files_texteditor/js/editor.js
+++ b/apps/files_texteditor/js/editor.js
@@ -56,18 +56,16 @@ function setSyntaxMode(ext){
 
 function showControls(filename,writeperms){
 	// Loads the control bar at the top.
-	$('.actions,#file_action_panel').fadeOut('slow').promise().done(function() {
-		// Load the new toolbar.
-		var editorcontrols;
-		if(writeperms=="true"){
-			var editorcontrols = '<button id="editor_save">'+t('files_texteditor','Save')+'</button><div class="separator"></div><label for="gotolineval">Go to line:</label><input type="text" id="gotolineval"><div class="separator"></div>';
-		}
-		var html = '<label for="editorseachval">Search:</label><input type="text" name="editorsearchval" id="editorsearchval"><div class="separator"></div><button id="editor_close">'+t('files_texteditor','Close')+'</button>';
-		$('#controls').append(html);
-		$('#editorbar').fadeIn('slow');	
-		var breadcrumbhtml = '<div class="crumb svg" id="breadcrumb_file" style="background-image:url("../core/img/breadcrumb.png")"><p>'+filename+'</p></div>';
-		$('.actions').before(breadcrumbhtml).before(editorcontrols);
-	});
+	// Load the new toolbar.
+	var editorbarhtml = '<div id="editorcontrols" style="display: none;"><div class="crumb svg last" id="breadcrumb_file" style="background-image:url("../core/img/breadcrumb.png")"><p>'+filename+'</p></div>';
+	if(writeperms=="true"){
+		editorbarhtml += '<button id="editor_save">'+t('files_texteditor','Save')+'</button><div class="separator"></div>';
+	}
+	editorbarhtml += '<label for="gotolineval">Go to line:</label><input stype="text" id="gotolineval"><label for="editorseachval">Search:</label><input type="text" name="editorsearchval" id="editorsearchval"><div class="separator"></div><button id="editor_close">'+t('files_texteditor','Close')+'</button></div>';
+	// Change breadcrumb classes
+	$('#controls .last').removeClass('last');
+	$('#controls').append(editorbarhtml);
+	$('#editorcontrols').fadeIn('slow');
 }
  
 function bindControlEvents(){
@@ -182,8 +180,10 @@ function showFileEditor(dir,filename){
 					// Save mtime
 					$('#editor').attr('data-mtime', result.data.mtime);
 					// Initialise the editor
-					showControls(filename,result.data.write);
+					$('.actions,#file_action_panel').fadeOut('slow');
 					$('table').fadeOut('slow', function() {
+						// Show the control bar
+						showControls(filename,result.data.write);
 						// Update document title
 						document.title = filename;
 						$('#editor').text(result.data.filecontents);
@@ -215,7 +215,7 @@ function showFileEditor(dir,filename){
 // Fades out the editor.
 function hideFileEditor(){
 	// Fades out editor controls
-	$('#controls > :not(.actions,#file_access_panel,.crumb),#breadcrumb_file').fadeOut('slow',function(){
+	$('#editorcontrols').fadeOut('slow',function(){
 		$(this).remove();
 	});
 	// Fade out editor

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list