mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Making minor changes:
* Start tracking changes immediatedly depends on the handler. * Attaching control with the filter in the NodeListByNameControl. * Generating proper data for the NodeListByNameControl.
This commit is contained in:
parent
675e79daab
commit
456f5bc5b7
@ -121,6 +121,8 @@ function($, _, pgAdmin, Backbone, Backform, Alertify, Node) {
|
||||
res = [],
|
||||
filter = self.field.get('filter') || function() { return true; };
|
||||
|
||||
filter = filter.bind(self);
|
||||
|
||||
_.each(rows, function(r) {
|
||||
if (filter(r)) {
|
||||
var l = (_.isFunction(node['node_label']) ?
|
||||
@ -150,6 +152,8 @@ function($, _, pgAdmin, Backbone, Backform, Alertify, Node) {
|
||||
res = [],
|
||||
filter = self.field.get('filter') || function() { return true; };
|
||||
|
||||
filter = filter.bind(self);
|
||||
|
||||
_.each(rows, function(r) {
|
||||
if (filter(r)) {
|
||||
var l = (_.isFunction(node['node_label']) ?
|
||||
@ -158,7 +162,7 @@ function($, _, pgAdmin, Backbone, Backform, Alertify, Node) {
|
||||
image= (_.isFunction(node['node_image']) ?
|
||||
(node['node_image']).apply(node, [r, self.model, self]) : node.type);
|
||||
res.push({
|
||||
'value': l,
|
||||
'value': r.label,
|
||||
'node': image,
|
||||
'label': l
|
||||
});
|
||||
|
@ -1272,7 +1272,9 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, Backform) {
|
||||
self.objects = [];
|
||||
self.handler = (options.handler ||
|
||||
(self.collection && self.collection.handler));
|
||||
self.trackChanges = false;
|
||||
self.trackChanges = (
|
||||
self.handler && self.handler.trackChanges
|
||||
) || false;
|
||||
self.onChangeData = options.onChangeData;
|
||||
self.onChangeCallback = options.onChangeCallback;
|
||||
|
||||
@ -1473,7 +1475,6 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, Backform) {
|
||||
_.pick(
|
||||
node_info,
|
||||
function(v, k, o) {
|
||||
console.log(arguments);
|
||||
return (v.priority <= min_priority);
|
||||
})),
|
||||
function(o) { return o.priority; }),
|
||||
|
Loading…
Reference in New Issue
Block a user