mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	added search for electron + sourcemap for jquery
This commit is contained in:
		
							
								
								
									
										19
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										19
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -2615,6 +2615,11 @@
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "electron-in-page-search": {
 | 
			
		||||
      "version": "1.2.4",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/electron-in-page-search/-/electron-in-page-search-1.2.4.tgz",
 | 
			
		||||
      "integrity": "sha512-2Okl1INsxTjJ6FT5OOC/I/SX53vh3H1o0Gs0tPJavVNcVu3Zm32Cv5VsX7AUMPBJzgNgDc47pdgMZY4V5BCAJA=="
 | 
			
		||||
    },
 | 
			
		||||
    "electron-is-accelerator": {
 | 
			
		||||
      "version": "0.1.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz",
 | 
			
		||||
@@ -2904,6 +2909,15 @@
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "electron-search-text": {
 | 
			
		||||
      "version": "0.3.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/electron-search-text/-/electron-search-text-0.3.0.tgz",
 | 
			
		||||
      "integrity": "sha1-7/B6qelfmzeDqTGXNiyL43iKPT0=",
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "eventemitter2": "2.2.2",
 | 
			
		||||
        "lodash": "4.17.4"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "electron-to-chromium": {
 | 
			
		||||
      "version": "1.3.27",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz",
 | 
			
		||||
@@ -3521,6 +3535,11 @@
 | 
			
		||||
        "es5-ext": "0.10.35"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "eventemitter2": {
 | 
			
		||||
      "version": "2.2.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz",
 | 
			
		||||
      "integrity": "sha1-QH6nHCAgzVdTggOrfnpr3Pt2ktU="
 | 
			
		||||
    },
 | 
			
		||||
    "execa": {
 | 
			
		||||
      "version": "0.7.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@
 | 
			
		||||
    "ejs": "~2.5.7",
 | 
			
		||||
    "electron": "^1.8.2-beta.3",
 | 
			
		||||
    "electron-debug": "^1.0.0",
 | 
			
		||||
    "electron-in-page-search": "^1.2.4",
 | 
			
		||||
    "express": "~4.16.2",
 | 
			
		||||
    "express-session": "^1.15.6",
 | 
			
		||||
    "fs-extra": "^4.0.2",
 | 
			
		||||
 
 | 
			
		||||
@@ -43,6 +43,20 @@ $(document).bind('keydown', 'ctrl+shift+i', () => {
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
$(document).bind('keydown', 'ctrl+f', () => {
 | 
			
		||||
    if (isElectron()) {
 | 
			
		||||
        const searchInPage = require('electron-in-page-search').default;
 | 
			
		||||
        const remote = require('electron').remote;
 | 
			
		||||
 | 
			
		||||
        const inPageSearch = searchInPage(remote.getCurrentWebContents(), { openDevToolsOfSearchWindow: true });
 | 
			
		||||
 | 
			
		||||
        inPageSearch.openSearchWindow();
 | 
			
		||||
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
$(window).on('beforeunload', () => {
 | 
			
		||||
    // this makes sure that when user e.g. reloads the page or navigates away from the page, the note's content is saved
 | 
			
		||||
    // this sends the request asynchronously and doesn't wait for result
 | 
			
		||||
 
 | 
			
		||||
@@ -141,6 +141,7 @@
 | 
			
		||||
      //      Don't fire in text-accepting inputs that we didn't directly bind to
 | 
			
		||||
      if (this !== event.target && (/textarea|select/i.test(event.target.nodeName) ||
 | 
			
		||||
          (jQuery.hotkeys.options.filterTextInputs &&
 | 
			
		||||
            event.target.tagName != 'WEBVIEW' &&
 | 
			
		||||
            jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) {
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								public/libraries/jquery.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								public/libraries/jquery.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								public/libraries/jquery.min.js.map
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/libraries/jquery.min.js.map
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -130,6 +130,43 @@ div.ui-tooltip {
 | 
			
		||||
    padding-left: 20px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
* .electron-in-page-search-window is a class specified to default
 | 
			
		||||
* <webview> element for search window.
 | 
			
		||||
*/
 | 
			
		||||
.electron-in-page-search-window {
 | 
			
		||||
    position: fixed;
 | 
			
		||||
    top: 50px;
 | 
			
		||||
    right: 0;
 | 
			
		||||
    border: solid grey 1px;
 | 
			
		||||
    background-color: white;
 | 
			
		||||
    width: 300px;
 | 
			
		||||
    height: 36px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
* .search-inactive is added to search window <webview> when the window
 | 
			
		||||
* is inactive.
 | 
			
		||||
*/
 | 
			
		||||
.search-inactive {
 | 
			
		||||
    visibility: hidden;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
* .search-inactive is added to search window <webview> when the window
 | 
			
		||||
* is active.
 | 
			
		||||
*/
 | 
			
		||||
.search-active {
 | 
			
		||||
    visibility: visible;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.electronSearchText-box {
 | 
			
		||||
    display: none;
 | 
			
		||||
}
 | 
			
		||||
.electronSearchText-visible {
 | 
			
		||||
    display: block;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#loader-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000;background-color:#fff;opacity:1;transition:opacity 2s ease}
 | 
			
		||||
#loader{display:block;position:relative;left:50%;top:50%;width:150px;height:150px;margin:-75px 0 0 -75px;border-radius:50%;border:3px solid transparent;border-top-color:#777;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}
 | 
			
		||||
#loader:before{content:"";position:absolute;top:5px;left:5px;right:5px;bottom:5px;border-radius:50%;border:3px solid transparent;border-top-color:#aaa;-webkit-animation:spin 3s linear infinite;animation:spin 3s linear infinite}
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1 @@
 | 
			
		||||
module.exports = { build_date:"2017-12-09T23:30:52-05:00", build_revision: "2fdd4c37e58cdc96cba3a4dd81241a820097e3ce" };
 | 
			
		||||
module.exports = { build_date:"2017-12-10T23:23:04-05:00", build_revision: "bdeaa2829d4c5436e86d0d943a2a332d0c016804" };
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user