mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 04:07:32 -05:00 
			
		
		
		
	Open document when clicked
This commit is contained in:
		
							parent
							
								
									4aa11be28f
								
							
						
					
					
						commit
						05903d413a
					
				@ -364,6 +364,12 @@
 | 
			
		||||
 | 
			
		||||
        @if (Auth::user()->account->hasFeature(FEATURE_DOCUMENTS))
 | 
			
		||||
        function handleDocumentAdded(file){
 | 
			
		||||
            // open document when clicked
 | 
			
		||||
            if (file.url) {
 | 
			
		||||
                file.previewElement.addEventListener("click", function() {
 | 
			
		||||
                    window.open(file.url, '_blank');
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
            if(file.mock)return;
 | 
			
		||||
            file.index = model.documents().length;
 | 
			
		||||
            model.addDocument({name:file.name, size:file.size, type:file.type});
 | 
			
		||||
 | 
			
		||||
@ -1382,6 +1382,12 @@
 | 
			
		||||
 | 
			
		||||
    @if ($account->hasFeature(FEATURE_DOCUMENTS))
 | 
			
		||||
    function handleDocumentAdded(file){
 | 
			
		||||
        // open document when clicked
 | 
			
		||||
        if (file.url) {
 | 
			
		||||
            file.previewElement.addEventListener("click", function() {
 | 
			
		||||
                window.open(file.url, '_blank');
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        if(file.mock)return;
 | 
			
		||||
        file.index = model.invoice().documents().length;
 | 
			
		||||
        model.invoice().addDocument({name:file.name, size:file.size, type:file.type});
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user