Fix coding style complaints
This commit is contained in:
		
							parent
							
								
									a5ae82e870
								
							
						
					
					
						commit
						0606fc58a5
					
				| @ -8,7 +8,7 @@ $(document).ready(function(){ | ||||
| 			$.post(OC.generateUrl('apps/documents/ajax/config/unstable'), data, documentsSettings.afterSave); | ||||
| 		}, | ||||
| 		afterSave : function(){ | ||||
| 			documentsMain.useUnstable = $('#webodf-unstable').attr('checked')==="checked" | ||||
| 			documentsMain.useUnstable = $('#webodf-unstable').attr('checked')==="checked"; | ||||
| 		} | ||||
| 	}; | ||||
| 	$('#webodf-unstable').change(documentsSettings.save); | ||||
|  | ||||
| @ -13,21 +13,25 @@ var odfViewer = { | ||||
| 	], | ||||
| 			 | ||||
| 	register : function(response){ | ||||
| 		var i,  | ||||
| 			mimeRead,  | ||||
| 			mimeUpdate; | ||||
| 		 | ||||
| 		if (response && response.mimes){ | ||||
| 			jQuery.each(response.mimes, function(i, mime){ | ||||
| 				odfViewer.supportedMimesRead.push(mime); | ||||
| 				odfViewer.supportedMimesUpdate.push(mime); | ||||
| 			}); | ||||
| 		} | ||||
| 		for (var i = 0; i < odfViewer.supportedMimesRead.length; ++i) { | ||||
| 			var mime = odfViewer.supportedMimesRead[i]; | ||||
| 			OCA.Files.fileActions.register(mime, 'View', OC.PERMISSION_READ, '', odfViewer.onView); | ||||
| 			OCA.Files.fileActions.setDefault(mime, 'View'); | ||||
| 		for (i = 0; i < odfViewer.supportedMimesRead.length; ++i) { | ||||
| 			mimeRead = odfViewer.supportedMimesRead[i]; | ||||
| 			OCA.Files.fileActions.register(mimeRead, 'View', OC.PERMISSION_READ, '', odfViewer.onView); | ||||
| 			OCA.Files.fileActions.setDefault(mimeRead, 'View'); | ||||
| 		} | ||||
| 		for (var i = 0; i < odfViewer.supportedMimesUpdate.length; ++i) { | ||||
| 			var mime = odfViewer.supportedMimesUpdate[i]; | ||||
| 		for (i = 0; i < odfViewer.supportedMimesUpdate.length; ++i) { | ||||
| 			mimeUpdate = odfViewer.supportedMimesUpdate[i]; | ||||
| 			OCA.Files.fileActions.register( | ||||
| 					mime,  | ||||
| 					mimeUpdate,  | ||||
| 					'Edit', | ||||
| 					OC.PERMISSION_UPDATE,  | ||||
| 					OC.imagePath('core', 'actions/rename'),  | ||||
| @ -48,7 +52,8 @@ var odfViewer = { | ||||
| 	}, | ||||
| 	 | ||||
| 	onEdit : function(fileName, context){ | ||||
| 		var fileId = context.$file.attr('data-id'); | ||||
| 		var location, | ||||
| 			fileId = context.$file.attr('data-id'); | ||||
| 		window.location = OC.linkTo('documents', 'index.php') + '#' + fileId; | ||||
| 	}, | ||||
| 			 | ||||
| @ -58,11 +63,12 @@ var odfViewer = { | ||||
| 
 | ||||
| 		if (odfViewer.isDocuments){ | ||||
| 			//Documents view
 | ||||
| 			var location = filename; | ||||
| 			location = filename; | ||||
| 		} else { | ||||
| 			//Public page, files app, etc
 | ||||
| 			var dirName = $('#dir').val()!='/' ? $('#dir').val() + '/' : '/'; | ||||
| 			var location = OC.filePath('documents', 'ajax', 'download.php') + '?path=' + encodeURIComponent(dirName) + encodeURIComponent(filename) | ||||
| 			location = OC.filePath('documents', 'ajax', 'download.php') + '?path='  | ||||
| 				+ encodeURIComponent(dirName) + encodeURIComponent(filename) | ||||
| 				+ '&requesttoken=' + encodeURIComponent(oc_requesttoken); | ||||
| 			OC.addStyle('documents', '3rdparty/webodf/wodotexteditor'); | ||||
| 		} | ||||
|  | ||||
| @ -42,8 +42,7 @@ define("owncloud/widgets/ocToolbar", | ||||
| 						ocClose.startup(); | ||||
| 					}); | ||||
| 					return callback(ocToolbar); | ||||
| 				} | ||||
| 				; | ||||
| 				}; | ||||
| 				// init
 | ||||
| 				makeWidget(function (widget) { | ||||
| 					return callback(widget); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user