Commit 96755c9d authored by Dietmar Maurer's avatar Dietmar Maurer

remove useless require declarations

parent 3813e7b4
...@@ -8,11 +8,6 @@ ...@@ -8,11 +8,6 @@
Ext.define('PVE.Workspace', { Ext.define('PVE.Workspace', {
extend: 'Ext.container.Viewport', extend: 'Ext.container.Viewport',
requires: [
'Ext.tip.*',
'PVE.Utils',
'PVE.window.LoginWindow'
],
title: 'Proxmox Virtual Environment', title: 'Proxmox Virtual Environment',
...@@ -103,9 +98,6 @@ Ext.define('PVE.Workspace', { ...@@ -103,9 +98,6 @@ Ext.define('PVE.Workspace', {
Ext.define('PVE.ConsoleWorkspace', { Ext.define('PVE.ConsoleWorkspace', {
extend: 'PVE.Workspace', extend: 'PVE.Workspace',
requires: [
'PVE.KVMConsole'
],
alias: ['widget.pveConsoleWorkspace'], alias: ['widget.pveConsoleWorkspace'],
......
Ext.define('PVE.data.ResourceStore', { Ext.define('PVE.data.ResourceStore', {
extend: 'PVE.data.UpdateStore', extend: 'PVE.data.UpdateStore',
requires: ['PVE.Utils'],
singleton: true, singleton: true,
findNextVMID: function() { findNextVMID: function() {
......
Ext.define('PVE.data.UpdateStore', { Ext.define('PVE.data.UpdateStore', {
extend: 'Ext.data.Store', extend: 'Ext.data.Store',
requires: [
'PVE.Utils',
'Ext.util.*',
'PVE.data.UpdateQueue'
],
constructor: function(config) { constructor: function(config) {
var me = this; var me = this;
......
...@@ -3,6 +3,7 @@ Ext.define('PVE.dc.ACLAdd', { ...@@ -3,6 +3,7 @@ Ext.define('PVE.dc.ACLAdd', {
alias: ['widget.pveACLAdd'], alias: ['widget.pveACLAdd'],
initComponent : function() { initComponent : function() {
/*jslint confusion: true */
var me = this; var me = this;
me.create = true; me.create = true;
......
...@@ -49,7 +49,7 @@ Ext.define('PVE.dc.AuthView', { ...@@ -49,7 +49,7 @@ Ext.define('PVE.dc.AuthView', {
}); });
var remove_btn = new PVE.button.Button({ var remove_btn = new PVE.button.Button({
text: gettext('Remove'), text: gettext('Remove'),
disabled: true, disabled: true,
selModel: sm, selModel: sm,
confirmMsg: function (rec) { confirmMsg: function (rec) {
......
...@@ -19,6 +19,9 @@ Ext.define('PVE.dc.UserEdit', { ...@@ -19,6 +19,9 @@ Ext.define('PVE.dc.UserEdit', {
method = 'PUT'; method = 'PUT';
} }
var verifypw;
var pwfield;
var validate_pw = function() { var validate_pw = function() {
if (verifypw.getValue() !== pwfield.getValue()) { if (verifypw.getValue() !== pwfield.getValue()) {
return gettext("Passwords does not match"); return gettext("Passwords does not match");
...@@ -26,7 +29,7 @@ Ext.define('PVE.dc.UserEdit', { ...@@ -26,7 +29,7 @@ Ext.define('PVE.dc.UserEdit', {
return true; return true;
}; };
var verifypw = Ext.createWidget('textfield', { verifypw = Ext.createWidget('textfield', {
inputType: 'password', inputType: 'password',
fieldLabel: gettext('Verify Password'), fieldLabel: gettext('Verify Password'),
name: 'verifypassword', name: 'verifypassword',
...@@ -36,7 +39,7 @@ Ext.define('PVE.dc.UserEdit', { ...@@ -36,7 +39,7 @@ Ext.define('PVE.dc.UserEdit', {
validator: validate_pw validator: validate_pw
}); });
var pwfield = Ext.createWidget('textfield', { pwfield = Ext.createWidget('textfield', {
inputType: 'password', inputType: 'password',
fieldLabel: gettext('Password'), fieldLabel: gettext('Password'),
minLength: 5, minLength: 5,
......
...@@ -8,6 +8,9 @@ Ext.define('PVE.window.PasswordEdit', { ...@@ -8,6 +8,9 @@ Ext.define('PVE.window.PasswordEdit', {
throw "no userid specified"; throw "no userid specified";
} }
var verifypw;
var pwfield;
var validate_pw = function() { var validate_pw = function() {
if (verifypw.getValue() !== pwfield.getValue()) { if (verifypw.getValue() !== pwfield.getValue()) {
return gettext("Passwords does not match"); return gettext("Passwords does not match");
...@@ -15,7 +18,7 @@ Ext.define('PVE.window.PasswordEdit', { ...@@ -15,7 +18,7 @@ Ext.define('PVE.window.PasswordEdit', {
return true; return true;
}; };
var verifypw = Ext.createWidget('textfield', { verifypw = Ext.createWidget('textfield', {
inputType: 'password', inputType: 'password',
fieldLabel: gettext('Verify Password'), fieldLabel: gettext('Verify Password'),
name: 'verifypassword', name: 'verifypassword',
...@@ -23,7 +26,7 @@ Ext.define('PVE.window.PasswordEdit', { ...@@ -23,7 +26,7 @@ Ext.define('PVE.window.PasswordEdit', {
validator: validate_pw validator: validate_pw
}); });
var pwfield = Ext.createWidget('textfield', { pwfield = Ext.createWidget('textfield', {
inputType: 'password', inputType: 'password',
fieldLabel: gettext('Password'), fieldLabel: gettext('Password'),
minLength: 5, minLength: 5,
...@@ -39,7 +42,7 @@ Ext.define('PVE.window.PasswordEdit', { ...@@ -39,7 +42,7 @@ Ext.define('PVE.window.PasswordEdit', {
{ {
xtype: 'hiddenfield', xtype: 'hiddenfield',
name: 'userid', name: 'userid',
value: me.userid, value: me.userid
} }
] ]
}); });
......
Ext.define('PVE.form.BridgeSelector', { Ext.define('PVE.form.BridgeSelector', {
extend: 'PVE.form.ComboGrid', extend: 'PVE.form.ComboGrid',
requires: [
'Ext.data.Store',
'PVE.RestProxy'
],
alias: ['widget.PVE.form.BridgeSelector'], alias: ['widget.PVE.form.BridgeSelector'],
setNodename: function(nodename) { setNodename: function(nodename) {
......
Ext.define('PVE.form.ComboGrid', { Ext.define('PVE.form.ComboGrid', {
extend: 'Ext.form.field.ComboBox', extend: 'Ext.form.field.ComboBox',
requires: [
'Ext.grid.Panel',
'PVE.Utils'
],
alias: ['widget.PVE.form.ComboGrid'], alias: ['widget.PVE.form.ComboGrid'],
computeHeight: function() { computeHeight: function() {
......
Ext.define('PVE.form.FileSelector', { Ext.define('PVE.form.FileSelector', {
extend: 'PVE.form.ComboGrid', extend: 'PVE.form.ComboGrid',
requires: [
'Ext.data.Store',
'PVE.RestProxy'
],
alias: ['widget.pveFileSelector'], alias: ['widget.pveFileSelector'],
setStorage: function(storage, nodename) { setStorage: function(storage, nodename) {
......
...@@ -47,7 +47,7 @@ Ext.define('PVE.form.GroupSelector', { ...@@ -47,7 +47,7 @@ Ext.define('PVE.form.GroupSelector', {
fields: [ 'groupid', 'comment' ], fields: [ 'groupid', 'comment' ],
proxy: { proxy: {
type: 'pve', type: 'pve',
url: "/api2/json/access/groups", url: "/api2/json/access/groups"
}, },
idProperty: 'groupid' idProperty: 'groupid'
}); });
......
Ext.define('PVE.form.NodeSelector', { Ext.define('PVE.form.NodeSelector', {
extend: 'PVE.form.ComboGrid', extend: 'PVE.form.ComboGrid',
requires: [
'Ext.data.Store',
'PVE.RestProxy'
],
alias: ['widget.PVE.form.NodeSelector'], alias: ['widget.PVE.form.NodeSelector'],
// invalidate nodes which are offline // invalidate nodes which are offline
......
...@@ -47,7 +47,7 @@ Ext.define('PVE.form.PoolSelector', { ...@@ -47,7 +47,7 @@ Ext.define('PVE.form.PoolSelector', {
fields: [ 'poolid', 'comment' ], fields: [ 'poolid', 'comment' ],
proxy: { proxy: {
type: 'pve', type: 'pve',
url: "/api2/json/access/pools", url: "/api2/json/access/pools"
}, },
idProperty: 'poolid' idProperty: 'poolid'
}); });
......
Ext.define('PVE.form.RRDTypeSelector', { Ext.define('PVE.form.RRDTypeSelector', {
extend: 'Ext.form.field.ComboBox', extend: 'Ext.form.field.ComboBox',
requires: [
'Ext.state.Manager'
],
alias: ['widget.pveRRDTypeSelector'], alias: ['widget.pveRRDTypeSelector'],
initComponent: function() { initComponent: function() {
......
Ext.define('PVE.form.RealmComboBox', { Ext.define('PVE.form.RealmComboBox', {
extend: 'Ext.form.field.ComboBox', extend: 'Ext.form.field.ComboBox',
requires: ['Ext.data.Store', 'PVE.RestProxy'],
alias: ['widget.pveRealmComboBox'], alias: ['widget.pveRealmComboBox'],
initComponent: function() { initComponent: function() {
......
Ext.define('PVE.form.StorageSelector', { Ext.define('PVE.form.StorageSelector', {
extend: 'PVE.form.ComboGrid', extend: 'PVE.form.ComboGrid',
requires: [
'Ext.data.Store',
'PVE.RestProxy'
],
alias: ['widget.PVE.form.StorageSelector'], alias: ['widget.PVE.form.StorageSelector'],
setNodename: function(nodename) { setNodename: function(nodename) {
......
Ext.define('PVE.form.ViewSelector', { Ext.define('PVE.form.ViewSelector', {
extend: 'Ext.form.field.ComboBox', extend: 'Ext.form.field.ComboBox',
requires: ['Ext.data.Store'],
alias: ['widget.pveViewSelector'], alias: ['widget.pveViewSelector'],
initComponent: function() { initComponent: function() {
......
Ext.define('PVE.grid.ObjectGrid', { Ext.define('PVE.grid.ObjectGrid', {
extend: 'Ext.grid.GridPanel', extend: 'Ext.grid.GridPanel',
requires: [
'Ext.grid.*',
'PVE.data.ObjectStore'
],
alias: ['widget.pveObjectGrid'], alias: ['widget.pveObjectGrid'],
getObjectValue: function(key, defaultValue) { getObjectValue: function(key, defaultValue) {
......
...@@ -2,6 +2,7 @@ Ext.define('PVE.pool.AddVM', { ...@@ -2,6 +2,7 @@ Ext.define('PVE.pool.AddVM', {
extend: 'PVE.window.Edit', extend: 'PVE.window.Edit',
initComponent : function() { initComponent : function() {
/*jslint confusion: true */
var me = this; var me = this;
if (!me.pool) { if (!me.pool) {
...@@ -35,6 +36,7 @@ Ext.define('PVE.pool.AddStorage', { ...@@ -35,6 +36,7 @@ Ext.define('PVE.pool.AddStorage', {
extend: 'PVE.window.Edit', extend: 'PVE.window.Edit',
initComponent : function() { initComponent : function() {
/*jslint confusion: true */
var me = this; var me = this;
if (!me.pool) { if (!me.pool) {
......
...@@ -15,16 +15,6 @@ Ext.override(Ext.grid.feature.Chunking, { ...@@ -15,16 +15,6 @@ Ext.override(Ext.grid.feature.Chunking, {
Ext.define('PVE.grid.ResourceGrid', { Ext.define('PVE.grid.ResourceGrid', {
extend: 'Ext.grid.GridPanel', extend: 'Ext.grid.GridPanel',
requires: [
'Ext.grid.*',
'Ext.grid.feature.Chunking',
'Ext.state.Manager',
'Ext.data.*',
'Ext.data.Store',
'Ext.util.*',
'PVE.Utils',
'PVE.data.ResourceStore'
],
alias: ['widget.pveResourceGrid'], alias: ['widget.pveResourceGrid'],
//fixme: this makes still problems with the scrollbar //fixme: this makes still problems with the scrollbar
......
...@@ -71,8 +71,6 @@ if (-f $langfile) { ...@@ -71,8 +71,6 @@ if (-f $langfile) {
$jssrc .= <<_EOJS; $jssrc .= <<_EOJS;
Ext.require(['*', '$workspace']);
// we need this (the java applet ignores the zindex) // we need this (the java applet ignores the zindex)
Ext.useShims = true; Ext.useShims = true;
......
Ext.define('PVE.node.DNSEdit', { Ext.define('PVE.node.DNSEdit', {
extend: 'PVE.window.Edit', extend: 'PVE.window.Edit',
requires: [
'PVE.Utils'
],
alias: ['widget.pveNodeDNSEdit'], alias: ['widget.pveNodeDNSEdit'],
initComponent : function() { initComponent : function() {
......
Ext.define('PVE.node.TimeEdit', { Ext.define('PVE.node.TimeEdit', {
extend: 'PVE.window.Edit', extend: 'PVE.window.Edit',
requires: ['PVE.data.TimezoneStore'],
alias: ['widget.pveNodeTimeEdit'], alias: ['widget.pveNodeTimeEdit'],
initComponent : function() { initComponent : function() {
......
/*jslint confusion: true */ /*jslint confusion: true */
Ext.define('PVE.openvz.CreateWizard', { Ext.define('PVE.openvz.CreateWizard', {
extend: 'PVE.window.Wizard', extend: 'PVE.window.Wizard',
requires: [
'Ext.form.*',
'PVE.data.ResourceStore'
],
initComponent: function() { initComponent: function() {
var me = this; var me = this;
......
...@@ -147,9 +147,6 @@ Ext.define('PVE.OpenVZ.IPAdd', { ...@@ -147,9 +147,6 @@ Ext.define('PVE.OpenVZ.IPAdd', {
Ext.define('PVE.openvz.NetworkView', { Ext.define('PVE.openvz.NetworkView', {
extend: 'Ext.grid.GridPanel', extend: 'Ext.grid.GridPanel',
requires: [
'Ext.grid.*'
],
alias: ['widget.pveOpenVZNetworkView'], alias: ['widget.pveOpenVZNetworkView'],
dataCache: {}, // used to store result of last load dataCache: {}, // used to store result of last load
......
Ext.define('PVE.panel.InputPanel', { Ext.define('PVE.panel.InputPanel', {
extend: 'Ext.panel.Panel', extend: 'Ext.panel.Panel',
requires: [
'PVE.Utils'
],
alias: ['widget.inputpanel'], alias: ['widget.inputpanel'],
border: false, border: false,
......
Ext.define('PVE.panel.StatusPanel', { Ext.define('PVE.panel.StatusPanel', {
extend: 'Ext.tab.Panel', extend: 'Ext.tab.Panel',
requires: [
'Ext.state.Manager',
'PVE.dc.Log',
'PVE.dc.Tasks'
],
alias: 'widget.pveStatusPanel', alias: 'widget.pveStatusPanel',
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
/*jslint confusion: true */ /*jslint confusion: true */
Ext.define('PVE.qemu.CreateWizard', { Ext.define('PVE.qemu.CreateWizard', {
extend: 'PVE.window.Wizard', extend: 'PVE.window.Wizard',
requires: [
'Ext.form.*',
'PVE.data.ResourceStore'
],
initComponent: function() { initComponent: function() {
var me = this; var me = this;
......
Ext.define('PVE.tree.ResourceTree', { Ext.define('PVE.tree.ResourceTree', {
extend: 'Ext.tree.TreePanel', extend: 'Ext.tree.TreePanel',
requires: ['Ext.tree.*',
'Ext.state.Manager',
'PVE.Utils',
'PVE.data.ResourceStore'],
alias: ['widget.pveResourceTree'], alias: ['widget.pveResourceTree'],
statics: { statics: {
......
Ext.define('PVE.window.LoginWindow', { Ext.define('PVE.window.LoginWindow', {
extend: 'Ext.window.Window', extend: 'Ext.window.Window',
requires: ['PVE.form.RealmComboBox'],
// private // private
onLogon: function() { onLogon: function() {
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
Ext.define('PVE.window.TaskViewer', { Ext.define('PVE.window.TaskViewer', {
extend: 'Ext.window.Window', extend: 'Ext.window.Window',
requires: [
'PVE.Utils'
],
alias: 'widget.pveTaskViewer', alias: 'widget.pveTaskViewer',
initComponent: function() { initComponent: function() {
......
Ext.define('PVE.window.Wizard', { Ext.define('PVE.window.Wizard', {
extend: 'Ext.window.Window', extend: 'Ext.window.Window',
requires: [
'PVE.Utils'
],
getValues: function(dirtyOnly) { getValues: function(dirtyOnly) {
var me = this; var me = this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment