Fixing couple issues with some of the nodes.
* Added 'catalog' as parent type for the domain, procedure nodes. * Proper initialization of the FTS Configuration, FTS Parser, FTS Dictionary, FTS Template Nodes. * Proper Indentation in collection.jspull/3/head
parent
95fe98600f
commit
6f2c8cfb31
|
@ -108,7 +108,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||
|
||||
// Set schema default value to its parent Schema
|
||||
if(this.model.isNew()){
|
||||
this.model.set({'schema': this.model.node_info.schema.label});
|
||||
this.model.set({'schema': this.model.node_info.schema.label});
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||
collection_type: 'coll-domain',
|
||||
hasSQL: true,
|
||||
hasDepends: true,
|
||||
parent_type: ['schema'],
|
||||
parent_type: ['schema', 'catalog'],
|
||||
Init: function() {
|
||||
// Avoid mulitple registration of menus
|
||||
if (this.initialized)
|
||||
|
|
|
@ -459,16 +459,16 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||
copy_config: undefined, // FTS configuration list to copy from
|
||||
tokens: undefined // token/dictionary pair list for node
|
||||
},
|
||||
initialize: function(attrs, args) {
|
||||
initialize: function(attrs, opts) {
|
||||
var isNew = (_.size(attrs) === 0);
|
||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||
|
||||
if (isNew) {
|
||||
var userInfo = pgBrowser.serverInfo[args.node_info.server._id].user;
|
||||
this.set({'owner': userInfo.name}, {silent: true});
|
||||
}
|
||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||
if (_.isUndefined(this.get('schema'))) {
|
||||
this.set('schema', this.node_info.schema._id);
|
||||
var user = pgBrowser.serverInfo[opts.node_info.server._id].user;
|
||||
this.set({
|
||||
'owner': user.name,
|
||||
'schema': opts.node_info.schema._id
|
||||
}, {silent: true});
|
||||
}
|
||||
},
|
||||
// Defining schema for FTS Configuration
|
||||
|
@ -576,4 +576,4 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||
}
|
||||
|
||||
return pgBrowser.Nodes['coll-fts_configuration'];
|
||||
});
|
||||
});
|
||||
|
|
|
@ -102,14 +102,14 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||
},
|
||||
initialize: function(attrs, args) {
|
||||
var isNew = (_.size(attrs) === 0);
|
||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||
|
||||
if (isNew) {
|
||||
var userInfo = pgBrowser.serverInfo[args.node_info.server._id].user;
|
||||
this.set({'owner': userInfo.name}, {silent: true});
|
||||
}
|
||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||
if (_.isUndefined(this.get('schema'))) {
|
||||
this.set('schema', this.node_info.schema._id);
|
||||
var user = pgBrowser.serverInfo[args.node_info.server._id].user;
|
||||
this.set({
|
||||
'owner': user.name,
|
||||
'schema': args.node_info.schema._id
|
||||
}, {silent: true});
|
||||
}
|
||||
},
|
||||
// Defining schema for fts dictionary
|
||||
|
|
|
@ -68,13 +68,14 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||
prslextype: undefined, // Lextype function for fts parser
|
||||
prsheadline: undefined // Headline function for fts parse
|
||||
},
|
||||
initialize: function() {
|
||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this,
|
||||
arguments
|
||||
);
|
||||
if (_.isUndefined(this.get('schema'))) {
|
||||
this.set('schema', this.node_info.schema._id);
|
||||
}
|
||||
initialize: function(attrs, args) {
|
||||
var isNew = (_.size(attrs) === 0);
|
||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(
|
||||
this, arguments
|
||||
);
|
||||
if (isNew) {
|
||||
this.set('schema', args.node_info.schema._id);
|
||||
}
|
||||
},
|
||||
// Defining schema for fts parser
|
||||
schema: [{
|
||||
|
|
|
@ -63,11 +63,12 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||
tmplinit: undefined, // Init function for fts template
|
||||
tmpllexize: undefined // Lexize function for fts template
|
||||
},
|
||||
initialize: function() {
|
||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||
if (_.isUndefined(this.get('schema'))) {
|
||||
this.set('schema', this.node_info.schema._id);
|
||||
}
|
||||
initialize: function(attrs, args) {
|
||||
var isNew = (_.size(attrs) === 0);
|
||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||
if (isNew) {
|
||||
this.set('schema', args.node_info.schema._id);
|
||||
}
|
||||
},
|
||||
// Defining schema for fts template
|
||||
schema: [{
|
||||
|
|
|
@ -30,7 +30,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Function) {
|
|||
hasSQL: true,
|
||||
hasDepends: true,
|
||||
hasScriptTypes: ['create', 'exec'],
|
||||
parent_type: ['schema'],
|
||||
parent_type: ['schema', 'catalog'],
|
||||
Init: function() {
|
||||
/* Avoid mulitple registration of menus */
|
||||
if (this.proc_initialized)
|
||||
|
|
Loading…
Reference in New Issue