kopia lustrzana https://github.com/c9/core
restore value of last search in commands panel after reload
rodzic
0f83dcd570
commit
4d3a495718
|
@ -1,6 +1,7 @@
|
|||
define(function(require, exports, module) {
|
||||
main.consumes = [
|
||||
"Panel", "ui", "menus", "panels", "commands", "tabManager", "layout"
|
||||
"Panel", "ui", "menus", "panels", "commands", "tabManager", "layout",
|
||||
"settings"
|
||||
];
|
||||
main.provides = ["commands.panel"];
|
||||
return main;
|
||||
|
@ -13,6 +14,7 @@ define(function(require, exports, module) {
|
|||
var panels = imports.panels;
|
||||
var layout = imports.layout;
|
||||
var commands = imports.commands;
|
||||
var settings = imports.settings;
|
||||
|
||||
var markup = require("text!./panel.xml");
|
||||
var search = require('../c9.ide.navigate/search');
|
||||
|
@ -130,6 +132,7 @@ define(function(require, exports, module) {
|
|||
txtFilter.ace.on("input", function(e) {
|
||||
var val = txtFilter.getValue();
|
||||
filter(val);
|
||||
settings.set("state/commandPanel/@value", val);
|
||||
});
|
||||
|
||||
function onblur(e) {
|
||||
|
@ -154,8 +157,10 @@ define(function(require, exports, module) {
|
|||
setTimeout(function(){
|
||||
// Assign the dataprovider
|
||||
tree.setDataProvider(ldSearch);
|
||||
|
||||
tree.selection.$wrapAround = true;
|
||||
var val = settings.get("state/commandPanel/@value");
|
||||
if (val)
|
||||
txtFilter.ace.setValue(val);
|
||||
}, 200);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue