/**
* @fileOverview
* Copyright (c) 2013 Regione Autonoma della Sardegna
* Published under the GPL license.
* See https://sardegnageoportale.it/webgis/license.txt
* for the full text of the license.
* @version 0.1
*/
/**
* @require plugins/Tool.js
* @require GeoExt/widgets/Action.js
*/
/**
* @namespace framework.plugins
*/
Ext.ns("framework.plugins");
/**
* Class to manage loads of local layer in several formats.
* @name_ ManagementUsers
* @class Class to manage loads of local layer in several formats.
* @constructor
* @extends gxp.plugins.Tool
*/
framework.plugins.ManagementUsers = Ext.extend(gxp.plugins.Tool,
/**
* @lends framework.plugins.ManagementUsers.prototype
*/
{
/**
* framework_importlocallayeraction plugin type.
* @public
* @type String
*/
ptype: 'framework_managementusers',
/**
* Text for zoom in action tooltip (i18n).
* @public
* @type string
*/
tooltipText: "Gestione utenti",
/**
* The names of the css classes that define the icons of the buttons created
* @public
* @type String
*/
iconCls: "gxp-icon-manageusers",
/** Adds actions to be performed on click.
* @public
*/
addActions: function() {
var map = this.target.mapPanel.map;
var action = new GeoExt.Action({
iconCls: this.iconCls,
tooltip: this.tooltipText,
map: map,
handler: function() {
var userManag = new framework.widgets.UsersManagement({
id: "userManagement",
collapsed: false,
height: 370,
//title: 'Gestione utenti',
layout: 'fit',
autoScroll:true,
userAuthDS: this.userAuthDS,
servletsObj: this.servletsObj,
buttons: [{
text: 'Annulla',
handler: function() {
this.userManagWindow.hide();
// _self.win.destroy();
},
scope:this
}]
});
this.userManagWindow = new Ext.Window({
id: 'usermanagwindow',
modal: true,
plain: true,
closable: false,
title: 'Gestione utenti',
height: 400,
width: Object.keys(this.userAuthDS).length > 2 ? 420:350,
border: false,
items: [
userManag
]
});
this.userManagWindow.show();
//GeoExt.ux.data.Import.KMLImport(map, null);
}, scope:this
});
return framework.plugins.ManagementUsers.superclass.addActions.apply(this, [action]);
}
});
Ext.preg(framework.plugins.ManagementUsers.prototype.ptype, framework.plugins.ManagementUsers);