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
|
@ -115,7 +115,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||||
collection_type: 'coll-domain',
|
collection_type: 'coll-domain',
|
||||||
hasSQL: true,
|
hasSQL: true,
|
||||||
hasDepends: true,
|
hasDepends: true,
|
||||||
parent_type: ['schema'],
|
parent_type: ['schema', 'catalog'],
|
||||||
Init: function() {
|
Init: function() {
|
||||||
// Avoid mulitple registration of menus
|
// Avoid mulitple registration of menus
|
||||||
if (this.initialized)
|
if (this.initialized)
|
||||||
|
|
|
@ -459,16 +459,16 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||||
copy_config: undefined, // FTS configuration list to copy from
|
copy_config: undefined, // FTS configuration list to copy from
|
||||||
tokens: undefined // token/dictionary pair list for node
|
tokens: undefined // token/dictionary pair list for node
|
||||||
},
|
},
|
||||||
initialize: function(attrs, args) {
|
initialize: function(attrs, opts) {
|
||||||
var isNew = (_.size(attrs) === 0);
|
var isNew = (_.size(attrs) === 0);
|
||||||
|
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||||
|
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
var userInfo = pgBrowser.serverInfo[args.node_info.server._id].user;
|
var user = pgBrowser.serverInfo[opts.node_info.server._id].user;
|
||||||
this.set({'owner': userInfo.name}, {silent: true});
|
this.set({
|
||||||
}
|
'owner': user.name,
|
||||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
'schema': opts.node_info.schema._id
|
||||||
if (_.isUndefined(this.get('schema'))) {
|
}, {silent: true});
|
||||||
this.set('schema', this.node_info.schema._id);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Defining schema for FTS Configuration
|
// Defining schema for FTS Configuration
|
||||||
|
|
|
@ -102,14 +102,14 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||||
},
|
},
|
||||||
initialize: function(attrs, args) {
|
initialize: function(attrs, args) {
|
||||||
var isNew = (_.size(attrs) === 0);
|
var isNew = (_.size(attrs) === 0);
|
||||||
|
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||||
|
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
var userInfo = pgBrowser.serverInfo[args.node_info.server._id].user;
|
var user = pgBrowser.serverInfo[args.node_info.server._id].user;
|
||||||
this.set({'owner': userInfo.name}, {silent: true});
|
this.set({
|
||||||
}
|
'owner': user.name,
|
||||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
'schema': args.node_info.schema._id
|
||||||
if (_.isUndefined(this.get('schema'))) {
|
}, {silent: true});
|
||||||
this.set('schema', this.node_info.schema._id);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Defining schema for fts dictionary
|
// Defining schema for fts dictionary
|
||||||
|
|
|
@ -68,12 +68,13 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||||
prslextype: undefined, // Lextype function for fts parser
|
prslextype: undefined, // Lextype function for fts parser
|
||||||
prsheadline: undefined // Headline function for fts parse
|
prsheadline: undefined // Headline function for fts parse
|
||||||
},
|
},
|
||||||
initialize: function() {
|
initialize: function(attrs, args) {
|
||||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this,
|
var isNew = (_.size(attrs) === 0);
|
||||||
arguments
|
pgAdmin.Browser.Node.Model.prototype.initialize.apply(
|
||||||
|
this, arguments
|
||||||
);
|
);
|
||||||
if (_.isUndefined(this.get('schema'))) {
|
if (isNew) {
|
||||||
this.set('schema', this.node_info.schema._id);
|
this.set('schema', args.node_info.schema._id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Defining schema for fts parser
|
// Defining schema for fts parser
|
||||||
|
|
|
@ -63,10 +63,11 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||||
tmplinit: undefined, // Init function for fts template
|
tmplinit: undefined, // Init function for fts template
|
||||||
tmpllexize: undefined // Lexize function for fts template
|
tmpllexize: undefined // Lexize function for fts template
|
||||||
},
|
},
|
||||||
initialize: function() {
|
initialize: function(attrs, args) {
|
||||||
|
var isNew = (_.size(attrs) === 0);
|
||||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||||
if (_.isUndefined(this.get('schema'))) {
|
if (isNew) {
|
||||||
this.set('schema', this.node_info.schema._id);
|
this.set('schema', args.node_info.schema._id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Defining schema for fts template
|
// Defining schema for fts template
|
||||||
|
|
|
@ -30,7 +30,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Function) {
|
||||||
hasSQL: true,
|
hasSQL: true,
|
||||||
hasDepends: true,
|
hasDepends: true,
|
||||||
hasScriptTypes: ['create', 'exec'],
|
hasScriptTypes: ['create', 'exec'],
|
||||||
parent_type: ['schema'],
|
parent_type: ['schema', 'catalog'],
|
||||||
Init: function() {
|
Init: function() {
|
||||||
/* Avoid mulitple registration of menus */
|
/* Avoid mulitple registration of menus */
|
||||||
if (this.proc_initialized)
|
if (this.proc_initialized)
|
||||||
|
|
Loading…
Reference in New Issue